/* EducationGuard — Auth pages (login / register) */



.eg-auth {

    --eg-primary: #F39318;

    --eg-primary-dark: #d47d0f;

    --eg-primary-light: #ffb347;

    --eg-primary-soft: rgba(243, 147, 24, 0.12);

    --eg-secondary: #461E38;

    --eg-secondary-dark: #2f1018;

    --eg-secondary-light: #6b3456;

    --eg-cream: #faf8f5;

    --eg-parchment: #f7f0e4;

    --eg-parchment-dark: #e8dcc8;

    --eg-surface: #ffffff;

    --eg-text: #1a1a1a;

    --eg-text-muted: #5c5c5c;

    --eg-border: rgba(70, 30, 56, 0.15);

    --eg-radius: 1.25rem;

    --eg-radius-sm: 0.75rem;

    --eg-shadow: 0 8px 32px rgba(70, 30, 56, 0.1);

    --eg-shadow-lg: 0 16px 48px rgba(70, 30, 56, 0.16);

    --eg-nav-h: 4.5rem;

    --eg-font-display: 'Cairo', 'Segoe UI', 'Tajawal', sans-serif;



    min-height: 100vh;

    display: flex;

    flex-direction: column;

    background: var(--eg-cream);

    color: var(--eg-text);

    font-family: var(--eg-font-display);

    overflow-x: hidden;

}



html[data-bs-theme="dark"] .eg-auth {

    --eg-cream: #1a1218;

    --eg-parchment: #2a2030;

    --eg-parchment-dark: #1e1620;

    --eg-surface: #322430;

    --eg-text: #faf5f7;

    --eg-text-muted: #d4c4cc;

    --eg-border: rgba(243, 147, 24, 0.28);

    --eg-primary-soft: rgba(243, 147, 24, 0.18);

}



/* ── Ambient layer (login-specific tuning) ── */



.eg-auth-ambient {

    opacity: 0.65;

}



html[data-bs-theme="dark"] .eg-auth-ambient {

    opacity: 0.45;

}



/* ── Nav ── */



.eg-auth > .eg-nav,

.eg-auth > .eg-auth-nav,

.eg-auth .eg-nav,

.eg-auth-nav {

    position: sticky !important;

    top: 0;

    left: 0;

    right: 0;

    width: 100%;

    max-width: 100%;

    align-self: stretch;

    flex-shrink: 0;

    z-index: 1000;

    height: var(--eg-nav-h);

    background: rgba(255, 255, 255, 0.88);

    backdrop-filter: blur(12px);

    border-bottom: 2px solid var(--eg-secondary);

    animation: eg-auth-nav-in 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;

}



@keyframes eg-auth-nav-in {

    from { opacity: 0; transform: translateY(-12px); }

    to { opacity: 1; transform: translateY(0); }

}



html[data-bs-theme="dark"] .eg-auth .eg-nav,

html[data-bs-theme="dark"] .eg-auth-nav {

    background: rgba(50, 36, 48, 0.92);

    border-bottom-color: rgba(243, 147, 24, 0.35);

}



.eg-auth .eg-nav-inner {

    width: 100%;

    max-width: none;

    margin: 0;

    height: 100%;

    padding: 0 1.25rem;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 1rem;

}



.eg-auth .eg-nav-brand img {

    height: 2.75rem;

    width: auto;

    object-fit: contain;

    transition: transform 0.3s ease;

}



.eg-auth .eg-nav-brand:hover img {

    transform: scale(1.04);

}



.eg-auth .eg-nav-actions {

    display: flex;

    align-items: center;

    gap: 0.625rem;

}



.eg-auth .eg-nav-desktop-actions {

    display: flex;

}



.eg-auth .eg-btn-login--current {

    display: inline-flex;

    align-items: center;

    gap: 0.5rem;

    padding: 0.55rem 1.25rem;

    background: var(--eg-secondary);

    color: #fff;

    border: none;

    border-radius: var(--eg-radius-sm);

    font-weight: 700;

    font-size: 0.9rem;

    pointer-events: none;

    box-shadow: 0 4px 16px rgba(70, 30, 56, 0.25);

}



.eg-auth .eg-btn-register {

    display: inline-flex;

    align-items: center;

    gap: 0.5rem;

    padding: 0.55rem 1.25rem;

    background: var(--eg-primary-soft);

    color: var(--eg-secondary);

    border: 1.5px solid var(--eg-primary);

    border-radius: var(--eg-radius-sm);

    font-weight: 700;

    font-size: 0.9rem;

    text-decoration: none;

    transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;

}



.eg-auth .eg-btn-register:hover {

    background: var(--eg-primary);

    color: #fff;

    transform: translateY(-2px);

    box-shadow: 0 6px 20px rgba(243, 147, 24, 0.35);

}



/* ── Split layout ── */



.eg-auth-split {

    flex: 1 1 auto;

    display: grid;

    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);

    direction: ltr;

    min-height: calc(100svh - var(--eg-nav-h));

    max-height: none;

}

/* Register split — layout handled by .eg-auth--register */

/* Register page — natural page scroll (avoids trapped/clipped inner scroll) */
.eg-auth--register {
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: visible;
}

.eg-auth--register .eg-auth-split--register {
    min-height: calc(100svh - var(--eg-nav-h));
    max-height: none;
    overflow: visible;
    align-items: stretch;
}

.eg-auth--register .eg-auth-form-side--register {
    height: 100%;
    min-height: 0;
    max-height: none;
    overflow: visible;
    padding: 1.5rem clamp(1.25rem, 4vw, 3.5rem) 2.5rem;
    align-items: center;
    justify-content: flex-start;
}

.eg-auth--register .eg-auth-scroll-card.eg-auth-scroll-card--register {
    overflow: visible !important;
    max-height: none !important;
    height: auto;
    width: 100%;
    max-width: 620px;
}

.eg-auth--register .eg-auth-form-inner--register {
    overflow: visible;
    padding: 1.65rem clamp(1.35rem, 3.5vw, 2rem) 2rem;
}

.eg-auth--register .eg-auth-scroll-card--register .eg-auth-command-bar {
    position: static;
    margin-top: 1.25rem;
}



.eg-auth-form-side {

    direction: rtl;

    display: flex;

    align-items: center;

    justify-content: center;

    height: 100%;

    min-height: 0;

    padding: 1.5rem clamp(1.25rem, 4vw, 3.5rem) 2.5rem;

    position: relative;

}



/* ── Parchment scroll card ── */



.eg-auth-scroll-card {

    position: relative;

    width: 100%;

    max-width: 440px;

    background:

        linear-gradient(175deg, rgba(255, 255, 255, 0.55) 0%, transparent 40%),

        linear-gradient(135deg, var(--eg-parchment) 0%, #fdf9f2 45%, var(--eg-parchment-dark) 100%);

    border: 1px solid rgba(70, 30, 56, 0.12);

    border-radius: 1.5rem;

    box-shadow:

        0 2px 0 rgba(255, 255, 255, 0.6) inset,

        0 -1px 0 rgba(70, 30, 56, 0.06) inset,

        var(--eg-shadow-lg);

    animation: eg-auth-scroll-unroll 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;

    overflow: hidden;

}



html[data-bs-theme="dark"] .eg-auth-scroll-card {

    background:

        linear-gradient(175deg, rgba(255, 255, 255, 0.04) 0%, transparent 40%),

        linear-gradient(135deg, var(--eg-parchment) 0%, #352838 55%, var(--eg-parchment-dark) 100%);

    border-color: rgba(243, 147, 24, 0.2);

    box-shadow:

        0 2px 0 rgba(255, 255, 255, 0.04) inset,

        0 20px 60px rgba(0, 0, 0, 0.35);

}



@keyframes eg-auth-scroll-unroll {

    from {

        opacity: 0;

        transform: perspective(800px) rotateX(8deg) translateY(32px) scale(0.96);

    }

    to {

        opacity: 1;

        transform: perspective(800px) rotateX(0deg) translateY(0) scale(1);

    }

}



.eg-auth-scroll-edge {

    position: absolute;

    left: 0;

    right: 0;

    height: 0.65rem;

    pointer-events: none;

    z-index: 2;

}



.eg-auth-scroll-edge--top {

    top: 0;

    background: linear-gradient(180deg, rgba(70, 30, 56, 0.08) 0%, transparent 100%);

    border-radius: 1.5rem 1.5rem 0 0;

}



.eg-auth-scroll-edge--bottom {

    bottom: 0;

    background: linear-gradient(0deg, rgba(70, 30, 56, 0.1) 0%, transparent 100%);

    border-radius: 0 0 1.5rem 1.5rem;

}



.eg-auth-form-inner {

    width: 100%;

    padding: 2rem clamp(1.5rem, 4vw, 2.25rem) 2.25rem;

}



/* Era badge */

.eg-auth-era-badge {

    display: flex;

    align-items: center;

    gap: 0.75rem;

    margin-bottom: 1.35rem;

    padding: 0.65rem 0.9rem;

    background: rgba(70, 30, 56, 0.06);

    border: 1px solid rgba(70, 30, 56, 0.1);

    border-radius: var(--eg-radius-sm);

    animation: eg-auth-fade-up 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;

}



html[data-bs-theme="dark"] .eg-auth-era-badge {

    background: rgba(243, 147, 24, 0.08);

    border-color: rgba(243, 147, 24, 0.2);

}



.eg-auth-era-badge__icon {

    display: flex;

    align-items: center;

    justify-content: center;

    width: 2.25rem;

    height: 2.25rem;

    background: var(--eg-secondary);

    color: var(--eg-primary-light);

    border-radius: 50%;

    font-size: 1.05rem;

    flex-shrink: 0;

    animation: eg-auth-compass-pulse 4s ease-in-out infinite;

}



@keyframes eg-auth-compass-pulse {

    0%, 100% { box-shadow: 0 0 0 0 rgba(243, 147, 24, 0.35); }

    50% { box-shadow: 0 0 0 6px rgba(243, 147, 24, 0); }

}



.eg-auth-era-badge__text {

    display: flex;

    flex-direction: column;

    gap: 0.1rem;

    min-width: 0;

}



.eg-auth-era {

    font-size: 0.82rem;

    font-weight: 800;

    color: var(--eg-secondary);

    letter-spacing: 0.02em;

}



html[data-bs-theme="dark"] .eg-auth-era {

    color: var(--eg-primary-light);

}



.eg-auth-era-tagline {

    font-size: 0.72rem;

    color: var(--eg-text-muted);

    line-height: 1.4;

}



@keyframes eg-auth-fade-up {

    from { opacity: 0; transform: translateY(16px); }

    to { opacity: 1; transform: translateY(0); }

}



.eg-auth-title-row {

    display: flex;

    align-items: center;

    gap: 0.55rem;

    margin-bottom: 0.55rem;

    animation: eg-auth-fade-up 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.18s both;

}



.eg-auth-title-row h1 {

    margin: 0;

    font-size: clamp(1.45rem, 3.5vw, 1.9rem);

    font-weight: 900;

    color: var(--eg-text);

    background: linear-gradient(135deg, var(--eg-secondary) 0%, var(--eg-secondary-light) 100%);

    -webkit-background-clip: text;

    background-clip: text;

    -webkit-text-fill-color: transparent;

}



html[data-bs-theme="dark"] .eg-auth-title-row h1 {

    background: linear-gradient(135deg, #faf5f7 0%, var(--eg-primary-light) 100%);

    -webkit-background-clip: text;

    background-clip: text;

    -webkit-text-fill-color: transparent;

}



.eg-auth-title-icon {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    color: var(--eg-primary);

    font-size: 1.4rem;

    animation: eg-auth-icon-bob 3s ease-in-out infinite;

}



@keyframes eg-auth-icon-bob {

    0%, 100% { transform: translateY(0) rotate(0deg); }

    50% { transform: translateY(-4px) rotate(-4deg); }

}



.eg-auth-hint {

    margin: 0 0 1.25rem;

    color: var(--eg-text-muted);

    font-size: 0.88rem;

    line-height: 1.75;

    animation: eg-auth-fade-up 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.24s both;

}



.eg-auth-divider {

    display: flex;

    align-items: center;

    gap: 0.65rem;

    margin-bottom: 1.65rem;

    color: var(--eg-primary);

    opacity: 0.7;

    animation: eg-auth-fade-up 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.28s both;

}



.eg-auth-divider__line {

    flex: 1;

    height: 1px;

    background: linear-gradient(90deg, transparent, rgba(70, 30, 56, 0.2), transparent);

}



html[data-bs-theme="dark"] .eg-auth-divider__line {

    background: linear-gradient(90deg, transparent, rgba(243, 147, 24, 0.35), transparent);

}



/* Form fields with stagger */

.eg-auth-field {

    margin-bottom: 1.5rem;

}



.eg-auth-field--1 { animation: eg-auth-fade-up 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.32s both; }

.eg-auth-field--2 { animation: eg-auth-fade-up 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.38s both; }

.eg-auth-field--3 { animation: eg-auth-fade-up 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.44s both; }

.eg-auth-field--4 { animation: eg-auth-fade-up 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.5s both; }

.eg-auth-field--5 { animation: eg-auth-fade-up 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.56s both; }



.eg-auth-field label {

    display: block;

    margin-bottom: 0.45rem;

    font-size: 0.82rem;

    font-weight: 700;

    color: var(--eg-secondary);

    letter-spacing: 0.02em;

}



html[data-bs-theme="dark"] .eg-auth-field label {

    color: var(--eg-primary-light);

}



.eg-auth-field-line {

    display: flex;

    align-items: center;

    gap: 0.65rem;

    border-bottom: 2px solid rgba(70, 30, 56, 0.15);

    padding-bottom: 0.55rem;

    transition: border-color 0.25s ease, transform 0.25s ease;

}



.eg-auth-field-line:focus-within {

    border-bottom-color: var(--eg-primary);

    transform: translateX(-2px);

}



html[data-bs-theme="dark"] .eg-auth-field-line {

    border-bottom-color: rgba(243, 147, 24, 0.3);

}



.eg-auth-field-line i {

    flex-shrink: 0;

    font-size: 1rem;

    color: var(--eg-primary);

    transition: transform 0.25s ease;

}



.eg-auth-field-line:focus-within i {

    transform: scale(1.12);

}



.eg-auth-input {

    flex: 1;

    width: 100%;

    padding: 0.2rem 0;

    border: none;

    background: transparent;

    color: var(--eg-text);

    font-family: inherit;

    font-size: 1rem;

}



.eg-auth-input:focus {

    outline: none;

}



.eg-auth-input::placeholder {

    color: rgba(70, 30, 56, 0.35);

}



html[data-bs-theme="dark"] .eg-auth-input::placeholder {

    color: rgba(212, 196, 204, 0.45);

}



/* Remember-me row */

.eg-auth-options {

    display: flex;

    align-items: center;

    justify-content: flex-end;

    gap: 0.75rem;

    margin: 0.25rem 0 1.65rem;

    font-size: 0.82rem;

    color: var(--eg-text-muted);

}

.eg-auth-forgot {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.55rem;
}

.eg-auth-forgot a {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--eg-primary-dark);
    text-decoration: none;
}

html[data-bs-theme="dark"] .eg-auth-forgot a {
    color: var(--eg-primary-light);
}

.eg-auth-forgot a:hover {
    text-decoration: underline;
}

.eg-auth-password-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-inline-end: 0.65rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--eg-text-muted);
    cursor: pointer;
}

.eg-auth-password-toggle:hover {
    color: var(--eg-primary-dark);
}

html[data-bs-theme="dark"] .eg-auth-password-toggle:hover {
    color: var(--eg-primary-light);
}

.eg-auth-switch {

    position: relative;

    display: inline-block;

    width: 2.75rem;

    height: 1.45rem;

    flex-shrink: 0;

    cursor: pointer;

}



.eg-auth-switch input {

    position: absolute;

    opacity: 0;

    width: 0;

    height: 0;

}



.eg-auth-switch__track {

    position: absolute;

    inset: 0;

    background: rgba(70, 30, 56, 0.12);

    border-radius: 999px;

    transition: background 0.25s ease;

}



.eg-auth-switch__thumb {

    position: absolute;

    top: 0.2rem;

    right: 0.2rem;

    width: 1.05rem;

    height: 1.05rem;

    background: #fff;

    border-radius: 50%;

    box-shadow: 0 2px 6px rgba(70, 30, 56, 0.2);

    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);

}



.eg-auth-switch input:checked + .eg-auth-switch__track {

    background: var(--eg-primary);

}



.eg-auth-switch input:checked ~ .eg-auth-switch__thumb {

    transform: translateX(-1.3rem);

}



html[data-bs-theme="dark"] .eg-auth-switch__track {

    background: rgba(255, 255, 255, 0.15);

}



/* Submit button with shimmer */

.eg-auth-submit {

    position: relative;

    overflow: hidden;

    width: 100%;

    padding: 1rem 1.25rem;

    background: linear-gradient(135deg, var(--eg-primary) 0%, var(--eg-primary-dark) 100%);

    color: #fff;

    border: none;

    border-radius: 0.85rem;

    font-family: inherit;

    font-weight: 800;

    font-size: 1.05rem;

    cursor: pointer;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 0.55rem;

    transition: transform 0.25s ease, box-shadow 0.3s ease;

    box-shadow: 0 6px 24px rgba(243, 147, 24, 0.35);

}



.eg-auth-submit::after {

    content: '';

    position: absolute;

    inset: 0;

    background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.28) 50%, transparent 65%);

    transform: translateX(-120%);

    animation: eg-auth-shimmer 3.5s ease-in-out infinite;

}



@keyframes eg-auth-shimmer {

    0%, 70%, 100% { transform: translateX(-120%); }

    85% { transform: translateX(120%); }

}



.eg-auth-submit:hover:not(:disabled) {

    transform: translateY(-2px);

    box-shadow: 0 10px 32px rgba(243, 147, 24, 0.45);

}



.eg-auth-submit:active:not(:disabled) {

    transform: translateY(0);

}



.eg-auth-submit:disabled {

    opacity: 0.85;

    cursor: wait;

}



.eg-auth-submit:disabled::after {

    animation: none;

}



.eg-auth-submit__loader {

    display: flex;

    gap: 0.35rem;

    align-items: center;

    justify-content: center;

}



.eg-auth-submit__dot {

    width: 0.45rem;

    height: 0.45rem;

    background: #fff;

    border-radius: 50%;

    animation: eg-auth-dot-pulse 1.4s infinite ease-in-out both;

}



.eg-auth-submit__dot:nth-child(1) { animation-delay: -0.32s; }

.eg-auth-submit__dot:nth-child(2) { animation-delay: -0.16s; }



@keyframes eg-auth-dot-pulse {

    0%, 80%, 100% { transform: scale(0.4); opacity: 0.35; }

    40% { transform: scale(1); opacity: 1; }

}



.eg-auth-register-prompt {

    margin-top: 1.35rem;

    text-align: center;

    font-size: 0.88rem;

    color: var(--eg-text-muted);

    line-height: 1.6;

}



.eg-auth-register-prompt a {

    color: var(--eg-primary-dark);

    font-weight: 800;

    text-decoration: none;

    transition: color 0.2s ease;

}



html[data-bs-theme="dark"] .eg-auth-register-prompt a {

    color: var(--eg-primary-light);

}



.eg-auth-register-prompt a:hover {

    text-decoration: underline;

}



/* ── Visual panel — historical atlas ── */



.eg-auth-visual-side {

    position: relative;

    direction: rtl;

    overflow: hidden;

    background:

        radial-gradient(ellipse 90% 70% at 70% 30%, rgba(255, 200, 100, 0.25) 0%, transparent 55%),

        radial-gradient(ellipse 60% 50% at 20% 80%, rgba(70, 30, 56, 0.35) 0%, transparent 50%),

        linear-gradient(155deg, #2f1018 0%, var(--eg-secondary) 35%, #7a3a20 65%, var(--eg-primary-dark) 100%);

    display: flex;

    align-items: flex-end;

    justify-content: center;

    height: 100%;

    min-height: 0;

    animation: eg-auth-visual-in 1s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;

}



@keyframes eg-auth-visual-in {

    from { opacity: 0; transform: scale(1.03); }

    to { opacity: 1; transform: scale(1); }

}



.eg-auth-visual-texture {

    position: absolute;

    inset: 0;

    opacity: 0.12;

    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");

    pointer-events: none;

    mix-blend-mode: overlay;

}



.eg-auth-visual-vignette {

    position: absolute;

    inset: 0;

    background: radial-gradient(ellipse 80% 80% at 50% 50%, transparent 40%, rgba(20, 8, 12, 0.45) 100%);

    pointer-events: none;

}



.eg-auth-visual-deco {

    position: absolute;

    inset: 0;

    pointer-events: none;

    color: rgba(255, 255, 255, 0.85);

    transform: translate(var(--eg-auth-mouse-x, 0), var(--eg-auth-mouse-y, 0));

    transition: transform 0.4s ease-out;

}



.eg-auth-visual-compass {

    position: absolute;

    top: 10%;

    right: 8%;

    width: clamp(4.5rem, 14vw, 7.5rem);

    height: auto;

    opacity: 0.55;

    animation: eg-auth-compass-drift 14s ease-in-out infinite;

}



@keyframes eg-auth-compass-drift {

    0%, 100% { transform: translateY(0) rotate(0deg); }

    50% { transform: translateY(-10px) rotate(4deg); }

}



.eg-auth-visual-deco .eg-compass-needle {

    transform-origin: center;

    animation: eg-compass-wobble 8s ease-in-out infinite;

}



.eg-auth-visual-map {

    position: absolute;

    top: 18%;

    left: 6%;

    width: clamp(8rem, 28vw, 14rem);

    height: auto;

    opacity: 0.5;

}



.eg-auth-map-route {

    stroke: currentColor;

    stroke-dasharray: 200;

    stroke-dashoffset: 200;

    animation: eg-auth-route-draw 6s ease-in-out infinite alternate;

}



.eg-auth-map-route--1 { opacity: 0.7; animation-duration: 7s; }

.eg-auth-map-route--2 { opacity: 0.45; animation-duration: 9s; animation-delay: -2s; }



@keyframes eg-auth-route-draw {

    0% { stroke-dashoffset: 200; }

    100% { stroke-dashoffset: 0; }

}



.eg-auth-map-dot {

    fill: currentColor;

    opacity: 0;

    animation: eg-auth-dot-appear 4s ease-in-out infinite;

}



.eg-auth-map-dot:nth-child(4) { animation-delay: 0s; }

.eg-auth-map-dot:nth-child(5) { animation-delay: 1.2s; }

.eg-auth-map-dot:nth-child(6) { animation-delay: 2.4s; }



@keyframes eg-auth-dot-appear {

    0%, 100% { opacity: 0; transform: scale(0.5); }

    20%, 80% { opacity: 0.85; transform: scale(1); }

}



.eg-auth-era-chip {

    position: absolute;

    padding: 0.35rem 0.75rem;

    background: rgba(255, 255, 255, 0.1);

    border: 1px solid rgba(255, 255, 255, 0.25);

    border-radius: 999px;

    font-size: 0.68rem;

    font-weight: 700;

    color: rgba(255, 255, 255, 0.9);

    backdrop-filter: blur(6px);

    white-space: nowrap;

    animation: eg-auth-chip-float 5s ease-in-out infinite;

}



.eg-auth-era-chip--1 { top: 42%; left: 12%; animation-delay: 0s; }

.eg-auth-era-chip--2 { top: 55%; right: 14%; animation-delay: -1.5s; }

.eg-auth-era-chip--3 { bottom: 38%; left: 18%; animation-delay: -3s; font-size: 0.62rem; }



@keyframes eg-auth-chip-float {

    0%, 100% { opacity: 0.65; transform: translateY(0); }

    50% { opacity: 1; transform: translateY(-8px); }

}



.eg-auth-visual-caption {

    position: absolute;

    top: 12%;

    left: 8%;

    z-index: 4;

    max-width: min(16rem, 42vw);

    padding: 0.85rem 1.1rem;

    background: rgba(255, 255, 255, 0.08);

    border: 1px solid rgba(255, 255, 255, 0.2);

    border-radius: 0.75rem;

    backdrop-filter: blur(8px);

    animation: eg-auth-caption-in 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.5s both;

}



@keyframes eg-auth-caption-in {

    from { opacity: 0; transform: translateX(-16px); }

    to { opacity: 1; transform: translateX(0); }

}



.eg-auth-visual-caption__label {

    display: block;

    font-size: 0.65rem;

    font-weight: 800;

    letter-spacing: 0.12em;

    text-transform: uppercase;

    color: rgba(255, 220, 160, 0.85);

    margin-bottom: 0.35rem;

}



.eg-auth-visual-caption__quote {

    margin: 0;

    font-size: clamp(0.82rem, 2vw, 0.95rem);

    font-weight: 700;

    line-height: 1.65;

    color: rgba(255, 255, 255, 0.92);

}



.eg-auth-hero-img {

    position: relative;

    z-index: 3;

    width: auto;

    max-width: 88%;

    max-height: 82%;

    object-fit: contain;

    object-position: bottom center;

    filter: drop-shadow(0 16px 40px rgba(0, 0, 0, 0.35));

    animation: eg-auth-hero-float 5s ease-in-out infinite;

}



@keyframes eg-auth-hero-float {

    0%, 100% { transform: translateY(0); }

    50% { transform: translateY(-14px); }

}



/* Footer */

.eg-auth .eg-footer {

    flex-shrink: 0;

    margin-top: auto;

}



/* ── Responsive ── */



@media (max-width: 992px) {

    .eg-auth-split:not(.eg-auth-split--register) {

        grid-template-columns: 1fr;

        grid-template-rows: minmax(240px, 36svh) 1fr;

        min-height: calc(100svh - var(--eg-nav-h));

    }

    .eg-auth--register .eg-auth-split--register {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        min-height: auto;
        max-height: none;
    }

    .eg-auth--register .eg-auth-visual-side {
        display: none;
    }

    .eg-auth--register .eg-auth-form-side--register {
        height: auto;
        overflow: visible;
        padding: 0.75rem 0.875rem 0;
        align-items: stretch;
    }

    .eg-auth--register .eg-auth-scroll-card.eg-auth-scroll-card--register {
        max-width: 100%;
        border-radius: 1.15rem 1.15rem 0 0;
        box-shadow: 0 -4px 24px rgba(70, 30, 56, 0.08);
    }

    .eg-auth--register .eg-auth-form-inner--register {
        padding: 1.15rem 1rem 6.5rem;
    }

    .eg-auth--register .eg-auth-scroll-edge {
        display: none;
    }

    .eg-auth--register .eg-auth-title-row h1 {
        font-size: 1.35rem;
    }

    .eg-auth--register .eg-auth-era-badge {
        padding: 0.5rem 0.75rem;
        margin-bottom: 1rem;
    }

    .eg-auth--register .eg-auth-command-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 900;
        margin: 0;
        border-radius: 1.15rem 1.15rem 0 0;
        border-left: none;
        border-right: none;
        border-bottom: none;
        padding: 0.85rem 1rem;
        padding-bottom: max(0.85rem, env(safe-area-inset-bottom));
        box-shadow: 0 -8px 32px rgba(70, 30, 56, 0.14);
    }

    .eg-auth--register .eg-auth-register-prompt {
        text-align: center;
        font-size: 0.82rem;
        margin-top: 0.75rem;
        padding-bottom: 0.5rem;
    }

    .eg-auth--register .eg-footer {
        display: none;
    }

    .eg-auth-scroll-card--register {
        max-width: 100%;
    }



    .eg-auth-visual-side {

        order: -1;

        min-height: 0;

        max-height: none;

        height: 100%;

    }



    .eg-auth-hero-img {

        max-height: 72%;

    }



    .eg-auth-visual-caption {

        top: 8%;

        left: 5%;

        max-width: 55%;

        padding: 0.6rem 0.85rem;

    }



    .eg-auth-visual-compass {

        top: 6%;

        right: 5%;

        width: 3.5rem;

    }



    .eg-auth-era-chip {

        display: none;

    }



    .eg-auth .eg-nav-desktop-actions {

        display: none;

    }



    .eg-auth-form-side {

        padding: 1rem 1.25rem 2rem;

    }

}



@media (max-width: 480px) {

    .eg-auth-form-side {

        padding: 0.75rem 1rem 1.75rem;

    }



    .eg-auth-scroll-card {

        border-radius: 1.15rem;

    }



    .eg-auth-form-inner {

        padding: 1.5rem 1.25rem 1.75rem;

    }



    .eg-auth-split:not(.eg-auth-split--register) {

        grid-template-rows: minmax(200px, 30svh) 1fr;

    }



    .eg-auth-era-badge {

        flex-direction: column;

        text-align: center;

    }

    .eg-auth--register .eg-auth-era-badge {
        flex-direction: row;
        text-align: start;
    }

    .eg-auth--register .eg-auth-form-inner--register {
        padding: 1rem 0.875rem 6.25rem;
    }

    .eg-auth--register .eg-auth-step__label {
        font-size: 0.55rem;
    }

    .eg-auth--register .eg-auth-step__num {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 0.72rem;
    }

}



/* ── Register page — current nav button ── */

.eg-auth .eg-btn-register--current {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.25rem;
    background: var(--eg-primary);
    color: #fff;
    border: none;
    border-radius: var(--eg-radius-sm);
    font-weight: 700;
    font-size: 0.9rem;
    pointer-events: none;
    box-shadow: 0 4px 16px rgba(243, 147, 24, 0.35);
}

.eg-auth .eg-btn-login:not(.eg-btn-login--current) {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.25rem;
    background: var(--eg-primary-soft);
    color: var(--eg-secondary);
    border: 1.5px solid var(--eg-primary);
    border-radius: var(--eg-radius-sm);
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
}

.eg-auth .eg-btn-login:not(.eg-btn-login--current):hover {
    background: var(--eg-secondary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(70, 30, 56, 0.25);
}

/* ── Register — wider scroll card ── */

.eg-auth-form-side--register {
    align-items: center;
    justify-content: flex-start;
    padding: 1.25rem clamp(1rem, 3vw, 2rem);
}

.eg-auth-scroll-card--register {
    width: 100%;
    max-width: 600px;
    height: auto;
    max-height: none;
    display: block;
    overflow: visible;
    margin: 0 auto;
    flex-shrink: 0;
    box-shadow:
        0 2px 0 rgba(255, 255, 255, 0.6) inset,
        0 -1px 0 rgba(70, 30, 56, 0.06) inset,
        0 12px 40px rgba(70, 30, 56, 0.12),
        var(--eg-shadow-lg);
}

html[data-bs-theme="dark"] .eg-auth-scroll-card--register {
    box-shadow:
        0 2px 0 rgba(255, 255, 255, 0.04) inset,
        0 16px 48px rgba(0, 0, 0, 0.4);
}

.eg-auth-form-inner--register {
    overflow: visible;
    min-height: auto;
    padding: 1.65rem clamp(1.35rem, 3.5vw, 2rem) 1.5rem;
}

.eg-auth-scroll-card--register .eg-auth-command-bar {
    position: sticky;
    bottom: 0;
    z-index: 3;
    margin-top: 1rem;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
}

html[data-bs-theme="dark"] .eg-auth-scroll-card--register .eg-auth-command-bar {
    background: rgba(50, 36, 48, 0.92);
}

.eg-auth-scroll-card--register .eg-auth-register-prompt {
    margin-top: 0.85rem;
    padding-bottom: 0.25rem;
}

.eg-auth-form-inner .validation-message,
.eg-auth-form-inner .field-validation-error {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #c0392b;
}

html[data-bs-theme="dark"] .eg-auth-form-inner .validation-message,
html[data-bs-theme="dark"] .eg-auth-form-inner .field-validation-error {
    color: #ff8a80;
}

/* ── Register — step indicator ── */

.eg-auth-steps {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.35rem;
    gap: 0.25rem;
}

.eg-auth-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    opacity: 0.45;
    transition: opacity 0.3s ease, transform 0.2s ease;
    flex-shrink: 0;
}

.eg-auth-step:hover {
    opacity: 0.75;
    transform: translateY(-2px);
}

.eg-auth-step.active {
    opacity: 1;
}

.eg-auth-step__num {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: rgba(70, 30, 56, 0.08);
    border: 2px solid rgba(70, 30, 56, 0.15);
    color: var(--eg-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.78rem;
    transition: all 0.3s ease;
}

.eg-auth-step.active .eg-auth-step__num {
    border-color: var(--eg-primary);
    background: var(--eg-primary);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(243, 147, 24, 0.15);
}

.eg-auth-step.done .eg-auth-step__num {
    background: var(--eg-secondary);
    border-color: var(--eg-secondary);
    color: #fff;
}

.eg-auth-step__label {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--eg-text-muted);
    white-space: nowrap;
}

.eg-auth-step.active .eg-auth-step__label {
    color: var(--eg-secondary);
}

html[data-bs-theme="dark"] .eg-auth-step.active .eg-auth-step__label {
    color: var(--eg-primary-light);
}

.eg-auth-step__line {
    flex: 1;
    height: 2px;
    background: rgba(70, 30, 56, 0.1);
    margin-bottom: 1.1rem;
    position: relative;
    overflow: hidden;
    min-width: 1rem;
}

.eg-auth-step__line::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 0;
    background: var(--eg-primary);
    transition: width 0.4s ease;
}

.eg-auth-step__line.filled::after {
    width: 100%;
}

/* ── Register — step pane & section header ── */

.eg-auth-step-pane {
    animation: eg-auth-step-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes eg-auth-step-in {
    from { opacity: 0; transform: translateX(12px); }
    to { opacity: 1; transform: translateX(0); }
}

.eg-auth-section-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0 0 1rem;
    color: var(--eg-primary-dark);
    font-weight: 800;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.eg-auth-section-header::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(243, 147, 24, 0.35), transparent);
}

html[data-bs-theme="dark"] .eg-auth-section-header {
    color: var(--eg-primary-light);
}

/* ── Register — dual row & name group ── */

.eg-auth-dual-row {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0;
}

.eg-auth-dual-row .eg-auth-field {
    flex: 1;
    min-width: 0;
}

.eg-auth-field--wide {
    flex: 1.6;
}

.eg-auth-name-group {
    background: rgba(70, 30, 56, 0.04);
    border: 1px solid rgba(70, 30, 56, 0.08);
    border-radius: var(--eg-radius-sm);
    padding: 0.75rem;
    margin-bottom: 1rem;
}

html[data-bs-theme="dark"] .eg-auth-name-group {
    background: rgba(243, 147, 24, 0.06);
    border-color: rgba(243, 147, 24, 0.12);
}

.eg-auth-name-group .eg-auth-dual-row {
    margin-bottom: 0.65rem;
}

.eg-auth-name-group .eg-auth-dual-row:last-child {
    margin-bottom: 0;
}

.eg-auth-field-line--select {
    padding-bottom: 0.35rem;
}

.eg-auth-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23461E38' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 0.25rem center;
    padding-left: 1.25rem;
}

html[data-bs-theme="dark"] .eg-auth-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23ffb347' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
}

/* ── Register — student code badge ── */

.eg-auth-code-badge {
    display: flex;
    align-items: center;
    background: var(--eg-primary-soft);
    border: 1.5px solid rgba(243, 147, 24, 0.35);
    border-radius: var(--eg-radius-sm);
    overflow: hidden;
    position: relative;
    height: 2.75rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.eg-auth-code-badge:hover {
    border-color: var(--eg-primary);
    box-shadow: 0 0 16px rgba(243, 147, 24, 0.2);
}

.eg-auth-code-badge__prefix {
    background: linear-gradient(135deg, var(--eg-primary) 0%, var(--eg-primary-dark) 100%);
    color: #fff;
    height: 100%;
    padding: 0 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    flex-shrink: 0;
}

.eg-auth-code-badge__value {
    flex: 1;
    text-align: center;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--eg-secondary);
    letter-spacing: 0.15em;
}

html[data-bs-theme="dark"] .eg-auth-code-badge__value {
    color: var(--eg-primary-light);
}

.eg-auth-code-badge__scan {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(243, 147, 24, 0.12), transparent);
    animation: eg-auth-code-scan 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes eg-auth-code-scan {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

/* ── Register — file upload ── */

.eg-auth-upload-row {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.eg-auth-upload {
    flex: 1;
    min-width: 0;
}

.eg-auth-upload-card {
    border: 2px dashed rgba(70, 30, 56, 0.18);
    border-radius: var(--eg-radius-sm);
    height: 9.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(70, 30, 56, 0.03);
    transition: border-color 0.3s ease, background 0.3s ease;
    position: relative;
    overflow: hidden;
}

.eg-auth-upload-card:hover {
    border-color: var(--eg-primary);
    background: var(--eg-primary-soft);
}

.eg-auth-upload-card.has-file {
    border-style: solid;
    border-color: var(--eg-primary);
}

.eg-auth-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    cursor: pointer;
    color: var(--eg-text-muted);
    width: 100%;
    height: 100%;
    padding: 0.75rem;
    text-align: center;
}

.eg-auth-upload-label i {
    font-size: 1.75rem;
    color: rgba(70, 30, 56, 0.25);
    transition: color 0.3s ease;
}

.eg-auth-upload-card:hover .eg-auth-upload-label i {
    color: var(--eg-primary);
}

.eg-auth-upload-label span {
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--eg-text);
}

.eg-auth-upload-label small {
    font-size: 0.68rem;
    opacity: 0.7;
}

.eg-auth-upload-preview {
    width: 100%;
    height: 100%;
    position: relative;
}

.eg-auth-upload-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.eg-auth-upload-remove {
    position: absolute;
    top: 0.4rem;
    left: 0.4rem;
    background: rgba(192, 57, 43, 0.92);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

.eg-auth-upload-remove:hover {
    transform: scale(1.1);
}

/* ── Register — command bar ── */

.eg-auth-command-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 1.35rem;
    padding: 0.75rem 0.75rem 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(70, 30, 56, 0.1);
    border-radius: 1rem;
    box-shadow: 0 8px 24px rgba(70, 30, 56, 0.06);
    animation: eg-auth-fade-up 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

html[data-bs-theme="dark"] .eg-auth-command-bar {
    background: rgba(50, 36, 48, 0.75);
    border-color: rgba(243, 147, 24, 0.15);
}

.eg-auth-command-metric {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.eg-auth-progress-ring {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    background: conic-gradient(var(--eg-primary) var(--percent), rgba(70, 30, 56, 0.12) 0);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.eg-auth-progress-ring::before {
    content: "";
    position: absolute;
    inset: 0.25rem;
    background: var(--eg-parchment);
    border-radius: 50%;
}

html[data-bs-theme="dark"] .eg-auth-progress-ring::before {
    background: var(--eg-surface);
}

.eg-auth-progress-ring__text {
    position: relative;
    font-size: 0.68rem;
    font-weight: 800;
    color: var(--eg-secondary);
}

html[data-bs-theme="dark"] .eg-auth-progress-ring__text {
    color: var(--eg-primary-light);
}

.eg-auth-command-metric__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.eg-auth-command-metric__label {
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--eg-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.eg-auth-command-metric__sub {
    font-size: 0.68rem;
    color: var(--eg-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.eg-auth-command-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.eg-auth-btn-back {
    background: transparent;
    border: none;
    padding: 0.5rem 0.85rem;
    font-weight: 700;
    color: var(--eg-text-muted);
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
    font-family: inherit;
}

.eg-auth-btn-back:hover {
    color: var(--eg-secondary);
    transform: translateX(3px);
}

.eg-auth-btn-next {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.7rem 1.15rem;
    background: linear-gradient(135deg, var(--eg-secondary) 0%, var(--eg-secondary-light) 100%);
    color: #fff;
    border: none;
    border-radius: 0.75rem;
    font-family: inherit;
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 16px rgba(70, 30, 56, 0.25);
}

.eg-auth-btn-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(70, 30, 56, 0.35);
}

.eg-auth-submit--finish {
    width: auto;
    padding: 0.7rem 1.25rem;
    font-size: 0.92rem;
}

/* ── Register — step-based visual caption ── */

.eg-auth-visual-caption--register {
    max-width: min(18rem, 48vw);
}

.eg-auth-visual-caption__badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    background: rgba(243, 147, 24, 0.25);
    border: 1px solid rgba(255, 220, 160, 0.4);
    border-radius: 999px;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: rgba(255, 220, 160, 0.95);
    margin-bottom: 0.45rem;
}

.eg-auth-visual-caption--register .eg-auth-visual-caption__label {
    display: block;
    font-size: clamp(0.82rem, 2vw, 0.95rem);
    font-weight: 800;
    letter-spacing: 0;
    text-transform: none;
    color: rgba(255, 255, 255, 0.92);
    margin-bottom: 0.35rem;
}

/* ── Register — mobile tabs (login / register switcher) ── */

.eg-auth-mobile-tabs {
    display: none;
}

.eg-auth-mobile-tabs__btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.62rem 0.75rem;
    border-radius: var(--eg-radius-sm);
    font-weight: 700;
    font-size: 0.82rem;
    text-decoration: none;
    color: var(--eg-text-muted);
    background: rgba(70, 30, 56, 0.06);
    border: 1px solid transparent;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.eg-auth-mobile-tabs__btn--active {
    background: var(--eg-primary-soft);
    color: var(--eg-secondary);
    border-color: rgba(243, 147, 24, 0.45);
    box-shadow: 0 2px 8px rgba(243, 147, 24, 0.12);
}

html[data-bs-theme="dark"] .eg-auth-mobile-tabs__btn--active {
    color: var(--eg-primary-light);
}

.eg-auth-mobile-tabs__btn:not(.eg-auth-mobile-tabs__btn--active):hover {
    background: rgba(70, 30, 56, 0.1);
    color: var(--eg-text);
}

@media (max-width: 992px) {
    .eg-auth--register .eg-auth-mobile-tabs {
        display: flex;
        gap: 0.5rem;
        padding: 0.65rem 0.875rem;
        background: rgba(255, 255, 255, 0.94);
        backdrop-filter: blur(12px);
        border-bottom: 1px solid rgba(70, 30, 56, 0.1);
        position: sticky;
        top: var(--eg-nav-h);
        z-index: 999;
    }

    html[data-bs-theme="dark"] .eg-auth--register .eg-auth-mobile-tabs {
        background: rgba(50, 36, 48, 0.94);
        border-bottom-color: rgba(243, 147, 24, 0.15);
    }
}

/* ── Register — responsive (mobile polish) ── */

@media (max-width: 600px) {
    .eg-auth--register .eg-auth-form-inner--register {
        padding: 1rem 0.875rem 6.25rem;
    }

    .eg-auth--register .eg-auth-name-group {
        padding: 0.65rem;
    }

    .eg-auth--register .eg-auth-hint {
        font-size: 0.82rem;
        margin-bottom: 1rem;
    }

    .eg-auth--register .eg-auth-divider {
        margin-bottom: 1.15rem;
    }

    .eg-auth--register .eg-auth-steps {
        margin-bottom: 1.15rem;
    }

    .eg-auth--register .eg-auth-field {
        margin-bottom: 1.15rem;
    }

    .eg-auth--register .eg-auth-code-badge {
        height: 2.5rem;
    }

    .eg-auth--register .eg-auth-code-badge__value {
        font-size: 0.95rem;
        letter-spacing: 0.1em;
    }

    .eg-auth--register .eg-auth-upload-card {
        height: 8.5rem;
    }

    .eg-auth-dual-row {
        flex-direction: column;
        gap: 0;
    }

    .eg-auth-upload-row {
        flex-direction: column;
    }

    .eg-auth-command-bar {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        padding: 0.75rem 0.875rem;
        gap: 0.65rem;
    }

    .eg-auth--register .eg-auth-command-bar {
        flex-direction: row;
        flex-wrap: nowrap;
        padding: 0.75rem 0.875rem;
        padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
    }

    .eg-auth-command-metric {
        flex: 1;
        min-width: 0;
        justify-content: flex-start;
    }

    .eg-auth-command-metric__sub {
        white-space: normal;
        line-height: 1.35;
    }

    .eg-auth-command-actions {
        flex-shrink: 0;
        gap: 0.4rem;
    }

    .eg-auth-btn-back,
    .eg-auth-btn-next,
    .eg-auth-submit--finish {
        flex: none;
        padding: 0.65rem 0.9rem;
        font-size: 0.85rem;
    }

    .eg-auth--register .eg-auth-btn-next,
    .eg-auth--register .eg-auth-submit--finish {
        padding: 0.7rem 1rem;
    }

    .eg-auth-steps {
        gap: 0.15rem;
    }

    .eg-auth-step__label {
        font-size: 0.58rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .eg-auth-step-pane,
    .eg-auth-code-badge__scan,
    .eg-auth-command-bar,
    .eg-auth-scroll-card,
    .eg-auth-form-inner,
    .eg-auth-era-badge,
    .eg-auth-title-row,
    .eg-auth-hint,
    .eg-auth-divider,
    .eg-auth-field--1,
    .eg-auth-field--2,
    .eg-auth-field--3,
    .eg-auth-field--4,
    .eg-auth-field--5,
    .eg-auth-visual-side,
    .eg-auth-visual-caption,
    .eg-auth-hero-img,
    .eg-auth-visual-compass,
    .eg-auth-era-chip,
    .eg-auth-map-route,
    .eg-auth-map-dot,
    .eg-auth-era-badge__icon,
    .eg-auth-title-icon,
    .eg-auth-submit::after,
    .eg-auth-submit__dot,
    .eg-auth .eg-nav {
        animation: none !important;
    }

    .eg-auth-field-line:focus-within {
        transform: none;
    }
}
