/* NOYA unified visual system — loaded after every page stylesheet */
:root {
  --primary:#C95F2D; --primary-dark:#AD4F24; --primary-soft:#F5E4DF;
  --primary-ring:rgba(217,95,64,.12); --bg:#FAF9F4;
  --surface:#FFFFFF; --surface-2:#F4F0E8; --ink:#123C35;
  --ink-soft:#536A66; --muted:#74817E; --line:rgba(7,61,58,.10);
  --success:#2F8468; --success-soft:#E8F1EA;
  --danger:#B84D43; --danger-soft:#F5DEDA;
  --warn:#B87432; --warn-soft:#F5E8D8;
  --purple:#247A63; --purple-soft:#E8F1EA;
  --sidebar:260px; --topbar-h:72px;
  --radius-sm:10px; --radius:16px; --radius-xl:20px;
  --shadow:0 6px 24px rgba(15,55,50,.04);
}
html { background:#FAF9F4; scroll-behavior:smooth; }
body { background:#FAF9F4; color:#123C35; font-weight:400; line-height:1.8; }
button,input,textarea,select { font-family:inherit; }
::selection { background:#D8E8E1; color:#123C35; }
.icon svg { stroke-width:1.8; }

/* App shell */
.layout { background:#FAF9F4; }
.sidebar {
  width:260px; background:#123C35; color:rgba(255,255,255,.78);
  border:0; box-shadow:none; overflow:hidden;
}
.main { margin-right:260px; background:#FAF9F4; }
.sidebar-header { min-height:126px; padding:20px 18px 12px; border-bottom:1px solid rgba(255,255,255,.07); }
.sidebar-brand { align-items:flex-start; gap:5px; text-align:right; }
.sidebar-logo-img { display:block; width:188px; height:70px; object-fit:contain; object-position:right center; }
.sidebar-name { color:rgba(255,255,255,.76); font-size:12px; font-weight:400; padding-right:4px; }
.sidebar-sub,.sidebar-logo { display:none; }
.sidebar-close-btn { color:rgba(255,255,255,.75); border-radius:10px; }
.sidebar-nav { padding:14px 12px 8px; overflow:auto; }
.sidebar-nav a {
  position:relative; min-height:48px; margin-bottom:4px; padding:11px 14px;
  border-radius:12px; color:rgba(255,255,255,.76); font-size:13px;
  font-weight:500; transition:background .18s,color .18s,transform .18s;
}
.sidebar-nav a:hover { background:rgba(255,255,255,.07); color:#fff; transform:translateX(-1px); }
.sidebar-nav a.active { background:rgba(255,255,255,.12); color:#fff; box-shadow:none; }
.sidebar-nav a.active::after {
  content:""; position:absolute; right:0; top:12px; bottom:12px;
  width:3px; border-radius:3px 0 0 3px; background:#C95F2D;
}
.sidebar-nav .icon,.sidebar-nav a:hover .icon,.sidebar-nav a.active .icon {
  width:20px; font-size:20px; color:currentColor;
}
.sidebar-manifesto {
  position:relative; min-height:120px; margin:6px 14px 10px; padding:16px;
  border:1px solid rgba(255,255,255,.07); border-radius:16px;
  overflow:hidden; color:rgba(255,255,255,.62); font-size:11px; line-height:1.9;
}
.sidebar-manifesto span { position:relative; z-index:2; }
.sidebar-manifesto b { color:#fff; font-weight:600; }
.sidebar-manifesto .motif-ring { position:absolute; border:1px solid rgba(255,255,255,.07); border-radius:50%; }
.motif-ring-one { width:100px; height:100px; left:-25px; bottom:-35px; }
.motif-ring-two { width:65px; height:65px; left:-8px; bottom:-18px; }
.sidebar-manifesto .motif-dot { position:absolute; width:8px; height:8px; left:28px; bottom:25px; border-radius:50%; background:#C95F2D; }
.sidebar-footer { padding:10px 12px 16px; border-top:1px solid rgba(255,255,255,.07); }
.sidebar-footer .who { display:flex; flex-direction:column; padding:8px 12px; color:rgba(255,255,255,.5); line-height:1.6; }
.sidebar-footer .who b { color:#fff; font-size:12px; font-weight:600; }
.sidebar-footer .who span { font-size:10px; }
.sidebar-footer a { min-height:42px; padding:9px 12px; border-radius:10px; color:rgba(255,255,255,.62); }
.sidebar-footer a:hover { color:#fff; background:rgba(217,95,64,.15); }
.sidebar-overlay { background:rgba(7,31,29,.55); backdrop-filter:blur(3px); }

/* Topbar */
.topbar {
  height:72px; padding:0 32px; background:#FFFFFF;
  border-bottom:1px solid rgba(7,61,58,.08); box-shadow:none; gap:24px;
}
.topbar-right,.topbar-left { min-width:220px; }
.topbar-context { display:flex; align-items:center; gap:8px; font-size:11px; color:#8B9693; white-space:nowrap; }
.topbar-context i { color:#B7C0BD; font-style:normal; }
.topbar-context b { color:#123C35; font-weight:600; }
.topbar-brand { color:#123C35; font-size:19px; font-weight:800; letter-spacing:.4px; }
.topbar-brand span { color:#C95F2D; }
.topbar-search {
  width:min(340px,32vw); height:44px; margin:auto; display:flex; align-items:center;
  gap:10px; padding:0 14px; background:#F1EFE9; border-radius:12px;
}
.topbar-search .icon { color:#74817E; font-size:18px; }
.topbar-search input {
  width:100%; height:auto; padding:0; border:0; outline:0; box-shadow:none;
  background:transparent; color:#123C35; font-size:12.5px;
}
.topbar-search input:focus { border:0; box-shadow:none; background:transparent; }
.topbar-search input::placeholder { color:#8A9693; }
.topbar-left { justify-content:flex-end; }
.topbar-notification {
  width:40px; height:40px; display:inline-flex; align-items:center; justify-content:center;
  border:0; background:transparent; color:#536A66; border-radius:11px; cursor:pointer;
}
.topbar-notification:hover { background:#F1EADF; color:#123C35; }
.topbar-notification .icon { font-size:19px; }
.topbar-user {
  min-width:0; gap:10px; padding:4px 6px 4px 10px; border:0; border-radius:12px;
  background:transparent; color:#123C35;
}
.topbar-avatar {
  width:38px; height:38px; border-radius:11px; display:flex; align-items:center;
  justify-content:center; background:#E8F1EA; color:#247A63; font-size:14px; font-weight:700;
}
.topbar-user-copy { display:flex; flex-direction:column; line-height:1.45; }
.topbar-user-copy b { font-size:12px; font-weight:600; color:#123C35; }
.topbar-user-copy small { font-size:10px; color:#74817E; }
.topbar-chevron { color:#98A4A1; font-size:13px; }
.menu-btn { border-radius:10px; color:#123C35; }
.menu-btn:hover { background:#F1EADF; }

/* Main content and hierarchy */
.content { max-width:1500px; padding:32px 36px 48px; }
.page-head { margin-bottom:24px; align-items:center; }
.page-head::before {
  content:"خانه  /"; width:100%; margin-bottom:-8px; color:#8A9693;
  font-size:11px; font-weight:400;
}
.page-head h1 { color:#123C35; font-size:28px; font-weight:800; letter-spacing:-.5px; line-height:1.45; }
.page-head p { margin-top:5px; color:#74817E; font-size:13.5px; font-weight:400; }
.page-head-actions { align-self:flex-end; }

/* Shared surfaces */
.card,details.collapse-card,.section-card,.edit-panel,.stat-card,.dash-card,.launch-card,
.note-item,.analysis-result,.wizard-card,.xl-panel,.xl-file,.dataset-box,.acad-subject {
  background:#FFFFFF; border:1px solid rgba(7,61,58,.08); border-radius:16px;
  box-shadow:0 6px 24px rgba(15,55,50,.04);
}
.card { margin-bottom:20px; overflow:hidden; }
.card:hover { box-shadow:0 9px 28px rgba(15,55,50,.055); }
.card-header { min-height:68px; padding:18px 22px; border-bottom:1px solid rgba(7,61,58,.07); }
.card-header h2 { color:#123C35; font-size:14px; font-weight:700; }
.card-header h2 .icon { color:#247A63; font-size:18px; }
.card-header .sub { color:#74817E; font-size:11.5px; font-weight:400; }
.card-body { padding:22px; }
.edit-panel { margin-bottom:10px; box-shadow:none; }
.edit-panel summary { min-height:68px; padding:14px 16px; }
.edit-panel-body { padding:18px; background:#FAF9F4; border-top-color:rgba(7,61,58,.08); }
.person-avatar { border-radius:12px; background:#E8F1EA; color:#247A63; }
.person-avatar.admin { background:#F5E8D8; color:#B87432; }
.person-avatar.both { background:#E8EEE8; color:#123C35; }
.person-name { color:#123C35; font-weight:700; }
.person-meta { color:#74817E; font-weight:400; }

/* Buttons */
.btn {
  min-height:42px; padding:9px 16px; border-radius:10px; font-weight:600;
  box-shadow:none; transition:background .16s,color .16s,border-color .16s,transform .16s;
}
.btn:hover { transform:translateY(-1px); }
.btn-primary { background:#C95F2D; color:#fff; border-color:#C95F2D; }
.btn-primary:hover { background:#AD4F24; border-color:#AD4F24; }
.btn-success { background:#123C35; color:#fff; border-color:#123C35; }
.btn-success:hover { background:#0C4944; }
.btn-outline { background:transparent; color:#247A63; border:1px solid #247A63; }
.btn-outline:hover { background:#E8F1EA; color:#123C35; border-color:#247A63; }
.btn-danger { background:#B84D43; border-color:#B84D43; }
.btn-sm { min-height:36px; padding:7px 13px; }
.btn-xs { min-height:31px; padding:5px 10px; }

/* Forms */
.form-group { margin-bottom:18px; }
label,.field-label { margin-bottom:7px; color:#123C35; font-size:12px; font-weight:600; }
input:not([type]),input[type=text],input[type=tel],input[type=email],input[type=password],input[type=search],
input[type=url],input[type=number],input[type=date],input[type=time],input[type=file],textarea,select {
  min-height:48px; padding:10px 14px; color:#123C35; background:#FFFFFF;
  border:1px solid rgba(7,61,58,.12); border-radius:10px; font-size:13px;
}
textarea { min-height:112px; line-height:1.9; }
input:focus,textarea:focus,select:focus {
  background:#FFFFFF; border-color:#247A63; box-shadow:0 0 0 3px rgba(29,91,83,.08); outline:0;
}
input::placeholder,textarea::placeholder { color:#9AA5A2; opacity:1; }
input[type=checkbox],input[type=radio] { accent-color:#247A63; }
input[name*=url],input[name*=api],input[name*=model],input[type=email],code { direction:ltr; text-align:left; }
.field-hint { margin-top:7px; color:#74817E; font-size:11px; font-weight:400; line-height:1.8; }
.form-row,.form-row-3 { gap:16px; }
.form-actions { margin-top:22px; gap:10px; }
.grade-checks label,.target-switch label,.permission-card,.scope-opt,.xl-card,.xl-type,.xl-pick {
  background:#FFFFFF; border-color:rgba(7,61,58,.11); border-radius:10px;
}
.grade-checks label:hover,.permission-card:hover,.scope-opt:hover,.xl-card:hover,.xl-type:hover,.xl-pick:hover {
  border-color:rgba(29,91,83,.4); background:#F9FBF8;
}
.access-section { background:#FAF9F4; border-color:rgba(7,61,58,.09); border-radius:14px; }
.permission-card:has(input:checked),.scope-opt:has(input:checked),.xl-card:has(input:checked),.xl-type:has(input:checked),.xl-pick.is-on {
  background:#EAF2EE; border-color:rgba(29,91,83,.35); box-shadow:0 0 0 2px rgba(29,91,83,.05);
}

/* Alerts and status */
.alert { padding:13px 16px; border:1px solid transparent; border-radius:12px; font-weight:500; }
.alert-success { background:#E8F1EA; color:#247A63; border-color:rgba(47,132,104,.1); }
.alert-warning { background:#F5E8D8; color:#9B622B; border-color:rgba(184,116,50,.1); }
.alert-danger { background:#F5DEDA; color:#B84D43; border-color:rgba(184,77,67,.1); }
.alert-info { background:#EDF2ED; color:#247A63; border-color:rgba(29,91,83,.1); }
.badge,.status-badge,.pending-badge,.xl-badge { padding:4px 10px; border-radius:999px; font-weight:600; }
.badge-green,.badge.transcribed,.xl-badge.is-green { background:#E8F1EA; color:#2F8468; }
.badge-amber,.badge.uploaded,.xl-badge.is-amber { background:#F5E8D8; color:#B87432; }
.badge-gray { background:#EEEDEA; color:#737B78; }
.badge-red,.badge.failed,.xl-badge.is-red,.status-badge.disabled { background:#F5DEDA; color:#B84D43; }

/* Tables */
.table-wrap { background:#FFFFFF; border:1px solid rgba(7,61,58,.08); border-radius:14px; }
table { background:#FFFFFF; }
th { height:48px; padding:12px 15px; background:#F4F0E8; color:#123C35; border-bottom:1px solid rgba(7,61,58,.08); font-weight:700; }
td { min-height:54px; padding:14px 15px; color:#536A66; border-bottom-color:rgba(7,61,58,.07); font-weight:400; }
tbody tr:hover td { background:#FAF7F1; }
.cell-strong { color:#123C35; font-weight:600; }
.pagination { border-top-color:rgba(7,61,58,.08); }
.page-btn { border:1px solid rgba(7,61,58,.10); border-radius:9px; background:#FFFFFF; color:#536A66; }
.page-btn:hover,.page-btn.active { background:#123C35; color:#fff; border-color:#123C35; }

/* Dashboard and launch cards */
.stats-row { grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; margin-bottom:24px; }
.stat-card { min-height:112px; padding:20px; gap:14px; }
.stat-card:hover,.dash-card:hover,.launch-card:hover { transform:translateY(-1px); box-shadow:0 10px 28px rgba(15,55,50,.06); }
.stat-icon,.dash-card-icon,.launch-icon { border-radius:13px; }
.stat-icon.blue,.dash-card-icon.blue,.launch-icon.blue { background:#E8F1EA; color:#247A63; }
.stat-icon.green,.dash-card-icon.green,.launch-icon.green { background:#E6F1EA; color:#2F8468; }
.stat-icon.purple,.dash-card-icon.purple,.launch-icon.purple { background:#F5E4DF; color:#C95F2D; }
.stat-icon.amber,.dash-card-icon.amber,.launch-icon.amber { background:#F5E8D8; color:#B87432; }
.stat-icon.red,.dash-card-icon.red,.launch-icon.red { background:#F5DEDA; color:#B84D43; }
.stat-value { color:#123C35; font-size:25px; font-weight:800; }
.stat-label { color:#74817E; font-size:11.5px; font-weight:500; }
.dash-cards,.launch-grid { gap:16px; }
.dash-card,.launch-card { min-height:158px; padding:22px; }
.dash-card h3,.launch-title { color:#123C35; font-weight:700; }
.dash-card p,.launch-desc { color:#74817E; font-weight:400; }
.dash-card-arrow,.launch-arrow { color:#C95F2D; font-weight:600; }

/* Notes and audio */
.notes-list { gap:12px; }
.note-item,.note-compact-item { padding:18px; background:#FFFFFF; border:1px solid rgba(7,61,58,.08); border-radius:14px; }
.note-item:hover,.note-compact-item:hover { box-shadow:0 7px 22px rgba(15,55,50,.05); }
.note-top,.note-compact-top { gap:12px; }
.note-who strong,.note-compact-who strong { color:#123C35; }
.note-text,.note-compact-text { color:#536A66; line-height:2; }
.note-time,.note-compact-foot { color:#74817E; }
.note-audio,.aplayer {
  background:#EAF2EE; border:1px solid rgba(29,91,83,.10); border-radius:13px;
}
.note-audio audio { accent-color:#247A63; }
.ap-toggle,.rec-toggle { background:#123C35; color:#fff; box-shadow:none; }
.ap-toggle:hover,.rec-toggle:hover { background:#0C4944; }
.ap-track,.bg-upload-track { background:#D6E4DD; }
.ap-progress,.bg-upload-bar { background:#C95F2D; }
.ap-time,.note-audio-dur { color:#536A66; }

/* Data entry and Excel */
.mode-switch { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:14px; padding:0; background:transparent; }
.mode-btn { min-height:92px; padding:18px; border:1px solid rgba(7,61,58,.09); border-radius:16px; background:#FFFFFF; box-shadow:var(--shadow); }
.mode-btn:hover { background:#FFFFFF; border-color:rgba(29,91,83,.25); }
.mode-btn.active { background:#123C35; border-color:#123C35; color:#fff; }
.mode-btn.active .mode-txt b,.mode-btn.active .mode-txt em { color:#fff; }
.mode-btn.active .mode-txt em { opacity:.7; }
.mode-ic { width:48px; height:48px; background:#E8F1EA; color:#247A63; border-radius:13px; }
.mode-btn.active .mode-ic { background:rgba(255,255,255,.12); color:#fff; }
.tab-switch { background:#F1EADF; border-radius:12px; padding:5px; }
.tab-btn { border-radius:9px; color:#536A66; }
.tab-btn.active { background:#FFFFFF; color:#123C35; box-shadow:0 3px 10px rgba(15,55,50,.06); }
/* نوار مشترک «یادداشت‌های تکی / تحلیل داده‌های گروهی» — همان گونهٔ .tab-switch بالا. */
.wizard-tabs {
  display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px;
  width:100%; margin:0 0 16px; padding:4px; border-radius:10px; background:#F1EADF;
}
.wizard-tab {
  display:flex; align-items:center; justify-content:center;
  min-width:0; min-height:38px; padding:7px 5px; border:0; border-radius:7px;
  background:transparent; color:var(--muted); text-decoration:none;
  font-size:11.5px; font-weight:500; line-height:1.5; text-align:center;
  transition:background .15s,color .15s,box-shadow .15s;
}
.wizard-tab:hover { background:transparent; color:var(--ink); }
.wizard-tab.active,.wizard-tab.active:hover { background:#FFFFFF; color:var(--primary-dark); box-shadow:0 1px 3px rgba(9,47,46,.07); }
.file-drop,.xl-drop { background:#FBF9F4; border:1.5px dashed rgba(29,91,83,.24); border-radius:15px; }
.file-drop:hover,.xl-drop:hover { background:#F2F7F3; border-color:#247A63; }
.file-drop .icon,.xl-drop-ic { color:#247A63; }
.rec { background:#FAF9F4; border:1px solid rgba(7,61,58,.08); border-radius:15px; }
.wizard-steps,.xl-steps { background:#F4F0E8; border-radius:14px; padding:14px; }
.wizard-num,.xl-step .xl-num { background:#E7E3DC; color:#74817E; border-color:transparent; }
.wizard-step.active .wizard-num,.xl-step.active .xl-num { background:#C95F2D; color:#fff; border-color:#C95F2D; }
.wizard-step.done .wizard-num,.xl-step.done .xl-num { background:#2F8468; color:#fff; border-color:#2F8468; }
.wizard-divider,.xl-line { background:rgba(7,61,58,.10); }
.xl-step.active .xl-label,.wizard-step.active .wizard-label { color:#123C35; }
.xl-panel,.xl-file,.xl-card,.xl-field,.xl-match,.xl-final { border-color:rgba(7,61,58,.09); }
.xl-kpi.is-green { background:#E8F1EA; color:#2F8468; }
.xl-kpi.is-amber { background:#F5E8D8; color:#B87432; }
.xl-kpi.is-red { background:#F5DEDA; color:#B84D43; }

/* Student profile and analysis workspace */
.tabs-nav { background:transparent; border-bottom:1px solid rgba(7,61,58,.10); border-radius:0; padding:0 4px; gap:6px; }
.tabs-nav .tab-btn { min-height:50px; padding:0 15px; background:transparent; border:0; border-bottom:2px solid transparent; border-radius:0; box-shadow:none; }
.tabs-nav .tab-btn:hover { background:#F1EADF; }
.tabs-nav .tab-btn.active { background:transparent; color:#123C35; border-bottom-color:#C95F2D; box-shadow:none; }
.tabs-nav .tab-btn.active .icon { color:#C95F2D; }
.dataset-box,.acad-subject,.acad-overview,.acad-compare { box-shadow:none; border-color:rgba(7,61,58,.08); }
.acad-bar { background:#E5E5DF; }
.acad-bar i,.acad-bar i.is-excellent,.acad-bar i.is-good { background:#2F8468; }
.acad-bar i.is-acceptable { background:#D49A4E; }
.acad-bar i.is-weak { background:#C95F2D; }
.analysis-result { border-top:3px solid #247A63; }
.analysis-result-head { background:#E8F1EA; color:#123C35; }
.analysis-result-head .icon { color:#247A63; }
.analysis-result-body { color:#354F4B; line-height:2.05; }
.prompt-chips { gap:8px; }
.chip { background:#FFFFFF; color:#247A63; border:1px solid rgba(29,91,83,.16); border-radius:999px; }
.chip:hover { background:#E8F1EA; border-color:#247A63; }
.student-row { background:#FFFFFF; border-color:rgba(7,61,58,.09); border-radius:12px; }
.student-row:hover { background:#FAF7F1; border-color:rgba(29,91,83,.25); }
.student-avatar { background:#E8F1EA; color:#247A63; }

/* Settings contextual layout */
.settings-layout { display:grid; grid-template-columns:minmax(0,1fr) 300px; gap:22px; align-items:start; }
.settings-main { min-width:0; }
.settings-primary-card { border-top:3px solid #247A63; }
.settings-context-card {
  position:sticky; top:94px; min-height:310px; padding:24px; overflow:hidden;
  background:#E8F1EA; border:1px solid rgba(29,91,83,.09); border-radius:18px;
  color:#123C35;
}
.settings-context-card .context-icon { width:52px; height:52px; display:flex; align-items:center; justify-content:center; background:#FFFFFF; color:#247A63; border-radius:14px; font-size:23px; }
.settings-context-card h2 { margin-top:28px; font-size:20px; font-weight:800; }
.settings-context-card p { margin-top:10px; color:#536A66; font-size:12.5px; line-height:2; }
.settings-context-card > span { display:block; margin-top:22px; color:#247A63; font-size:11px; font-weight:700; }
.context-motif i { position:absolute; left:-40px; bottom:-55px; width:180px; height:180px; border:1px solid rgba(7,61,58,.07); border-radius:50%; }
.context-motif i:nth-child(2) { left:2px; bottom:-12px; width:95px; height:95px; }
.context-motif b { position:absolute; left:42px; bottom:26px; width:9px; height:9px; border-radius:50%; background:#C95F2D; }
.recipient-list { border-color:rgba(7,61,58,.09); border-radius:12px; }
.recipient-row:hover { background:#FAF7F1; }
.polish-chip { background:#F4F0E8; color:#536A66; border-radius:999px; }
.polish-chip-ok { background:#E8F1EA; color:#2F8468; }
.polish-chip-wait { background:#F5E8D8; color:#B87432; }
.polish-chip-bad { background:#F5DEDA; color:#B84D43; }

/* Empty states and motif */
.empty-state { position:relative; overflow:hidden; padding:64px 24px; }
.empty-state .empty-icon { background:#E8F1EA; color:#247A63; border-radius:18px; }
.empty-state strong { color:#123C35; }

/* Login */
body:has(.login-shell) { min-height:100vh; padding:0; background:#FAF9F4; }
.login-shell { min-height:100vh; display:grid; grid-template-columns:minmax(390px,44%) minmax(0,1fr); direction:ltr; }
.login-brand-panel {
  position:relative; display:flex; flex-direction:column; justify-content:space-between;
  min-height:100vh; padding:48px; overflow:hidden; background:#123C35; color:#fff; direction:rtl;
}
.login-brand-panel > img { width:260px; height:auto; object-fit:contain; align-self:flex-start; }
.login-brand-copy { position:relative; z-index:2; max-width:460px; margin:auto 0; }
.login-brand-copy h2 { font-size:42px; font-weight:800; line-height:1.45; letter-spacing:-1px; }
.login-brand-copy p { max-width:390px; margin-top:18px; color:rgba(255,255,255,.67); font-size:14px; line-height:2; }
.login-motif i { position:absolute; width:460px; height:460px; left:-180px; bottom:-160px; border:1px solid rgba(255,255,255,.055); border-radius:50%; }
.login-motif i:nth-child(2) { width:330px; height:330px; left:-115px; bottom:-95px; }
.login-motif i:nth-child(3) { width:190px; height:190px; left:-45px; bottom:-25px; }
.login-motif b { position:absolute; left:45px; bottom:60px; width:13px; height:13px; background:#C95F2D; border-radius:50%; }
.login-form-panel { display:flex; align-items:center; justify-content:center; min-height:100vh; padding:40px; background:#FAF9F4; direction:rtl; }
.login-form-panel .box { width:min(440px,100%); margin:0; padding:34px; background:#FFFFFF; border:1px solid rgba(7,61,58,.08); border-radius:20px; box-shadow:0 18px 55px rgba(15,55,50,.08); }
.login-form-panel .logo-mark { display:none; }
.login-form-panel .logo { margin-bottom:26px; text-align:right; }
.login-form-panel .logo::before { content:"ورود به سامانه"; display:block; margin-bottom:8px; color:#C95F2D; font-size:11px; font-weight:700; }
.login-form-panel .logo h1 { color:#123C35; font-size:24px; font-weight:800; }
.login-form-panel .logo p { color:#74817E; font-weight:400; }
.login-form-panel .btn-login { min-height:48px; background:#C95F2D; border-radius:10px; font-weight:700; box-shadow:none; }
.login-form-panel .btn-login:hover { background:#AD4F24; }
.login-form-panel .btn-alt { min-height:44px; color:#247A63; background:transparent; border:1px solid #247A63; border-radius:10px; }
.login-form-panel input { background:#FFFFFF; border-color:rgba(7,61,58,.13); }
.login-form-panel input:focus { border-color:#247A63; box-shadow:0 0 0 3px rgba(29,91,83,.08); }
.login-form-panel .channel-note { background:#E8F1EA; color:#247A63; border-color:rgba(29,91,83,.1); }
.login-form-panel .otp-boxes input { border-color:rgba(7,61,58,.14); color:#123C35; }
.login-form-panel .otp-boxes input.filled { border-color:#247A63; background:#EAF2EE; }

/* Responsive */
@media (max-width:1100px) {
  .stats-row { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .settings-layout { grid-template-columns:1fr; }
  .settings-context-card { position:relative; top:auto; min-height:220px; order:-1; }
  .topbar-search { width:min(280px,30vw); }
  .topbar-user-copy,.topbar-chevron { display:none; }
}
@media (max-width:768px) {
  :root { --sidebar:278px; --topbar-h:62px; }
  .sidebar { width:278px; right:-298px; }
  .sidebar.open { right:0; }
  .main { margin-right:0; }
  .topbar { height:62px; padding:0 16px; gap:10px; }
  .topbar-right,.topbar-left { min-width:auto; }
  .topbar-context,.topbar-search { display:none; }
  .topbar-brand { display:block; position:static; transform:none; font-size:18px; }
  .topbar-user { padding:0; }
  .topbar-avatar { width:36px; height:36px; }
  .content { padding:20px 16px 36px; }
  .page-head { margin-bottom:18px; }
  .page-head::before { margin-bottom:-4px; }
  .page-head h1 { font-size:22px; }
  .page-head p { font-size:12.5px; }
  .card-header { padding:16px; }
  .card-body { padding:16px; }
  .table-wrap { border-radius:12px; }
  th,td { white-space:nowrap; }
  .mode-switch { grid-template-columns:1fr; }
  .login-shell { grid-template-columns:1fr; }
  .login-brand-panel { min-height:270px; padding:28px 24px; }
  .login-brand-panel > img { width:220px; }
  .login-brand-copy { margin:24px 0 0; }
  .login-brand-copy h2 { font-size:29px; }
  .login-brand-copy p { margin-top:8px; font-size:12.5px; }
  .login-form-panel { min-height:auto; padding:24px 16px 40px; }
  .login-form-panel .box { padding:26px 20px; border-radius:16px; }
}
@media (max-width:480px) {
  .stats-row { grid-template-columns:1fr 1fr; gap:10px; }
  .stat-card { min-height:100px; padding:14px; }
  .stat-value { font-size:21px; }
  .page-head-actions,.page-head-actions .btn { width:100%; }
  .page-head-actions .btn { justify-content:center; }
  .settings-context-card { padding:20px; }
  .login-brand-panel { min-height:245px; }
  .login-brand-copy h2 { font-size:25px; }
  .login-brand-copy p { max-width:300px; }
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { scroll-behavior:auto !important; transition:none !important; }
}


/* DataWay header and login refinements */
.inline-form{display:grid;grid-template-columns:minmax(220px,1fr) minmax(150px,190px) minmax(180px,220px) auto auto;gap:10px;align-items:center}
@media(max-width:1100px){.inline-form{grid-template-columns:repeat(2,minmax(0,1fr))}.inline-form .btn{justify-content:center}}
@media(max-width:600px){.inline-form{grid-template-columns:1fr}.inline-form .btn{width:100%}}


/* centered DataWay header and simplified login */
.topbar{position:sticky}
.topbar-brand{display:flex;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);direction:ltr;font-family:Arial,sans-serif;font-size:26px;font-weight:800;letter-spacing:-1px;text-transform:lowercase;line-height:1;color:#123C35}
.topbar-brand span{color:#C95F2D}
.login-shell{width:100%;min-height:100vh;display:flex;align-items:center;justify-content:center;padding:20px;direction:rtl}
.login-shell>.box{width:min(400px,100%);margin:0;padding:34px;background:#FFFFFF;border:1px solid rgba(7,61,58,.08);border-radius:20px;box-shadow:0 18px 55px rgba(15,55,50,.08)}
.login-shell .logo{margin-bottom:20px;text-align:center}
.login-shell .logo p{color:#74817E;font-weight:400}
.login-shell .btn-login{min-height:48px;background:#C95F2D;border-radius:10px;font-weight:700;box-shadow:none}
.login-shell .btn-login:hover{background:#AD4F24}
.login-shell .btn-alt{min-height:44px;color:#247A63;background:transparent;border:1px solid #247A63;border-radius:10px}
.login-shell input{background:#FFFFFF;border-color:rgba(7,61,58,.13)}
.login-shell input:focus{border-color:#247A63;box-shadow:0 0 0 3px rgba(29,91,83,.08)}
.login-shell .channel-note{background:#E8F1EA;color:#247A63;border-color:rgba(29,91,83,.1)}
.login-shell .otp-boxes input{border-color:rgba(7,61,58,.14);color:#123C35}
.login-shell .otp-boxes input.filled{border-color:#247A63;background:#EAF2EE}
@media(max-width:768px){.topbar-brand{display:flex;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);font-size:25px}.topbar-right,.topbar-left{min-width:auto}.login-shell{padding:16px}.login-shell>.box{padding:28px 20px;border-radius:16px}}


/* NOYA light organizational palette and compact responsive system */

:root{--primary:#247A63;--primary-dark:#123C35;--primary-soft:#E8F1EA;--primary-ring:rgba(36,122,99,.14);--bg:#FAF9F4;--surface:#FFFFFF;--surface-2:#F4F5EF;--ink:#123C35;--ink-soft:#29443C;--muted:#687A74;--line:rgba(18,60,53,.12);--success:#247A63;--success-soft:#E8F1EA;--mint:#B8D8C0;--sidebar:244px;--topbar-h:64px;--radius-sm:8px;--radius:12px;--radius-xl:16px;--shadow:0 3px 14px rgba(18,60,53,.05)}
html,body,button,input,textarea,select{font-family:'DanaFaNum',Tahoma,Arial,sans-serif}
html,body,.layout,.main{background:#FAF9F4}
.sidebar{width:244px;background:#123C35}.main{margin-right:244px}
.sidebar-header{min-height:94px;padding:17px 16px 10px}.sidebar-logo-img{width:165px;height:50px}.sidebar-nav{padding:10px}.sidebar-nav a{min-height:42px;margin-bottom:2px;padding:9px 12px;font-size:12.5px;border-radius:9px}.sidebar-manifesto{min-height:102px;margin:5px 12px 8px;padding:13px;font-size:10.5px}.sidebar-footer{padding:8px 10px 12px}
.topbar{height:64px;padding:0 24px;background:#fff;border-bottom-color:rgba(9,47,46,.08)}.topbar-right,.topbar-left{min-width:190px}.topbar-search{height:38px;background:#F1F5F2;border-radius:9px}.topbar-avatar{width:34px;height:34px;border-radius:9px;background:#E8F4EF;color:#247A63}
.content{max-width:1540px;padding:24px 28px 36px}.page-head{margin-bottom:18px}.page-head h1{font-size:24px;letter-spacing:-.35px}.page-head p{margin-top:2px;font-size:12.5px}.page-head::before{font-size:10px}
.card,details.collapse-card,.section-card,.edit-panel,.stat-card,.dash-card,.launch-card,.note-item,.analysis-result,.wizard-card,.xl-panel,.xl-file,.dataset-box,.acad-subject{border-color:rgba(9,47,46,.08);border-radius:12px;box-shadow:0 3px 14px rgba(9,47,46,.04)}.card{margin-bottom:14px}.card-header{min-height:56px;padding:14px 18px}.card-header h2{font-size:13px}.card-body{padding:18px}.edit-panel summary{min-height:56px;padding:11px 14px}.edit-panel-body{padding:14px;background:#FAFBFA}
.btn{min-height:38px;padding:7px 13px;border-radius:8px;font-size:12.5px}.btn-primary{background:#C85A3B;border-color:#C85A3B}.btn-primary:hover{background:#AD482E;border-color:#AD482E}.btn-success{background:#247A63;border-color:#247A63}.btn-outline{color:#247A63;border-color:#247A63}.btn-outline:hover{background:#F1F5F2;color:#123C35}.btn-sm{min-height:33px;padding:5px 10px}.btn-xs{min-height:29px;padding:4px 8px}
.form-group{margin-bottom:13px}label,.field-label{margin-bottom:5px;font-size:11.5px}input:not([type]),input[type=text],input[type=tel],input[type=email],input[type=password],input[type=search],input[type=url],input[type=number],input[type=date],input[type=time],input[type=file],textarea,select{min-height:42px;padding:8px 11px;border-color:rgba(9,47,46,.14);border-radius:8px;font-size:12.5px}textarea{min-height:92px}.form-row,.form-row-3{gap:12px}.form-actions{margin-top:16px;gap:8px}
th{height:42px;padding:9px 12px;background:#F1F5F2;font-size:11.5px}td{min-height:46px;padding:10px 12px;font-size:12px}.table-wrap{border-radius:10px}.pagination{padding-top:12px}.page-btn{min-height:32px;padding:5px 10px}
.stats-row{gap:12px;margin-bottom:18px}.stat-card{min-height:94px;padding:16px;gap:10px}.stat-value{font-size:22px}.stat-label{font-size:10.5px}.dash-cards,.launch-grid{gap:12px}.dash-card,.launch-card{min-height:138px;padding:17px}.note-item,.note-compact-item{padding:14px}.notes-list{gap:9px}
.access-section{margin-top:12px;padding:12px;border-radius:10px}.permission-grid{gap:8px;margin-top:8px}.permission-card{min-height:62px;padding:9px}.permission-card small{font-size:10.5px;line-height:1.55}.teacher-stats{gap:4px;margin-top:5px}.tstat{padding:2px 6px;font-size:10.5px}.teachers-toolbar{gap:7px;margin-top:6px}
@media(max-width:1100px){.content{padding:20px 22px 32px}.topbar{padding:0 20px}.topbar-right,.topbar-left{min-width:auto}.stats-row{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:768px){:root{--sidebar:270px;--topbar-h:58px}.sidebar{width:270px;right:-290px}.main{margin-right:0}.topbar{height:58px;padding:0 14px}.content{padding:16px 14px 28px}.page-head{margin-bottom:14px}.page-head h1{font-size:20px}.page-head p{font-size:11.5px}.page-head::before{display:none}.card-header{min-height:52px;padding:12px 14px}.card-body{padding:14px}.form-row,.form-row-3{gap:10px}.table-wrap{width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-wrap table{min-width:760px}.mode-switch{gap:10px}.mode-btn{min-height:76px;padding:13px}.settings-layout{gap:14px}.settings-context-card{min-height:180px;padding:18px}.tabs-nav{overflow-x:auto;white-space:nowrap}.tabs-nav .tab-btn{flex:0 0 auto}.page-head-actions,.page-head-actions .btn{width:100%}}
@media(max-width:600px){.stats-row{grid-template-columns:1fr 1fr;gap:8px}.stat-card{min-height:82px;padding:12px}.stat-icon{width:34px;height:34px}.stat-value{font-size:19px}.stat-label{font-size:10px}.teachers-toolbar,.sort-form{width:100%}.sort-form select{flex:1;min-width:0}.teachers-toolbar>.btn{width:100%;justify-content:center}.edit-panel>summary{display:block;padding:13px}.edit-panel>summary .person-row{min-width:0}.edit-panel>summary .person-row>div:last-child{min-width:0}.person-name,.person-meta{overflow-wrap:anywhere}.summary-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:11px}.summary-actions .btn{width:100%;justify-content:center;padding:6px 7px;font-size:11px}.permission-grid{grid-template-columns:1fr}.edit-panel-body>form{padding:12px}.grade-checks{gap:6px}.grade-checks label{padding:6px 8px;font-size:11px}.form-actions{display:grid;grid-template-columns:1fr}.form-actions .btn{width:100%;justify-content:center}}
@media(max-width:380px){.summary-actions{grid-template-columns:1fr}.topbar-notification{display:none}.content{padding-inline:12px}}

::selection{background:#B8D8C0;color:#123C35}.stat-icon.green,.dash-card-icon.green,.launch-icon.green{background:#DDF0E9;color:#247A63}


/* final light login palette */
body:has(.login-shell){background:#FAF9F4;background-image:none}
.login-shell>.box{background:#FFFFFF;border-color:rgba(9,47,46,.10);box-shadow:0 12px 36px rgba(9,47,46,.07)}
.login-wordmark{color:#123C35}.login-wordmark span{color:#C85A3B}
.login-shell .logo p{color:#788987}
.login-shell input{background:#F1F5F2;border-color:rgba(9,47,46,.12);color:#123C35}
.login-shell input:focus{background:#FFFFFF;border-color:#247A63;box-shadow:0 0 0 3px rgba(21,94,91,.10)}
.login-shell .btn-login{background:#C85A3B}.login-shell .btn-login:hover{background:#AD482E}
.login-shell .btn-alt{color:#247A63;border-color:#247A63;background:#FFFFFF}
.login-shell .channel-note{background:#F1F5F2;color:#247A63;border-color:rgba(21,94,91,.10)}
.login-shell .otp-boxes input{background:#F1F5F2;border-color:rgba(9,47,46,.12);color:#123C35}
.login-shell .otp-boxes input.filled{background:#FFFFFF;border-color:#247A63}


/* sidebar alignment and fixed mobile footer */
.sidebar{height:100vh;height:100dvh;overflow:hidden}
.sidebar-header{position:relative;flex:0 0 auto;display:flex;align-items:center;justify-content:center}
.sidebar-brand{width:100%;flex:none;display:flex;align-items:center;justify-content:center;text-align:center}
.sidebar-wordmark{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);margin:0;text-align:center}
.sidebar-close-btn{position:absolute;left:13px;top:50%;z-index:2;transform:translateY(-50%)}
.sidebar-nav{min-height:0;flex:1 1 auto;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
.sidebar-footer{position:relative;z-index:2;flex:0 0 auto;margin-top:0;background:#123C35;border-top:1px solid rgba(255,255,255,.08)}
@media(max-width:768px){.sidebar-header{min-height:76px;padding:12px 16px}.sidebar-wordmark{font-size:31px}.sidebar-footer{padding-bottom:max(10px,env(safe-area-inset-bottom))}}


/* compact collapsible filters on mobile */
.filter-collapse-toggle{display:none}
@media(max-width:600px){
  .filter-collapse-toggle{width:100%;min-height:36px;display:flex;align-items:center;justify-content:space-between;margin:0 0 7px;padding:7px 11px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink);font-family:inherit;font-size:11.5px;font-weight:600;cursor:pointer}
  .filter-collapse-toggle svg{width:17px;height:17px;fill:none;stroke:var(--primary);stroke-width:1.8;stroke-linecap:round}
  .mobile-filter-form:not(.mobile-filter-expanded)>select,
  .mobile-filter-form:not(.mobile-filter-expanded)>a,
  .mobile-filter-form:not(.mobile-filter-expanded)>.filter-field:not(:first-child),
  .mobile-filter-form:not(.mobile-filter-expanded)>.custom-dates{display:none!important}
  .inline-form.mobile-filter-form{display:grid;grid-template-columns:minmax(0,1fr) auto!important;gap:7px!important}
  .inline-form.mobile-filter-form>input:first-child{min-width:0;min-height:36px}
  .inline-form.mobile-filter-form>button[type=submit]{width:auto;min-height:36px;padding:6px 11px}
  .inline-form.mobile-filter-form.mobile-filter-expanded{grid-template-columns:1fr 1fr!important}
  .inline-form.mobile-filter-form.mobile-filter-expanded>input:first-child{grid-column:span 2}
  .inline-form.mobile-filter-form.mobile-filter-expanded>a{width:100%;justify-content:center}
  .analytics-filters.mobile-filter-form{display:grid;grid-template-columns:minmax(0,1fr) auto!important;padding:9px!important;gap:7px!important}
  .analytics-filters.mobile-filter-form>.filter-field:first-child{min-width:0}
  .analytics-filters.mobile-filter-form>.filter-actions{grid-column:auto!important;min-height:36px}
  .analytics-filters.mobile-filter-form>.filter-actions .btn{min-height:36px;padding:6px 10px}
  .analytics-filters.mobile-filter-form>.filter-actions a{display:none}
  .analytics-filters.mobile-filter-expanded{grid-template-columns:1fr 1fr!important}
  .analytics-filters.mobile-filter-expanded>.filter-field{display:block!important}
  .analytics-filters.mobile-filter-expanded>.custom-dates{display:grid!important;grid-column:span 2}
  .analytics-filters.mobile-filter-expanded>.custom-dates.is-hidden{display:none!important}
  .analytics-filters.mobile-filter-expanded>.filter-actions{grid-column:span 2!important}
  .analytics-filters.mobile-filter-expanded>.filter-actions a{display:block}
}

/* all data tables become labeled cards on mobile */
@media(max-width:700px){
  .table-wrap{width:100%;overflow:visible!important;border:0!important;background:transparent!important}
  table.responsive-table{display:block!important;width:100%!important;min-width:0!important;background:transparent!important}
  table.responsive-table thead{display:none!important}
  table.responsive-table tbody{display:grid!important;width:100%;gap:9px}
  table.responsive-table tbody tr{display:block!important;width:100%;padding:6px 11px;background:var(--surface);border:1px solid var(--line);border-radius:10px;box-shadow:0 2px 10px rgba(9,47,46,.035)}
  table.responsive-table tbody td{display:grid!important;grid-template-columns:minmax(92px,34%) minmax(0,1fr);align-items:start;gap:10px;width:100%!important;min-height:0;padding:7px 0!important;border:0!important;border-bottom:1px dashed rgba(9,47,46,.09)!important;background:transparent!important;white-space:normal!important;text-align:right!important;overflow-wrap:anywhere}
  table.responsive-table tbody td:last-child{border-bottom:0!important}
  table.responsive-table tbody td::before{content:attr(data-label);color:var(--muted);font-size:10.5px;font-weight:600;line-height:1.8}
  table.responsive-table tbody td.cell-strong{font-size:13px;color:var(--ink)}
  table.responsive-table tbody td.mobile-full-cell{display:block!important;text-align:center!important;padding:14px 6px!important}
  table.responsive-table tbody td.mobile-full-cell::before{display:none}
  table.responsive-table .row-actions{display:flex;flex-wrap:wrap;gap:6px;justify-content:flex-start}
  table.responsive-table .row-actions .btn{flex:1 1 auto;justify-content:center}
  table.responsive-table audio{max-width:100%}
}


/* white application surfaces */
:root{--surface:#FFFFFF;--surface-2:#FFFFFF}
.card,details.collapse-card,.section-card,.edit-panel,.stat-card,.dash-card,.launch-card,.note-item,.note-compact-item,.analysis-result,.wizard-card,.xl-panel,.xl-file,.dataset-box,.acad-subject,.access-section,.edit-panel-body,.settings-context-card,.analytics-card,.analytics-filters,.analytics-kpi,.mini-kpis>div{background:#FFFFFF}


.alert,.err{transition:opacity .4s ease,transform .4s ease,margin .4s ease,padding .4s ease,max-height .4s ease}.alert.is-hiding,.err.is-hiding{opacity:0;transform:translateY(-8px);margin-block:0!important;padding-block:0!important;max-height:0;overflow:hidden;border-width:0}

/* DataWay brand palette */
:root{--primary:#247A63;--primary-dark:#123C35;--primary-soft:#E8F1EA;--primary-ring:rgba(36,122,99,.14);--bg:#FAF9F4;--surface:#FFFFFF;--surface-2:#F4F5EF;--ink:#123C35;--ink-soft:#29443C;--muted:#687A74;--line:rgba(18,60,53,.12);--success:#247A63;--success-soft:#E8F1EA;--mint:#B8D8C0;--shadow:0 3px 14px rgba(18,60,53,.05)}
html,body,.layout,.main,body:has(.login-shell){background:#FAF9F4}
.sidebar,.sidebar-footer{background:#123C35}
.sidebar-nav a.active::after,.sidebar-manifesto .motif-dot{background:#C95F2D}
.sidebar-footer a:hover{background:rgba(201,95,45,.15)}
.sidebar-wordmark{display:block;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:155px;height:56px;object-fit:contain}
.topbar-brand{display:block;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:110px;height:45px;object-fit:contain}
.topbar{background:#fff;border-bottom-color:rgba(18,60,53,.1)}
.topbar-search,.login-shell input,.login-shell .channel-note{background:#F4F5EF}
.topbar-avatar,.person-avatar{background:#B8D8C0;color:#123C35}
.card-header h2,.page-head h1,label,.field-label,.person-name,.menu-btn{color:#123C35}
.btn-primary,.login-shell .btn-login{background:#C95F2D;border-color:#C95F2D;color:#fff}
.btn-primary:hover,.login-shell .btn-login:hover{background:#AD4F24;border-color:#AD4F24}
.btn-success{background:#123C35;border-color:#123C35}
.btn-outline,.login-shell .btn-alt{color:#247A63;border-color:#247A63}
.btn-outline:hover{background:#E8F1EA;color:#123C35}
.login-shell>.box{background:#fff;border-color:rgba(18,60,53,.12)}
.login-brand-logo{display:block;width:min(172px,100%);height:auto;margin:0 auto 14px}
@media(max-width:768px){.login-brand-logo{width:min(150px,62%);margin-bottom:11px}}
@media(max-width:380px){.login-brand-logo{width:min(132px,58%)}}
.login-shell input:focus{border-color:#247A63;box-shadow:0 0 0 3px rgba(36,122,99,.13)}
.login-shell .otp-boxes input.filled{border-color:#247A63}
::selection{background:#B8D8C0;color:#123C35}
html[data-theme=dark]{--primary:#B8D8C0;--primary-dark:#E8F1EA;--primary-soft:#24443B;--primary-ring:rgba(184,216,192,.17);--bg:#101D19;--surface:#192A24;--surface-2:#21362E;--ink:#FAF9F4;--ink-soft:#D3E2D5;--muted:#A4BAAC;--line:rgba(230,244,232,.15);--success:#B8D8C0;--success-soft:#24443B;--shadow:0 4px 18px rgba(0,0,0,.2)}
html[data-theme=dark],html[data-theme=dark] body,html[data-theme=dark] .layout,html[data-theme=dark] .main,html[data-theme=dark] body:has(.login-shell){background:#101D19;color:var(--ink)}
html[data-theme=dark] .sidebar,html[data-theme=dark] .sidebar-footer{background:#0C2520}
html[data-theme=dark] .topbar{background:#172820}
html[data-theme=dark] .topbar-brand,html[data-theme=dark] .login-brand-logo{filter:brightness(0) invert(1)}
html[data-theme=dark] .login-shell>.box{background:#192A24}
@media(max-width:768px){.sidebar-wordmark{width:140px;height:51px}.topbar-brand{width:100px;height:41px}}
.theme-toggle{position:fixed;top:14px;left:14px;z-index:10000;width:38px;height:38px;display:inline-grid;place-items:center;padding:0;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--ink-soft);cursor:pointer;box-shadow:var(--shadow)}
.topbar .theme-toggle{position:static;z-index:auto;box-shadow:none;background:transparent;border-color:transparent}
.theme-toggle:hover{background:var(--primary-soft);color:var(--primary)}.theme-toggle .icon{grid-area:1/1;font-size:18px}.theme-icon-sun{display:none}.theme-icon-moon{display:inline-flex}html[data-theme=dark] .theme-icon-sun{display:inline-flex}html[data-theme=dark] .theme-icon-moon{display:none}

/* global dark theme */
html[data-theme=dark]{color-scheme:dark;--primary:#B8D8C0;--primary-dark:#E8F1EA;--primary-soft:#24443B;--primary-ring:rgba(184,216,192,.17);--bg:#101D19;--surface:#192A24;--surface-2:#21362E;--ink:#FAF9F4;--ink-soft:#D3E2D5;--muted:#A4BAAC;--line:rgba(230,244,232,.15);--success:#B8D8C0;--success-soft:#24443B;--danger:#EE8B7F;--danger-soft:#3B2423;--warn:#E4B56F;--warn-soft:#3B3020;--shadow:0 4px 18px rgba(0,0,0,.2)}
html[data-theme=dark],html[data-theme=dark] body,html[data-theme=dark] .layout,html[data-theme=dark] .main{background:#101D19;color:var(--ink)}
html[data-theme=dark] .sidebar,html[data-theme=dark] .sidebar-footer{background:#0C2520}
html[data-theme=dark] .topbar{background:#172820;border-color:var(--line)}
html[data-theme=dark] .topbar-search,html[data-theme=dark] .topbar-avatar{background:#21362E;color:var(--primary)}
html[data-theme=dark] .topbar-brand,html[data-theme=dark] .page-head h1,html[data-theme=dark] .card-header h2,html[data-theme=dark] .person-name{color:var(--ink)}
html[data-theme=dark] .card,html[data-theme=dark] details.collapse-card,html[data-theme=dark] .section-card,html[data-theme=dark] .edit-panel,html[data-theme=dark] .stat-card,html[data-theme=dark] .dash-card,html[data-theme=dark] .launch-card,html[data-theme=dark] .note-item,html[data-theme=dark] .note-compact-item,html[data-theme=dark] .analysis-result,html[data-theme=dark] .wizard-card,html[data-theme=dark] .xl-panel,html[data-theme=dark] .xl-file,html[data-theme=dark] .dataset-box,html[data-theme=dark] .acad-subject,html[data-theme=dark] .access-section,html[data-theme=dark] .edit-panel-body,html[data-theme=dark] .settings-context-card,html[data-theme=dark] .analytics-card,html[data-theme=dark] .analytics-filters,html[data-theme=dark] .analytics-kpi,html[data-theme=dark] .mini-kpis>div,html[data-theme=dark] .overview-metric,html[data-theme=dark] .permission-card,html[data-theme=dark] .grade-checks label,html[data-theme=dark] .filter-collapse-toggle{background:var(--surface);border-color:var(--line);color:var(--ink)}
html[data-theme=dark] .card-header,html[data-theme=dark] .analytics-card>header{border-color:var(--line)}
html[data-theme=dark] input:not([type=checkbox]):not([type=radio]),html[data-theme=dark] textarea,html[data-theme=dark] select{background:#111C1A!important;border-color:var(--line)!important;color:var(--ink)!important}
html[data-theme=dark] input:focus,html[data-theme=dark] textarea:focus,html[data-theme=dark] select:focus{background:#172522!important;border-color:var(--primary)!important;box-shadow:0 0 0 3px rgba(134,200,181,.10)!important}
html[data-theme=dark] input::placeholder,html[data-theme=dark] textarea::placeholder{color:#71827E}
html[data-theme=dark] table,html[data-theme=dark] .table-wrap{background:var(--surface);border-color:var(--line)}
html[data-theme=dark] th{background:#1C2926;color:var(--ink);border-color:var(--line)}html[data-theme=dark] td{color:var(--ink-soft);border-color:var(--line)}html[data-theme=dark] tbody tr:hover td{background:#1A2724}
html[data-theme=dark] .note-audio,html[data-theme=dark] .aplayer{background:#20362F;border-color:var(--line)}html[data-theme=dark] .file-drop,html[data-theme=dark] .xl-drop,html[data-theme=dark] .rec{background:#131F1D;border-color:rgba(134,200,181,.25)}
html[data-theme=dark] .tab-switch,html[data-theme=dark] .wizard-steps,html[data-theme=dark] .xl-steps,html[data-theme=dark] .wizard-tabs{background:#111B19}html[data-theme=dark] .tab-btn.active,html[data-theme=dark] .wizard-tab.active{background:#22312E;color:var(--ink)}
html[data-theme=dark] .student-row,html[data-theme=dark] .chip{background:var(--surface);color:var(--ink);border-color:var(--line)}html[data-theme=dark] .student-row:hover{background:#1C2926}
html[data-theme=dark] .analysis-result-head,html[data-theme=dark] .empty-state .empty-icon{background:#203A35;color:var(--primary)}html[data-theme=dark] .analysis-result-body{color:var(--ink-soft)}
html[data-theme=dark] .badge-gray{background:#27322F;color:#B7C7C2}html[data-theme=dark] .badge-green{background:#19372F;color:#70C3A5}html[data-theme=dark] .badge-amber{background:#3B3020;color:#E4B56F}
html[data-theme=dark] .mode-btn{background:var(--surface);border-color:var(--line);color:var(--ink)}html[data-theme=dark] .mode-btn.active{background:#21413A;border-color:var(--primary)}
html[data-theme=dark] .analytics-card h2,html[data-theme=dark] .kpi-value,html[data-theme=dark] .metric-copy b{color:var(--ink)}html[data-theme=dark] .chart-shell::before{background:linear-gradient(90deg,#192522 25%,#20302C 37%,#192522 63%);background-size:400% 100%}
html[data-theme=dark] .apexcharts-tooltip{background:#17211F!important;border-color:var(--line)!important;color:var(--ink)!important}html[data-theme=dark] .apexcharts-tooltip-title{background:#1C2926!important;border-color:var(--line)!important}html[data-theme=dark] .apexcharts-text{fill:#9FB0AB!important}
html[data-theme=dark] body:has(.login-shell){background:#101D19;background-image:radial-gradient(circle at 50% 75%,#21362E 0,#101D19 62%)}html[data-theme=dark] .login-shell>.box{background:var(--surface);border-color:var(--line);box-shadow:0 16px 45px rgba(0,0,0,.28)}html[data-theme=dark] .login-brand-logo{filter:brightness(0) invert(1)}
@media(max-width:700px){html[data-theme=dark] table.responsive-table tbody tr{background:var(--surface);border-color:var(--line)}html[data-theme=dark] table.responsive-table tbody td{border-bottom-color:var(--line)!important}}
