:root {
    --glass: rgba(94, 63, 56, 0.58);
    --glass-border: rgba(255, 255, 255, 0.22);
    --accent: #1e66ff;
    --accent-dark: #0f4dda;
    --accent-glow: rgba(30, 102, 255, 0.45);
    --faculty: #7c5cff;
    --faculty-dark: #5a3fe0;
    --faculty-glow: rgba(124, 92, 255, 0.4);
    --danger-bg: rgba(220, 53, 69, 0.92);
    --success-bg: rgba(25, 135, 84, 0.92);
    --text-soft: rgba(255, 255, 255, 0.88);
}
*, *::before, *::after { box-sizing: border-box; }

body.auth-page {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    font-family: "Work Sans", system-ui, sans-serif;
    color: #fff;
    background: #0e1018 url("../admin/uploads/images/bg (1).jpg") no-repeat center center / cover fixed;
    position: relative;
}

body.auth-page::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(30, 102, 255, 0.18), transparent 55%),
        linear-gradient(180deg, rgba(8, 14, 24, 0.4) 0%, rgba(10, 10, 10, 0.5) 45%, rgba(20, 12, 10, 0.65) 100%);
    pointer-events: none;
}

body.auth-page.faculty-theme::before {
    background:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(124, 92, 255, 0.2), transparent 55%),
        linear-gradient(180deg, rgba(8, 14, 24, 0.4) 0%, rgba(10, 10, 10, 0.5) 45%, rgba(20, 12, 10, 0.65) 100%);
}

body.auth-page.faculty-theme {
    --accent: var(--faculty);
    --accent-dark: var(--faculty-dark);
    --accent-glow: var(--faculty-glow);
}

.back-link {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #1b1b1b;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.back-link:hover { color: var(--accent-dark); }

.login-shell {
    position: relative;
    z-index: 1;
    width: min(440px, 100%);
    padding: 32px 28px 28px;
    border-radius: 28px;
    border: 1px solid var(--glass-border);
    background: linear-gradient(165deg, var(--glass) 0%, rgba(77, 49, 44, 0.82) 100%);
    box-shadow: 0 28px 56px rgba(0, 0, 0, 0.38), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.brand { text-align: center; margin-bottom: 22px; }

.logo-ring {
    width: 88px;
    height: 88px;
    margin: 0 auto 12px;
    border-radius: 50%;
    padding: 6px;
    background: linear-gradient(145deg, #fff 0%, #e8e8e8 100%);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
}

.logo-ring img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
    display: block;
}

.shield-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-bottom: 10px;
    background: rgba(30, 102, 255, 0.2);
    border: 1px solid rgba(30, 102, 255, 0.45);
    color: #93b4ff;
    font-size: 1.2rem;
}

body.auth-page.faculty-theme .shield-icon {
    background: rgba(124, 92, 255, 0.2);
    border-color: rgba(124, 92, 255, 0.45);
    color: #c4b5ff;
}

.title {
    font-family: "Playfair Display", Georgia, serif;
    font-size: 1.65rem;
    font-weight: 700;
    margin: 0 0 8px;
}

.subtitle {
    margin: 0;
    font-size: 0.92rem;
    color: var(--text-soft);
    line-height: 1.5;
}

.subtitle .email-hint {
    display: inline-block;
    margin-top: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 0.85rem;
    color: #fff;
    font-weight: 600;
}

.alert-pill {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 16px;
    line-height: 1.4;
}

.alert-pill.danger { background: var(--danger-bg); color: #fff; }
.alert-pill.success { background: var(--success-bg); color: #fff; }
.alert-pill.info { background: rgba(13, 110, 253, 0.88); color: #fff; }

.field { margin-bottom: 14px; }

.field label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 6px;
}

.input-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 12px;
    padding: 0 14px;
    min-height: 50px;
    border: 2px solid transparent;
}

.input-wrap:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.input-wrap i.field-icon { color: #444; width: 18px; text-align: center; }

.input-wrap input {
    flex: 1;
    border: 0;
    outline: none;
    background: transparent;
    font-size: 1rem;
    color: #1a1a1a;
    padding: 12px 0;
    min-width: 0;
}

.toggle-pass {
    border: 0;
    background: transparent;
    color: #555;
    padding: 8px;
    cursor: pointer;
    border-radius: 8px;
}

.btn-login {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 24px var(--accent-glow);
    margin-top: 4px;
}

.btn-login:hover { transform: translateY(-2px); }

.otp-digits {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 18px;
}

.otp-digit {
    width: 46px;
    height: 54px;
    border: 2px solid transparent;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.94);
    color: #1e293b;
    font-size: 1.35rem;
    font-weight: 700;
    text-align: center;
    font-family: ui-monospace, monospace;
}

.otp-digit:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.footer-note {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.55);
}

.footer-note a, .text-link {
    color: #93b4ff;
    font-weight: 600;
    text-decoration: none;
}

.footer-note a:hover, .text-link:hover { text-decoration: underline; }

.forgot-link {
    color: #93b4ff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
    white-space: nowrap;
}

.forgot-link:hover { text-decoration: underline; color: #b8d0ff; }

body.auth-page.auth-no-animation .login-shell,
body.auth-page.auth-no-animation .back-link {
    animation: none !important;
}

body.auth-page.auth-no-animation .alert-pill.auth-error-animate {
    animation: authErrorIn 0.45s ease-out both !important;
}

@keyframes authErrorIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 576px) {
    .back-link { top: 14px; left: 14px; padding: 8px 12px; font-size: 13px; }
    .login-shell { padding: 26px 20px 22px; border-radius: 22px; }
    .otp-digit { width: 40px; height: 48px; font-size: 1.2rem; }
}
