/* Inventory SaaS — Theme Package 6
   Authentication screens: login, registration, forgot/reset password, 2FA
*/

.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr);
    background: #eef2f7;
}

.auth-brand-panel {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 56px;
    background:
        radial-gradient(circle at 20% 20%, rgba(37, 99, 235, .24), transparent 34%),
        radial-gradient(circle at 85% 70%, rgba(14, 165, 233, .16), transparent 28%),
        #0f172a;
    color: #fff;
}

.auth-brand-panel::after {
    content: "";
    position: absolute;
    inset: auto -90px -120px auto;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.08);
    box-shadow:
        0 0 0 60px rgba(255,255,255,.02),
        0 0 0 120px rgba(255,255,255,.015);
}

.auth-brand-content {
    position: relative;
    z-index: 1;
    max-width: 590px;
}

.auth-brand-mark {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    margin-bottom: 26px;
    border-radius: 13px;
    background: var(--primary);
    font-size: 18px;
    font-weight: 900;
    letter-spacing: -.03em;
}

.auth-brand-title {
    margin: 0;
    max-width: 520px;
    font-size: clamp(34px, 4vw, 52px);
    line-height: 1.05;
    letter-spacing: -.045em;
}

.auth-brand-copy {
    margin: 20px 0 0;
    max-width: 540px;
    color: #cbd5e1;
    font-size: 15px;
    line-height: 1.7;
}

.auth-trust-list {
    display: grid;
    gap: 12px;
    margin-top: 30px;
}

.auth-trust-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #e2e8f0;
    font-size: 13px;
}

.auth-trust-dot {
    width: 21px;
    height: 21px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(34, 197, 94, .14);
    color: #86efac;
    font-size: 11px;
    font-weight: 900;
}

.auth-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 42px 28px;
    background: #f8fafc;
}

.auth-card {
    width: min(100%, 470px);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 18px 55px rgba(15, 23, 42, .08);
    padding: 30px;
}

.auth-card.auth-card-wide {
    width: min(100%, 620px);
}

.auth-heading {
    margin-bottom: 22px;
}

.auth-title {
    margin: 0;
    font-size: 25px;
    font-weight: 850;
    letter-spacing: -.035em;
    color: var(--text);
}

.auth-subtitle {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.auth-form {
    background: transparent !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    max-width: none !important;
}

.auth-form .form-field {
    margin-bottom: 15px;
}

.auth-form label {
    font-size: 12px;
    font-weight: 750;
    color: #334155;
}

.auth-form input,
.auth-form select,
.auth-form textarea {
    min-height: 46px;
    margin: 6px 0 0;
    border-radius: 9px;
}

.auth-password-wrap {
    position: relative;
}

.auth-password-wrap input {
    padding-right: 84px;
}

.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    min-height: 32px;
    padding: 4px 8px;
    margin: 0;
    border: 0;
    background: transparent;
    color: var(--primary);
    font-size: 11px;
    font-weight: 750;
}

.password-toggle:hover {
    background: var(--primary-soft);
}

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.auth-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #475569;
    font-size: 12px;
}

.auth-checkbox input {
    width: auto;
    min-height: auto;
    margin: 0;
}

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

.auth-link:hover {
    text-decoration: underline;
}

.auth-submit {
    width: 100%;
    min-height: 47px;
    margin-top: 18px;
    font-size: 14px;
    font-weight: 800;
}

.auth-secondary-action {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--muted);
    font-size: 12px;
}

.auth-alert {
    margin-bottom: 16px;
}

.auth-security-note {
    margin-top: 18px;
    padding: 12px 13px;
    border-radius: 9px;
    background: #f8fafc;
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 11px;
    line-height: 1.55;
}

/* Password strength */
.password-rules {
    display: grid;
    gap: 6px;
    margin-top: 9px;
}

.password-rule {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 11px;
}

.password-rule::before {
    content: "•";
    color: #94a3b8;
}

.password-rule.valid {
    color: #166534;
}

.password-rule.valid::before {
    content: "✓";
    color: #22c55e;
}

/* Registration */
.auth-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.auth-plan-note {
    padding: 12px 14px;
    border-radius: 10px;
    background: var(--primary-soft);
    color: #1e40af;
    font-size: 12px;
    line-height: 1.6;
    border: 1px solid #bfdbfe;
}

/* 2FA */
.twofa-code-wrap {
    margin: 20px 0 10px;
}

.twofa-code-label {
    display: block;
    margin-bottom: 9px;
    text-align: center;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.twofa-code-input {
    width: 100%;
    min-height: 58px !important;
    text-align: center;
    font-size: 27px !important;
    font-weight: 850;
    letter-spacing: .28em;
    padding-left: 1em !important;
}

.twofa-icon {
    width: 54px;
    height: 54px;
    margin: 0 auto 17px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 22px;
    font-weight: 900;
}

.twofa-help {
    margin-top: 14px;
    text-align: center;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.6;
}

/* Forgot/reset */
.auth-state-icon {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    margin-bottom: 18px;
    border-radius: 15px;
    background: #f1f5f9;
    color: #334155;
    font-size: 21px;
    font-weight: 900;
}

/* Footer */
.auth-footer {
    margin-top: 20px;
    text-align: center;
    color: #94a3b8;
    font-size: 10px;
}

/* Loading state */
.auth-submit.is-loading {
    pointer-events: none;
    opacity: .72;
}

.auth-submit.is-loading::after {
    content: "...";
    margin-left: 5px;
}

/* Mobile */
@media (max-width: 980px) {
    .auth-page {
        grid-template-columns: 1fr;
    }

    .auth-brand-panel {
        min-height: auto;
        padding: 30px;
    }

    .auth-brand-title {
        font-size: 31px;
    }

    .auth-brand-copy {
        margin-top: 12px;
    }

    .auth-trust-list {
        display: none;
    }

    .auth-form-panel {
        padding: 28px 18px 40px;
    }
}

@media (max-width: 620px) {
    .auth-brand-panel {
        padding: 24px 18px;
    }

    .auth-brand-mark {
        width: 40px;
        height: 40px;
        margin-bottom: 16px;
    }

    .auth-brand-title {
        font-size: 26px;
    }

    .auth-brand-copy {
        font-size: 13px;
    }

    .auth-card,
    .auth-card.auth-card-wide {
        padding: 22px 17px;
        border-radius: 13px;
    }

    .auth-grid-2 {
        grid-template-columns: 1fr;
    }

    .auth-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .twofa-code-input {
        font-size: 23px !important;
    }
}
