/* ═══════════════════════════════════════════════════════════════
   dashboard.css — Dashboard layout and components
   Version: 2.1.0 — Stripped of duplicates, uses global vars
   ═══════════════════════════════════════════════════════════════ */
/* @layer removed — load order governs: shared.css → dashboard.css */

  /* SIDEBAR */
  .sidebar { width: var(--sidebar-w); background: var(--slate-900); position: fixed; top: 0; left: 0; bottom: 0; display: flex; flex-direction: column; z-index: 200; border-right: 1px solid rgba(255,255,255,0.04); transition: transform var(--transition-medium); }
  .sidebar::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px); background-size: 30px 30px; pointer-events: none; }
  .sb-brand { padding: 22px 20px 18px; border-bottom: 1px solid rgba(255,255,255,0.05); display: flex; align-items: center; gap: var(--space-2); position: relative; z-index: 1; text-decoration: none; }
  .sb-logo-mark { width: 34px; height: 34px; background: var(--gold); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 0.85rem; font-weight: 800; color: var(--slate-900); flex-shrink: 0; }
  .sb-logo-text { flex: 1; }
  .sb-logo-name { font-family: var(--font-display); font-size: 0.95rem; font-weight: 700; color: #fff; display: block; line-height: 1; }
  .sb-logo-sub  { font-size: 0.62rem; color: var(--slate-300); margin-top: 2px; display: block; letter-spacing: 0.3px; }
  .sb-profile { padding: var(--space-3) var(--space-5); border-bottom: 1px solid rgba(255,255,255,0.05); display: flex; align-items: center; gap: var(--space-2); position: relative; z-index: 1; }
  .sb-avatar { width: 36px; height: 36px; background: linear-gradient(135deg, var(--teal), #0090a0); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 0.82rem; font-weight: 700; color: #fff; flex-shrink: 0; border: 2px solid rgba(0,191,166,0.3); }
  .sb-user-info { flex: 1; min-width: 0; }
  .sb-user-name { font-size: 0.82rem; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sb-user-plan { font-size: 0.63rem; color: var(--teal); font-weight: 600; margin-top: 1px; }
  .sb-nav { flex: 1; padding: var(--space-2) 10px; overflow-y: auto; position: relative; z-index: 1; }
  .sb-nav-label { font-size: 0.6rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--slate-400); padding: var(--space-2) 10px 4px; margin-top: var(--space-2); }
  .sb-nav-item { display: flex; align-items: center; gap: var(--space-2); padding: 9px 10px; border-radius: 8px; color: var(--slate-300); font-size: 0.84rem; font-weight: 500; text-decoration: none; cursor: pointer; transition: background var(--transition-fast), color var(--transition-fast); border: none; background: none; width: 100%; text-align: left; min-height: 40px; }
  .sb-nav-item:hover { background: rgba(255,255,255,0.05); color: #fff; }
  .sb-nav-item.active { background: var(--teal-dim); color: var(--teal); font-weight: 600; }
  .sb-nav-icon { font-size: 1rem; width: 20px; text-align: center; flex-shrink: 0; }
  .sb-nav-badge { margin-left: auto; background: var(--teal); color: var(--slate-900); font-size: 0.6rem; font-weight: 800; padding: 1px 7px; border-radius: 8px; }
  .sb-bottom { padding: var(--space-3) 10px; border-top: 1px solid rgba(255,255,255,0.05); position: relative; z-index: 1; }

  /* MAIN */
  .main { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; min-height: 100vh; }
  .topbar { background: var(--white); border-bottom: 1px solid var(--grey-200); padding: 0 var(--space-6); height: 60px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 100; box-shadow: var(--shadow-sm); }
  .topbar-left { display: flex; flex-direction: column; }
  .topbar-title { font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: var(--grey-800); line-height: 1; }
  .topbar-sub   { font-size: 0.72rem; color: var(--grey-400); margin-top: 2px; }
  .topbar-right { display: flex; align-items: center; gap: var(--space-3); }
  .topbar-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; min-width: 40px; padding: var(--space-2) var(--space-4); border-radius: 7px; font-family: var(--font-body); font-size: 0.8rem; font-weight: 600; cursor: pointer; text-decoration: none; border: none; transition: all var(--transition-fast); }
  .btn-teal { background: var(--teal); color: var(--slate-900); }
  .btn-teal:hover { background: #00d4b8; transform: translateY(-1px); box-shadow: 0 4px 12px var(--teal-glow); }
  .btn-outline { background: transparent; border: 1.5px solid var(--grey-200); color: var(--grey-600); }
  .btn-outline:hover { border-color: var(--teal); color: var(--teal); }
  .btn-gold { background: var(--gold); color: var(--slate-900); }
  .btn-gold:hover { background: #f0b232; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(232,163,32,0.25); }
  .page-body { padding: var(--space-5) var(--space-6) var(--space-12); flex: 1; }

  /* Animations (Overrides/Hooks into shared keys) */
  .fade-up { animation: fadeUp 0.5s ease-out both; }
  .d1 { animation-delay: 0.05s; } .d2 { animation-delay: 0.12s; } .d3 { animation-delay: 0.19s; }
  .d4 { animation-delay: 0.26s; } .d5 { animation-delay: 0.33s; } .d6 { animation-delay: 0.4s; }

  /* Lazy loading skeleton for below-fold content */
  .lazy-section { opacity: 0; transform: translateY(20px); transition: opacity var(--transition-medium), transform var(--transition-medium); }
  .lazy-section.visible { opacity: 1; transform: translateY(0); }

  /* Section headers */
  .section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-3); }
  .sidebar-section-label { font-family: var(--font-display); font-size: 0.88rem; font-weight: 700; color: var(--grey-800); display: flex; align-items: center; gap: var(--space-2); }
  .sidebar-section-icon { font-size: 1rem; }
  .section-link { font-size: 0.75rem; font-weight: 600; color: var(--teal); text-decoration: none; transition: opacity var(--transition-fast); }
  .section-link:hover { opacity: 0.75; }

  /* Cards */
  .card { background: var(--white); border: 1px solid var(--grey-200); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: box-shadow var(--transition-fast), transform var(--transition-fast); }
  .card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
  .card-pad { padding: var(--space-5); }

  /* Stats row */
  .stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3); margin-bottom: var(--space-5); }
  .stat-card { background: var(--white); border: 1px solid var(--grey-200); border-radius: var(--radius); padding: var(--space-4) 18px; display: flex; align-items: flex-start; gap: var(--space-3); box-shadow: var(--shadow-sm); transition: transform var(--transition-medium), box-shadow var(--transition-fast); position: relative; overflow: hidden; }
  .stat-card::after { content: ''; position: absolute; top: 0; left: 0; width: 3px; height: 100%; border-radius: 10px 0 0 10px; }
  .stat-card.teal::after  { background: var(--teal); }  .stat-card.gold::after  { background: var(--gold); }
  .stat-card.green::after { background: var(--green); } .stat-card.red::after   { background: var(--red); }
  .stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
  .stat-icon-wrap { width: 40px; height: 40px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
  .stat-icon-wrap.teal  { background: var(--teal-dim); }  .stat-icon-wrap.gold  { background: var(--gold-dim); }
  .stat-icon-wrap.green { background: var(--green-dim); } .stat-icon-wrap.red   { background: var(--red-dim); }
  .stat-body { flex: 1; }
  .stat-label { font-size: 0.7rem; color: var(--grey-400); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
  .stat-value { font-family: var(--font-display); font-size: 1.65rem; font-weight: 800; color: var(--grey-800); line-height: 1.1; margin: 2px 0; }
  .stat-delta { font-size: 0.7rem; font-weight: 600; display: flex; align-items: center; gap: 3px; }
  .delta-up { color: var(--green); } .delta-down { color: var(--red); } .delta-neu { color: var(--grey-400); }

  /* Main grid */
  .main-grid { display: grid; grid-template-columns: 1fr 340px; gap: var(--space-4); margin-bottom: var(--space-5); }
  .chart-card { padding: var(--space-5); }
  .chart-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; }
  .chart-title { font-family: var(--font-display); font-size: 0.9rem; font-weight: 700; color: var(--grey-800); }
  .chart-sub   { font-size: 0.72rem; color: var(--grey-400); margin-top: 2px; }
  .chart-x-label { text-align:   center; white-space:  pre-line; line-height:  1.2;}
  .chart-legend { display: flex; gap: var(--space-3); }
  .legend-item { display: flex; align-items: center; gap: 5px; font-size: 0.72rem; color: var(--grey-600); }
  .legend-dot  { width: 8px; height: 8px; border-radius: 50%; }
  .chart-wrap  { position: relative; height: 200px; }
  .chart-svg   { width: 100%; height: 100%; overflow: visible; }
  .chart-filter { display: flex; gap: 4px; background: var(--grey-100); border-radius: 6px; padding: 3px; }
  #chart-tip { position: fixed; z-index: var(--z-toast, 9999); background: var(--slate-800, #1e293b);
    color: #fff; padding: 5px 10px; border-radius: 6px; font-size: 0.75rem; font-weight: 600;
    pointer-events: none; white-space: nowrap; transform: translate(-50%, -140%); box-shadow: var(--shadow-md); }
  .cf-btn { padding: 4px 10px; border: none; border-radius: 4px; background: transparent; font-family: var(--font-body); font-size: 0.72rem; font-weight: 600; color: var(--grey-400); cursor: pointer; transition: all var(--transition-fast); min-height: 32px; }
  .cf-btn.active { background: var(--white); color: var(--grey-800); box-shadow: var(--shadow-sm); }
  .cf-btn:hover:not(.active) { color: var(--grey-600); }

  /* Canvas placeholder for future interactive visualizations */
  .edu-canvas-wrap {
    background: var(--white); border: 1px solid var(--grey-200); border-radius: var(--radius);
    padding: var(--space-5); margin-bottom: var(--space-5); text-align: center;
  }
  #edu-canvas { width: 100%; height: 200px; border-radius: 8px; background: linear-gradient(135deg, #f8fafc, #e2e8f0); }

  /* Upcoming tests */
  .upcoming-card { padding: var(--space-5); height: 100%; }
  .upcoming-list { display: flex; flex-direction: column; gap: var(--space-2); margin-top: 4px; }
  .upcoming-item { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); background: var(--grey-50); border: 1px solid var(--grey-200); border-radius: 8px; text-decoration: none; transition: border-color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast); cursor: pointer; }
  .upcoming-item:hover { border-color: var(--teal); background: rgba(0,191,166,0.03); transform: translateX(3px); }
  .upcoming-item:focus-visible { outline-offset: -2px; }
  .ui-icon  { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
  .ui-info  { flex: 1; min-width: 0; }
  .ui-title { font-size: 0.82rem; font-weight: 600; color: var(--grey-800); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ui-meta  { font-size: 0.68rem; color: var(--grey-400); margin-top: 2px; }
  .ui-badge { font-size: 0.62rem; font-weight: 700; padding: 2px var(--space-2); border-radius: 8px; white-space: nowrap; flex-shrink: 0; }
  .badge-free { background: var(--green-dim); color: var(--green); }
  .badge-pro  { background: var(--gold-dim);  color: var(--gold); }
  .badge-new  { background: var(--teal-dim);  color: var(--teal); }

  /* Bottom grid */
  .bottom-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
  .attempts-card  { padding: var(--space-5); }
  .attempts-list  { display: flex; flex-direction: column; gap: 0; margin-top: 4px; }
  .attempt-row { display: flex; align-items: center; gap: var(--space-3); padding: 11px var(--space-2); border-bottom: 1px solid var(--grey-100); cursor: pointer; transition: background var(--transition-fast); border-radius: 6px; }
  .attempt-row:last-child { border-bottom: none; }
  .attempt-row:hover { background: var(--grey-50); }
  .attempt-row:focus-visible { outline-offset: -2px; }
  .attempt-icon { width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 0.88rem; flex-shrink: 0; font-weight: 700; font-family: var(--font-display); }
  .attempt-info { flex: 1; min-width: 0; }
  .attempt-name  { font-size: 0.82rem; font-weight: 600; color: var(--grey-800); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .attempt-date  { font-size: 0.68rem; color: var(--grey-400); margin-top: 1px; }
  .attempt-score-block { text-align: right; flex-shrink: 0; }
  .attempt-score { font-family: var(--font-display); font-size: 1rem; font-weight: 800; line-height: 1; }
  .attempt-pct   { font-size: 0.68rem; color: var(--grey-400); margin-top: 2px; }
  .attempt-actions { display: flex; gap: var(--space-1); flex-shrink: 0; }
  .action-pill { font-size: 0.65rem; font-weight: 600; padding: 3px 9px; border-radius: 6px; border: 1.5px solid var(--grey-200); color: var(--grey-600); background: transparent; cursor: pointer; transition: all var(--transition-fast); white-space: nowrap; min-height: 28px; }
  .action-pill:hover { border-color: var(--teal); color: var(--teal); }
  .action-pill:focus-visible { outline-offset: -2px; }
  .action-pill.primary { background: var(--teal-dim); border-color: var(--teal); color: var(--teal); }
  .score-high { color: var(--green); } .score-mid { color: var(--gold); } .score-low { color: var(--red); }

  /* Strengths */
  .strength-card { padding: var(--space-5); }
  .strength-list  { display: flex; flex-direction: column; gap: var(--space-3); margin-top: var(--space-2); }
  .strength-item  { display: flex; flex-direction: column; gap: 6px; }
  .strength-header { display: flex; align-items: center; justify-content: space-between; }
  .strength-name  { font-size: 0.8rem; font-weight: 600; color: var(--grey-800); display: flex; align-items: center; gap: 6px; }
  .strength-tag   { font-size: 0.6rem; font-weight: 700; padding: 1px 7px; border-radius: 6px; text-transform: uppercase; letter-spacing: 0.3px; }
  .tag-strong { background: var(--green-dim); color: var(--green); }
  .tag-avg    { background: var(--gold-dim);  color: #b37700; }
  .tag-weak   { background: var(--red-dim);   color: var(--red); }
  .strength-pct { font-family: var(--font-display); font-size: 0.88rem; font-weight: 700; }
  .bar-class { height: var(--js-height, 0%); min-height: var(--js-min-height, 0px); }
  .bar-track { height: 7px; background: var(--grey-100); border-radius: 10px; overflow: hidden; }
  .bar-fill  { height: 100%; border-radius: 10px; width: var(--js-width, 0%); transition: width 1.4s ease-out; }
  .bar-fill.teal  { background: linear-gradient(90deg, var(--teal), #00d4b8); }
  .bar-fill.gold  { background: linear-gradient(90deg, var(--amber), var(--gold)); }
  .bar-fill.green { background: linear-gradient(90deg, #16a34a, var(--green)); }
  .bar-fill.red   { background: linear-gradient(90deg, #dc2626, var(--red)); }
  .bar-fill.slate { background: linear-gradient(90deg, var(--slate-600), var(--slate-400)); }
  .strength-sub   { font-size: 0.67rem; color: var(--grey-400); }

  /* Quick actions */
  .quick-actions { display: flex; gap: var(--space-3); margin-bottom: var(--space-5); flex-wrap: wrap; }
  .qa-card { flex: 1; min-width: 180px; background: var(--white); border: 1.5px solid var(--grey-200); border-radius: var(--radius); padding: var(--space-4) 18px; display: flex; align-items: center; gap: var(--space-3); cursor: pointer; text-decoration: none; color: var(--grey-800); transition: all var(--transition-fast); box-shadow: var(--shadow-sm); }
  .qa-card:hover { border-color: var(--teal); background: rgba(0,191,166,0.02); transform: translateY(-2px); box-shadow: var(--shadow-md); }
  .qa-card:focus-visible { outline-offset: -2px; }
  .qa-icon { width: 40px; height: 40px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 1.15rem; flex-shrink: 0; }
  .qa-icon.teal { background: var(--teal-dim); } .qa-icon.gold { background: var(--gold-dim); } .qa-icon.blue { background: rgba(59,130,246,0.1); }
  .qa-info  { flex: 1; }
  .qa-title { font-size: 0.84rem; font-weight: 700; color: var(--grey-800); }
  .qa-sub   { font-size: 0.7rem; color: var(--grey-400); margin-top: 2px; }
  .qa-arrow { font-size: 1rem; color: var(--grey-300); transition: color var(--transition-fast), transform var(--transition-fast); }
  .qa-card:hover .qa-arrow { color: var(--teal); transform: translateX(3px); }

  /* Empty state */
  .empty-state { text-align: center; padding: var(--space-8) var(--space-4); color: var(--grey-400); }
  .empty-state-icon { font-size: 2rem; margin-bottom: var(--space-2); }
  .empty-state-text { font-size: 0.84rem; }

  /* Toast — scoped to #dashboard-toast ID (avoids core-ui.css .toast collision) */
  #dashboard-toast { position: fixed; bottom: var(--space-6); right: var(--space-6); background: var(--slate-800); color: #fff; padding: var(--space-3) var(--space-5); border-radius: 10px; font-size: 0.82rem; font-weight: 500; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: var(--space-2); z-index: 9999; transform: translateY(80px); opacity: 0; transition: transform var(--transition-medium), opacity var(--transition-medium); border-left: 3px solid var(--teal); max-width: 360px; }
  #dashboard-toast.show { transform: translateY(0); opacity: 1; }
  .toast-icon { font-size: 1rem; flex-shrink: 0; }

  /* Hamburger */
  .hamburger { display: none; background: none; border: none; cursor: pointer; font-size: 1.3rem; color: var(--grey-600); padding: 4px; min-height: 40px; min-width: 40px; }
  .hamburger:focus-visible { outline-offset: -2px; }

  /* ── My Attempts view ── */
  .atp-toolbar { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-3); flex-wrap: wrap; }
  .atps-search { flex: 1; min-width: 200px; padding: 9px 14px; border: 1.5px solid var(--grey-200); border-radius: 8px; font-family: var(--font-body); font-size: 0.82rem; color: var(--grey-800); background: var(--white); outline: none; transition: border-color var(--transition-fast), box-shadow var(--transition-fast); }
  .atps-search:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0,191,166,0.12); }
  .atps-filters { display: flex; gap: 6px; flex-wrap: wrap; }
  .atps-pill { padding: 6px 14px; border: 1.5px solid var(--grey-200); border-radius: 20px; background: transparent; font-family: var(--font-body); font-size: 0.75rem; font-weight: 600; color: var(--grey-600); cursor: pointer; transition: all var(--transition-fast); min-height: 36px; }
  .atps-pill:hover { border-color: var(--teal); color: var(--teal); }
  .atps-pill.active { background: var(--teal-dim); border-color: var(--teal); color: var(--teal); }
  .atps-pill:focus-visible { outline-offset: -2px; }
  .atps-table-head { display: grid; grid-template-columns: 1fr 110px 80px 60px 130px; gap: var(--space-2); padding: var(--space-2) var(--space-4); background: var(--grey-50); border-bottom: 1px solid var(--grey-200); font-size: 0.68rem; font-weight: 700; color: var(--grey-400); text-transform: uppercase; letter-spacing: 0.5px; }
  .atps-row { display: grid; grid-template-columns: 1fr 110px 80px 60px 130px; gap: var(--space-2); align-items: center; padding: 11px var(--space-4); border-bottom: 1px solid var(--grey-100); cursor: pointer; transition: background var(--transition-fast); }
  .atps-row:last-child { border-bottom: none; }
  .atps-row:hover { background: var(--grey-50); }
  .atps-row:focus-visible { outline-offset: -2px; }
  .atps-exam { display: flex; align-items: center; gap: var(--space-2); min-width: 0; }
  .atps-icon { width: 30px; height: 30px; border-radius: 7px; display: flex; align-items: center; justify-content: center; font-size: 0.82rem; flex-shrink: 0; }
  .atps-name { font-size: 0.82rem; font-weight: 600; color: var(--grey-800); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .atps-date { font-size: 0.75rem; color: var(--grey-400); }
  .atps-score { font-family: var(--font-display); font-size: 0.9rem; font-weight: 800; text-align: right; }
  .atps-pct { font-size: 0.78rem; font-weight: 600; text-align: right; }
  .atps-actions { display: flex; gap: var(--space-1); justify-content: flex-end; }
  .atps-empty { text-align: center; padding: var(--space-8) var(--space-4); color: var(--grey-400); font-size: 0.84rem; }

  /* ── Analytics view ── */
  .an-kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3); margin-bottom: var(--space-4); }
  .an-kpi { background: var(--white); border: 1px solid var(--grey-200); border-radius: var(--radius); padding: var(--space-4) 18px; box-shadow: var(--shadow-sm); transition: box-shadow var(--transition-fast); }
  .an-kpi:hover { box-shadow: var(--shadow-md); }
  .an-kpi-label { font-size: 0.68rem; font-weight: 700; color: var(--grey-400); text-transform: uppercase; letter-spacing: 0.5px; }
  .an-kpi-value { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; color: var(--grey-800); margin: 4px 0 2px; line-height: 1; }
  .an-kpi-sub { font-size: 0.68rem; color: var(--grey-400); }
  .an-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
  .an-section-row { display: flex; flex-direction: column; gap: 5px; }
  .an-section-head { display: flex; justify-content: space-between; align-items: center; }
  .an-section-name { font-size: 0.8rem; font-weight: 600; color: var(--grey-800); }
  .an-section-pct { font-family: var(--font-display); font-size: 0.82rem; font-weight: 700; }
  .an-series-row { display: flex; align-items: center; gap: var(--space-3); }
  .an-series-name { font-size: 0.8rem; font-weight: 600; color: var(--grey-800); width: 180px; flex-shrink: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .an-series-bar-track { flex: 1; height: 8px; background: var(--grey-100); border-radius: 10px; overflow: hidden; }
  .an-series-bar-fill { height: 100%; border-radius: 10px; width: var(--js-width, 0%); background: linear-gradient(90deg, var(--teal), #00d4b8); transition: width 1s ease-out; }
  .an-series-count { font-size: 0.75rem; font-weight: 700; color: var(--grey-600); width: 26px; text-align: right; flex-shrink: 0; }

  /* Empty States & Utilities */
  .kpi-empty-wrap { display: flex; align-items: center; gap: var(--space-3); grid-column: span 4; padding: var(--space-4); color: var(--grey-600); font-weight: 500; font-size: 0.85rem; }
  .kpi-empty-icon { font-size: 1.5rem; }
  .sec-empty-state { text-align: center; padding: var(--space-4); color: var(--grey-400); font-size: 0.8rem; }
  
  /* Color utilities for JS injection */
  .color-teal { color: var(--teal); }
  .color-green { color: var(--green); }
  .color-amber { color: var(--amber); }
  .color-red { color: var(--red); }
  .color-grey-400 { color: var(--grey-400); }

  /* Score Distribution Histogram */
  .an-dist-wrap { display: flex; align-items: flex-end; justify-content: space-around; height: 140px; margin-top: var(--space-4); border-bottom: 1px solid var(--grey-200); padding-bottom: 4px; }
  .an-dist-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; width: 32px; height: 100%; gap: 4px; }
  .an-dist-count { font-size: 0.65rem; font-weight: 700; color: var(--grey-500); }
  .an-dist-bar { width: 100%; background: var(--teal); border-radius: 4px 4px 0 0; transition: height 1s ease-out; height: var(--js-height, 0%); min-height: var(--js-min-height, 0px); opacity: 0.85; }
  .an-dist-bar:hover { opacity: 1; }
  .an-dist-labels { display: flex; justify-content: space-around; margin-top: 6px; }
  .an-dist-lbl { font-size: 0.65rem; font-weight: 600; color: var(--grey-400); width: 40px; text-align: center; }

  /* WebSocket status */
  .ws-status { display: none; align-items: center; gap: var(--space-2); font-size: 0.72rem; color: var(--grey-400); padding: 4px var(--space-3); border-radius: 12px; background: var(--grey-100); border: 1px solid var(--grey-200); }
  .ws-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--grey-400); transition: background var(--transition-fast); }
  .ws-dot.online { background: var(--green); box-shadow: 0 0 6px var(--green); }
  .ws-dot.offline { background: var(--red); }
  .ts-pdf-hidden { display: none !important; }
  .ts-pdf-nomar  { margin-left: 0 !important; }

  /* High contrast support */
  @media (prefers-contrast: more) {
    .btn, .r-tab, .filter-btn, .atps-pill, .cf-btn, .qa-card { border-width: 2px !important; }
    .stat-card::after { width: 4px; }
    .card, .qa-card, .upcoming-item, .attempt-row, .atps-row { border: 2px solid #000; }
  }

  @media (max-width: 1100px) { .stats-row { grid-template-columns: repeat(2,1fr); } .main-grid { grid-template-columns: 1fr; } .bottom-grid { grid-template-columns: 1fr; } .an-kpi-row { grid-template-columns: repeat(2,1fr); } .an-grid { grid-template-columns: 1fr; } }
  @media (max-width: 768px) { .sidebar { transform: translateX(-100%); } .sidebar.open { transform: translateX(0); } .main { margin-left: 0; } .hamburger { display: block; } .stats-row { grid-template-columns: repeat(2,1fr); } .page-body { padding: var(--space-4); } .atps-table-head { grid-template-columns: 1fr 80px 60px auto; } .atps-table-head span:nth-child(2) { display: none; } .atps-row { grid-template-columns: 1fr 80px 60px auto; } .atps-row > .atps-date { display: none; } .an-kpi-row { grid-template-columns: repeat(2,1fr); } }
  @media (max-width: 480px) { .stats-row { grid-template-columns: 1fr; } .quick-actions { flex-direction: column; } .an-kpi-row { grid-template-columns: 1fr 1fr; } }
  /* Keeps element in the DOM for flexbox alignment, but hides the text */
.text-hidden { visibility: hidden; }
