/* IlmPact CLP Dashboard — Stylesheet */
:root {
  --bg: #0a0e1a; --bg2: #111827; --bg3: #1a2235; --bg4: #1e2d45;
  --border: rgba(255,255,255,0.08); --border2: rgba(255,255,255,0.14);
  --text: #e2e8f0; --text2: #94a3b8; --text3: #64748b;
  --accent: #3b82f6; --accent2: #60a5fa;
  --green: #10b981; --green-bg: rgba(16,185,129,0.12); --green-bd: rgba(16,185,129,0.3);
  --red: #ef4444; --red-bg: rgba(239,68,68,0.12); --red-bd: rgba(239,68,68,0.3);
  --yellow: #f59e0b; --yel-bg: rgba(245,158,11,0.12); --yel-bd: rgba(245,158,11,0.3);
  --gray: #64748b; --gray-bg: rgba(100,116,139,0.12); --gray-bd: rgba(100,116,139,0.3);
  --purple: #8b5cf6; --orange: #f97316;
  --sidebar-w: 270px; --radius: 12px; --shadow: 0 4px 24px rgba(0,0,0,0.4);
}
[data-theme="light"] {
  --bg: #f0f4ff; --bg2: #ffffff; --bg3: #f8fafc; --bg4: #e2e8f0;
  --border: rgba(0,0,0,0.08); --border2: rgba(0,0,0,0.14);
  --text: #1e293b; --text2: #475569; --text3: #94a3b8;
  --shadow: 0 4px 24px rgba(0,0,0,0.1);
}
[data-theme="aurora"] {
  --bg: #080b1a; --bg2: #0d1229; --bg3: #111a35; --bg4: #162040;
  --border: rgba(120,80,255,0.15); --border2: rgba(120,80,255,0.25);
  --text: #e0e7ff; --text2: #a5b4fc; --text3: #6366f1;
  --accent: #8b5cf6; --accent2: #a78bfa;
}
[data-theme="emerald"] {
  --bg: #051008; --bg2: #0a1e0d; --bg3: #0f2a14; --bg4: #153520;
  --border: rgba(16,185,129,0.15); --border2: rgba(16,185,129,0.25);
  --text: #d1fae5; --text2: #6ee7b7; --text3: #34d399;
  --accent: #10b981; --accent2: #34d399;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'DM Sans', sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; overflow-x: hidden; transition: background 0.3s, color 0.3s; }

/* LAYOUT */
#app { display: flex; min-height: 100vh; }
#sidebar { width: var(--sidebar-w); background: var(--bg2); border-right: 1px solid var(--border); position: fixed; top: 0; left: 0; height: 100vh; overflow-y: auto; z-index: 100; display: flex; flex-direction: column; transition: transform 0.3s; }
#sidebar.collapsed { transform: translateX(-100%); }
#main { margin-left: var(--sidebar-w); flex: 1; min-width: 0; transition: margin 0.3s; }
#main.expanded { margin-left: 0; }

/* SIDEBAR */
.sb-logo { padding: 18px 18px 14px; border-bottom: 1px solid var(--border); }
.sb-logo-title { font-size: 17px; font-weight: 700; background: linear-gradient(135deg, #3b82f6, #10b981); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.sb-logo-sub { font-size: 11px; color: var(--text3); margin-top: 2px; letter-spacing: 0.4px; }
.filter-scroll { flex: 1; overflow-y: auto; padding: 14px 14px 0; }
.filter-section-title { font-size: 10px; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: 0.7px; margin: 12px 0 6px; display: flex; justify-content: space-between; align-items: center; }
.filter-section-title:first-child { margin-top: 0; }
.filter-group { margin-bottom: 10px; }
.ms-wrap { position: relative; }
.ms-btn { width: 100%; background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-family: inherit; font-size: 12px; padding: 7px 10px; text-align: left; cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: border-color 0.2s; }
.ms-btn:hover, .ms-btn.open { border-color: var(--border2); }
.ms-dropdown { position: absolute; top: calc(100% + 3px); left: 0; right: 0; background: var(--bg2); border: 1px solid var(--border2); border-radius: 9px; max-height: 200px; overflow-y: auto; z-index: 300; display: none; box-shadow: var(--shadow); }
.ms-dropdown.open { display: block; }
.ms-opt { padding: 7px 11px; font-size: 12px; cursor: pointer; display: flex; align-items: center; gap: 8px; transition: background 0.15s; }
.ms-opt:hover { background: var(--bg3); }
.ms-opt input[type=checkbox] { width: 13px; height: 13px; accent-color: var(--accent); cursor: pointer; flex-shrink: 0; }
.ms-search { padding: 7px 10px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--bg2); }
.ms-search input { width: 100%; background: var(--bg3); border: 1px solid var(--border); border-radius: 6px; color: var(--text); font-family: inherit; font-size: 11px; padding: 5px 8px; outline: none; }
input[type=text], select { width: 100%; background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-family: inherit; font-size: 12px; padding: 7px 10px; outline: none; transition: border-color 0.2s; }
input[type=text]:focus, select:focus { border-color: var(--accent); }
select option { background: var(--bg2); }
.toggle-row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text2); margin-bottom: 7px; cursor: pointer; }
.tog { width: 34px; height: 19px; background: var(--bg4); border-radius: 10px; cursor: pointer; position: relative; transition: background 0.2s; flex-shrink: 0; }
.tog.on { background: var(--accent); }
.tog::after { content: ''; position: absolute; top: 2.5px; left: 2.5px; width: 14px; height: 14px; background: #fff; border-radius: 50%; transition: transform 0.2s; }
.tog.on::after { transform: translateX(15px); }
.sb-footer { padding: 14px; border-top: 1px solid var(--border); margin-top: auto; }
.btn { display: inline-flex; align-items: center; gap: 5px; padding: 7px 13px; border-radius: 8px; font-family: inherit; font-size: 12px; font-weight: 500; cursor: pointer; border: none; transition: all 0.2s; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { filter: brightness(1.1); }
.btn-outline { background: transparent; border: 1px solid var(--border2); color: var(--text2); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 5px 10px; font-size: 11px; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: rgba(59,130,246,0.15); border: 1px solid rgba(59,130,246,0.3); color: var(--accent2); border-radius: 20px; font-size: 10px; padding: 2px 7px; cursor: pointer; }
.chip:hover { background: rgba(59,130,246,0.25); }
.theme-pills { display: flex; gap: 4px; }
.tpill { width: 18px; height: 18px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; transition: transform 0.2s, border-color 0.2s; }
.tpill:hover { transform: scale(1.15); }
.tpill.active { border-color: var(--text); }
.tpill[data-t="dark"]    { background: radial-gradient(#1e293b, #0a0e1a); }
.tpill[data-t="light"]   { background: radial-gradient(#fff, #e2e8f0); }
.tpill[data-t="aurora"]  { background: radial-gradient(#8b5cf6, #080b1a); }
.tpill[data-t="emerald"] { background: radial-gradient(#10b981, #051008); }

/* TOPBAR */
#topbar { background: var(--bg2); border-bottom: 1px solid var(--border); padding: 0 20px; height: 56px; display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 50; }
.topbar-title { font-size: 15px; font-weight: 600; }
.topbar-sub { font-size: 12px; color: var(--text3); font-weight: 400; }
.active-chips { display: flex; flex-wrap: wrap; gap: 5px; flex: 1; }
#content { padding: 20px; max-width: 1600px; }

/* TABS */
.tabs { display: flex; gap: 2px; background: var(--bg3); border-radius: 10px; padding: 3px; margin-bottom: 22px; }
.tab { flex: 1; padding: 7px 10px; text-align: center; font-size: 12px; font-weight: 500; border-radius: 8px; cursor: pointer; color: var(--text3); transition: all 0.2s; border: none; background: transparent; font-family: inherit; }
.tab.active { background: var(--bg2); color: var(--text); box-shadow: 0 1px 6px rgba(0,0,0,0.2); }

/* KPI */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 10px; margin-bottom: 22px; }
.kpi { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; position: relative; overflow: hidden; transition: transform 0.2s, border-color 0.2s; }
.kpi:hover { transform: translateY(-2px); border-color: var(--border2); }
.kpi::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--kpi-c, var(--accent)); }
.kpi.green { --kpi-c: var(--green); } .kpi.red { --kpi-c: var(--red); } .kpi.yellow { --kpi-c: var(--yellow); }
.kpi.gray { --kpi-c: var(--gray); } .kpi.blue { --kpi-c: var(--accent); } .kpi.orange { --kpi-c: var(--orange); }
.kpi-label { font-size: 10px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.kpi-value { font-size: 26px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: 11px; color: var(--text2); margin-top: 3px; }
.prog-bar { height: 3px; background: var(--bg4); border-radius: 2px; overflow: hidden; margin-top: 7px; }
.prog-fill { height: 100%; border-radius: 2px; transition: width 0.6s ease; }

/* SUBJECT CARDS */
.subj-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 22px; }
.subj-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.subj-title { font-size: 13px; font-weight: 600; margin-bottom: 14px; display: flex; align-items: center; gap: 7px; }
.subj-icon { width: 28px; height: 28px; border-radius: 7px; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.subj-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.subj-stat { background: var(--bg3); border-radius: 7px; padding: 10px; }
.subj-stat-lbl { font-size: 10px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.4px; }
.subj-stat-val { font-size: 17px; font-weight: 700; margin-top: 2px; }

/* TIMELINE BADGE */
.timeline-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 20px; font-size: 10px; font-weight: 600; background: rgba(59,130,246,0.1); border: 1px solid rgba(59,130,246,0.25); color: var(--accent2); margin-bottom: 14px; }

/* CHART CARDS */
.chart-grid { display: grid; gap: 14px; margin-bottom: 22px; }
.cg2 { grid-template-columns: repeat(2, 1fr); }
.cg3 { grid-template-columns: repeat(3, 1fr); }
.chart-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.chart-title { font-size: 12px; font-weight: 600; color: var(--text); margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; }
.chart-title .sub { font-size: 10px; color: var(--text3); font-weight: 400; }

/* BADGES */
.badge { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 20px; font-size: 10px; font-weight: 600; }
.bi { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-bd); }
.bd { background: var(--red-bg); color: var(--red); border: 1px solid var(--red-bd); }
.bs { background: var(--yel-bg); color: var(--yellow); border: 1px solid var(--yel-bd); }
.bm { background: var(--gray-bg); color: var(--gray); border: 1px solid var(--gray-bd); }

/* TABLE */
.tbl-wrap { overflow: auto; border-radius: var(--radius); border: 1px solid var(--border); max-height: 560px; }
table { width: 100%; border-collapse: collapse; font-size: 11px; min-width: 1100px; }
thead th { background: var(--bg3); padding: 9px 11px; text-align: left; font-size: 10px; font-weight: 600; color: var(--text2); text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--border); white-space: nowrap; cursor: pointer; position: sticky; top: 0; z-index: 10; user-select: none; }
thead th:hover { background: var(--bg4); }
thead th.sorted { color: var(--accent); }
tbody tr { border-bottom: 1px solid var(--border); transition: background 0.1s; cursor: pointer; }
tbody tr:hover { background: var(--bg3); }
tbody tr.ri td:first-child { border-left: 3px solid var(--green); }
tbody tr.rd td:first-child { border-left: 3px solid var(--red); }
tbody tr.rs td:first-child { border-left: 3px solid var(--yellow); }
tbody tr.rm td:first-child { border-left: 3px solid var(--gray); }
td { padding: 8px 11px; white-space: nowrap; }
.tbl-ctrl { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.pagination { display: flex; align-items: center; gap: 7px; margin-top: 10px; justify-content: space-between; }
.pg-btn { background: var(--bg3); border: 1px solid var(--border); color: var(--text2); padding: 4px 10px; border-radius: 6px; cursor: pointer; font-size: 11px; font-family: inherit; transition: all 0.2s; }
.pg-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.pg-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.pg-info { font-size: 11px; color: var(--text3); }

/* LEADERBOARD */
.lb-list { display: flex; flex-direction: column; gap: 5px; }
.lb-row { background: var(--bg3); border-radius: 7px; padding: 9px 12px; display: flex; align-items: center; gap: 9px; font-size: 11px; }
.lb-rank { font-weight: 700; color: var(--text3); width: 18px; text-align: right; flex-shrink: 0; }
.lb-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.lb-bar-w { width: 70px; flex-shrink: 0; }
.lb-bar { height: 5px; background: var(--border); border-radius: 3px; overflow: hidden; }
.lb-bar-f { height: 100%; border-radius: 3px; transition: width 0.4s; }
.lb-pct { font-size: 10px; width: 32px; text-align: right; flex-shrink: 0; }

/* INSIGHTS */
.ins-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.ins-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; display: flex; gap: 10px; align-items: flex-start; }
.ins-icon { font-size: 20px; flex-shrink: 0; margin-top: 1px; }
.ins-text { font-size: 12px; color: var(--text2); line-height: 1.5; }
.ins-text strong { color: var(--text); }

/* SECTION */
.section { margin-bottom: 22px; }
.section-title { font-size: 14px; font-weight: 600; margin-bottom: 12px; display: flex; align-items: center; gap: 7px; }
.section-badge { font-size: 10px; background: var(--bg3); border: 1px solid var(--border); color: var(--text2); padding: 2px 7px; border-radius: 20px; }

/* DRAWER */
#drw-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 400; display: none; backdrop-filter: blur(2px); }
#drw-overlay.open { display: block; }
#drawer { position: fixed; top: 0; right: -500px; width: 490px; height: 100vh; background: var(--bg2); border-left: 1px solid var(--border); z-index: 401; overflow-y: auto; transition: right 0.3s; padding: 22px; }
#drawer.open { right: 0; }
.drw-hdr { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.drw-close { background: var(--bg3); border: none; color: var(--text2); width: 30px; height: 30px; border-radius: 7px; cursor: pointer; font-size: 15px; display: flex; align-items: center; justify-content: center; }
.student-card { background: var(--bg3); border-radius: 10px; padding: 14px; margin-bottom: 14px; }
.student-uid { font-size: 16px; font-weight: 700; margin-bottom: 4px; font-family: 'Space Mono', monospace; }
.meta-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.meta-tag { background: var(--bg4); border-radius: 5px; padding: 2px 7px; font-size: 10px; color: var(--text2); }
.assessment-row { background: var(--bg3); border-radius: 10px; padding: 14px; margin-bottom: 10px; }
.assessment-title { font-size: 12px; font-weight: 600; margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; }
.three-way { display: flex; align-items: center; gap: 6px; font-size: 11px; flex-wrap: wrap; }
.lvl-box { background: var(--bg4); border-radius: 5px; padding: 3px 9px; font-size: 11px; font-weight: 500; }
.lvl-box.baseline { border: 1px solid var(--border); }
.lvl-box.midline { border: 1px solid rgba(59,130,246,0.4); color: var(--accent2); }
.lvl-box.endline { border: 1px solid rgba(16,185,129,0.4); color: var(--green); }
.arrow-sep { color: var(--text3); font-size: 10px; }
.no-endline { font-size: 10px; color: var(--text3); font-style: italic; }

/* CHATBOT */
#chat-fab { position: fixed; bottom: 24px; right: 24px; z-index: 300; width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--green)); border: none; cursor: pointer; box-shadow: 0 4px 20px rgba(59,130,246,0.5); display: flex; align-items: center; justify-content: center; font-size: 22px; transition: transform 0.2s, box-shadow 0.2s; }
#chat-fab:hover { transform: scale(1.1); box-shadow: 0 6px 28px rgba(59,130,246,0.7); }
#chat-panel { position: fixed; bottom: 88px; right: 24px; width: 400px; max-width: calc(100vw - 40px); height: 560px; max-height: calc(100vh - 110px); background: var(--bg2); border: 1px solid var(--border2); border-radius: 18px; box-shadow: 0 20px 60px rgba(0,0,0,0.5); z-index: 300; display: flex; flex-direction: column; transform: scale(0.92) translateY(20px); opacity: 0; pointer-events: none; transition: all 0.25s cubic-bezier(0.34,1.56,0.64,1); transform-origin: bottom right; }
#chat-panel.open { transform: scale(1) translateY(0); opacity: 1; pointer-events: all; }
.chat-hdr { padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 9px; flex-shrink: 0; border-radius: 18px 18px 0 0; background: linear-gradient(135deg, rgba(59,130,246,0.1), rgba(16,185,129,0.07)); }
.chat-av { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--green)); display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.chat-hdr-info { flex: 1; }
.chat-hdr-name { font-size: 13px; font-weight: 700; }
.chat-hdr-status { font-size: 10px; color: var(--green); display: flex; align-items: center; gap: 3px; }
.online-dot { width: 5px; height: 5px; background: var(--green); border-radius: 50%; animation: pulse 2s infinite; }
.chat-close-btn { background: none; border: none; color: var(--text3); cursor: pointer; font-size: 16px; padding: 3px; border-radius: 5px; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.cmsg { display: flex; gap: 7px; align-items: flex-start; animation: fadeUp 0.3s ease; }
.cmsg.user { flex-direction: row-reverse; }
.cmsg-av { width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; }
.cmsg-av.ai { background: linear-gradient(135deg, var(--accent), var(--green)); }
.cmsg-av.user { background: var(--bg4); font-size: 10px; color: var(--text2); }
.cmsg-bbl { max-width: 84%; padding: 9px 13px; border-radius: 13px; font-size: 12px; line-height: 1.55; }
.cmsg.ai .cmsg-bbl { background: var(--bg3); border: 1px solid var(--border); border-radius: 3px 13px 13px 13px; }
.cmsg.user .cmsg-bbl { background: linear-gradient(135deg, var(--accent), #2563eb); color: #fff; border-radius: 13px 3px 13px 13px; }
.cmsg-bbl strong { font-weight: 600; }
.typing-ind { display: flex; gap: 3px; align-items: center; padding: 9px 13px; background: var(--bg3); border-radius: 3px 13px 13px 13px; width: fit-content; }
.tdot { width: 6px; height: 6px; background: var(--text3); border-radius: 50%; animation: tb 1.2s infinite; }
.tdot:nth-child(2) { animation-delay: 0.2s; } .tdot:nth-child(3) { animation-delay: 0.4s; }
.chat-suggs { padding: 7px 14px; display: flex; flex-wrap: wrap; gap: 5px; border-top: 1px solid var(--border); flex-shrink: 0; max-height: 120px; overflow-y: auto; }
.sugg { background: var(--bg3); border: 1px solid var(--border); color: var(--text2); border-radius: 20px; padding: 4px 10px; font-size: 10px; cursor: pointer; transition: all 0.2s; font-family: inherit; white-space: nowrap; }
.sugg:hover { border-color: var(--accent); color: var(--accent); background: rgba(59,130,246,0.08); }
.chat-input-area { padding: 10px 14px; border-top: 1px solid var(--border); display: flex; gap: 7px; align-items: flex-end; flex-shrink: 0; }
#chat-input { flex: 1; background: var(--bg3); border: 1px solid var(--border); border-radius: 10px; color: var(--text); font-family: inherit; font-size: 12px; padding: 9px 12px; outline: none; resize: none; max-height: 90px; min-height: 36px; transition: border-color 0.2s; line-height: 1.4; }
#chat-input:focus { border-color: var(--accent); }
#chat-send { width: 34px; height: 34px; border-radius: 8px; background: linear-gradient(135deg, var(--accent), var(--green)); border: none; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 14px; align-self: flex-end; transition: opacity 0.2s; }
#chat-send:disabled { opacity: 0.4; cursor: not-allowed; }
.report-card { background: var(--bg2); border: 1px solid var(--border2); border-radius: 10px; padding: 13px; margin-top: 7px; font-size: 11px; }
.rc-title { font-size: 12px; font-weight: 700; margin-bottom: 8px; }
.rc-row { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; border-bottom: 1px solid var(--border); }
.rc-row:last-child { border-bottom: none; }
.rc-lbl { color: var(--text3); } .rc-val { font-weight: 600; }

/* LOADING */
#loading { position: fixed; inset: 0; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 999; transition: opacity 0.5s; }
#loading.hidden { opacity: 0; pointer-events: none; }
.ld-title { font-size: 26px; font-weight: 700; background: linear-gradient(135deg, #3b82f6, #10b981); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; margin-bottom: 6px; }
.ld-sub { font-size: 12px; color: var(--text3); margin-bottom: 28px; }
.ld-bar { width: 280px; height: 4px; background: var(--bg3); border-radius: 2px; overflow: hidden; }
.ld-fill { height: 100%; background: linear-gradient(90deg, #3b82f6, #10b981); border-radius: 2px; animation: ldanim 2s ease forwards; }

/* ANIMATIONS */
@keyframes ldanim { from { width: 0; } to { width: 100%; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes tb { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-7px); } }
.fade-up { animation: fadeUp 0.35s ease forwards; }

/* SCROLLBAR */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 3px; }

/* RESPONSIVE */
@media (max-width: 768px) {
  #sidebar { transform: translateX(-100%); }
  #sidebar.open { transform: translateX(0); }
  #main { margin-left: 0; }
  .subj-grid, .cg2, .cg3 { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
