:root {
  color-scheme: dark;
  /* LUM semantic color system: color communicates purpose, not decoration. */
  --navy-primary: #070b14;
  --navy-secondary: #0b1220;
  --bg-primary: #070b14;
  --bg-secondary: #0b1220;
  --surface-primary: #0d1423;
  --surface-secondary: #111a2c;
  --surface-hover: #172238;
  --surface-muted: #0a1120;
  --text-primary: #f5f7fc;
  --text-secondary: #aab6ca;
  --text-muted: #8f9ab0;
  --border-primary: #22304a;
  --border-secondary: #2b3a58;
  --divider: rgba(75,91,124,.28);
  --brand-primary: #6d7cff;
  --brand-hover: #7b89ff;
  --brand-secondary: #8c6cff;
  --accent-lavender: #9c73ff;
  --accent-pink: #f4b7ce;
  --success: #2fd19a;
  --warning: #f2b84b;
  --danger: #f45f78;
  --info: #5c8dff;
  --status-success-text: #68e4bb;
  --status-success-bg: rgba(47,209,154,.1);
  --status-success-border: rgba(47,209,154,.24);
  --status-warning-text: #f6cb74;
  --status-warning-bg: rgba(242,184,75,.1);
  --status-warning-border: rgba(242,184,75,.25);
  --status-danger-text: #ff8ca0;
  --status-danger-bg: rgba(244,95,120,.1);
  --status-danger-border: rgba(244,95,120,.25);
  --status-info-text: #8eb2ff;
  --status-info-bg: rgba(92,141,255,.1);
  --status-info-border: rgba(92,141,255,.22);
  --status-neutral-text: #9aa5ba;
  --status-neutral-bg: rgba(143,154,176,.1);
  --status-neutral-border: rgba(143,154,176,.2);
  --status-accent-text: #b99cff;
  --status-accent-bg: rgba(156,115,255,.1);
  --status-accent-border: rgba(156,115,255,.24);
  --sidebar-bg: rgba(13,20,35,.96);
  --sidebar-text: #f5f7fc;
  --sidebar-text-muted: #8f9ab0;
  --sidebar-active: #17223a;
  --input-bg: var(--surface-muted);
  --input-border: var(--border-secondary);
  --table-header-bg: #0d1628;
  --table-text: #dbe3f3;
  --link: #91a1ff;
  --shadow-sm: 0 6px 18px rgba(0,0,0,.14);
  --shadow-md: 0 16px 42px rgba(0,0,0,.22);
  --shadow-lg: 0 24px 68px rgba(0,0,0,.34);
  --overlay-bg: rgba(2,7,15,.66);
  --header-bg: rgba(13,20,35,.92);
  --workspace-bg: rgba(7,11,20,.66);
  --body-accent: #151f43;
  --panel-gradient: linear-gradient(145deg, rgba(18,28,48,.98), rgba(12,19,33,.98));
  --dialog-gradient: linear-gradient(155deg, #142039, #09111f);
  --bg: var(--bg-primary);
  --surface: var(--surface-primary);
  --surface-2: var(--surface-secondary);
  --surface-3: var(--surface-hover);
  --line: var(--border-primary);
  --text: var(--text-primary);
  --muted: var(--text-muted);
  --primary: var(--brand-primary);
  --primary-2: var(--brand-secondary);
  --green: var(--success);
  --amber: var(--warning);
  --red: var(--danger);
  --blue: var(--info);
  --purple: var(--accent-lavender);
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 20px;
  --space-2xl: 24px;
  --radius-sm: 6px;
  --radius-control: 10px;
  --radius-card: 16px;
  --radius-panel: 20px;
  --radius-pill: 999px;
  --radius: var(--radius-card);
  --font-size-page-title: clamp(28px, 3vw, 38px);
  --font-size-section-title: 18px;
  --font-size-card-title: 15px;
  --font-size-body: 13px;
  --font-size-secondary: 12px;
  --font-size-label: 12px;
  --font-size-helper: 10px;
  --font-size-kpi: clamp(30px, 3vw, 43px);
  --line-height-body: 1.5;
  --focus-ring: 0 0 0 3px rgba(109,124,255,.18);
  --shadow: var(--shadow-md);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}
:root[data-theme="light"] {
  color-scheme: light;
  --navy-primary: #0b1533;
  --navy-secondary: #172954;
  --bg-primary: #f4f7fb;
  --bg-secondary: #edf2f8;
  --surface-primary: #ffffff;
  --surface-secondary: #f8fafd;
  --surface-hover: #eef3fb;
  --surface-muted: #f8fafd;
  --text-primary: #17213b;
  --text-secondary: #4d5a75;
  --text-muted: #6e7890;
  --border-primary: #e2e7ef;
  --border-secondary: #cfd7e5;
  --divider: #e2e7ef;
  --brand-primary: #315edb;
  --brand-hover: #264fca;
  --brand-secondary: #6b55e8;
  --success: #138a64;
  --warning: #a96800;
  --danger: #c63c55;
  --info: #315edb;
  --status-success-text: #0b7654;
  --status-success-bg: #eaf8f3;
  --status-success-border: #bce8d8;
  --status-warning-text: #865500;
  --status-warning-bg: #fff7e5;
  --status-warning-border: #f0daa8;
  --status-danger-text: #aa2942;
  --status-danger-bg: #fff0f3;
  --status-danger-border: #f1c4ce;
  --status-info-text: #315aab;
  --status-info-bg: #edf3ff;
  --status-info-border: #cbdafb;
  --status-neutral-text: #5f6a80;
  --status-neutral-bg: #f0f3f7;
  --status-neutral-border: #d9dfe8;
  --status-accent-text: #6845b6;
  --status-accent-bg: #f3efff;
  --status-accent-border: #dacdf7;
  --sidebar-bg: #0b1533;
  --sidebar-text: #f8faff;
  --sidebar-text-muted: #9daac6;
  --sidebar-active: #172954;
  --input-bg: #ffffff;
  --input-border: #cfd7e5;
  --table-header-bg: #f8fafd;
  --table-text: #26334f;
  --link: #315edb;
  --shadow-sm: 0 7px 20px rgba(25,42,79,.07);
  --shadow-md: 0 14px 36px rgba(25,42,79,.08);
  --shadow-lg: 0 24px 64px rgba(25,42,79,.15);
  --overlay-bg: rgba(11,21,51,.48);
  --header-bg: rgba(255,255,255,.94);
  --workspace-bg: rgba(244,247,251,.92);
  --body-accent: #e7edff;
  --panel-gradient: linear-gradient(145deg, #ffffff, #fbfcff);
  --dialog-gradient: linear-gradient(155deg, #ffffff, #f8fafd);
  --focus-ring: 0 0 0 3px rgba(49,94,219,.14);
}
* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; min-height: 100vh; color: var(--text); background: radial-gradient(circle at 20% -10%, var(--body-accent) 0, transparent 34%), var(--bg); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, .primary-button, .secondary-button { min-height: 40px; border-radius: var(--radius-control); border: 1px solid var(--input-border); color: var(--text); background: var(--surface-3); padding: 9px 14px; cursor: pointer; font-size: var(--font-size-body); font-weight: 700; line-height: 1.2; transition: transform 120ms ease, color 200ms ease, border-color 200ms ease, background-color 200ms ease, box-shadow 200ms ease, opacity 140ms ease; -webkit-tap-highlight-color: transparent; }
.primary-button { display: inline-flex; align-items: center; justify-content: center; color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-2)); border-color: transparent; box-shadow: var(--shadow-sm); }
.secondary-button { display: inline-flex; align-items: center; justify-content: center; }
.full { width: 100%; }
.app-shell { width: min(1520px, 100%); margin: 0 auto; min-height: 100vh; }
.topbar { position: relative; z-index: 40; min-height: 72px; display: flex; align-items: center; justify-content: space-between; padding: var(--space-md) var(--space-2xl); background: var(--header-bg); border: 1px solid var(--line); border-bottom: 0; border-radius: var(--radius-panel) var(--radius-panel) 0 0; margin-top: 14px; backdrop-filter: blur(16px); transition: color 200ms ease, background-color 200ms ease, border-color 200ms ease; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand span:last-child { display: grid; }
.brand strong { font-size: 16px; }
.brand small { color: var(--muted); margin-top: 3px; }
.brand-logo { width: 42px; height: 42px; flex: 0 0 42px; display: block; object-fit: cover; border: 1px solid rgba(231,220,255,.22); border-radius: 12px; box-shadow: 0 8px 24px rgba(116,101,197,.24); }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; color: #fff; background: linear-gradient(135deg, #6676ff, #995cff); font-size: 12px; font-weight: 800; box-shadow: 0 8px 22px rgba(109,124,255,.34); }
.brand-mark.large { width: 58px; height: 58px; border-radius: 17px; font-size: 17px; }
.user-block { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.user-name { color: var(--text); }
.role-badge, .soft-badge { border: 1px solid var(--status-neutral-border); background: var(--status-neutral-bg); color: var(--status-neutral-text); padding: 5px 9px; border-radius: var(--radius-pill); font-size: 11px; white-space: nowrap; }
.soft-badge.danger { color: #ff8ea1; border-color: rgba(244,95,120,.26); background: rgba(244,95,120,.1); }
.icon-button { min-height: 34px; width: 34px; padding: 0; }
.mobile-menu { display: none; }
.main-nav { display: grid; grid-template-columns: repeat(10, minmax(0,1fr)); padding: var(--radius-sm) var(--radius-control); background: var(--sidebar-bg); border: 1px solid var(--border-secondary); position: sticky; top: 0; z-index: 20; }
.main-nav a { color: var(--sidebar-text-muted); padding: 11px var(--space-sm); text-align: center; border-radius: var(--radius-control); font-size: var(--font-size-body); position: relative; }
.main-nav a:hover { color: var(--sidebar-text); background: rgba(255,255,255,.045); }
.main-nav a.active { color: var(--sidebar-text); background: var(--sidebar-active); }
.main-nav a.active::after { content: ""; position: absolute; left: 18%; right: 18%; bottom: 0; height: 2px; border-radius: 3px; background: var(--primary); box-shadow: 0 0 12px var(--primary); }
.workspace { padding: var(--space-2xl); min-height: calc(100vh - 130px); border-left: 1px solid var(--line); border-right: 1px solid var(--line); background: var(--workspace-bg); transition: background-color 200ms ease, border-color 200ms ease; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--space-xl); margin: var(--space-xs) 0 var(--space-xl); }
.page-heading h1 { margin: 3px 0 5px; font-size: var(--font-size-page-title); line-height: 1.12; letter-spacing: -.03em; }
.page-heading p { margin: 0; color: var(--text-secondary); font-size: var(--font-size-secondary); line-height: var(--line-height-body); }
.eyebrow { color: #7485ff !important; text-transform: uppercase; font-size: 11px; letter-spacing: .12em; font-weight: 700; }
.panel, .kpi-card, .mini-kpis article, .finance-kpis article { background: var(--panel-gradient); border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow-sm); transition: color 200ms ease, background-color 200ms ease, border-color 200ms ease, box-shadow 200ms ease; }
.dashboard-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.kpi-card { padding: 18px; min-height: 228px; position: relative; overflow: hidden; }
.kpi-card::before { content: ""; position: absolute; width: 130px; height: 130px; right: -45px; top: -55px; border-radius: 50%; background: rgba(109,124,255,.09); filter: blur(3px); }
.card-title, .panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.card-title h2, .panel-heading h2 { margin: 0; font-size: var(--font-size-card-title); line-height: 1.3; }
.card-title p, .panel-heading p { color: var(--text-secondary); margin: var(--space-xs) 0 0; font-size: var(--font-size-secondary); line-height: var(--line-height-body); }
.card-icon { width: 34px; height: 34px; display: grid; place-items: center; background: #1a2642; color: #7888ff; border-radius: 9px; }
.mega-number { font-weight: 800; font-size: var(--font-size-kpi); line-height: 1.05; letter-spacing: -.04em; margin: 15px 0 9px; }
.mega-number small { color: var(--muted); font-size: 12px; letter-spacing: 0; }
.metric-caption { color: var(--muted); font-size: 12px; margin: -12px 0 14px; }
.progress { height: 7px; background: #212c42; border-radius: 20px; overflow: hidden; }
.progress span, .progress i { display: block; height: 100%; background: linear-gradient(90deg, #ffc54f, #ffdf7f); border-radius: inherit; }
.progress.blue span, .progress.blue i { background: linear-gradient(90deg, #5b70ff, #76a2ff); }
.progress.good i { background: var(--green); }.progress.warning i { background: var(--amber); }.progress.danger i { background: var(--red); }
.split-stats, .quad-stats { display: grid; gap: 10px; margin-top: 15px; padding-top: 13px; border-top: 1px solid rgba(75,91,124,.28); }
.split-stats { grid-template-columns: repeat(2, 1fr); }.quad-stats { grid-template-columns: repeat(2, 1fr); }
.split-stats span, .quad-stats span { display: grid; color: var(--muted); font-size: 11px; gap: 5px; }
.split-stats strong, .quad-stats strong { color: var(--text); font-size: 13px; }
.good-text { color: var(--green) !important; }.warning-text { color: var(--amber) !important; }.danger-text { color: var(--red) !important; }
.dashboard-lower { display: grid; grid-template-columns: 1.6fr .9fr; gap: 12px; margin-top: 12px; }
.panel { padding: var(--space-lg); }
.group-bars { display: grid; gap: 15px; margin-top: 18px; }
.group-bar-row { display: grid; grid-template-columns: 130px 1fr 50px; gap: 12px; align-items: center; font-size: 12px; }
.group-bar-row strong { text-align: right; }
.attention-list { display: grid; margin-top: 10px; }
.attention-list a { display: grid; grid-template-columns: 10px 1fr auto; gap: 9px; align-items: center; padding: 11px 0; border-bottom: 1px solid rgba(75,91,124,.25); font-size: 12px; }
.attention-list a:last-child { border-bottom: 0; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }.dot.danger { background: var(--red); box-shadow: 0 0 8px rgba(244,95,120,.5); }.dot.warning { background: var(--amber); }.dot.info { background: var(--blue); box-shadow: 0 0 8px rgba(92,141,255,.45); }
.attention-list strong { color: #dce4f7; font-size: 11px; }
.mini-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 12px; }
.mini-kpis article, .finance-kpis article { padding: 16px 18px; display: grid; gap: 6px; }
.mini-kpis span, .finance-kpis span { color: var(--muted); font-size: 12px; }.mini-kpis strong, .finance-kpis strong { font-size: 25px; letter-spacing: -.03em; }
.wide-kpi { grid-column: span 2; }
.toolbar { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 12px; }
.filterbar, .period-picker, .inline-form, .quick-form { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.period-picker input, .inline-form input { width: auto; }
label { display: grid; gap: var(--radius-sm); color: var(--text-secondary); font-size: var(--font-size-label); line-height: 1.35; }
input, select, textarea { width: 100%; min-height: 40px; border-radius: var(--radius-control); border: 1px solid var(--input-border); background: var(--input-bg); color: var(--text); padding: 9px 11px; outline: none; line-height: var(--line-height-body); transition: color 200ms ease, background-color 200ms ease, border-color 200ms ease, box-shadow 200ms ease; }
input:focus, select:focus, textarea:focus { border-color: var(--brand-primary); box-shadow: var(--focus-ring); }
textarea { resize: vertical; }
.table-panel { padding: 0; overflow: hidden; }
.table-panel > .filterbar, .table-panel > .panel-heading { padding: 16px 18px; border-bottom: 1px solid var(--line); }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { text-align: left; color: var(--muted); font-weight: 600; padding: 11px 13px; background: var(--table-header-bg); border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 13px; border-bottom: 1px solid var(--border-primary); color: var(--table-text); white-space: nowrap; }
tr:hover td { background: rgba(255,255,255,.015); }
td strong, td small { display: block; } td small { color: var(--muted); margin-top: 3px; }
.status { display: inline-flex; align-items: center; gap: 5px; padding: 5px var(--space-sm); border-radius: var(--radius-pill); font-size: var(--font-size-helper); font-weight: 650; line-height: 1.2; border: 1px solid var(--status-info-border); color: var(--status-info-text); background: var(--status-info-bg); }
.status-active, .status-paid, .status-accepted, .status-done, .status-good, .status-other_income { color: var(--status-success-text); background: var(--status-success-bg); border-color: var(--status-success-border); }
.status-reserved, .status-expiring, .status-partial, .status-expected, .status-warning, .status-planned { color: var(--status-warning-text); background: var(--status-warning-bg); border-color: var(--status-warning-border); }
.status-paused, .status-frozen { color: var(--status-accent-text); background: var(--status-accent-bg); border-color: var(--status-accent-border); }
.status-completed, .status-cancelled { color: var(--status-neutral-text); background: var(--status-neutral-bg); border-color: var(--status-neutral-border); }
.status-overdue, .status-expired, .status-danger, .status-expense { color: var(--status-danger-text); background: var(--status-danger-bg); border-color: var(--status-danger-border); }
.status-in_progress { color: var(--status-info-text); }
.form-panel { margin-top: 12px; scroll-margin-top: 80px; }
.form-panel summary { cursor: pointer; font-weight: 700; }
.form-panel[open] summary { margin-bottom: 18px; color: #97a5ff; }
.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: end; }.form-grid .wide { grid-column: span 2; }
.checkbox-label { display: flex; align-items: center; gap: 8px; min-height: 40px; }.checkbox-label input { width: 18px; min-height: 18px; }
.quick-form { display: grid; grid-template-columns: 2fr repeat(4, 1fr) auto; align-items: end; }
.card-grid { display: grid; gap: 12px; }.groups-grid { grid-template-columns: repeat(3, 1fr); }
.group-card { display: grid; gap: 14px; }.group-count { display: flex; align-items: baseline; gap: 7px; }.group-count strong { font-size: 35px; }.group-count span { color: var(--muted); }
.text-link { color: #91a1ff; font-size: 12px; }
.privacy-note { color: #afbad0; margin-bottom: 12px; border-left: 3px solid var(--primary); }
.finance-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 12px; }
.finance-kpis small { color: var(--muted); }.finance-kpis .profit { background: linear-gradient(145deg, rgba(24,61,54,.9), rgba(13,30,31,.95)); border-color: rgba(47,209,154,.25); }.finance-kpis .profit strong { color: var(--green); }
.attendance-legend { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--muted); font-size: 11px; }
.attendance-panel { padding: 0; }.attendance-table th, .attendance-table td { text-align: center; padding: 8px 5px; min-width: 38px; }.attendance-table .sticky-col { position: sticky; left: 0; text-align: left; min-width: 170px; background: #0d1628; z-index: 2; }.attendance-table td.sticky-col { background: #111a2c; }
.att { display: inline-grid; min-width: 24px; height: 24px; padding: 0 3px; place-items: center; border-radius: 6px; font-size: 9px; font-weight: 800; }.att.present { background: rgba(47,209,154,.18); color: var(--green); }.att.absent { background: rgba(244,95,120,.15); color: var(--red); }.att.sick { background: rgba(242,184,75,.16); color: var(--amber); }.att.vacation { background: rgba(156,115,255,.16); color: #b99cff; }.att.other { background: rgba(92,141,255,.16); color: #85aaff; }.att.empty { color: #42506b; }
.two-column { display: grid; grid-template-columns: 1fr 1.2fr; gap: 12px; }
.task-list { display: grid; gap: 0; padding: 0; overflow: hidden; }.task-item { border-bottom: 1px solid rgba(39,53,81,.55); }.task-item:last-child { border-bottom: 0; }.task-summary { list-style: none; display: grid; grid-template-columns: 7px minmax(220px,1fr) auto 86px 64px; align-items: center; gap: 13px; padding: 15px 16px; cursor: pointer; }.task-summary::-webkit-details-marker { display: none; }.task-summary:hover { background: rgba(125,139,255,.035); }.task-main { display: grid; gap: 4px; }.task-main small { color: var(--muted); }.priority { width: 6px; height: 28px; border-radius: 5px; background: var(--blue); }.priority-high { background: var(--red); }.priority-medium { background: var(--amber); }.priority-low { background: var(--green); }.task-summary time { color: var(--muted); font-size: 11px; }.task-expand { color: #91a1ff; font-size: 0; text-align: right; }.task-expand::before { content: "Открыть"; font-size: 11px; }.task-item[open] .task-expand::before { content: "Скрыть"; }.task-details { padding: 0 16px 18px 36px; background: rgba(7,13,24,.28); border-top: 1px solid rgba(39,53,81,.4); }.task-comment { margin: 16px 0; padding: 14px; border-radius: 11px; background: rgba(125,139,255,.06); border: 1px solid rgba(125,139,255,.14); }.task-comment span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }.task-comment p { white-space: pre-wrap; margin: 7px 0 0; line-height: 1.55; }.task-editor select { font-size: 13px; padding-right: 34px; }.task-editor textarea { line-height: 1.5; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }.span-two { grid-column: span 2; }.stack-form { display: grid; gap: 13px; margin-top: 15px; }.user-list { display: grid; margin-top: 12px; }.user-list > div { display: grid; grid-template-columns: 38px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }.user-list small { display: block; color: var(--muted); }.avatar { width: 34px; height: 34px; border-radius: 10px; background: #1b2843; display: grid; place-items: center; color: #9ca9ff; }
.demo-data-badge { position: fixed; z-index: 70; top: 76px; right: 18px; padding: 7px 11px; border: 1px solid rgba(255,190,75,.35); border-radius: 999px; background: rgba(49,35,14,.94); color: #ffd27a; box-shadow: 0 8px 24px rgba(0,0,0,.2); font-size: 11px; font-weight: 800; letter-spacing: .02em; pointer-events: none; }
.toast { position: fixed; right: 24px; top: 24px; z-index: 50; padding: 12px 16px; border-radius: 11px; background: #143328; border: 1px solid rgba(47,209,154,.4); box-shadow: var(--shadow); }.toast-error { background: #3b1720; border-color: rgba(244,95,120,.4); }
.empty-state { color: var(--muted); text-align: center; padding: 24px !important; }
.text-button { min-height: 30px; padding: 5px 8px; background: transparent; border-color: transparent; }
.row-editor { position: relative; }.row-editor summary { color: #91a1ff; cursor: pointer; white-space: nowrap; }.row-editor form { min-width: 300px; display: grid; gap: 9px; padding-top: 11px; }.row-editor input, .row-editor select { min-height: 36px; }.subscription-editor label { display: grid; gap: 5px; color: var(--muted); font-size: 10px; }.field-help { display: block; color: var(--muted); font-size: 10px; line-height: 1.35; margin-top: 5px; }.delete-form { border-top: 1px solid rgba(244,95,120,.2); margin-top: 12px; }.danger-button { color: #ff98a9; border-color: rgba(244,95,120,.3); background: rgba(244,95,120,.09); }.delete-disabled { max-width: 300px; color: var(--muted); font-size: 10px; margin: 12px 0 0; }.stack-form label { display: grid; gap: 6px; }
.editable-table input { min-width: 95px; width: 110px; min-height: 34px; padding: 6px 8px; }
.table-action { color: #a9b3ff; font-weight: 700; text-decoration: none; white-space: nowrap; }
.table-action:hover { color: #fff; }
.tariff-editors { display: grid; gap: 10px; padding: 14px 18px 18px; border-top: 1px solid var(--line); }
.embedded-editor { border: 1px solid var(--line); border-radius: 14px; background: rgba(9,16,31,.45); }
.embedded-editor > summary { cursor: pointer; padding: 14px 16px; font-weight: 750; color: #cbd3ff; }
.embedded-editor[open] > summary { border-bottom: 1px solid var(--line); }
.tariff-edit-form { padding: 16px; align-items: end; }
.tariff-edit-form .checkbox-label { min-height: 46px; }
.login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(0,1.1fr) minmax(360px,430px); align-items: center; gap: clamp(40px, 8vw, 112px); padding: clamp(28px, 7vw, 100px); max-width: 1320px; margin: auto; }
.login-brand { max-width: 620px; display: grid; justify-items: start; }
.login-logo { width: clamp(168px,18vw,224px); aspect-ratio: 1; display: block; object-fit: cover; border: 1px solid rgba(233,224,255,.2); border-radius: 34px; box-shadow: 0 26px 70px rgba(70,58,136,.3), 0 0 0 8px rgba(202,192,255,.035); }
.login-product-name { margin: 24px 0 0; color: var(--text); font-size: 20px; font-weight: 850; letter-spacing: .16em; }
.login-expansion { margin: 7px 0 0; color: #b8c4df; font-size: 12px; font-weight: 650; letter-spacing: .055em; }
.login-brand h1 { font-size: clamp(42px,5vw,64px); line-height: 1.04; letter-spacing: -.05em; margin: 24px 0 16px; }
.login-descriptor { margin: 0; color: var(--muted); font-size: 17px; line-height: 1.65; max-width: 520px; }
.login-card { position: relative; overflow: hidden; background: linear-gradient(145deg, #121d32, #0b1220); border: 1px solid var(--line); border-radius: 22px; padding: clamp(24px, 4vw, 42px); box-shadow: 0 30px 80px rgba(0,0,0,.4); }
.login-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: linear-gradient(90deg, transparent, #a896ff 38%, #f4b7ce 66%, transparent); opacity: .72; }
.login-card h2 { font-size: 30px; margin: 4px 0; }.muted { color: var(--muted); }.form-error { color: #ff9cac; background: rgba(244,95,120,.1); border: 1px solid rgba(244,95,120,.3); border-radius: 10px; padding: 10px 12px; margin-top: 16px; }.pilot-access { display: grid; gap: 5px; margin-top: 18px; padding: 13px; background: rgba(72,207,151,.06); border: 1px solid rgba(72,207,151,.18); border-radius: 10px; font-size: 11px; color: var(--muted); }.pilot-access strong { color: var(--text); }

.setup-panel { margin-bottom: 12px; border-color: rgba(125,139,255,.28); background: linear-gradient(145deg, rgba(26,35,65,.98), rgba(12,19,33,.98)); }.setup-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; }.setup-head h2 { margin: 3px 0 5px; font-size: 21px; }.setup-head p { margin: 0; color: var(--muted); }.setup-head > strong { font-size: 22px; white-space: nowrap; }.setup-progress { margin: 16px 0; }.setup-steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }.setup-step { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; min-height: 62px; padding: 10px; color: var(--text); text-decoration: none; border: 1px solid var(--line); border-radius: 11px; background: rgba(7,13,24,.35); }.setup-step > span { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; background: rgba(125,139,255,.16); color: #a9b3ff; font-weight: 800; }.setup-step strong,.setup-step small { display: block; }.setup-step strong { font-size: 12px; }.setup-step small { margin-top: 3px; color: var(--muted); font-size: 9px; }.setup-step i { color: var(--muted); font-style: normal; }.setup-step.done { opacity: .62; }.setup-step.done > span { background: rgba(72,207,151,.14); color: var(--success); }.dependency-empty { margin-top: 12px; text-align: center; padding: 34px 22px; }.dependency-empty h2 { margin: 0 0 7px; }.dependency-empty p { color: var(--muted); max-width: 560px; margin: 0 auto 16px; }.dependency-empty > div { display: flex; justify-content: center; gap: 8px; }
.mobile-attendance { display: none; }
.daily-controls { display: grid; gap: 13px; margin-bottom: 12px; }
.daily-filter { display: grid; grid-template-columns: 1fr 150px; gap: 10px; }
.date-stepper { display: grid; grid-template-columns: 42px 1fr 42px; align-items: center; text-align: center; }
.date-stepper a { display: grid; place-items: center; height: 38px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); text-decoration: none; background: #101a2e; }
.daily-bulk-actions { display: flex; gap: 8px; margin: 12px 0; }
.daily-bulk-actions .primary-button { flex: 1; }
.daily-children { display: grid; gap: 10px; padding-bottom: 90px; }
.daily-child-card { background: linear-gradient(145deg, rgba(18,29,50,.98), rgba(11,18,32,.98)); border: 1px solid var(--line); border-radius: 15px; padding: 14px; box-shadow: 0 12px 30px rgba(0,0,0,.16); }
.daily-child-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; margin-bottom: 12px; }
.daily-child-head strong { display: block; font-size: 15px; }.daily-child-head small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.subscription-note { white-space: nowrap; border-radius: 999px; padding: 5px 8px; font-size: 9px; font-weight: 800; border: 1px solid transparent; }
.subscription-note.success { color: var(--green); background: rgba(47,209,154,.1); border-color: rgba(47,209,154,.2); }
.subscription-note.warning { color: var(--amber); background: rgba(242,184,75,.1); border-color: rgba(242,184,75,.2); }
.subscription-note.danger { color: var(--red); background: rgba(244,95,120,.1); border-color: rgba(244,95,120,.2); }
.subscription-note.neutral { color: #b99cff; background: rgba(156,115,255,.1); border-color: rgba(156,115,255,.2); }
.attendance-statuses { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.status-choice { cursor: pointer; }.status-choice input { position: absolute; opacity: 0; pointer-events: none; width: 1px; min-height: 1px; }
.status-choice span { min-height: 48px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 11px; background: #0d1628; color: var(--muted); font-size: 12px; font-weight: 800; transition: .16s ease; }
.status-choice.present input:checked + span { color: var(--green); border-color: rgba(47,209,154,.55); background: rgba(47,209,154,.14); box-shadow: inset 0 0 0 1px rgba(47,209,154,.15); }
.status-choice.absent input:checked + span { color: var(--red); border-color: rgba(244,95,120,.55); background: rgba(244,95,120,.13); box-shadow: inset 0 0 0 1px rgba(244,95,120,.13); }
.status-choice.sick input:checked + span { color: var(--amber); border-color: rgba(242,184,75,.55); background: rgba(242,184,75,.13); box-shadow: inset 0 0 0 1px rgba(242,184,75,.13); }
.attendance-secondary { display: flex; gap: 16px; margin-top: 10px; color: var(--muted); font-size: 10px; }
.attendance-secondary label { display: flex; gap: 5px; align-items: center; }
.attendance-secondary input { width: auto; min-height: auto; accent-color: var(--primary); }
.daily-save-bar { position: fixed; z-index: 20; left: 12px; right: 12px; bottom: 10px; display: grid; grid-template-columns: 1fr minmax(130px, 42%); gap: 12px; align-items: center; padding: 11px 13px; border: 1px solid rgba(125,139,255,.3); border-radius: 15px; background: rgba(9,15,28,.96); box-shadow: 0 18px 45px rgba(0,0,0,.48); backdrop-filter: blur(14px); }
.daily-save-bar strong, .daily-save-bar small { display: block; }.daily-save-bar small { color: var(--muted); font-size: 9px; margin-top: 2px; }.daily-save-bar .primary-button { width: 100%; }
.children-filterbar { display: grid; grid-template-columns: minmax(260px,1fr) 170px 190px auto; align-items: end; gap: 9px; }
.children-filterbar .search-field { min-width: 0; }.children-filterbar input[type="search"] { padding-left: 13px; }
.list-view-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin: 13px 0 10px; }
.active-filters { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; min-height: 32px; }
.filter-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 9px; border-radius: 999px; border: 1px solid rgba(125,139,255,.24); background: rgba(125,139,255,.09); color: #c6ccff; font-size: 10px; text-decoration: none; }.filter-chip span { color: var(--muted); font-size: 14px; line-height: 1; }
.clear-filters { color: #91a1ff; font-size: 10px; }.filter-hint { color: var(--muted); font-size: 10px; }
.view-switch { display: inline-flex; padding: 3px; background: #0c1526; border: 1px solid var(--line); border-radius: 10px; white-space: nowrap; }.view-switch a { padding: 7px 10px; border-radius: 7px; color: var(--muted); text-decoration: none; font-size: 10px; }.view-switch a.active { color: var(--text); background: #1b2741; box-shadow: 0 4px 12px rgba(0,0,0,.2); }
.children-table.compact-view .detail-column { display: none; }
.selectable-row { cursor: pointer; transition: background .14s ease; }.selectable-row:hover, .selectable-row:focus { background: rgba(125,139,255,.06); outline: none; }.selectable-row:focus { box-shadow: inset 3px 0 0 var(--primary); }
.row-open-button { width: 31px; min-height: 31px; padding: 0; border-radius: 9px; background: #18243d; color: #9ca9ff; }
.drawer-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(2,7,15,.65); backdrop-filter: blur(3px); opacity: 0; transition: opacity 180ms ease; }.drawer-backdrop.is-open { opacity: 1; }
.child-drawer { position: fixed; z-index: 61; top: 0; right: 0; bottom: 0; width: min(430px, 94vw); overflow-y: auto; padding: 24px; border-left: 1px solid rgba(125,139,255,.25); background: linear-gradient(165deg, #121d32, #08101e 72%); box-shadow: -24px 0 70px rgba(0,0,0,.45); transform: translateX(24px); opacity: 0; transition: transform .18s ease, opacity .18s ease; }.child-drawer.open { transform: translateX(0); opacity: 1; }.child-drawer[hidden], .drawer-backdrop[hidden] { display: none; }
.drawer-open { overflow: hidden; }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }.drawer-head h2 { font-size: 26px; margin: 4px 0 10px; }.drawer-close { width: 38px; min-height: 38px; padding: 0; border-radius: 11px; font-size: 24px; background: #18243d; color: var(--muted); }
.drawer-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 17px 0; }.drawer-facts article { min-height: 94px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: rgba(15,25,43,.78); }.drawer-facts article > span, .drawer-facts article > strong, .drawer-facts article > small { display: block; }.drawer-facts article > span { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }.drawer-facts article > strong { margin-top: 8px; font-size: 14px; }.drawer-facts article > small { color: var(--muted); font-size: 9px; margin-top: 5px; }.drawer-facts a { color: var(--text); text-decoration: none; }.drawer-facts .drawer-alert { border-color: rgba(244,95,120,.25); background: rgba(244,95,120,.06); }.drawer-facts .drawer-alert strong { color: var(--red); }
.drawer-actions { display: grid; gap: 8px; padding-top: 4px; }.drawer-actions a { display: grid; place-items: center; min-height: 42px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 11px; }.drawer-actions .primary-button { border-color: transparent; }
.profile-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }.back-link { display: inline-block; color: var(--muted); text-decoration: none; margin-bottom: 15px; font-size: 11px; }.profile-title-row { display: flex; align-items: center; gap: 16px; }.profile-avatar { width: 68px; height: 68px; flex: 0 0 68px; display: grid; place-items: center; border-radius: 19px; background: linear-gradient(145deg, #6171ff, #9b68ff); color: white; font-size: 23px; font-weight: 900; box-shadow: 0 13px 32px rgba(112,91,255,.28); }.profile-title-row h1 { font-size: 34px; margin: 3px 0 8px; }.profile-meta { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 10px; }.profile-primary-actions { display: flex; gap: 8px; }.profile-primary-actions a { min-height: 42px; display: grid; place-items: center; padding: 8px 15px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 11px; }.profile-primary-actions .primary-button { border-color: transparent; }
.profile-tabs { display: flex; gap: 5px; overflow-x: auto; padding: 5px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(13,22,40,.72); }.profile-tabs a { white-space: nowrap; padding: 9px 13px; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: 11px; }.profile-tabs a.active { color: white; background: #1b2845; box-shadow: 0 5px 16px rgba(0,0,0,.22); }
.profile-overview-grid { display: grid; grid-template-columns: minmax(0,1fr) 310px; gap: 13px; }.profile-main-column { min-width: 0; }.profile-side-column { display: grid; align-content: start; gap: 13px; }
.profile-kpis { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-bottom: 13px; }.profile-kpis article { min-height: 112px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(145deg, #121d32, #0b1322); }.profile-kpis span, .profile-kpis strong, .profile-kpis small { display: block; }.profile-kpis span { color: var(--muted); font-size: 10px; }.profile-kpis strong { margin-top: 13px; font-size: 20px; }.profile-kpis small { color: var(--muted); font-size: 9px; margin-top: 5px; }.profile-kpis .alert-card { border-color: rgba(244,95,120,.25); background: linear-gradient(145deg, rgba(58,22,34,.8), #0b1322); }.profile-kpis .alert-card strong { color: var(--red); }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 13px; }.section-head h2 { font-size: 18px; margin: 3px 0 0; }.section-head > a { color: #91a1ff; font-size: 10px; text-decoration: none; }.section-head .primary-button { color: white; }
.profile-events { padding: 17px; }.event-timeline { display: grid; }.event-timeline article { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid rgba(39,53,81,.55); }.event-timeline article:last-child { border-bottom: 0; }.event-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: rgba(47,209,154,.1); color: var(--green); font-weight: 900; }.event-icon.event-attendance { background: rgba(92,141,255,.1); color: #85aaff; }.event-timeline strong, .event-timeline small { display: block; }.event-timeline small, .event-timeline time { color: var(--muted); font-size: 9px; margin-top: 3px; }
.contact-card, .profile-note-preview { padding: 17px; }.contact-card h2 { font-size: 17px; margin: 8px 0; }.contact-phone { display: inline-block; color: #9ca9ff; text-decoration: none; font-weight: 800; margin-bottom: 16px; }.contact-card dl { display: grid; gap: 0; margin: 0; }.contact-card dl div { display: flex; justify-content: space-between; gap: 8px; padding: 9px 0; border-top: 1px solid var(--line); }.contact-card dt { color: var(--muted); font-size: 9px; }.contact-card dd { margin: 0; font-size: 10px; font-weight: 700; text-align: right; }.profile-note-preview > p:not(.eyebrow) { color: #c3ccdf; line-height: 1.6; font-size: 11px; }.profile-note-preview a { color: #91a1ff; text-decoration: none; font-size: 10px; }
.profile-section { padding: 18px; }.profile-attendance-summary { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-bottom: 12px; }.profile-attendance-summary article { padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: #101a2c; }.profile-attendance-summary span, .profile-attendance-summary strong { display: block; }.profile-attendance-summary span { color: var(--muted); font-size: 10px; }.profile-attendance-summary strong { margin-top: 9px; font-size: 22px; }.attendance-history { display: grid; grid-template-columns: repeat(2,1fr); gap: 7px; }.attendance-history article { display: grid; grid-template-columns: 90px 34px 1fr; align-items: center; gap: 8px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: #0e1728; }.attendance-history time { color: var(--muted); font-size: 10px; }.profile-notes > article { max-width: 760px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: #0e1728; }.profile-notes p { white-space: pre-wrap; line-height: 1.65; }.profile-notes small { color: var(--muted); }
.quick-actions-shell { position: relative; margin-left: auto; margin-right: 10px; }.quick-actions-trigger { width: 40px; min-height: 40px; padding: 0; display: grid; place-items: center; border-radius: 12px; border-color: rgba(125,139,255,.3); background: linear-gradient(145deg, #5f70ff, #8f67ff); color: white; font-size: 23px; line-height: 1; box-shadow: 0 10px 24px rgba(112,91,255,.22); }.quick-actions-menu { position: absolute; z-index: 70; top: calc(100% + 12px); right: 0; width: 310px; padding: 12px; border: 1px solid rgba(125,139,255,.25); border-radius: 15px; background: linear-gradient(155deg, #142039, #0a1220); box-shadow: 0 24px 65px rgba(0,0,0,.48); }.quick-actions-menu[hidden] { display: none; }.quick-actions-menu > div:first-child { padding: 5px 7px 11px; }.quick-actions-menu > div:first-child strong { font-size: 15px; }.quick-actions-menu > a { display: grid; grid-template-columns: 35px 1fr; gap: 10px; align-items: center; padding: 10px 8px; border-top: 1px solid rgba(39,53,81,.55); color: var(--text); text-decoration: none; }.quick-actions-menu > a:hover { background: rgba(125,139,255,.06); }.quick-actions-menu > a > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: rgba(125,139,255,.11); color: #9ca9ff; font-weight: 900; }.quick-actions-menu a strong, .quick-actions-menu a small { display: block; }.quick-actions-menu a strong { font-size: 11px; }.quick-actions-menu a small { color: var(--muted); font-size: 9px; margin-top: 3px; }
.active-list-filter { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; padding: 10px 14px; color: #c6ccff; font-size: 10px; border-color: rgba(125,139,255,.25); background: rgba(125,139,255,.07); }.active-list-filter a { color: #91a1ff; }

/* Tasks: approved desktop/mobile flow with in-app reminders. */
.task-board { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, rgba(18,28,48,.98), rgba(12,19,33,.98)); box-shadow: var(--shadow); }
.task-board-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }.task-board-head h2 { margin: 0; font-size: 17px; }.task-board-head p, .task-board-head > span { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.task-card-list { display: grid; gap: 8px; }.task-card { position: relative; display: grid; grid-template-columns: 7px minmax(240px,1fr) auto auto; gap: 12px; align-items: center; min-height: 72px; padding: 12px 13px; border: 1px solid rgba(39,53,81,.8); border-radius: 13px; background: rgba(10,18,33,.72); }.task-card-overdue { border-color: rgba(244,95,120,.22); }.task-card-done { opacity: .7; }
.task-priority-line { align-self: stretch; width: 5px; min-height: 38px; border-radius: 5px; background: var(--blue); }.task-priority-line.priority-high { background: var(--red); }.task-priority-line.priority-medium { background: var(--amber); }.task-priority-line.priority-low { background: var(--green); }
.task-card-main { display: grid; gap: 5px; min-width: 0; }.task-card-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }.task-card-main span { color: var(--muted); font-size: 10px; line-height: 1.45; }
.task-card-actions { display: flex; align-items: center; gap: 7px; }.task-card-actions form { margin: 0; }.task-complete-button, .task-edit-button { min-height: 36px; padding: 7px 10px; font-size: 10px; font-weight: 750; white-space: nowrap; }.task-complete-button { color: #92eccd; border-color: rgba(47,209,154,.24); background: rgba(47,209,154,.09); }.task-edit-button { color: #c7ceff; }
.task-extra { grid-column: 2 / -1; border-top: 1px solid rgba(39,53,81,.55); }.task-extra summary { width: max-content; padding: 9px 0 2px; color: #9ba8ff; cursor: pointer; font-size: 10px; }.task-extra > div { padding: 8px 0 2px; }.task-extra p { margin: 0 0 9px; color: #c4ccdc; white-space: pre-wrap; font-size: 11px; line-height: 1.55; }.task-extra small { color: var(--muted); font-size: 9px; }.task-reminder-chips { display: flex; gap: 6px; flex-wrap: wrap; }.task-reminder-chips span { padding: 5px 8px; border: 1px solid rgba(125,139,255,.22); border-radius: 999px; color: #c5ccff; background: rgba(125,139,255,.08); font-size: 9px; }
.dashboard-tasks-panel { margin-top: 12px; }.dashboard-task-list { display: grid; gap: 7px; margin-top: 13px; }.dashboard-task-list article { display: grid; grid-template-columns: 7px 1fr auto; gap: 10px; align-items: center; min-height: 54px; padding: 9px 11px; border: 1px solid rgba(39,53,81,.7); border-radius: 11px; background: rgba(7,13,24,.34); }.dashboard-task-list article > div { display: grid; gap: 4px; }.dashboard-task-list article strong { font-size: 12px; }.dashboard-task-list article span { color: var(--muted); font-size: 9px; }.dashboard-task-list button { min-height: 36px; color: #92eccd; border-color: rgba(47,209,154,.24); background: rgba(47,209,154,.09); font-size: 10px; font-weight: 750; }
.task-form-dialog { width: min(650px, calc(100vw - 28px)); max-height: min(90vh, 820px); padding: 0; border: 0; border-radius: 20px; color: var(--text); background: transparent; overflow: visible; }.task-form-dialog::backdrop { background: rgba(2,6,18,.78); backdrop-filter: blur(4px); }.task-dialog-card { max-height: min(90vh, 820px); overflow-y: auto; padding: 20px; border: 1px solid rgba(125,139,255,.28); border-radius: 20px; background: linear-gradient(155deg, #142039, #09111f); box-shadow: 0 30px 85px rgba(0,0,0,.6); animation: ui-dialog-in 220ms cubic-bezier(.2,.8,.2,1) both; }.task-form-dialog.is-closing .task-dialog-card { animation: ui-dialog-out 140ms ease both; }.task-dialog-card > header { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 18px; }.task-dialog-card h2 { margin: 3px 0 5px; font-size: 24px; }.task-dialog-card header span { color: var(--muted); font-size: 10px; }.task-dialog-close { width: 40px; min-width: 40px; min-height: 40px; padding: 0; font-size: 22px; }
.task-form { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }.task-form .wide { grid-column: 1 / -1; }.task-date-grid { display: grid; grid-template-columns: 1fr 1fr 150px; gap: 10px; align-items: end; }.task-date-grid small { color: var(--muted); font-size: 9px; }.task-all-day { min-height: 62px; display: flex; align-items: center; gap: 9px; padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: rgba(14,23,40,.85); color: var(--text); }.task-all-day input { width: 18px; min-height: 18px; accent-color: var(--primary); }.task-time-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; overflow: hidden; transition: opacity 160ms ease, max-height 180ms cubic-bezier(.2,.8,.2,1); max-height: 90px; }.task-time-grid.is-all-day { max-height: 0; opacity: 0; pointer-events: none; }
.task-reminders { min-width: 0; margin: 0; padding: 13px; border: 1px solid var(--line); border-radius: 12px; }.task-reminders legend { padding: 0 5px; color: var(--text); font-size: 12px; font-weight: 800; }.task-reminders > p { margin: 0 0 10px; color: var(--muted); font-size: 9px; }.reminder-presets { display: flex; gap: 6px; flex-wrap: wrap; }.reminder-preset { min-height: 34px; padding: 6px 10px; border-radius: 999px; font-size: 9px; }.reminder-preset[aria-pressed="true"] { color: white; border-color: rgba(125,139,255,.55); background: rgba(125,139,255,.2); }.reminder-rows { display: grid; gap: 7px; margin-top: 10px; }.reminder-rows label { display: grid; grid-template-columns: 110px 1fr 36px; gap: 8px; align-items: center; padding: 7px 8px; border: 1px solid rgba(39,53,81,.65); border-radius: 10px; background: rgba(7,13,24,.35); }.reminder-rows input { min-height: 36px; }.reminder-remove { width: 36px; min-height: 36px; padding: 0; color: var(--muted); }.reminder-add { min-height: 36px; margin-top: 9px; font-size: 9px; }.task-form-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 3px; }.task-form-actions button { min-width: 150px; }
.toast-reminder { background: #182348; border-color: rgba(125,139,255,.48); }.toast-reminder .toast-icon { color: #c7ceff; background: rgba(125,139,255,.18); }

/* Motion layer: short, task-focused transitions without a runtime dependency. */
:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: 3px; }
button:disabled, .primary-button[aria-disabled="true"], .secondary-button[aria-disabled="true"] { cursor: not-allowed; opacity: .52; transform: none !important; box-shadow: none; }
button:active:not(:disabled), .primary-button:active:not([aria-disabled="true"]), .secondary-button:active:not([aria-disabled="true"]), .is-pressed { transform: scale(.975) !important; }
button.is-submitting { cursor: wait; justify-content: center; }
.button-busy-content { display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; }
.button-spinner { width: 14px; height: 14px; flex: 0 0 14px; border: 2px solid rgba(255,255,255,.35); border-top-color: currentColor; border-radius: 50%; animation: ui-spin 700ms linear infinite; }
@media (hover: hover) and (pointer: fine) {
  button:hover:not(:disabled), .secondary-button:hover:not([aria-disabled="true"]) { border-color: #50628c; transform: translateY(-1px); }
  .primary-button:hover:not([aria-disabled="true"]) { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(109,124,255,.3); }
  .main-nav a:hover, .quick-actions-menu > a:hover, .filter-chip:hover, .view-switch a:hover { color: var(--text); background-color: rgba(125,139,255,.07); }
}

.quick-actions-menu { opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(-7px) scale(.99); transform-origin: top right; transition: opacity 170ms ease, transform 190ms cubic-bezier(.2,.8,.2,1), visibility 0s linear 190ms; }
.quick-actions-menu.is-open { opacity: 1; visibility: visible; pointer-events: auto; transform: none; transition-delay: 0s; }
.ui-scrim { position: fixed; inset: 0; z-index: 55; background: rgba(2,7,15,.66); opacity: 0; transition: opacity 180ms ease; }
.ui-scrim.is-open { opacity: 1; }
.ui-scrim[hidden] { display: none; }
body.overlay-open { overflow: hidden; }

.toast-stack { position: fixed; z-index: 100; right: 24px; top: 24px; display: grid; gap: 9px; width: min(370px, calc(100vw - 32px)); pointer-events: none; }
.toast { position: static; display: grid; grid-template-columns: 26px 1fr auto; align-items: start; gap: 10px; padding: 12px 12px 12px 14px; border-radius: 13px; background: #123128; border: 1px solid rgba(47,209,154,.4); box-shadow: 0 20px 55px rgba(0,0,0,.4); pointer-events: auto; }
.toast-warning, .toast-error { background: #341923; border-color: rgba(244,95,120,.42); }
.toast-icon { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 8px; background: rgba(47,209,154,.15); color: #75e7c1; font-weight: 900; }
.toast-warning .toast-icon, .toast-error .toast-icon { color: #ff9caf; background: rgba(244,95,120,.14); }
.toast-message { min-width: 0; line-height: 1.35; }
.toast-message strong, .toast-message > span { display: block; }
.toast-message strong { font-size: 12px; }
.toast-message > span { margin-top: 2px; color: #bec8da; font-size: 11px; }
.toast-action { display: inline-block; margin-top: 7px; color: #b8c0ff; font-size: 10px; font-weight: 800; }
.toast-close { width: 32px; min-height: 32px; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 20px; }
.toast.is-entering { animation: ui-toast-in 190ms cubic-bezier(.2,.8,.2,1) both; }
.toast.is-leaving { animation: ui-toast-out 140ms ease both; }

.ui-dialog { width: min(470px, calc(100vw - 28px)); padding: 0; border: 0; background: transparent; color: var(--text); overflow: visible; }
.ui-dialog::backdrop { background: rgba(2,6,18,.74); backdrop-filter: blur(3px); animation: ui-fade-in 180ms ease both; }
.ui-dialog-card { padding: 22px; border: 1px solid rgba(125,139,255,.25); border-radius: 18px; background: linear-gradient(155deg, #142039, #09111f); box-shadow: 0 28px 80px rgba(0,0,0,.55); animation: ui-dialog-in 220ms cubic-bezier(.2,.8,.2,1) both; }
.ui-dialog.is-closing .ui-dialog-card { animation: ui-dialog-out 140ms ease both; }
.ui-dialog.is-closing::backdrop { animation: ui-fade-out 140ms ease both; }
.ui-dialog-icon { width: 42px; height: 42px; display: grid; place-items: center; margin-bottom: 14px; border-radius: 12px; background: rgba(109,124,255,.14); color: #aeb7ff; font-weight: 900; }
.ui-dialog.is-danger .ui-dialog-icon { background: rgba(244,95,120,.13); color: #ff9caf; }
.ui-dialog h2 { margin: 0 0 8px; font-size: 20px; }
.ui-dialog p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.ui-dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; }
.ui-dialog.is-danger [data-confirm-accept] { color: #fff; background: #b93d55; box-shadow: 0 9px 24px rgba(185,61,85,.22); }

.status { transition: color 140ms ease, background-color 140ms ease, border-color 140ms ease, transform 160ms cubic-bezier(.2,.8,.2,1); }
.status.is-updating { transform: scale(1.035); }
tr.new-row td { animation: ui-new-row 1100ms ease-out both; }

.motion-kpi { animation: ui-kpi-in 300ms cubic-bezier(.2,.8,.2,1) both; }
.motion-kpi:nth-child(2) { animation-delay: 45ms; }
.motion-kpi:nth-child(3) { animation-delay: 90ms; }
.motion-progress > span, .motion-progress > i { transform-origin: left center; animation: ui-progress-in 480ms cubic-bezier(.2,.8,.2,1) 70ms both; }

.form-panel > summary, .embedded-editor > summary, .row-editor > summary, .info-accordion > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; transition: color 160ms ease, background-color 160ms ease; }
.form-panel > summary::-webkit-details-marker, .embedded-editor > summary::-webkit-details-marker, .row-editor > summary::-webkit-details-marker, .info-accordion > summary::-webkit-details-marker { display: none; }
.form-panel > summary::after, .embedded-editor > summary::after, .row-editor > summary::after, .info-accordion > summary::after { content: "⌄"; color: var(--muted); font-size: 14px; transition: transform 180ms ease; }
.form-panel[open] > summary::after, .embedded-editor[open] > summary::after, .row-editor[open] > summary::after, .info-accordion[open] > summary::after { transform: rotate(180deg); }
.form-panel[open] > form, .embedded-editor[open] > form, .row-editor[open] > form, .info-accordion[open] > div, .task-item[open] > .task-details { animation: ui-detail-in 180ms cubic-bezier(.2,.8,.2,1) both; }
.info-accordion { margin: -2px 0 12px; padding: 0; overflow: hidden; }
.info-accordion > summary { min-height: 48px; padding: 0 16px; cursor: pointer; color: #b9c3da; font-size: 12px; font-weight: 700; }
.info-accordion > div { padding: 0 16px 15px; color: var(--muted); font-size: 11px; line-height: 1.55; }

@keyframes ui-spin { to { transform: rotate(360deg); } }
@keyframes ui-toast-in { from { opacity: 0; transform: translateY(-7px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes ui-toast-out { to { opacity: 0; transform: translateY(-5px) scale(.99); } }
@keyframes ui-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes ui-fade-out { to { opacity: 0; } }
@keyframes ui-dialog-in { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes ui-dialog-out { to { opacity: 0; transform: translateY(5px) scale(.99); } }
@keyframes ui-new-row { 0% { background: rgba(47,209,154,.2); transform: translateY(-3px); } 32% { background: rgba(47,209,154,.12); transform: none; } 100% { background: transparent; transform: none; } }
@keyframes ui-kpi-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
@keyframes ui-progress-in { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes ui-detail-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0ms !important; }
  .button-spinner { animation: none; border-top-color: transparent; }
  .motion-progress > span, .motion-progress > i { transform: none !important; }
}
@media (max-width: 1100px) { .dashboard-grid { grid-template-columns: 1fr 1fr; }.kpi-card:last-child { grid-column: span 2; }.groups-grid { grid-template-columns: 1fr 1fr; }.two-column { grid-template-columns: 1fr; }.task-summary { grid-template-columns: 7px 1fr auto 80px 58px; }.quick-form { grid-template-columns: 1fr 1fr 1fr; }.main-nav { grid-template-columns: repeat(5,1fr); }.login-page { grid-template-columns: 1fr 420px; gap: 40px; }}
@media (max-width: 760px) {
  .demo-data-badge { top: 68px; right: 10px; padding: 6px 9px; font-size: 10px; }
  .app-shell { width: 100%; }.topbar { margin: 0; border-radius: 0; padding: 11px 14px; }.brand small, .user-name, .role-badge { display: none; }.mobile-menu { display: inline-grid; place-items: center; order: 2; }.quick-actions-shell { order: 3; margin: 0; }.user-block { order: 4; }.quick-actions-menu { position: fixed; top: 66px; left: 12px; right: 12px; width: auto; }.main-nav { display: none; grid-template-columns: repeat(2,1fr); position: sticky; top: 0; padding: 8px; }.main-nav.open { display: grid; }.workspace { padding: 16px 12px; border: 0; }.page-heading { align-items: flex-start; flex-direction: column; }.page-heading .primary-button { width: 100%; }.dashboard-grid, .dashboard-lower, .mini-kpis, .finance-kpis, .groups-grid, .settings-grid { grid-template-columns: 1fr; }.kpi-card:last-child, .wide-kpi, .span-two { grid-column: auto; }.dashboard-grid .kpi-card { min-height: 0; }.group-bar-row { grid-template-columns: 90px 1fr 42px; }.mini-kpis { grid-template-columns: 1fr 1fr; }.form-grid { grid-template-columns: 1fr; }.form-grid .wide { grid-column: auto; }.quick-form { grid-template-columns: 1fr; }.toolbar { align-items: stretch; flex-direction: column; }.toolbar form { width: 100%; }.toolbar form > * { flex: 1; }.task-summary { grid-template-columns: 7px 1fr auto; align-items: start; }.task-summary time { grid-column: 2; }.task-expand { grid-column: 3; grid-row: 2; }.task-details { padding: 0 12px 16px; }.login-page { grid-template-columns: 1fr; padding: 24px 16px; }.login-brand h1 { font-size: 42px; }.login-brand > p:not(.eyebrow), .login-metrics { display: none; }.login-card { padding: 24px 20px; }.setup-head { align-items: center; }.setup-steps { grid-template-columns: 1fr; }.dependency-empty > div { flex-direction: column; }.desktop-attendance { display: none; }.mobile-attendance { display: block; }.attendance-heading { margin-bottom: 12px; }.daily-filter { grid-template-columns: 1fr 145px; }.attendance-table .sticky-col { min-width: 140px; }.children-filterbar { grid-template-columns: 1fr; }.list-view-row { align-items: flex-start; flex-direction: column; }.view-switch { width: 100%; }.view-switch a { flex: 1; text-align: center; }.child-drawer { top: auto; left: 0; width: 100%; height: min(78vh, 680px); padding: 18px; border-left: 0; border-top: 1px solid rgba(125,139,255,.25); border-radius: 20px 20px 0 0; transform: translateY(24px); }.child-drawer.open { transform: translateY(0); }.drawer-facts { grid-template-columns: 1fr 1fr; }.profile-heading { align-items: stretch; flex-direction: column; }.profile-title-row { align-items: flex-start; }.profile-avatar { width: 54px; height: 54px; flex-basis: 54px; border-radius: 15px; font-size: 18px; }.profile-title-row h1 { font-size: 26px; }.profile-meta { flex-wrap: wrap; }.profile-primary-actions { display: grid; grid-template-columns: 1fr 1fr; }.profile-primary-actions a { padding: 7px 10px; }.profile-overview-grid { grid-template-columns: 1fr; }.profile-kpis { grid-template-columns: 1fr; }.profile-kpis article { min-height: 0; }.profile-tabs { margin-left: -12px; margin-right: -12px; border-left: 0; border-right: 0; border-radius: 0; }.profile-attendance-summary { grid-template-columns: 1fr 1fr; }.profile-attendance-summary article:first-child { grid-column: span 2; }.attendance-history { grid-template-columns: 1fr; }.profile-section { padding: 14px; }
}

@media (max-width: 760px) {
  .mobile-menu, .quick-actions-trigger, .icon-button { min-width: 44px; min-height: 44px; }
  .topbar { position: sticky; top: 0; z-index: 80; background: rgba(13,20,35,.985); backdrop-filter: none; }
  .main-nav { display: grid !important; position: fixed; z-index: 72; top: 66px; left: 12px; right: 12px; max-height: calc(100vh - 86px); overflow-y: auto; border-radius: 16px; box-shadow: 0 24px 65px rgba(0,0,0,.5); opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(-8px) scale(.99); transform-origin: top center; transition: opacity 170ms ease, transform 200ms cubic-bezier(.2,.8,.2,1), visibility 0s linear 200ms; }
  .main-nav.open { opacity: 1; visibility: visible; pointer-events: auto; transform: none; transition-delay: 0s; }
  .main-nav a { min-height: 44px; display: grid; place-items: center; }
  .nav-scrim { display: block; z-index: 70; }
  .quick-actions-scrim { display: block; z-index: 73; }
  .quick-actions-menu { display: block; z-index: 74; top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-height: min(76vh, 620px); overflow-y: auto; padding: 14px 14px max(18px, env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; transform: translateY(calc(100% + 24px)); transform-origin: bottom center; opacity: 1; visibility: hidden; }
  .quick-actions-menu::before { content: ""; display: block; width: 42px; height: 4px; margin: 0 auto 10px; border-radius: 10px; background: #42506c; }
  .quick-actions-menu.is-open { visibility: visible; transform: translateY(0); }
  .quick-actions-menu > a { min-height: 54px; }
  .toast-stack { top: 12px; right: 12px; left: 12px; width: auto; }
  .toast { grid-template-columns: 26px 1fr 36px; }
  .ui-dialog-actions { flex-direction: column-reverse; }
  .ui-dialog-actions button { width: 100%; min-height: 46px; }
  .task-kpis { grid-template-columns: 1fr 1fr; }
  .task-board { margin: 0 -12px; padding: 14px 12px; border-left: 0; border-right: 0; border-radius: 0; }
  .task-card { grid-template-columns: 6px minmax(0,1fr) auto; gap: 9px; padding: 12px 10px; }
  .task-card-main { grid-column: 2 / -1; }.task-card-main strong { white-space: normal; }
  .task-card > .status { grid-column: 3; grid-row: 1; align-self: start; }
  .task-card-actions { grid-column: 2 / -1; display: grid; grid-template-columns: 1fr 44px; }
  .task-card-actions form, .task-complete-button { width: 100%; }.task-edit-button { width: 44px; min-height: 44px; overflow: hidden; font-size: 0; }.task-edit-button::before { content: "✎"; font-size: 15px; }
  .task-extra { grid-column: 2 / -1; }
  .dashboard-task-list article { grid-template-columns: 6px 1fr; }.dashboard-task-list article form { grid-column: 2; }.dashboard-task-list button { width: 100%; min-height: 44px; }
  .task-form-dialog { inset: auto 0 0; width: 100%; max-width: none; max-height: min(92vh, 820px); margin: 0; border-radius: 22px 22px 0 0; }
  .task-dialog-card { max-height: min(92vh, 820px); padding: 17px 14px max(18px, env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; }
  .task-dialog-card::before { content: ""; display: block; width: 42px; height: 4px; margin: -5px auto 13px; border-radius: 10px; background: #42506c; }
  .task-form { grid-template-columns: 1fr; }.task-form .wide { grid-column: auto; }
  .task-date-grid { grid-template-columns: 1fr; }.task-time-grid { grid-template-columns: 1fr 1fr; }
  .task-all-day { min-height: 48px; }.reminder-rows label { grid-template-columns: 90px 1fr 42px; }.reminder-remove { width: 42px; min-height: 42px; }
  .task-form-actions { position: sticky; bottom: -18px; z-index: 2; display: grid; grid-template-columns: 1fr 1fr; margin: 4px -14px -18px; padding: 12px 14px max(14px, env(safe-area-inset-bottom)); background: rgba(9,15,28,.97); border-top: 1px solid var(--line); }
  .task-form-actions button { min-width: 0; min-height: 46px; }
}

/* Theme controls and the single Light Theme layer. */
.theme-toggle { position: relative; flex: 0 0 auto; display: grid; place-items: center; margin-right: 2px; color: var(--text); background: var(--surface-3); }
.theme-toggle [data-theme-icon] { font-size: 16px; line-height: 1; }
.theme-toggle::after { content: attr(aria-label); position: absolute; z-index: 90; right: 0; top: calc(100% + 9px); width: max-content; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: var(--surface-primary); box-shadow: var(--shadow-sm); font-size: 10px; font-weight: 650; opacity: 0; visibility: hidden; transform: translateY(-3px); pointer-events: none; transition: opacity 160ms ease, transform 160ms ease, visibility 0s linear 160ms; }
.theme-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-top: 16px; }
.theme-option { position: relative; grid-template-columns: 92px 1fr; align-items: center; gap: 13px; min-height: 82px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; color: var(--text); background: var(--surface-secondary); cursor: pointer; }
.theme-option input { position: absolute; width: 1px; min-height: 1px; opacity: 0; pointer-events: none; }
.theme-option:has(input:checked) { border-color: var(--brand-primary); box-shadow: 0 0 0 3px rgba(49,94,219,.12); }
.theme-option:focus-within { outline: 2px solid var(--brand-primary); outline-offset: 2px; }
.theme-option > span:last-child { display: grid; gap: 4px; }
.theme-option strong { font-size: 13px; }.theme-option small { color: var(--muted); font-size: 10px; }
.theme-option-preview { position: relative; display: grid; grid-template-columns: 24px 1fr; grid-template-rows: 14px 1fr; gap: 5px; width: 82px; height: 56px; padding: 6px; border-radius: 9px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(109,124,255,.18); }
.theme-option-preview i { display: block; border-radius: 4px; }.theme-option-preview i:first-child { grid-row: 1 / 3; }.theme-option-preview i:nth-child(2) { grid-column: 2; }.theme-option-preview i:nth-child(3) { grid-column: 2; }
.theme-preview-dark { background: #070b14; }.theme-preview-dark i:first-child { background: #111f46; }.theme-preview-dark i:nth-child(2) { background: #4f78ff; }.theme-preview-dark i:nth-child(3) { background: #172954; }
.theme-preview-light { background: #f4f7fb; }.theme-preview-light i:first-child { background: #0b1533; }.theme-preview-light i:nth-child(2) { background: #315edb; }.theme-preview-light i:nth-child(3) { background: #fff; box-shadow: inset 0 0 0 1px #e2e7ef; }
@media (hover: hover) and (pointer: fine) { .theme-toggle:hover::after { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; } }
@media (hover: none), (pointer: coarse) { .theme-toggle::after { display: none; } }

:root[data-theme="light"] body { background: radial-gradient(circle at 20% -10%, var(--body-accent) 0, transparent 34%), var(--bg); }
:root[data-theme="light"] .topbar { background: var(--header-bg); }
:root[data-theme="light"] .brand small, :root[data-theme="light"] .user-block { color: var(--muted); }
:root[data-theme="light"] .user-name { color: var(--text); }
:root[data-theme="light"] .role-badge, :root[data-theme="light"] .soft-badge { border-color: var(--status-neutral-border); background: var(--status-neutral-bg); color: var(--status-neutral-text); }
:root[data-theme="light"] .theme-toggle, :root[data-theme="light"] .icon-button, :root[data-theme="light"] .secondary-button, :root[data-theme="light"] button:not(.primary-button):not(.quick-actions-trigger):not(.danger-button) { color: var(--text); background: var(--surface-secondary); border-color: var(--line); }
:root[data-theme="light"] .main-nav { color-scheme: dark; background: var(--sidebar-bg); border-color: var(--border-secondary); }
:root[data-theme="light"] .main-nav a { color: var(--sidebar-text-muted); }
:root[data-theme="light"] .main-nav a:hover, :root[data-theme="light"] .main-nav a.active { color: var(--sidebar-text); }
:root[data-theme="light"] .workspace { background: var(--workspace-bg); }
:root[data-theme="light"] .panel, :root[data-theme="light"] .kpi-card, :root[data-theme="light"] .mini-kpis article, :root[data-theme="light"] .finance-kpis article, :root[data-theme="light"] .task-board { background: var(--panel-gradient); border-color: var(--line); box-shadow: var(--shadow-sm); }
:root[data-theme="light"] .kpi-card::before { background: rgba(49,94,219,.07); }
:root[data-theme="light"] .card-icon, :root[data-theme="light"] .avatar, :root[data-theme="light"] .row-open-button, :root[data-theme="light"] .drawer-close { background: #edf2ff; color: var(--brand-primary); }
:root[data-theme="light"] .progress { background: #e8edf5; }
:root[data-theme="light"] .split-stats, :root[data-theme="light"] .quad-stats, :root[data-theme="light"] .attention-list a, :root[data-theme="light"] .event-timeline article { border-color: var(--line); }
:root[data-theme="light"] .attention-list strong, :root[data-theme="light"] .profile-note-preview > p:not(.eyebrow), :root[data-theme="light"] .task-extra p { color: var(--text-secondary); }
:root[data-theme="light"] .eyebrow, :root[data-theme="light"] .text-link, :root[data-theme="light"] .table-action, :root[data-theme="light"] .clear-filters, :root[data-theme="light"] .section-head > a, :root[data-theme="light"] .profile-note-preview a, :root[data-theme="light"] .contact-phone, :root[data-theme="light"] .row-editor summary, :root[data-theme="light"] .task-extra summary { color: var(--link) !important; }
:root[data-theme="light"] input, :root[data-theme="light"] select, :root[data-theme="light"] textarea { background: var(--input-bg); border-color: var(--input-border); color: var(--text); }
:root[data-theme="light"] input::placeholder, :root[data-theme="light"] textarea::placeholder { color: #8a95aa; }
:root[data-theme="light"] th { color: var(--muted); background: var(--table-header-bg); }
:root[data-theme="light"] td { color: var(--table-text); border-color: var(--line); background: var(--surface-primary); }
:root[data-theme="light"] tr:hover td, :root[data-theme="light"] .selectable-row:hover, :root[data-theme="light"] .selectable-row:focus { background: #f1f5fc; }
:root[data-theme="light"] .attendance-table .sticky-col, :root[data-theme="light"] .attendance-table td.sticky-col { background: var(--table-header-bg); }
:root[data-theme="light"] .status { color: var(--status-info-text); background: var(--status-info-bg); border-color: var(--status-info-border); }
:root[data-theme="light"] .status-active, :root[data-theme="light"] .status-paid, :root[data-theme="light"] .status-accepted, :root[data-theme="light"] .status-done, :root[data-theme="light"] .status-good, :root[data-theme="light"] .status-other_income { color: var(--status-success-text); background: var(--status-success-bg); border-color: var(--status-success-border); }
:root[data-theme="light"] .status-reserved, :root[data-theme="light"] .status-expiring, :root[data-theme="light"] .status-partial, :root[data-theme="light"] .status-expected, :root[data-theme="light"] .status-warning, :root[data-theme="light"] .status-planned { color: var(--status-warning-text); background: var(--status-warning-bg); border-color: var(--status-warning-border); }
:root[data-theme="light"] .status-paused, :root[data-theme="light"] .status-frozen { color: var(--status-accent-text); background: var(--status-accent-bg); border-color: var(--status-accent-border); }
:root[data-theme="light"] .status-completed, :root[data-theme="light"] .status-cancelled { color: var(--status-neutral-text); background: var(--status-neutral-bg); border-color: var(--status-neutral-border); }
:root[data-theme="light"] .status-overdue, :root[data-theme="light"] .status-expired, :root[data-theme="light"] .status-danger, :root[data-theme="light"] .status-expense { color: var(--status-danger-text); background: var(--status-danger-bg); border-color: var(--status-danger-border); }
:root[data-theme="light"] .finance-kpis .profit { background: linear-gradient(145deg, #f0fbf7, #ffffff); border-color: #bee8d9; }
:root[data-theme="light"] .date-stepper a, :root[data-theme="light"] .status-choice span, :root[data-theme="light"] .task-all-day, :root[data-theme="light"] .profile-attendance-summary article, :root[data-theme="light"] .attendance-history article, :root[data-theme="light"] .profile-notes > article, :root[data-theme="light"] .embedded-editor, :root[data-theme="light"] .view-switch { background: var(--surface-secondary); }
:root[data-theme="light"] .view-switch a.active, :root[data-theme="light"] .profile-tabs a.active { color: var(--text); background: #e8eefb; box-shadow: var(--shadow-sm); }
:root[data-theme="light"] .profile-tabs { background: var(--surface-primary); }
:root[data-theme="light"] .child-drawer { background: var(--dialog-gradient); border-color: var(--line); box-shadow: -24px 0 70px rgba(25,42,79,.16); }
:root[data-theme="light"] .drawer-facts article { background: var(--surface-secondary); }
:root[data-theme="light"] .drawer-backdrop, :root[data-theme="light"] .ui-scrim { background: var(--overlay-bg); }
:root[data-theme="light"] .quick-actions-menu, :root[data-theme="light"] .task-dialog-card, :root[data-theme="light"] .ui-dialog-card { color: var(--text); background: var(--dialog-gradient); border-color: var(--line); box-shadow: 0 28px 70px rgba(25,42,79,.18); }
:root[data-theme="light"] .quick-actions-menu > a { color: var(--text); border-color: var(--line); }
:root[data-theme="light"] .quick-actions-menu > a > span { color: var(--brand-primary); background: #edf2ff; }
:root[data-theme="light"] .active-list-filter, :root[data-theme="light"] .filter-chip, :root[data-theme="light"] .task-reminder-chips span { color: #294f9e; background: #edf3ff; border-color: #cfdbf5; }
:root[data-theme="light"] .task-card, :root[data-theme="light"] .dashboard-task-list article, :root[data-theme="light"] .reminder-rows label, :root[data-theme="light"] .task-details, :root[data-theme="light"] .task-comment, :root[data-theme="light"] .setup-step { background: var(--surface-secondary); border-color: var(--line); }
:root[data-theme="light"] .task-complete-button, :root[data-theme="light"] .dashboard-task-list button { color: var(--status-success-text); background: var(--status-success-bg); border-color: var(--status-success-border); }
:root[data-theme="light"] .task-edit-button { color: var(--brand-primary); }
:root[data-theme="light"] .task-form-dialog::backdrop, :root[data-theme="light"] .ui-dialog::backdrop { background: var(--overlay-bg); }
:root[data-theme="light"] .toast { color: var(--text); background: #eefaf5; border-color: #a8dfcc; box-shadow: var(--shadow-md); }
:root[data-theme="light"] .toast-warning, :root[data-theme="light"] .toast-error { background: #fff1f4; border-color: #efbdc8; }
:root[data-theme="light"] .toast-reminder { background: #eef3ff; border-color: #c7d5f7; }
:root[data-theme="light"] .toast-message > span { color: var(--text-secondary); }
:root[data-theme="light"] .toast-action { color: var(--brand-primary); }
:root[data-theme="light"] .login-card { background: var(--dialog-gradient); border-color: var(--line); box-shadow: var(--shadow-md); }
:root[data-theme="light"] .form-error { color: #a72942; background: #fff0f3; border-color: #efbdc8; }
:root[data-theme="light"] .pilot-access { color: var(--muted); background: #eefaf5; border-color: #bce8d8; }
:root[data-theme="light"] .setup-panel { background: var(--panel-gradient); border-color: var(--line); }
:root[data-theme="light"] .daily-child-card { background: var(--panel-gradient); border-color: var(--line); box-shadow: var(--shadow-sm); }
:root[data-theme="light"] .daily-save-bar { background: rgba(255,255,255,.97); border-color: #cbd7f5; box-shadow: 0 16px 38px rgba(25,42,79,.15); }
:root[data-theme="light"] .danger-button { color: var(--status-danger-text); background: var(--status-danger-bg); border-color: var(--status-danger-border); }
:root[data-theme="light"] .demo-data-badge { background: #fff6dd; color: #785000; border-color: #e7ca7c; }
:root[data-theme="light"] ::-webkit-scrollbar-thumb { background: #c8d1df; }

@media (max-width: 760px) {
  .theme-options { grid-template-columns: 1fr; }
  .theme-option { grid-template-columns: 82px 1fr; }
  .theme-toggle { order: 4; }
  .user-block { order: 5; }
  :root[data-theme="light"] .topbar { background: rgba(255,255,255,.985); }
  :root[data-theme="light"] .main-nav { background: var(--sidebar-bg); }
  :root[data-theme="light"] .task-form-actions { background: rgba(255,255,255,.97); }
  :root[data-theme="light"] .quick-actions-menu::before, :root[data-theme="light"] .task-dialog-card::before { background: #c7d0df; }
}

/* Phase 01: LUM brand shell only. */
:root[data-theme="light"] .login-expansion { color: #62708e; }
:root[data-theme="light"] .brand-logo { border-color: rgba(49,94,219,.15); box-shadow: 0 8px 22px rgba(53,76,137,.16); }
@media (max-width: 760px) {
  .login-page { gap: 22px; padding: 22px 16px 30px; }
  .login-brand { grid-template-columns: 96px 1fr; column-gap: 16px; align-items: center; max-width: none; }
  .login-logo { width: 96px; border-radius: 22px; grid-row: 1 / 3; }
  .login-brand > p.login-product-name { display: block; margin: 0; font-size: 18px; }
  .login-brand > p.login-expansion { display: block; margin: 5px 0 0; font-size: 10px; line-height: 1.45; }
  .login-brand h1 { grid-column: 1 / -1; font-size: 34px; margin: 18px 0 9px; }
  .login-brand > p.login-descriptor { grid-column: 1 / -1; display: block; font-size: 14px; line-height: 1.5; }
  .brand-logo { width: 40px; height: 40px; flex-basis: 40px; }
}

/* Phase 02: shared LUM design tokens and component foundations. */
body { font-size: var(--font-size-body); line-height: var(--line-height-body); }
.muted, .field-help, .delete-disabled, .filter-hint { color: var(--text-muted); }
.field-help, .delete-disabled, .filter-hint { font-size: var(--font-size-helper); line-height: 1.4; }
.section-head h2, .task-board-head h2, .setup-head h2 { font-size: var(--font-size-section-title); line-height: 1.25; }

.secondary-button { color: var(--text-primary); background: var(--surface-secondary); border-color: var(--input-border); box-shadow: none; }
.text-button { color: var(--text-secondary); background: transparent; border-color: transparent; box-shadow: none; }
.danger-button, .ui-dialog.is-danger [data-confirm-accept] { color: var(--status-danger-text); background: var(--status-danger-bg); border-color: var(--status-danger-border); box-shadow: none; }
.icon-button, .row-open-button, .drawer-close, .task-dialog-close { border-radius: var(--radius-control); }
button:disabled, input:disabled, select:disabled, textarea:disabled, [aria-disabled="true"] { cursor: not-allowed; opacity: .52; }
input::placeholder, textarea::placeholder { color: var(--text-muted); opacity: .82; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--brand-primary); }

.panel, .kpi-card, .mini-kpis article, .finance-kpis article, .task-board, .daily-child-card, .profile-kpis article { border-color: var(--border-primary); border-radius: var(--radius-card); }
.login-card, .child-drawer, .quick-actions-menu, .task-dialog-card, .ui-dialog-card { border-color: var(--border-primary); border-radius: var(--radius-panel); box-shadow: var(--shadow-lg); }
.embedded-editor, .theme-option, .drawer-facts article, .profile-attendance-summary article, .profile-notes > article { border-radius: var(--radius-card); }
.toast { border-radius: var(--radius-card); box-shadow: var(--shadow-md); }
.form-grid, .stack-form { gap: var(--space-md); }
.toolbar, .filterbar, .period-picker, .inline-form { gap: var(--space-md); }
.card-grid, .dashboard-grid, .dashboard-lower, .mini-kpis, .finance-kpis, .settings-grid { gap: var(--space-md); }

.status, .subscription-note, .filter-chip, .role-badge, .soft-badge, .task-reminder-chips span { border-radius: var(--radius-pill); }
.subscription-note.success { color: var(--status-success-text); background: var(--status-success-bg); border-color: var(--status-success-border); }
.subscription-note.warning { color: var(--status-warning-text); background: var(--status-warning-bg); border-color: var(--status-warning-border); }
.subscription-note.danger { color: var(--status-danger-text); background: var(--status-danger-bg); border-color: var(--status-danger-border); }
.subscription-note.neutral { color: var(--status-accent-text); background: var(--status-accent-bg); border-color: var(--status-accent-border); }

.main-nav a.active::after { box-shadow: none; }
th { color: var(--text-secondary); font-size: var(--font-size-secondary); }
td { color: var(--table-text); font-size: var(--font-size-secondary); }
.table-panel > .filterbar, .table-panel > .panel-heading { padding: var(--space-lg); }

/* Phase 03: owner-first dashboard hierarchy. */
.dashboard-heading-v2 { align-items: center; margin-bottom: var(--space-lg); }
.dashboard-heading-v2 h1 { font-size: clamp(28px, 2.8vw, 36px); }
.dashboard-heading-v2 .period-picker { flex-wrap: nowrap; }

.dashboard-kpi-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-md); }
.dashboard-kpi { min-width: 0; min-height: 142px; display: grid; align-content: space-between; gap: var(--space-sm); padding: var(--space-lg); overflow: hidden; }
.dashboard-kpi-label { color: var(--text-secondary); font-size: var(--font-size-secondary); font-weight: 700; }
.dashboard-kpi-value { overflow: hidden; color: var(--text-primary); font-size: clamp(22px, 2.15vw, 32px); line-height: 1.05; letter-spacing: -.035em; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-kpi > small { color: var(--text-muted); font-size: var(--font-size-helper); line-height: 1.35; }
.dashboard-kpi-success .dashboard-kpi-value { color: var(--success); }
.dashboard-kpi-warning .dashboard-kpi-value { color: var(--warning); }
.dashboard-kpi-danger .dashboard-kpi-value { color: var(--danger); }
.dashboard-kpi-progress { height: 5px; margin-top: auto; }
.dashboard-kpi-progress > span { background: var(--info); }

.dashboard-focus-grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.25fr); gap: var(--space-md); margin-top: var(--space-md); }
.dashboard-focus-grid > .panel { min-width: 0; }
.dashboard-attention-panel, .dashboard-groups-panel { min-height: 304px; }
.dashboard-attention-panel .panel-heading .eyebrow { margin: 0 0 var(--space-xs); }
.dashboard-attention-list a { min-height: 48px; }
.dashboard-attention-list span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.dashboard-group-bars { gap: 0; margin-top: var(--space-md); }
.dashboard-group-row { grid-template-columns: minmax(130px, .8fr) minmax(140px, 1.4fr) 58px; min-height: 54px; padding: var(--space-sm) 0; border-bottom: 1px solid var(--divider); }
.dashboard-group-row:last-child { border-bottom: 0; }
.dashboard-group-row > span { min-width: 0; display: grid; gap: 2px; }
.dashboard-group-row b { overflow: hidden; font-size: var(--font-size-secondary); text-overflow: ellipsis; white-space: nowrap; }
.dashboard-group-row small { color: var(--text-muted); font-size: var(--font-size-helper); }
.dashboard-group-row > strong { font-size: var(--font-size-secondary); }
.dashboard-group-row .progress { height: 6px; }

.dashboard-tasks-panel-v2 { margin-top: var(--space-md); }
.dashboard-tasks-panel-v2 .dashboard-task-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-sm); }
.dashboard-tasks-panel-v2 .dashboard-task-list article { grid-template-columns: 6px minmax(0, 1fr); align-items: start; min-width: 0; min-height: 104px; padding: var(--space-md); }
.dashboard-tasks-panel-v2 .dashboard-task-list article > div { min-width: 0; }
.dashboard-tasks-panel-v2 .dashboard-task-list article strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-tasks-panel-v2 .dashboard-task-list article form { grid-column: 2; }
.dashboard-tasks-panel-v2 .dashboard-task-list button { width: 100%; }
.dashboard-setup-compact { margin-top: var(--space-md); }

@media (max-width: 1100px) {
  .dashboard-kpi-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dashboard-focus-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .dashboard-heading-v2 { gap: var(--space-md); }
  .dashboard-heading-v2 .period-picker { width: 100%; }
  .dashboard-heading-v2 .period-picker input { min-width: 0; width: 100%; }
  .dashboard-kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-sm); }
  .dashboard-kpi { min-height: 128px; padding: var(--space-md); }
  .dashboard-kpi:last-child { grid-column: 1 / -1; }
  .dashboard-kpi-value { font-size: clamp(21px, 7vw, 28px); }
  .dashboard-attention-panel, .dashboard-groups-panel { min-height: 0; }
  .dashboard-attention-list a { grid-template-columns: 8px minmax(0, 1fr) auto; }
  .dashboard-group-row { grid-template-columns: minmax(100px, 1fr) 1fr 48px; gap: var(--space-sm); }
  .dashboard-tasks-panel-v2 .dashboard-task-list { grid-template-columns: 1fr; }
  .dashboard-tasks-panel-v2 .dashboard-task-list article { min-height: 0; }
}
