/* SendPilot — warm, soft dashboard style: frosted rounded cards, pill navigation,
   charcoal + yellow accents, light geometric type. */

:root {
  --font: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;

  --bg: #eceae4;
  --bg-image:
    radial-gradient(1100px 700px at 100% 100%, rgba(250, 214, 92, .55), transparent 60%),
    radial-gradient(900px 600px at 85% 20%, rgba(252, 236, 180, .45), transparent 60%),
    linear-gradient(135deg, #e7e8eb 0%, #efeee9 45%, #f5eed8 100%);
  --surface: rgba(255, 255, 255, .62);
  --surface-strong: rgba(255, 255, 255, .86);
  --surface-2: rgba(255, 255, 255, .42);
  --field: rgba(255, 255, 255, .9);
  --border: rgba(28, 28, 26, .08);
  --border-strong: rgba(28, 28, 26, .16);
  --text: #1c1c1a;
  --text-2: #3a3a37;
  --muted: #7b7a74;

  --ink: #262624;          /* active pills, primary buttons */
  --on-ink: #ffffff;
  --accent: #f6cf45;       /* signature yellow */
  --accent-strong: #eab918;
  --accent-soft: #fbeaa8;
  --on-accent: #1c1c1a;
  --dark-card: #262624;
  --dark-card-2: #34332f;
  --on-dark: #f4f3ee;
  --on-dark-muted: #a9a79f;

  --green: #23875a;
  --green-soft: rgba(47, 158, 106, .14);
  --amber: #b87512;
  --amber-soft: rgba(231, 160, 40, .16);
  --red: #c4402f;
  --red-soft: rgba(214, 72, 55, .12);
  --blue: #2f6fc6;
  --blue-soft: rgba(58, 123, 213, .12);
  --gray-soft: rgba(28, 28, 26, .06);

  --c-sent: #2a2a28;
  --c-delivered: #b3b1a8;
  --c-opened: #efc12f;
  --c-clicked: #e48a2c;
  --c-bounced: #d0513f;
  --c-plan: #efc12f;

  --shadow: 0 1px 2px rgba(28, 28, 26, .04), 0 8px 24px rgba(28, 28, 26, .04);
  --shadow-lg: 0 24px 60px rgba(28, 28, 26, .18);
  --radius: 26px;
  --radius-sm: 16px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121211;
    --bg-image:
      radial-gradient(1000px 700px at 100% 100%, rgba(214, 170, 30, .16), transparent 60%),
      linear-gradient(135deg, #111110 0%, #161614 55%, #1c1a12 100%);
    --surface: rgba(38, 38, 35, .62);
    --surface-strong: rgba(46, 46, 42, .92);
    --surface-2: rgba(255, 255, 255, .04);
    --field: rgba(20, 20, 19, .8);
    --border: rgba(255, 255, 255, .07);
    --border-strong: rgba(255, 255, 255, .15);
    --text: #f3f2ec;
    --text-2: #d6d4cc;
    --muted: #9b998f;
    --ink: #f3f2ec;
    --on-ink: #151514;
    --accent: #f3c93e;
    --accent-strong: #f7d45e;
    --accent-soft: rgba(243, 201, 62, .18);
    --dark-card: #0c0c0b;
    --dark-card-2: #1d1d1b;
    --green: #5bd197;
    --green-soft: rgba(91, 209, 151, .13);
    --amber: #f1b24a;
    --amber-soft: rgba(241, 178, 74, .14);
    --red: #f07a6a;
    --red-soft: rgba(240, 122, 106, .13);
    --blue: #71a8f0;
    --blue-soft: rgba(113, 168, 240, .13);
    --gray-soft: rgba(255, 255, 255, .06);
    --c-sent: #e9e7df;
    --c-delivered: #6f6d66;
    --c-opened: #f3c93e;
    --c-clicked: #f0983f;
    --c-bounced: #f07a6a;
    --c-plan: #f3c93e;
    --shadow: none;
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, .55);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  background: var(--bg-image), var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 400 14.5px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--text); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--text); }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; font-weight: 500; letter-spacing: -.01em; }
h1 { font-size: 40px; font-weight: 400; letter-spacing: -.025em; }
h2 { font-size: 20px; font-weight: 400; }
h3 { font-size: 15px; font-weight: 500; }
p { margin: 0; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
code { background: var(--gray-soft); padding: 1px 6px; border-radius: 6px; word-break: break-all; }
hr { border: 0; border-top: 1px dashed var(--border-strong); margin: 16px 0; }
::selection { background: var(--accent-soft); }

/* ================= shell ================= */
.app { max-width: 1440px; margin: 0 auto; padding: 22px 28px 64px; }
.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.logo {
  display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 22px;
  border: 1.5px solid var(--text); border-radius: 999px; font-size: 21px; font-weight: 400;
  letter-spacing: -.01em; text-decoration: none; color: var(--text); flex-shrink: 0;
}
.logo:hover { background: var(--surface); }
.logo-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent-strong); }
.nav {
  display: flex; gap: 2px; padding: 4px; margin-left: auto; background: var(--surface-strong);
  border-radius: 999px; box-shadow: var(--shadow); overflow-x: auto; scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav a {
  display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: 999px;
  color: var(--text-2); text-decoration: none; white-space: nowrap; font-weight: 400;
}
.nav a:hover { background: var(--gray-soft); }
.nav a.active { background: var(--ink); color: var(--on-ink); }
.top-actions { display: flex; align-items: center; gap: 8px; }
.pill-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 18px; border-radius: 999px;
  background: var(--surface-strong); color: var(--text); text-decoration: none; box-shadow: var(--shadow);
  border: 0; font: inherit; cursor: pointer;
}
.pill-btn.active { background: var(--ink); color: var(--on-ink); }
.pill-btn svg, .icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn {
  position: relative; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-strong); color: var(--text); border: 0; cursor: pointer; box-shadow: var(--shadow); font: inherit;
}
.icon-btn:hover, .pill-btn:hover { background: var(--field); }
.icon-btn .dot { position: absolute; top: 12px; right: 13px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-strong); box-shadow: 0 0 0 2px var(--surface-strong); }
.avatar { font-weight: 500; font-size: 15px; background: var(--accent); color: var(--on-accent); }
.live-pill { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 999px; background: var(--green-soft); color: var(--green); font-size: 13px; font-weight: 500; }
.live-pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1.6s ease-in-out infinite; }
@media (max-width: 640px) { .live-pill { display: none; } }
.avatar:hover { background: var(--accent-strong); }
.popover { position: relative; }
.menu {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 40; min-width: 260px; padding: 8px;
  background: var(--surface-strong); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-lg);
}
.menu .who { padding: 10px 12px 12px; border-bottom: 1px dashed var(--border-strong); margin-bottom: 6px; }
.menu .who b { display: block; font-weight: 500; }
.menu a, .menu button {
  display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 0;
  background: none; color: var(--text); font: inherit; text-decoration: none; cursor: pointer; text-align: left;
}
.menu a:hover, .menu button:hover { background: var(--gray-soft); }
.menu .stat { padding: 8px 12px; font-size: 13px; color: var(--muted); }
.menu .stat b { color: var(--text); font-weight: 500; }
#alerts > .alert { margin-bottom: 14px; }

@media (max-width: 1100px) {
  .topbar { flex-wrap: wrap; }
  .nav { order: 3; width: 100%; margin-left: 0; }
  .top-actions { margin-left: auto; }
}
@media (max-width: 640px) {
  .app { padding: 16px 16px 48px; }
  .logo { height: 42px; font-size: 18px; padding: 0 16px; }
  .pill-btn { height: 42px; padding: 0 14px; }
  .pill-btn span { display: none; }
  .icon-btn { width: 42px; height: 42px; }
  h1 { font-size: 30px; }
}

/* ================= page header ================= */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head p { color: var(--muted); margin-top: 8px; max-width: 70ch; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13.5px; margin-bottom: 8px; text-decoration: none; }
.back:hover { color: var(--text); }

/* ================= cards / layout ================= */
.card {
  background: var(--surface); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0;
}
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 20px 24px 14px; flex-wrap: wrap; }
.card-head h2 { font-size: 21px; }
.card-head p { color: var(--muted); font-size: 13px; margin-top: 3px; }
.card-body { padding: 6px 24px 24px; }
.card-body.flush { padding: 0 0 8px; }
.card.dark { background: var(--dark-card); color: var(--on-dark); border-color: transparent; }
.card.dark .muted, .card.dark .card-head p { color: var(--on-dark-muted); }
.corner-btn {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-strong);
  color: var(--text); text-decoration: none; flex-shrink: 0; border: 0; cursor: pointer;
}
.corner-btn:hover { background: var(--field); }
.corner-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-side { grid-template-columns: minmax(0, 1fr) 380px; }
.g-side-l { grid-template-columns: 260px minmax(0, 1fr); }
@media (max-width: 1100px) { .g-side, .g3 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px) { .g2, .g-side-l { grid-template-columns: minmax(0, 1fr); } }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.hidden { display: none !important; }

/* ================= KPIs ================= */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.kpi {
  background: var(--surface); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border); border-radius: 22px; padding: 18px 20px; box-shadow: var(--shadow);
}
.kpi .label { color: var(--muted); font-size: 13.5px; }
.kpi .value { font-size: 32px; font-weight: 300; letter-spacing: -.03em; margin-top: 6px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi .sub { color: var(--muted); font-size: 12.5px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi.good .value { color: var(--green); }
.kpi.warn .value { color: var(--amber); }
.kpi.bad .value { color: var(--red); }

/* big thin numbers (hero stats) */
.bigstats { display: flex; gap: 36px; flex-wrap: wrap; justify-content: flex-end; }
.bigstat .num { display: flex; align-items: center; gap: 10px; font-size: 64px; font-weight: 300; letter-spacing: -.045em; line-height: 1; font-variant-numeric: tabular-nums; }
.bigstat .ico { width: 30px; height: 30px; border-radius: 9px; background: var(--surface-strong); display: grid; place-items: center; }
.bigstat .ico svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.bigstat .lbl { color: var(--text-2); margin-top: 6px; padding-left: 40px; }
@media (max-width: 640px) { .bigstat .num { font-size: 44px; } }

/* segmented pill bar (like the reference's Interviews / Hired / Project time / Output) */
.segbar { display: flex; gap: 8px; align-items: flex-end; min-width: 0; }
.segbar .seg-item { min-width: 64px; }
.segbar .seg-label { color: var(--text-2); margin-bottom: 8px; white-space: nowrap; font-size: 14px; }
.segbar .seg-pill {
  height: 48px; border-radius: 999px; display: flex; align-items: center; padding: 0 16px; font-size: 13.5px;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.seg-pill.ink { background: var(--ink); color: var(--on-ink); }
.seg-pill.yellow { background: var(--accent); color: var(--on-accent); }
.seg-pill.stripe { background: repeating-linear-gradient(-55deg, var(--surface-strong) 0 6px, transparent 6px 12px), var(--surface-2); border: 1px solid var(--border); color: var(--text); }
.seg-pill.outline { border: 1.5px solid var(--border-strong); color: var(--text); }

/* ================= buttons ================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px;
  border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface-strong); color: var(--text);
  font: inherit; font-weight: 500; font-size: 14px; cursor: pointer; white-space: nowrap; text-decoration: none !important;
  transition: background .15s, transform .05s;
}
.btn:hover { background: var(--field); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.btn-primary:hover { background: var(--ink); opacity: .88; }
.btn-accent { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-accent:hover { background: var(--accent-strong); }
.btn-danger { color: var(--red); }
.btn-danger:hover { background: var(--red-soft); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--gray-soft); }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn.loading { pointer-events: none; opacity: .7; }
.btn.loading::before { content: ""; width: 13px; height: 13px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ================= forms ================= */
label.field { display: flex; flex-direction: column; gap: 7px; font-weight: 500; font-size: 13.5px; color: var(--text-2); }
label.field .hint, .hint { font-weight: 400; color: var(--muted); font-size: 12.5px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], input[type=date],
input[type=datetime-local], input[type=search], input[type=time], select, textarea {
  width: 100%; height: 44px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: 14px;
  background: var(--field); color: var(--text); font: inherit; font-size: 14.5px;
}
textarea { height: auto; padding: 12px 14px; resize: vertical; min-height: 90px; line-height: 1.55; }
textarea.code { font-family: var(--mono); font-size: 12.5px; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--accent-soft); border-color: var(--accent-strong); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 700px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; cursor: pointer; }
.check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--ink); }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; }
.switch input { appearance: none; width: 44px; height: 26px; border-radius: 99px; background: var(--border-strong); position: relative; cursor: pointer; transition: background .15s; margin: 0; flex-shrink: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked { background: var(--accent-strong); }
.switch input:checked::after { left: 21px; }
.input-group { display: flex; gap: 8px; }
.input-group > input { flex: 1; }

/* choice cards (radio-like) */
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.choice { position: relative; display: block; padding: 14px 16px; border-radius: 18px; border: 1px solid var(--border-strong); background: var(--surface-2); cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice b { display: block; font-weight: 500; }
.choice span { color: var(--muted); font-size: 12.5px; }
.choice:has(input:checked) { border-color: var(--ink); background: var(--surface-strong); box-shadow: inset 0 0 0 1px var(--ink); }

/* ================= tables ================= */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.table th { text-align: left; font-size: 12.5px; font-weight: 400; color: var(--muted); padding: 12px 16px; border-bottom: 1px dashed var(--border-strong); white-space: nowrap; }
.table td { padding: 13px 16px; border-bottom: 1px dashed var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table th:first-child, .table td:first-child { padding-left: 24px; }
.table th:last-child, .table td:last-child { padding-right: 24px; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: var(--surface-2); }
.table td.num, .table th.num { text-align: right; }
.table .truncate { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { padding: 44px 24px; text-align: center; color: var(--muted); }
.empty h3 { color: var(--text); margin-bottom: 6px; font-size: 18px; font-weight: 400; }
.empty .btn { margin-top: 16px; }

/* ================= badges ================= */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; background: var(--gray-soft); color: var(--text-2); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.amber { background: var(--amber-soft); color: var(--amber); }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.blue { background: var(--blue-soft); color: var(--blue); }
.badge.indigo { background: var(--accent-soft); color: var(--text); }
.badge.indigo::before { background: var(--accent-strong); }
.badge.sending::before { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .2; } }
.chip { display: inline-flex; padding: 4px 10px; border: 1px solid var(--border-strong); border-radius: 999px; font-size: 12px; font-family: var(--mono); cursor: pointer; background: var(--surface-strong); color: var(--text-2); }
.chip:hover { border-color: var(--ink); color: var(--text); }

/* ================= alerts ================= */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: 18px; font-size: 14px; background: var(--surface-strong); border: 1px solid var(--border); }
.alert b { font-weight: 500; }
.alert .icon { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; }
.alert.warn .icon { background: var(--amber-soft); color: var(--amber); }
.alert.bad { background: var(--red-soft); border-color: transparent; }
.alert.bad .icon { background: var(--red); color: #fff; }
.alert.info .icon { background: var(--blue-soft); color: var(--blue); }
.alert.good .icon { background: var(--green-soft); color: var(--green); }
.alert.warn { border-left: 4px solid var(--accent-strong); }

/* ================= check list ================= */
.checks { list-style: none; margin: 0; padding: 0; }
.checks li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--border); }
.checks li:last-child { border-bottom: 0; }
.checks .ico { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; flex-shrink: 0; margin-top: 1px; }
.checks .pass .ico { background: var(--accent); color: var(--on-accent); }
.checks .warn .ico { background: var(--amber-soft); color: var(--amber); }
.checks .fail .ico { background: var(--red-soft); color: var(--red); }
.checks .info .ico { background: var(--gray-soft); color: var(--muted); }
.checks .title { font-weight: 500; }
.checks .detail { color: var(--muted); font-size: 13px; margin-top: 2px; word-break: break-word; }
.card.dark .checks li { border-color: rgba(255, 255, 255, .08); }
.card.dark .checks .detail { color: var(--on-dark-muted); }
.card.dark .checks .info .ico { background: var(--dark-card-2); color: var(--on-dark-muted); }

/* task list on dark card (reference's "Onboarding Task") */
.tasks { list-style: none; margin: 0; padding: 0 16px 16px; }
.tasks li { display: flex; align-items: center; gap: 14px; padding: 10px 8px; }
.tasks .t-ico { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--dark-card-2); flex-shrink: 0; }
.tasks .t-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tasks .t-body { flex: 1; min-width: 0; }
.tasks .t-body b { display: block; font-weight: 400; }
.tasks .t-body span { color: var(--on-dark-muted); font-size: 12.5px; }
.tasks li.done .t-body b { text-decoration: line-through; color: var(--on-dark-muted); }
.tasks .t-state { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; background: var(--dark-card-2); display: grid; place-items: center; font-size: 12px; color: var(--on-accent); }
.tasks li.done .t-state { background: var(--accent); }
.tasks a { color: inherit; text-decoration: none; }

.score { display: flex; align-items: center; gap: 16px; }
.score-ring { width: 78px; height: 78px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; font-weight: 400; flex-shrink: 0;
  background: conic-gradient(var(--c) calc(var(--v) * 1%), var(--gray-soft) 0); position: relative; }
.score-ring::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--surface-strong); }
.score-ring span { position: relative; z-index: 1; }

/* big dial (reference's time-tracker ring) */
.dial { position: relative; width: 190px; height: 190px; margin: 4px auto 10px; }
.dial svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.dial .track { stroke: var(--border-strong); stroke-dasharray: 1 5; }
.dial .value { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .6s; }
.dial .center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.dial .center b { font-size: 40px; font-weight: 300; letter-spacing: -.03em; line-height: 1; }
.dial .center span { color: var(--muted); font-size: 13px; margin-top: 4px; }

/* stick bars (reference's "Progress" chart) */
.sticks { display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; height: 170px; padding: 28px 4px 0; }
.stick { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; position: relative; }
.stick .bar { width: 9px; border-radius: 99px; background: var(--ink); min-height: 6px; }
.stick .bar.zero { background: repeating-linear-gradient(0deg, var(--border-strong) 0 3px, transparent 3px 6px); height: 60px; }
.stick .bar.hi { background: var(--accent); width: 11px; }
.stick .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }
.stick.today .dot { background: var(--accent-strong); }
.stick .lbl { color: var(--muted); font-size: 12px; }
.stick .tip { position: absolute; top: -26px; background: var(--accent); color: var(--on-accent); font-size: 11.5px; padding: 3px 8px; border-radius: 99px; white-space: nowrap; }

/* ================= progress ================= */
.meter { height: 10px; background: var(--gray-soft); border-radius: 99px; overflow: hidden; display: flex; }
.meter > div { height: 100%; background: var(--ink); transition: width .3s; }
.meter > div.green { background: var(--accent); }
.meter > div.red { background: var(--c-bounced); }
.meter > div.amber { background: var(--c-clicked); }
.blocks { display: flex; gap: 6px; align-items: stretch; height: 48px; }
.blocks > div { border-radius: 14px; display: flex; align-items: flex-end; padding: 8px 12px; font-size: 13px; min-width: 10px; }
.blocks .b1 { background: var(--accent); color: var(--on-accent); }
.blocks .b2 { background: var(--ink); color: var(--on-ink); }
.blocks .b3 { background: var(--c-delivered); color: #fff; }

/* ================= tabs ================= */
.tabs { display: flex; gap: 4px; padding: 0 16px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 9px 14px; font: inherit; color: var(--muted); cursor: pointer; border-radius: 999px; white-space: nowrap; }
.tabs button:hover { background: var(--gray-soft); }
.tabs button.active { color: var(--on-ink); background: var(--ink); }
.tabs button .count { margin-left: 4px; opacity: .7; }
.seg { display: inline-flex; padding: 4px; background: var(--surface-strong); border-radius: 999px; box-shadow: var(--shadow); }
.seg button { background: none; border: 0; padding: 8px 14px; font: inherit; font-size: 13.5px; cursor: pointer; color: var(--text-2); border-radius: 999px; }
.seg button.active { background: var(--ink); color: var(--on-ink); }

/* ================= lists sidebar ================= */
.list-nav { display: flex; flex-direction: column; padding: 0 10px 12px; gap: 2px; }
.list-nav button { display: flex; justify-content: space-between; gap: 8px; text-align: left; background: none; border: 0; padding: 10px 14px; font: inherit; color: var(--text-2); cursor: pointer; border-radius: 14px; }
.list-nav button:hover { background: var(--gray-soft); }
.list-nav button.active { background: var(--ink); color: var(--on-ink); }
.list-nav .n { opacity: .7; font-size: 12.5px; font-variant-numeric: tabular-nums; }

.bulkbar { display: flex; gap: 8px; align-items: center; margin: 0 16px 10px; padding: 10px 14px; background: var(--accent-soft); border-radius: 18px; flex-wrap: wrap; }
.bulkbar select { width: auto; height: 34px; }
.pager { display: flex; justify-content: space-between; align-items: center; padding: 12px 24px 4px; color: var(--muted); font-size: 13px; gap: 8px; flex-wrap: wrap; }

/* ================= editor ================= */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 1100px) { .editor { grid-template-columns: minmax(0, 1fr); } }
.preview-shell { margin: 0 16px 16px; border-radius: 18px; overflow: hidden; background: #fff; border: 1px solid var(--border); }
.preview-frame { width: 100%; height: 640px; border: 0; background: #fff; display: block; margin: 0 auto; transition: width .2s; }
.preview-frame.mobile { width: 390px; max-width: 100%; }
.inbox-line { padding: 14px 18px; border-bottom: 1px solid #eee; font-size: 13.5px; color: #1c1c1a; background: #fafaf8; }
.inbox-line .from { font-weight: 600; }
.inbox-line .pre { color: #7b7a74; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-picks { display: flex; flex-direction: column; gap: 8px; max-height: 190px; overflow: auto; border: 1px solid var(--border-strong); border-radius: 16px; padding: 12px 14px; background: var(--surface-2); }
.sticky-bar { position: sticky; top: 0; z-index: 5; padding: 10px 0 14px; margin: -10px 0 4px; background: linear-gradient(var(--bg) 70%, transparent); }
.dirty-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-strong); display: inline-block; }

/* ================= modal ================= */
.modal-backdrop { position: fixed; inset: 0; background: rgba(20, 20, 18, .42); backdrop-filter: blur(4px); display: grid; place-items: center; z-index: 50; padding: 16px; animation: fade .12s ease-out; }
.modal { background: var(--surface-strong); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px); border: 1px solid var(--border); border-radius: 28px; box-shadow: var(--shadow-lg); width: 100%; max-width: 540px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; }
@media (prefers-color-scheme: dark) { .modal { background: #1d1d1b; } }
.modal.wide { max-width: 920px; }
.modal-head { padding: 22px 26px 10px; display: flex; justify-content: space-between; align-items: center; }
.modal-head h2 { font-size: 23px; }
.modal-body { padding: 10px 26px 22px; overflow: auto; }
.modal-foot { padding: 14px 26px 22px; display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.x { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--gray-soft); font-size: 20px; line-height: 1; cursor: pointer; color: var(--text); }
.x:hover { background: var(--border-strong); }
@keyframes fade { from { opacity: 0; } }

/* ================= toasts ================= */
#toasts { position: fixed; bottom: 22px; right: 22px; display: flex; flex-direction: column; gap: 8px; z-index: 60; max-width: calc(100vw - 44px); }
.toast { background: var(--ink); color: var(--on-ink); padding: 12px 18px; border-radius: 16px; box-shadow: var(--shadow-lg); font-size: 14px; max-width: 440px; animation: fade .15s; }
.toast.error { background: var(--red); color: #fff; }
.toast.success { background: var(--accent); color: var(--on-accent); }

/* ================= misc ================= */
.loading-page { padding: 70px; text-align: center; color: var(--muted); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }
.chart-box { position: relative; height: 290px; }
.feed { list-style: none; margin: 0; padding: 0 8px 8px; }
.feed li { display: flex; gap: 10px; padding: 10px 16px; border-bottom: 1px dashed var(--border); font-size: 13.5px; align-items: center; }
.feed li:last-child { border-bottom: 0; }
.feed .when { color: var(--muted); margin-left: auto; white-space: nowrap; font-size: 12.5px; }
@media (max-width: 640px) { .feed li { flex-wrap: wrap; } .feed li > .muted.truncate { display: none; } .feed .truncate { max-width: 100% !important; } }
.steps { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.steps span { padding: 8px 16px; border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 13.5px; }
.steps span.active { background: var(--ink); color: var(--on-ink); }
.steps span.done { background: var(--accent); color: var(--on-accent); }
.dropzone { display: block; border: 2px dashed var(--border-strong); border-radius: 22px; padding: 44px; text-align: center; cursor: pointer; color: var(--muted); transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--accent-strong); background: var(--accent-soft); }
.dropzone b { color: var(--text); font-weight: 500; }
.tip { font-size: 13.5px; color: var(--text-2); background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: 18px; padding: 12px 16px; }
.tip b { color: var(--text); font-weight: 500; }
ol.guide { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 9px; }

/* recipient picker */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.person-chip { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 4px 4px 4px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--text); font-size: 13px; }
.person-chip.inactive { background: var(--gray-soft); color: var(--muted); }
.person-chip button { border: 0; background: none; color: var(--muted); font-size: 16px; line-height: 1; padding: 0 6px; cursor: pointer; border-radius: 50%; }
.person-chip button:hover { color: var(--red); }
.picker { position: relative; }
.picker-menu { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20; max-height: 300px; overflow: auto; background: var(--surface-strong); backdrop-filter: blur(24px); border: 1px solid var(--border-strong); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 6px; }
@media (prefers-color-scheme: dark) { .picker-menu { background: #1d1d1b; } }
.picker-menu button { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; border-radius: 12px; }
.picker-menu button:hover { background: var(--gray-soft); }

/* upcoming timeline (reference's calendar card) */
.timeline { padding: 4px 20px 20px; display: flex; flex-direction: column; gap: 10px; }
.tl-item { display: flex; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 18px; background: var(--surface-strong); text-decoration: none; color: var(--text); }
.tl-item.dark { background: var(--dark-card); color: var(--on-dark); }
.tl-item.dark .muted { color: var(--on-dark-muted); }
.tl-when { width: 74px; flex-shrink: 0; font-size: 13px; color: var(--muted); }
.tl-item.dark .tl-when { color: var(--on-dark-muted); }
.tl-body { flex: 1; min-width: 0; }
.tl-body b { display: block; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-body span { font-size: 12.5px; }

/* ================= auth screens ================= */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; gap: 0; }
.auth-art { padding: 40px 56px; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; }
.auth-art h1 { font-size: 60px; font-weight: 300; letter-spacing: -.04em; max-width: 12ch; line-height: 1.02; }
.auth-art p { color: var(--text-2); max-width: 42ch; margin-top: 18px; font-size: 16px; }
.auth-art .pills { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 28px; }
.auth-form { display: grid; place-items: center; padding: 32px; }
.auth-card { width: 100%; max-width: 420px; padding: 34px; border-radius: 32px; }
.auth-card h2 { font-size: 30px; font-weight: 400; letter-spacing: -.02em; }
.auth-card form { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; }
.auth-card .btn { height: 50px; font-size: 15px; }
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-art { padding: 28px 20px 0; }
  .auth-art h1 { font-size: 40px; }
  .auth-art .pills, .auth-art .foot { display: none; }
}

.savebar { position: sticky; bottom: 16px; z-index: 5; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 8px 18px 8px 8px; width: fit-content; max-width: 100%; border-radius: 999px; background: var(--surface-strong); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: var(--shadow-lg); }

/* ================= dashboard ================= */
.hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 28px; flex-wrap: wrap; margin: 4px 0 26px; }
.hero-title { font-size: 52px; font-weight: 300; letter-spacing: -.04em; margin-bottom: 22px; }
.hero .segbar { max-width: 720px; }
.dash-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.dash-grid .span-2 { grid-column: span 2; }
.dash-grid .row-2 { grid-row: span 2; }
.card-title { display: flex; justify-content: space-between; align-items: flex-start; padding: 22px 24px 0; gap: 10px; }
.card-title h2 { font-size: 23px; }
.metric-line { display: flex; align-items: baseline; gap: 12px; padding: 10px 24px 0; }
.metric-line b { font-size: 40px; font-weight: 300; letter-spacing: -.03em; line-height: 1; }
.metric-line span { color: var(--muted); font-size: 13px; line-height: 1.25; }
.provider { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 10px 24px; }
.provider .bar { grid-column: 1 / -1; height: 6px; border-radius: 99px; background: var(--gray-soft); overflow: hidden; }
.provider .bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
@media (max-width: 1200px) { .dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dash-grid .row-2 { grid-row: auto; } }
@media (max-width: 700px) { .dash-grid { grid-template-columns: minmax(0, 1fr); } .dash-grid .span-2 { grid-column: auto; } .hero-title { font-size: 38px; } }
