/* ==========================================================================
   Envazi — app styles
   Calm, light surfaces; the brand orange marks the one thing to do next.
   Dark mode follows the device, or data-theme on <html>.
   ========================================================================== */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --bg: #F6F7F9;
  --surface: #FFFFFF;
  --surface-2: #F2F4F7;
  --surface-3: #EAECF0;
  --line: #E6E8EC;
  --line-2: #D0D5DD;
  --ink: #101828;
  --ink-2: #475467;
  --ink-3: #8A93A3;
  --ink-inv: #FFFFFF;

  --brand: #EE4521;
  --brand-2: #F5871F;
  --brand-strong: #D4381A;
  --brand-soft: #FEF1EC;
  --brand-soft-2: #FDE1D6;
  --brand-ink: #B7310F;
  --ring: rgba(238, 69, 33, .28);

  --ok: #12B76A;       --ok-soft: #E8F8EF;     --ok-ink: #067647;
  --warn: #F79009;     --warn-soft: #FFF6E5;   --warn-ink: #B54708;
  --danger: #F04438;   --danger-soft: #FEF1F0; --danger-ink: #B42318;
  --info: #2E90FA;     --info-soft: #EBF4FF;   --info-ink: #175CD3;

  --r-xs: 6px; --r-sm: 8px; --r: 12px; --r-lg: 16px; --r-xl: 22px; --r-full: 999px;
  --sh-1: 0 1px 2px rgba(16, 24, 40, .05);
  --sh-2: 0 1px 3px rgba(16, 24, 40, .07), 0 1px 2px rgba(16, 24, 40, .04);
  --sh-3: 0 16px 40px -12px rgba(16, 24, 40, .22), 0 4px 10px -4px rgba(16, 24, 40, .06);
  --ease: cubic-bezier(.2, .8, .2, 1);

  --sidebar: 244px;
  --tabbar: 64px;
  --topbar: 56px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0E1014; --surface: #16191F; --surface-2: #1C2028; --surface-3: #242935;
    --line: #262B35; --line-2: #343B48;
    --ink: #EDEFF3; --ink-2: #B4BAC6; --ink-3: #7C8493;
    --brand: #FF5A2E; --brand-strong: #FF7447; --brand-soft: #2A1812; --brand-soft-2: #3A1F15; --brand-ink: #FF9A77;
    --ring: rgba(255, 90, 46, .35);
    --ok-soft: #0F2A1E; --ok-ink: #5DDB9C; --warn-soft: #2D2210; --warn-ink: #FDB022;
    --danger-soft: #2E1515; --danger-ink: #FF8A80; --info-soft: #11223A; --info-ink: #84ADFF;
    --sh-1: 0 1px 2px rgba(0,0,0,.4); --sh-2: 0 1px 3px rgba(0,0,0,.5);
    --sh-3: 0 20px 44px -12px rgba(0,0,0,.7);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0E1014; --surface: #16191F; --surface-2: #1C2028; --surface-3: #242935;
  --line: #262B35; --line-2: #343B48;
  --ink: #EDEFF3; --ink-2: #B4BAC6; --ink-3: #7C8493;
  --brand: #FF5A2E; --brand-strong: #FF7447; --brand-soft: #2A1812; --brand-soft-2: #3A1F15; --brand-ink: #FF9A77;
  --ring: rgba(255, 90, 46, .35);
  --ok-soft: #0F2A1E; --ok-ink: #5DDB9C; --warn-soft: #2D2210; --warn-ink: #FDB022;
  --danger-soft: #2E1515; --danger-ink: #FF8A80; --info-soft: #11223A; --info-ink: #84ADFF;
  --sh-1: 0 1px 2px rgba(0,0,0,.4); --sh-2: 0 1px 3px rgba(0,0,0,.5);
  --sh-3: 0 20px 44px -12px rgba(0,0,0,.7);
}

/* ---------------------------------------------------------------- base -- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 15px/1.5 var(--font); letter-spacing: -.006em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01";
}
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .16s; }

h1, h2, h3, h4 { margin: 0; color: var(--ink); letter-spacing: -.022em; font-weight: 700; }
h1 { font-size: 26px; line-height: 1.2; }
h2 { font-size: 17px; line-height: 1.3; letter-spacing: -.015em; }
h3 { font-size: 15px; line-height: 1.35; letter-spacing: -.01em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
a.link, .link { color: var(--brand-ink); font-weight: 600; }
a.link:hover, button.link:hover { text-decoration: underline; text-underline-offset: 3px; }
button.link { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; font-weight: 600; color: var(--brand-ink); }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--brand-soft-2); }

.i { width: 18px; height: 18px; flex: none; display: inline-block; vertical-align: middle; }
.i-sm { width: 15px; height: 15px; }
.i-lg { width: 22px; height: 22px; }
.muted { color: var(--ink-3); }
.soft { color: var(--ink-2); }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.stack > * + * { margin-top: 12px; }
.row-flex { display: flex; align-items: center; gap: 10px; }
.spacer { flex: 1; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; display: inline-block; }

/* --------------------------------------------------------------- shell -- */
.shell { min-height: 100vh; min-height: 100dvh; }
.main { min-width: 0; padding-bottom: calc(var(--tabbar) + var(--safe-b) + 24px); }

.sidebar { display: none; }
.topbar {
  position: sticky; top: 0; z-index: 40;
  height: calc(var(--topbar) + var(--safe-t)); padding: var(--safe-t) 12px 0 16px;
  display: flex; align-items: center; gap: 8px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar .brand-mark { height: 26px; width: auto; }
.topbar-title { font-weight: 700; font-size: 16px; letter-spacing: -.015em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  height: calc(var(--tabbar) + var(--safe-b)); padding-bottom: var(--safe-b);
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px);
  border-top: 1px solid var(--line);
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 11px; font-weight: 600; color: var(--ink-3); letter-spacing: -.01em; background: none; border: 0; cursor: pointer;
  min-width: 0; white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.tab .i { width: 22px; height: 22px; }
.tab[aria-current="page"] { color: var(--brand); }
.tab:active { transform: scale(.96); }

@media (min-width: 960px) {
  .shell {
    display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr);
    background: linear-gradient(to right, var(--surface) calc(var(--sidebar) - 1px), var(--line) calc(var(--sidebar) - 1px), var(--line) var(--sidebar), var(--bg) var(--sidebar));
  }
  .main { padding-bottom: 48px; }
  .topbar, .tabbar { display: none; }
  .sidebar {
    display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
    padding: 20px 14px 14px;
  }
}
.sidebar .brand { display: flex; align-items: center; padding: 4px 10px 22px; }
.sidebar .brand img { height: 30px; width: auto; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: 11px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; padding: 18px 12px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 8px 12px; border-radius: 9px;
  color: var(--ink-2); font-weight: 550; font-size: 14.5px; position: relative;
  transition: background .15s, color .15s;
}
.nav-item .i { color: var(--ink-3); transition: color .15s; }
.nav-item:hover { background: var(--surface-2); color: var(--ink); }
.nav-item[aria-current="page"] { background: var(--brand-soft); color: var(--brand-ink); }
.nav-item[aria-current="page"] .i { color: var(--brand); }
.nav-count {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center;
}
.sidebar-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.me { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; }
.me:hover { background: var(--surface-2); }
.me-name { font-weight: 600; font-size: 14px; line-height: 1.2; }
.me-sub { font-size: 12px; color: var(--ink-3); }

.page { max-width: 1040px; margin: 0 auto; padding: 16px 16px 32px; }
.page-narrow { max-width: 720px; }
@media (min-width: 960px) { .page { padding: 36px 40px 48px; } }

.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head .grow { flex: 1; min-width: 220px; }
.eyebrow { font-size: 12.5px; font-weight: 600; color: var(--ink-3); letter-spacing: .01em; margin-bottom: 4px; }
.page-sub { color: var(--ink-2); margin-top: 6px; max-width: 60ch; }
@media (max-width: 959px) { .page-head h1 { font-size: 24px; } }

.back { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); font-weight: 600; font-size: 14px; margin-bottom: 14px; }
.back:hover { color: var(--ink); }

/* ------------------------------------------------------------- buttons -- */
.btn {
  --b-bg: var(--surface); --b-fg: var(--ink); --b-bd: var(--line-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--b-bd);
  background: var(--b-bg); color: var(--b-fg); font-weight: 600; font-size: 14.5px; letter-spacing: -.005em;
  cursor: pointer; white-space: nowrap; text-decoration: none; user-select: none;
  box-shadow: var(--sh-1); transition: background .15s, border-color .15s, box-shadow .15s, transform .08s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-busy { opacity: .6; pointer-events: none; }
.btn-primary { --b-bg: var(--brand); --b-fg: #fff; --b-bd: var(--brand); box-shadow: 0 1px 2px rgba(238,69,33,.25), inset 0 1px 0 rgba(255,255,255,.12); }
.btn-primary:hover { background: var(--brand-strong); border-color: var(--brand-strong); }
.btn-dark { --b-bg: var(--ink); --b-fg: var(--bg); --b-bd: var(--ink); }
.btn-dark:hover { background: var(--ink-2); }
.btn-soft { --b-bg: var(--brand-soft); --b-fg: var(--brand-ink); --b-bd: transparent; box-shadow: none; }
.btn-soft:hover { background: var(--brand-soft-2); }
.btn-ghost { --b-bg: transparent; --b-bd: transparent; --b-fg: var(--ink-2); box-shadow: none; }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-danger { --b-fg: var(--danger-ink); }
.btn-danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn-sm { height: 32px; padding: 0 11px; font-size: 13.5px; border-radius: 8px; gap: 6px; }
.btn-sm .i { width: 16px; height: 16px; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 16px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-icon { width: 40px; padding: 0; }
.btn-icon.btn-sm { width: 32px; }
.icon-btn {
  width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 10px;
  border: 0; background: transparent; color: var(--ink-2); cursor: pointer; position: relative;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn .badge-dot {
  position: absolute; top: 5px; right: 5px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  background: var(--brand); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center;
  border: 2px solid var(--bg);
}
.spinner {
  width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent;
  animation: spin .7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --------------------------------------------------------------- forms -- */
.field { display: block; }
.field + .field, .field + .field-row, .field-row + .field { margin-top: 16px; }
.field > label, .label { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink); margin-bottom: 7px; }
.label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.label-row .label { margin-bottom: 7px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row > .field + .field { margin-top: 0; }
.input, select.input, textarea.input {
  width: 100%; height: 44px; padding: 0 13px; border-radius: 10px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  font: 400 15px/1.3 var(--font); outline: none; box-shadow: var(--sh-1);
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none; appearance: none;
}
textarea.input { height: auto; min-height: 88px; padding: 11px 13px; line-height: 1.5; resize: vertical; }
select.input {
  padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238A93A3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.input::placeholder { color: var(--ink-3); }
.input:hover { border-color: var(--ink-3); }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--ring); }
.input-lg { height: 52px; font-size: 17px; border-radius: 12px; }
.input-sm, select.input-sm { height: 36px; font-size: 14px; padding: 0 30px 0 11px; border-radius: 9px; }
.tabs-line { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: -4px 0 20px; overflow-x: auto; scrollbar-width: none; }
.tabs-line::-webkit-scrollbar { display: none; }
.tabs-line a { padding: 10px 12px; font-size: 14px; font-weight: 600; color: var(--ink-3); white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs-line a:hover { color: var(--ink); }
.tabs-line a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--brand); }
input[type="date"].input, input[type="time"].input { min-width: 0; }
.hint { font-size: 13px; color: var(--ink-3); margin-top: 6px; }
.form-error {
  display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 10px;
  background: var(--danger-soft); color: var(--danger-ink); font-size: 14px; font-weight: 500; margin-bottom: 14px;
}
.form-ok { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: var(--ok-soft); color: var(--ok-ink); font-size: 14px; font-weight: 500; margin-bottom: 14px; }
.check-line { display: flex; align-items: center; gap: 10px; font-size: 14.5px; color: var(--ink-2); cursor: pointer; }
.check-line input { width: 18px; height: 18px; accent-color: var(--brand); }

.pw { position: relative; }
.pw .input { padding-right: 46px; }
.pw button { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }

/* chips & segmented */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px; border-radius: var(--r-full);
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font-weight: 550; font-size: 13.5px;
  cursor: pointer; transition: all .15s; user-select: none; -webkit-tap-highlight-color: transparent;
}
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip[aria-pressed="true"], .chip.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip-brand[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip-sm { height: 28px; padding: 0 10px; font-size: 12.5px; }

.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-3); border-radius: 11px; }
.seg button, .seg a {
  height: 34px; padding: 0 14px; border-radius: 8px; border: 0; background: transparent;
  color: var(--ink-2); font-weight: 600; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.seg [aria-pressed="true"], .seg [aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: var(--sh-2); }
.seg-block { display: flex; }
.seg-block > * { flex: 1; justify-content: center; }

.switch { position: relative; display: inline-flex; width: 44px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; border-radius: 13px; background: var(--line-2); transition: background .2s; cursor: pointer; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s var(--ease); }
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }

/* -------------------------------------------------------------- cards -- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px 0; }
.card-head h2 { flex: 1; }
.card-sub { font-size: 13px; color: var(--ink-3); }
.card-body { padding: 16px 18px 18px; }
.card-foot { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; }
.card-link { display: block; transition: border-color .15s, box-shadow .15s, transform .15s; }
.card-link:hover { border-color: var(--line-2); box-shadow: var(--sh-2); }
.card-pad { padding: 18px; }
.card-flat { box-shadow: none; }

.section { margin-top: 28px; }
.section-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.section-head h2 { flex: 1; }

.grid-2 { display: grid; gap: 16px; }
@media (min-width: 760px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.grid-2 > .card + .card { margin-top: 0; }
.grid-2 > * { min-width: 0; }
.layout-side { display: grid; gap: 20px; }
@media (min-width: 1100px) { .layout-side { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; } .layout-side > aside { position: sticky; top: 24px; } }

/* pills */
.pill {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: var(--r-full);
  font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--ink-2); white-space: nowrap;
}
.pill .i { width: 13px; height: 13px; }
.pill-ok { background: var(--ok-soft); color: var(--ok-ink); }
.pill-warn { background: var(--warn-soft); color: var(--warn-ink); }
.pill-danger { background: var(--danger-soft); color: var(--danger-ink); }
.pill-brand { background: var(--brand-soft); color: var(--brand-ink); }
.pill-info { background: var(--info-soft); color: var(--info-ink); }
.pill-line { background: transparent; border: 1px solid var(--line-2); }

/* avatar */
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none; display: inline-grid; place-items: center;
  background: #E4E7EC; color: #475467; font-weight: 700; font-size: 13px; letter-spacing: .02em;
}
.avatar-lg { width: 52px; height: 52px; font-size: 18px; }
.avatar-sm { width: 36px; height: 36px; font-size: 13px; }
:root[data-theme="dark"] .avatar { background: #2B313C; color: #B4BAC6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .avatar { background: #2B313C; color: #B4BAC6; } }

/* progress bar */
.bar { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 3px; background: var(--brand); transition: width .5s var(--ease); }
.bar-ok > i { background: var(--ok); }

/* empty states */
.empty { text-align: center; padding: 40px 20px; }
.empty-icon {
  width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 16px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand);
}
.empty-icon .i { width: 26px; height: 26px; }
.empty h2 { font-size: 18px; margin-bottom: 6px; }
.empty p { color: var(--ink-2); max-width: 42ch; margin: 0 auto 18px; }

/* lists */
.list { list-style: none; margin: 0; padding: 0; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line); }
.list-row:first-child { border-top: 0; }
button.list-row { width: 100%; background: none; border: 0; border-top: 1px solid var(--line); text-align: left; font: inherit; color: inherit; cursor: pointer; }
button.list-row:hover:not(:disabled) { background: var(--surface-2); }
button.list-row:disabled { cursor: default; }
.move-list { margin: 0 -18px; }
.move-list + button.list-row { margin: 6px -18px 0; width: calc(100% + 36px); }
.list > li > .list-row, .list > li > .msg { border-top: 0; }
.list > li + li > .list-row, .list > li + li > .msg { border-top: 1px solid var(--line); }
.list-row.link:hover, a.list-row:hover { background: var(--surface-2); }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row .meta { font-size: 13px; color: var(--ink-3); margin-top: 1px; }

/* tabs (underline) */
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .tabs button {
  padding: 10px 0 11px; border: 0; background: none; color: var(--ink-3); font-weight: 600; font-size: 14.5px;
  border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap;
}
.tabs [aria-current="page"], .tabs [aria-selected="true"] { color: var(--ink); border-bottom-color: var(--brand); }

/* stats */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; box-shadow: var(--sh-1); }
.stat-label { font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.stat-value { font-size: 26px; font-weight: 700; letter-spacing: -.03em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat-value small { font-size: 14px; font-weight: 600; color: var(--ink-3); letter-spacing: 0; margin-left: 2px; }
.stat-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }

/* ------------------------------------------------------ dialog / sheet -- */
dialog.sheet {
  border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 100%; max-height: calc(100dvh - 40px);
  border-radius: 20px 20px 0 0; background: var(--surface); color: var(--ink); box-shadow: var(--sh-3);
  overflow: hidden; display: flex; flex-direction: column;
}
dialog.sheet:not([open]) { display: none; }
dialog.sheet::backdrop { background: rgba(16, 24, 40, .38); backdrop-filter: blur(3px); }
dialog.sheet[open] { animation: sheet-up .28s var(--ease); }
dialog.sheet[open]::backdrop { animation: fade .2s ease; }
@keyframes sheet-up { from { transform: translateY(40px); opacity: .4; } }
@keyframes fade { from { opacity: 0; } }
@media (min-width: 640px) {
  dialog.sheet { margin: auto; width: 520px; border-radius: 18px; max-height: calc(100dvh - 80px); }
  dialog.sheet.wide { width: 640px; }
  dialog.sheet[open] { animation: pop .22s var(--ease); }
  @keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }
}
.sheet-grip { width: 36px; height: 5px; border-radius: 3px; background: var(--line-2); margin: 8px auto 0; }
@media (min-width: 640px) { .sheet-grip { display: none; } }
.sheet-head { display: flex; align-items: flex-start; gap: 10px; padding: 16px 20px 6px; }
.sheet-head h2 { flex: 1; font-size: 18px; }
.sheet-head .sheet-sub { font-size: 13.5px; color: var(--ink-3); margin-top: 3px; font-weight: 500; }
.sheet-body { padding: 10px 20px 20px; overflow-y: auto; }
.sheet-foot { padding: 12px 20px calc(14px + var(--safe-b)); border-top: 1px solid var(--line); display: flex; gap: 10px; }
.sheet-foot .btn { flex: 1; }
@media (min-width: 640px) { .sheet-foot { justify-content: flex-end; } .sheet-foot .btn { flex: none; } }

/* toasts */
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar) + var(--safe-b) + 14px); z-index: 90; display: flex; flex-direction: column; gap: 8px; width: min(420px, calc(100vw - 24px)); pointer-events: none; }
@media (min-width: 960px) { .toasts { bottom: 24px; left: calc(50% + var(--sidebar) / 2); } }
.toast {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; pointer-events: auto;
  background: var(--ink); color: var(--bg); box-shadow: var(--sh-3); font-weight: 500; font-size: 14.5px;
  animation: toast-in .3s var(--ease);
}
.toast.out { animation: toast-out .25s ease forwards; }
.toast-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: rgba(255,255,255,.12); flex: none; }
.toast-title { font-weight: 700; }
.toast-body { font-size: 13px; opacity: .8; }
.toast .btn { margin-left: auto; height: 30px; padding: 0 10px; font-size: 13px; --b-bg: transparent; --b-fg: var(--bg); --b-bd: rgba(255,255,255,.25); box-shadow: none; }
@keyframes toast-in { from { transform: translateY(12px); opacity: 0; } }
@keyframes toast-out { to { transform: translateY(8px); opacity: 0; } }

/* ------------------------------------------------------------- checks -- */
.tick {
  width: 22px; height: 22px; border-radius: 50%; border: 1.75px solid var(--line-2); background: var(--surface);
  display: inline-grid; place-items: center; cursor: pointer; flex: none; padding: 0; color: transparent;
  transition: all .18s var(--ease);
}
.tick .i { width: 13px; height: 13px; stroke-width: 3; }
.tick:hover { border-color: var(--ok); }
.tick[aria-pressed="true"] { background: var(--ok); border-color: var(--ok); color: #fff; }
.tick[aria-pressed="true"] { animation: tick-pop .3s var(--ease); }
@keyframes tick-pop { 40% { transform: scale(1.18); } }

/* task rows */
.tasks { list-style: none; margin: 0; padding: 0; }
.task { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-top: 1px solid var(--line); }
.task:first-child { border-top: 0; }
.task-name { flex: 1; min-width: 0; font-weight: 500; }
.task-name input { width: 100%; border: 0; background: transparent; font: inherit; color: inherit; padding: 4px 6px; margin: -4px -6px; border-radius: 6px; outline: none; }
.task-name input:focus { background: var(--surface-2); }
.task.done .task-name { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--line-2); }
.task-est { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.task-actions { display: flex; gap: 2px; opacity: 0; transition: opacity .15s; }
.task:hover .task-actions, .task:focus-within .task-actions { opacity: 1; }
@media (hover: none) { .task-actions { opacity: 1; } }
.show-touch { display: none !important; }
@media (hover: none), (max-width: 640px) {
  .hide-touch { display: none !important; }
  .show-touch { display: inline-flex !important; }
  button.list-row.show-touch { display: flex !important; }
  .add-row select.est { width: 92px; }
}
.grip { cursor: grab; color: var(--ink-3); touch-action: none; display: grid; place-items: center; width: 22px; align-self: stretch; }
@media (max-width: 600px) {
  .task { gap: 8px; }
  .grip { width: 16px; }
  .task-actions .icon-btn { width: 28px !important; }
  .project { gap: 10px; padding: 12px 12px 12px 8px; }
}
.grip:active { cursor: grabbing; }
.dragging { opacity: .96; box-shadow: var(--sh-3); background: var(--surface); border-radius: 10px; position: relative; z-index: 5; }
.drop-ph { border: 2px dashed var(--line-2); border-radius: 10px; background: var(--surface-2); }

.add-row { display: flex; gap: 8px; align-items: center; padding: 8px 0 2px; }

/* subprojects: the parts of a project */
.subs { display: flex; flex-direction: column; gap: 10px; }
.sub { overflow: hidden; }
.sub-head { display: flex; align-items: center; gap: 4px; padding: 8px 10px 8px 6px; }
.sub-head > .grip { width: 22px; align-self: stretch; }
.sub-toggle { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 6px 4px; background: none; border: 0; cursor: pointer; text-align: left; color: inherit; font: inherit; border-radius: 10px; }
.sub-toggle:hover .sub-name { color: var(--brand-ink); }
.sub-check { width: 28px; height: 28px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.sub.is-done .sub-check { background: var(--ok); border-color: var(--ok); color: #fff; }
.sub-num { font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.move-list .sub-num { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--surface-2); flex: none; }
.sub-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sub-name { font-weight: 650; font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color .15s; }
.sub.is-done .sub-name { color: var(--ink-2); }
.sub-meta { font-size: 13px; color: var(--ink-3); margin-top: 1px; }
.sub-chev { transition: transform .2s var(--ease); flex: none; }
.sub.open .sub-chev { transform: rotate(180deg); }
.sub-bar { height: 4px; background: var(--surface-3); margin: 0 18px 14px 74px; border-radius: 2px; overflow: hidden; }
.sub-bar > i { display: block; height: 100%; border-radius: 2px; }
.sub-body { display: none; padding: 6px 18px 14px 52px; }
.sub.open .sub-body { display: block; }
.sub.open .sub-bar { margin-bottom: 8px; }
.sub-cta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; color: var(--ink-3); font-size: 13.5px; }
.task-sub { display: block; font-size: 12px; color: var(--ink-3); font-weight: 500; line-height: 1.2; }
@media (max-width: 640px) {
  .task [data-est] { padding: 0 16px 0 4px !important; background-position: right 0 center !important; max-width: 66px; }
  .sub-body { padding: 2px 10px 12px 10px; }
  .sub-bar { margin-left: 18px; }
  .sub-head { padding-right: 6px; }
}
.add-row .input { height: 42px; }
.add-row .est { width: 132px; flex: none; }

/* ============================================================== TODAY === */
.day-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.day-head .grow { flex: 1; min-width: 200px; }
.day-nav { display: flex; gap: 4px; align-items: center; }
.greet { font-size: 28px; font-weight: 750; letter-spacing: -.03em; line-height: 1.15; }
@media (max-width: 959px) { .greet { font-size: 24px; } }

.summary {
  display: flex; align-items: center; gap: 18px; padding: 16px 18px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); margin-bottom: 22px;
}
.summary .ring { flex: none; }
.summary-main { flex: 1; min-width: 0; }
.summary-title { font-weight: 700; font-size: 16px; letter-spacing: -.015em; }
.summary-sub { font-size: 13.5px; color: var(--ink-2); margin-top: 2px; }
.summary-side { display: flex; gap: 18px; }
.mini-stat { text-align: right; }
.mini-stat b { display: block; font-size: 18px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.mini-stat span { font-size: 12px; color: var(--ink-3); font-weight: 600; }
@media (max-width: 560px) { .summary-side { display: none; } }

.ring { --size: 56px; --w: 6; width: var(--size); height: var(--size); position: relative; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: var(--w); }
.ring .track { stroke: var(--surface-3); }
.ring .val { stroke: var(--brand); stroke-linecap: round; transition: stroke-dashoffset .8s var(--ease); }
.ring.ok .val { stroke: var(--ok); }
.ring-label { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.tl { display: grid; grid-template-columns: 62px 14px minmax(0, 1fr); gap: 0 12px; position: relative; }
.tl-time { font-size: 12.5px; font-weight: 600; color: var(--ink-3); text-align: right; padding-top: 15px; font-variant-numeric: tabular-nums; line-height: 1.25; }
.tl-time small { display: block; font-weight: 500; color: var(--ink-3); opacity: .8; }
.tl-rail { position: relative; display: flex; justify-content: center; }
.tl-rail::before { content: ""; position: absolute; top: 0; bottom: 0; width: 2px; background: var(--line); }
.tl:first-child .tl-rail::before { top: 20px; }
.tl:last-child .tl-rail::before { bottom: calc(100% - 20px); }
.tl-dot { position: relative; margin-top: 17px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-2); z-index: 1; }
.tl-body { padding: 6px 0; min-width: 0; }

.block {
  --c: var(--brand);
  display: block; width: 100%; text-align: left; padding: 13px 14px 13px 16px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); position: relative; overflow: hidden;
  cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .12s;
}
.block::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.block:hover { border-color: var(--line-2); box-shadow: var(--sh-2); }
.block-top { display: flex; align-items: center; gap: 8px; }
.block-title { font-weight: 650; font-size: 15.5px; letter-spacing: -.012em; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.block-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; font-size: 13px; color: var(--ink-3); }
.block-next { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 14px; color: var(--ink-2); }
.block-next .i { color: var(--ink-3); }
.block-cta { margin-top: 12px; display: flex; gap: 8px; }

.tl.is-now .tl-dot { border-color: var(--brand); background: var(--brand); box-shadow: 0 0 0 5px var(--ring); }
.tl.is-now .block { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); box-shadow: 0 0 0 3px var(--ring), var(--sh-2); }
.tl.is-now .tl-time { color: var(--brand-ink); }
.tl.is-past .tl-dot { border-color: var(--line-2); background: var(--surface-3); }
.tl.st-done .tl-dot { background: var(--ok); border-color: var(--ok); }
.tl.st-partial .tl-dot { background: var(--warn); border-color: var(--warn); }
.tl.st-missed .tl-dot { background: var(--danger); border-color: var(--danger); }
.tl.st-done .block, .tl.st-partial .block, .tl.st-missed .block { background: color-mix(in srgb, var(--surface) 70%, var(--bg)); }
.tl.st-done .block-title { color: var(--ink-2); }

.block-appt { --c: #98A2B3; background: var(--surface-2); box-shadow: none; }
.block-appt .block-title { font-weight: 600; }

@media (max-width: 600px) {
  .tl { grid-template-columns: 44px 12px minmax(0, 1fr); gap: 0 8px; }
  .now-line { grid-template-columns: 44px 12px 1fr; gap: 0 8px; }
  .tl-time { font-size: 11.5px; }
  .tl-time small { display: none; }
  .block { padding: 12px 12px 12px 14px; }
  .block-title { font-size: 15px; }
}
.block-free {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px; font-size: 13.5px;
  color: var(--ink-3); border: 1.5px dashed var(--line); background: transparent; box-shadow: none; cursor: default;
}
.block-free::before { display: none; }

.status { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 650; }
.status .i { width: 15px; height: 15px; }
.status-done { color: var(--ok-ink); }
.status-partial { color: var(--warn-ink); }
.status-missed { color: var(--danger-ink); }
.status-due { color: var(--brand-ink); }

.now-line { display: grid; grid-template-columns: 62px 14px 1fr; gap: 0 12px; align-items: center; margin: 2px 0; }
.now-line span:first-child { text-align: right; font-size: 11.5px; font-weight: 700; color: var(--brand); letter-spacing: .02em; }
.now-line span:nth-child(2) { display: flex; justify-content: center; }
.now-line span:nth-child(2)::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.now-line span:last-child { height: 2px; background: linear-gradient(90deg, var(--brand), transparent); border-radius: 1px; }

.side-card + .side-card { margin-top: 14px; }
.next-list { list-style: none; padding: 0; margin: 0; }
.next-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.next-list li:first-child { border-top: 0; }

/* ============================================================ PROJECTS === */
.projects { display: flex; flex-direction: column; gap: 10px; }
.project {
  --c: var(--brand);
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1);
  transition: border-color .15s, box-shadow .15s;
}
.project:hover { border-color: var(--line-2); box-shadow: var(--sh-2); }
.project-swatch { width: 12px; height: 40px; border-radius: 6px; background: var(--c); }
.project-main { min-width: 0; }
.project-name { font-weight: 650; font-size: 15.5px; letter-spacing: -.012em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 3px; font-size: 13px; color: var(--ink-3); }
.project-bar { margin-top: 9px; display: flex; align-items: center; gap: 10px; }
.project-bar .bar { flex: 1; max-width: 260px; }
.project-bar .bar > i { background: var(--c); }
.project-bar span { font-size: 12.5px; font-weight: 650; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.project-side { display: flex; align-items: center; gap: 6px; }

.focus-line {
  display: flex; align-items: center; gap: 12px; margin: 6px 0; color: var(--ink-3); font-size: 12.5px; font-weight: 650;
}
.focus-line::before, .focus-line::after { content: ""; height: 1px; flex: 1; background: var(--line-2); }
.rotation-box { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); margin-bottom: 18px; flex-wrap: wrap; }
.rotation-box .grow { flex: 1; min-width: 200px; }
.stepper { display: inline-flex; align-items: center; gap: 2px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; padding: 2px; }
.stepper button { width: 32px; height: 32px; border-radius: 8px; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; color: var(--ink-2); }
.stepper button:hover { background: var(--surface-2); }
.stepper output { min-width: 26px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }

.proj-hero { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.proj-hero .grow { flex: 1; min-width: 240px; }
.proj-title { font-size: 28px; font-weight: 750; letter-spacing: -.03em; line-height: 1.15; }
.proj-title[contenteditable="true"]:focus { outline: none; box-shadow: 0 2px 0 var(--brand); }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 18px; }
@media (min-width: 760px) { .facts { grid-template-columns: repeat(4, 1fr); } }
.fact { padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.fact-label { font-size: 12px; font-weight: 600; color: var(--ink-3); }
.fact-value { font-size: 17px; font-weight: 700; letter-spacing: -.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.fact-sub { font-size: 12px; color: var(--ink-3); }

.colors { display: flex; gap: 8px; flex-wrap: wrap; }
.color { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line-2); cursor: pointer; background: var(--c); }
.color[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ink); }

/* notes */
.note { padding: 14px 0; border-top: 1px solid var(--line); }
.note:first-child { border-top: 0; }
.note-text { white-space: pre-wrap; word-break: break-word; }
.note-meta { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 12.5px; color: var(--ink-3); }
.note.pinned .note-text { font-weight: 500; }

/* activity */
.activity { list-style: none; margin: 0; padding: 0; }
.activity li { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.activity li:first-child { border-top: 0; }
.act-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.act-icon.ok { background: var(--ok-soft); color: var(--ok-ink); }
.act-icon.bad { background: var(--danger-soft); color: var(--danger-ink); }

/* ======================================================== TIME BLOCKS === */
.week { display: grid; grid-template-columns: 46px repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; box-shadow: var(--sh-1); }
.week-head { position: sticky; top: 0; z-index: 2; background: var(--surface); border-bottom: 1px solid var(--line); padding: 10px 4px; text-align: center; font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.week-head.today { color: var(--brand-ink); }
.week-hours { position: relative; }
.week-hour { height: 44px; font-size: 11px; color: var(--ink-3); text-align: right; padding: 0 6px 0 0; transform: translateY(-7px); font-variant-numeric: tabular-nums; }
.week-col { position: relative; border-left: 1px solid var(--line); background-image: linear-gradient(var(--line) 1px, transparent 1px); background-size: 100% 44px; cursor: copy; }
.week-col:hover { background-color: color-mix(in srgb, var(--surface-2) 50%, transparent); }
.wb {
  --c: var(--brand);
  position: absolute; left: 3px; right: 3px; border-radius: 8px; padding: 5px 7px; overflow: hidden;
  background: color-mix(in srgb, var(--c) 16%, var(--surface)); border-left: 3px solid var(--c);
  color: var(--ink); font-size: 11.5px; line-height: 1.25; cursor: pointer; transition: box-shadow .15s;
}
.wb:hover { box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 45%, transparent); z-index: 1; }
.wb b { display: block; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb span { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.wb-any { --c: #98A2B3; }
.day-list .day { padding: 14px 18px; border-top: 1px solid var(--line); }
.day-list .day:first-child { border-top: 0; }
.day-name { font-weight: 700; display: flex; align-items: center; gap: 8px; }
.day-blocks { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.day-block { --c: var(--brand); display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--c) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 25%, var(--line)); cursor: pointer; text-align: left; width: 100%; }
.day-block .dot { background: var(--c); }
.day-block b { font-weight: 650; }
.day-block b { white-space: nowrap; }
.day-block span:last-child { color: var(--ink-2); font-size: 13.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============================================================= AUTH ==== */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; }
@media (min-width: 1000px) { .auth { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); } }
.auth-art {
  display: none; position: relative; overflow: hidden; color: var(--ink); padding: 44px 52px;
  background:
    radial-gradient(900px 520px at 100% 0%, rgba(245,135,31,.20), transparent 60%),
    radial-gradient(760px 560px at 0% 100%, rgba(238,69,33,.14), transparent 62%),
    linear-gradient(180deg, #FFF8F4 0%, #FDF3EE 100%);
  border-right: 1px solid var(--line);
}
:root[data-theme="dark"] .auth-art { background: radial-gradient(900px 520px at 100% 0%, rgba(245,135,31,.16), transparent 60%), radial-gradient(760px 560px at 0% 100%, rgba(238,69,33,.18), transparent 62%), #15110F; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .auth-art { background: radial-gradient(900px 520px at 100% 0%, rgba(245,135,31,.16), transparent 60%), radial-gradient(760px 560px at 0% 100%, rgba(238,69,33,.18), transparent 62%), #15110F; } }
@media (min-width: 1000px) { .auth-art { display: flex; flex-direction: column; align-items: flex-start; } }
.auth-art .logo-inv { height: 32px; width: auto; }
.auth-art h2 { font-size: 40px; line-height: 1.1; letter-spacing: -.038em; max-width: 14ch; margin-top: auto; font-weight: 760; }
.auth-art p { color: var(--ink-2); font-size: 16.5px; max-width: 40ch; margin-top: 14px; }
.auth-preview { margin-top: 34px; display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 400px; }
.auth-preview .pv {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-2);
  font-size: 14px; color: var(--ink-2);
}
.auth-preview .pv:nth-child(3) { transform: translateX(18px); box-shadow: 0 0 0 3px var(--ring), var(--sh-3); border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.auth-preview .pv b { font-weight: 650; color: var(--ink); }
.auth-preview .pv time { font-size: 12.5px; color: var(--ink-3); width: 58px; font-weight: 600; font-variant-numeric: tabular-nums; }
.auth-preview .pv i { width: 4px; align-self: stretch; border-radius: 2px; background: var(--c, #F5871F); }
.auth-preview .pv .ok { margin-left: auto; width: 22px; height: 22px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; }
.auth-preview .pv .now { margin-left: auto; font-size: 11.5px; font-weight: 700; color: var(--brand-ink); background: var(--brand-soft); padding: 3px 8px; border-radius: 999px; }
.auth-foot-art { margin-top: 36px; font-size: 13px; color: var(--ink-3); }

.auth-main { display: flex; flex-direction: column; padding: 28px 20px calc(24px + var(--safe-b)); background: var(--surface); }
@media (min-width: 1000px) { .auth-main { padding: 44px 56px; } }
.auth-main .auth-logo { height: 28px; width: auto; margin-bottom: 8px; }
@media (min-width: 1000px) { .auth-main .auth-logo { display: none; } }
.auth-form { width: 100%; max-width: 400px; margin: 28px auto 0; padding: 12px 0 24px; }
@media (min-width: 1000px) { .auth-form { margin: auto; padding: 24px 0; } }
.auth-form h1 { font-size: 28px; letter-spacing: -.03em; }
.auth-form .lede { color: var(--ink-2); margin: 8px 0 26px; }
.check-list { list-style: none; padding: 0; margin: -12px 0 18px; display: flex; flex-direction: column; gap: 8px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; }
.check-list .i { color: var(--ok); margin-top: 3px; flex: none; }
.auth-alt { margin-top: 22px; text-align: center; color: var(--ink-2); font-size: 14.5px; }
.auth-top { display: flex; justify-content: space-between; align-items: center; }

.code-input { display: flex; gap: 8px; }
.code-input input {
  width: 100%; height: 56px; text-align: center; font: 700 24px/1 var(--mono); text-transform: uppercase;
  border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); outline: none;
}
.code-input input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--ring); }

/* ========================================================= ONBOARDING === */
.ob { min-height: 100vh; min-height: 100dvh; background: var(--bg); display: flex; flex-direction: column; }
.ob-top { display: flex; align-items: center; gap: 14px; padding: 18px 20px; max-width: 760px; width: 100%; margin: 0 auto; }
.ob-top img { height: 26px; width: auto; }
.ob-steps { display: flex; gap: 6px; flex: 1; justify-content: flex-end; }
.ob-steps i { width: 28px; height: 5px; border-radius: 3px; background: var(--line-2); }
.ob-steps i.on { background: var(--brand); }
.ob-main { flex: 1; width: 100%; max-width: 620px; margin: 0 auto; padding: 16px 20px 40px; }
.ob-main h1 { font-size: 30px; letter-spacing: -.035em; line-height: 1.15; }
@media (max-width: 600px) { .ob-main h1 { font-size: 25px; } }
.ob-main .lede { color: var(--ink-2); font-size: 16px; margin: 10px 0 26px; max-width: 52ch; }
.ob-foot { display: flex; gap: 10px; align-items: center; margin-top: 26px; }
.ob-foot .spacer { flex: 1; }
.ob-coach { margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 14.5px; }
.ob-coach p { margin: 0 0 12px; }
.ob-coach form { max-width: 360px; }
.examples { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ob-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--sh-1); }
.total-line { display: flex; justify-content: space-between; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-weight: 600; }

/* ============================================================ INBOX ===== */
.msg { display: flex; gap: 12px; padding: 16px 18px; border-top: 1px solid var(--line); }
.msg:first-child { border-top: 0; }
.msg.unread { background: color-mix(in srgb, var(--brand-soft) 45%, var(--surface)); }
.msg-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--ink-2); }
.msg-icon.brand { background: var(--brand-soft); color: var(--brand); }
.msg-body { flex: 1; min-width: 0; }
.msg-title { font-weight: 650; }
.msg-text { color: var(--ink-2); margin-top: 2px; white-space: pre-wrap; word-break: break-word; }
.msg-meta { font-size: 12.5px; color: var(--ink-3); margin-top: 6px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ============================================================ PROGRESS == */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { font: 600 11px var(--font); fill: var(--ink-3); }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .planned { fill: color-mix(in srgb, var(--ink-3) 20%, transparent); }
.chart .lost-bg { fill: color-mix(in srgb, var(--ink-2) 12%, var(--surface)); }
.chart .lost-line { stroke: var(--ink-3); stroke-width: 2; }
.sw-planned { background: color-mix(in srgb, var(--ink-3) 20%, transparent); }
.sw-lost { background: repeating-linear-gradient(45deg, var(--ink-3) 0 2px, color-mix(in srgb, var(--ink-2) 12%, var(--surface)) 2px 5px) !important; }
.chart .worked { fill: var(--brand); }
.vchart { --h: 190px; position: relative; padding-left: 34px; }
.vchart-grid { position: absolute; left: 34px; right: 0; top: 0; height: var(--h); }
.vchart-line { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); }
.vchart-line span { position: absolute; right: calc(100% + 8px); top: -8px; font-size: 11px; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.vchart-cols { position: relative; display: flex; }
.vchart-col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; }
.vchart-bar { position: relative; height: var(--h); width: min(40px, 64%); }
.vchart-bar i { position: absolute; bottom: 0; display: block; }
.vchart-bar .p { left: 0; right: 0; border-radius: 6px 6px 0 0; background: color-mix(in srgb, var(--ink-3) 20%, transparent); }
.vchart-bar .w, .vchart-bar .l { left: 20%; right: 20%; border-radius: 4px 4px 0 0; }
.vchart-bar .w { background: var(--brand); }
.vchart-bar .l { border-radius: 4px 4px 0 0; }
.vchart-cols.dense .vchart-bar { width: 72%; }
.vchart-cols.dense .vchart-bar .w, .vchart-cols.dense .vchart-bar .l { left: 15%; right: 15%; }
.vchart-x { height: 34px; padding-top: 7px; font-size: 11.5px; font-weight: 600; color: var(--ink-3); text-align: center; white-space: nowrap; line-height: 1.25; }
.vchart-x small { display: block; font-size: 11px; font-weight: 500; }
.vchart-x.today { color: var(--brand-ink); }
.card-head.wrap { flex-wrap: wrap; row-gap: 6px; }
.card-head.wrap h2 { flex: 1 0 auto; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); font-weight: 550; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.hbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; }
.hbar + .hbar { margin-top: 12px; }
.hbar-name { font-size: 14px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.hbar-val { font-size: 13px; color: var(--ink-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.hbar .bar { grid-column: 1 / -1; height: 8px; border-radius: 4px; }
.hbar .bar > i { border-radius: 4px; }

.rank-card { display: flex; gap: 16px; align-items: center; }
.medal { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; flex: none; background: linear-gradient(145deg, var(--brand-2), var(--brand)); color: #fff; box-shadow: 0 6px 16px -6px rgba(238,69,33,.6); }
.medal .i { width: 28px; height: 28px; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.badge { padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.badge-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 10px; background: var(--surface-2); color: var(--ink-3); }
.badge.earned .badge-icon { color: #fff; }
.badge.earned.t-bronze .badge-icon { background: linear-gradient(145deg, #D4935E, #A8612F); }
.badge.earned.t-silver .badge-icon { background: linear-gradient(145deg, #C3CAD5, #8A94A5); }
.badge.earned.t-gold .badge-icon { background: linear-gradient(145deg, #F9CE54, #D99A06); }
.badge.earned.t-platinum .badge-icon { background: linear-gradient(145deg, #A48BFB, #6941C6); }
.badge-name { font-weight: 650; font-size: 13.5px; }
.badge-desc { font-size: 12px; color: var(--ink-3); margin-top: 2px; line-height: 1.35; }
.badge:not(.earned) { background: transparent; }
.badge:not(.earned) .badge-name { color: var(--ink-2); }
.badge .bar { margin-top: 10px; height: 4px; }

/* ============================================================ PEOPLE ==== */
.person-row { gap: 14px; }
.person-stats { display: flex; gap: 26px; margin-right: 10px; }
.person-stats span { display: flex; flex-direction: column; align-items: flex-end; font-size: 12px; color: var(--ink-3); line-height: 1.3; min-width: 56px; }
.person-stats b { font-size: 15px; color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }

/* ============================================================== HELP ==== */
.faq details { border-top: 1px solid var(--line); }
.faq details:first-child { border-top: 0; }
.faq summary { display: flex; align-items: center; gap: 12px; padding: 15px 18px; cursor: pointer; font-weight: 600; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .i { margin-left: auto; transition: transform .2s var(--ease); flex: none; }
.faq details[open] summary .i { transform: rotate(180deg); }
.faq details p { margin: -4px 18px 16px; color: var(--ink-2); max-width: 64ch; }

/* ========================================================= SETTINGS ===== */
.settings-nav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.set-row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-top: 1px solid var(--line); }
.set-row:first-child { border-top: 0; }
.set-row .grow { flex: 1; min-width: 0; }
.set-title { font-weight: 600; }
.set-sub { font-size: 13.5px; color: var(--ink-3); margin-top: 1px; }

.plan-grid { display: grid; gap: 16px; }
@media (min-width: 760px) { .plan-grid { grid-template-columns: 1fr 1fr; } }
.plan { padding: 22px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); display: flex; flex-direction: column; }
.plan.featured { border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring), var(--sh-2); }
.plan-name { font-weight: 700; font-size: 17px; }
.plan-price { font-size: 38px; font-weight: 780; letter-spacing: -.04em; margin: 10px 0 2px; }
.plan-price small { font-size: 15px; font-weight: 600; color: var(--ink-3); letter-spacing: 0; }
.plan ul { list-style: none; padding: 0; margin: 16px 0 22px; display: flex; flex-direction: column; gap: 9px; }
.plan li { display: flex; gap: 9px; align-items: flex-start; color: var(--ink-2); font-size: 14.5px; }
.plan li .i { color: var(--ok); margin-top: 2px; }
.plan .btn { margin-top: auto; }

/* ============================================================ TABLES ==== */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-3); padding: 10px 18px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 13px 18px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.click { cursor: pointer; }
.table tr.click:hover td { background: var(--surface-2); }
@media (max-width: 760px) {
  .table thead { display: none; }
  .table tr { display: block; padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .table td { display: block; padding: 3px 0; border: 0; }
  .table td[data-label]::before { content: attr(data-label) ": "; color: var(--ink-3); font-size: 12.5px; }
  .hide-sm { display: none !important; }
}
.person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.person b { display: block; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person small { display: block; color: var(--ink-3); font-size: 12.5px; }

/* banner */
.banner { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; margin-bottom: 18px; font-size: 14px; background: var(--brand-soft); color: var(--brand-ink); }
.banner .grow { flex: 1; }
.banner-warn { background: var(--warn-soft); color: var(--warn-ink); }
.banner-info { background: var(--info-soft); color: var(--info-ink); }
.banner-ok { background: var(--ok-soft); color: var(--ok-ink); }
.banner .muted { color: inherit; opacity: .8; }

/* utilities */
.mt-0 { margin-top: 0 !important; } .mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; }
.center { text-align: center; }
.w-full { width: 100%; }
.hide-desktop { }
@media (min-width: 960px) { .hide-desktop { display: none !important; } }
@media (max-width: 959px) { .hide-mobile { display: none !important; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; } }
