/* =====================================================================
   Bookey CRM — design system
   Bookey's layout language (warm cream, Manrope, soft 22px cards,
   arch motifs) in Bookey colours: plum ink, berry, rose, butter.
   ===================================================================== */

@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(/fonts/manrope-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;
}
@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(/fonts/manrope-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;
}

:root {
  /* Bookey palette on warm cream */
  --ink: #3b1b3f;
  --ink-hover: #4c2a51;
  --brand: #a23b52;
  --brand-hover: #8a3045;
  --brand-2: #e6a4b1;
  --tint: #f7d8dd;
  --tint-soft: #fcf0f2;
  --butter: #f4d58d;
  --butter-soft: #fbf0d2;
  --bg: #fcf9f5;
  --wash: #f5f0ea;
  --wash-2: #ece6de;
  --cream: #f6ebd6;
  --white: #ffffff;
  --muted: #746873;
  --faint: #a1949f;
  --line: #e9dfe1;
  --line-strong: #d6d0c9;
  --on-ink-muted: #cdb9cf;
  --on-ink-faint: #9c839f;
  --on-ink-line: #573a5b;
  --sage: #1e8a4c;
  --sage-soft: #e4f6ec;
  --amber: #9a6208;
  --danger: #d43b4f;
  --danger-hover: #b93043;
  --danger-soft: #fde7ea;
  --hot: #d9541e;
  --hot-soft: #fdece4;

  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r-btn: 13px;
  --r-card: 22px;
  --r-img: 28px;
  --shadow-sm: 0 1px 2px rgba(59, 27, 63, 0.04);
  --shadow-card: 0 1px 2px rgba(59, 27, 63, 0.03), 0 10px 30px -14px rgba(59, 27, 63, 0.14);
  --shadow-lift: 0 2px 4px rgba(59, 27, 63, 0.04), 0 18px 40px -16px rgba(59, 27, 63, 0.24);
  --shadow-pop: 0 8px 28px rgba(59, 27, 63, 0.12), 0 30px 60px -20px rgba(59, 27, 63, 0.3);
  --sidebar-w: 264px;

  /* Legacy token names still referenced by a few inline styles */
  --text: var(--ink);
  --text-muted: var(--muted);
  --text-faint: var(--faint);
  --surface: var(--white);
  --surface-2: var(--wash);
  --border: var(--line);
  --border-strong: var(--line-strong);
  --primary: var(--brand);
  --primary-tint: var(--tint-soft);
  --success: var(--sage);
  --success-tint: var(--sage-soft);
  --warning: var(--amber);
  --warning-tint: var(--butter-soft);
  --critical: var(--danger);
  --critical-tint: var(--danger-soft);

  color-scheme: light;
}

/* ===== reset ===== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: clip; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; letter-spacing: -0.03em; line-height: 1.08; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; color: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
::selection { background: var(--tint); color: var(--ink); }
.num, .t-mono { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

.icon {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}
.mark { display: block; flex: none; }
.scribble {
  background: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 14' preserveAspectRatio='none'%3E%3Cpath d='M3 9C30 3 62 12 100 7S168 4 197 8' fill='none' stroke='%23E6A4B1' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E")
    no-repeat 0 100% / 100% 0.22em;
  padding-bottom: 0.12em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.spark { position: absolute; pointer-events: none; fill: currentColor; }

/* ===== app shell ===== */
.app-shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  position: sticky; top: 0; height: 100vh;
  background: var(--ink); color: var(--on-ink-muted);
  display: flex; flex-direction: column;
  padding: 22px 14px 16px;
  overflow-y: auto; scrollbar-width: none;
  z-index: 40;
}
.sidebar::-webkit-scrollbar { display: none; }
.sb-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 2px 10px 18px;
  color: var(--white);
  font-weight: 800; font-style: italic; font-size: 23px; letter-spacing: -0.02em;
}
.sb-logo .wordmark { font-style: normal; text-transform: lowercase; letter-spacing: -0.045em; }
.sb-logo .mark { margin: -4px -2px -4px -6px; }
.sb-logo small { font-size: 12px; font-weight: 600; font-style: normal; letter-spacing: 0; color: var(--on-ink-faint); margin-left: auto; }

.sb-group { margin-top: 18px; }
.sb-group-label {
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--on-ink-faint); padding: 0 12px 8px;
}
.sb-nav { display: flex; flex-direction: column; gap: 2px; }
.sb-nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 12px;
  font-weight: 600; font-size: 15px; color: var(--on-ink-muted);
  transition: background 0.15s ease, color 0.15s ease;
}
.sb-nav a .icon { width: 20px; height: 20px; opacity: 0.9; }
.sb-nav a:hover { background: rgba(255, 255, 255, 0.07); color: var(--white); }
.sb-nav a.active { background: var(--tint); color: var(--ink); }
.sb-nav a.active .icon { color: var(--brand); opacity: 1; }
.sb-nav a.active { box-shadow: inset 3px 0 0 var(--butter); }

.sb-foot { margin-top: auto; padding-top: 18px; }
.sb-user {
  display: flex; align-items: center; gap: 11px;
  padding: 10px; border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--on-ink-line);
  transition: background 0.15s ease;
}
.sb-user:hover { background: rgba(255, 255, 255, 0.1); }
.sb-user .av {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--butter); color: var(--ink);
  display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none;
}
.sb-user .who { min-width: 0; flex: 1; }
.sb-user .who b { display: block; color: var(--white); font-size: 14.5px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user .who small { display: block; color: var(--on-ink-faint); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user .icon { color: var(--on-ink-faint); width: 18px; height: 18px; }

/* global search lives in the sidebar */
.global-search { position: relative; margin: 0 2px; }
.global-search .gs-ic { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--on-ink-faint); pointer-events: none; display: flex; }
.global-search .gs-ic .icon { width: 18px; height: 18px; }
.global-search input {
  width: 100%; padding: 11px 44px 11px 40px;
  border: 1px solid var(--on-ink-line); border-radius: 13px;
  background: rgba(255, 255, 255, 0.06); color: var(--white);
  font-size: 14px; font-weight: 500;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.global-search input::placeholder { color: var(--on-ink-faint); }
.global-search input:focus { outline: none; border-color: var(--brand-2); background: rgba(255, 255, 255, 0.1); box-shadow: none; }
.global-search kbd {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font: 600 11.5px/1 var(--font); color: var(--on-ink-faint);
  border: 1px solid var(--on-ink-line); border-radius: 7px; padding: 4px 6px; pointer-events: none;
}
.gs-results {
  position: absolute; top: calc(100% + 8px); left: 0; width: 340px;
  background: var(--white); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow-pop); overflow: hidden; z-index: 60; padding: 6px;
}
.gs-empty { padding: 14px 14px; font-size: 14px; color: var(--muted); }
.gs-row {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 10px 10px; background: transparent; border: none; border-radius: 12px;
  cursor: pointer; text-align: left; font-family: inherit;
}
.gs-row:hover { background: var(--tint-soft); }
.gs-row .gs-av { width: 34px; height: 34px; border-radius: 10px; background: var(--tint); color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.gs-row .gs-txt { min-width: 0; }
.gs-company { display: block; font-size: 14.5px; font-weight: 700; color: var(--ink); line-height: 1.3; }
.gs-name { display: block; font-size: 12.5px; color: var(--muted); }

/* mobile top bar + drawer */
.mobile-bar { display: none; }
.sb-scrim { display: none; }
.sb-close { display: none; }

.app-main {
  min-width: 0; width: 100%; max-width: 1400px;
  padding: 40px clamp(20px, 3.6vw, 56px) 96px;
}

@media (max-width: 960px) {
  .app-shell { grid-template-columns: minmax(0, 1fr); }
  .mobile-bar {
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 30;
    height: 64px; padding: 0 16px;
    background: rgba(252, 249, 245, 0.88);
    backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
    border-bottom: 1px solid var(--line);
  }
  .mobile-bar .sb-logo { color: var(--ink); padding: 0; font-size: 21px; }
  .mobile-bar .menu-btn {
    width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--white);
    display: grid; place-items: center; cursor: pointer; color: var(--ink);
  }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); height: auto;
    transform: translateX(-102%); transition: transform 0.25s ease;
    box-shadow: var(--shadow-pop);
  }
  .sidebar.open { transform: none; }
  .sb-close {
    display: grid; place-items: center; margin-left: auto;
    width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--on-ink-line);
    background: transparent; color: var(--white); cursor: pointer;
  }
  .sb-scrim {
    display: block; position: fixed; inset: 0; z-index: 35;
    background: rgba(59, 27, 63, 0.36); opacity: 0; pointer-events: none; transition: opacity 0.2s ease;
  }
  .sb-scrim.open { opacity: 1; pointer-events: auto; }
  .app-main { padding: 24px 16px 72px; }
  .panel, .flow-card, .progress-card { padding: 20px 18px; }
  .page-head { margin-bottom: 22px; }
  .page-head > div:first-child { flex: 1 1 100%; }
  .gs-results { width: 100%; }
}

/* ===== page scaffolding ===== */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-bottom: 30px; flex-wrap: wrap; }
.page-head > div:first-child { min-width: 0; }
.page-head h1 { font-weight: 700; font-size: clamp(30px, 3.1vw, 42px); }
.page-head .sub { font-size: 15.5px; color: var(--muted); margin-top: 10px; max-width: 62ch; }
.page-head .row { flex-wrap: wrap; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand); margin-bottom: 12px; }
.crumb { font-size: 14px; color: var(--muted); margin-bottom: 18px; display: flex; align-items: center; gap: 8px; }
.crumb a { color: var(--muted); font-weight: 600; border-bottom: 1.5px solid var(--brand-2); padding-bottom: 1px; transition: border-color 0.15s ease, color 0.15s ease; }
.crumb a:hover { color: var(--ink); border-color: var(--brand); }

.section-label {
  font-weight: 700; font-size: 19px; letter-spacing: -0.015em; color: var(--ink);
  margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.section-label .count, .section-label span.count { font-size: 13.5px; font-weight: 600; letter-spacing: 0; color: var(--muted); }
.panel-title {
  font-weight: 700; font-size: 18px; letter-spacing: -0.015em; color: var(--ink);
  margin-bottom: 16px; display: flex; align-items: center; gap: 10px;
}

.loading-screen {
  min-height: 50vh; display: flex; align-items: center; justify-content: center; gap: 12px;
  color: var(--muted); font-size: 15px; font-weight: 600;
}
.loading-screen::before {
  content: ""; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--tint); border-top-color: var(--brand);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13.5px; }
.empty-line { font-size: 14.5px; color: var(--muted); padding: 6px 0; }

/* ===== cards ===== */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
}
a.card { color: inherit; display: block; transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease; }
a.card:hover { box-shadow: var(--shadow-lift); transform: translateY(-2px); border-color: var(--brand-2); }
.panel { padding: 26px; }
.panel + .panel { margin-top: 0; }
.divider { margin: 20px 0 18px; border: 0; border-top: 1px solid var(--line); }

/* icon tiles (Bookey "ci") */
.tile, .kpi-card .ic {
  width: 44px; height: 44px; border-radius: 14px; flex: none;
  display: grid; place-items: center;
  background: var(--tint); color: var(--brand);
  font-weight: 700; font-size: 18px;
}
.tile .icon, .kpi-card .ic .icon { width: 21px; height: 21px; }
.tile.ink, .kpi-card .ic.coral { background: var(--ink); color: var(--butter); }
.tile.butter, .kpi-card .ic.gold { background: var(--butter); color: var(--ink); }
.tile.sage, .kpi-card .ic.green { background: var(--sage-soft); color: var(--sage); }
.tile.brand { background: var(--brand); color: var(--white); }
.tile.wash { background: var(--wash); color: var(--muted); }
.tile.sm { width: 34px; height: 34px; border-radius: 11px; }
.tile.sm .icon { width: 17px; height: 17px; }

.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px; margin-bottom: 28px; }
.kpi-row.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1240px) { .kpi-row.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi-card { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; padding: 22px 22px 22px; position: relative; overflow: hidden; }
.kpi-card .lbl { font-size: 14px; color: var(--muted); font-weight: 600; }
.kpi-card .val { font-weight: 700; font-size: 27px; letter-spacing: -0.025em; line-height: 1.15; margin-top: 4px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi-card .val small { font-size: 15px; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.kpi-card.feature { background: var(--brand); border-color: var(--brand); color: var(--white); }
.kpi-card.feature .lbl { color: #f7d8dd; }
.kpi-card.feature .ic { background: rgba(255, 255, 255, 0.14); color: var(--butter); }

@media (max-width: 600px) {
  .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .kpi-card { padding: 16px; gap: 14px; }
  .kpi-card .val { font-size: 21px; }
  .kpi-card .lbl { font-size: 13px; }
}

/* ===== buttons ===== */
.btn {
  font: 600 15px/1 var(--font);
  padding: 13px 20px; border-radius: var(--r-btn); border: 1px solid transparent;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease, opacity 0.15s ease;
  white-space: nowrap; text-decoration: none; color: var(--ink); background: transparent;
}
.btn .icon { width: 18px; height: 18px; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: var(--white); }
.btn-primary:hover:not(:disabled) { background: var(--brand-hover); }
.btn-accent { background: var(--ink); color: var(--white); }
.btn-accent:hover:not(:disabled) { background: var(--ink-hover); }
.btn-light { background: var(--brand-2); color: var(--ink); }
.btn-light:hover:not(:disabled) { background: var(--tint); }
.btn-outline { background: var(--white); color: var(--ink); border-color: var(--line-strong); }
.btn-outline:hover:not(:disabled) { border-color: var(--brand-2); background: var(--tint-soft); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover:not(:disabled) { background: var(--wash); color: var(--ink); }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-danger:hover:not(:disabled) { background: var(--danger-hover); }
.btn-danger-ghost { background: transparent; color: var(--danger); }
.btn-danger-ghost:hover:not(:disabled) { background: var(--danger-soft); }
.btn-success { background: var(--sage-soft); color: var(--sage); }
.btn-success:hover:not(:disabled) { background: #d2eedd; }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 13px; font-size: 13.5px; border-radius: 11px; gap: 6px; }
.btn-sm .icon { width: 16px; height: 16px; }
.btn-icon { padding: 0; width: 38px; height: 38px; border-radius: 11px; }
.btn-icon.btn-sm { width: 32px; height: 32px; border-radius: 10px; }
.link {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; border-bottom: 1.5px solid var(--brand-2); padding-bottom: 2px; white-space: nowrap;
  transition: border-color 0.2s ease; color: var(--ink); background: none; border-top: 0; border-left: 0; border-right: 0; cursor: pointer; font-size: inherit;
}
.link:hover { border-bottom-color: var(--brand); }
.link .icon { width: 16px; height: 16px; }

/* ===== chips / pills ===== */
.chip, .pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; line-height: 1.2;
  padding: 5px 11px; border-radius: 99px; white-space: nowrap;
  background: var(--tint); color: var(--brand);
}
.pill .icon, .chip .icon { width: 14px; height: 14px; stroke-width: 2.1; }
.chip .dot, .pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.pill-neutral { background: var(--bg); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.pill-good { background: var(--sage-soft); color: var(--sage); }
.pill-warn { background: var(--butter-soft); color: var(--amber); }
.pill-bad { background: var(--danger-soft); color: var(--danger); }
.pill-cobalt { background: var(--tint); color: var(--brand); }
.pill-coral { background: var(--brand-2); color: var(--ink); }
.pill-ink { background: var(--ink); color: var(--butter); }
button.pill { border: 0; cursor: pointer; font-family: inherit; }

.stage-chip-0 { background: var(--white); color: var(--brand); box-shadow: inset 0 0 0 1.5px var(--brand-2); }
.stage-chip-1, .stage-chip-2 { background: var(--tint); color: var(--ink); }
.stage-chip-3, .stage-chip-4 { background: var(--brand-2); color: var(--ink); }
.stage-chip-won { background: var(--ink); color: var(--butter); }
.stage-chip-lost { background: var(--danger-soft); color: var(--danger); }

/* ===== forms ===== */
.field { display: flex; flex-direction: column; gap: 7px; width: 100%; min-width: 0; }
.field label, .label { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-stack { display: flex; flex-direction: column; gap: 14px; }
input, select, textarea {
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-btn);
  background: var(--white);
  color: var(--ink);
  width: 100%;
  font-size: 15px;
  min-height: 46px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
input:hover:not(:disabled):not(:focus), select:hover:not(:disabled):not(:focus), textarea:hover:not(:disabled):not(:focus) { border-color: var(--brand-2); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(162, 59, 82, 0.2); }
input:disabled, select:disabled { background: var(--wash); color: var(--faint); cursor: not-allowed; }
input::placeholder, textarea::placeholder { color: var(--faint); }
select {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  padding-right: 40px;
  background: var(--white) url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5' fill='none' stroke='%23746873' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center / 18px;
}
input[type="checkbox"], input[type="radio"] {
  width: 19px; height: 19px; min-height: 0; padding: 0; accent-color: var(--brand); cursor: pointer; box-shadow: none;
}
input[type="date"] { min-height: 46px; }
.input-icon { position: relative; }
.input-icon .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); width: 18px; height: 18px; pointer-events: none; }
.input-icon input { padding-left: 42px; }
.pin-input { text-align: center; letter-spacing: 0.4em; font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.form-error {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; color: var(--danger);
  background: var(--danger-soft); border: 1px solid #f6c4cb;
  padding: 11px 14px; border-radius: var(--r-btn);
}
.hint { font-size: 15px; color: var(--muted); margin: 8px 0 22px; }
.field-note { font-size: 13px; color: var(--muted); }
.field-note.ok { color: var(--sage); font-weight: 600; }
.field-note.bad { color: var(--danger); font-weight: 600; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 20px; }
.toolbar .search { flex: 1 1 260px; max-width: 440px; }

/* ===== segmented control / filter tabs ===== */
.tabs {
  display: inline-flex; flex-wrap: wrap; gap: 2px;
  background: var(--white); border: 1px solid var(--line);
  padding: 4px; border-radius: 14px;
}
.tabs button {
  border: none; background: transparent; padding: 8px 14px; border-radius: 10px;
  font: 600 13.5px/1.2 var(--font); color: var(--muted); cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
  transition: background 0.15s ease, color 0.15s ease;
}
.tabs button .icon { width: 15px; height: 15px; }
.tabs button:hover:not(.active) { color: var(--ink); background: var(--wash); }
.tabs button.active { background: var(--brand); color: var(--white); }
.tabs button:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===== auth ===== */
.auth-wrap {
  min-height: 100vh; background: var(--bg);
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
}
.auth-brand {
  position: relative; overflow: hidden;
  padding: 40px clamp(28px, 5vw, 72px);
  display: flex; flex-direction: column;
}
.auth-brand .sb-logo { color: var(--ink); padding: 0; }
.auth-brand h2 { font-size: clamp(40px, 4.6vw, 64px); font-weight: 700; margin-top: auto; }
.auth-brand p { margin-top: 20px; font-size: 18px; color: var(--muted); max-width: 26em; }
.auth-visual { position: relative; height: 330px; margin: 46px 0 auto; max-width: 520px; }
.auth-visual .arch {
  position: absolute; left: 28%; right: 0; top: 0; bottom: 0;
  border-radius: 999px 999px var(--r-img) var(--r-img);
  background:
    radial-gradient(circle at 70% 28%, rgba(244, 213, 141, 0.6), transparent 40%),
    linear-gradient(160deg, #f7d8dd 0%, #eab6c1 55%, #c9798b 100%);
}
.auth-visual .arch::after {
  content: ""; position: absolute; left: 18%; right: 18%; bottom: 0; height: 62%;
  border-radius: 999px 999px 0 0; background: rgba(255, 255, 255, 0.35);
}
.ui {
  position: absolute; background: var(--white); border: 1px solid var(--line);
  border-radius: 18px; box-shadow: 0 8px 28px rgba(59, 27, 63, 0.08);
}
.ui-chip { display: flex; align-items: center; gap: 12px; padding: 11px 18px 11px 11px; z-index: 2; }
.ui-chip b { display: block; font-size: 14px; line-height: 1.25; }
.ui-chip small { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.3; }
.ui-chip .tile { width: 38px; height: 38px; border-radius: 12px; }
.ui-chip .tile .icon { width: 19px; height: 19px; }
.ui-mini { left: 0; bottom: 6%; width: 62%; padding: 16px; z-index: 2; }
.ui-mini-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; font-size: 14px; }
.ui-mini-h small { color: var(--muted); font-size: 12.5px; }
.ui-mini-r { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 12px; background: var(--tint); margin-top: 7px; font-size: 13px; }
.ui-mini-r b { font-size: 13px; }
.ui-mini-r span { font-weight: 600; color: var(--brand); font-variant-numeric: tabular-nums; font-size: 12.5px; }
.ui-mini-r.on { background: var(--brand); color: var(--white); }
.ui-mini-r.on span { color: var(--butter); }

.auth-side { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 420px; padding: 36px 34px; }
.auth-card.wide { max-width: 480px; }
.auth-card h1 { font-weight: 700; font-size: 30px; margin-bottom: 4px; }
.auth-mark { display: none; }

.picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; margin: 6px 0 20px; }
.picker-btn {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 18px 10px 16px; border-radius: 18px;
  border: 1px solid var(--line); background: var(--white); cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.picker-btn:hover { border-color: var(--brand-2); transform: translateY(-1px); }
.picker-btn.active { border-color: var(--brand); background: var(--tint-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.picker-btn .av {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--tint); color: var(--brand);
  display: grid; place-items: center; font-weight: 700; font-size: 16px;
}
.picker-btn.active .av { background: var(--brand); color: var(--white); }
.picker-btn .nm { font-size: 14px; font-weight: 700; color: var(--ink); text-align: center; line-height: 1.25; }
.pin-step { margin-top: 4px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }

@media (max-width: 960px) {
  .auth-wrap { grid-template-columns: minmax(0, 1fr); }
  .auth-brand { padding: 28px 20px 0; }
  .auth-brand h2 { margin-top: 36px; font-size: 38px; }
  .auth-brand p { font-size: 16px; }
  .auth-visual { display: none; }
  .auth-side { padding: 28px 16px 48px; align-items: flex-start; }
  .auth-card { padding: 28px 22px; }
}

/* ===== kanban ===== */
.kanban { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 14px; align-items: flex-start; scroll-snap-type: x proximity; }
.kanban::-webkit-scrollbar { height: 10px; }
.kanban::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 99px; border: 3px solid var(--bg); }
.kcol { flex-shrink: 0; width: 296px; background: var(--wash); border-radius: var(--r-card); padding: 14px 10px 10px; scroll-snap-align: start; }
.khead { display: flex; align-items: center; gap: 11px; padding: 0 6px; margin-bottom: 4px; }
.k-arch {
  width: 30px; height: 36px; border-radius: 15px 15px 8px 8px; flex: none;
  display: grid; place-items: center;
}
.k-arch .icon { width: 15px; height: 15px; stroke-width: 2; }
.k-arch.s1 { background: var(--white); color: var(--brand); box-shadow: inset 0 0 0 1.5px var(--brand-2); }
.k-arch.s2 { background: var(--tint); color: var(--ink); }
.k-arch.s3 { background: var(--brand-2); color: var(--ink); }
.k-arch.s4 { background: var(--brand); color: var(--white); }
.k-arch.s5 { background: var(--ink); color: var(--butter); }
.k-arch.s6 { background: var(--wash-2); color: var(--muted); }
.k-title { flex: 1; min-width: 0; }
.kname { font-weight: 700; font-size: 15.5px; color: var(--ink); letter-spacing: -0.01em; display: block; }
.kname.stage-bad { color: var(--danger); }
.ktotal { font-size: 13px; color: var(--muted); white-space: nowrap; font-weight: 600; font-variant-numeric: tabular-nums; }
.khead .chip { background: var(--white); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); min-width: 30px; justify-content: center; }
.kbody {
  display: flex; flex-direction: column; gap: 10px; min-height: 80px; padding: 10px 2px 2px;
  border-radius: 16px; transition: background 0.15s ease, box-shadow 0.15s ease;
  max-height: calc(100vh - 260px); overflow-y: auto; scrollbar-width: thin;
}
.kbody.dropzone { background: var(--tint-soft); box-shadow: inset 0 0 0 1.5px var(--brand-2); }
.kcol-empty { font-size: 13.5px; color: var(--brand); font-weight: 600; text-align: center; padding: 22px 8px; border: 1.5px dashed var(--brand-2); border-radius: 14px; }

.deal-card {
  padding: 15px 16px 14px; border-radius: 16px; cursor: grab; touch-action: none; user-select: none;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease, opacity 0.15s ease;
}
.deal-card:hover { box-shadow: var(--shadow-lift); transform: translateY(-2px); border-color: var(--brand-2); }
.deal-card:active { cursor: grabbing; }
.deal-card.dragging { opacity: 0.45; transform: rotate(1.5deg); }
.deal-card .co { font-size: 15px; font-weight: 700; color: var(--ink); display: block; line-height: 1.3; letter-spacing: -0.01em; }
.deal-card .contact { font-size: 13px; color: var(--muted); margin: 2px 0 12px; }
.deal-card .value { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.deal-card .sub { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin-bottom: 12px; font-weight: 600; }
.deal-card .sub .icon { width: 14px; height: 14px; }
.deal-card .sub.overdue { color: var(--danger); }
.deal-card .foot { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--line); }
.avatars { display: flex; }
.avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--tint); color: var(--brand);
  font-size: 11.5px; font-weight: 700;
  display: grid; place-items: center; flex: none;
  border: 2px solid var(--white); margin-left: -8px;
}
.avatar:first-child { margin-left: 0; }
.avatar:nth-child(2) { background: var(--butter); color: var(--ink); }
.avatar:nth-child(3) { background: var(--brand-2); color: var(--ink); }
.probe { font-size: 12.5px; color: var(--muted); font-weight: 600; }

/* ===== leaderboard ===== */
.leader-list { display: flex; flex-direction: column; }
.leader-row {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; grid-template-rows: auto auto;
  align-items: center; column-gap: 12px; row-gap: 8px;
  padding: 14px 12px; border-radius: 16px;
  transition: background 0.15s ease;
}
.leader-row + .leader-row { border-top: 1px solid var(--line); }
.leader-row.me { background: var(--tint-soft); border-top-color: transparent; }
.leader-row.me + .leader-row { border-top-color: transparent; }
.leader-rank {
  grid-row: 1 / span 2; align-self: center;
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  font-size: 13px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums;
  background: var(--wash);
}
.leader-rank.top { background: var(--butter); color: var(--ink); }
.leader-name { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 10px; min-width: 0; }
.leader-name .avatar { width: 30px; height: 30px; border: 0; margin: 0; }
.leader-sub { font-size: 12.5px; color: var(--muted); margin-top: 1px; padding-left: 40px; }
.leader-row > div:nth-child(2) { grid-column: 2; grid-row: 1; min-width: 0; }
.leader-bar-track { grid-column: 2 / -1; grid-row: 2; height: 8px; background: var(--tint-soft); border-radius: 99px; overflow: hidden; }
.leader-bar-fill { height: 100%; background: var(--brand); border-radius: 99px; transition: width 0.5s ease; }
.leader-bar-fill.over { background: linear-gradient(90deg, var(--brand), var(--ink)); }
.leader-value { grid-column: 3; grid-row: 1; white-space: nowrap; font-size: 15px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }

/* ===== followups ===== */
.followup-list { display: flex; flex-direction: column; gap: 8px; }
.followup-item {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 16px 13px 13px; background: var(--white);
  border: 1px solid var(--line); border-radius: 16px;
  color: inherit;
  transition: box-shadow 0.15s ease, border-color 0.15s ease, background 0.3s ease;
}
a.followup-item:hover { border-color: var(--brand-2); box-shadow: var(--shadow-sm); }
.followup-item.overdue { background: var(--danger-soft); border-color: var(--danger-soft); }
.followup-item.overdue:hover { border-color: #f4b9c1; }
.followup-item.done { background: var(--sage-soft); border-color: var(--sage-soft); }
.followup-main { flex: 1; min-width: 0; }
.followup-name { font-size: 15px; font-weight: 700; line-height: 1.3; }
.followup-note { font-size: 13.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.followup-item.overdue .followup-note { color: #8c5a62; }
.followup-time { font-size: 12.5px; font-weight: 700; color: var(--muted); flex-shrink: 0; text-align: right; font-variant-numeric: tabular-nums; padding: 5px 10px; border-radius: 99px; }
.followup-time.overdue { color: var(--white); background: var(--danger); }
.followup-time.today { color: var(--ink); background: var(--butter); }
.followup-time.done { color: var(--sage); background: var(--white); }

.followup-check {
  width: 30px; height: 30px; border-radius: 10px; flex-shrink: 0;
  border: 1.5px solid var(--brand-2); background: var(--white);
  cursor: pointer; padding: 0;
  display: grid; place-items: center; color: transparent;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease, color 0.2s ease;
}
.followup-check .icon { width: 16px; height: 16px; stroke-width: 2.4; }
.followup-check:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.followup-check.done { background: var(--sage); border-color: var(--sage); color: var(--white); transform: scale(1.05); cursor: default; }

/* ===== empty states ===== */
.empty {
  border: 1.5px dashed var(--brand-2); border-radius: var(--r-card);
  background: rgba(255, 255, 255, 0.55);
  padding: 56px 26px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.empty .empty-icon {
  width: 64px; height: 76px; border-radius: 32px 32px 14px 14px; margin-bottom: 6px;
  background: var(--tint); color: var(--brand);
  display: grid; place-items: center; font-weight: 800; font-size: 20px;
}
.empty .empty-icon .icon { width: 26px; height: 26px; }
.empty h3 { font-size: 21px; font-weight: 700; }
.empty p { font-size: 15px; color: var(--muted); max-width: 46ch; margin: 0 0 4px; line-height: 1.55; }

/* ===== modal ===== */
.overlay {
  position: fixed; inset: 0; background: rgba(59, 27, 63, 0.34);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  z-index: 80; opacity: 0; pointer-events: none; transition: opacity 0.15s ease;
}
.overlay.active { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--white); border-radius: 26px; box-shadow: var(--shadow-pop);
  padding: 30px 30px 26px; width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto;
  border: 1px solid var(--line);
  animation: modal-in 0.18s ease;
}
@keyframes modal-in { from { transform: translateY(10px) scale(0.99); opacity: 0; } to { transform: none; opacity: 1; } }
.modal h3 { font-weight: 700; font-size: 25px; letter-spacing: -0.025em; margin-bottom: 6px; }
.modal .modal-sub { font-size: 14.5px; color: var(--muted); margin: 0 0 20px; }
.modal .field { margin-bottom: 14px; }
.modal .field-row { margin-bottom: 0; }
.modal .field-row .field { margin-bottom: 14px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
@media (max-width: 600px) {
  .overlay { align-items: flex-end; padding: 0; }
  .modal { border-radius: 24px 24px 0 0; max-height: 92vh; padding: 24px 18px 20px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
}

/* ===== toast ===== */
.toast-error {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px;
  background: var(--danger); color: var(--white); font-size: 14.5px; font-weight: 600;
  padding: 13px 20px; border-radius: 14px; box-shadow: var(--shadow-pop); z-index: 90;
  animation: modal-in 0.2s ease;
}

/* ===== stepper (onboarding) — Bookey "flow" arches ===== */
.progress-card { padding: 26px 28px 28px; margin-bottom: 20px; }
.ptop { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 24px; gap: 12px; }
.ptop h3 { font-size: 19px; font-weight: 700; letter-spacing: -0.015em; }
.ptop .pct { font-size: 14px; color: var(--muted); font-weight: 600; }
.stepper { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.step { position: relative; text-align: left; }
.step .connector { position: absolute; top: 32px; left: -50%; right: 50%; border-top: 1.5px dashed var(--brand-2); z-index: 0; display: none; }
.step:not(:last-child)::after { content: ""; position: absolute; top: 32px; left: 66px; right: 12px; border-top: 1.5px dashed var(--brand-2); }
.step.done:not(:last-child)::after { border-top-style: solid; border-color: var(--ink); }
.step .dot {
  width: 54px; height: 64px; border-radius: 27px 27px 13px 13px; position: relative; z-index: 1;
  border: 0; background: var(--white); color: var(--brand); box-shadow: inset 0 0 0 1.5px var(--brand-2);
  font: 700 17px/1 var(--font); cursor: pointer; margin-bottom: 14px;
  display: grid; place-items: center;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.step .dot:hover:not(:disabled) { transform: translateY(-2px); }
.step .dot .icon { width: 22px; height: 22px; stroke-width: 2.2; }
.step.done .dot { background: var(--ink); color: var(--butter); box-shadow: none; }
.step.current .dot { background: var(--brand-2); color: var(--ink); box-shadow: none; }
.step .label { font-size: 15.5px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; padding-right: 10px; }
.step .date { font-size: 13px; color: var(--muted); margin-top: 3px; }
@media (max-width: 700px) {
  .stepper { grid-auto-flow: row; gap: 14px; }
  .step { display: grid; grid-template-columns: 54px 1fr; column-gap: 14px; align-items: center; }
  .step .dot { grid-row: 1 / span 2; margin: 0; }
  .step:not(:last-child)::after { display: none; }
}

/* pipeline flow on the dashboard */
.flow-card { padding: 26px 28px 28px; margin-bottom: 24px; }
.flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 6px; }
.flow-step { position: relative; display: block; color: inherit; padding-right: 12px; }
.flow-step:not(:last-child)::after { content: ""; position: absolute; top: 38px; left: 80px; right: 14px; border-top: 1.5px dashed var(--brand-2); }
.flow-step .step-ic {
  width: 64px; height: 76px; border-radius: 32px 32px 14px 14px;
  display: grid; place-items: center; transition: transform 0.2s ease;
}
.flow-step:hover .step-ic { transform: translateY(-3px); }
.flow-step .step-ic .icon { width: 26px; height: 26px; }
.flow-step.s1 .step-ic { background: var(--white); box-shadow: inset 0 0 0 1.5px var(--brand-2); color: var(--brand); }
.flow-step.s2 .step-ic { background: var(--tint); color: var(--ink); }
.flow-step.s3 .step-ic { background: var(--brand-2); color: var(--ink); }
.flow-step.s5 .step-ic { background: var(--ink); color: var(--butter); }
.flow-step .step-txt { margin-top: 16px; }
.flow-step b { display: block; font-size: 17px; letter-spacing: -0.01em; line-height: 1.25; }
.flow-step .step-val { display: block; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.flow-step small { display: block; font-size: 13.5px; color: var(--muted); margin-top: 2px; }
@media (max-width: 760px) {
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; }
  .flow-step::after { display: none; }
  .flow-step .step-ic { width: 52px; height: 62px; }
  .flow-step .step-val { font-size: 18px; }
}

/* ===== reports ===== */
.bar-row { padding: 10px 0; }
.bar-row .top { display: flex; justify-content: space-between; gap: 12px; font-size: 14.5px; margin-bottom: 7px; }
.bar-row .top .nm { font-weight: 700; }
.bar-row .top .vl { color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.bar-track { height: 8px; border-radius: 99px; background: var(--tint-soft); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 99px; background: var(--brand); transition: width 0.5s ease; }
.report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 1000px) { .report-grid { grid-template-columns: 1fr; } }

.funnel-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 110px; align-items: center; gap: 16px; padding: 12px 0; }
.funnel-row + .funnel-row { border-top: 1px solid var(--line); }
.funnel-row .nm { font-weight: 700; font-size: 15px; }
.funnel-row .meta { text-align: right; font-size: 13.5px; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.funnel-row .meta b { color: var(--ink); font-size: 15px; margin-right: 6px; }
.funnel-track { height: 30px; border-radius: 10px; background: var(--wash); overflow: hidden; }
.funnel-fill { height: 100%; border-radius: 10px; transition: width 0.5s ease; }
.funnel-fill.s1 { background: var(--tint); box-shadow: inset 0 0 0 1.5px var(--brand-2); }
.funnel-fill.s2 { background: var(--tint); }
.funnel-fill.s3 { background: var(--brand-2); }
.funnel-fill.s5 { background: var(--brand); }
@media (max-width: 600px) {
  .funnel-row { grid-template-columns: 1fr auto; }
  .funnel-track { grid-column: 1 / -1; grid-row: 2; }
}

/* ===== misc layout ===== */
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: 1fr; } }
@media (max-width: 1000px) { .two-col { grid-template-columns: 1fr; } }
.sticky-col { position: sticky; top: 24px; }
@media (max-width: 900px) { .sticky-col { position: static; } }

dl.meta-list { display: grid; grid-template-columns: auto 1fr; gap: 0; font-size: 15px; margin: 0; }
dl.meta-list dt, dl.meta-list dd { padding: 11px 0; border-top: 1px solid var(--line); }
dl.meta-list dt:first-of-type, dl.meta-list dt:first-of-type + dd { border-top: 0; padding-top: 2px; }
dl.meta-list dt { color: var(--muted); padding-right: 24px; }
dl.meta-list dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }

.list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; }
.list-row + .list-row { border-top: 1px solid var(--line); }
.list-row .lr-main { min-width: 0; }
.list-row .lr-title { font-weight: 700; font-size: 15px; }
.list-row .lr-sub { font-size: 13px; color: var(--muted); }

/* ===== toggle switch ===== */
.toggle-switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; min-height: 0; }
.toggle-switch .track {
  position: absolute; inset: 0; background: var(--line-strong); border-radius: 999px;
  cursor: pointer; transition: background 0.15s ease;
}
.toggle-switch .track::before {
  content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px;
  background: var(--white); border-radius: 50%; transition: transform 0.18s ease;
  box-shadow: 0 1px 3px rgba(59, 27, 63, 0.25);
}
.toggle-switch input:checked + .track { background: var(--brand); }
.toggle-switch input:checked + .track::before { transform: translateX(18px); }
.toggle-switch input:focus-visible + .track { outline: 2px solid var(--brand); outline-offset: 2px; }
.toggle-switch input:disabled + .track { opacity: 0.5; cursor: not-allowed; }

/* ===== data table ===== */
.table-card { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left; font-size: 13px; font-weight: 600; white-space: nowrap;
  color: var(--muted); padding: 16px 20px 14px; border-bottom: 1px solid var(--line);
}
.data-table td { padding: 15px 20px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 15px; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: background 0.15s ease; }
.data-table tbody tr:hover { background: #fdf8f5; }
.data-table tr.clickable { cursor: pointer; }
.data-table tr.muted-row td { opacity: 0.5; }
.data-table .t-right { text-align: right; }
.data-table .t-nowrap { white-space: nowrap; }
.dt-main { font-weight: 700; display: flex; align-items: center; gap: 8px; line-height: 1.3; }
.dt-main .icon { width: 16px; height: 16px; }
a.dt-main:hover { color: var(--brand); }
.dt-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.dt-company { display: flex; align-items: center; gap: 12px; }
.dt-company .co-av {
  width: 38px; height: 38px; border-radius: 12px; flex: none;
  background: var(--tint); color: var(--brand); display: grid; place-items: center;
  font-weight: 700; font-size: 14px;
}
.temp-ic { display: inline-flex; width: 22px; height: 22px; border-radius: 7px; align-items: center; justify-content: center; }
.temp-ic .icon { width: 14px; height: 14px; stroke-width: 2.1; }
.temp-ic.hot { background: var(--hot-soft); color: var(--hot); }
.temp-ic.cold { background: #e3eef8; color: #2f6595; }

.pager { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 16px; font-size: 14px; color: var(--muted); font-weight: 600; }
.pager select { width: auto; min-height: 38px; padding: 7px 36px 7px 12px; font-size: 14px; }

/* ===== customers ===== */
.stack-list { display: flex; flex-direction: column; gap: 12px; }
.customer-row { display: block; }
.customer-row-foot { display: flex; align-items: flex-end; justify-content: space-between; margin-top: 18px; gap: 12px; flex-wrap: wrap; }
.cr-title { font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.cr-sub { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.cr-val-lbl { font-size: 12.5px; color: var(--muted); text-align: right; font-weight: 600; }
.cr-val { font-size: 18px; font-weight: 700; text-align: right; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.mini-stepper { display: flex; align-items: center; }
.mini-stepper .dot {
  width: 22px; height: 26px; border-radius: 11px 11px 6px 6px; flex-shrink: 0;
  background: var(--white); box-shadow: inset 0 0 0 1.5px var(--brand-2);
  display: grid; place-items: center; font-size: 11px; font-weight: 700; color: transparent;
}
.mini-stepper .dot.done { background: var(--ink); box-shadow: none; color: var(--butter); }
.mini-stepper .dot.done::after { content: "✓"; }
.mini-stepper .line { width: 34px; border-top: 1.5px dashed var(--brand-2); flex-shrink: 0; }
.mini-stepper .line.done { border-top-style: solid; border-color: var(--ink); }
.mini-stepper-label { font-size: 14px; color: var(--ink); font-weight: 600; margin-left: 12px; white-space: nowrap; }


/* ===== contact detail ===== */
.deal-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; flex-wrap: wrap; }
.deal-row + .deal-row { border-top: 1px solid var(--line); }
.deal-row .dr-val { font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; }
.activity { display: flex; gap: 14px; padding: 16px 0; }
.activity + .activity { border-top: 1px solid var(--line); }
.activity .tile { width: 38px; height: 38px; border-radius: 12px; }
.activity .tile .icon { width: 18px; height: 18px; }
.activity-body { flex: 1; min-width: 0; }
.activity-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.activity-head b { font-size: 14.5px; }
.activity-head span { font-size: 12.5px; color: var(--muted); font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.activity-text { font-size: 14.5px; color: var(--muted); margin-top: 3px; }
.activity .pill { margin-top: 8px; }
.type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.type-grid button {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 14px 8px; border-radius: 14px; border: 1px solid var(--line); background: var(--white);
  font: 600 13.5px/1.2 var(--font); color: var(--muted); cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.type-grid button .icon { width: 20px; height: 20px; }
.type-grid button:hover:not(.active) { border-color: var(--brand-2); color: var(--ink); }
.type-grid button.active { background: var(--brand); border-color: var(--brand); color: var(--white); }
.type-grid button.active .icon { color: var(--butter); }
.status-badge { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 12px; font-weight: 700; font-size: 14px; }
.status-badge.won { background: var(--ink); color: var(--butter); }
.status-badge.churned { background: var(--danger-soft); color: var(--danger); }
.status-badge .icon { width: 17px; height: 17px; }
