:root {
  color-scheme: dark;
  --bg: #030405;
  --bg-grid: rgba(255, 255, 255, .055);
  --surface: #0a0b0d;
  --surface-2: #111316;
  --surface-3: #17191d;
  --text: #f7f7f8;
  --muted: #8d94a2;
  --faint: #5e6470;
  --border: rgba(255, 255, 255, .12);
  --strong-border: rgba(255, 255, 255, .22);
  --blue: #2563eb;
  --cyan: #8ed7ff;
  --green: #3dd598;
  --amber: #f2b84b;
  --red: #ff6b6b;
  --shadow: 0 24px 80px rgba(0, 0, 0, .42);
  --radius: 16px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f8fb;
  --bg-grid: rgba(15, 23, 42, .045);
  --surface: #ffffff;
  --surface-2: #f4f6f9;
  --surface-3: #edf1f6;
  --text: #09090b;
  --muted: #667085;
  --faint: #98a2b3;
  --border: rgba(15, 23, 42, .11);
  --strong-border: rgba(15, 23, 42, .2);
  --shadow: 0 24px 70px rgba(15, 23, 42, .12);
}

* { box-sizing: border-box; min-width: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 52% 18%, rgba(37, 99, 235, .15), transparent 32%),
    linear-gradient(var(--bg-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px),
    var(--bg);
  background-size: auto, 72px 72px, 72px 72px, auto;
  color: var(--text);
  overflow-x: hidden;
}
body.menu-open { overflow: hidden; }
img, canvas, svg, video { max-width: 100%; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.muted, .row-sub { color: var(--muted); }
.mono, .eyebrow, .brand-spaced { font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace; }
.eyebrow {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 12px;
  letter-spacing: 5px;
  text-transform: uppercase;
  font-weight: 800;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 460px;
  gap: 34px;
  padding: 30px;
  align-items: center;
}
.auth-hero { min-height: 720px; display: flex; flex-direction: column; justify-content: center; gap: 38px; }
.brand-logo-text { font-size: 34px; letter-spacing: 8px; font-weight: 900; }
.brand-spaced { color: var(--muted); font-size: 11px; letter-spacing: 8px; }
.auth-brand-lockup h1 { margin: 36px 0 12px; font-size: clamp(42px, 6vw, 86px); line-height: .92; font-weight: 300; text-transform: uppercase; }
.auth-brand-lockup p { max-width: 520px; color: var(--text); opacity: .82; font-size: 18px; line-height: 1.6; }
.laptop-stage { max-width: 680px; perspective: 1200px; }
.laptop-screen {
  min-height: 360px;
  border: 1px solid var(--strong-border);
  border-radius: 18px 18px 8px 8px;
  background:
    linear-gradient(110deg, rgba(255,255,255,.05), rgba(255,255,255,0)),
    radial-gradient(circle at 75% 10%, rgba(255,255,255,.12), transparent 34%),
    var(--surface);
  box-shadow: var(--shadow);
  padding: 34px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
  transform: rotateX(4deg);
}
.mini-brand { grid-column: 1 / -1; font-size: 12px; letter-spacing: 4px; font-weight: 900; }
.mini-login { border: 1px solid var(--border); background: rgba(0,0,0,.28); padding: 24px; display: flex; flex-direction: column; gap: 13px; border-radius: 14px; }
.mini-login span, .mini-visual small { color: var(--muted); }
.mini-login i { display: block; height: 38px; border: 1px solid var(--border); border-radius: 7px; }
.mini-login b { background: #fff; color: #000; border-radius: 7px; text-align: center; padding: 10px; }
.mini-visual { border-left: 1px solid var(--border); padding-left: 28px; display: flex; flex-direction: column; justify-content: end; gap: 8px; }
.laptop-base { width: 90%; height: 20px; margin: -1px auto 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); border-radius: 0 0 40px 40px; }
.auth-panel { align-self: center; }
.auth-card, .panel, .chart-card, .card, .column, .timeline-item, .modal, .command, .user-card, .kpi {
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.015)), var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(255,255,255,.04) inset;
}
.auth-card { padding: 28px; box-shadow: var(--shadow); }
.auth-card h2 { margin: 8px 0 22px; font-size: 34px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface-2); padding: 4px; border-radius: 12px; margin-bottom: 22px; }
.tab { border: 0; border-radius: 9px; padding: 10px; background: transparent; color: var(--muted); }
.tab.active { background: var(--text); color: var(--bg); }
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 8px; color: var(--muted); font-size: 13px; }
.field span { display: flex; align-items: center; gap: 8px; }
.input, .select, .textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255,255,255,.035);
  color: var(--text);
  padding: 10px 12px;
  outline: none;
}
.textarea { min-height: 92px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.18); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.btn, .icon-btn, .text-link {
  border: 0;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  padding: 12px 18px;
  font-weight: 800;
  transition: transform .2s ease, opacity .2s ease, border-color .2s ease;
}
.btn:hover, .icon-btn:hover, .text-link:hover { transform: translateY(-1px); }
.btn.secondary, .btn.ghost, .icon-btn, .text-link { background: rgba(255,255,255,.06); color: var(--text); border: 1px solid var(--border); }
.btn.small, .icon-btn { padding: 9px 13px; font-size: 13px; }
.text-link { padding: 7px 10px; font-size: 12px; }
.error { color: var(--red); background: rgba(255,107,107,.1); border: 1px solid rgba(255,107,107,.25); padding: 10px; border-radius: 10px; }
.demo-box { margin-top: 18px; color: var(--muted); border-top: 1px solid var(--border); padding-top: 14px; line-height: 1.8; }

.boot-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.boot-card {
  width: min(360px, 100%);
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 30px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.02)), var(--surface);
  box-shadow: var(--shadow);
}
.boot-card h1 { margin: 6px 0 0; }
.boot-card p { margin: 0; color: var(--muted); }

.portal-shell {
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  padding: clamp(12px, 1.4vw, 22px);
  overflow-x: clip;
}
.topbar {
  position: sticky;
  top: 14px;
  z-index: 20;
  width: min(100%, 1380px);
  margin: 0 auto clamp(14px, 1.4vw, 22px);
  min-height: 70px;
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(160px, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(230,232,235,.78);
  color: #111;
  border: 1px solid rgba(255,255,255,.58);
  border-radius: 999px;
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 60px rgba(0,0,0,.22);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 38px; height: 38px; border: 1.5px solid currentColor; border-radius: 50%; display: grid; place-items: center; font-weight: 900; }
.brand-stack { display: grid; font-size: 18px; font-weight: 900; line-height: 1.05; }
.brand-stack span { color: #667085; font-size: 11px; font-weight: 700; margin-top: 3px; }
.search { width: min(100%, 420px); justify-self: center; display: flex; align-items: center; gap: 10px; background: rgba(0,0,0,.08); border: 1px solid rgba(0,0,0,.08); border-radius: 999px; padding: 8px 13px; }
.search span { font-size: 10px; color: #667085; font-weight: 900; }
.search input { border: 0; background: transparent; color: #111; outline: 0; width: 100%; min-width: 0; }
.top-actions { display: flex; align-items: center; gap: 9px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #ffe08a, #2563eb); color: #07101f; font-weight: 900; }
.avatar.large { width: 78px; height: 78px; font-size: 24px; }
.avatar.mini { width: 30px; height: 30px; font-size: 11px; }
.layout {
  width: min(100%, 1380px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: clamp(12px, 1.2vw, 18px);
  align-items: start;
}
.icon-rail, .sidebar {
  position: sticky;
  top: 118px;
  border: 1px solid var(--border);
  background: rgba(8,9,11,.74);
  backdrop-filter: blur(18px);
  border-radius: 18px;
  padding: 10px;
}
.icon-rail { display: none; gap: 8px; justify-items: center; }
.rail-dot { width: 34px; height: 34px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--muted); font-size: 11px; font-weight: 900; }
.rail-dot.active { background: var(--blue); color: #fff; }
.sidebar {
  max-height: calc(100vh - 112px);
  overflow: auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  scrollbar-width: thin;
}
.nav-list { display: grid; gap: 5px; }
.nav-item { width: 100%; border: 0; background: transparent; color: var(--muted); border-radius: 10px; padding: 10px 11px; display: flex; align-items: center; justify-content: space-between; text-align: left; }
.nav-item.active { background: rgba(37,99,235,.9); color: #fff; }
.user-card { margin-top: 18px; padding: 14px; display: grid; gap: 8px; }
.user-card span { color: var(--muted); font-size: 12px; }
.content {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  padding-bottom: 54px;
  overflow: hidden;
}
.page-enter { animation: pageIn .45s cubic-bezier(.2,.7,.2,1) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.dashboard-hero, .page-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin: clamp(16px, 1.6vw, 22px) 0 18px;
}
.dashboard-hero h1, .page-head h1 { margin: 0; font-size: clamp(32px, 5vw, 58px); letter-spacing: 0; line-height: 1; }
.dashboard-hero p, .page-head p { color: var(--muted); max-width: 620px; line-height: 1.55; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 12px; }
.kpi { text-align: left; padding: 18px; color: var(--text); min-height: 112px; display: grid; gap: 6px; overflow: hidden; }
.kpi span { color: var(--muted); font-size: 13px; }
.kpi strong { font-size: 28px; }
.trend { height: 30px; display: flex; align-items: end; gap: 4px; opacity: .9; }
.trend i { width: 8px; border-radius: 4px 4px 0 0; background: linear-gradient(#8ed7ff, #2563eb); }
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.revenue-panel { grid-column: span 7; }
.progress-panel { grid-column: span 5; }
.mini-chart { grid-column: span 4; }
.activity-panel { grid-column: span 5; }
.alerts-panel { grid-column: span 4; }
.pipeline-panel { grid-column: span 7; }
.attendance-panel { grid-column: span 7; }
.performance-panel { grid-column: span 5; }
.phone-zone { grid-column: span 5; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 14px; align-self: stretch; }
.panel, .chart-card { padding: 16px; min-width: 0; }
.panel h2, .chart-card h2, .column h2 { margin: 0 0 14px; font-size: 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.chart-wrap { height: 238px; }
.chart-wrap canvas, .donut-wrap canvas { width: 100%; height: 100%; }
.donut-wrap { min-height: 198px; display: grid; grid-template-columns: 170px 1fr; gap: 12px; align-items: center; }
.legend { display: grid; gap: 8px; }
.legend.tight { margin-top: 14px; }
.legend-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 12px; }
.legend-row span { display: flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.progress-row { display: grid; grid-template-columns: 30px 1fr 112px 42px; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); }
.progress-row:first-of-type { border-top: 0; }
.progress-row span { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.progress { height: 8px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; }
.progress.thin { height: 6px; }
.progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--cyan), var(--amber)); }
.meter-ring { width: 156px; height: 156px; border-radius: 50%; border: 14px solid rgba(255,255,255,.08); border-top-color: var(--amber); border-right-color: var(--blue); display: grid; place-items: center; margin: 4px auto 14px; text-align: center; }
.meter-ring strong { font-size: 30px; }
.meter-ring span { display: block; color: var(--muted); font-size: 11px; margin-top: -30px; }
.compact-row, .alert-row, .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.025);
  border-radius: 12px;
  padding: 12px;
  margin-top: 10px;
}
.compact-row p { margin: 0; flex: 1; font-size: 13px; }
.compact-row small, .alert-row small { color: var(--muted); }
.tiny-icon { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 8px; color: var(--blue); font-weight: 900; }
.alert-row { width: 100%; color: var(--text); text-align: left; background: rgba(242,184,75,.06); border-color: rgba(242,184,75,.22); }
.alert-row span { color: var(--amber); font-weight: 900; }
.alert-row div { display: grid; gap: 2px; flex: 1; }
.pipeline-strip { display: grid; grid-template-columns: repeat(6, minmax(135px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 4px; max-width: 100%; }
.pipeline-stage { min-height: 126px; border: 1px solid var(--border); border-radius: 13px; background: rgba(255,255,255,.025); padding: 10px; display: grid; gap: 8px; }
.pipeline-stage header { background: var(--stage); color: #fff; border-radius: 8px; padding: 8px; display: flex; justify-content: space-between; font-size: 12px; font-weight: 900; }
.pipeline-stage div { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 12px; }
.pipeline-stage strong { color: var(--text); }
.attendance-grid { display: grid; gap: 7px; overflow-x: auto; }
.attendance-row { display: grid; grid-template-columns: 84px repeat(22, 14px); align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.attendance-row i { width: 14px; height: 14px; border-radius: 4px; background: rgba(255,255,255,.06); border: 1px solid var(--border); }
.attendance-row i.present { background: rgba(61,213,152,.75); }
.attendance-row i.remote { background: rgba(37,99,235,.75); }
.attendance-row i.late { background: rgba(242,184,75,.8); }
.pulse-grid { display: grid; gap: 13px; }
.pulse-grid div { display: grid; grid-template-columns: 110px 1fr 42px; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.metric-grid, .mini-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.metric-grid div, .mini-kpis div { border: 1px solid var(--border); border-radius: 12px; padding: 12px; background: rgba(255,255,255,.025); display: grid; gap: 4px; }
.metric-grid span, .mini-kpis span { color: var(--muted); font-size: 12px; }
.phone-mock {
  border: 1px solid var(--strong-border);
  border-radius: 28px;
  padding: 16px;
  background: linear-gradient(180deg, #0c0d10, #050607);
  min-height: 390px;
  box-shadow: var(--shadow);
}
.phone-top { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; margin-bottom: 16px; }
.phone-mock h3 { margin: 0 0 12px; }
.phone-chart { height: 84px; display: flex; align-items: end; gap: 8px; margin: 16px 0; }
.phone-chart i { flex: 1; background: linear-gradient(#9fc5ff, #2563eb); border-radius: 5px 5px 0 0; }
.phone-donut { width: 104px; height: 104px; margin: 0 auto 14px; border-radius: 50%; border: 12px solid rgba(255,255,255,.08); border-top-color: var(--green); border-right-color: var(--cyan); display: grid; place-items: center; text-align: center; }
.phone-donut span { display: block; color: var(--muted); font-size: 11px; margin-top: -32px; }
.phone-mock button { width: 100%; border: 1px solid var(--border); border-radius: 12px; padding: 10px; background: rgba(255,255,255,.05); color: var(--text); }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.filters { display: flex; gap: 12px; margin: 0 0 16px; }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(min(82vw, 286px), 1fr); gap: 14px; overflow-x: auto; padding-bottom: 8px; max-width: 100%; }
.column { padding: 14px; min-height: 420px; }
.column h2 { display: flex; justify-content: space-between; align-items: center; }
.stack { display: grid; gap: 12px; }
.card { padding: 16px; display: grid; gap: 12px; }
.card h3 { margin: 0; font-size: 18px; }
.card-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.card-actions, .hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.employee-hero {
  background: linear-gradient(135deg, rgba(37,99,235,.18), rgba(255,255,255,.025));
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 22px;
}
.pill { border: 1px solid var(--border); border-radius: 999px; padding: 5px 9px; font-size: 11px; color: var(--muted); background: rgba(255,255,255,.04); }
.pill.green { color: var(--green); border-color: rgba(61,213,152,.28); }
.pill.blue { color: #9fc5ff; border-color: rgba(37,99,235,.38); }
.pill.red { color: var(--red); border-color: rgba(255,107,107,.32); }
.pill.amber { color: var(--amber); border-color: rgba(242,184,75,.32); }
.timeline { display: grid; gap: 14px; }
.timeline-item { padding: 18px; }
.row-title { font-weight: 800; }
.row-sub { margin-top: 4px; font-size: 13px; line-height: 1.45; }
.profile-panel { align-content: start; }
.heatmap { display: grid; grid-template-columns: repeat(14, 1fr); gap: 6px; }
.heat-cell { aspect-ratio: 1; border-radius: 5px; border: 1px solid var(--border); background: rgba(255,255,255,.05); }
.heat-cell.present { background: rgba(61,213,152,.72); }
.heat-cell.remote { background: rgba(37,99,235,.72); }
.heat-cell.late { background: rgba(242,184,75,.78); }
.heat-cell.leave { background: rgba(255,255,255,.14); }
.empty { color: var(--muted); border: 1px dashed var(--border); border-radius: 12px; padding: 16px; }
.drop-active { border-color: var(--blue); }
.drag-card { cursor: grab; }
.modal-backdrop, .command-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0,0,0,.64);
  backdrop-filter: blur(12px);
  display: grid;
  place-items: center;
  padding: 22px;
}
.modal { width: min(680px, 100%); max-height: 88vh; overflow: auto; padding: 22px; }
.modal-head { display: flex; justify-content: space-between; gap: 16px; align-items: start; margin-bottom: 18px; }
.modal-head h2 { margin: 0; font-size: 28px; }
.command { width: min(620px, 100%); padding: 14px; }
.command input { width: 100%; border: 0; background: rgba(255,255,255,.06); color: var(--text); border-radius: 12px; padding: 16px; outline: 0; }
.command-list { display: grid; gap: 7px; margin-top: 10px; }
.command-item { border: 1px solid var(--border); background: rgba(255,255,255,.04); color: var(--text); border-radius: 10px; padding: 12px; text-align: left; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 60; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); padding: 14px 16px; box-shadow: var(--shadow); }

@media (max-width: 1180px) {
  .auth-shell, .layout { grid-template-columns: 1fr; }
  .icon-rail, .sidebar { position: relative; top: auto; }
  .icon-rail { display: none; }
  .sidebar { max-height: none; }
  .user-card { display: none; }
  .nav-list { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .dashboard-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .revenue-panel, .progress-panel, .activity-panel, .alerts-panel, .pipeline-panel, .attendance-panel, .performance-panel, .phone-zone { grid-column: span 6; }
  .mini-chart { grid-column: span 2; }
}
@media (max-width: 980px) {
  .topbar {
    border-radius: 28px;
    grid-template-columns: 1fr;
    justify-items: stretch;
  }
  .search { justify-self: stretch; width: 100%; }
  .top-actions { flex-wrap: wrap; }
}
@media (max-width: 780px) {
  .portal-shell, .auth-shell { padding: 14px; }
  .topbar { position: relative; top: auto; border-radius: 22px; }
  .search { max-width: none; justify-self: stretch; }
  .search input { width: 100%; }
  .top-actions { flex-wrap: wrap; }
  .sidebar {
    padding: 8px;
    border-radius: 18px;
    overflow: hidden;
  }
  .nav-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    scroll-snap-type: x proximity;
  }
  .nav-item {
    flex: 0 0 auto;
    width: auto;
    min-height: 42px;
    padding: 10px 14px;
    gap: 10px;
    white-space: nowrap;
    scroll-snap-align: start;
  }
  .nav-item .mono { display: none; }
  .auth-shell { display: block; }
  .auth-hero { min-height: auto; margin-bottom: 20px; }
  .laptop-screen { grid-template-columns: 1fr; }
  .kpis, .grid-2, .grid-3, .phone-zone { grid-template-columns: 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-grid > * { grid-column: 1 / -1; }
  .mini-chart { grid-column: 1 / -1; }
  .donut-wrap { grid-template-columns: 1fr; }
  .dashboard-hero, .page-head { align-items: start; flex-direction: column; }
  .dashboard-hero h1, .page-head h1 { font-size: clamp(34px, 11vw, 46px); }
  .board { grid-auto-columns: 82vw; }
  .split { grid-template-columns: 1fr; }
  .row, .compact-row, .alert-row { align-items: flex-start; flex-direction: column; }
  .card-actions, .hero-actions, .filters { width: 100%; flex-direction: column; align-items: stretch; }
  .card-actions .btn, .hero-actions .btn, .filters .btn { width: 100%; }
  .progress-row { grid-template-columns: 30px 1fr; }
  .progress-row .progress, .progress-row b { grid-column: 2; }
  .attendance-row { grid-template-columns: 74px repeat(12, 14px); }
  .attendance-row i:nth-of-type(n+13) { display: none; }
}
@media (max-width: 540px) {
  .portal-shell, .auth-shell { padding: 10px; }
  .topbar {
    gap: 10px;
    padding: 12px;
  }
  .brand-mark { width: 34px; height: 34px; }
  .brand-stack { font-size: 16px; }
  .search { display: none; }
  .top-actions { gap: 8px; }
  .top-actions .btn,
  .top-actions .icon-btn {
    min-height: 42px;
    padding: 9px 12px;
    font-size: 13px;
  }
  .top-actions .btn.small { flex: 1 1 auto; }
  .top-actions .icon-btn { flex: 0 0 auto; }
  .nav-list { grid-template-columns: none; }
  .nav-item { min-height: 44px; }
  .chart-wrap { height: 190px; }
  .kpi { min-height: 96px; padding: 14px; }
  .grid-2, .grid-3 { gap: 12px; }
  .panel, .chart-card, .card { padding: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
