/* =============================================================
   Nudge — stylesheet
   Palette: ink navy, dial blue, signal amber (due), rose (overdue), teal (done)
   ============================================================= */

:root {
  --bg: #EEF0F7;
  --panel: #FFFFFF;
  --panel-2: #F6F7FC;
  --ink: #1A1D3A;
  --ink-2: #3D4166;
  --muted: #6B6F92;
  --line: #E0E3EF;
  --line-strong: #CBD0E3;

  --dial: #3446D6;
  --dial-hover: #2635B8;
  --dial-ink: #FFFFFF;
  --dial-soft: #E7EAFD;

  --amber: #C77A06;
  --amber-bright: #F0A527;
  --amber-soft: #FDF1DC;
  --rose: #C93545;
  --rose-soft: #FBE7E9;
  --teal: #13806E;
  --teal-soft: #DDF3EF;

  --side: #191C38;
  --side-ink: #B9BDDD;
  --side-ink-strong: #FFFFFF;
  --side-hover: #23274A;
  --side-active: #2C3163;

  --r-s: 8px;
  --r-m: 12px;
  --r-l: 18px;
  --shadow-1: 0 1px 2px rgba(26, 29, 58, .06);
  --shadow-2: 0 2px 4px rgba(26, 29, 58, .05), 0 18px 40px -18px rgba(26, 29, 58, .35);

  --f-display: 'Sora', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --f-body: 'Instrument Sans', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #10122A; --panel: #191C38; --panel-2: #1F2346; --ink: #ECEEFB; --ink-2: #C3C7E6;
    --muted: #9095BE; --line: #2B3060; --line-strong: #3A4078;
    --dial: #7886FF; --dial-hover: #929DFF; --dial-ink: #0D0F2A; --dial-soft: #252B62;
    --amber: #F2B54F; --amber-bright: #F2B54F; --amber-soft: #382C14;
    --rose: #F27884; --rose-soft: #3C1C27; --teal: #4FCBB5; --teal-soft: #15332F;
    --side: #0B0D22; --side-hover: #171A3A; --side-active: #222760;
    --shadow-2: 0 2px 4px rgba(0, 0, 0, .3), 0 18px 40px -18px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #10122A; --panel: #191C38; --panel-2: #1F2346; --ink: #ECEEFB; --ink-2: #C3C7E6;
  --muted: #9095BE; --line: #2B3060; --line-strong: #3A4078;
  --dial: #7886FF; --dial-hover: #929DFF; --dial-ink: #0D0F2A; --dial-soft: #252B62;
  --amber: #F2B54F; --amber-bright: #F2B54F; --amber-soft: #382C14;
  --rose: #F27884; --rose-soft: #3C1C27; --teal: #4FCBB5; --teal-soft: #15332F;
  --side: #0B0D22; --side-hover: #171A3A; --side-active: #222760;
  --shadow-2: 0 2px 4px rgba(0, 0, 0, .3), 0 18px 40px -18px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

/* ---------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--f-display); margin: 0; letter-spacing: -0.015em; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--dial); outline-offset: 2px; border-radius: 6px; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------- brand */
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--f-display); font-weight: 700; font-size: 20px; letter-spacing: -0.02em; }
.brand.small { font-size: 17px; }
.brand-mark {
  width: 26px; height: 26px; border-radius: 8px; background: var(--dial); position: relative; flex: none;
}
.brand-mark::before { content: ''; position: absolute; inset: 6px; border: 2.2px solid #fff; border-radius: 50%; }
.brand-mark::after { content: ''; position: absolute; left: 12px; top: 9px; width: 2.2px; height: 6px; background: #fff; border-radius: 2px; }

/* ---------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent;
  font-weight: 600; font-size: 14px; white-space: nowrap; transition: background .15s, border-color .15s, color .15s;
}
.btn.primary { background: var(--dial); color: var(--dial-ink); }
.btn.primary:hover { background: var(--dial-hover); }
.btn.ghost { background: var(--panel); border-color: var(--line-strong); color: var(--ink); }
.btn.ghost:hover { background: var(--panel-2); }
.btn.danger { background: var(--rose); color: #fff; }
.btn.small { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .6; cursor: progress; }

.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
  border: 0; background: transparent; color: var(--muted); transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--panel-2); color: var(--ink); }
.icon-btn.danger:hover { background: var(--rose-soft); color: var(--rose); }

/* ---------------------------------------------------------- forms */
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field small { color: var(--muted); font-size: 12.5px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search],
input[type=datetime-local], input:not([type]), select, textarea {
  width: 100%; height: 42px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--line-strong); background: var(--panel); color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; min-height: 88px; padding: 10px 12px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--dial); box-shadow: 0 0 0 3px var(--dial-soft); }
.form-error {
  background: var(--rose-soft); color: var(--rose); border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-bottom: 16px; font-weight: 500;
}

.seg { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--panel-2); border: 1px solid var(--line); gap: 2px; }
.seg button {
  border: 0; background: transparent; height: 32px; padding: 0 12px; border-radius: 8px; font-weight: 600; font-size: 13px; color: var(--muted);
}
.seg button[aria-pressed="true"] { background: var(--panel); color: var(--ink); box-shadow: var(--shadow-1); }
.seg.full { display: flex; }
.seg.full button { flex: 1; }

.switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; cursor: pointer; }
.switch + .switch { border-top: 1px solid var(--line); }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track-ui { width: 40px; height: 24px; border-radius: 99px; background: var(--line-strong); position: relative; flex: none; transition: background .2s; }
.switch .track-ui::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .2s; }
.switch input:checked + .track-ui { background: var(--dial); }
.switch input:checked + .track-ui::after { transform: translateX(16px); }
.switch input:focus-visible + .track-ui { outline: 2px solid var(--dial); outline-offset: 2px; }
.switch-text strong { display: block; font-weight: 600; font-size: 14.5px; }
.switch-text small { color: var(--muted); font-size: 13px; }

/* ---------------------------------------------------------- auth page */
body.auth { background: var(--panel); }
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.auth-brand {
  background: var(--side); color: #fff; padding: 40px 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  position: relative; overflow: hidden;
}
.auth-pitch { max-width: 30rem; }
.auth-pitch h1 { font-size: clamp(30px, 3.4vw, 44px); line-height: 1.12; font-weight: 600; letter-spacing: -0.03em; }
.auth-pitch p { margin-top: 16px; color: var(--side-ink); font-size: 16.5px; max-width: 26rem; }
.auth-track { position: relative; height: 72px; border-top: 1px solid rgba(255,255,255,.18); }
.auth-track .tick { position: absolute; top: 10px; font-size: 12px; color: rgba(255,255,255,.5); transform: translateX(-2px); font-variant-numeric: tabular-nums; }
.auth-track .tick::before { content: ''; position: absolute; top: -10px; left: 2px; width: 1px; height: 6px; background: rgba(255,255,255,.3); }
.auth-track .dot { position: absolute; top: -6px; width: 11px; height: 11px; border-radius: 50%; background: #7886FF; transform: translateX(-50%); }
.auth-track .dot.hi { background: var(--amber-bright); }
.auth-track .needle { position: absolute; top: -40px; height: 40px; width: 2px; background: #fff; }
.auth-track .needle::before { content: ''; position: absolute; top: -4px; left: -3px; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.auth-form { display: grid; place-items: center; padding: 40px 24px; }
.card-form { width: 100%; max-width: 380px; }
.card-form h2 { font-size: 26px; font-weight: 600; }
.card-form .sub { color: var(--muted); margin: 8px 0 28px; }
.card-form .btn { margin-top: 8px; height: 46px; }
@media (max-width: 860px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-brand { padding: 28px 24px; gap: 28px; }
  .auth-pitch h1 { font-size: 28px; }
}

/* ---------------------------------------------------------- shell */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.side {
  background: var(--side); color: var(--side-ink); padding: 22px 16px 16px; display: flex; flex-direction: column; gap: 22px;
  position: sticky; top: 0; height: 100vh; z-index: 30;
}
.side .brand { color: #fff; padding: 0 8px; }
.nav { display: grid; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 12px; border-radius: 10px;
  background: transparent; border: 0; color: var(--side-ink); font-weight: 500; text-align: left; transition: background .15s, color .15s;
}
.nav-item:hover { background: var(--side-hover); color: #fff; }
.nav-item[aria-current="page"] { background: var(--side-active); color: #fff; }
.nav-item .count {
  margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 99px; font-size: 12px; font-weight: 600;
  display: grid; place-items: center; background: rgba(255,255,255,.1); color: #fff; font-variant-numeric: tabular-nums;
}
.nav-item .count.hot { background: var(--amber-bright); color: #2A1B00; }
.nav-item .count:empty { display: none; }
.new-btn { height: 44px; }
.me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 8px 0; border-top: 1px solid rgba(255,255,255,.08); }
.me-text { min-width: 0; flex: 1; }
.me-text strong { display: block; color: #fff; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-text small { color: var(--side-ink); font-size: 12.5px; }
.me .icon-btn { color: var(--side-ink); }
.me .icon-btn:hover { background: var(--side-hover); color: #fff; }

.avatar {
  width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  font-size: 12.5px; font-weight: 700; color: #fff; background: var(--dial); font-family: var(--f-display); letter-spacing: 0;
}
.avatar.sm { width: 22px; height: 22px; font-size: 10px; }

.topbar { display: none; }
.main { max-width: 1120px; margin: 0 auto; padding: 32px 40px 120px; outline: none; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 272px; transform: translateX(-100%); transition: transform .25s ease; box-shadow: var(--shadow-2); }
  .side.open { transform: none; }
  .topbar {
    display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 0 12px;
    background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20;
  }
  .main { padding: 20px 16px 120px; }
}

/* ---------------------------------------------------------- page heading */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { font-size: 28px; font-weight: 600; letter-spacing: -0.025em; }
.page-head p { color: var(--muted); margin-top: 4px; max-width: 60ch; }

/* ---------------------------------------------------------- hero: clock + day track */
.hero {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 40px; align-items: end;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-l); padding: 26px 28px 22px; margin-bottom: 28px;
}
.clock {
  font-family: var(--f-display); font-weight: 600; font-size: 64px; line-height: .95; letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums; color: var(--ink);
}
.clock .sec { color: var(--muted); font-size: .42em; letter-spacing: -0.02em; margin-left: 4px; vertical-align: .9em; }
.clock .ampm { font-size: .32em; letter-spacing: 0; margin-left: 6px; color: var(--muted); font-weight: 500; }
.hero-date { color: var(--ink-2); font-weight: 500; margin-top: 10px; }
.hero-summary { color: var(--muted); font-size: 14px; margin-top: 2px; }
.hero-summary b { color: var(--ink); font-weight: 600; }
.hero-summary b.over { color: var(--rose); }

.track { position: relative; height: 92px; }
.track-line { position: absolute; left: 0; right: 0; bottom: 24px; height: 6px; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--line); }
.track-past { position: absolute; left: 0; bottom: 24px; height: 6px; border-radius: 99px; background: var(--dial-soft); }
.track-tick { position: absolute; bottom: 0; font-size: 11.5px; color: var(--muted); transform: translateX(-50%); font-variant-numeric: tabular-nums; }
.track-tick::before { content: ''; position: absolute; left: 50%; bottom: 20px; width: 1px; height: 6px; background: var(--line-strong); }
.track-dot {
  position: absolute; bottom: 18px; width: 18px; height: 18px; border-radius: 50%; transform: translateX(-50%);
  background: var(--dial); border: 3px solid var(--panel); box-shadow: 0 0 0 1px var(--dial); padding: 0; cursor: pointer;
}
.track-dot.high { background: var(--amber-bright); box-shadow: 0 0 0 1px var(--amber); }
.track-dot.overdue { background: var(--rose); box-shadow: 0 0 0 1px var(--rose); }
.track-dot.done { background: var(--teal); box-shadow: 0 0 0 1px var(--teal); opacity: .55; }
.track-dot:hover { z-index: 3; }
.track-dot .tip {
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); white-space: nowrap; pointer-events: none;
  background: var(--ink); color: var(--panel); font-size: 12px; font-weight: 500; padding: 5px 9px; border-radius: 7px; opacity: 0; transition: opacity .12s;
}
.track-dot:hover .tip, .track-dot:focus-visible .tip { opacity: 1; }
.track-needle { position: absolute; bottom: 14px; top: 6px; width: 2px; background: var(--ink); transform: translateX(-1px); border-radius: 2px; }
.track-needle::before { content: ''; position: absolute; top: -4px; left: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); }
.track-needle span { position: absolute; top: -6px; left: 10px; font-size: 12px; font-weight: 600; white-space: nowrap; color: var(--ink); }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 20px; padding: 20px; }
  .clock { font-size: 48px; }
}

/* ---------------------------------------------------------- toolbar */
.toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 20px; flex-wrap: wrap; }
.search { position: relative; flex: 1; min-width: 200px; max-width: 360px; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { padding-left: 38px; height: 40px; }
.toolbar .spacer { flex: 1; }

/* ---------------------------------------------------------- reminder groups */
.group { margin-bottom: 26px; }
.group-head { display: flex; align-items: baseline; gap: 10px; margin: 0 4px 10px; }
.group-head h2 { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.group-head .n { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.group.overdue .group-head h2 { color: var(--rose); }
.group-list { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; }

.rem {
  display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 14px; align-items: start;
  padding: 14px 14px 14px 16px; position: relative;
}
.rem + .rem { border-top: 1px solid var(--line); }
.rem::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: transparent; }
.rem.prio-high::before { background: var(--amber-bright); }
.rem.overdue::before { background: var(--rose); }
.rem.flash { animation: flash 1.4s ease-out 1; }
@keyframes flash { from { background: var(--dial-soft); } to { background: transparent; } }

.tick-btn {
  width: 24px; height: 24px; margin-top: 1px; border-radius: 50%; border: 2px solid var(--line-strong); background: transparent;
  display: grid; place-items: center; color: transparent; padding: 0; transition: border-color .15s, background .15s, color .15s;
}
.tick-btn svg { width: 14px; height: 14px; stroke-width: 3; }
.tick-btn:hover { border-color: var(--teal); color: var(--teal); }
.rem.done .tick-btn { background: var(--teal); border-color: var(--teal); color: #fff; }
.rem.done h3 { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }

.rem h3 { font-family: var(--f-body); font-size: 15.5px; font-weight: 600; letter-spacing: 0; line-height: 1.35; overflow-wrap: anywhere; }
.rem .notes { color: var(--muted); font-size: 14px; margin-top: 2px; max-width: 70ch; overflow-wrap: anywhere; white-space: pre-line; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.meta > span { display: inline-flex; align-items: center; gap: 6px; }
.meta svg.i { width: 14px; height: 14px; }
.when { font-weight: 600; color: var(--ink-2); }
.when.overdue { color: var(--rose); }
.when.soon { color: var(--amber); }
.when.done { color: var(--teal); }
.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.pill.high { background: var(--amber-soft); color: var(--amber); }
.pill.low { background: var(--panel-2); color: var(--muted); }
.pill.snz { background: var(--dial-soft); color: var(--dial); }
.rem-actions { display: flex; gap: 2px; opacity: .55; transition: opacity .15s; }
.rem:hover .rem-actions, .rem:focus-within .rem-actions { opacity: 1; }
@media (hover: none) { .rem-actions { opacity: 1; } }

.empty {
  text-align: center; padding: 56px 24px; background: var(--panel); border: 1px dashed var(--line-strong); border-radius: var(--r-l);
}
.empty h2 { font-size: 19px; font-weight: 600; }
.empty p { color: var(--muted); margin: 6px auto 18px; max-width: 40ch; }
kbd { font-family: var(--f-body); font-size: 12px; padding: 1px 6px; border-radius: 5px; border: 1px solid var(--line-strong); background: var(--panel-2); }

/* ---------------------------------------------------------- drawer */
.scrim { position: fixed; inset: 0; background: rgba(16, 18, 42, .42); z-index: 50; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100%); background: var(--panel); z-index: 60;
  transform: translateX(100%); visibility: hidden; transition: transform .26s cubic-bezier(.2, .8, .2, 1), visibility 0s .26s; display: flex; flex-direction: column;
}
.drawer.open { transform: none; visibility: visible; box-shadow: var(--shadow-2); transition: transform .26s cubic-bezier(.2, .8, .2, 1); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 19px; font-weight: 600; }
.drawer-body { flex: 1; overflow-y: auto; padding: 22px 24px 24px; }
.drawer-foot { position: sticky; bottom: -24px; background: var(--panel); padding: 16px 0 0; margin-top: 8px; display: flex; gap: 10px; justify-content: flex-end; border-top: 1px solid var(--line); }

.quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip {
  height: 30px; padding: 0 11px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--panel);
  font-size: 13px; font-weight: 500; color: var(--ink-2);
}
.chip:hover { border-color: var(--dial); color: var(--dial); }

.people { display: grid; gap: 4px; max-height: 240px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; padding: 6px; }
.person { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; cursor: pointer; }
.person:hover { background: var(--panel-2); }
.person input { width: 17px; height: 17px; accent-color: var(--dial); margin: 0; }
.person .nm { flex: 1; font-size: 14px; font-weight: 500; }
.person .nm small { color: var(--muted); font-weight: 400; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }

/* ---------------------------------------------------------- settings */
.settings-grid.single { grid-template-columns: minmax(0, 620px); }
.settings-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); align-items: start; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-l); padding: 22px 24px; }
.panel h2 { font-size: 17px; font-weight: 600; }
.panel > p.lead { color: var(--muted); font-size: 14px; margin: 4px 0 18px; }
.inline-num { display: flex; align-items: center; gap: 10px; }
.inline-num input { width: 110px; }
.inline-num span { color: var(--muted); font-size: 14px; }
.row-end { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.perm-note { font-size: 13px; color: var(--muted); margin-top: 4px; }
.perm-note.warn { color: var(--amber); }
.save-bar { display: flex; justify-content: flex-end; margin-top: 20px; }

/* ---------------------------------------------------------- team table */
.table-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-l); overflow-x: auto; }
table.team { width: 100%; border-collapse: collapse; min-width: 640px; }
.team th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--panel-2); }
.team td { padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
.team tr:last-child td { border-bottom: 0; }
.team .who { display: flex; align-items: center; gap: 12px; }
.team .who small { display: block; color: var(--muted); font-size: 12.5px; }
.team tr.off td { color: var(--muted); }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 7px; font-size: 12.5px; font-weight: 600; }
.badge.admin { background: var(--dial-soft); color: var(--dial); }
.badge.member { background: var(--panel-2); color: var(--ink-2); }
.badge.on { color: var(--teal); padding: 0; }
.badge.off { color: var(--muted); padding: 0; }
.badge.on::before, .badge.off::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* ---------------------------------------------------------- alerts */
.alerts {
  position: fixed; right: 20px; bottom: 20px; z-index: 80; display: flex; flex-direction: column; gap: 12px; width: min(380px, calc(100% - 32px));
  max-height: calc(100vh - 8px); overflow-y: auto; padding: 16px; margin: -16px; scrollbar-width: thin; transition: right .26s;
}
.alerts-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: none;
  background: var(--ink); color: var(--panel); border-radius: 12px; padding: 8px 8px 8px 14px; font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow-2);
}
.alerts-bar .btn { background: transparent; color: var(--panel); border-color: rgba(255,255,255,.3); }
.alerts-bar .btn:hover { background: rgba(255,255,255,.12); }
.alert { flex: none; }
@media (min-width: 901px) { .drawer.open ~ .alerts { right: 480px; } }
.alert {
  background: var(--panel); border-radius: 16px; box-shadow: var(--shadow-2); border: 1px solid var(--line);
  padding: 16px 16px 14px 20px; position: relative; overflow: hidden; animation: alert-in .35s cubic-bezier(.2, .9, .3, 1.2);
}
.alert::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--amber-bright); }
.alert.overdue::before { background: var(--rose); }
@keyframes alert-in { from { transform: translateY(16px) scale(.97); opacity: 0; } }
.alert-top { display: flex; align-items: center; gap: 10px; color: var(--amber); font-size: 13px; font-weight: 600; }
.alert.overdue .alert-top { color: var(--rose); }
.alert-top .bell { width: 28px; height: 28px; border-radius: 50%; background: var(--amber-soft); display: grid; place-items: center; animation: ring 1s ease-in-out 2; }
.alert.overdue .alert-top .bell { background: var(--rose-soft); }
.alert-top .bell svg { width: 15px; height: 15px; }
.alert-top .icon-btn { margin-left: auto; width: 28px; height: 28px; }
@keyframes ring { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(14deg); } 40% { transform: rotate(-12deg); } 60% { transform: rotate(8deg); } 80% { transform: rotate(-4deg); } }
.alert h3 { font-family: var(--f-body); font-size: 16px; font-weight: 600; letter-spacing: 0; margin: 10px 0 2px; overflow-wrap: anywhere; }
.alert p { color: var(--muted); font-size: 13.5px; overflow-wrap: anywhere; }
.alert .from { margin-top: 6px; font-size: 13px; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.alert-actions { display: flex; gap: 8px; margin-top: 14px; }
.alert-actions .btn { flex: 1; }

/* ---------------------------------------------------------- toast + confirm */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast {
  background: var(--ink); color: var(--panel); padding: 10px 16px; border-radius: 10px; font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow-2); animation: alert-in .25s ease-out; max-width: min(520px, calc(100vw - 32px));
}
.toast.err { background: var(--rose); color: #fff; }

dialog.confirm { border: 0; border-radius: var(--r-l); padding: 24px; width: min(400px, calc(100% - 32px)); background: var(--panel); color: var(--ink); box-shadow: var(--shadow-2); }
dialog.confirm::backdrop { background: rgba(16, 18, 42, .45); }
dialog.confirm h3 { font-size: 18px; font-weight: 600; }
dialog.confirm p { color: var(--muted); margin: 8px 0 20px; }

@media (max-width: 600px) {
  .track-tick.minor { display: none; }
  .alerts { right: 16px; left: 16px; width: auto; bottom: 16px; }
  .rem { grid-template-columns: 28px minmax(0, 1fr); }
  .rem-actions { grid-column: 2; justify-content: flex-start; margin-left: -8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
