/* NexttGen Tasks — theme taken from the NexttGen logo: electric blue → cyan gradient on deep navy. */
:root {
  --bg: #F3F6FC;
  --surface: #FFFFFF;
  --surface-2: #F6F9FE;
  --sunken: #EAF0FA;
  --border: #E1E8F4;
  --border-strong: #C9D5EA;
  --text: #0E1A3A;
  --muted: #5A6788;
  --faint: #8C97B3;
  --brand: #0B5CFF;
  --brand-strong: #0038E0;
  --brand-soft: #E8F0FF;
  --cyan: #00C6FF;
  --grad: linear-gradient(135deg, #0038FF 0%, #0A7BFF 55%, #00CFFF 100%);
  --danger: #D9363C;
  --danger-soft: #FDECEC;
  --warn: #C26A00;
  --warn-soft: #FFF3E0;
  --ok: #0F8A47;
  --ok-soft: #E4F6EB;
  --info: #0A7FA6;
  --info-soft: #E2F4FA;
  --shadow-sm: 0 1px 2px rgba(14, 26, 58, .06);
  --shadow: 0 8px 28px -10px rgba(14, 40, 110, .20);
  --shadow-lg: 0 30px 70px -24px rgba(10, 40, 120, .40);
  --r: 16px;
  --r-sm: 11px;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Sora', var(--font);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #060B1A; --surface: #0D1630; --surface-2: #111C3A; --sunken: #0A1226;
    --border: #1C2A4F; --border-strong: #2A3C68;
    --text: #E7EDFF; --muted: #9AA7CC; --faint: #6D7A9E;
    --brand: #3D8BFF; --brand-strong: #6AA6FF; --brand-soft: rgba(61, 139, 255, .14);
    --danger: #FF6B70; --danger-soft: rgba(255, 107, 112, .13);
    --warn: #FFB547; --warn-soft: rgba(255, 181, 71, .12);
    --ok: #3DD68C; --ok-soft: rgba(61, 214, 140, .12);
    --info: #38C6F4; --info-soft: rgba(56, 198, 244, .12);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4); --shadow: 0 10px 30px -12px rgba(0, 0, 0, .6); --shadow-lg: 0 30px 70px -20px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #060B1A; --surface: #0D1630; --surface-2: #111C3A; --sunken: #0A1226;
  --border: #1C2A4F; --border-strong: #2A3C68;
  --text: #E7EDFF; --muted: #9AA7CC; --faint: #6D7A9E;
  --brand: #3D8BFF; --brand-strong: #6AA6FF; --brand-soft: rgba(61, 139, 255, .14);
  --danger: #FF6B70; --danger-soft: rgba(255, 107, 112, .13);
  --warn: #FFB547; --warn-soft: rgba(255, 181, 71, .12);
  --ok: #3DD68C; --ok-soft: rgba(61, 214, 140, .12);
  --info: #38C6F4; --info-soft: rgba(56, 198, 244, .12);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4); --shadow: 0 10px 30px -12px rgba(0, 0, 0, .6); --shadow-lg: 0 30px 70px -20px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand); }
h1, h2, h3, h4, h5 { margin: 0; letter-spacing: -.01em; }
svg { width: 18px; height: 18px; flex: none; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.bad { color: var(--danger); }
.grow { flex: 1; }
code { background: var(--sunken); padding: 1px 6px; border-radius: 6px; font-size: 12.5px; }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: var(--r-sm);
  border: 1px solid var(--border); background: var(--surface); font-weight: 650;
  white-space: nowrap; text-decoration: none; color: var(--text);
  transition: border-color .15s, background .15s, transform .1s, filter .15s;
}
.btn:hover { border-color: var(--border-strong); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn.primary { background: var(--grad); color: #fff; border: 0; box-shadow: 0 10px 22px -10px rgba(11, 92, 255, .7); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 9px; }
.btn.lg { height: 46px; font-size: 15px; }
.btn.block { width: 100%; }
.btn svg { width: 16px; height: 16px; }
.link { background: none; border: 0; padding: 0; color: var(--brand); font-weight: 650; font-size: 12.5px; }
.link:hover { text-decoration: underline; }

.icon-btn {
  position: relative; width: 40px; height: 40px; flex: none; display: grid; place-items: center;
  border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface); color: var(--muted);
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }
.icon-btn.sm { width: 32px; height: 32px; border-radius: 9px; }
.icon-btn i { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font: 700 10.5px/18px var(--font); font-style: normal; }
.icon-btn i:empty { display: none; }

.fld { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; min-width: 0; }
.fld > span { font-size: 12.5px; font-weight: 650; color: var(--muted); }
.fld > span small { font-weight: 500; color: var(--faint); }
.fld input, .fld select, .fld textarea, .search input, textarea.mono {
  width: 100%; height: 42px; padding: 0 12px; border-radius: var(--r-sm);
  border: 1px solid var(--border); background: var(--surface-2); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.fld textarea, textarea.mono { height: auto; padding: 10px 12px; resize: vertical; }
.fld input:focus, .fld select:focus, .fld textarea:focus, textarea.mono:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); background: var(--surface); }
textarea.mono { font: 13px/1.6 ui-monospace, 'Cascadia Code', Consolas, monospace; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.form-err { color: var(--danger); font-size: 13px; min-height: 0; margin: 0 0 10px; }
.form-err:empty { display: none; }

.seg { display: inline-flex; padding: 4px; gap: 2px; background: var(--sunken); border-radius: 12px; border: 1px solid var(--border); }
.seg button { border: 0; background: none; padding: 8px 16px; border-radius: 9px; font-weight: 650; color: var(--muted); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.seg.small button { padding: 5px 12px; font-size: 12.5px; }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-weight: 600; font-size: 12.5px; color: var(--muted); }
.pill:hover { color: var(--text); border-color: var(--border-strong); }
.pill.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.av-pill { padding-left: 4px; }

.av {
  --c: var(--brand);
  width: 32px; height: 32px; flex: none; border-radius: 50%; display: inline-grid; place-items: center;
  background: var(--c); color: #fff; font: 700 12px/1 var(--font); letter-spacing: .02em;
  box-shadow: 0 0 0 2px var(--surface);
}
.av.sm { width: 26px; height: 26px; font-size: 10.5px; }
.av.xs { width: 22px; height: 22px; font-size: 9.5px; }
.av.lg { width: 46px; height: 46px; font-size: 15px; }
.av.empty { background: var(--sunken); color: var(--faint); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow-sm); }
.card h4 { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 12px; }
.card h4 svg { color: var(--brand); }

/* ---------- auth (full-page Login / Sign up) ---------- */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); background: var(--surface); }
.auth-side { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; padding: 48px 56px; color: #fff; background: var(--grad); }
.auth-side::before { content: ''; position: absolute; width: 560px; height: 560px; right: -200px; bottom: -220px; border-radius: 50%; background: rgba(255, 255, 255, .09); }
.auth-side::after { content: ''; position: absolute; width: 300px; height: 300px; left: -120px; top: 38%; border-radius: 50%; background: rgba(255, 255, 255, .06); }
.auth-logo-card { position: relative; z-index: 1; width: fit-content; padding: 12px 16px; border-radius: 18px; background: #F5F6F8; box-shadow: 0 18px 40px -16px rgba(0, 0, 50, .5); }
.auth-logo-card img { display: block; height: 92px; width: auto; }
.auth-pitch { position: relative; z-index: 1; max-width: 460px; }
.auth-pitch h2 { font: 700 44px/1.1 var(--display); letter-spacing: -.02em; }
.auth-pitch p { margin: 16px 0 28px; font-size: 16px; line-height: 1.6; opacity: .92; }
.auth-pitch ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.auth-pitch li { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 15px; }
.auth-pitch li span { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 9px; background: rgba(255, 255, 255, .18); font-weight: 800; font-size: 13px; }
.auth-copy { position: relative; z-index: 1; margin: 0; font-size: 12.5px; opacity: .75; }
.pixels { position: absolute; top: 48px; right: 56px; width: 80px; height: 80px; }
.pixels i { position: absolute; border-radius: 4px; background: rgba(255, 255, 255, .55); }
.pixels i:nth-child(1) { width: 18px; height: 18px; right: 0; top: 0; }
.pixels i:nth-child(2) { width: 24px; height: 24px; right: 28px; top: 16px; background: rgba(255, 255, 255, .8); }
.pixels i:nth-child(3) { width: 14px; height: 14px; right: 6px; top: 36px; }
.pixels i:nth-child(4) { width: 26px; height: 26px; right: 34px; top: 48px; background: rgba(255, 255, 255, .35); }
.pixels i:nth-child(5) { width: 12px; height: 12px; right: 4px; top: 60px; }

.auth-main { display: grid; place-items: center; padding: 48px 32px; background: var(--surface); }
.auth-box { width: min(400px, 100%); }
.auth-box .auth-logo { display: none; }
.auth-box h1 { font: 700 30px/1.2 var(--display); letter-spacing: -.02em; }
.auth-sub { margin: 6px 0 26px; color: var(--muted); font-size: 15px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 24px; background: var(--sunken); border: 1px solid var(--border); border-radius: 12px; }
.tabs button { height: 42px; border: 0; border-radius: 9px; background: none; font-weight: 700; font-size: 15px; color: var(--muted); }
.tabs button.on { background: var(--surface); color: var(--brand); box-shadow: var(--shadow-sm); }
.auth-box .fld input { height: 48px; font-size: 15px; }
.auth-box .form-err { padding: 8px 12px; border-radius: 10px; background: var(--danger-soft); }
.switch { margin: 16px 0 0; text-align: center; color: var(--muted); font-size: 13.5px; }
.switch .link, .auth-foot .link { font-size: inherit; }
.auth-foot { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); text-align: center; }
.auth-foot p { margin: 0; }

@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .auth-side { padding: 24px 20px; gap: 14px; }
  .auth-logo-card { display: none; }
  .auth-pitch h2 { font-size: 26px; }
  .auth-pitch p { margin: 8px 0 0; font-size: 14px; }
  .auth-pitch ul, .auth-copy, .pixels { display: none; }
  .auth-main { place-items: start center; padding: 28px 16px 40px; }
  .auth-box .auth-logo { display: block; width: 170px; height: auto; margin: 0 0 18px; border-radius: 12px; background: #F5F6F8; }
  .auth-box h1 { font-size: 24px; }
}

/* ---------- shell ---------- */
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 8px; padding: 18px 14px; background: var(--surface); border-right: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 18px; }
.brand img { width: 42px; height: 42px; border-radius: 12px; object-fit: cover; object-position: 45% 50%; background: #fff; border: 1px solid var(--border); transform-origin: center; }
.brand b { display: block; font-family: var(--display); font-size: 19px; line-height: 1.1; }
.brand b span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand small { color: var(--muted); font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; font-weight: 600; }
nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 0; background: none; border-radius: 11px; color: var(--muted); font-weight: 650; text-align: left; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--brand-soft); color: var(--brand); }
.nav-item em { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 700; background: var(--danger); color: #fff; border-radius: 999px; padding: 1px 7px; }
.nav-item em:empty { display: none; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.sync-chip { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 600; text-align: left; }
.sync-chip svg { width: 16px; height: 16px; }
.sync-chip.ok { color: var(--ok); background: var(--ok-soft); border-color: transparent; }
.sync-chip.syncing { color: var(--brand); background: var(--brand-soft); border-color: transparent; }
.sync-chip.syncing svg { animation: pulse 1s ease-in-out infinite; }
.sync-chip.error { color: var(--danger); background: var(--danger-soft); border-color: transparent; }
@keyframes pulse { 50% { opacity: .35; } }
.me { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--border); border-radius: 13px; }
.me-txt { flex: 1; min-width: 0; }
.me-txt b, .me-txt small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-txt small { color: var(--muted); font-size: 11.5px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 14px 28px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.quick { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 12px 0 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s; }
.quick:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.quick > svg { color: var(--brand); }
.quick input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; }
.quick kbd { font: 600 11px var(--font); color: var(--faint); border: 1px solid var(--border); border-radius: 6px; padding: 2px 6px; }
.quick-preview { position: absolute; left: 0; right: 0; top: calc(100% + 8px); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); }
.quick-preview:empty { display: none; }
.qp-title { width: 100%; font-weight: 700; margin-bottom: 2px; }
.qp-help { width: 100%; color: var(--faint); font-size: 11.5px; margin-top: 4px; }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border-radius: 8px; background: var(--sunken); font-size: 12px; font-weight: 600; }
.chip svg { width: 14px; height: 14px; color: var(--muted); }
.chip i { font-style: normal; color: var(--faint); font-weight: 500; }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.pri-high { background: var(--danger-soft); color: var(--danger); }
.chip.pri-medium { background: var(--brand-soft); color: var(--brand); }
.chip.pri-low { background: var(--ok-soft); color: var(--ok); }

.view { padding: 26px 28px 80px; width: 100%; max-width: 1360px; }
.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.view-head h1 { font-family: var(--display); font-size: 28px; line-height: 1.2; }
.eyebrow { margin: 0 0 4px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.head-stats { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.head-stats b { color: var(--text); font-size: 16px; margin-right: 3px; }
.head-stats .fire { display: inline-flex; align-items: center; gap: 4px; color: var(--warn); }
.head-stats .fire b { color: var(--warn); }

/* ---------- KPIs ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.kpis.three { grid-template-columns: repeat(3, 1fr); }
.kpi { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); }
.kpi::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--tone, var(--brand)); }
.kpi span { color: var(--muted); font-weight: 650; font-size: 12.5px; }
.kpi b { font: 700 30px/1.15 var(--display); }
.kpi b.name { font-size: 22px; line-height: 1.5; }
.kpi small { color: var(--faint); font-size: 12px; }
.tone-brand { --tone: var(--brand); }
.tone-danger { --tone: var(--danger); }
.tone-info { --tone: var(--info); }
.tone-ok { --tone: var(--ok); }
.tone-warn { --tone: var(--warn); }
.kpi.tone-danger b { color: var(--danger); }

/* ---------- dashboard ---------- */
.dash { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.dash-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 90px; }

.strip { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.strip-day { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 10px 9px; border-radius: 13px; border: 1px solid var(--border); background: var(--surface); text-align: left; min-width: 0; }
.strip-day:hover { border-color: var(--border-strong); }
.strip-day small { color: var(--muted); font-weight: 650; font-size: 11.5px; }
.strip-day b { font: 700 20px/1.2 var(--display); }
.strip-day b svg { width: 20px; height: 20px; color: var(--muted); margin: 2px 0; }
.strip-day em { font-style: normal; font-size: 11px; color: var(--faint); white-space: nowrap; }
.strip-day .bar { display: block; width: 100%; height: 4px; border-radius: 4px; background: var(--sunken); margin: 4px 0 2px; overflow: hidden; }
.strip-day .bar i { display: block; height: 100%; border-radius: 4px; background: var(--brand); }
.strip-day.is-today { border-color: var(--brand); }
.strip-day.on { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 10px 22px -12px rgba(11, 92, 255, .8); }
.strip-day.on small, .strip-day.on em, .strip-day.on b svg { color: rgba(255, 255, 255, .85); }
.strip-day.on .bar { background: rgba(255, 255, 255, .25); }
.strip-day.on .bar i { background: #fff; }

.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 18px; }
.who { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 auto; }
.search { display: flex; align-items: center; gap: 6px; position: relative; flex: 0 1 260px; }
.search svg { position: absolute; left: 11px; color: var(--faint); width: 16px; height: 16px; }
.search input { height: 36px; padding-left: 34px; }
.search input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }

.groups { display: flex; flex-direction: column; gap: 22px; }
.group > header, .hday > header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.group h3, .hday h3 { font-size: 15px; font-weight: 750; }
.group .sub, .hday .sub { color: var(--faint); font-size: 12.5px; }
.group .count { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--sunken); color: var(--muted); font-size: 11.5px; font-weight: 700; display: grid; place-items: center; }
.group header .btn { margin-left: auto; }
.group.tone-danger h3 { color: var(--danger); }
.group.tone-danger .count { background: var(--danger-soft); color: var(--danger); }
.group.tone-brand h3 { color: var(--brand); }
.group.tone-brand .count { background: var(--brand-soft); color: var(--brand); }
.tasks { display: flex; flex-direction: column; gap: 8px; }

.task { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--pc, var(--border)); border-radius: 13px; transition: border-color .15s, box-shadow .15s, transform .15s; }
.task:hover { box-shadow: var(--shadow); border-color: var(--border-strong); border-left-color: var(--pc); }
.pri-high { --pc: var(--danger); }
.pri-medium { --pc: var(--brand); }
.pri-low { --pc: var(--ok); }
.check { width: 24px; height: 24px; flex: none; display: grid; place-items: center; border-radius: 8px; border: 2px solid var(--border-strong); background: var(--surface); color: transparent; padding: 0; transition: all .15s; }
.check svg { width: 14px; height: 14px; stroke-width: 3; }
.check:hover { border-color: var(--ok); color: var(--ok); }
.check.sm { width: 20px; height: 20px; border-radius: 6px; }
.st-done .check { background: var(--ok); border-color: var(--ok); color: #fff; }
.t-body { flex: 1; min-width: 0; cursor: pointer; }
.t-title { font-weight: 650; overflow: hidden; text-overflow: ellipsis; }
.st-done .t-title { text-decoration: line-through; color: var(--faint); }
.t-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 3px; color: var(--muted); font-size: 12px; }
.t-meta span { display: inline-flex; align-items: center; gap: 4px; }
.t-meta svg { width: 13px; height: 13px; }
.pri-tag { font-weight: 700; color: var(--pc); }
.st-done .pri-tag { color: var(--faint); }
.t-meta .late { color: var(--danger); font-weight: 700; background: var(--danger-soft); padding: 0 7px; border-radius: 6px; }
.t-meta .prog { color: var(--info); font-weight: 700; background: var(--info-soft); padding: 0 7px; border-radius: 6px; }
.t-meta .tag { color: var(--brand); }
.t-side { display: flex; align-items: center; gap: 8px; }
.mini { width: 28px; height: 28px; display: grid; place-items: center; padding: 0; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); opacity: 0; transition: opacity .15s; }
.mini svg { width: 13px; height: 13px; }
.task:hover .mini, .mini:focus-visible { opacity: 1; }
.mini:hover { color: var(--brand); border-color: var(--brand); }

.empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 46px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--border-strong); border-radius: var(--r); background: var(--surface); }
.empty img { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; opacity: .85; }
.empty p { margin: 0; max-width: 42ch; }

/* side cards */
.focus ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; counter-reset: f; }
.focus li { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.focus li > div { flex: 1; min-width: 0; cursor: pointer; }
.focus li b { display: block; font-size: 13px; line-height: 1.35; }
.focus li small { color: var(--muted); font-size: 11.5px; }
.focus li .check { margin-top: 1px; }
.ins { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); }
.ins:first-of-type { border-top: 0; padding-top: 0; }
.ins p { margin: 0 0 2px; font-size: 13px; line-height: 1.45; }
.ins-ic { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 8px; background: color-mix(in srgb, var(--tone) 14%, transparent); color: var(--tone); }
.ins-ic svg { width: 15px; height: 15px; }
.pulse-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; margin: 0 -8px; width: calc(100% + 16px); border: 0; background: none; border-radius: 10px; text-align: left; }
.pulse-row:hover { background: var(--surface-2); }
.pulse-row > div { flex: 1; min-width: 0; }
.pulse-row b { display: block; font-size: 13px; }
.pulse-row small { display: block; color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nums { display: flex; gap: 4px; }
.nums em { font-style: normal; font-weight: 700; font-size: 11.5px; min-width: 22px; height: 22px; display: grid; place-items: center; border-radius: 7px; background: var(--brand-soft); color: var(--brand); }
.nums em.bad { background: var(--danger-soft); color: var(--danger); }

/* ---------- week ---------- */
.week-nav { display: flex; gap: 8px; }
.week { display: grid; grid-template-columns: repeat(7, minmax(150px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 8px; }
.wday { display: flex; flex-direction: column; min-height: 360px; padding: 10px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--border); }
.wday.today { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.wday.past { background: var(--surface-2); }
.wday header { display: flex; align-items: baseline; gap: 6px; padding: 2px 4px 10px; }
.wday header small { color: var(--muted); font-weight: 700; text-transform: uppercase; font-size: 11px; letter-spacing: .06em; }
.wday header b { font: 700 20px var(--display); }
.wday.today header b { color: var(--brand); }
.wday header em { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 700; color: var(--muted); }
.wlist { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.wcard { display: flex; flex-direction: column; gap: 6px; padding: 8px 9px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); border-left: 3px solid var(--pc); cursor: pointer; font-size: 12.5px; }
.wcard:hover { border-color: var(--border-strong); border-left-color: var(--pc); }
.wcard .wt { font-weight: 650; line-height: 1.35; }
.wcard .wm { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11px; }
.wcard.st-done .wt { text-decoration: line-through; color: var(--faint); }
.add-day { margin-top: 8px; display: flex; align-items: center; justify-content: center; gap: 4px; height: 32px; border: 1px dashed var(--border-strong); border-radius: 9px; background: none; color: var(--muted); font-size: 12px; font-weight: 600; }
.add-day svg { width: 14px; height: 14px; }
.add-day:hover { color: var(--brand); border-color: var(--brand); }

/* ---------- team ---------- */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-bottom: 18px; }
.member { display: flex; flex-direction: column; gap: 14px; }
.m-top { display: flex; align-items: center; gap: 12px; }
.m-top b { display: block; font-size: 15px; }
.m-top small { color: var(--muted); font-size: 12px; }
.m-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: center; }
.m-stats div { padding: 8px 0; border-radius: 10px; background: var(--surface-2); }
.m-stats b { display: block; font: 700 18px var(--display); }
.m-stats small { color: var(--muted); font-size: 11px; }
.m-stats .bad b { color: var(--danger); }
.load { height: 6px; border-radius: 6px; background: var(--sunken); overflow: hidden; }
.load span { display: block; height: 100%; background: var(--grad); border-radius: 6px; }
.doing { margin: 0; font-size: 12.5px; display: flex; gap: 6px; align-items: center; min-height: 20px; }
.doing svg { width: 13px; height: 13px; color: var(--info); }
.table-wrap { overflow-x: auto; }
.load-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.load-table th { text-align: center; color: var(--muted); font-weight: 650; font-size: 12px; padding: 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.load-table th:first-child, .load-table td:first-child { text-align: left; }
.load-table td { text-align: center; padding: 8px; border-bottom: 1px solid var(--border); font-weight: 700; font-variant-numeric: tabular-nums; }
.load-table td:first-child { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.load-table td.zero { color: var(--faint); font-weight: 400; }
.load-table td.hot { background: var(--warn-soft); color: var(--warn); }

/* ---------- history ---------- */
.hday { margin-bottom: 22px; }
.feed { list-style: none; margin: 0; padding: 4px 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); }
.ev { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--border); }
.ev:first-child { border-top: 0; }
.ev time { width: 72px; flex: none; color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; }
.ev p { margin: 0; font-size: 13px; }
.ev a { color: var(--text); font-weight: 600; text-decoration: none; }
.ev a:hover { color: var(--brand); text-decoration: underline; }
.ev-completed { box-shadow: inset 3px 0 0 var(--ok); }
.ev-deleted p { color: var(--muted); }

/* ---------- settings ---------- */
.settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.settings .card p { margin: 0 0 14px; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatches input { position: absolute; opacity: 0; pointer-events: none; }
.swatches i { display: block; width: 28px; height: 28px; border-radius: 50%; background: var(--c); cursor: pointer; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px transparent; }
.swatches input:checked + i { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--c); }
.swatches input:focus-visible + i { outline: 2px solid var(--brand); outline-offset: 4px; }
.invite { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.invite p { margin: 2px 0 0 !important; }

/* ---------- modal ---------- */
.overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(6, 12, 32, .55); backdrop-filter: blur(4px); animation: fade .15s ease-out; }
.modal { width: min(620px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 22px; box-shadow: var(--shadow-lg); animation: rise .2s ease-out; }
.modal.wide { width: min(720px, 100%); }
.m-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.m-head h2 { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-size: 20px; }
.m-head h2 svg { color: var(--brand); }
.m-foot { display: flex; align-items: center; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.modal h5 { margin: 16px 0 8px; font-size: 13px; }
.modal > p { margin: 0 0 14px; }
.ai-hint { display: flex; align-items: center; gap: 6px; margin: -6px 0 12px; padding: 8px 10px; border-radius: 10px; background: var(--brand-soft); color: var(--text); font-size: 12.5px; }
.ai-hint svg { width: 15px; height: 15px; color: var(--brand); }
.t-hist { margin-top: 4px; border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; font-size: 12.5px; }
.t-hist summary { display: flex; align-items: center; gap: 6px; cursor: pointer; color: var(--muted); font-weight: 600; }
.t-hist summary svg { width: 15px; height: 15px; }
.t-hist ul { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.t-hist time { color: var(--faint); margin-right: 6px; }
.banner { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--brand-soft); margin-bottom: 8px; font-size: 13px; }
.banner span { flex: 1; }
.banner svg { color: var(--brand); }

/* ---------- toasts ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 8px; max-width: min(420px, calc(100vw - 32px)); padding: 12px 16px; border-radius: 12px; background: #0E1A3A; color: #fff; font-size: 13.5px; box-shadow: var(--shadow-lg); border-left: 4px solid var(--cyan); animation: rise .2s ease-out; transition: opacity .4s, transform .4s; pointer-events: auto; }
.toast svg { width: 16px; height: 16px; flex: none; }
.toast.ok { border-left-color: #3DD68C; }
.toast.warn { border-left-color: #FFB547; }
.toast.bad { border-left-color: #FF6B70; }
.toast .bad { color: #FF9EA1; }
.toast.out { opacity: 0; transform: translateY(8px); }
[data-theme="dark"] .toast { background: #1B2850; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .dash { grid-template-columns: 1fr; }
  .dash-side { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 50; top: auto; bottom: 0; left: 0; right: 0; height: auto; flex-direction: row; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--border); }
  .brand, .side-foot { display: none; }
  nav { flex-direction: row; flex: 1; justify-content: space-around; }
  .nav-item { position: relative; flex-direction: column; gap: 2px; padding: 6px 4px; font-size: 10.5px; flex: 1; align-items: center; }
  .nav-item em { position: absolute; top: 2px; right: calc(50% - 20px); margin: 0; }
  .top { padding: 10px 16px; }
  .top .btn.primary span { display: none; }
  .top .btn.primary { width: 40px; padding: 0; }
  .quick kbd { display: none; }
  .view { padding: 18px 16px 110px; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .strip { display: flex; overflow-x: auto; scrollbar-width: none; }
  .strip-day { flex: 0 0 82px; }
  .settings { grid-template-columns: 1fr; }
  .week { grid-template-columns: repeat(7, 160px); }
  .mini { opacity: 1; }
}
@media (max-width: 560px) {
  .row3 { grid-template-columns: 1fr 1fr; }
  .row3 .fld:first-child { grid-column: 1 / -1; }
  .row2 { grid-template-columns: 1fr; }
  .kpis.three { grid-template-columns: 1fr; }
  .view-head h1 { font-size: 23px; }
  .search { flex: 1 1 100%; }
  .ev time { width: 58px; }
  .toasts { left: 16px; right: 16px; bottom: 84px; align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* team: role picker */
.role-pick { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.role-pick select { flex: 1; height: 34px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface-2); font-weight: 600; }
.role-pick select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.auth-warn { margin: 0 0 10px; padding: 10px 12px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); font-size: 13px; line-height: 1.45; }
.auth-warn b { color: inherit; }
