/* === EnGen Assessment Studio Header (Light Translucent Spatial Glass + Integrated Kinetic Mark) === */

.eg-studio-header {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    margin: -20px -20px 22px -20px;
    padding: 12px 24px;
    overflow: visible;
    background: linear-gradient(90deg, #ffffff 0%, #ffffff 32%, rgba(240, 249, 255, 0.78) 66%, rgba(224, 242, 254, 0.62) 86%, rgba(224, 231, 255, 0.56) 100%);
    backdrop-filter: blur(20px) saturate(170%);
    -webkit-backdrop-filter: blur(20px) saturate(170%);
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 2px 14px -6px rgba(15, 23, 42, 0.06);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, sans-serif;
    z-index: 20;
}

.eg-header-ambient {
    display: none;
}

/* --- INTEGRATED CIRCULAR KINETIC EMBLEM & FUTURIST WORDMARK --- */
.eg-brand-lockup {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    text-align: left;
    font: inherit;
    text-decoration: none;
    justify-self: start;
    user-select: none;
    cursor: pointer;
}

.eg-logo-emblem {
    position: relative;
    width: 74px;
    height: 74px;
    margin: -16px 0 -18px -4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: transparent;
    border: none;
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.eg-brand-lockup:hover .eg-logo-emblem {
    transform: scale(1.05);
}

.eg-logo-svg {
    display: block;
    width: 74px;
    height: 74px;
    overflow: visible;
}

@keyframes egRotorCW {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes egRotorCCW {
    from { transform: rotate(360deg); }
    to   { transform: rotate(0deg); }
}

.eg-rotor-outer {
    transform-origin: 32px 32px;
    animation: egRotorCW 52s linear infinite;
}

.eg-rotor-mid {
    transform-origin: 32px 32px;
    animation: egRotorCCW 34s linear infinite;
}

.eg-rotor-core {
    transform-origin: 32px 32px;
    animation: egRotorCW 24s linear infinite;
}

.eg-brand-text {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.eg-brand-name {
    font-size: 1.58rem;
    letter-spacing: 0.12em;
    line-height: 0.98;
    display: inline-flex;
    align-items: baseline;
    transition: letter-spacing 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.eg-brand-lockup:hover .eg-brand-name {
    letter-spacing: 0.15em;
}

.eg-brand-thin {
    font-weight: 200;
    color: #334155;
}

.eg-brand-med {
    font-weight: 500;
    background: linear-gradient(125deg, #0284c7 0%, #06b6d4 58%, #d97706 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Continuous orbital tangent line extending from emblem right into the wordmark */
.eg-brand-horizon {
    position: relative;
    display: block;
    width: calc(100% + 12px);
    height: 1px;
    margin-left: -12px;
    background: linear-gradient(90deg, rgba(6, 182, 212, 0.72) 0%, rgba(245, 158, 11, 0.55) 55%, rgba(148, 163, 184, 0.08) 100%);
    transition: opacity 0.24s ease, filter 0.24s ease;
}

.eg-brand-horizon::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #06b6d4;
    transform: translate(-50%, -50%);
}

.eg-brand-lockup:hover .eg-brand-horizon {
    filter: brightness(1.12);
}

.eg-brand-sub {
    font-size: 0.55rem;
    font-weight: 500;
    letter-spacing: 0.42em;
    text-transform: uppercase;
    line-height: 1;
    color: #64748b;
    padding-left: 1px;
    transition: color 0.22s ease;
}

.eg-brand-lockup:hover .eg-brand-sub {
    color: #334155;
}

/* --- CENTER FROSTED GLASS SEGMENTED NAV PILL --- */
.eg-nav-pill {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border-radius: 13px;
    justify-self: center;
    background: rgba(255, 255, 255, 0.56);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(148, 163, 184, 0.28);
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03), 0 1px 0 rgba(255, 255, 255, 0.85);
}

.eg-studio-header .nav-tab {
    display: inline-flex !important;
    align-items: center;
    gap: 7px;
    padding: 8px 16px !important;
    border-radius: 9px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.01em;
    line-height: 1;
    border: 1px solid transparent;
    background: transparent !important;
    color: #475569 !important;
    cursor: pointer;
    user-select: none;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.eg-studio-header .nav-tab svg {
    flex-shrink: 0;
    opacity: 0.72;
    transition: opacity 0.18s ease, color 0.18s ease;
}

.eg-studio-header .nav-tab:hover:not(.active) {
    color: #0f172a !important;
    background: rgba(255, 255, 255, 0.72) !important;
}

.eg-studio-header .nav-tab.active {
    background: rgba(255, 255, 255, 0.96) !important;
    border-color: rgba(148, 163, 184, 0.34) !important;
    color: #0f172a !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 10px -2px rgba(15, 23, 42, 0.10), inset 0 1px 0 #ffffff;
}

.eg-studio-header .nav-tab.active svg {
    opacity: 1;
    color: #0284c7;
}

/* --- RIGHT TRANSLUCENT UTILITY DOCK --- */
.eg-utility-dock {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    justify-self: end;
}

.eg-studio-header .eg-util-btn {
    width: 35px !important;
    height: 35px !important;
    min-width: 35px !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 10px !important;
    border: 1px solid transparent !important;
    background: transparent !important;
    color: #475569 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
    box-shadow: none !important;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.14s ease !important;
}

.eg-studio-header .eg-util-btn:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.85) !important;
    border-color: rgba(148, 163, 184, 0.34) !important;
    color: #0f172a !important;
    box-shadow: 0 2px 8px -2px rgba(15, 23, 42, 0.08) !important;
}

.eg-studio-header .eg-util-btn--logout:hover {
    background: rgba(254, 242, 242, 0.92) !important;
    border-color: rgba(252, 165, 165, 0.65) !important;
    color: #dc2626 !important;
}

.eg-util-sep {
    width: 1px;
    height: 20px;
    margin: 0 3px;
    flex-shrink: 0;
    background: rgba(148, 163, 184, 0.36);
}

/* --- RESPONSIVE --- */
@media (max-width: 820px) {
    .eg-studio-header {
        grid-template-columns: auto 1fr;
        row-gap: 10px;
        padding: 10px 16px;
    }
    .eg-nav-pill {
        grid-column: 1 / -1;
        order: 3;
        width: 100%;
        justify-content: center;
    }
    .eg-studio-header .nav-tab {
        padding: 7px 12px !important;
        font-size: 0.82rem !important;
    }
}

/* === ABOUT ENGEN SPLASH MODAL === */
.eg-about-overlay {
    position: fixed;
    inset: 0;
    z-index: 45000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity 0.18s ease;
}

.eg-about-overlay.is-open {
    opacity: 1;
}

.eg-about-card {
    position: relative;
    width: 100%;
    max-width: 420px;
    margin-top: 0;
    overflow: hidden;
    border-radius: 22px;
    background: linear-gradient(145deg, #ffffff 0%, #ffffff 58%, rgba(246, 251, 255, 0.97) 85%, rgba(244, 246, 255, 0.96) 100%);
    backdrop-filter: blur(26px) saturate(160%);
    -webkit-backdrop-filter: blur(26px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 24px 56px -14px rgba(15, 23, 42, 0.20), 0 0 0 1px rgba(148, 163, 184, 0.22), inset 0 1px 0 #ffffff;
    padding: 26px 28px 22px 28px;
    box-sizing: border-box;
    text-align: center;
    user-select: none;
    -webkit-user-select: none;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, sans-serif;
    transform: translateY(8px) scale(0.97);
    transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.eg-about-overlay.is-open .eg-about-card {
    transform: translateY(0) scale(1);
}

.eg-about-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.eg-about-close:hover {
    background: rgba(148, 163, 184, 0.14);
    border-color: rgba(148, 163, 184, 0.28);
    color: #0f172a;
}

.eg-about-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 72px;
    padding-bottom: 46px;
}

.eg-about-g-wrap {
    position: relative;
    display: inline-block;
}

.eg-about-g-char {
    position: relative;
    z-index: 2;
}

.eg-about-emblem {
    position: absolute;
    top: 50%;
    left: 44%;
    transform: translate(-50%, -50%);
    z-index: 0;
    width: 320px;
    height: 320px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.32;
    pointer-events: none;
}

.eg-about-svg {
    width: 320px;
    height: 320px;
    filter: none;
}

.eg-about-title-lockup {
    position: relative;
    z-index: 2;
    margin-top: 0;
    padding: 6px 18px 4px 18px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: transparent;
}

.eg-about-wordmark {
    font-size: 2.2rem;
    letter-spacing: 0.16em;
    line-height: 1;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.92));
}

.eg-about-wordmark .eg-brand-thin {
    font-weight: 300;
    color: #0f172a;
}

.eg-about-wordmark .eg-brand-med {
    font-weight: 600;
    background: linear-gradient(125deg, #0369a1 0%, #0284c7 58%, #b45309 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.eg-about-horizon {
    display: block;
    width: 100%;
    height: 1px;
    margin: 6px 0 5px 0;
    background: linear-gradient(90deg, transparent 0%, rgba(6, 182, 212, 0.72) 28%, rgba(245, 158, 11, 0.65) 72%, transparent 100%);
}

.eg-about-sub {
    margin-top: 0;
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.42em;
    color: #334155;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.95);
}

.eg-about-ver {
    position: relative;
    z-index: 2;
    display: inline-block;
    margin-top: 8px;
    padding: 0;
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 500;
    letter-spacing: 0.14em;
}

.eg-about-tagline {
    position: relative;
    z-index: 2;
    margin: 6px auto 0 auto;
    padding-top: 14px;
    border-top: 1px solid rgba(148, 163, 184, 0.25);
    font-size: 0.86rem;
    color: #334155;
    line-height: 1.5;
    max-width: 320px;
}

.eg-about-meta {
    position: relative;
    z-index: 2;
    margin-top: 16px;
    padding: 4px 6px;
    background: transparent;
    border: none;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.eg-about-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.82rem;
}

.eg-about-meta-k {
    color: #64748b;
    font-weight: 500;
}

.eg-about-meta-v {
    color: #0f172a;
    font-weight: 600;
    text-align: right;
}

.eg-about-link {
    color: #0284c7;
    text-decoration: none;
}

.eg-about-link:hover {
    text-decoration: underline;
}

.eg-about-footer {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.eg-about-legal-links {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.80rem;
    font-weight: 600;
    color: #94a3b8;
}

.eg-about-legal-links a {
    color: #0284c7;
    text-decoration: none;
    transition: color 0.14s ease;
}

.eg-about-legal-links a:hover {
    color: #0369a1;
    text-decoration: underline;
}

.eg-about-copy {
    font-size: 0.74rem;
    color: #64748b;
}

/* === MOBILE TEACHER BACKEND HEADER (<= 768px ONLY — DESKTOP UNTOUCHED) === */
@media (max-width: 768px) {
    .eg-studio-header {
        grid-template-columns: 1fr auto !important;
        padding: 8px 12px !important;
        row-gap: 8px !important;
        column-gap: 8px !important;
        box-sizing: border-box;
    }
    .eg-studio-brand {
        min-width: 0;
        gap: 8px !important;
    }
    .eg-studio-brand .eg-brand-sub,
    .eg-studio-brand-sub {
        display: none !important;
    }
    .eg-studio-utils {
        gap: 5px !important;
        flex-wrap: nowrap;
        justify-content: flex-end;
    }
    .eg-nav-pill {
        grid-column: 1 / -1 !important;
        order: 3 !important;
        width: 100% !important;
        justify-content: flex-start !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 3px !important;
        gap: 4px !important;
        box-sizing: border-box;
    }
    .eg-nav-pill::-webkit-scrollbar {
        display: none;
    }
    .eg-studio-header .nav-tab {
        flex: 0 0 auto !important;
        white-space: nowrap !important;
        padding: 7px 11px !important;
        font-size: 0.8rem !important;
    }
}
