/* ============================================================
   EDUCREST ERP — AUTHENTICATION DESIGN SYSTEM
   ------------------------------------------------------------
   File: assets/css/auth.css

   Authentication pages:
   - Login
   - Role selector
   - Organization ID
   - Username / Password
   - Google authentication
   - OTP verification
   - Forgot password
   - Reset password
   - Authentication states
   - Loading / success / error states

   Brand direction:
   Navy Blue + EDUCREST Blue + White + Gold/Yellow
   ============================================================ */


/* ============================================================
   01. AUTHENTICATION ROOT
   ============================================================ */

.auth-page {
    min-height: 100vh;
    min-height: 100svh;
    position: relative;
    display: flex;
    align-items: stretch;
    overflow-x: hidden;
    background:
        radial-gradient(
            circle at 15% 20%,
            rgba(30, 126, 255, 0.20),
            transparent 34%
        ),
        radial-gradient(
            circle at 85% 80%,
            rgba(255, 193, 7, 0.10),
            transparent 30%
        ),
        linear-gradient(
            135deg,
            #031535 0%,
            #06265f 45%,
            #061b43 100%
        );
    color: #102a56;
}

.auth-page::before,
.auth-page::after {
    content: "";
    position: fixed;
    pointer-events: none;
    z-index: 0;
}

.auth-page::before {
    width: 520px;
    height: 520px;
    top: -260px;
    right: -160px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow:
        0 0 0 60px rgba(255, 255, 255, 0.025),
        0 0 0 120px rgba(255, 255, 255, 0.02);
}

.auth-page::after {
    width: 420px;
    height: 420px;
    bottom: -230px;
    left: -180px;
    border-radius: 50%;
    border: 1px solid rgba(255, 202, 45, 0.12);
    box-shadow:
        0 0 0 55px rgba(255, 202, 45, 0.025),
        0 0 0 110px rgba(255, 202, 45, 0.015);
}


/* ============================================================
   02. AUTH BACKGROUND DECORATION
   ============================================================ */

.auth-background {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.auth-background::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(
            rgba(255, 255, 255, 0.025) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.025) 1px,
            transparent 1px
        );
    background-size: 42px 42px;
    mask-image: linear-gradient(
        to bottom,
        black,
        transparent 80%
    );
    opacity: 0.45;
}

.auth-background .auth-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
    opacity: 0.55;
    animation: authFloat 8s ease-in-out infinite;
}

.auth-background .auth-orb-blue {
    width: 180px;
    height: 180px;
    top: 15%;
    left: 8%;
    background: rgba(28, 125, 255, 0.18);
}

.auth-background .auth-orb-gold {
    width: 130px;
    height: 130px;
    right: 12%;
    bottom: 14%;
    background: rgba(255, 202, 45, 0.13);
    animation-delay: -3s;
}

.auth-background .auth-orb-white {
    width: 80px;
    height: 80px;
    right: 30%;
    top: 10%;
    background: rgba(255, 255, 255, 0.06);
    animation-delay: -5s;
}

@keyframes authFloat {
    0%,
    100% {
        transform: translate3d(0, 0, 0);
    }

    50% {
        transform: translate3d(0, -18px, 0);
    }
}


/* ============================================================
   03. AUTH LAYOUT
   ============================================================ */

.auth-shell {
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
}

.auth-shell.single-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}


/* ============================================================
   04. AUTH BRAND / INFORMATION PANEL
   ============================================================ */

.auth-brand-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 70px clamp(40px, 7vw, 110px);
    color: #ffffff;
    overflow: hidden;
}

.auth-brand-panel::before {
    content: "";
    position: absolute;
    inset: 8%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 32px;
    pointer-events: none;
}

.auth-brand-content {
    position: relative;
    z-index: 2;
    max-width: 650px;
}

.auth-brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
    text-decoration: none;
    color: #ffffff;
}

.auth-brand-logo img {
    width: auto;
    height: 52px;
    object-fit: contain;
}

.auth-brand-logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.auth-brand-logo-title {
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.auth-brand-logo-title span {
    color: #2c94ff;
}

.auth-brand-logo-subtitle {
    margin-top: 5px;
    font-size: 0.66rem;
    color: rgba(255, 255, 255, 0.72);
    letter-spacing: 0.02em;
}

.auth-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    margin-bottom: 22px;
    border: 1px solid rgba(255, 202, 45, 0.65);
    border-radius: 999px;
    background: rgba(255, 202, 45, 0.08);
    color: #ffd33d;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-eyebrow::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ffca2d;
    box-shadow: 0 0 12px rgba(255, 202, 45, 0.85);
}

.auth-brand-title {
    margin: 0;
    max-width: 650px;
    color: #ffffff;
    font-size: clamp(2.4rem, 4.4vw, 4.7rem);
    line-height: 0.98;
    font-weight: 850;
    letter-spacing: -0.055em;
}

.auth-brand-title span {
    color: #ffca2d;
}

.auth-brand-description {
    max-width: 600px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 1.04rem;
    line-height: 1.75;
}

.auth-brand-features {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.auth-brand-feature {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.78rem;
    backdrop-filter: blur(12px);
}

.auth-brand-feature i,
.auth-brand-feature svg {
    color: #ffca2d;
}


/* ============================================================
   05. AUTH BRAND STATISTICS
   ============================================================ */

.auth-brand-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    max-width: 620px;
    margin-top: 42px;
}

.auth-brand-stat {
    padding: 17px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.055);
    backdrop-filter: blur(15px);
}

.auth-brand-stat strong {
    display: block;
    color: #ffffff;
    font-size: 1.35rem;
    line-height: 1.1;
}

.auth-brand-stat span {
    display: block;
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.72rem;
}


/* ============================================================
   06. AUTH FORM PANEL
   ============================================================ */

.auth-form-panel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px clamp(24px, 5vw, 70px);
    background:
        linear-gradient(
            180deg,
            rgba(248, 251, 255, 0.98),
            rgba(238, 245, 255, 0.98)
        );
}

.auth-form-panel::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8%;
    bottom: 8%;
    width: 1px;
    background:
        linear-gradient(
            to bottom,
            transparent,
            rgba(34, 110, 214, 0.24),
            transparent
        );
}

.auth-card {
    width: min(100%, 490px);
    position: relative;
    padding: 38px;
    border: 1px solid rgba(17, 73, 144, 0.10);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow:
        0 24px 70px rgba(4, 39, 87, 0.14),
        0 4px 18px rgba(4, 39, 87, 0.05);
    backdrop-filter: blur(20px);
    animation: authCardIn 0.55s ease both;
}

@keyframes authCardIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-card.compact {
    max-width: 440px;
}

.auth-card.wide {
    max-width: 620px;
}

.auth-card-header {
    margin-bottom: 28px;
}

.auth-card-logo {
    display: inline-flex;
    align-items: center;
    margin-bottom: 24px;
}

.auth-card-logo img {
    width: auto;
    height: 42px;
}

.auth-card-title {
    margin: 0;
    color: #092653;
    font-size: clamp(1.55rem, 3vw, 2rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.035em;
}

.auth-card-description {
    margin: 9px 0 0;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.65;
}

.auth-card-title .gold,
.auth-card-description .gold {
    color: #e5a900;
}


/* ============================================================
   07. AUTH STEP INDICATOR
   ============================================================ */

.auth-stepper {
    display: flex;
    align-items: center;
    margin-bottom: 28px;
}

.auth-step {
    display: flex;
    align-items: center;
    flex: 1;
}

.auth-step:last-child {
    flex: 0;
}

.auth-step-circle {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #d8e3f2;
    border-radius: 50%;
    background: #ffffff;
    color: #7890ad;
    font-size: 0.75rem;
    font-weight: 800;
}

.auth-step.active .auth-step-circle {
    border-color: #1676ed;
    background: #1676ed;
    color: #ffffff;
    box-shadow: 0 0 0 5px rgba(22, 118, 237, 0.10);
}

.auth-step.completed .auth-step-circle {
    border-color: #16a66a;
    background: #16a66a;
    color: #ffffff;
}

.auth-step-line {
    height: 2px;
    flex: 1;
    margin: 0 8px;
    background: #dce6f2;
}

.auth-step.completed .auth-step-line {
    background: #16a66a;
}


/* ============================================================
   08. ROLE SELECTOR
   ============================================================ */

.auth-role-selector {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 22px;
}

.auth-role-option {
    position: relative;
    cursor: pointer;
}

.auth-role-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.auth-role-card {
    min-height: 88px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1.5px solid #dce5f1;
    border-radius: 15px;
    background: #ffffff;
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.auth-role-card:hover {
    border-color: #91bdf1;
    background: #f8fbff;
    transform: translateY(-1px);
}

.auth-role-option input:checked + .auth-role-card {
    border-color: #1676ed;
    background:
        linear-gradient(
            135deg,
            #f2f8ff,
            #ffffff
        );
    box-shadow:
        0 0 0 3px rgba(22, 118, 237, 0.08),
        0 8px 24px rgba(17, 73, 144, 0.08);
}

.auth-role-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #eaf4ff;
    color: #126bd9;
    font-size: 1.1rem;
}

.auth-role-option input:checked + .auth-role-card .auth-role-icon {
    background: #1676ed;
    color: #ffffff;
}

.auth-role-content {
    min-width: 0;
}

.auth-role-title {
    display: block;
    color: #0b2d5d;
    font-size: 0.82rem;
    font-weight: 800;
}

.auth-role-description {
    display: block;
    margin-top: 3px;
    color: #8090a5;
    font-size: 0.68rem;
    line-height: 1.35;
}


/* ============================================================
   09. AUTH FORM GROUPS
   ============================================================ */

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 17px;
}

.auth-field {
    position: relative;
}

.auth-field-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 7px;
    color: #18365f;
    font-size: 0.78rem;
    font-weight: 750;
}

.auth-field-label-required::after {
    content: "*";
    color: #df3d3d;
    margin-left: 3px;
}

.auth-field-help {
    color: #8391a6;
    font-size: 0.68rem;
    font-weight: 500;
}

.auth-input-wrapper {
    position: relative;
}

.auth-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    z-index: 2;
    transform: translateY(-50%);
    color: #8092aa;
    pointer-events: none;
    transition: color 0.2s ease;
}

.auth-input {
    width: 100%;
    min-height: 50px;
    padding: 0 15px;
    border: 1.5px solid #d9e3ef;
    border-radius: 12px;
    outline: none;
    background: #ffffff;
    color: #122e55;
    font: inherit;
    font-size: 0.88rem;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.auth-input.has-icon {
    padding-left: 43px;
}

.auth-input.has-toggle {
    padding-right: 50px;
}

.auth-input::placeholder {
    color: #a1adbc;
}

.auth-input:hover {
    border-color: #b8cce3;
}

.auth-input:focus {
    border-color: #1775e8;
    background: #ffffff;
    box-shadow:
        0 0 0 4px rgba(23, 117, 232, 0.10);
}

.auth-input:focus + .auth-input-icon,
.auth-input-wrapper:focus-within .auth-input-icon {
    color: #1676ed;
}

.auth-input.is-valid {
    border-color: #17a56d;
    background: #fbfffd;
}

.auth-input.is-invalid {
    border-color: #df4141;
    background: #fffafa;
}

.auth-input:disabled {
    cursor: not-allowed;
    background: #f2f5f8;
    color: #8794a7;
}


/* ============================================================
   10. ORGANIZATION ID FIELD
   ============================================================ */

.auth-organization-field {
    position: relative;
}

.auth-organization-field .auth-input {
    letter-spacing: 0.045em;
    font-weight: 650;
}

.auth-organization-badge {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 8px;
    border-radius: 7px;
    background: #eef6ff;
    color: #166ed9;
    font-size: 0.63rem;
    font-weight: 800;
    text-transform: uppercase;
}

.auth-organization-help {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin-top: 7px;
    color: #7d8ba0;
    font-size: 0.68rem;
    line-height: 1.45;
}

.auth-organization-help i {
    color: #1775e8;
    margin-top: 2px;
}


/* ============================================================
   11. PASSWORD FIELD
   ============================================================ */

.auth-password-wrapper {
    position: relative;
}

.auth-password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    width: 36px;
    height: 36px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #8292a7;
    cursor: pointer;
    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.auth-password-toggle:hover {
    background: #edf5ff;
    color: #146ddc;
}

.auth-password-toggle:focus-visible {
    outline: 3px solid rgba(23, 117, 232, 0.15);
    outline-offset: 1px;
}

.auth-password-strength {
    margin-top: 8px;
}

.auth-password-strength-bar {
    height: 4px;
    overflow: hidden;
    border-radius: 999px;
    background: #e6edf5;
}

.auth-password-strength-progress {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: #d64545;
    transition:
        width 0.3s ease,
        background 0.3s ease;
}

.auth-password-strength.weak
.auth-password-strength-progress {
    width: 25%;
    background: #df4141;
}

.auth-password-strength.medium
.auth-password-strength-progress {
    width: 55%;
    background: #e6a900;
}

.auth-password-strength.strong
.auth-password-strength-progress {
    width: 80%;
    background: #189b67;
}

.auth-password-strength.very-strong
.auth-password-strength-progress {
    width: 100%;
    background: #0e7f58;
}

.auth-password-strength-text {
    display: block;
    margin-top: 5px;
    color: #8491a3;
    font-size: 0.65rem;
}


/* ============================================================
   12. PASSWORD REQUIREMENTS
   ============================================================ */

.auth-password-requirements {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 12px;
    margin-top: 9px;
}

.auth-password-requirement {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #8b98aa;
    font-size: 0.66rem;
}

.auth-password-requirement::before {
    content: "○";
    color: #a5b1c0;
}

.auth-password-requirement.valid {
    color: #16815a;
}

.auth-password-requirement.valid::before {
    content: "✓";
    color: #16a36c;
    font-weight: 800;
}


/* ============================================================
   13. FORM CHECKBOX
   ============================================================ */

.auth-checkbox-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.auth-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #687b94;
    font-size: 0.73rem;
}

.auth-checkbox input {
    appearance: none;
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    margin: 0;
    border: 1.5px solid #cbd8e7;
    border-radius: 5px;
    background: #ffffff;
    cursor: pointer;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.auth-checkbox input:checked {
    border-color: #1676ed;
    background: #1676ed;
    box-shadow: inset 0 0 0 3px #ffffff;
}

.auth-checkbox input:focus-visible {
    outline: 3px solid rgba(23, 117, 232, 0.13);
}

.auth-link {
    color: #126ddc;
    text-decoration: none;
    font-size: 0.73rem;
    font-weight: 750;
    transition: color 0.2s ease;
}

.auth-link:hover {
    color: #0a4fa9;
    text-decoration: underline;
}


/* ============================================================
   14. AUTH BUTTONS
   ============================================================ */

.auth-button {
    width: 100%;
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 800;
    text-decoration: none;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease;
}

.auth-button:hover {
    transform: translateY(-1px);
}

.auth-button:active {
    transform: translateY(0);
}

.auth-button:disabled {
    opacity: 0.62;
    cursor: not-allowed;
    transform: none;
}

.auth-button-primary {
    color: #062452;
    background:
        linear-gradient(
            135deg,
            #ffd33d,
            #ffbd20
        );
    box-shadow:
        0 9px 24px rgba(238, 171, 18, 0.24);
}

.auth-button-primary:hover {
    box-shadow:
        0 13px 30px rgba(238, 171, 18, 0.32);
}

.auth-button-blue {
    color: #ffffff;
    background:
        linear-gradient(
            135deg,
            #167df1,
            #0759c5
        );
    box-shadow:
        0 9px 24px rgba(16, 105, 218, 0.22);
}

.auth-button-blue:hover {
    box-shadow:
        0 13px 30px rgba(16, 105, 218, 0.30);
}

.auth-button-outline {
    color: #124f9c;
    border-color: #c9d9ec;
    background: #ffffff;
}

.auth-button-outline:hover {
    border-color: #8db7e7;
    background: #f6faff;
}

.auth-button-dark {
    color: #ffffff;
    background:
        linear-gradient(
            135deg,
            #0b326c,
            #052052
        );
}

.auth-button-danger {
    color: #ffffff;
    background: #d94040;
}

.auth-button-success {
    color: #ffffff;
    background: #159a68;
}

.auth-button-sm {
    min-height: 40px;
    padding: 0 14px;
    border-radius: 9px;
    font-size: 0.72rem;
}

.auth-button-lg {
    min-height: 56px;
    border-radius: 14px;
    font-size: 0.9rem;
}


/* ============================================================
   15. GOOGLE SIGN-IN
   ============================================================ */

.auth-google-button {
    width: 100%;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    padding: 0 18px;
    border: 1.5px solid #d5dfeb;
    border-radius: 12px;
    background: #ffffff;
    color: #243b5b;
    cursor: pointer;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 750;
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.auth-google-button:hover {
    border-color: #b2c8df;
    background: #fbfdff;
    box-shadow: 0 7px 20px rgba(18, 56, 99, 0.08);
    transform: translateY(-1px);
}

.auth-google-icon {
    width: 19px;
    height: 19px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 19px;
}

.auth-google-icon img,
.auth-google-icon svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
}


/* ============================================================
   16. AUTH DIVIDER
   ============================================================ */

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 19px 0;
    color: #97a4b5;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: #e1e8f0;
}


/* ============================================================
   17. AUTH FOOTER
   ============================================================ */

.auth-card-footer {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #edf1f5;
    text-align: center;
    color: #8190a4;
    font-size: 0.7rem;
    line-height: 1.6;
}

.auth-card-footer strong {
    color: #23436d;
}

.auth-back-home {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 15px;
    color: #126ddc;
    font-size: 0.73rem;
    font-weight: 750;
    text-decoration: none;
}

.auth-back-home:hover {
    color: #0a4fa9;
}


/* ============================================================
   18. OTP AUTHENTICATION
   ============================================================ */

.auth-otp-panel {
    text-align: center;
}

.auth-otp-icon {
    width: 76px;
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    border: 1px solid rgba(23, 118, 237, 0.16);
    border-radius: 22px;
    background:
        linear-gradient(
            135deg,
            #edf6ff,
            #f9fcff
        );
    color: #116edc;
    font-size: 1.75rem;
    box-shadow:
        0 12px 30px rgba(17, 102, 207, 0.10);
}

.auth-otp-panel .auth-card-title {
    margin-bottom: 8px;
}

.auth-otp-description {
    max-width: 370px;
    margin: 0 auto;
    color: #748399;
    font-size: 0.78rem;
    line-height: 1.7;
}

.auth-otp-email {
    display: inline-block;
    margin-top: 7px;
    color: #153d72;
    font-weight: 800;
}

.auth-otp-inputs {
    display: flex;
    justify-content: center;
    gap: 9px;
    margin: 27px 0 18px;
}

.auth-otp-input {
    width: 49px;
    height: 58px;
    border: 1.5px solid #d4dfec;
    border-radius: 12px;
    outline: none;
    background: #ffffff;
    color: #0b3268;
    text-align: center;
    font-size: 1.35rem;
    font-weight: 850;
    caret-color: #1676ed;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.auth-otp-input:focus {
    border-color: #1676ed;
    box-shadow:
        0 0 0 4px rgba(22, 118, 237, 0.10);
    transform: translateY(-1px);
}

.auth-otp-input.is-filled {
    border-color: #8eb9ea;
    background: #f8fbff;
}

.auth-otp-input.is-valid {
    border-color: #16a16a;
    background: #f7fffb;
}

.auth-otp-input.is-invalid {
    border-color: #df4141;
    background: #fff9f9;
    animation: otpShake 0.35s ease;
}

@keyframes otpShake {
    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}


/* ============================================================
   19. OTP COUNTDOWN
   ============================================================ */

.auth-otp-countdown {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 14px 0;
    color: #7a899e;
    font-size: 0.7rem;
}

.auth-otp-countdown strong {
    color: #d59c00;
    font-variant-numeric: tabular-nums;
}

.auth-otp-resend {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 0;
    background: transparent;
    color: #116edc;
    cursor: pointer;
    font: inherit;
    font-size: 0.73rem;
    font-weight: 800;
}

.auth-otp-resend:hover {
    color: #084f9f;
    text-decoration: underline;
}

.auth-otp-resend:disabled {
    color: #a2adba;
    cursor: not-allowed;
    text-decoration: none;
}


/* ============================================================
   20. OTP VERIFICATION STATUS
   ============================================================ */

.auth-verification-state {
    display: none;
    text-align: center;
}

.auth-verification-state.active {
    display: block;
    animation: authStateIn 0.35s ease both;
}

@keyframes authStateIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-state-icon {
    width: 76px;
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    border-radius: 50%;
    font-size: 1.7rem;
}

.auth-state-success .auth-state-icon {
    background: #e8f9f1;
    color: #159866;
    box-shadow: 0 0 0 8px rgba(21, 152, 102, 0.06);
}

.auth-state-error .auth-state-icon {
    background: #fff0f0;
    color: #d83d3d;
    box-shadow: 0 0 0 8px rgba(216, 61, 61, 0.05);
}

.auth-state-warning .auth-state-icon {
    background: #fff8df;
    color: #c99300;
    box-shadow: 0 0 0 8px rgba(201, 147, 0, 0.05);
}

.auth-state-title {
    margin: 0;
    color: #102f5c;
    font-size: 1.15rem;
    font-weight: 800;
}

.auth-state-message {
    max-width: 360px;
    margin: 8px auto 0;
    color: #77869b;
    font-size: 0.76rem;
    line-height: 1.65;
}


/* ============================================================
   21. FORGOT PASSWORD
   ============================================================ */

.auth-recovery-panel {
    width: 100%;
}

.auth-recovery-methods {
    display: grid;
    gap: 10px;
    margin: 22px 0;
}

.auth-recovery-method {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 14px;
    border: 1px solid #dce5ef;
    border-radius: 13px;
    background: #ffffff;
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}

.auth-recovery-method:hover {
    border-color: #9bbde3;
    background: #f8fbff;
    transform: translateY(-1px);
}

.auth-recovery-method-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: #edf6ff;
    color: #1470df;
}

.auth-recovery-method-content {
    flex: 1;
}

.auth-recovery-method-title {
    display: block;
    color: #183960;
    font-size: 0.8rem;
    font-weight: 800;
}

.auth-recovery-method-description {
    display: block;
    margin-top: 3px;
    color: #8a97a8;
    font-size: 0.66rem;
}

.auth-recovery-method-arrow {
    color: #9aabba;
}


/* ============================================================
   22. RESET PASSWORD
   ============================================================ */

.auth-reset-password {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.auth-reset-success {
    padding: 16px;
    border: 1px solid #bce8d4;
    border-radius: 12px;
    background: #f2fcf7;
    color: #187653;
    font-size: 0.74rem;
    line-height: 1.55;
}

.auth-reset-success strong {
    display: block;
    margin-bottom: 4px;
    color: #126647;
}


/* ============================================================
   23. AUTH ALERTS
   ============================================================ */

.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 13px;
    border: 1px solid transparent;
    border-radius: 11px;
    font-size: 0.73rem;
    line-height: 1.5;
}

.auth-alert-icon {
    flex: 0 0 auto;
    margin-top: 1px;
}

.auth-alert-info {
    border-color: #c7ddf7;
    background: #f1f8ff;
    color: #235a91;
}

.auth-alert-success {
    border-color: #bce7d3;
    background: #f1fbf6;
    color: #176d4d;
}

.auth-alert-warning {
    border-color: #f2dfa5;
    background: #fffaf0;
    color: #8d6a00;
}

.auth-alert-error {
    border-color: #efc4c4;
    background: #fff5f5;
    color: #9b3030;
}


/* ============================================================
   24. SESSION RE-AUTHENTICATION
   ============================================================ */

.auth-session-timeout {
    margin-bottom: 18px;
    padding: 12px 14px;
    border: 1px solid #f1d995;
    border-radius: 12px;
    background:
        linear-gradient(
            135deg,
            #fffaf0,
            #fffdf8
        );
    color: #856400;
    font-size: 0.73rem;
    line-height: 1.55;
}

.auth-session-timeout strong {
    display: block;
    margin-bottom: 3px;
    color: #765700;
}


/* ============================================================
   25. LOADING STATES
   ============================================================ */

.auth-button.is-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.auth-button.is-loading::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    top: 50%;
    left: 50%;
    margin: -9px 0 0 -9px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: authSpin 0.7s linear infinite;
}

.auth-button-primary.is-loading::after {
    border-color: rgba(6, 36, 82, 0.20);
    border-top-color: #062452;
}

.auth-button-outline.is-loading::after {
    border-color: rgba(18, 79, 156, 0.20);
    border-top-color: #124f9c;
}

.auth-spinner {
    width: 19px;
    height: 19px;
    display: inline-block;
    border: 2px solid rgba(18, 110, 220, 0.18);
    border-top-color: #126edc;
    border-radius: 50%;
    animation: authSpin 0.7s linear infinite;
}

@keyframes authSpin {
    to {
        transform: rotate(360deg);
    }
}


/* ============================================================
   26. AUTH INLINE LOADING
   ============================================================ */

.auth-loading-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 35px 20px;
    text-align: center;
}

.auth-loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid #dceafa;
    border-top-color: #1676ed;
    border-radius: 50%;
    animation: authSpin 0.8s linear infinite;
}

.auth-loading-title {
    margin-top: 16px;
    color: #193a66;
    font-size: 0.9rem;
    font-weight: 800;
}

.auth-loading-message {
    margin-top: 5px;
    color: #8592a4;
    font-size: 0.7rem;
}


/* ============================================================
   27. AUTH SECURITY BADGES
   ============================================================ */

.auth-security-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.auth-security-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 9px;
    border-radius: 999px;
    background: #f3f7fb;
    color: #718197;
    font-size: 0.62rem;
    font-weight: 700;
}

.auth-security-badge i {
    color: #1a9a6a;
}


/* ============================================================
   28. AUTH LEGAL / TERMS
   ============================================================ */

.auth-terms {
    margin-top: 16px;
    color: #8996a7;
    font-size: 0.64rem;
    line-height: 1.6;
    text-align: center;
}

.auth-terms a {
    color: #2868a9;
    text-decoration: none;
    font-weight: 700;
}

.auth-terms a:hover {
    text-decoration: underline;
}


/* ============================================================
   29. AUTH PAGE TOP NAVIGATION
   ============================================================ */

.auth-topbar {
    position: absolute;
    z-index: 10;
    top: 0;
    left: 0;
    right: 0;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(20px, 4vw, 60px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(3, 21, 53, 0.58);
    backdrop-filter: blur(16px);
}

.auth-topbar .auth-brand-logo {
    margin: 0;
}

.auth-topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-topbar-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 13px;
    border-radius: 9px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.73rem;
    font-weight: 700;
    text-decoration: none;
    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.auth-topbar-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}


/* ============================================================
   30. AUTH MOBILE BRAND
   ============================================================ */

.auth-mobile-brand {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px 20px;
    background: #06245a;
    color: #ffffff;
}

.auth-mobile-brand img {
    height: 40px;
    width: auto;
}


/* ============================================================
   31. AUTH ROLE-SPECIFIC COLORS
   ============================================================ */

.auth-role-software-owner .auth-role-icon {
    background: #fff5d9;
    color: #b57b00;
}

.auth-role-franchise-owner .auth-role-icon {
    background: #eaf4ff;
    color: #126ddc;
}

.auth-role-school-owner .auth-role-icon {
    background: #e9f8f1;
    color: #13815b;
}

.auth-role-head .auth-role-icon {
    background: #f0ecff;
    color: #6845ca;
}

.auth-role-teacher .auth-role-icon {
    background: #fff0f4;
    color: #c23863;
}

.auth-role-student .auth-role-icon {
    background: #eaf8ff;
    color: #087ba8;
}

.auth-role-parent .auth-role-icon {
    background: #fff3eb;
    color: #bd5e2a;
}


/* ============================================================
   32. AUTH ROLE BADGE
   ============================================================ */

.auth-current-role {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: fit-content;
    padding: 6px 9px;
    margin-bottom: 12px;
    border-radius: 999px;
    background: #edf5ff;
    color: #126bd7;
    font-size: 0.64rem;
    font-weight: 800;
}

.auth-current-role-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #1680ed;
}


/* ============================================================
   33. AUTH ORGANIZATION CONTEXT
   ============================================================ */

.auth-context-card {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    padding: 12px;
    border: 1px solid #dce7f2;
    border-radius: 12px;
    background:
        linear-gradient(
            135deg,
            #f7fbff,
            #ffffff
        );
}

.auth-context-icon {
    width: 39px;
    height: 39px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #eaf4ff;
    color: #1672dd;
}

.auth-context-content {
    min-width: 0;
    flex: 1;
}

.auth-context-label {
    display: block;
    color: #8492a4;
    font-size: 0.62rem;
}

.auth-context-value {
    display: block;
    margin-top: 2px;
    overflow: hidden;
    color: #17385f;
    font-size: 0.75rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* ============================================================
   34. AUTH EMPTY / NOT FOUND
   ============================================================ */

.auth-empty-state {
    padding: 25px 15px;
    text-align: center;
}

.auth-empty-icon {
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    border-radius: 16px;
    background: #f1f5f9;
    color: #8292a6;
}

.auth-empty-title {
    color: #27466d;
    font-size: 0.9rem;
    font-weight: 800;
}

.auth-empty-description {
    max-width: 300px;
    margin: 6px auto 0;
    color: #8996a7;
    font-size: 0.7rem;
    line-height: 1.55;
}


/* ============================================================
   35. AUTH ACCESSIBILITY
   ============================================================ */

.auth-page :focus-visible {
    outline: 3px solid rgba(255, 194, 35, 0.45);
    outline-offset: 2px;
}

.auth-page button:focus-visible,
.auth-page a:focus-visible,
.auth-page input:focus-visible {
    outline-offset: 2px;
}

.auth-page [aria-hidden="true"] {
    pointer-events: none;
}


/* ============================================================
   36. AUTH REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
    .auth-page *,
    .auth-page *::before,
    .auth-page *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}


/* ============================================================
   37. AUTH DARK FORM VARIANT
   ============================================================ */

.auth-card.dark {
    border-color: rgba(255, 255, 255, 0.10);
    background:
        linear-gradient(
            145deg,
            rgba(9, 43, 93, 0.96),
            rgba(3, 25, 58, 0.96)
        );
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.30);
}

.auth-card.dark .auth-card-title {
    color: #ffffff;
}

.auth-card.dark .auth-card-description {
    color: rgba(255, 255, 255, 0.64);
}

.auth-card.dark .auth-field-label {
    color: rgba(255, 255, 255, 0.84);
}

.auth-card.dark .auth-input {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.07);
    color: #ffffff;
}

.auth-card.dark .auth-input::placeholder {
    color: rgba(255, 255, 255, 0.40);
}

.auth-card.dark .auth-input:focus {
    border-color: #4b9dff;
    background: rgba(255, 255, 255, 0.09);
}

.auth-card.dark .auth-card-footer {
    border-color: rgba(255, 255, 255, 0.09);
    color: rgba(255, 255, 255, 0.55);
}


/* ============================================================
   38. AUTH GOLD ACCENT ELEMENT
   ============================================================ */

.auth-gold-line {
    width: 48px;
    height: 4px;
    margin: 12px 0 18px;
    border-radius: 999px;
    background:
        linear-gradient(
            90deg,
            #ffca2d,
            #f4aa00
        );
}

.auth-gold-dot {
    width: 8px;
    height: 8px;
    display: inline-block;
    border-radius: 50%;
    background: #ffca2d;
    box-shadow: 0 0 12px rgba(255, 202, 45, 0.65);
}


/* ============================================================
   39. AUTH SUCCESS REDIRECT
   ============================================================ */

.auth-redirect {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: 16px;
    color: #78879a;
    font-size: 0.7rem;
}

.auth-redirect-countdown {
    min-width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #eaf4ff;
    color: #126ddc;
    font-size: 0.68rem;
    font-weight: 800;
}


/* ============================================================
   40. AUTH PRINT
   ============================================================ */

@media print {
    .auth-page {
        min-height: auto;
        background: #ffffff !important;
        color: #000000;
    }

    .auth-background,
    .auth-brand-panel,
    .auth-topbar,
    .auth-security-badges {
        display: none !important;
    }

    .auth-shell {
        display: block;
    }

    .auth-form-panel {
        padding: 0;
        background: #ffffff;
    }

    .auth-card {
        width: 100%;
        max-width: none;
        border: 0;
        box-shadow: none;
    }
}