/* =====================================================================
 * Tampkit HQ — founder dashboard styles
 * System: Apple-style gallery.  Canvas #f5f5f7, white 20px cards, no heavy shadows,
 * SF (system) type with size-specific tracking, ink #1d1d1f, one blue for actions,
 * Tampkit gold for "your brand" moments (stamps, rewards). Translucent sidebar + sheets.
 * ===================================================================== */
:root {
  --bg: #f5f5f7;
  --card: #ffffff;
  --card-2: #fafafc;
  --ink: #1d1d1f;
  --ink-2: #424245;
  --muted: #6e6e73;
  --faint: #86868b;
  --line: rgba(0, 0, 0, 0.08);
  --line-2: rgba(0, 0, 0, 0.14);
  --fill: rgba(0, 0, 0, 0.04);
  --fill-2: rgba(0, 0, 0, 0.07);
  --blue: #0071e3;
  --blue-ink: #0066cc;
  --blue-soft: rgba(0, 113, 227, 0.1);
  --gold: #b8893f;
  --gold-soft: rgba(184, 137, 63, 0.14);
  --green: #1d8a4e;
  --green-soft: rgba(29, 138, 78, 0.12);
  --orange: #b64400;
  --orange-soft: rgba(182, 68, 0, 0.1);
  --red: #d70015;
  --red-soft: rgba(215, 0, 21, 0.09);
  --side: rgba(246, 246, 248, 0.72);
  --sheet: rgba(255, 255, 255, 0.86);
  --scrim: rgba(0, 0, 0, 0.22);
  --shadow-pop: 0 18px 50px rgba(0, 0, 0, 0.14), 0 2px 8px rgba(0, 0, 0, 0.06);
  --r-card: 20px;
  --r-ctl: 10px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --spring: cubic-bezier(0.2, 0.9, 0.25, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000; --card: #1c1c1e; --card-2: #232325; --ink: #f5f5f7; --ink-2: #d1d1d6; --muted: #98989d; --faint: #7c7c80;
    --line: rgba(255,255,255,0.09); --line-2: rgba(255,255,255,0.16); --fill: rgba(255,255,255,0.06); --fill-2: rgba(255,255,255,0.1);
    --blue: #0a84ff; --blue-ink: #2997ff; --blue-soft: rgba(10,132,255,0.16); --gold: #d4a75a; --gold-soft: rgba(212,167,90,0.16);
    --green: #30d158; --green-soft: rgba(48,209,88,0.14); --orange: #ff9f0a; --orange-soft: rgba(255,159,10,0.14); --red: #ff453a; --red-soft: rgba(255,69,58,0.14);
    --side: rgba(28,28,30,0.72); --sheet: rgba(36,36,38,0.9); --scrim: rgba(0,0,0,0.5); --shadow-pop: 0 18px 50px rgba(0,0,0,0.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000; --card: #1c1c1e; --card-2: #232325; --ink: #f5f5f7; --ink-2: #d1d1d6; --muted: #98989d; --faint: #7c7c80;
  --line: rgba(255,255,255,0.09); --line-2: rgba(255,255,255,0.16); --fill: rgba(255,255,255,0.06); --fill-2: rgba(255,255,255,0.1);
  --blue: #0a84ff; --blue-ink: #2997ff; --blue-soft: rgba(10,132,255,0.16); --gold: #d4a75a; --gold-soft: rgba(212,167,90,0.16);
  --green: #30d158; --green-soft: rgba(48,209,88,0.14); --orange: #ff9f0a; --orange-soft: rgba(255,159,10,0.14); --red: #ff453a; --red-soft: rgba(255,69,58,0.14);
  --side: rgba(28,28,30,0.72); --sheet: rgba(36,36,38,0.9); --scrim: rgba(0,0,0,0.5); --shadow-pop: 0 18px 50px rgba(0,0,0,0.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--ink); font: 14px/1.43 var(--font); letter-spacing: -0.15px;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
a { color: var(--blue-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
svg { display: block; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.hide { display: none !important; }

/* ---------- shell ---------- */
.app { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; padding: 18px 12px; display: flex; flex-direction: column; gap: 4px;
  background: var(--side); backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-right: 1px solid var(--line); z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.brand b { font-size: 15px; font-weight: 600; letter-spacing: -0.2px; }
.brand span { display: block; font-size: 11.5px; color: var(--muted); letter-spacing: -0.05px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav button {
  display: flex; align-items: center; gap: 11px; width: 100%; padding: 8px 10px; border: 0; border-radius: 9px; background: transparent;
  font-size: 14px; font-weight: 500; color: var(--ink-2); cursor: pointer; text-align: left; transition: background 120ms;
}
.nav button svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.nav button:hover { background: var(--fill); }
.nav button:active { background: var(--fill-2); }
.nav button.on { background: var(--card); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.nav button.on svg { color: var(--blue); }
.nav .badge { margin-left: auto; min-width: 20px; padding: 1px 7px; border-radius: 99px; background: var(--blue); color: #fff; font-size: 11.5px; font-weight: 600; text-align: center; }
.side-foot { margin-top: auto; padding: 12px 10px 4px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--gold-soft); color: var(--gold); display: grid; place-items: center; font-weight: 600; font-size: 13px; flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.side-foot .who { min-width: 0; flex: 1; }
.side-foot .who b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot .who span { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.main { min-width: 0; }
.top {
  position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 12px; padding: 14px 32px;
  background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%);
}
.top h1 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -0.5px; line-height: 1.15; }
.top .spacer { flex: 1; }
.search {
  display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; width: min(300px, 32vw);
  border-radius: 10px; background: var(--fill); color: var(--muted);
}
.search input { border: 0; background: transparent; outline: none; width: 100%; color: var(--ink); font-size: 13.5px; }
.search svg { width: 15px; height: 15px; flex: none; }
.live-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.live-dot i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 var(--green); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 50%, transparent); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.page { padding: 6px 32px 64px; max-width: 1360px; }
.page > section { display: none; }
.page > section.on { display: block; animation: enter 320ms var(--spring); }
@keyframes enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- buttons + controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 15px; border-radius: 99px;
  border: 0; background: var(--fill-2); color: var(--ink); font-size: 13.5px; font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: transform 90ms ease-out, background 120ms, opacity 120ms;
}
.btn svg { width: 15px; height: 15px; }
.btn:hover { background: color-mix(in srgb, var(--fill-2) 100%, var(--ink) 5%); }
.btn:active { transform: scale(0.97); }
.btn.primary { background: var(--blue); color: #fff; }
.btn.primary:hover { background: color-mix(in srgb, var(--blue) 90%, #000); }
.btn.dark { background: var(--ink); color: var(--bg); }
.btn.ghost { background: transparent; color: var(--blue-ink); padding: 0 8px; }
.btn.ghost:hover { background: var(--blue-soft); }
.btn.danger { background: var(--red-soft); color: var(--red); }
.btn.sm { height: 28px; padding: 0 11px; font-size: 12.5px; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }
.icon-btn { width: 32px; height: 32px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.icon-btn:hover { background: var(--fill); color: var(--ink); }
.icon-btn svg { width: 17px; height: 17px; }

.seg { display: inline-flex; padding: 2px; border-radius: 9px; background: var(--fill-2); gap: 2px; }
.seg button { white-space: nowrap; border: 0; background: transparent; padding: 4px 12px; border-radius: 7px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); cursor: pointer; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 0 0 0.5px var(--line); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; font-weight: 500; color: var(--muted); }
.input, .field input, .field select, .field textarea {
  width: 100%; padding: 9px 12px; border-radius: var(--r-ctl); border: 1px solid var(--line-2); background: var(--card);
  outline: none; font-size: 14px; transition: border-color 120ms, box-shadow 120ms;
}
.field textarea { resize: vertical; min-height: 110px; line-height: 1.5; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3.5px var(--blue-soft); }
.row { display: flex; gap: 12px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: flex; align-items: center; gap: 9px; font-size: 13.5px; cursor: pointer; user-select: none; }
.check input { width: 17px; height: 17px; accent-color: var(--blue); margin: 0; }

/* ---------- cards ---------- */
.card { background: var(--card); border-radius: var(--r-card); padding: 20px; min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card-h { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-h h2, .card-h h3 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -0.25px; }
.card-h .sub { font-size: 12.5px; color: var(--muted); }
.card-h .spacer { flex: 1; }
.flush .card-h { padding: 18px 20px 0; }
.card.grow { display: flex; flex-direction: column; }
.card.grow .chart { flex: 1; min-height: 220px; }
.leaflet-tile-pane { filter: saturate(0.55) brightness(1.04) contrast(0.95); }
:root[data-theme="dark"] .leaflet-tile-pane { filter: invert(0.92) hue-rotate(180deg) saturate(0.4); }

.hello { padding: 10px 0 22px; }
.hello h2 { margin: 0; font-size: 34px; font-weight: 600; letter-spacing: -1px; line-height: 1.1; }
.hello p { margin: 6px 0 0; font-size: 16px; color: var(--muted); letter-spacing: -0.3px; }

.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.kpi { background: var(--card); border-radius: var(--r-card); padding: 16px 18px 15px; cursor: default; position: relative; }
.kpi.click { cursor: pointer; transition: transform 140ms var(--spring); }
.kpi.click:active { transform: scale(0.985); }
.kpi .label { font-size: 12.5px; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.kpi .label svg { width: 14px; height: 14px; }
.kpi .value { margin-top: 8px; font-size: 30px; font-weight: 600; letter-spacing: -0.9px; line-height: 1; font-variant-numeric: tabular-nums; }
.kpi .value small { font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: -0.2px; margin-left: 2px; }
.kpi .foot { margin-top: 9px; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.delta { font-weight: 600; font-variant-numeric: tabular-nums; }
.delta.up { color: var(--green); }
.delta.down { color: var(--red); }
.kpi .spark { position: absolute; right: 14px; top: 16px; width: 74px; height: 26px; }

.cols { display: grid; gap: 12px; }
.cols.c-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.cols.c-1-1 { grid-template-columns: 1fr 1fr; }
.cols.c-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.mt { margin-top: 12px; }

/* ---------- pills + status ---------- */
.pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 99px; font-size: 11.5px; font-weight: 600; letter-spacing: -0.05px; background: var(--fill-2); color: var(--ink-2); white-space: nowrap; }
.pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.green { background: var(--green-soft); color: var(--green); }
.pill.orange { background: var(--orange-soft); color: var(--orange); }
.pill.red { background: var(--red-soft); color: var(--red); }
.pill.blue { background: var(--blue-soft); color: var(--blue-ink); }
.pill.gold { background: var(--gold-soft); color: var(--gold); }
.tag-test { font-size: 11px; font-weight: 600; color: var(--orange); background: var(--orange-soft); padding: 2px 8px; border-radius: 99px; }

/* ---------- lists / feeds ---------- */
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 12px; padding: 11px 20px; border-top: 1px solid var(--line); min-width: 0; }
.li:first-child { border-top: 0; }
.li.click { cursor: pointer; }
.li.click:hover { background: var(--card-2); }
.li .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--fill); color: var(--muted); font-weight: 600; font-size: 13px; overflow: hidden; }
.li .ic img { width: 100%; height: 100%; object-fit: cover; }
.li .ic svg { width: 17px; height: 17px; }
.li .ic.gold { background: var(--gold-soft); color: var(--gold); }
.li .ic.blue { background: var(--blue-soft); color: var(--blue); }
.li .ic.green { background: var(--green-soft); color: var(--green); }
.li .ic.red { background: var(--red-soft); color: var(--red); }
.li .bd { min-width: 0; flex: 1; }
.li .bd b { display: block; font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li .bd span { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li .end { text-align: right; flex: none; font-size: 12.5px; color: var(--muted); }
.li .end b { display: block; color: var(--ink); font-weight: 600; font-size: 13.5px; }
.li.new { animation: flash 1.6s ease-out; }
@keyframes flash { from { background: var(--gold-soft); } to { background: transparent; } }
.empty { padding: 30px 20px; text-align: center; color: var(--muted); font-size: 13.5px; }
.empty b { display: block; color: var(--ink); font-size: 14.5px; margin-bottom: 4px; }

/* ---------- table ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 500; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr.click { cursor: pointer; }
.tbl tbody tr.click:hover td { background: var(--card-2); }
.tbl th:first-child, .tbl td:first-child { padding-left: 20px; }
.tbl th:last-child, .tbl td:last-child { padding-right: 20px; }
.tbl .r { text-align: right; }
.cafe-cell { display: flex; align-items: center; gap: 11px; min-width: 0; }
.cafe-cell .logo { width: 32px; height: 32px; border-radius: 9px; background: var(--fill); display: grid; place-items: center; overflow: hidden; flex: none; font-weight: 600; font-size: 12px; color: var(--muted); }
.cafe-cell .logo img { width: 100%; height: 100%; object-fit: cover; }
.cafe-cell b { display: block; font-weight: 600; }
.cafe-cell span.pill { display: inline-flex; }
.cafe-cell span { display: block; font-size: 12px; color: var(--muted); }
.tbl-wrap { overflow-x: auto; }

/* ---------- charts ---------- */
.chart { width: 100%; height: 220px; position: relative; }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.chart .axis text { font-size: 11px; fill: var(--faint); font-family: var(--font); }
.chart .grid line { stroke: var(--line); }
.tip {
  position: absolute; pointer-events: none; transform: translate(-50%, calc(-100% - 10px)); padding: 7px 10px; border-radius: 9px;
  background: var(--sheet); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: var(--shadow-pop);
  font-size: 12px; white-space: nowrap; opacity: 0; transition: opacity 100ms; z-index: 3;
}
.tip b { font-weight: 600; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 9px; height: 9px; border-radius: 3px; }

.bars { display: flex; flex-direction: column; gap: 11px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 130px) 1fr 44px; align-items: center; gap: 10px; font-size: 13px; }
.bar-row .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.bar-row .tr { height: 8px; border-radius: 99px; background: var(--fill); overflow: hidden; }
.bar-row .tr i { display: block; height: 100%; border-radius: 99px; background: var(--gold); transform-origin: left; }
@keyframes grow { from { transform: scaleX(0); } }
.bar-row .v { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }

.heat { display: grid; grid-template-columns: 34px repeat(24, 1fr); gap: 3px; font-size: 10.5px; color: var(--faint); }
.heat .c { aspect-ratio: 1; border-radius: 3px; background: var(--fill); }
.heat .h { text-align: center; }
.heat .d { align-self: center; }

/* ---------- mail ---------- */
.mail { display: grid; grid-template-columns: 350px minmax(0, 1fr); height: calc(100vh - 150px); min-height: 520px; }
.mail-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.mail-list .head { padding: 14px 14px 10px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.mail-items { overflow-y: auto; flex: 1; }
.mi { padding: 12px 16px 12px 24px; border-bottom: 1px solid var(--line); cursor: pointer; position: relative; }
.mi:hover { background: var(--card-2); }
.mi.on { background: var(--blue-soft); }
.mi .t { display: flex; gap: 8px; align-items: baseline; }
.mi .t b { flex: 1; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mi .t span { font-size: 11.5px; color: var(--muted); flex: none; }
.mi .s { font-size: 13px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mi .p { font-size: 12.5px; color: var(--muted); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mi.unread::before { content: ""; position: absolute; left: 9px; top: 17px; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
.mi .k { margin-top: 5px; }
.reader { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.reader .rh { padding: 20px 26px 16px; border-bottom: 1px solid var(--line); }
.reader .rh h2 { margin: 0 0 10px; font-size: 21px; font-weight: 600; letter-spacing: -0.45px; line-height: 1.2; }
.reader .meta { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.reader .meta .who { flex: 1; min-width: 0; }
.reader .meta .who b { font-weight: 600; }
.reader .rb { flex: 1; overflow: auto; padding: 22px 26px; }
.reader .rb pre { white-space: pre-wrap; font: 14.5px/1.6 var(--font); margin: 0; letter-spacing: -0.2px; }
.reader iframe { width: 100%; border: 0; min-height: 420px; background: #fff; border-radius: 12px; }
.attach { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 26px 18px; }
.attach span { font-size: 12px; padding: 5px 10px; border-radius: 8px; background: var(--fill); color: var(--ink-2); }

/* ---------- leads ---------- */
.board { display: grid; grid-template-columns: repeat(5, minmax(200px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 4px; }
.col { background: var(--fill); border-radius: 16px; padding: 10px; min-height: 160px; display: flex; flex-direction: column; gap: 8px; transition: background 140ms; }
.col.drop { background: var(--blue-soft); }
.col-h { display: flex; align-items: center; gap: 8px; padding: 4px 6px 6px; font-size: 13px; font-weight: 600; }
.col-h i { width: 8px; height: 8px; border-radius: 50%; }
.col-h span { color: var(--muted); font-weight: 500; }
.lead { background: var(--card); border-radius: 12px; padding: 11px 12px; cursor: grab; box-shadow: 0 0 0 1px var(--line); transition: transform 160ms var(--spring), box-shadow 160ms; }
.lead:hover { box-shadow: 0 0 0 1px var(--line-2), 0 4px 14px rgba(0,0,0,0.06); }
.lead.drag { opacity: 0.5; transform: scale(0.98); }
.lead b { display: block; font-size: 13.5px; font-weight: 600; }
.lead span { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; }
.lead .lf { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.map { height: 460px; border-radius: var(--r-card); overflow: hidden; background: var(--fill); }
.leaflet-container { font: inherit; background: var(--fill); }
.leaflet-popup-content-wrapper { border-radius: 14px; box-shadow: var(--shadow-pop); }
.leaflet-popup-content { margin: 12px 14px; font-size: 13px; }
.pin { width: 26px; height: 26px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); display: grid; place-items: center; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.25); }
.pin.gold { background: var(--gold); } .pin.blue { background: #0071e3; } .pin.grey { background: #8e8e93; } .pin.green { background: #1d8a4e; }
.pin.me { border-radius: 50%; width: 18px; height: 18px; background: #0071e3; box-shadow: 0 0 0 6px rgba(0,113,227,0.25); }

/* ---------- meetings ---------- */
.agenda .day { padding: 14px 20px 6px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; border-top: 1px solid var(--line); }
.agenda .day:first-child { border-top: 0; }
.agenda .day.today { color: var(--blue-ink); }
.mtg { display: grid; grid-template-columns: 74px 4px 1fr auto; gap: 14px; align-items: center; padding: 10px 20px; cursor: pointer; }
.mtg:hover { background: var(--card-2); }
.mtg .tm { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.mtg .tm span { display: block; font-size: 11.5px; font-weight: 500; color: var(--muted); }
.mtg .bar { align-self: stretch; border-radius: 3px; background: var(--blue); }
.mtg.done { opacity: 0.55; }
.mtg b { display: block; font-weight: 600; font-size: 13.5px; }
.mtg .bd span { font-size: 12.5px; color: var(--muted); }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; font-size: 12.5px; }
.cal .wd { color: var(--faint); font-size: 11px; font-weight: 600; padding: 4px 0 8px; }
.cal .d { aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; position: relative; cursor: pointer; font-variant-numeric: tabular-nums; }
.cal .d:hover { background: var(--fill); }
.cal .d.out { color: var(--faint); opacity: 0.5; }
.cal .d.today { background: var(--blue); color: #fff; font-weight: 600; }
.cal .d.has::after { content: ""; position: absolute; bottom: 3px; width: 4px; height: 4px; border-radius: 50%; background: var(--gold); }

/* ---------- sheets / drawers / toast ---------- */
.scrim { position: fixed; inset: 0; background: var(--scrim); opacity: 0; pointer-events: none; transition: opacity 260ms ease; z-index: 40; }
.scrim.on { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; z-index: 50; left: 50%; top: 50%; width: min(620px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: auto;
  background: var(--sheet); backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%);
  border-radius: 22px; box-shadow: var(--shadow-pop); padding: 22px 24px 20px;
  transform: translate(-50%, -46%) scale(0.97); opacity: 0; pointer-events: none; transition: transform 380ms var(--spring), opacity 200ms ease;
}
.sheet.on { transform: translate(-50%, -50%) scale(1); opacity: 1; pointer-events: auto; }
.sheet h2 { margin: 0 0 4px; font-size: 20px; font-weight: 600; letter-spacing: -0.4px; }
.sheet .sub { margin: 0 0 18px; font-size: 13.5px; color: var(--muted); }
.sheet .body { display: flex; flex-direction: column; gap: 14px; }
.sheet .acts { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; align-items: center; }
.sheet .acts .spacer { flex: 1; }
.drawer {
  position: fixed; z-index: 45; top: 0; right: 0; height: 100vh; width: min(520px, 100vw); overflow-y: auto;
  background: var(--bg); box-shadow: var(--shadow-pop); transform: translateX(104%); transition: transform 420ms var(--spring);
}
.drawer.on { transform: none; }
.drawer .dh { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 12px; padding: 16px 20px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.drawer .db { padding: 4px 20px 40px; display: flex; flex-direction: column; gap: 12px; }
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: var(--line); border-radius: 2px; }
.tl { position: relative; padding: 0 0 16px; }
.tl .dot { position: absolute; left: -26px; top: 1px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--card); box-shadow: 0 0 0 1px var(--line); color: var(--muted); }
.tl .dot svg { width: 11px; height: 11px; }
.tl .dot.gold { color: var(--gold); } .tl .dot.blue { color: var(--blue); } .tl .dot.green { color: var(--green); } .tl .dot.red { color: var(--red); }
.tl b { font-size: 13.5px; font-weight: 600; display: block; }
.tl span { font-size: 12.5px; color: var(--muted); }
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 60; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 11px 18px; border-radius: 99px; background: var(--ink); color: var(--bg); font-size: 13.5px; font-weight: 500;
  transition: transform 360ms var(--spring), opacity 200ms; box-shadow: var(--shadow-pop);
}
.toast.on { transform: translate(-50%, 0); opacity: 1; }

/* ---------- sign-in ---------- */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.gate .box { width: min(400px, 100%); text-align: center; }
.gate img { width: 64px; height: 64px; border-radius: 16px; margin: 0 auto 22px; }
.gate h1 { margin: 0; font-size: 34px; font-weight: 600; letter-spacing: -1px; }
.gate p { color: var(--muted); font-size: 16px; margin: 8px 0 28px; letter-spacing: -0.3px; }
.gate .btn { height: 44px; padding: 0 22px; font-size: 15px; }
.gate .err { color: var(--red); font-size: 13.5px; margin-top: 16px; min-height: 20px; }
.gate .demo { display: block; margin-top: 18px; font-size: 13px; }

.banner { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 14px; background: var(--orange-soft); color: var(--orange); font-size: 13px; margin-bottom: 12px; }
.banner b { font-weight: 600; }
.banner.blue { background: var(--blue-soft); color: var(--blue-ink); }

.skel { background: linear-gradient(90deg, var(--fill) 25%, var(--fill-2) 50%, var(--fill) 75%); background-size: 200% 100%; animation: sk 1.4s infinite; border-radius: 6px; height: 14px; }
@keyframes sk { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cols.c-2-1, .cols.c-3 { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: auto; flex-direction: row; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line); }
  .brand, .side-foot { display: none; }
  .nav { flex-direction: row; justify-content: space-around; width: 100%; }
  .nav button { flex-direction: column; gap: 3px; padding: 6px 4px; font-size: 10.5px; align-items: center; width: auto; flex: 1; }
  .nav button.on { box-shadow: none; background: transparent; color: var(--blue); }
  .nav .badge { position: absolute; margin: -4px 0 0 14px; font-size: 10px; min-width: 16px; padding: 0 4px; }
  .nav button { position: relative; }
  .top { padding: 12px 16px; }
  .search { display: none; }
  .page { padding: 4px 16px 96px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi .spark { display: none; }
  .cols.c-1-1, .grid2 { grid-template-columns: 1fr; }
  .mail { grid-template-columns: 1fr; height: auto; }
  .mail-list { border-right: 0; max-height: 50vh; }
  .hello h2 { font-size: 28px; }
  .tbl .opt { display: none; }
  .board { grid-template-columns: repeat(5, 240px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .side, .top, .sheet, .tip, .drawer .dh { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--card); }
}

/* ---------- messages: composer, library ---------- */
.sheet.wide { width: min(1040px, calc(100vw - 32px)); }
.cmp { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 22px; }
.cmp-l, .cmp-r { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.cmp-l h2 { margin: 0; }
.cmp-l .sub { margin: -10px 0 0; }
.people { display: flex; flex-direction: column; gap: 6px; }
.person { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 12px; background: var(--card); box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.person input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--blue); margin: 0; }
.person .pe { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.person .pe b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person .nm { width: 96px; padding: 5px 8px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--card); font-size: 12.5px; outline: none; }
.person .nm:focus { border-color: var(--blue); }
.when { font-size: 12.5px; color: var(--muted); line-height: 1.45; margin-top: 4px; }
.chips { display: flex; flex-direction: column; gap: 6px; }
.chip { text-align: left; border: 0; background: var(--gold-soft); color: var(--ink); padding: 8px 11px; border-radius: 11px; font-size: 13px; cursor: pointer; transition: transform 90ms; }
.chip:active { transform: scale(0.98); }
.chip b { color: var(--gold); font-weight: 700; margin-right: 4px; font-variant-numeric: tabular-nums; }
.chip span { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; }
.blanks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.blanks textarea { min-height: 60px; }
.filled { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.filled span { background: var(--green-soft); color: var(--green); padding: 2px 8px; border-radius: 99px; font-weight: 500; }
.prev textarea { width: 100%; min-height: 300px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--card); font: 14px/1.55 var(--font); resize: vertical; outline: none; }
.paper { white-space: pre-wrap; background: var(--card); border-radius: 12px; box-shadow: 0 0 0 1px var(--line); padding: 16px 18px; font-size: 14px; line-height: 1.55; max-height: 380px; overflow: auto; letter-spacing: -0.15px; }
.paper mark { background: var(--orange-soft); color: var(--orange); border-radius: 4px; padding: 0 3px; font-weight: 600; }
.lib-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.lib-top b { display: block; font-size: 15px; font-weight: 600; }
.lib-top span { font-size: 12.5px; }
.lib-g h4 { margin: 0; padding: 16px 20px 6px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; }
.lib-g .li .ic { font-size: 12px; font-variant-numeric: tabular-nums; }
@media (max-width: 860px) { .cmp, .blanks { grid-template-columns: 1fr; } }

/* =====================================================================
 * v3 polish — Apple HIG type, sliding segmented control, hero + tiles
 * HIG text styles used: Large Title 34/41 bold · Title 2 22/28 · Headline 15 semibold · Body 14 · Footnote 12.5
 * ===================================================================== */
:root { --shadow-card: 0 0 0 0.5px rgba(0,0,0,0.05), 0 1px 3px rgba(0,0,0,0.04); --r-card: 18px; }
:root[data-theme="dark"] { --shadow-card: 0 0 0 0.5px rgba(255,255,255,0.06); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --shadow-card: 0 0 0 0.5px rgba(255,255,255,0.06); } }
body { font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif; font-feature-settings: "kern"; }
.card, .kpi, .tile { box-shadow: var(--shadow-card); }
.top h1 { font-size: 20px; font-weight: 700; letter-spacing: -0.4px; }
.card-h h2, .card-h h3 { font-size: 15px; font-weight: 600; letter-spacing: -0.24px; }
.kpi .value { font-weight: 700; letter-spacing: -1px; }
.pill { font-weight: 600; letter-spacing: 0; }
a.pill { text-decoration: none; }
a.pill.mode:hover { filter: brightness(0.96); }

/* segmented control with a thumb that slides (spring-ish curve) */
.seg2 { position: relative; display: inline-grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); padding: 2px; border-radius: 9px; background: var(--fill-2); isolation: isolate; }
.seg2 .thumb { position: absolute; z-index: -1; top: 2px; bottom: 2px; left: 2px; width: calc((100% - 4px) / var(--n)); border-radius: 7px; background: var(--card);
  box-shadow: 0 3px 8px rgba(0,0,0,0.12), 0 0 0 0.5px rgba(0,0,0,0.04); transform: translateX(calc(var(--i) * 100%)); transition: transform 380ms cubic-bezier(0.25, 1.2, 0.4, 1); }
.seg2 button { border: 0; background: transparent; padding: 5px 14px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); cursor: pointer; white-space: nowrap; transition: color 200ms; }
.seg2 button.on { color: var(--ink); font-weight: 600; }
.seg2 button:active { opacity: 0.7; }

/* overview */
.hello2 { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 8px 0 20px; }
.hello2 .eyebrow { margin: 0 0 4px; font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: -0.08px; }
.hello2 h2 { margin: 0; font-size: 34px; line-height: 41px; font-weight: 700; letter-spacing: -0.9px; }
.hero2 { display: grid; grid-template-columns: minmax(200px, 260px) minmax(0, 1fr); gap: 28px; padding: 24px 24px 18px; align-items: stretch; }
.hero-n { display: flex; flex-direction: column; justify-content: center; gap: 6px; border-right: 1px solid var(--line); padding-right: 24px; }
.hero-n .lbl { font-size: 13px; font-weight: 600; color: var(--muted); }
.hero-n b { font-size: 64px; line-height: 1; font-weight: 700; letter-spacing: -3px; }
.hero-n .delta { font-size: 13px; }
.hero-n .muted { font-size: 13px; }
.hero-sub { margin-top: 8px; font-size: 13px; color: var(--ink-2); }
.hero-c { min-width: 0; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.tile { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; border: 0; cursor: pointer; background: var(--card); border-radius: var(--r-card); padding: 16px 18px; min-width: 0;
  transition: transform 220ms var(--spring), box-shadow 220ms; color: var(--ink); }
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-card), 0 10px 26px rgba(0,0,0,0.07); }
.tile:active { transform: scale(0.985); transition-duration: 90ms; }
.tile .t-ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--fill); color: var(--muted); margin-bottom: 6px; }
.tile .t-ic svg { width: 16px; height: 16px; }
.tile .t-ic.green { background: var(--green-soft); color: var(--green); } .tile .t-ic.gold { background: var(--gold-soft); color: var(--gold); } .tile .t-ic.blue { background: var(--blue-soft); color: var(--blue); }
.tile .t-l { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.tile b { font-size: 26px; font-weight: 700; letter-spacing: -0.8px; font-variant-numeric: tabular-nums; line-height: 1.15; min-height: 30px; width: 100%; }
.tile b.sm { font-size: 17px; letter-spacing: -0.3px; line-height: 30px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .t-f { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.li .btn.sm { flex: none; pointer-events: none; }
.li .ic.gold { font-size: 11.5px; font-variant-numeric: tabular-nums; }
.card-h .live-dot i { width: 7px; height: 7px; }

/* charts: today vs yesterday */
.chart rect.ghost { fill: var(--fill-2); }
.chart rect.bar { fill: var(--gold); }
.chart rect.fut { fill: var(--gold); opacity: 0.25; }
.chart line.now { stroke: var(--blue); stroke-width: 1.5; stroke-dasharray: 3 3; }
.chart circle.now-dot { fill: var(--blue); }

/* payments header */
.pay-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 4px 0 14px; }

/* booking hours */
.avail { display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }
.av-b { gap: 8px; }
.av-b select { width: 140px; padding: 7px 10px; }
.av-b input { width: 120px; padding: 7px 10px; }
.sub-search { width: min(260px, 40vw); background: var(--card); box-shadow: var(--shadow-card); }

@media (max-width: 1180px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .hero2 { grid-template-columns: 1fr; gap: 16px; }
  .hero-n { border-right: 0; padding-right: 0; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
  .hero-n b { font-size: 52px; }
  .hello2 h2 { font-size: 28px; line-height: 34px; }
  .sub-search { width: 100%; display: flex !important; order: 5; }
}

.person .nm-auto { font-size: 13px; font-weight: 600; white-space: nowrap; max-width: 110px; overflow: hidden; text-overflow: ellipsis; }

/* leads: around you */
.around-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 4px 0 14px; }
.around-h h2 { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -0.6px; }
.around-h p { margin: 2px 0 0; font-size: 13px; }
.around { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 12px; }
.around-list { max-height: 560px; overflow-y: auto; }
.around-map { height: 560px; }
.ar { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-top: 1px solid var(--line); transition: background 160ms; }
.ar:first-child { border-top: 0; }
.ar-b { flex: 1; min-width: 0; cursor: pointer; }
.ar-b b { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ar-b span { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ar.p-no .ar-b b { color: var(--muted); }
.tri { display: inline-flex; flex: none; padding: 2px; gap: 2px; border-radius: 10px; background: var(--fill-2); }
.tri button { border: 0; background: transparent; padding: 6px 11px; border-radius: 8px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; transition: background 160ms, color 160ms, transform 90ms; }
.tri button:active { transform: scale(0.94); }
.tri button.on.yes { background: var(--green); color: #fff; }
.tri button.on.maybe { background: var(--gold); color: #fff; }
.tri button.on.no { background: var(--ink-2); color: var(--bg); }
.pin.cust { background: #1d1d1f; } .pin.faded { opacity: 0.45; }
/* delete business */
.danger-zone { box-shadow: var(--shadow-card), inset 0 0 0 1px var(--red-soft); }
.btn.danger-solid { background: var(--red); color: #fff; }
.btn.danger-solid:hover { background: color-mix(in srgb, var(--red) 88%, #000); }
.del-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.del-list div { background: var(--red-soft); border-radius: 12px; padding: 12px; }
.del-list b { display: block; font-size: 22px; font-weight: 700; letter-spacing: -0.5px; color: var(--red); font-variant-numeric: tabular-nums; }
.del-list span { font-size: 12px; color: var(--ink-2); }
.steps { padding-left: 20px; line-height: 1.6; font-size: 14px; } .steps li { margin-bottom: 8px; }
.steps code { font: 12.5px var(--mono); background: var(--fill); padding: 2px 6px; border-radius: 6px; }
@media (max-width: 860px) { .around { grid-template-columns: 1fr; } .around-map { height: 320px; } .around-list { max-height: none; } }
.ar-b .pill, .lead .lf .pill { display: inline-flex; width: auto; }

/* =====================================================================
 * v4 colour — neon accents (Apple's system colours, turned up)
 * ===================================================================== */
:root { --n-blue: #0A84FF; --n-cyan: #32D3FF; --n-orange: #FF9F0A; --n-pink: #FF2D78; --n-green: #30D158; --n-violet: #BF5AF2; --n-red: #FF453A; --n-yellow: #FFD60A; --n-indigo: #5E5CE6;
  --violet: #9b3fd6; --violet-soft: rgba(191, 90, 242, 0.14); }
.pill.violet { background: var(--violet-soft); color: var(--violet); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --violet: #d38bff; } }
:root[data-theme="dark"] { --violet: #d38bff; }
/* sidebar: each section has its own coloured icon tile, like iPhone Settings */
.nv { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; flex: none; color: #fff; box-shadow: inset 0 0 0 0.5px rgba(255,255,255,0.25), 0 2px 6px rgba(0,0,0,0.12); }
.nav button .nv svg { width: 15px; height: 15px; color: #fff !important; }
.nv-overview { background: linear-gradient(140deg, #32D3FF, #0A84FF); }
.nv-mail { background: linear-gradient(140deg, #64D2FF, #5E5CE6); }
.nv-cafes { background: linear-gradient(140deg, #FFB340, #FF7A00); }
.nv-taps { background: linear-gradient(140deg, #FF6FA5, #FF2D78); }
.nv-payments { background: linear-gradient(140deg, #4CE07A, #00B65E); }
.nv-leads { background: linear-gradient(140deg, #D68BFF, #8E44EC); }
.nv-meetings { background: linear-gradient(140deg, #FF7A6E, #FF3B30); }
.nav button.on { box-shadow: 0 0 0 1px var(--line), 0 6px 18px rgba(10,132,255,0.12); }
/* greeting: your name in a warm gradient */
.grad { background: linear-gradient(90deg, #FF9F0A, #FF2D78 55%, #BF5AF2); -webkit-background-clip: text; background-clip: text; color: transparent; }
/* hero card: soft colour glow behind it */
.hero2 { position: relative; overflow: hidden; isolation: isolate; }
.hero2::before { content: ""; position: absolute; z-index: -1; inset: -40% -10% auto auto; width: 70%; height: 180%;
  background: radial-gradient(closest-side, rgba(255,45,120,0.10), transparent 70%), radial-gradient(closest-side at 70% 60%, rgba(255,159,10,0.12), transparent 70%); pointer-events: none; }
.hero-n b { background: linear-gradient(180deg, var(--ink) 30%, color-mix(in srgb, var(--ink) 55%, #FF2D78)); -webkit-background-clip: text; background-clip: text; color: transparent; }
/* tiles: vivid icon tiles */
.tile .t-ic { color: #fff !important; }
.tile .t-ic.green { background: linear-gradient(140deg, #4CE07A, #00B65E); } .tile .t-ic.gold { background: linear-gradient(140deg, #FFB340, #FF7A00); }
.tile .t-ic.blue { background: linear-gradient(140deg, #64D2FF, #0A84FF); } .tile .t-ic:not(.green):not(.gold):not(.blue) { background: linear-gradient(140deg, #FF7A6E, #FF3B30); }
.tile:hover { box-shadow: var(--shadow-card), 0 12px 30px rgba(255,45,120,0.10); }
/* list icons */
.li .ic.av { font-size: 12px; text-shadow: 0 1px 1px rgba(0,0,0,0.15); }
.li .ic.violet { background: var(--violet-soft); color: var(--violet); }
.li .ic.gold { background: linear-gradient(140deg, rgba(255,159,10,0.22), rgba(255,45,120,0.18)); color: #e0640a; }
/* charts: legend dot matches the gradient */
.legend i[style*="--gold"] { background: linear-gradient(180deg, #FF2D78, #FF9F0A) !important; }
.chart rect.bar { fill: url(#gWarm); }
.chart rect.fut { fill: url(#gWarm); opacity: 0.22; }
.chart line.now { stroke: var(--n-blue); }
.bar-row .tr i { background: linear-gradient(90deg, #FF9F0A, #FF2D78); }
.kpi .value { background: linear-gradient(180deg, var(--ink) 40%, color-mix(in srgb, var(--ink) 60%, #5E5CE6)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.seg2 button.on { color: var(--ink); }
.btn.primary { background: linear-gradient(180deg, #2e95ff, #0071e3); box-shadow: 0 4px 14px rgba(0,113,227,0.28); }
.badge { background: linear-gradient(140deg, #FF6FA5, #FF2D78) !important; }
/* dark mode: let the neon glow */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .chart g.bars { filter: drop-shadow(0 0 6px rgba(255,45,120,0.35)); }
  :root:not([data-theme="light"]) .hero2::before { background: radial-gradient(closest-side, rgba(255,45,120,0.22), transparent 70%), radial-gradient(closest-side at 70% 60%, rgba(255,159,10,0.18), transparent 70%); }
  :root:not([data-theme="light"]) .tile:hover { box-shadow: 0 0 0 0.5px rgba(255,255,255,0.08), 0 0 28px rgba(191,90,242,0.18); }
}
:root[data-theme="dark"] .chart g.bars { filter: drop-shadow(0 0 6px rgba(255,45,120,0.35)); }
/* message editor */
.sheet.wide-md { width: min(760px, calc(100vw - 32px)); }
.chips-row { display: flex; flex-wrap: wrap; gap: 6px; }
.blank-chip { border: 0; border-radius: 8px; padding: 5px 9px; font: 600 12px var(--mono); background: var(--orange-soft); color: var(--orange); cursor: pointer; }
.blank-chip:active { transform: scale(0.96); }
.edit-btn { font-size: 15px; width: 30px; height: 30px; }
.lib .li .end.row { gap: 6px; align-items: center; }
.check.switch input { accent-color: var(--n-green); width: 19px; height: 19px; }
.pv-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13px; }
.pv-bar span { flex: 1; text-align: center; }
.pv-bar .icon-btn[disabled] { opacity: 0.3; pointer-events: none; }
@media (max-width: 860px) { .nav button .nv { width: 24px; height: 24px; } }
