/* ==========================================================================
   Beacon Tracker — Material 3 inspired UI
   ========================================================================== */

:root {
  --brand-blue: #227FC2; --brand-amber: #FDBE2C;
  --primary: #1B6DAD; --on-primary: #fff;
  --primary-container: #D5E9F8; --on-primary-container: #062C49;
  --secondary-container: #DDEAF5; --on-secondary-container: #0E2234;
  --tertiary: #8A5A00; --tertiary-container: #FFE7B0; --on-tertiary-container: #2B1C00;

  --bg: #F4F6FA;
  --surface: #FFFFFF;
  --surface-low: #F8F9FC;
  --surface-cont: #EFF2F7;
  --surface-high: #E7EBF1;
  --surface-highest: #DFE4EB;
  --on-surface: #191C20;
  --on-surface-var: #4A505A;
  --muted: #6B717C;
  --outline: #79808B;
  --outline-var: #DCE0E7;
  --inverse-surface: #2E3136; --inverse-on: #F0F1F5;

  --error: #B3261E; --error-cont: #FCE4E2; --on-error-cont: #5F1410;
  --ok: #146C2E; --ok-cont: #D7F2DE; --on-ok-cont: #062711;
  --warn: #8A5A00; --warn-cont: #FFF0C7; --on-warn-cont: #2A1B00;
  --info: #00639B; --info-cont: #D9EEFF;

  --s-backlog: #6B717C; --s-todo: #3B5BA9; --s-progress: #1B6DAD; --s-review: #7B4BC0; --s-blocked: #B3261E; --s-done: #146C2E;

  --r-xs: 6px; --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-xl: 28px; --r-full: 999px;
  --e1: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
  --e2: 0 2px 6px rgba(16,24,40,.06), 0 6px 16px rgba(16,24,40,.08);
  --e3: 0 8px 28px rgba(16,24,40,.14), 0 2px 6px rgba(16,24,40,.06);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --drawer: 272px; --rail: 84px; --appbar: 68px;
  --ease: cubic-bezier(.2,0,0,1);
  color-scheme: light;
}

[data-theme="dark"] {
  --primary: #8CC4F0; --on-primary: #03304F;
  --primary-container: #0F4C7A; --on-primary-container: #D5E9F8;
  --secondary-container: #243545; --on-secondary-container: #DDEAF5;
  --tertiary: #FDBE2C; --tertiary-container: #4F3A00; --on-tertiary-container: #FFE7B0;
  --bg: #0F1115; --surface: #171A20; --surface-low: #1A1D23; --surface-cont: #1F232A; --surface-high: #262B33; --surface-highest: #2F353E;
  --on-surface: #E4E6EB; --on-surface-var: #BAC0CA; --muted: #9097A3; --outline: #8C929C; --outline-var: #2F343C;
  --inverse-surface: #E4E6EB; --inverse-on: #1A1D22;
  --error: #F2B8B5; --error-cont: #5A1A16; --on-error-cont: #FFDAD6;
  --ok: #8BD8A0; --ok-cont: #0F3A1C; --on-ok-cont: #C4EED0;
  --warn: #F2C55C; --warn-cont: #3D2C00; --on-warn-cont: #FFE08A;
  --info: #9CCAFF; --info-cont: #0B3352;
  --s-backlog: #9097A3; --s-todo: #9DB4F0; --s-progress: #A8C7FA; --s-review: #CDB4F6; --s-blocked: #F2B8B5; --s-done: #8BD8A0;
  --e1: 0 1px 2px rgba(0,0,0,.4); --e2: 0 4px 14px rgba(0,0,0,.35); --e3: 0 12px 36px rgba(0,0,0,.5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); font-size: 14px; line-height: 1.45; color: var(--on-surface); background: var(--bg);
  -webkit-font-smoothing: antialiased; font-feature-settings: 'cv11', 'ss01'; }
a { color: var(--primary); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
::selection { background: var(--primary-container); color: var(--on-primary-container); }

.msr { font-family: 'Material Symbols Rounded'; font-weight: normal; font-style: normal; font-size: 20px; line-height: 1;
  letter-spacing: normal; text-transform: none; display: inline-block; white-space: nowrap; direction: ltr;
  -webkit-font-feature-settings: 'liga'; font-feature-settings: 'liga'; font-variation-settings: 'FILL' 0, 'wght' 400, 'opsz' 24;
  user-select: none; flex-shrink: 0; width: 1em; overflow: hidden; }
.msr.fill { font-variation-settings: 'FILL' 1, 'wght' 500, 'opsz' 24; }

.muted { color: var(--muted); } .small { font-size: 12px; } .center { text-align: center; }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 12px; }
.only-mobile { display: none !important; }

/* ---------- App shell ---------- */
.app { display: flex; min-height: 100vh; }
.drawer { position: fixed; inset: 0 auto 0 0; width: var(--drawer); background: var(--surface-low); border-right: 1px solid var(--outline-var);
  display: flex; flex-direction: column; padding: 14px 12px; z-index: 40; transition: width .25s var(--ease), transform .25s var(--ease); }
.main { flex: 1; margin-left: var(--drawer); min-width: 0; transition: margin .25s var(--ease); }

.brand { display: flex; align-items: center; gap: 12px; padding: 6px 8px 16px; color: var(--on-surface); }
.brand-logo { height: 42px; width: auto; flex-shrink: 0; display: block; }
.brand-mark { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0;
  background: linear-gradient(135deg, #0B57D0, #1A73E8 55%, #F29900); color: #fff; box-shadow: 0 4px 12px rgba(11,87,208,.3); }
.brand-mark .msr { font-size: 24px; }
.brand-mark.xl { width: 64px; height: 64px; border-radius: 18px; } .brand-mark.xl .msr { font-size: 38px; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text b { font-size: 16px; letter-spacing: -.01em; }
.brand-text small { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.fab-extended { margin: 2px 4px 14px; height: 52px; border-radius: 16px; background: var(--primary-container); color: var(--on-primary-container);
  box-shadow: var(--e1); justify-content: flex-start; padding: 0 18px; font-weight: 600; }
.fab-extended:hover { box-shadow: var(--e2); }

.nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; }
.nav-section { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 18px 16px 6px; }
.nav-item { display: flex; align-items: center; gap: 14px; height: 44px; padding: 0 16px; border-radius: var(--r-full); color: var(--on-surface-var);
  font-weight: 500; position: relative; border: 0; background: none; cursor: pointer; width: 100%; text-align: left; white-space: nowrap; }
.nav-item:hover { background: var(--surface-high); color: var(--on-surface); }
.nav-item.active { background: var(--secondary-container); color: var(--on-secondary-container); font-weight: 600; }
.nav-item .msr { font-size: 22px; }
.drawer-foot { border-top: 1px solid var(--outline-var); padding-top: 8px; }

html.rail .drawer { width: var(--rail); }
html.rail .main { margin-left: var(--rail); }
html.rail .drawer .lbl, html.rail .brand-text, html.rail .nav-section { display: none; }
html.rail .nav-item { justify-content: center; padding: 0; }
html.rail .fab-extended { justify-content: center; padding: 0; width: 52px; margin-inline: auto; }
html.rail .brand { justify-content: center; padding-inline: 0; }
html.rail .brand-logo { height: 34px; }

.scrim { display: none; }

.appbar { position: sticky; top: 0; z-index: 30; height: var(--appbar); display: flex; align-items: center; gap: 16px; padding: 0 24px;
  background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent; }
.appbar.scrolled { border-bottom-color: var(--outline-var); }
.appbar-title { min-width: 0; display: flex; flex-direction: column; }
.appbar-title h1 { font-size: 21px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appbar-title .sub { font-size: 12.5px; color: var(--muted); }
.search { margin-left: auto; display: flex; align-items: center; gap: 10px; height: 44px; width: min(420px, 36vw); padding: 0 8px 0 16px;
  background: var(--surface-cont); border-radius: var(--r-full); transition: background .15s, box-shadow .15s; }
.search:focus-within { background: var(--surface); box-shadow: var(--e2); }
.search input { border: 0; outline: 0; background: none; flex: 1; min-width: 0; }
.search .msr { color: var(--muted); }
kbd { font: 600 11px var(--font); color: var(--muted); border: 1px solid var(--outline-var); border-radius: 6px; padding: 2px 7px; background: var(--surface); }
.appbar-actions { display: flex; align-items: center; gap: 4px; }

.content { padding: 8px 24px 48px; max-width: 1600px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 20px; border-radius: var(--r-full);
  border: 0; cursor: pointer; font-weight: 600; font-size: 14px; white-space: nowrap; position: relative; overflow: hidden;
  transition: box-shadow .15s, background .15s, filter .15s; text-decoration: none; }
.btn .msr { font-size: 19px; margin-left: -4px; }
.btn.filled { background: var(--primary); color: var(--on-primary); }
.btn.filled:hover { box-shadow: var(--e1); filter: brightness(1.06); }
.btn.tonal { background: var(--secondary-container); color: var(--on-secondary-container); }
.btn.tonal:hover { box-shadow: var(--e1); }
.btn.outlined { background: transparent; color: var(--primary); border: 1px solid var(--outline-var); }
.btn.outlined:hover { background: color-mix(in srgb, var(--primary) 6%, transparent); }
.btn.text { background: transparent; color: var(--primary); padding: 0 14px; }
.btn.text:hover { background: color-mix(in srgb, var(--primary) 8%, transparent); }
.btn.danger { background: var(--error); color: #fff; }
.btn.danger-text { background: transparent; color: var(--error); }
.btn.danger-text:hover { background: var(--error-cont); }
.btn.sm { height: 32px; padding: 0 14px; font-size: 13px; }
.btn.lg { height: 48px; font-size: 15px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn.loading { pointer-events: none; color: transparent !important; }
.btn.loading::after { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor;
  border-color: var(--on-primary) transparent var(--on-primary) transparent; animation: spin .7s linear infinite; }
.btn.tonal.loading::after, .btn.outlined.loading::after, .btn.text.loading::after { border-color: var(--primary) transparent; }
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; display: inline-grid; place-items: center;
  cursor: pointer; color: var(--on-surface-var); position: relative; flex-shrink: 0; }
.icon-btn:hover { background: color-mix(in srgb, var(--on-surface) 8%, transparent); color: var(--on-surface); }
.icon-btn.sm { width: 32px; height: 32px; } .icon-btn.sm .msr { font-size: 18px; }
.icon-btn .badge { position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--error); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg); }
.text-btn { border: 0; background: none; color: var(--primary); font-weight: 600; font-size: 12.5px; cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.text-btn:hover { background: color-mix(in srgb, var(--primary) 8%, transparent); }

.ripple { position: absolute; border-radius: 50%; transform: scale(0); background: currentColor; opacity: .18; pointer-events: none;
  animation: ripple .55s var(--ease); }
@keyframes ripple { to { transform: scale(2.6); opacity: 0; } }

.avatar-btn { border: 0; background: none; padding: 2px; border-radius: 50%; cursor: pointer; margin-left: 4px; }
.avatar-btn:hover .avatar { box-shadow: 0 0 0 3px var(--surface-high); }

/* ---------- Avatars ---------- */
.avatar { --av: #0B57D0; width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; flex-shrink: 0;
  background: color-mix(in srgb, var(--av) 16%, var(--surface)); color: var(--av); font-weight: 700; font-size: 12px; letter-spacing: .02em;
  border: 1px solid color-mix(in srgb, var(--av) 22%, transparent); }
[data-theme="dark"] .avatar { background: color-mix(in srgb, var(--av) 35%, var(--surface)); color: #fff; }
.avatar.sm { width: 24px; height: 24px; font-size: 10px; }
.avatar.lg { width: 44px; height: 44px; font-size: 15px; }
.avatar.xl { width: 72px; height: 72px; font-size: 24px; }
.avatar.empty { background: var(--surface-high); color: var(--muted); border-style: dashed; border-color: var(--outline-var); }
.avatar.empty .msr { font-size: 16px; }
.person { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.person span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Chips ---------- */
.chip { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 8px; font-size: 12px; font-weight: 600;
  white-space: nowrap; background: var(--surface-cont); color: var(--on-surface-var); border: 0; }
.chip .msr { font-size: 15px; }
.chip.tiny { height: 20px; font-size: 10.5px; padding: 0 7px; border-radius: 6px; }
.chip.status { background: color-mix(in srgb, var(--sc) 12%, transparent); color: var(--sc); }
.s-backlog { --sc: var(--s-backlog); } .s-todo { --sc: var(--s-todo); } .s-progress { --sc: var(--s-progress); }
.s-review { --sc: var(--s-review); } .s-blocked { --sc: var(--s-blocked); } .s-done { --sc: var(--s-done); }
.chip.prio { background: transparent; padding: 0 6px 0 2px; }
.p-low { color: var(--muted); } .p-medium { color: var(--info); } .p-high { color: var(--tertiary); } .p-urgent { color: var(--error); }
.chip.prio.p-urgent { background: var(--error-cont); color: var(--on-error-cont); padding: 0 9px 0 5px; }
.chip.health.h-error { background: var(--error-cont); color: var(--on-error-cont); }
.chip.health.h-warn { background: var(--warn-cont); color: var(--on-warn-cont); }
.chip.health.h-ok { background: var(--ok-cont); color: var(--on-ok-cont); }
.chip.health.h-done { background: var(--surface-cont); color: var(--ok); }
.chip.health.h-muted { background: var(--surface-cont); color: var(--muted); }
.dept-dot { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--on-surface-var); white-space: nowrap; }
.dept-dot::before { content: ''; width: 8px; height: 8px; border-radius: 3px; background: var(--dc, var(--primary)); flex-shrink: 0; }
.tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: var(--surface-cont); color: var(--on-surface-var); }

.filter-chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--outline-var);
  background: var(--surface); cursor: pointer; font-weight: 500; font-size: 13px; color: var(--on-surface-var); white-space: nowrap; }
.filter-chip:hover { background: var(--surface-low); }
.filter-chip.on { background: var(--secondary-container); border-color: transparent; color: var(--on-secondary-container); font-weight: 600; }
.filter-chip .msr { font-size: 18px; }

/* ---------- Cards & layout ---------- */
.card { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--e1); border: 1px solid var(--outline-var); }
[data-theme="dark"] .card { border-color: var(--outline-var); }
.card-head { display: flex; align-items: center; gap: 10px; padding: 18px 20px 6px; }
.card-head h3 { font-size: 15.5px; }
.card-head .msr.lead { color: var(--primary); }
.card-head .spacer, .spacer { flex: 1; }
.card-body { padding: 12px 20px 20px; }
.card-body.flush { padding: 4px 0 8px; }

.grid { display: grid; gap: 20px; }
.grid-dash { grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.span-2 { grid-column: span 2; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 6px 0 18px; }

/* ---------- KPI tiles ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpi { position: relative; padding: 18px 20px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--outline-var);
  box-shadow: var(--e1); display: flex; flex-direction: column; gap: 6px; overflow: hidden; color: inherit; transition: transform .15s, box-shadow .15s; }
a.kpi:hover { transform: translateY(-2px); box-shadow: var(--e2); }
.kpi .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--kc-bg); color: var(--kc); }
.kpi .ico .msr { font-size: 22px; }
.kpi .val { font-size: 30px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; margin-top: 6px; }
.kpi .lbl { color: var(--muted); font-weight: 500; font-size: 13px; }
.kpi .trend { position: absolute; top: 18px; right: 18px; font-size: 12px; font-weight: 600; color: var(--muted); }
.k-blue { --kc: var(--primary); --kc-bg: var(--primary-container); }
.k-red { --kc: var(--error); --kc-bg: var(--error-cont); }
.k-amber { --kc: var(--warn); --kc-bg: var(--warn-cont); }
.k-green { --kc: var(--ok); --kc-bg: var(--ok-cont); }
[data-theme="dark"] .k-blue { --kc: var(--on-primary-container); }

.hello { display: flex; align-items: center; gap: 16px; margin: 6px 0 20px; flex-wrap: wrap; }
.hello h2 { font-size: 26px; letter-spacing: -.02em; }
.hello p { color: var(--muted); margin-top: 2px; }

/* ---------- Lists ---------- */
.list { display: flex; flex-direction: column; }
.list-group-title { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); padding: 14px 20px 6px; }
.list-group-title .count { background: var(--surface-cont); border-radius: 6px; padding: 1px 7px; font-size: 11px; }
.list-group-title.err { color: var(--error); }
.task-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 20px; color: inherit;
  border-top: 1px solid transparent; transition: background .12s; }
.task-row:hover { background: var(--surface-low); }
.task-row .st { color: var(--sc); display: grid; place-items: center; }
.task-row .st .msr { font-size: 20px; }
.task-row .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-row .m { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 12px; margin-top: 2px; flex-wrap: wrap; }
.task-row .r { display: flex; align-items: center; gap: 8px; }
.due { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--on-surface-var); white-space: nowrap; }
.due .msr { font-size: 16px; }
.due.over { color: var(--error); } .due.soon { color: var(--warn); }

/* Bars */
.bar { height: 8px; border-radius: 8px; background: var(--surface-high); overflow: hidden; display: flex; }
.bar > i { display: block; height: 100%; background: var(--bc, var(--primary)); }
.bar.thin { height: 6px; }
.prog { display: flex; align-items: center; gap: 8px; min-width: 90px; }
.prog .bar { flex: 1; }
.prog b { font-size: 12px; width: 34px; text-align: right; color: var(--on-surface-var); }

.dept-row { display: grid; grid-template-columns: minmax(120px, 1.3fr) 2fr auto; gap: 14px; align-items: center; padding: 9px 20px; }
.dept-row .name { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dept-row .nums { font-size: 12px; color: var(--muted); white-space: nowrap; text-align: right; min-width: 100px; }
.dept-row .nums b { color: var(--error); }
.stack-bar { display: flex; height: 10px; border-radius: 6px; overflow: hidden; background: var(--surface-high); gap: 2px; }
.stack-bar i { display: block; height: 100%; background: var(--sc); }

.donut-wrap { display: flex; align-items: center; gap: 24px; padding: 8px 20px 20px; }
.donut { width: 140px; height: 140px; border-radius: 50%; position: relative; flex-shrink: 0; }
.donut::after { content: ''; position: absolute; inset: 18px; border-radius: 50%; background: var(--surface); }
.donut .center { position: absolute; inset: 0; display: grid; place-items: center; z-index: 1; text-align: center; }
.donut .center b { font-size: 26px; display: block; line-height: 1; }
.donut .center small { color: var(--muted); font-size: 11.5px; }
.legend { display: flex; flex-direction: column; gap: 7px; flex: 1; }
.legend div { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--sc); }
.legend b { margin-left: auto; }

.mini-item { display: flex; gap: 12px; padding: 10px 20px; align-items: flex-start; color: inherit; }
a.mini-item:hover { background: var(--surface-low); }
.date-badge { width: 46px; flex-shrink: 0; text-align: center; border-radius: 12px; background: var(--primary-container); color: var(--on-primary-container); padding: 5px 0; }
.date-badge small { display: block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.date-badge b { font-size: 18px; line-height: 1.1; }
.mini-item .t { font-weight: 600; } .mini-item .m { color: var(--muted); font-size: 12px; margin-top: 1px; }

/* ---------- Toolbar / filters ---------- */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.seg { display: inline-flex; border: 1px solid var(--outline-var); border-radius: var(--r-full); overflow: hidden; background: var(--surface); }
.seg a, .seg button { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 16px; color: var(--on-surface-var); font-weight: 600;
  font-size: 13px; border: 0; background: none; cursor: pointer; border-right: 1px solid var(--outline-var); }
.seg > :last-child { border-right: 0; }
.seg .on { background: var(--secondary-container); color: var(--on-secondary-container); }
.seg .msr { font-size: 18px; }
.select-chip { height: 34px; border-radius: 10px; border: 1px solid var(--outline-var); background: var(--surface); padding: 0 30px 0 12px;
  font-size: 13px; font-weight: 500; color: var(--on-surface-var); cursor: pointer; appearance: none; max-width: 210px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='%23707785'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 6px center; }
.select-chip.on { background-color: var(--secondary-container); color: var(--on-secondary-container); border-color: transparent; font-weight: 600; }
input.select-chip { padding-right: 12px; background-image: none; width: 150px; }

/* ---------- Data table ---------- */
.table-wrap { overflow: auto; border-radius: var(--r-lg); }
table.data { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
table.data th { position: sticky; top: 0; z-index: 2; text-align: left; font-weight: 600; font-size: 12px; color: var(--muted); padding: 12px 14px;
  background: var(--surface-low); border-bottom: 1px solid var(--outline-var); white-space: nowrap; }
table.data th a { color: inherit; display: inline-flex; align-items: center; gap: 2px; }
table.data th a.on { color: var(--primary); }
table.data td { padding: 10px 14px; border-bottom: 1px solid var(--outline-var); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr { transition: background .1s; }
table.data tbody tr:hover { background: var(--surface-low); }
table.data tr.clickable { cursor: pointer; }
table.data .code { font-family: ui-monospace, monospace; font-size: 12px; color: var(--muted); white-space: nowrap; }
table.data .ttl { font-weight: 600; color: var(--on-surface); max-width: 340px; min-width: 200px; }
table.data .ttl small { display: block; font-weight: 400; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 380px; font-size: 12px; margin-top: 2px; }
table.data tr.overdue td:first-child { box-shadow: inset 3px 0 0 var(--error); }
.inline-select { border: 0; background: transparent; font-weight: 600; font-size: 12.5px; padding: 4px 22px 4px 8px; border-radius: 8px; cursor: pointer;
  appearance: none; color: var(--sc, var(--on-surface)); background-color: color-mix(in srgb, var(--sc, var(--outline)) 12%, transparent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='%23707785'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 2px center; }
.inline-select:focus { outline: 2px solid var(--primary); }

/* ---------- Kanban ---------- */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(272px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.col { background: var(--surface-cont); border-radius: var(--r-lg); display: flex; flex-direction: column; max-height: calc(100vh - 200px); }
.col-head { display: flex; align-items: center; gap: 8px; padding: 14px 14px 10px; font-weight: 700; font-size: 13px; }
.col-head .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--sc); }
.col-head .n { background: var(--surface); border-radius: 8px; padding: 1px 8px; font-size: 12px; color: var(--muted); }
.col-body { padding: 4px 10px 12px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; min-height: 80px; flex: 1; border-radius: 0 0 var(--r-lg) var(--r-lg); transition: background .15s; }
.col.drop .col-body { background: color-mix(in srgb, var(--primary) 8%, transparent); outline: 2px dashed color-mix(in srgb, var(--primary) 40%, transparent); outline-offset: -6px; }
.kcard { background: var(--surface); border-radius: 14px; padding: 12px 14px; box-shadow: var(--e1); cursor: pointer; display: flex; flex-direction: column; gap: 8px;
  border: 1px solid var(--outline-var); color: inherit; transition: box-shadow .15s, transform .15s; border-left: 3px solid var(--dc, transparent); }
.kcard:hover { box-shadow: var(--e2); }
.kcard[draggable="true"] { cursor: grab; }
.kcard.dragging { opacity: .45; transform: rotate(1.5deg); }
.kcard.over { border-color: var(--error); background: color-mix(in srgb, var(--error-cont) 35%, var(--surface)); }
.kcard .k-top .mono { white-space: nowrap; flex-shrink: 0; }
.kcard .k-top { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); }
.kcard .k-title { font-weight: 600; line-height: 1.35; }
.kcard .k-foot { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.kcard .k-foot .spacer { flex: 1; }
.kcard .k-note { font-size: 12px; color: var(--on-surface-var); background: var(--surface-low); border-radius: 8px; padding: 6px 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4; max-height: calc(2.8em + 12px); flex-shrink: 0; }

/* ---------- Calendar ---------- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--outline-var); gap: 1px; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--outline-var); }
.cal .dow { background: var(--surface-low); padding: 10px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.cal .day { background: var(--surface); min-height: 118px; padding: 6px 6px 8px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cal .day.other { background: var(--surface-low); }
.cal .day.other .dn { color: var(--outline); }
.cal .dn { font-size: 12.5px; font-weight: 600; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; }
.cal .day.today .dn { background: var(--primary); color: var(--on-primary); }
.cal .ev { display: block; font-size: 11.5px; font-weight: 600; padding: 3px 7px; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: color-mix(in srgb, var(--sc) 13%, var(--surface)); color: var(--on-surface); border-left: 3px solid var(--sc); }
.cal .ev.meet { --sc: var(--tertiary); }
.cal .ev.over { background: var(--error-cont); color: var(--on-error-cont); border-left-color: var(--error); }
.cal .more { font-size: 11px; color: var(--primary); font-weight: 600; padding-left: 6px; }

/* ---------- Task detail ---------- */
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.detail-title { display: flex; align-items: flex-start; gap: 12px; }
.detail-title textarea, .detail-title h2 { font-size: 22px; font-weight: 700; letter-spacing: -.015em; line-height: 1.3; }
.detail-title textarea { width: 100%; border: 1px solid transparent; border-radius: 10px; background: transparent; resize: none; padding: 4px 8px; margin-left: -8px; outline: 0; field-sizing: content; }
.detail-title textarea:hover { border-color: var(--outline-var); }
.detail-title textarea:focus { border-color: var(--primary); background: var(--surface); }
.status-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--outline-var);
  background: var(--surface); cursor: pointer; font-weight: 600; font-size: 13px; color: var(--on-surface-var); }
.status-pill .msr { font-size: 17px; color: var(--sc); }
.status-pill:hover { background: var(--surface-low); }
.status-pill.on { background: var(--sc); color: #fff; border-color: transparent; }
[data-theme="dark"] .status-pill.on { color: #10131a; }
.status-pill.on .msr { color: inherit; }
.status-pill[disabled] { cursor: default; opacity: .6; }
.status-pill.on[disabled] { opacity: 1; }

.props { display: flex; flex-direction: column; }
.prop { display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: center; gap: 10px; padding: 8px 20px; min-height: 48px; }
.prop > label { font-size: 12.5px; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.prop > label .msr { font-size: 17px; }
.prop .val { min-width: 0; }
.prop .val select, .prop .val input { width: 100%; height: 36px; border: 1px solid transparent; border-radius: 10px; background: transparent; padding: 0 10px;
  font-weight: 500; cursor: pointer; transition: border-color .12s, background .12s; }
.prop .val select:hover, .prop .val input:hover { border-color: var(--outline-var); background: var(--surface-low); }
.prop .val select:focus, .prop .val input:focus { border-color: var(--primary); outline: 0; background: var(--surface); }
.prop .val input[type=datetime-local] { font-size: 13px; padding: 0 4px 0 8px; }
.prop .val .ro { padding: 0 10px; font-weight: 500; display: flex; align-items: center; gap: 8px; min-height: 36px; }
.lock { color: var(--outline); font-size: 15px !important; }
.prop .saved { animation: savedFlash 1.2s var(--ease); }
@keyframes savedFlash { 0% { background: var(--ok-cont); } 100% { background: transparent; } }
input[type=range] { accent-color: var(--primary); width: 100%; }

.remark-card { margin: 4px 16px 16px; border-radius: 16px; padding: 14px 16px; background: var(--tertiary-container); color: var(--on-tertiary-container); }
.remark-card h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.remark-card p { white-space: pre-wrap; font-size: 14px; }
.remark-card small { display: block; opacity: .75; margin-top: 8px; font-size: 11.5px; }
.remark-card textarea { width: 100%; border: 1px solid color-mix(in srgb, currentColor 25%, transparent); background: color-mix(in srgb, var(--surface) 70%, transparent);
  border-radius: 10px; padding: 8px 10px; min-height: 80px; resize: vertical; color: var(--on-surface); }

.desc { white-space: pre-wrap; color: var(--on-surface-var); line-height: 1.6; }
.desc-edit { width: 100%; min-height: 110px; border: 1px solid var(--outline-var); border-radius: 12px; padding: 12px 14px; resize: vertical; background: var(--surface-low); line-height: 1.55; }
.desc-edit:focus { outline: 0; border-color: var(--primary); background: var(--surface); }

/* Timeline */
.timeline { position: relative; padding: 4px 20px 16px; }
.tl-day { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 14px 0 8px 44px; }
.tl-item { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; padding: 6px 0; position: relative; }
.tl-item::before { content: ''; position: absolute; left: 15.5px; top: 40px; bottom: -6px; width: 1px; background: var(--outline-var); }
.tl-item:last-child::before { display: none; }
.tl-item .bubble { background: var(--surface-low); border: 1px solid var(--outline-var); border-radius: 4px 16px 16px 16px; padding: 10px 14px; }
.tl-item .who { display: flex; align-items: center; gap: 8px; font-size: 12.5px; margin-bottom: 3px; }
.tl-item .who b { font-weight: 600; }
.tl-item .who time { color: var(--muted); font-size: 11.5px; }
.tl-item .body { white-space: pre-wrap; }
.tl-item.sys { align-items: center; }
.tl-item.sys .ic { width: 32px; height: 32px; border-radius: 50%; background: var(--surface-cont); display: grid; place-items: center; color: var(--muted); }
.tl-item.sys .ic .msr { font-size: 17px; }
.tl-item.sys .line { font-size: 12.5px; color: var(--on-surface-var); }
.tl-item.sys .line time { color: var(--muted); margin-left: 6px; font-size: 11.5px; }
.tl-item .del { opacity: 0; margin-left: auto; }
.tl-item:hover .del { opacity: 1; }

.composer { display: flex; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--outline-var); align-items: flex-start; }
.composer .box { flex: 1; border: 1px solid var(--outline-var); border-radius: 16px; background: var(--surface-low); transition: border-color .15s, box-shadow .15s; }
.composer .box:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 14%, transparent); background: var(--surface); }
.composer textarea { width: 100%; border: 0; outline: 0; background: transparent; resize: none; padding: 12px 14px 4px; min-height: 48px; max-height: 240px; }
.composer .bar2 { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px 8px 14px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--outline-var); padding: 0 12px; }
.tab { height: 46px; padding: 0 14px; border: 0; background: none; font-weight: 600; color: var(--muted); cursor: pointer; position: relative; display: inline-flex; align-items: center; gap: 6px; }
.tab.on { color: var(--primary); }
.tab.on::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--primary); }
.tab .n { font-size: 11px; background: var(--surface-cont); color: var(--muted); border-radius: 6px; padding: 0 6px; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12.5px; font-weight: 600; color: var(--on-surface-var); }
.field input, .field select, .field textarea { height: 44px; border: 1px solid var(--outline-var); border-radius: 12px; padding: 0 14px; background: var(--surface);
  transition: border-color .12s, box-shadow .12s; width: 100%; }
.field textarea { height: auto; padding: 10px 14px; resize: vertical; min-height: 44px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 15%, transparent); }
.field select[disabled] { background: var(--surface-low); color: var(--muted); }
.field small { color: var(--muted); font-size: 12px; }
.hint { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--muted); background: var(--surface-low); border-radius: 10px; padding: 10px 12px; }
.hint .msr { font-size: 17px; }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 44px; }
.pw-wrap .icon-btn { position: absolute; right: 6px; top: 6px; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; }
.switch input { position: absolute; opacity: 0; }
.switch i { width: 44px; height: 26px; border-radius: 13px; background: var(--surface-highest); border: 2px solid var(--outline); position: relative; transition: .2s var(--ease); flex-shrink: 0; }
.switch i::after { content: ''; position: absolute; width: 14px; height: 14px; border-radius: 50%; background: var(--outline); top: 4px; left: 4px; transition: .2s var(--ease); }
.switch input:checked + i { background: var(--primary); border-color: var(--primary); }
.switch input:checked + i::after { left: 20px; width: 18px; height: 18px; top: 2px; background: var(--on-primary); }
.switch input:disabled + i { opacity: .5; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; cursor: pointer; }
.check:hover { background: var(--surface-low); }
.check input { width: 18px; height: 18px; accent-color: var(--primary); margin-top: 1px; flex-shrink: 0; }
.check b { display: block; font-weight: 600; font-size: 13.5px; }
.check small { color: var(--muted); font-size: 12px; }

.alert { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 12px; font-weight: 500; margin-bottom: 14px; }
.alert.error { background: var(--error-cont); color: var(--on-error-cont); }
.alert.info { background: var(--info-cont); color: var(--info); }
.alert.ok { background: var(--ok-cont); color: var(--on-ok-cont); }

/* ---------- Dialog ---------- */
dialog.dialog { border: 0; padding: 0; background: transparent; max-width: min(680px, calc(100vw - 24px)); width: 100%; max-height: calc(100vh - 32px); overflow: visible; color: inherit; }
dialog.dialog.sm { max-width: 440px; }
dialog.dialog::backdrop { background: rgba(10, 14, 22, .42); backdrop-filter: blur(2px); }
dialog.dialog[open] { animation: dlgIn .22s var(--ease); }
@keyframes dlgIn { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.dialog-card { background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--e3); display: flex; flex-direction: column; max-height: calc(100vh - 32px); }
.dialog-head { display: flex; align-items: center; gap: 12px; padding: 20px 20px 8px 24px; }
.dialog-head > .msr { color: var(--primary); font-size: 24px; }
.dialog-head h2 { font-size: 19px; flex: 1; }
.dialog-body { padding: 12px 24px 8px; overflow-y: auto; }
.dialog-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px 20px; }

/* ---------- Menus ---------- */
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 240px; background: var(--surface); border-radius: 16px; box-shadow: var(--e3);
  padding: 8px 0; display: none; z-index: 60; border: 1px solid var(--outline-var); }
.menu.open { display: block; animation: dlgIn .16s var(--ease); }
.menu-item { display: flex; align-items: center; gap: 12px; padding: 10px 18px; color: var(--on-surface); font-weight: 500; cursor: pointer; border: 0; background: none; width: 100%; text-align: left; }
.menu-item:hover { background: var(--surface-low); }
.menu-item .msr { color: var(--on-surface-var); }
.menu-sep { height: 1px; background: var(--outline-var); margin: 6px 0; }
.menu-user { display: flex; gap: 12px; align-items: center; padding: 10px 18px 14px; border-bottom: 1px solid var(--outline-var); margin-bottom: 6px; }
.menu-user b { display: block; } .menu-user small { display: block; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.notif-menu { width: 380px; padding: 0; }
.menu-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; border-bottom: 1px solid var(--outline-var); }
.notif-list { max-height: 420px; overflow-y: auto; }
.notif { display: flex; gap: 12px; padding: 12px 16px; color: inherit; border-bottom: 1px solid var(--outline-var); }
.notif:last-child { border-bottom: 0; }
.notif:hover { background: var(--surface-low); }
.notif .ic { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-cont); color: var(--on-surface-var); flex-shrink: 0; }
.notif.unread .ic { background: var(--primary-container); color: var(--on-primary-container); }
.notif.unread .txt { font-weight: 600; }
.notif .txt { font-size: 13px; }
.notif time { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.menu-empty { padding: 28px; text-align: center; color: var(--muted); }

/* ---------- Snackbar ---------- */
.snackbar { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, calc(100% + 40px)); visibility: hidden; background: var(--inverse-surface); color: var(--inverse-on);
  padding: 14px 20px; border-radius: 12px; box-shadow: var(--e3); font-weight: 500; z-index: 100; transition: transform .3s var(--ease); max-width: calc(100vw - 32px);
  display: flex; align-items: center; gap: 12px; }
.snackbar.show { transform: translate(-50%, 0); visibility: visible; }
.snackbar.error { background: #8C1D18; color: #fff; }

.fab { position: fixed; right: 18px; bottom: 18px; width: 58px; height: 58px; border-radius: 18px; border: 0; background: var(--primary-container);
  color: var(--on-primary-container); box-shadow: var(--e3); display: grid; place-items: center; z-index: 35; cursor: pointer; }
.fab .msr { font-size: 26px; }

/* ---------- Empty states ---------- */
.empty-state { text-align: center; padding: 36px 20px; color: var(--muted); }
.empty-state .msr { font-size: 40px; color: var(--outline); display: block; margin: 0 auto 8px; width: auto; }
.empty-state h2 { color: var(--on-surface); font-size: 20px; margin-bottom: 6px; }
.empty-state.big { padding: 90px 20px; }
.empty-state.big .msr { font-size: 60px; }
.empty-state .btn { margin-top: 16px; }

/* ---------- Roles / admin ---------- */
.role-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
.role-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px; color: inherit; margin: 2px 8px; }
.role-item:hover { background: var(--surface-low); }
.role-item.on { background: var(--secondary-container); color: var(--on-secondary-container); }
.role-item .ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-cont); }
.role-item.on .ic { background: var(--surface); }
.role-item small { display: block; color: var(--muted); font-size: 12px; }
.perm-group { padding: 6px 12px 10px; border-top: 1px solid var(--outline-var); }
.perm-group:first-child { border-top: 0; }
.perm-group h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 12px 12px 4px; }
.perm-cols { display: grid; grid-template-columns: 1fr 1fr; }

.profile-head { display: flex; gap: 20px; align-items: center; padding: 24px; }
.profile-head h2 { font-size: 22px; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--outline-var); }
.stat-row div { padding: 16px 20px; border-right: 1px solid var(--outline-var); }
.stat-row div:last-child { border-right: 0; }
.stat-row b { display: block; font-size: 22px; }
.stat-row small { color: var(--muted); }

.av-pick input:checked + .avatar { outline: 2px solid var(--av); outline-offset: 3px; }

[data-theme="dark"] .brand-logo, [data-theme="dark"] .auth-logo { background: #fff; border-radius: 10px; padding: 3px 5px; }

/* ---------- Auth ---------- */
.auth-body { background: var(--bg); }
.auth-wrap { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }
.auth-hero { position: relative; overflow: hidden; color: #fff; display: flex; align-items: center; padding: 56px;
  background: radial-gradient(1200px 600px at 10% 110%, rgba(253,190,44,.5), transparent 60%), radial-gradient(900px 700px at 100% 0%, #3A9BE0, transparent 60%), linear-gradient(160deg, #0A3A63, #227FC2); }
.auth-hero::after { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.12) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(to bottom, transparent, #000 60%); }
.auth-hero-inner { position: relative; z-index: 1; max-width: 460px; }
.hero-logo { display: inline-flex; background: #fff; border-radius: 24px; padding: 18px 22px; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.hero-logo img { height: 88px; width: auto; display: block; }
.auth-logo { height: 56px; width: auto; align-self: flex-start; margin-bottom: 4px; }
.auth-hero h1 { font-size: 40px; letter-spacing: -.03em; margin: 28px 0 12px; }
.auth-hero p { font-size: 17px; opacity: .88; line-height: 1.55; }
.auth-points { list-style: none; padding: 0; margin: 32px 0 0; display: flex; flex-direction: column; gap: 14px; }
.auth-points li { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.auth-points .msr { width: 36px; height: 36px; border-radius: 10px; background: rgba(255,255,255,.14); display: grid; place-items: center; font-size: 20px; }
.auth-panel { display: grid; place-items: center; padding: 32px; }
.auth-card { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 16px; }
.auth-card h2 { font-size: 28px; letter-spacing: -.02em; }

/* ---------- Skeleton / misc ---------- */
.section-title { display: flex; align-items: center; gap: 10px; margin: 26px 0 12px; }
.section-title h3 { font-size: 16px; }
.pill-count { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 8px; background: var(--surface-cont); color: var(--muted); }
.divider { height: 1px; background: var(--outline-var); margin: 4px 0; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 14px; font-size: 13.5px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 500; }
.attendees { display: flex; flex-wrap: wrap; gap: 8px; }
.attendee { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: var(--r-full); background: var(--surface-cont); font-size: 13px; font-weight: 500; }
.minutes { white-space: pre-wrap; line-height: 1.65; }
.meet-card { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 20px; color: inherit; border-top: 1px solid var(--outline-var); }
.meet-card:first-child { border-top: 0; }
.meet-card:hover { background: var(--surface-low); }
.meet-card .date-badge { width: 56px; padding: 8px 0; }
.meet-card .date-badge b { font-size: 22px; }
.meet-card .t { font-weight: 600; font-size: 15px; }
.meet-card .m { color: var(--muted); font-size: 12.5px; display: flex; gap: 12px; flex-wrap: wrap; margin-top: 3px; }
.meet-card .m span { display: inline-flex; align-items: center; gap: 4px; } .meet-card .m .msr { font-size: 15px; }
.av-stack { display: flex; }
.av-stack .avatar { margin-left: -8px; border: 2px solid var(--surface); }
.av-stack .avatar:first-child { margin-left: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1560px) { .hide-md { display: none !important; } }
@media (max-width: 1280px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail { grid-template-columns: minmax(0, 1fr) 320px; }
}
@media (max-width: 1080px) {
  .grid-dash, .detail, .role-grid { grid-template-columns: 1fr; }
  .search { width: 260px; }
}
@media (max-width: 860px) {
  .only-mobile { display: inline-grid !important; }
  .btn.only-mobile, .seg.only-mobile { display: inline-flex !important; }
  .task-row { grid-template-columns: 22px minmax(0, 1fr); row-gap: 6px; padding: 12px 16px; }
  .task-row .r { grid-column: 2; flex-wrap: wrap; }
  .task-row .t { white-space: normal; }
  .drawer { transform: translateX(-100%); width: var(--drawer) !important; box-shadow: var(--e3); }
  html.rail .drawer .lbl, html.rail .brand-text, html.rail .nav-section { display: initial; }
  html.rail .nav-item { justify-content: flex-start; padding: 0 16px; }
  .drawer.open { transform: none; }
  .drawer-foot { display: none; }
  .scrim.open { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 39; }
  .main, html.rail .main { margin-left: 0; }
  .appbar { padding: 0 10px; gap: 6px; }
  .search { display: none; }
  .appbar-actions { margin-left: auto; }
  .content { padding: 4px 14px 90px; }
  .kpis { gap: 10px; }
  .kpi { padding: 14px; } .kpi .val { font-size: 24px; }
  .grid-2, .perm-cols { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-hero { padding: 36px 24px; } .auth-hero h1 { font-size: 30px; } .auth-points { display: none; }
  .cal .day { min-height: 74px; } .cal .ev { font-size: 0; padding: 0; height: 6px; border-left-width: 0; } .cal .dow { font-size: 10px; padding: 6px; }
  .prop { grid-template-columns: 104px minmax(0, 1fr); padding: 6px 14px; }
  .notif-menu { width: calc(100vw - 20px); right: -60px; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .hide-sm { display: none !important; }
  table.data td, table.data th { padding: 10px; }
}
