[data-theme=dark] {
  --surface:#142532; --cloud:#10202c; --ink:#e8f2f9; --muted:#b4c6d4; --line:#355064;
  --hover:#1b3c42; --accent:#75dfce; --navy:#123956; --blue:#14578d; --white:#fff;
}
.app-body { background:var(--cloud); }
.app-shell { display:grid; grid-template-columns:232px minmax(0,1fr); min-height:100svh; }
.app-sidebar { display:flex; flex-direction:column; color:#d5e4ef; background:#0d2b43; padding:16px 12px; position:sticky; top:0; height:100svh; min-height:0; min-width:0; overflow:auto; }
.app-brand { display:block; width:154px; padding:3px 0; margin:4px 4px 22px; }
.app-brand .brand { width:135px; }
.app-area { font-size:13px; color:#bed3e3; font-weight:500; margin:0 8px 8px; }
.app-nav,.app-side-footer { display:grid; gap:4px; }
.app-nav { --marker-fill:#18455d; --marker-shadow:inset 3px 0 #36cdba; }
.app-nav-toggle { display:none; }
.app-nav a,.app-side-footer a { display:flex; align-items:center; gap:10px; min-height:40px; padding:8px; border-radius:5px; font-size:13px; line-height:1.25; }
.app-nav a { transition:background-color .18s var(--ease),color .18s var(--ease); }
.app-nav .icon,.app-side-footer .icon { width:17px; height:17px; color:#a5c2d7; }
.app-nav .icon { transition:color .18s var(--ease); }
.app-nav a:hover,.app-side-footer a:hover { background:#163c58; }
.app-nav a[aria-current=page] { background:#18455d; color:#f3fffc; font-weight:600; box-shadow:inset 3px 0 #36cdba; }
.app-nav[data-marker] a[aria-current=page] { background:transparent; box-shadow:none; }
.app-nav a[aria-current=page] .icon { color:#75e2d3; }
.app-side-footer { padding-top:14px; margin-top:auto; }
.app-side-footer>a:first-child .icon { transform:rotate(180deg); }
.app-frame { min-width:0; }
.app-top { display:flex; justify-content:space-between; gap:14px; align-items:center; padding:12px clamp(14px,3vw,40px); min-height:67px; background:var(--surface); border-bottom:1px solid var(--line); }
.org-label { font-size:14px; font-weight:600; }
.app-top-actions { display:flex; align-items:center; gap:6px; }
.app-search { display:flex; align-items:center; gap:6px; width:min(27vw,260px); border:1px solid var(--line); border-radius:6px; padding:0 8px; }
.app-search input { width:100%; min-height:36px; border:0; padding:4px; background:transparent; }
.app-search>.icon { width:16px; color:var(--muted); }
.app-main { max-width:1470px; padding:26px clamp(14px,3vw,40px) 45px; margin-inline:auto; }
.app-breadcrumb { display:flex; gap:8px; color:var(--muted); font-size:13px; }
.app-breadcrumb a { color:var(--accent); }
.app-heading { display:flex; justify-content:space-between; align-items:flex-end; gap:14px; margin:20px 0 24px; }
.app-heading h1 { font-size:clamp(32px,4.5vw,54px); margin:8px 0; }
.app-heading p { font-size:14px; }
.app-heading .btn { flex:none; }
.demo-label { font:600 13px var(--font); color:var(--accent); display:flex; align-items:center; gap:8px; }
.demo-label i { width:8px; height:8px; background:currentColor; clip-path:polygon(0 0,100% 0,0 100%); }
.app-tools { display:flex; flex-wrap:wrap; gap:10px; align-items:end; padding:12px; background:var(--surface); border:1px solid var(--line); border-radius:7px; margin-bottom:18px; }
.app-tools label { display:grid; gap:4px; font-size:13px; min-width:0; }
.app-tools label span { color:var(--muted); }
.app-tools select { width:100%; }
.view-buttons { margin-left:auto; display:flex; gap:4px; }
.view-buttons button[aria-pressed=true] { background:var(--hover); color:var(--accent); }
.app-section { margin-top:24px; }
.app-section>h2 { font-size:24px; margin-bottom:12px; }
.workspace-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.workspace-card { background:var(--surface); border:1px solid var(--line); border-radius:8px; padding:15px; display:flex; flex-direction:column; gap:9px; min-width:0; }
.workspace-card h3 { font-size:17px; line-height:1.23; overflow-wrap:anywhere; }
.workspace-card p { font-size:13px; line-height:1.45; }
.workspace-card .card-head,.workspace-card .card-meta { display:flex; justify-content:space-between; align-items:center; gap:8px; }
.workspace-card .card-meta { margin-top:auto; flex-wrap:wrap; font-size:12px; color:var(--muted); }
.card-head .icon-btn[aria-pressed=true],.star-button[aria-pressed=true] { color:var(--accent); }
.card-head .icon-btn[aria-pressed=true] use,.star-button[aria-pressed=true] use { fill:currentColor; }
.card-actions { display:flex; flex-wrap:wrap; align-items:center; gap:7px; }
.card-actions .btn { min-height:36px; font-size:12px; padding:7px 8px; }
.card-actions .btn .icon { width:14px; height:14px; }
.status-text { color:var(--accent); }
.app-table { width:100%; border-collapse:collapse; background:var(--surface); font-size:13px; text-align:left; }
.table-wrap { width:100%; overflow:auto; border:1px solid var(--line); border-radius:7px; }
.app-table th,.app-table td { padding:10px 12px; border-bottom:1px solid var(--line); vertical-align:middle; }
.app-table th { font-size:12px; color:var(--muted); background:var(--cloud); white-space:nowrap; }
.app-table tr:last-child td { border-bottom:0; }
.cell-resource { display:flex; align-items:center; gap:8px; min-width:150px; }
.cell-resource small { display:block; color:var(--muted); }
.resource-status { margin-bottom:10px; font-size:13px; }
.empty-state { background:var(--surface); border:1px solid var(--line); border-radius:7px; padding:22px; }
.activity-list { background:var(--surface); border:1px solid var(--line); border-radius:7px; }
.activity-row { display:flex; align-items:center; gap:10px; padding:11px 14px; font-size:14px; }
.activity-row+.activity-row { border-top:1px solid var(--line); }
.app-section .activity-row { animation:reveal .24s var(--ease) both; }
.app-section .activity-row:nth-child(2) { animation-delay:.05s; }
.app-section .activity-row:nth-child(3) { animation-delay:.1s; }
.activity-row>div { flex:1; }
.activity-row small { display:block; color:var(--muted); }
.activity-row .btn { min-height:34px; padding:5px 8px; font-size:12px; }
.overview-split { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
#app-dialog-title { font-size:23px; }
#app-dialog .dialog-body .btn { margin-top:10px; }
#assignment-form label { margin-bottom:4px; }
#assignment-form select { width:100%; margin-bottom:12px; }
.stats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.stat { background:var(--surface); padding:15px; border:1px solid var(--line); border-radius:7px; }
.stat strong { display:block; font-size:32px; line-height:1.3; font-variant-numeric:tabular-nums; }
.stat p { font-size:13px; }
.admin-overview { display:grid; grid-template-columns:minmax(0,1.4fr) minmax(0,1fr); gap:14px; margin-top:14px; }
.admin-widget { padding:16px; border:1px solid var(--line); background:var(--surface); border-radius:7px; min-width:0; }
.admin-widget h2 { font-size:20px; margin-bottom:12px; }
.admin-widget p { font-size:13px; }
.admin-chart { display:grid; gap:12px; margin-top:16px; }
.admin-chart>div { display:grid; grid-template-columns:100px minmax(0,1fr) 20px; align-items:center; gap:8px; font-size:13px; }
.admin-chart meter { width:100%; height:12px; }
.admin-chart meter::-webkit-meter-bar { background:var(--cloud); border:1px solid var(--line); border-radius:4px; }
.admin-chart meter::-webkit-meter-optimum-value { background:var(--teal); }
.admin-chart meter::-moz-meter-bar { background:var(--teal); }
.admin-widget .activity-list { border:0; }
.employee-link { border:0; background:none; text-align:left; padding:0; color:var(--accent); font-weight:600; }
.assignment-list { padding-left:20px; }
@media(max-width:1060px) {
  .workspace-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:800px) {
  .app-shell { grid-template-columns:1fr; }
  .app-sidebar { height:auto; position:static; padding:8px 12px; display:grid; grid-template-columns:auto minmax(0,1fr); gap:6px; align-items:center; overflow:visible; }
  .app-brand { margin:0; width:106px; padding:2px 4px; }
  .app-brand .brand { width:98px; }
  .app-area { display:none; }
  .app-nav-toggle { display:inline-flex; justify-self:end; align-items:center; gap:7px; min-height:34px; padding:4px 9px; border:1px solid #4b6b82; border-radius:5px; background:#163c58; font-size:13px; }
  .app-nav-toggle .icon { width:16px; height:16px; }
  .app-nav { grid-column:1/-1; display:none; grid-template-columns:repeat(2,minmax(0,1fr)); padding:3px; }
  .app-nav-toggle[aria-expanded=true]+.app-nav { display:grid; }
  .app-side-footer { grid-column:1/-1; display:flex; gap:7px; padding:0; }
  .app-side-footer a,.app-nav a { min-height:34px; font-size:12px; }
  .app-search { width:min(37vw,220px); }
}
@media(max-width:560px) {
  .app-heading { align-items:flex-start; flex-direction:column; }
  .app-top { flex-wrap:wrap; gap:8px; }
  .app-top-actions { width:100%; }
  .app-search { width:auto; flex:1; }
  .workspace-grid,.admin-overview,.overview-split { grid-template-columns:1fr; }
  .app-tools label { flex:1; min-width:min(100%,125px); }
  .stat { padding:8px; }
  .stat strong { font-size:25px; }
  .stat p { font-size:12px; }
  .activity-row { flex-wrap:wrap; }
}
