/* ==========================================================================
   Kool POS — Sign in (login.php). Uses premium.css tokens.
   ========================================================================== */

html, body.au-body {
    height: 100%;
}

body.au-body {
    margin: 0;
    background: #fff;
    color: var(--pk-ink);
    font-family: var(--pk-font);
    -webkit-font-smoothing: antialiased;
}

.au-body *,
.au-body *::before,
.au-body *::after {
    box-sizing: border-box;
}

.au-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    min-height: 100vh;
}

/* ---------- Brand panel ---------------------------------------------------- */

.au-brand {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 2.5rem 3.5rem;
    color: #fff;
    background:
        radial-gradient(70% 60% at 100% 0%, rgba(245, 179, 1, .28) 0%, rgba(245, 179, 1, 0) 60%),
        radial-gradient(60% 60% at 0% 100%, rgba(99, 102, 241, .35) 0%, rgba(99, 102, 241, 0) 60%),
        linear-gradient(160deg, #0b1220 0%, #16203a 100%);
}

.au-brand::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px);
    background-size: 22px 22px;
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
    mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
    pointer-events: none;
}

.au-brand > * {
    position: relative;
}

.au-logo img {
    height: 44px;
    display: block;
}

.au-logo-sm {
    display: none;
}

.au-brand-copy {
    max-width: 30rem;
    margin-top: auto;
    padding-top: 2rem;
}

.au-kicker {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .35rem .8rem;
    border-radius: 999px;
    background: rgba(245, 179, 1, .14);
    border: 1px solid rgba(245, 179, 1, .3);
    color: #fcd34d;
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .04em;
}

.au-brand h1 {
    margin: 1.1rem 0 .9rem;
    font-size: clamp(1.8rem, 2.6vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.15;
}

.au-brand-copy > p {
    margin: 0 0 1.5rem;
    color: rgba(226, 232, 240, .75);
    font-size: 1rem;
    line-height: 1.6;
}

.au-points {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: .7rem;
}

.au-points li {
    display: flex;
    align-items: center;
    gap: .75rem;
    color: rgba(255, 255, 255, .9);
    font-size: .92rem;
    font-weight: 500;
}

.au-points i {
    width: 2rem;
    height: 2rem;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .1);
    color: var(--pk-gold);
    font-size: .8rem;
}

/* Product illustration */
.au-mock {
    margin: 2.5rem 0 auto;
    perspective: 1200px;
}

.au-mock-card {
    width: min(100%, 440px);
    border-radius: 16px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .12);
    box-shadow: 0 30px 60px rgba(2, 6, 23, .45);
    transform: rotateX(8deg) rotateY(-10deg);
    overflow: hidden;
    backdrop-filter: blur(6px);
}

.au-mock-head {
    display: flex;
    gap: 6px;
    padding: .7rem .9rem;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.au-mock-head span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .2);
}

.au-mock-body {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: .8rem;
    padding: .9rem;
}

.au-mock-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .5rem;
}

.au-mock-grid i {
    aspect-ratio: 1;
    border-radius: 10px;
    background: linear-gradient(160deg, var(--c), rgba(255, 255, 255, .08));
    opacity: .85;
}

.au-mock-bill {
    display: flex;
    flex-direction: column;
    gap: .45rem;
    padding: .7rem;
    border-radius: 10px;
    background: #fff;
}

.au-mock-bill b {
    height: 8px;
    width: 60%;
    border-radius: 4px;
    background: #0f172a;
}

.au-mock-bill em {
    height: 6px;
    border-radius: 3px;
    background: #e5e9f2;
}

.au-mock-bill strong {
    margin-top: auto;
    padding: .45rem;
    border-radius: 7px;
    background: linear-gradient(135deg, var(--pk-gold), var(--pk-gold-deep));
    color: #0f172a;
    font-size: .74rem;
    text-align: center;
}

.au-copy {
    margin: 2rem 0 0;
    color: rgba(148, 163, 184, .7);
    font-size: .78rem;
}

.au-copy a {
    color: rgba(226, 232, 240, .8);
    text-decoration: none;
}

/* ---------- Form panel ------------------------------------------------------- */

.au-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
    background: #fff;
}

.au-form-wrap {
    width: 100%;
    max-width: 400px;
}

.au-form-wrap h2 {
    margin: 0 0 .35rem;
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -.02em;
}

.au-sub {
    margin: 0 0 1.75rem;
    color: var(--pk-ink-2);
    font-size: .95rem;
}

.au-alert {
    display: flex;
    gap: .65rem;
    align-items: flex-start;
    padding: .8rem .95rem;
    margin-bottom: 1.25rem;
    border-radius: 12px;
    background: var(--pk-rose-soft);
    border: 1px solid #fecdd6;
    color: #9f1239;
    font-size: .86rem;
    line-height: 1.45;
    animation: au-shake .35s ease;
}

.au-alert i {
    margin-top: 2px;
}

@keyframes au-shake {
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

.au-field {
    margin-bottom: 1.05rem;
}

.au-field label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: .4rem;
    color: var(--pk-ink);
    font-size: .84rem;
    font-weight: 700;
}

.au-forgot {
    color: var(--pk-primary);
    font-size: .8rem;
    font-weight: 600;
    text-decoration: none;
}

.au-forgot:hover {
    text-decoration: underline;
}

.au-input {
    position: relative;
    display: flex;
    align-items: center;
}

.au-input > i {
    position: absolute;
    left: 1rem;
    color: var(--pk-muted);
    font-size: .85rem;
    pointer-events: none;
    transition: color .15s ease;
}

.au-input input {
    width: 100%;
    height: 50px;
    padding: 0 3rem 0 2.75rem;
    border-radius: 12px;
    border: 1.5px solid var(--pk-line);
    background: #fbfbfd;
    color: var(--pk-ink);
    font-family: inherit;
    font-size: .98rem;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.au-input input::placeholder {
    color: #b3bccd;
}

.au-input input:focus {
    background: #fff;
    border-color: var(--pk-primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, .12);
}

.au-input:focus-within > i {
    color: var(--pk-primary);
}

.au-field.has-error .au-input input {
    border-color: var(--pk-rose);
    background: #fff;
}

.au-field.has-error .au-input > i {
    color: var(--pk-rose);
}

.au-eye {
    position: absolute;
    right: .45rem;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--pk-muted);
    cursor: pointer;
}

.au-eye:hover {
    background: var(--pk-bg);
    color: var(--pk-ink);
}

.au-caps {
    display: inline-block;
    margin-top: .4rem;
    color: #b45309;
    font-size: .76rem;
    font-weight: 600;
}

.au-remember {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin: .2rem 0 1.4rem;
    color: var(--pk-ink-2);
    font-size: .85rem;
    cursor: pointer;
    user-select: none;
}

.au-remember input {
    width: 17px;
    height: 17px;
    accent-color: var(--pk-primary);
}

.au-submit {
    width: 100%;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    border: 0;
    border-radius: 13px;
    background: var(--pk-ink);
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .15s ease, background-color .15s ease;
}

.au-submit:hover {
    background: #1e293b;
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, .18);
}

.au-submit i {
    color: var(--pk-gold);
    transition: transform .15s ease;
}

.au-submit:hover i {
    transform: translateX(3px);
}

.au-submit.is-busy {
    pointer-events: none;
    opacity: .85;
}

.au-divider {
    display: flex;
    align-items: center;
    gap: .9rem;
    margin: 1.75rem 0 1rem;
    color: var(--pk-muted);
    font-size: .8rem;
}

.au-divider::before,
.au-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--pk-line);
}

.au-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    height: 50px;
    border-radius: 13px;
    border: 1.5px solid var(--pk-line);
    color: var(--pk-ink) !important;
    font-weight: 700;
    font-size: .95rem;
    text-decoration: none !important;
    transition: border-color .15s ease, background-color .15s ease;
}

.au-secondary i {
    color: var(--pk-gold-deep);
}

.au-secondary:hover {
    border-color: var(--pk-gold);
    background: var(--pk-gold-soft);
}

.au-learn {
    margin: 1.25rem 0 0;
    text-align: center;
    font-size: .86rem;
}

.au-learn a {
    color: var(--pk-ink-2);
    text-decoration: none;
    font-weight: 600;
}

.au-learn a:hover {
    color: var(--pk-primary);
}

.au-learn i {
    font-size: .72rem;
}

.au-sales {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .35rem 1.25rem;
    margin-top: 1.5rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--pk-line);
}

.au-sales a {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: var(--pk-muted);
    font-size: .8rem;
    font-weight: 600;
    text-decoration: none;
}

.au-sales a:hover {
    color: var(--pk-primary);
}

.au-sales i {
    color: var(--pk-gold);
}

.au-sales b {
    color: var(--pk-ink-2);
    font-variant-numeric: tabular-nums;
}

/* ---------- Forgot password dialog ------------------------------------------ */

.au-dialog {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(11, 18, 32, .55);
    backdrop-filter: blur(3px);
}

.au-dialog[hidden] {
    display: none;
}

.au-dialog-card {
    position: relative;
    width: 100%;
    max-width: 380px;
    padding: 2rem 1.75rem 1.5rem;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 30px 80px rgba(2, 6, 23, .35);
    text-align: center;
    animation: au-pop .2s cubic-bezier(.2, .7, .2, 1);
}

@keyframes au-pop {
    from { opacity: 0; transform: translateY(10px) scale(.97); }
}

.au-dialog-x {
    position: absolute;
    top: .9rem;
    right: .9rem;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--pk-muted);
    cursor: pointer;
}

.au-dialog-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--pk-gold-soft);
    color: var(--pk-gold-deep);
    font-size: 1.4rem;
}

.au-dialog-card h3 {
    margin: 0 0 .5rem;
    font-size: 1.2rem;
    font-weight: 800;
}

.au-dialog-card p {
    margin: 0 0 1.2rem;
    color: var(--pk-ink-2);
    font-size: .88rem;
    line-height: 1.55;
}

.au-contacts {
    display: grid;
    gap: .5rem;
    margin-bottom: 1.2rem;
}

.au-contacts a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    height: 46px;
    border-radius: 12px;
    border: 1px solid var(--pk-line);
    color: var(--pk-ink);
    font-weight: 700;
    font-size: .9rem;
    text-decoration: none;
}

.au-contacts a:hover {
    background: var(--pk-bg);
}

.au-contacts .fa-whatsapp {
    color: #16a34a;
    font-size: 1.1rem;
}

.au-contacts .fa-phone-alt {
    color: var(--pk-primary);
}

/* ---------- Responsive ---------------------------------------------------------- */

@media (max-width: 991.98px) {
    .au-shell {
        grid-template-columns: 1fr;
    }

    .au-brand {
        display: none;
    }

    .au-logo-sm {
        display: inline-block;
        margin-bottom: 1.5rem;
    }

    .au-logo-sm img {
        height: 52px;
        border-radius: 14px;
    }

    .au-panel {
        align-items: flex-start;
        padding-top: 3rem;
        background:
            radial-gradient(80% 40% at 50% 0%, rgba(245, 179, 1, .12) 0%, rgba(245, 179, 1, 0) 70%),
            #fff;
    }
}

@media (prefers-reduced-motion: reduce) {
    .au-body *,
    .au-body *::before,
    .au-body *::after {
        animation: none !important;
        transition: none !important;
    }
}

.au-caps[hidden] {
    display: none;
}

/* ---------- Register (register.php) ------------------------------------------- */

.rg-shell .au-brand {
    position: sticky;
    top: 0;
    height: 100vh;
}

.rg-panel {
    align-items: flex-start;
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.rg-wrap {
    max-width: 520px;
}

.rg-steps {
    display: flex;
    gap: .5rem;
    list-style: none;
    margin: 0 0 1.75rem;
    padding: 0;
}

.rg-steps li {
    flex: 1;
    display: flex;
    align-items: center;
    gap: .5rem;
    padding-top: .65rem;
    border-top: 3px solid var(--pk-line);
    color: var(--pk-muted);
    font-size: .78rem;
    font-weight: 700;
}

.rg-steps li.is-on {
    border-top-color: var(--pk-gold);
    color: var(--pk-ink);
}

.rg-steps span {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f1f3f8;
    font-size: .7rem;
}

.rg-steps li.is-on span {
    background: var(--pk-gold);
    color: var(--pk-ink);
}

.rg-link {
    color: var(--pk-primary);
    font-weight: 700;
    text-decoration: none;
}

.rg-group {
    margin: 0 0 1.25rem;
    padding: 1.15rem 1.15rem .25rem;
    border: 1px solid var(--pk-line);
    border-radius: 16px;
    min-width: 0;
}

.rg-group legend {
    width: auto;
    margin: 0;
    padding: 0 .45rem;
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--pk-ink-2);
}

.rg-group legend i {
    color: var(--pk-gold-deep);
    margin-right: .25rem;
}

.rg-group legend small {
    color: var(--pk-muted);
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
}

.rg-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 .85rem;
}

.rg-row-3 {
    grid-template-columns: 1fr 1fr 1fr;
}

.au-input.is-plain input {
    padding-left: 1rem;
    padding-right: 1rem;
}

.rg-req {
    color: var(--pk-rose);
}

.rg-sr {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.rg-hint {
    display: block;
    margin-top: .35rem;
    color: var(--pk-muted);
    font-size: .76rem;
}

.rg-error {
    display: flex;
    gap: .35rem;
    margin-top: .4rem;
    color: #be123c;
    font-size: .78rem;
    font-weight: 600;
    line-height: 1.4;
}

.rg-error i {
    margin-top: 2px;
}

.rg-avail {
    position: absolute;
    right: .8rem;
    font-size: .76rem;
    font-weight: 700;
    white-space: nowrap;
}

.rg-avail.is-busy { color: var(--pk-muted); }
.rg-avail.is-ok { color: #047857; }
.rg-avail.is-taken { color: #be123c; }

#company {
    padding-right: 6.5rem;
}

.rg-terms {
    margin: .9rem 0 0;
    color: var(--pk-muted);
    font-size: .8rem;
    text-align: center;
    line-height: 1.5;
}

.rg-help {
    display: grid;
    gap: .2rem;
    margin-top: 2rem;
    padding: 1rem 1.15rem;
    max-width: 30rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .1);
}

.rg-help b {
    font-size: .92rem;
}

.rg-help span {
    color: rgba(226, 232, 240, .7);
    font-size: .84rem;
}

.rg-help a {
    margin-top: .5rem;
    color: #86efac;
    font-weight: 700;
    font-size: .88rem;
    text-decoration: none;
}

.rg-help + .au-copy {
    margin-top: auto;
    padding-top: 2rem;
}

@media (max-width: 991.98px) {
    .rg-shell .au-brand {
        position: static;
        height: auto;
    }
}

@media (max-width: 575.98px) {
    .rg-row,
    .rg-row-3 {
        grid-template-columns: 1fr;
    }

    .rg-steps li {
        font-size: 0;
    }

    .rg-steps li span {
        font-size: .7rem;
    }

    .rg-group {
        padding: 1rem .85rem .1rem;
    }
}

/* Register labels: keep the required star next to the text */
.rg-wrap .au-field label {
    justify-content: flex-start;
    gap: .25rem;
}
