/* ==========================================================================
   Xenotech Student Dashboard — Twain / Award-Winning Modern Aesthetic
   Ultra-refined glassmorphism, borderless tonal depth, and specular bevels.
   ========================================================================== */

/* 1. Deep Atmospheric Canvas */
body {
    background-color: #080910 !important;
}

/* 2. Glassmorphic Surface Cards (No Harsh Grey Borders) */
.modern-panel {
    background: linear-gradient(180deg, rgba(24, 29, 48, 0.55) 0%, rgba(13, 16, 27, 0.45) 100%) !important;
    backdrop-filter: blur(24px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(160%) !important;
    border: 1px solid rgba(255, 255, 255, 0.035) !important;
    border-radius: 20px !important;
    padding: 1.8rem 2rem !important;
    box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.06), 0 20px 40px -15px rgba(0, 0, 0, 0.55) !important;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease !important;
}

.modern-panel:hover {
    transform: translateY(-2px) !important;
    background: linear-gradient(180deg, rgba(28, 34, 56, 0.6) 0%, rgba(16, 20, 33, 0.5) 100%) !important;
    border-color: rgba(240, 126, 19, 0.16) !important;
    box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.1), 0 28px 60px -15px rgba(0, 0, 0, 0.65), 0 0 30px rgba(240, 126, 19, 0.04) !important;
}

/* 3. Student Command Header (Hero Surface) */
.xt-student-cmd {
    background: radial-gradient(circle at 0% 0%, rgba(240, 126, 19, 0.08) 0%, transparent 60%),
                linear-gradient(180deg, rgba(24, 29, 49, 0.6) 0%, rgba(13, 16, 27, 0.5) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.035) !important;
    box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.07), 0 24px 50px -15px rgba(0, 0, 0, 0.6) !important;
    border-radius: 22px !important;
    padding: 1.8rem 2.2rem !important;
}

/* 4. Typography Hierarchy & Optical Spacing */
.panel-title {
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.8px !important;
    text-transform: uppercase !important;
    color: rgba(200, 205, 225, 0.9) !important;
    margin-bottom: 1.2rem !important;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    border: none !important;
    padding: 0 !important;
}

.panel-title > i {
    font-size: 1.1em;
}

h3.stat-value {
    font-weight: 800 !important;
    color: #ffffff !important;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    font-size: 1.9rem !important;
    line-height: 1.1 !important;
}

/* 5. Stat Metric Tiles (Borderless, Floating Depth) */
.stat-card.modern-panel {
    padding: 1.25rem 1.4rem !important;
    display: flex !important;
    align-items: center !important;
    gap: 1.1rem !important;
    background: linear-gradient(180deg, rgba(22, 26, 44, 0.45) 0%, rgba(12, 15, 26, 0.35) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.03) !important;
    box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.05), 0 12px 28px -8px rgba(0, 0, 0, 0.4) !important;
    border-radius: 18px !important;
}

.stat-icon {
    font-size: 1.55rem !important;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03) !important;
    border: none !important;
    box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-label {
    font-size: 0.72rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.9px !important;
    font-weight: 600 !important;
    color: rgba(160, 160, 185, 0.7) !important;
    display: block;
    margin-bottom: 4px;
}

/* 6. Pure Frosted Badges (No Harsh Outline) */
.xt-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.82rem;
    font-weight: 600;
    border: none !important;
    background: rgba(255, 255, 255, 0.04) !important;
    backdrop-filter: blur(12px);
    color: #e0e0e0;
}

.xt-badge--level {
    background: rgba(76, 175, 80, 0.1) !important;
    color: #4ade80 !important;
}

.xt-badge--rating {
    background: rgba(240, 126, 19, 0.12) !important;
    color: #ff9d42 !important;
}

.xt-badge--coach {
    background: rgba(255, 152, 0, 0.1) !important;
    color: #fb923c !important;
}

.xt-badge--plan {
    background: rgba(240, 126, 19, 0.14) !important;
    color: #f07e13 !important;
}

/* 7. Tab Switcher (Segmented Pill Well) */
.xt-dash-tabs {
    display: flex;
    gap: 0.35rem;
    background: rgba(0, 0, 0, 0.3) !important;
    padding: 5px !important;
    border-radius: 14px !important;
    border: 1px solid rgba(255, 255, 255, 0.025) !important;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4) !important;
    margin-bottom: 1.2rem;
}

.xt-dash-tab-btn {
    flex: 1;
    padding: 0.55rem 0.85rem;
    border-radius: 10px !important;
    background: none !important;
    border: none !important;
    color: #9898b0;
    font-weight: 600;
    font-size: 0.84rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.xt-dash-tab-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.04) !important;
}

.xt-dash-tab-btn.is-active {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), inset 0 1px 0 0 rgba(255, 255, 255, 0.1) !important;
}

/* 8. Recessed Wells for Inner Controls & Sub-Panels */
#linked-accounts-panel,
.xt-dash-well {
    background: rgba(0, 0, 0, 0.22) !important;
    border: 1px solid rgba(255, 255, 255, 0.025) !important;
    border-radius: 14px !important;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.35) !important;
}

/* 9. Deep Analysis Section Polish */
#deep-analysis-panel {
    background: linear-gradient(180deg, rgba(24, 29, 49, 0.6) 0%, rgba(13, 16, 27, 0.5) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.035) !important;
}

/* 10. Inputs & Selects */
input[type="text"], input[type="number"], select {
    background: rgba(10, 13, 22, 0.75) !important;
    border: 1px solid rgba(255, 255, 255, 0.04) !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4) !important;
    color: #ffffff !important;
    padding: 9px 14px !important;
    border-radius: 10px !important;
    font-size: 0.92rem !important;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]:focus, input[type="number"]:focus, select:focus {
    border-color: rgba(240, 126, 19, 0.5) !important;
    box-shadow: 0 0 0 3px rgba(240, 126, 19, 0.15), inset 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

/* 11. Header & Sections */
header { background: transparent !important; }
section { background-color: transparent !important; }

/* 12. Tactical Sprint Button & Inputs Polish */
#custom-puzzle-session-panel .btn-primary {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    height: auto !important;
    min-height: 42px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 0.55rem 0.9rem !important;
}

#custom-puzzle-session-panel input[type="number"] {
    height: 42px !important;
    font-size: 1rem !important;
    padding: 0 !important;
}

#custom-puzzle-session-panel select {
    height: 42px !important;
    font-size: 0.88rem !important;
}

/* 13. Glassmorphic Modal Overlays (Diagnostics, Goals, Assessment) */
.xt-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2100;
    background: rgba(4, 5, 10, 0.78);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    animation: xtFadeIn 0.2s ease-out;
}

.xt-modal-card {
    position: relative;
    width: 100%;
    background: linear-gradient(180deg, rgba(24, 30, 52, 0.95) 0%, rgba(12, 16, 28, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    padding: 1.8rem 2rem;
    box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.12), 0 30px 80px -15px rgba(0, 0, 0, 0.85);
    color: #ffffff;
    animation: xtModalScale 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.xt-modal-close-btn {
    background: rgba(255, 255, 255, 0.06);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #a0a0b8;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.xt-modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

@keyframes xtFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes xtModalScale {
    from { opacity: 0; transform: scale(0.96) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* 14. Tactical Sprint Searchable Multi-Select */
.xt-theme-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: rgba(240, 126, 19, 0.18);
    border: 1px solid rgba(240, 126, 19, 0.35);
    border-radius: 6px;
    font-size: 0.76rem;
    font-weight: 600;
    color: #ff9d42;
}

.xt-theme-tag-remove {
    cursor: pointer;
    opacity: 0.7;
    margin-left: 2px;
    font-size: 0.7rem;
    line-height: 1;
}

.xt-theme-tag-remove:hover {
    opacity: 1;
    color: #ffffff;
}

.xt-theme-option-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
    font-size: 0.82rem;
    color: #d1d5db;
    user-select: none;
}

.xt-theme-option-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

.xt-theme-option-item.is-selected {
    background: rgba(240, 126, 19, 0.12);
    color: #ff9d42;
    font-weight: 600;
}

.xt-theme-option-checkbox {
    width: 15px;
    height: 15px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* 15. Compact Milestone List */
.xt-milestone-compact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.15s ease;
}

.xt-milestone-compact:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(2px);
}

/* 16. Compact Weekly Goals Items */
.xt-goal-compact-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 10px 12px;
    border-radius: 10px;
    transition: background 0.2s ease;
}

.xt-goal-compact-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* 17. Stacking Context & Dropdown Layering Fix */
#custom-puzzle-session-panel {
    position: relative !important;
    z-index: 35 !important;
    overflow: visible !important;
}

#custom-puzzle-session-panel:focus-within,
#custom-puzzle-session-panel.xt-dropdown-open {
    z-index: 80 !important;
}

#xt-theme-multiselect-container {
    position: relative !important;
    z-index: 100 !important;
}

#xt-theme-dropdown {
    z-index: 1000 !important;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.15) !important;
}

#weekly-goals-panel {
    position: relative !important;
    z-index: 5 !important;
}

/* 18. Dashboard Homework & Coach Assessment Side-by-Side Harmonization */
#homework-section {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
}

#homework-section .xt-hwp__grid {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 12px !important;
}

#homework-section .xt-hwp-card {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 1.15rem 1.25rem !important;
    background: rgba(255, 255, 255, 0.025) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 14px !important;
    gap: 0.65rem !important;
    min-width: 0 !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

#homework-section .xt-hwp-card:hover {
    background: rgba(255, 255, 255, 0.045) !important;
    border-color: rgba(240, 126, 19, 0.3) !important;
    box-shadow: 0 10px 28px -6px rgba(0, 0, 0, 0.45) !important;
}

#homework-section .xt-hwp-card::before {
    display: none !important;
}

#homework-section .xt-hwp-card__head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.75rem !important;
    width: 100% !important;
}

#homework-section .xt-hwp-card__title {
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    letter-spacing: -0.01em !important;
    line-height: 1.35 !important;
    margin: 0 !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
    white-space: normal !important;
    hyphens: manual !important;
    -webkit-hyphens: manual !important;
}

#homework-section .xt-hwp-card__summary {
    color: rgba(185, 190, 210, 0.75) !important;
    font-size: 0.85rem !important;
    line-height: 1.45 !important;
    margin: 0 !important;
}

#homework-section .xt-hwp-card__due {
    color: rgba(165, 170, 190, 0.65) !important;
    font-size: 0.8rem !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin: 0 !important;
}

#homework-section .xt-hwp-card__progress {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.85rem !important;
    width: 100% !important;
    margin-top: 0.35rem !important;
    padding-top: 0.5rem !important;
    border-top: 1px solid rgba(255, 255, 255, 0.04) !important;
}

#homework-section .xt-hwp-card__progress .xt-progress {
    flex: 1 !important;
    height: 7px !important;
    background: rgba(255, 255, 255, 0.07) !important;
    border-radius: 999px !important;
    overflow: hidden !important;
}

#homework-section .xt-hwp-card__progress span {
    font-size: 0.82rem !important;
    color: rgba(200, 205, 225, 0.85) !important;
    white-space: nowrap !important;
}

#homework-section .xt-hwp-card__go {
    align-self: flex-start !important;
    margin-top: 0.2rem !important;
    padding: 6px 14px !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}

#homework-section .xt-hwp__empty {
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px dashed rgba(255, 255, 255, 0.08) !important;
    border-radius: 14px !important;
    padding: 1.15rem 1.3rem !important;
}

/* Assessment Preview Well Harmonization */
#assessment-preview-container {
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 14px !important;
    padding: 1.15rem 1.3rem !important;
}

/* Bottom Action Buttons Consistency */
#homework-view-all,
#btn-open-assessment-modal {
    padding: 9px 16px !important;
    font-size: 0.86rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.3px !important;
    border-radius: 11px !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}




/* 7. Visual hierarchy (Nov 2026): homework is the main job, so it carries the accent;
   card titles read as titles (sentence case) and the stat labels stay small caps. */
.panel-title {
    text-transform: none !important;
    letter-spacing: -0.005em !important;
    font-size: 1.05rem !important;
    color: #f3f4f8 !important;
}
#homework-section.modern-panel {
    border-color: rgba(240, 126, 19, 0.24) !important;
    background: radial-gradient(circle at 0% 0%, rgba(240, 126, 19, 0.09) 0%, transparent 55%),
                linear-gradient(180deg, rgba(24, 29, 48, 0.6) 0%, rgba(13, 16, 27, 0.5) 100%) !important;
}
#main-dashboard-grid .stat-card.modern-panel { padding: 1.05rem 1.25rem !important; }
#main-dashboard-grid h3.stat-value { font-size: 1.65rem !important; }
.xt-chart-empty {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    text-align: center;
    padding: 1rem 1.5rem;
    border: 1px dashed rgba(255, 255, 255, 0.08);
    border-radius: 14px;
}
.xt-chart-empty[hidden] { display: none; }
.xt-chart-empty > i { font-size: 1.6rem; color: rgba(240, 126, 19, 0.7); }
.xt-chart-empty p { margin: 0; max-width: 34ch; color: #a0a3b5; font-size: 0.88rem; line-height: 1.5; }

/* "Join live class" banner (dashboard.page.js watchLiveClasses) */
.xt-live-banner {
    display: flex; align-items: center; flex-wrap: wrap; gap: 0.8rem; margin-bottom: 1rem;
    padding: 0.85rem 1.1rem; border-radius: 16px;
    background: linear-gradient(90deg, rgba(216, 67, 57, 0.18), rgba(240, 126, 19, 0.12));
    border: 1px solid rgba(255, 99, 71, 0.35);
}
.xt-live-banner__dot { width: 10px; height: 10px; border-radius: 50%; background: #ff4d4d; box-shadow: 0 0 0 4px rgba(255, 77, 77, 0.22); }
.xt-live-banner__text { flex: 1 1 200px; color: #fff; }
.xt-live-banner__text strong { margin-right: 0.35rem; }

/* Latest class report (dashboard.page.js showClassReports) */
.xt-report-card {
    display: flex; align-items: center; gap: 0.9rem; margin-bottom: 1rem; padding: 0.9rem 1.1rem;
    border-radius: 16px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(240, 126, 19, 0.35);
    color: #e8e9f0; text-decoration: none;
}
.xt-report-card:hover { border-color: rgba(240, 126, 19, 0.7); color: #fff; }
.xt-report-card:focus-visible { outline: 2px solid #f07e13; outline-offset: 2px; }
.xt-report-card__icon { flex: 0 0 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: rgba(240, 126, 19, 0.14); color: #ff9d42; }
.xt-report-card__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.xt-report-card__text strong { color: #fff; font-size: 0.95rem; }
.xt-report-card__text > span { color: #a0a3b5; font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xt-report-card__new { display: inline-block; font-size: 0.68rem; padding: 0.1rem 0.45rem; border-radius: 999px; background: #f07e13; color: #fff; vertical-align: 2px; }
.xt-report-card__score { flex: 0 0 auto; font-weight: 700; font-size: 1.2rem; color: #fff; }
.xt-report-card__score small { font-size: 0.7rem; color: #a0a3b5; font-weight: 500; }
.xt-report-card__all { flex: 0 0 auto; color: #ff9d42; font-size: 0.85rem; font-weight: 600; white-space: nowrap; }
@media (max-width: 520px) {
    .xt-report-card { flex-wrap: wrap; }
    .xt-report-card__text > span { white-space: normal; }
    .xt-report-card__all { margin-left: auto; }
}
