/* ========================================
   AUTH PAGES — EduLive Premium Light Theme
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

/* ---------- CSS Variables ---------- */
:root {
    --auth-bg: #f8fafc;
    --auth-card: #ffffff;
    --auth-accent: #01aca4;
    --auth-accent-hover: #018a83;
    --auth-accent-light: #e6f7f6;
    --auth-accent-ultra-light: #f0fdfa;
    --auth-gradient: linear-gradient(135deg, #01aca4 0%, #0369a1 50%, #0ea5e9 100%);
    --auth-gradient-subtle: linear-gradient(135deg, #e6f7f6 0%, #e0f2fe 50%, #f0fdfa 100%);
    --auth-text: #1e1b4b;
    --auth-text-secondary: #6b7280;
    --auth-text-muted: #9ca3af;
    --auth-border: #e5e7eb;
    --auth-border-focus: #01aca4;
    --auth-input-bg: #f9fafb;
    --auth-shadow-sm: 0 1px 2px rgba(1, 172, 164, 0.05);
    --auth-shadow: 0 4px 24px rgba(1, 172, 164, 0.08);
    --auth-shadow-lg: 0 20px 60px rgba(1, 172, 164, 0.12);
    --auth-shadow-btn: 0 8px 24px rgba(1, 172, 164, 0.35);
    --auth-radius: 16px;
    --auth-radius-sm: 12px;
    --auth-radius-xs: 8px;
    --auth-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --auth-back-size: 36px;
}

.auth-back-link {
    position: absolute;
    top: 0.75rem;
    left: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--auth-text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.4rem 0.7rem;
    border-radius: var(--auth-radius-sm);
    background: var(--auth-card);
    transition: var(--auth-transition);
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    white-space: nowrap;
}

.auth-back-link:hover {
    color: var(--auth-accent);
    background: var(--auth-accent-ultra-light);
    transform: translateX(-4px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}

.auth-back-link i {
    font-size: 1.1rem;
}


/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body.auth-page {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--auth-bg);
    color: var(--auth-text);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---------- Animated Background Orbs ---------- */
body.auth-page::before,
body.auth-page::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    z-index: 0;
    pointer-events: none;
}

body.auth-page::before {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #c4b5fd 0%, transparent 70%);
    top: -10%;
    right: -5%;
    animation: float-orb 12s ease-in-out infinite alternate;
}

body.auth-page::after {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #93c5fd 0%, transparent 70%);
    bottom: -10%;
    left: -5%;
    animation: float-orb 15s ease-in-out infinite alternate-reverse;
}

@keyframes float-orb {
    0% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(30px, -20px) scale(1.05);
    }

    100% {
        transform: translate(-20px, 30px) scale(0.95);
    }
}

/* ---------- Auth Wrapper (Split Layout) ---------- */
.auth-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1100px;
    min-height: 600px;
    margin: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--auth-card);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--auth-shadow-lg);
    animation: auth-enter 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.auth-wrapper.register-mode {
    max-width: 1200px;
}

@keyframes auth-enter {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ---------- Left Panel (Branding / Illustration) ---------- */
.auth-brand-panel {
    background: var(--auth-gradient-subtle);
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Decorative shapes */
.auth-brand-panel::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.08);
    top: -80px;
    right: -80px;
    animation: pulse-shape 6s ease-in-out infinite;
}

.auth-brand-panel::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.06);
    bottom: -60px;
    left: -60px;
    animation: pulse-shape 8s ease-in-out infinite reverse;
}

@keyframes pulse-shape {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.6;
    }

    50% {
        transform: scale(1.15);
        opacity: 1;
    }
}

.auth-brand-logo {
    position: relative;
    z-index: 1;
    margin-bottom: 1.25rem;
}

.auth-brand-logo .logo-icon {
    width: 64px;
    height: 64px;
    background: var(--auth-gradient);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.3);
    transition: var(--auth-transition);
}

.auth-brand-logo .logo-icon:hover {
    transform: translateY(-4px) rotate(-2deg);
    box-shadow: 0 16px 40px rgba(99, 102, 241, 0.4);
}

.auth-brand-logo .logo-icon i {
    font-size: 2.2rem;
    color: white;
}

.auth-brand-logo h1 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: var(--auth-text);
    letter-spacing: -0.03em;
    margin: 0;
}

.auth-brand-logo h1 span {
    background: var(--auth-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-brand-content {
    position: relative;
    z-index: 1;
}

.auth-brand-content p {
    font-size: 1.05rem;
    color: var(--auth-text-secondary);
    line-height: 1.7;
    max-width: 400px;
    margin: 0 auto 2rem;
}

/* Feature pills on left side */
.auth-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.auth-feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1.15rem;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: var(--auth-radius-sm);
    transition: var(--auth-transition);
}

.auth-feature-item:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateX(6px);
    box-shadow: var(--auth-shadow);
}

.auth-feature-icon {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 8px;
    background: var(--auth-accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--auth-accent);
    font-size: 1rem;
}

.auth-feature-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--auth-text);
}

/* ---------- Right Panel (Form) ---------- */
.auth-form-panel {
    padding: 2.5rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
    max-height: 95vh;
}

.auth-form-panel.register-form-panel {
    padding: 2rem 2.5rem;
}

.auth-form-header {
    margin-bottom: 1.25rem;
    padding-top: 1rem;
}

.auth-form-header h2 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--auth-text);
    letter-spacing: -0.02em;
    margin: 0 0 0.35rem;
}

.auth-form-header p {
    font-size: 0.95rem;
    color: var(--auth-text-secondary);
    margin: 0;
}

/* ---------- Form Controls ---------- */
.auth-field {
    margin-bottom: 0.85rem;
}

.auth-form-panel.register-form-panel .auth-field {
    margin-bottom: 0.75rem;
}

.auth-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--auth-text);
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.auth-label i {
    font-size: 0.9rem;
    color: var(--auth-accent);
}

.auth-input {
    width: 100%;
    padding: 0.7rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    color: var(--auth-text);
    background: var(--auth-input-bg);
    border: 1.5px solid var(--auth-border);
    border-radius: var(--auth-radius-sm);
    outline: none;
    transition: var(--auth-transition);
}

.auth-input::placeholder {
    color: var(--auth-text-muted);
    font-weight: 400;
}

.auth-input:hover {
    border-color: #c7d2fe;
    background: #fff;
}

.auth-input:focus {
    border-color: var(--auth-accent);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    transform: translateY(-1px);
}

/* Password group */
.auth-password-group {
    position: relative;
}

.auth-password-group .auth-input {
    padding-right: 3rem;
}

.auth-password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--auth-text-muted);
    font-size: 1.1rem;
    padding: 4px;
    transition: var(--auth-transition);
    display: flex;
    align-items: center;
}

.auth-password-toggle:hover {
    color: var(--auth-accent);
}

/* Row for side-by-side fields */
.auth-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

/* ---------- Remember / Forgot ---------- */
.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.auth-check {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.auth-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    border: 1.5px solid var(--auth-border);
    background: var(--auth-input-bg);
    cursor: pointer;
    accent-color: var(--auth-accent);
    transition: var(--auth-transition);
}

.auth-check input[type="checkbox"]:checked {
    background: var(--auth-accent);
    border-color: var(--auth-accent);
}

.auth-check label {
    font-size: 0.88rem;
    color: var(--auth-text-secondary);
    cursor: pointer;
    font-weight: 500;
}

.auth-forgot {
    font-size: 0.88rem;
    color: var(--auth-accent);
    text-decoration: none;
    font-weight: 600;
    transition: var(--auth-transition);
}

.auth-forgot:hover {
    color: var(--auth-accent-hover);
    text-decoration: underline;
}

/* ---------- Submit Button ---------- */
.auth-btn {
    width: 100%;
    padding: 0.8rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: #fff;
    background: var(--auth-gradient);
    border: none;
    border-radius: var(--auth-radius-sm);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--auth-transition);
    box-shadow: var(--auth-shadow-btn);
    letter-spacing: 0.02em;
    position: relative;
    overflow: hidden;
}

.auth-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.5s ease;
}

.auth-btn:hover::before {
    left: 100%;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.45);
}

.auth-btn:active {
    transform: translateY(0);
    box-shadow: var(--auth-shadow-btn);
}

.auth-btn i {
    font-size: 1.1rem;
}

/* ---------- Divider ---------- */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--auth-border);
}

.auth-divider span {
    font-size: 0.82rem;
    color: var(--auth-text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

/* ---------- Social Button ---------- */
.auth-social-btn {
    width: 100%;
    padding: 0.8rem 1.25rem;
    font-size: 0.92rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    color: var(--auth-text);
    background: #fff;
    border: 1.5px solid var(--auth-border);
    border-radius: var(--auth-radius-sm);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--auth-transition);
    text-decoration: none;
}

.auth-social-btn:hover {
    background: #f9fafb;
    border-color: #c7d2fe;
    transform: translateY(-1px);
    box-shadow: var(--auth-shadow);
    color: var(--auth-text);
}

.auth-social-btn img {
    width: 20px;
    height: 20px;
}

/* ---------- Footer Link ---------- */
.auth-footer {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.88rem;
    color: var(--auth-text-secondary);
}

.auth-footer a {
    color: var(--auth-accent);
    text-decoration: none;
    font-weight: 700;
    transition: var(--auth-transition);
}

.auth-footer a:hover {
    color: var(--auth-accent-hover);
    text-decoration: underline;
}

/* ---------- Alert ---------- */
.auth-alert {
    padding: 0.85rem 1.15rem;
    border-radius: var(--auth-radius-xs);
    font-size: 0.88rem;
    font-weight: 500;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: alert-slide 0.3s ease;
}

@keyframes alert-slide {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.auth-alert-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.auth-alert-close {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    opacity: 0.5;
    font-size: 1.1rem;
    padding: 0;
    line-height: 1;
    transition: var(--auth-transition);
}

.auth-alert-close:hover {
    opacity: 1;
}

/* ---------- Role Selector ---------- */
.auth-role-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.auth-role-card {
    position: relative;
    border: 2px solid var(--auth-border);
    border-radius: var(--auth-radius-sm);
    padding: 0.85rem 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: var(--auth-transition);
    background: var(--auth-card);
}

.auth-role-card:hover {
    border-color: #c7d2fe;
    background: var(--auth-accent-ultra-light);
    transform: translateY(-3px);
    box-shadow: var(--auth-shadow);
}

.auth-role-card.selected {
    border-color: var(--auth-accent);
    background: var(--auth-accent-ultra-light);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.auth-role-card.selected .auth-role-check {
    opacity: 1;
    transform: scale(1);
}

.auth-role-check {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--auth-accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    opacity: 0;
    transform: scale(0.5);
    transition: var(--auth-transition);
}

.auth-role-icon {
    font-size: 1.5rem;
    margin-bottom: 0.35rem;
    display: block;
}

.auth-role-card:first-child .auth-role-icon {
    color: var(--auth-accent);
}

.auth-role-card:last-child .auth-role-icon {
    color: #10b981;
}

.auth-role-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--auth-text);
    margin-bottom: 0.1rem;
}

.auth-role-desc {
    font-size: 0.75rem;
    color: var(--auth-text-muted);
}

/* ---------- Password Strength ---------- */
.auth-pw-strength {
    height: 4px;
    border-radius: 2px;
    background: #e5e7eb;
    margin-top: 0.6rem;
    overflow: hidden;
}

.auth-pw-strength-bar {
    height: 100%;
    border-radius: 2px;
    transition: width 0.4s ease, background 0.4s ease;
    width: 0;
}

.auth-pw-strength-bar.weak {
    width: 25%;
    background: #ef4444;
}

.auth-pw-strength-bar.medium {
    width: 50%;
    background: #f59e0b;
}

.auth-pw-strength-bar.strong {
    width: 75%;
    background: #3b82f6;
}

.auth-pw-strength-bar.very-strong {
    width: 100%;
    background: #10b981;
}

/* ---------- Verification Box ---------- */
.auth-verification-box {
    background: var(--auth-accent-ultra-light);
    border: 1.5px dashed var(--auth-accent);
    border-radius: var(--auth-radius-sm);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    animation: auth-enter 0.5s ease;
}

.verification-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--auth-accent);
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.webcam-container {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    background: #000;
    border-radius: var(--auth-radius-xs);
    overflow: hidden;
    margin-bottom: 1rem;
    border: 2px solid #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

#verificationVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.face-status {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 2;
}

.auth-btn-secondary {
    width: 100%;
    padding: 0.6rem 1rem;
    background: #fff;
    border: 1.5px solid var(--auth-accent);
    color: var(--auth-accent);
    border-radius: var(--auth-radius-xs);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--auth-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.auth-btn-secondary:hover {
    background: var(--auth-accent);
    color: #fff;
}

.auth-btn-secondary.verified {
    background: #10b981;
    border-color: #10b981;
    color: #fff;
    cursor: default;
}

/* ---------- Form Hint Text ---------- */
.auth-hint {
    font-size: 0.75rem;
    color: var(--auth-text-muted);
    margin-top: 0.2rem;
}

/* ---------- Terms Checkbox ---------- */
.auth-terms {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 1.25rem;
}

.auth-terms input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin-top: 2px;
    border-radius: 5px;
    border: 1.5px solid var(--auth-border);
    accent-color: var(--auth-accent);
    cursor: pointer;
}

.auth-terms label {
    font-size: 0.88rem;
    color: var(--auth-text-secondary);
    cursor: pointer;
    line-height: 1.5;
}

.auth-terms a {
    color: var(--auth-accent);
    text-decoration: none;
    font-weight: 600;
}

.auth-terms a:hover {
    text-decoration: underline;
}

/* ---------- Copyright ---------- */
.auth-copyright {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.78rem;
    color: var(--auth-text-muted);
    z-index: 2;
    white-space: nowrap;
}

/* ---------- Modal (Terms) ---------- */
.auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    animation: modal-fade 0.2s ease;
}

.auth-modal-overlay.show {
    display: flex;
}

@keyframes modal-fade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.auth-modal {
    background: var(--auth-card);
    border-radius: 20px;
    width: 90%;
    max-width: 560px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
    animation: modal-enter 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes modal-enter {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--auth-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.auth-modal-header h3 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    color: var(--auth-text);
}

.auth-modal-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--auth-text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 8px;
    transition: var(--auth-transition);
}

.auth-modal-close:hover {
    background: #f3f4f6;
    color: var(--auth-text);
}

.auth-modal-body {
    padding: 1.5rem 2rem;
    overflow-y: auto;
    max-height: 55vh;
    line-height: 1.7;
    color: var(--auth-text-secondary);
    font-size: 0.92rem;
}

.auth-modal-body h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--auth-text);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.auth-modal-body h4:first-child {
    margin-top: 0;
}

.auth-modal-footer {
    padding: 1rem 2rem;
    border-top: 1px solid var(--auth-border);
    text-align: right;
}

.auth-modal-footer button {
    padding: 0.6rem 1.5rem;
    border-radius: var(--auth-radius-xs);
    border: 1px solid var(--auth-border);
    background: #fff;
    color: var(--auth-text);
    font-weight: 600;
    cursor: pointer;
    transition: var(--auth-transition);
}

.auth-modal-footer button:hover {
    background: #f3f4f6;
}

/* ========================================
   RESPONSIVE
   ======================================== */

/* Tablet */
@media (max-width: 992px) {
    .auth-wrapper {
        grid-template-columns: 1fr;
        max-width: 520px;
        margin: 1.5rem;
    }

    .auth-wrapper.register-mode {
        max-width: 580px;
    }

    .auth-brand-panel {
        padding: 2rem 2rem 1.5rem;
    }

    .auth-brand-content p {
        display: none;
    }

    .auth-features {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .auth-feature-item {
        padding: 0.6rem 1rem;
    }

    .auth-feature-text {
        font-size: 0.82rem;
    }

    .auth-form-panel {
        padding: 2rem;
    }

    .auth-copyright {
        position: static;
        transform: none;
        text-align: center;
        padding: 1rem 0;
    }
}

/* Mobile */
@media (max-width: 640px) {
    body.auth-page {
        align-items: flex-start;
        padding-top: 1rem;
    }

    .auth-wrapper {
        margin: 0.75rem;
        border-radius: 20px;
    }

    .auth-back-link {
        top: 0.6rem;
        left: 0.75rem;
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(4px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }


    .auth-brand-panel {
        padding: 1.5rem;
    }

    .auth-brand-logo .logo-icon {
        width: 56px;
        height: 56px;
        border-radius: 16px;
        margin-bottom: 0.75rem;
    }

    .auth-brand-logo .logo-icon i {
        font-size: 1.6rem;
    }

    .auth-brand-logo h1 {
        font-size: 1.5rem;
    }

    .auth-features {
        display: none;
    }

    .auth-form-panel {
        padding: 1.5rem;
    }

    .auth-form-header h2 {
        font-size: 1.4rem;
    }

    .auth-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .auth-role-selector {
        gap: 0.75rem;
    }

    .auth-role-card {
        padding: 1rem 0.75rem;
    }

    .auth-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .auth-btn {
        padding: 0.85rem 1.25rem;
    }
}

@media (max-width: 400px) {
    .auth-wrapper {
        margin: 0.5rem;
        border-radius: 16px;
    }

    .auth-form-panel {
        padding: 1.25rem;
    }

    .auth-role-selector {
        grid-template-columns: 1fr;
    }
}

/* Helper Utilities */
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.text-decoration-none { text-decoration: none !important; }
.text-muted { color: var(--auth-text-muted) !important; }
.small { font-size: 0.875rem !important; }
.me-1 { margin-right: 0.25rem !important; }
.d-inline-block { display: inline-block !important; }
.text-center { text-align: center !important; }
.spinner-border-sm { width: 1rem; height: 1rem; border-width: 0.2em; }
/* Face Verification Styles */
.webcam-container {
    position: relative;
    width: 100%;
    max-width: 320px;
    margin: 0 auto 1.5rem;
    aspect-ratio: 4/3;
    background: #000;
    border-radius: var(--auth-radius-sm);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: 2px solid var(--auth-border);
}

#verificationVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter 0.5s ease;
}

.face-status-banner {
    background: var(--auth-accent-light);
    color: var(--auth-text);
    padding: 12px 15px;
    border-radius: var(--auth-radius-sm);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    border: 1px solid var(--auth-accent);
    line-height: 1.5;
    min-height: 54px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.face-status-banner small {
    display: block;
    font-size: 0.78rem;
    font-weight: 400;
    margin-top: 2px;
    color: var(--auth-text-secondary);
}

.pulse-green {
    animation: pulse-green-anim 0.5s ease;
}

@keyframes pulse-green-anim {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); border-color: #10b981; }
    70% { box-shadow: 0 0 0 20px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.auth-btn-secondary {
    width: 100%;
    padding: 0.7rem;
    background: var(--auth-accent-light);
    color: var(--auth-accent);
    border: 1.5px dashed var(--auth-accent);
    border-radius: var(--auth-radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--auth-transition);
}

.auth-btn-secondary:hover:not(:disabled) {
    background: var(--auth-accent-ultra-light);
    transform: translateY(-2px);
}

.auth-btn-secondary.verified {
    background: #ecfdf5;
    color: #059669;
    border-style: solid;
    border-color: #10b981;
}

/* Compact Registration Styles */
.auth-role-compact {
    display: flex;
    gap: 8px;
    background: var(--auth-input-bg);
    padding: 4px;
    border-radius: var(--auth-radius-sm);
    border: 1.5px solid var(--auth-border);
}

.compact-role-btn {
    flex: 1;
    padding: 8px 5px;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    border-radius: var(--auth-radius-xs);
    cursor: pointer;
    transition: var(--auth-transition);
    color: var(--auth-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.compact-role-btn i {
    font-size: 1rem;
}

.compact-role-btn.selected {
    background: #fff;
    color: var(--auth-accent);
    box-shadow: var(--auth-shadow-sm);
}

.compact-role-btn[data-role="muellim"].selected {
    color: #10b981;
}

/* Reductions for better density */
.register-form-panel .auth-form-header { margin-bottom: 0.75rem; }
.register-form-panel .auth-field { margin-bottom: 0.65rem; }
.register-form-panel .auth-input { padding: 0.6rem 0.85rem; }
.register-form-panel .auth-label { margin-bottom: 0.25rem; }

.auth-verification-box {
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    background: var(--auth-accent-ultra-light);
    border-radius: var(--auth-radius-sm);
    border: 1px solid var(--auth-accent-light);
}

.webcam-container {
    max-width: 280px; /* More compact cam */
    margin: 0 auto 0.75rem;
}

.face-status-banner {
    padding: 8px 12px;
    font-size: 0.85rem;
    min-height: 48px;
    margin-bottom: 0.75rem;
}

/* Single Panel Layout Support */
.auth-wrapper.single-panel { display: flex; justify-content: center; max-width: 550px; min-height: auto; margin: 2rem auto; }
.auth-wrapper.single-panel .auth-form-panel { width: 100%; max-width: 100% !important; padding: 4rem 3rem; }

