/* ==========================================================================
   蜀行租车 · 销售工作台
   A warmer, more editorial sales workspace for a Sichuan rental company.
   ========================================================================== */

:root {
  --bg: #f3f0e9;
  --bg-deep: #eae6dc;
  --surface: #fffefa;
  --surface-2: #fbf9f3;
  --surface-3: #f6f3eb;
  --ink: #171d23;
  --ink-2: #303840;
  --muted: #70766f;
  --muted-2: #9a9e96;
  --line: #e9e4d8;
  --line-strong: #ded8ca;
  --accent: #ed5a2a;
  --accent-strong: #d94a1e;
  --accent-soft: #fce9df;
  --accent-faint: #fff7f1;
  --jade: #2d7b61;
  --jade-soft: #e7f3ed;
  --blue: #2f659b;
  --blue-soft: #eaf1f8;
  --gold: #bb8431;
  --gold-soft: #f8efd9;
  --danger: #c94d38;
  --danger-soft: #fbe9e4;
  --shadow-card: 0 1px 1px rgba(33, 28, 18, 0.025), 0 14px 40px rgba(45, 37, 20, 0.045);
  --shadow-pop: 0 28px 80px rgba(29, 24, 14, 0.2), 0 3px 14px rgba(29, 24, 14, 0.08);
  --page-max: 1512px;
  --page-gutter: 36px;
  --topbar-h: 72px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-num: "SF Pro Display", "DIN Alternate", "Segoe UI", "PingFang SC", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--ink);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 7% 12%, rgba(237, 90, 42, 0.035), transparent 26rem),
    radial-gradient(circle at 93% 2%, rgba(47, 101, 155, 0.035), transparent 30rem),
    var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15.8px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-locked {
  overflow: hidden;
}

[hidden] {
  display: none !important;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

svg {
  display: block;
}

::selection {
  background: #ffd4c3;
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  z-index: 200;
  left: 20px;
  top: -80px;
  padding: 10px 16px;
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
  transition: top 160ms ease;
}

.skip-link:focus {
  top: 12px;
}

/* --------------------------------------------------------------------------
   Top bar
   -------------------------------------------------------------------------- */

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent),
    var(--ink);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

.topbar__inner {
  width: min(100%, var(--page-max));
  height: var(--topbar-h);
  margin: 0 auto;
  padding: 0 var(--page-gutter);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: max-content;
  justify-self: start;
}

.brand__mark {
  width: 29px;
  height: 29px;
  margin-right: 10px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.brand__mark svg {
  width: 20px;
  height: 20px;
}

.brand__name {
  font-size: 23.9px;
  line-height: 1;
  font-weight: 780;
  letter-spacing: -0.85px;
}

.brand__name b {
  color: #ff7447;
  font-weight: inherit;
}

.brand__tagline {
  margin-left: 8px;
  padding: 3px 6px;
  border: 1px solid rgba(237, 90, 42, 0.22);
  border-radius: 4px;
  background: rgba(237, 90, 42, 0.1);
  color: #ffa27e;
  font-size: 9.8px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.brand__divider {
  width: 1px;
  height: 15px;
  margin: 0 12px;
  background: rgba(255, 255, 255, 0.18);
}

.brand__company {
  color: rgba(255, 255, 255, 0.43);
  font-size: 11.8px;
  font-weight: 650;
  letter-spacing: 0.12em;
}

.sales-nav {
  display: flex;
  align-items: stretch;
  height: 100%;
  gap: 38px;
  justify-self: center;
}

.sales-nav__item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  height: 100%;
  color: rgba(255, 255, 255, 0.52);
  font-size: 15.8px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: color 160ms ease;
}

.sales-nav__item::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.sales-nav__item:hover {
  color: rgba(255, 255, 255, 0.86);
}

.sales-nav__item.is-active {
  color: #fff;
}

.sales-nav__item.is-active::after {
  transform: scaleX(1);
}

.sales-nav__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #80dfb7;
  box-shadow: 0 0 0 3px rgba(128, 223, 183, 0.1);
}

.account {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 13px;
}

.mode-link {
  color: rgba(255, 255, 255, 0.42);
  font-size: 12.4px;
  font-weight: 500;
  padding: 6px 8px;
  border-radius: 6px;
  transition: color 150ms ease, background 150ms ease;
}

.mode-link:hover {
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.05);
}

.account__divider {
  width: 1px;
  height: 17px;
  background: rgba(255, 255, 255, 0.12);
}

.account__profile {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 7px 5px 5px;
  border-radius: 10px;
  color: #fff;
  transition: background 150ms ease;
}

.account__profile:hover {
  background: rgba(255, 255, 255, 0.06);
}

.account__avatar {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: linear-gradient(135deg, #f0744a, #d94a1e);
  color: #fff;
  font-size: 12.4px;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.account__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}

.account__text b {
  font-size: 13.6px;
  font-weight: 650;
}

.account__text small {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 11.2px;
}

.account__chevron {
  color: rgba(255, 255, 255, 0.35);
}

.account__chevron svg {
  width: 11px;
  height: 11px;
}

.page {
  flex: 1;
  width: min(100%, var(--page-max));
  margin: 0 auto;
  padding: 28px var(--page-gutter) 50px;
}

.view {
  animation: page-in 320ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --------------------------------------------------------------------------
   Shared page head / buttons
   -------------------------------------------------------------------------- */

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin: 3px 0 23px;
}

.page-head__eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
  color: var(--muted-2);
  font-size: 11.9px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.page-head__eyebrow::before {
  content: "";
  width: 17px;
  height: 2px;
  border-radius: 1px;
  background: var(--accent);
}

.page-title {
  font-size: clamp(31px, 3vw, 42px);
  line-height: 1.12;
  font-weight: 790;
  letter-spacing: -1.7px;
}

.page-title em {
  color: var(--accent);
  font-style: normal;
  font-family: var(--font-num);
  letter-spacing: -1px;
}

.page-subtitle {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 14.1px;
}

.page-subtitle__divider {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #bcb7ab;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #2d7b61;
  font-size: 11.8px;
  font-weight: 600;
}

.live-badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #3a9c78;
  box-shadow: 0 0 0 3px rgba(58, 156, 120, 0.1);
}

.page-head__actions {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-bottom: 3px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 43px;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 14.1px;
  font-weight: 650;
  white-space: nowrap;
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease,
    box-shadow 150ms ease;
}

.button:active {
  transform: scale(0.985);
}

.button svg {
  width: 14px;
  height: 14px;
}

.button--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 5px 16px rgba(237, 90, 42, 0.22);
}

.button--primary:hover {
  background: var(--accent-strong);
  box-shadow: 0 7px 20px rgba(237, 90, 42, 0.28);
}

.button--ghost {
  border: 1px solid var(--line-strong);
  background: rgba(255, 254, 250, 0.72);
  color: #565e66;
}

.button--ghost:hover {
  background: var(--surface);
  border-color: #cfc8b9;
  color: var(--ink);
}

.button--dark {
  background: var(--ink);
  color: #fff;
}

.button--dark:hover {
  background: #2a323a;
}

.button--soft {
  background: var(--accent-soft);
  color: #ae421f;
}

.button--soft:hover {
  background: #f9ded1;
}

.button--small {
  height: 33px;
  padding: 0 11px;
  border-radius: 8px;
  font-size: 12.4px;
}

.button--small svg {
  width: 12px;
  height: 12px;
}

.text-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 12.4px;
  font-weight: 600;
  transition: color 150ms ease;
}

.text-action:hover {
  color: var(--ink);
}

.text-action svg {
  width: 12px;
  height: 12px;
}

/* --------------------------------------------------------------------------
   KPI
   -------------------------------------------------------------------------- */

.kpi-grid {
  display: grid;
  grid-template-columns: 1.08fr 1fr 1fr 1fr;
  gap: 15px;
  margin-bottom: 20px;
}

.kpi {
  position: relative;
  min-height: 152px;
  padding: 20px 21px 18px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.kpi--dark {
  border-color: transparent;
  background:
    radial-gradient(circle at 87% 10%, rgba(237, 90, 42, 0.16), transparent 15rem),
    linear-gradient(135deg, #1a2128 0%, #202830 62%, #252c33 100%);
  color: #fff;
}

.kpi__contour {
  position: absolute;
  right: -20px;
  top: -24px;
  width: 230px;
  height: 165px;
  opacity: 0.25;
  pointer-events: none;
}

.kpi__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.kpi__label {
  color: var(--muted);
  font-size: 13.6px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.kpi--dark .kpi__label {
  color: rgba(255, 255, 255, 0.5);
}

.kpi__icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-3);
  color: #8b887d;
}

.kpi__icon--warm {
  background: var(--accent-soft);
  color: #bc4a24;
}

.kpi__icon--blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.kpi__icon--jade {
  background: var(--jade-soft);
  color: var(--jade);
}

.kpi__icon svg {
  width: 14px;
  height: 14px;
}

.kpi__value {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-top: 20px;
  font-family: var(--font-num);
  font-size: clamp(32px, 3vw, 40px);
  font-weight: 650;
  line-height: 0.98;
  letter-spacing: -1.8px;
  font-variant-numeric: tabular-nums;
}

.kpi__value small {
  color: var(--muted-2);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
}

.kpi--dark .kpi__value small {
  color: rgba(255, 255, 255, 0.36);
}

.kpi__foot {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 11px;
  color: var(--muted-2);
  font-size: 12.4px;
}

.kpi__foot b {
  color: var(--ink-2);
  font-weight: 650;
}

.kpi--dark .kpi__foot {
  color: rgba(255, 255, 255, 0.38);
}

.kpi--dark .kpi__foot b {
  color: rgba(255, 255, 255, 0.78);
}

.kpi__progress {
  position: relative;
  height: 6px;
  margin-top: 15px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.kpi__progress span {
  display: block;
  height: 100%;
  min-width: 5px;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff8c62, var(--accent));
  transition: width 420ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* --------------------------------------------------------------------------
   Workflow
   -------------------------------------------------------------------------- */

.workflow {
  position: relative;
  display: grid;
  grid-template-columns: minmax(210px, 0.42fr) minmax(0, 1fr);
  gap: 25px;
  align-items: center;
  margin-bottom: 20px;
  padding: 21px 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.workflow__intro h2 {
  font-size: 18.4px;
  font-weight: 750;
  letter-spacing: -0.4px;
}

.workflow__intro p {
  margin-top: 5px;
  color: var(--muted-2);
  font-size: 12.4px;
  line-height: 1.55;
}

.workflow__steps {
  display: flex;
  align-items: center;
  min-width: 0;
}

.workflow__steps > li {
  flex: 1;
  min-width: 0;
}

.flow-step {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-width: 0;
  padding: 8px 4px;
  text-align: left;
  border-radius: 9px;
}

.flow-step:hover {
  background: var(--surface-3);
}

.flow-step:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -7px;
  top: 50%;
  width: 14px;
  height: 1px;
  background: var(--line-strong);
}

.flow-step__node {
  width: 31px;
  height: 31px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted-2);
  font-family: var(--font-num);
  font-size: 11.9px;
  font-weight: 650;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.flow-step__node svg {
  width: 13px;
  height: 13px;
}

.flow-step__text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.flow-step__text b {
  overflow: hidden;
  color: #5e655f;
  font-size: 13.6px;
  font-weight: 650;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.flow-step__text small {
  overflow: hidden;
  color: var(--muted-2);
  font-family: var(--font-num);
  font-size: 11.8px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.flow-step.is-done .flow-step__node {
  border-color: var(--jade);
  background: var(--jade-soft);
  color: var(--jade);
}

.flow-step.is-active .flow-step__node {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(237, 90, 42, 0.1);
}

.flow-step.is-active .flow-step__text b {
  color: var(--ink);
}

.flow-step.is-active .flow-step__text small {
  color: #b8532d;
}

/* --------------------------------------------------------------------------
   Today layout
   -------------------------------------------------------------------------- */

.today-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.62fr) minmax(285px, 0.78fr);
  gap: 20px;
  align-items: start;
}

.queue-card {
  padding: 24px 25px 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.card-head__eyebrow {
  margin-bottom: 6px;
  color: var(--muted-2);
  font-size: 11.2px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.card-title {
  font-size: 21.6px;
  font-weight: 770;
  letter-spacing: -0.55px;
}

.card-head__side {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
  padding-top: 2px;
}

.queue-progress {
  display: flex;
  align-items: center;
  gap: 10px;
}

.queue-progress__label {
  color: var(--muted-2);
  font-size: 11.8px;
  white-space: nowrap;
}

.queue-progress__track {
  width: 92px;
  height: 5px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--surface-3);
}

.queue-progress__fill {
  height: 100%;
  min-width: 2px;
  border-radius: inherit;
  background: var(--accent);
  transition: width 420ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.queue-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 13px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-3);
  color: #6c726c;
  font-size: 12.4px;
  font-weight: 600;
  white-space: nowrap;
}

.badge b {
  color: var(--ink-2);
  font-family: var(--font-num);
  font-size: 13.6px;
  font-weight: 700;
}

.badge--warm {
  background: var(--accent-soft);
  color: #b14a26;
}

.badge--warm b {
  color: #a13f1d;
}

.badge--jade {
  background: var(--jade-soft);
  color: #2d735b;
}

.badge--jade b {
  color: #24644e;
}

.queue-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 18px;
}

.cohort {
  --cohort: var(--accent);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-2);
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.cohort--ink { --cohort: #3b454f; }
.cohort--blue { --cohort: var(--blue); }
.cohort--gold { --cohort: var(--gold); }
.cohort--gray { --cohort: #9a9d96; }

.cohort.is-open {
  border-color: #ded8ca;
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(45, 37, 20, 0.045);
}

.cohort__trigger {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  min-height: 58px;
  padding: 12px 17px 12px 22px;
  text-align: left;
}

.cohort__trigger::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 15px;
  bottom: 15px;
  width: 3px;
  border-radius: 2px;
  background: var(--cohort);
}

.cohort__main {
  min-width: 0;
  flex: 1;
}

.cohort__label {
  color: var(--ink);
  font-size: 15.3px;
  font-weight: 700;
  letter-spacing: -0.15px;
}

.cohort__hint {
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted-2);
  font-size: 11.9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cohort__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  color: var(--muted-2);
  font-size: 11.9px;
}

.cohort__meta strong {
  color: var(--ink-2);
  font-family: var(--font-num);
  font-size: 14.7px;
  font-weight: 650;
}

.cohort__chevron {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #8a8e87;
  transition: background 150ms ease, color 150ms ease, transform 180ms ease;
}

.cohort__trigger:hover .cohort__chevron {
  background: var(--surface-3);
  color: var(--ink);
}

.cohort__chevron svg {
  width: 12px;
  height: 12px;
  transition: transform 180ms ease;
}

.cohort.is-open .cohort__chevron svg {
  transform: rotate(180deg);
}

.cohort__body {
  padding: 2px 12px 12px;
  animation: reveal 210ms ease both;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cohort__empty {
  padding: 16px;
  color: var(--muted-2);
  font-size: 12.4px;
  text-align: center;
}

.lead-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 10px;
  border-top: 1px solid #f1eee7;
  border-radius: 9px;
  transition: background 150ms ease;
}

.lead-row:first-child {
  border-top: 0;
}

.lead-row:hover {
  background: var(--surface-3);
}

.lead-row.is-done {
  opacity: 0.65;
}

.lead-avatar {
  width: 37px;
  height: 37px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(145deg, #eae6dc, #f5f2eb);
  color: #6f736c;
  font-size: 13px;
  font-weight: 700;
}

.lead-avatar--warm {
  background: linear-gradient(145deg, #fbe3d7, #fdf2eb);
  color: #a84724;
}

.lead-avatar--blue {
  background: linear-gradient(145deg, #e2edf7, #f2f7fb);
  color: #2c5f93;
}

.lead-main {
  min-width: 0;
  flex: 1;
}

.lead-name {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-size: 14.1px;
  font-weight: 650;
}

.lead-name span {
  color: var(--muted-2);
  font-family: var(--font-num);
  font-size: 11.9px;
  font-weight: 500;
}

.lead-note {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted-2);
  font-size: 11.9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-tags {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: none;
}

.lead-tag {
  padding: 3px 7px;
  border-radius: 5px;
  background: var(--surface-3);
  color: #7e827b;
  font-size: 11.2px;
  font-weight: 550;
  white-space: nowrap;
}

.lead-tag--warm {
  background: var(--accent-soft);
  color: #b34c28;
}

.lead-tag--jade {
  background: var(--jade-soft);
  color: #2f6f58;
}

.lead-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: none;
  opacity: 1;
  transition: opacity 150ms ease;
}

.lead-row:hover .lead-actions,
.lead-row:focus-within .lead-actions {
  opacity: 1;
}

.lead-row.is-done .lead-done {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--jade);
  font-size: 11.8px;
  font-weight: 650;
}

.lead-row.is-done .lead-done svg {
  width: 12px;
  height: 12px;
}

.cohort__foot {
  display: flex;
  justify-content: center;
  padding: 10px 0 2px;
  border-top: 1px dashed #ece8df;
}

.cohort__foot .text-action {
  color: #8f7d70;
}

/* Rail */

.rail {
  display: flex;
  flex-direction: column;
  gap: 15px;
  position: sticky;
  top: calc(var(--topbar-h) + 18px);
}

.rail-card {
  border: 1px solid var(--line);
  border-radius: 19px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.progress-card {
  padding: 21px 21px 19px;
}

.rail-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink);
  font-size: 14.7px;
  font-weight: 700;
}

.rail-title small {
  color: var(--muted-2);
  font-size: 11.2px;
  font-weight: 500;
}

.progress-main {
  display: flex;
  align-items: center;
  gap: 17px;
  margin-top: 17px;
}

.progress-ring {
  --pct: 0;
  position: relative;
  width: 94px;
  height: 94px;
  flex: none;
  border-radius: 50%;
  background: conic-gradient(var(--accent) calc(var(--pct) * 1%), #eeeae1 0);
  transition: background 400ms ease;
}

.progress-ring::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: var(--surface);
}

.progress-ring__inner {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
}

.progress-ring__value {
  color: var(--ink);
  font-family: var(--font-num);
  font-size: 22.9px;
  font-weight: 650;
  letter-spacing: -0.8px;
}

.progress-ring__label {
  color: var(--muted-2);
  font-size: 10px;
}

.progress-stats {
  flex: 1;
  min-width: 0;
}

.progress-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid #f2efe8;
}

.progress-stat:last-child {
  border-bottom: 0;
}

.progress-stat span {
  color: var(--muted-2);
  font-size: 11.8px;
}

.progress-stat b {
  color: var(--ink-2);
  font-family: var(--font-num);
  font-size: 14.7px;
  font-weight: 650;
}

.progress-stat b.is-accent {
  color: var(--accent);
}

.progress-caption {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 9px;
  background: var(--surface-3);
  color: #777b74;
  font-size: 11.9px;
  line-height: 1.55;
}

.next-card {
  position: relative;
  overflow: hidden;
  padding: 20px 21px;
  border-radius: 19px;
  background:
    radial-gradient(circle at 100% 0%, rgba(237, 90, 42, 0.18), transparent 12rem),
    linear-gradient(135deg, #1b2228, #242c34);
  color: #fff;
  box-shadow: 0 16px 38px rgba(24, 27, 29, 0.16);
}

.next-card__eyebrow {
  color: rgba(255, 255, 255, 0.38);
  font-size: 10.6px;
  font-weight: 650;
  letter-spacing: 0.13em;
}

.next-card__title {
  margin-top: 10px;
  font-size: 15.8px;
  font-weight: 700;
  line-height: 1.45;
}

.next-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 11.8px;
}

.next-card__meta svg {
  width: 11px;
  height: 11px;
}

.next-card__cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 17px;
}

.next-card__person {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.next-card__avatar {
  width: 27px;
  height: 27px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.75);
  font-size: 11.2px;
  font-weight: 700;
}

.next-card__person b {
  display: block;
  font-size: 11.9px;
  font-weight: 600;
}

.next-card__person small {
  display: block;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.35);
  font-size: 10px;
}

.next-card .button {
  height: 35px;
  padding: 0 11px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 11.9px;
}

.next-card .button:hover {
  background: #f06a3d;
}

.channel-card {
  padding: 19px 21px;
}

.channel-card__body {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.channel-card__icon {
  width: 37px;
  height: 37px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--gold-soft);
  color: var(--gold);
}

.channel-card__icon svg {
  width: 16px;
  height: 16px;
}

.channel-card__text {
  flex: 1;
  min-width: 0;
}

.channel-card__text b {
  display: block;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 650;
}

.channel-card__text span {
  display: block;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 11.8px;
}

.channel-card .button {
  width: 100%;
  height: 35px;
  margin-top: 13px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: #5e655f;
  font-size: 11.9px;
}

.channel-card .button:hover {
  background: var(--surface-3);
}

.channel-card.is-reported .channel-card__icon {
  background: var(--jade-soft);
  color: var(--jade);
}

.recent-list {
  margin-top: 9px;
}

.recent-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 8px 0;
  border-top: 1px solid #f3f0e8;
}

.recent-item:first-child {
  border-top: 0;
}

.recent-item__dot {
  width: 6px;
  height: 6px;
  margin-top: 5px;
  flex: none;
  border-radius: 50%;
  background: var(--jade);
}

.recent-item__main {
  min-width: 0;
  flex: 1;
}

.recent-item__main b {
  display: block;
  overflow: hidden;
  color: #5d645e;
  font-size: 11.8px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-item__main span {
  display: block;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 10px;
}

/* --------------------------------------------------------------------------
   Customers page
   -------------------------------------------------------------------------- */

.search-bar {
  position: relative;
  display: flex;
  align-items: center;
  height: 56px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.search-bar:focus-within {
  border-color: #cdbfa9;
  box-shadow: 0 0 0 4px rgba(237, 90, 42, 0.06), var(--shadow-card);
}

.search-bar > svg {
  width: 17px;
  height: 17px;
  flex: none;
  color: #999d95;
}

.search-bar input {
  width: 100%;
  height: 100%;
  padding: 0 13px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font-size: 14.7px;
}

.search-bar input::placeholder {
  color: #a5a8a1;
}

.search-bar input::-webkit-search-cancel-button,
.search-bar input::-webkit-search-decoration {
  appearance: none;
  -webkit-appearance: none;
}

.search-bar__hint {
  flex: none;
  padding: 3px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  color: var(--muted-2);
  font-family: var(--font-num);
  font-size: 11.2px;
}

.search-clear {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--muted);
}

.search-clear:hover {
  background: #ece8df;
  color: var(--ink);
}

.search-clear svg {
  width: 10px;
  height: 10px;
}

.status-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-top: 14px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ece9e1;
}

.status-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  border-radius: 10px;
  color: #6f756e;
  font-size: 13.6px;
  font-weight: 600;
  transition: background 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.status-tab:hover {
  color: var(--ink);
}

.status-tab b {
  font-family: var(--font-num);
  font-size: 13.6px;
  font-weight: 650;
}

.status-tab.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(45, 37, 20, 0.08);
}

.filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 15px;
}

.filters {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.filter-slot {
  position: relative;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: #6f756e;
  font-size: 13px;
  font-weight: 550;
  white-space: nowrap;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}

.filter-chip:hover {
  color: var(--ink);
  border-color: #cfc8b9;
}

.filter-chip.is-active {
  border-color: #f0b9a4;
  background: var(--accent-faint);
  color: #ab4522;
}

.filter-chip svg {
  width: 10px;
  height: 10px;
  opacity: 0.65;
}

.filter-popover {
  position: absolute;
  z-index: 25;
  top: calc(100% + 7px);
  left: 0;
  width: max-content;
  min-width: 148px;
  max-height: 265px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--surface);
  box-shadow: var(--shadow-pop);
  animation: pop-in 150ms ease both;
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.filter-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 8px 9px;
  border-radius: 6px;
  color: #666d66;
  font-size: 12.4px;
  text-align: left;
}

.filter-option:hover {
  background: var(--surface-3);
  color: var(--ink);
}

.filter-option.is-selected {
  background: var(--accent-faint);
  color: #a94624;
  font-weight: 600;
}

.filter-option svg {
  width: 11px;
  height: 11px;
}

.sort-control {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.sort-control label {
  color: var(--muted-2);
  font-size: 11.8px;
}

.sort-select {
  appearance: none;
  height: 36px;
  padding: 0 29px 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background-color: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='m3 4.8 3 3 3-3' stroke='%237d827b' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  color: #5e655f;
  font-size: 11.9px;
  cursor: pointer;
}

.result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 22px 0 10px;
}

.result-count {
  color: var(--muted);
  font-size: 13px;
}

.result-count b {
  color: var(--ink);
  font-family: var(--font-num);
  font-size: 14.7px;
  font-weight: 650;
}

.clear-filters {
  color: #a24e2e;
  font-size: 11.8px;
  font-weight: 600;
}

.clear-filters:hover {
  color: var(--accent-strong);
}

.customer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
  align-items: start;
}

.customer-card {
  position: relative;
  padding: 19px 20px 17px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.customer-card:hover {
  transform: translateY(-2px);
  border-color: #ddd6c9;
  box-shadow: 0 16px 42px rgba(45, 37, 20, 0.08);
}

.customer-card__head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.customer-avatar {
  width: 43px;
  height: 43px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, #eeeae1, #f7f4ed);
  color: #777b74;
  font-size: 14.7px;
  font-weight: 700;
}

.customer-avatar--warm {
  background: linear-gradient(145deg, #fbe1d4, #fdf2eb);
  color: #ac4925;
}

.customer-avatar--jade {
  background: linear-gradient(145deg, #dcefe6, #eef8f3);
  color: #2c6e56;
}

.customer-avatar--blue {
  background: linear-gradient(145deg, #e1edf7, #f2f7fb);
  color: #2f6091;
}

.customer-card__identity {
  flex: 1;
  min-width: 0;
}

.customer-card__name {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-size: 15.8px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.customer-card__name small {
  color: var(--muted-2);
  font-family: var(--font-num);
  font-size: 11.8px;
  font-weight: 500;
}

.customer-card__meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 4px;
  color: var(--muted-2);
  font-family: var(--font-num);
  font-size: 11.9px;
}

.customer-card__meta .city {
  font-family: var(--font-sans);
}

.customer-card__meta i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #c4bfb4;
}

.days-chip {
  flex: none;
  padding: 4px 7px;
  border-radius: 5px;
  background: var(--surface-3);
  color: var(--muted-2);
  font-family: var(--font-num);
  font-size: 11.8px;
  white-space: nowrap;
}

.days-chip.is-late {
  background: var(--danger-soft);
  color: #ad4936;
}

.days-chip.is-fresh {
  background: var(--jade-soft);
  color: #2e7058;
}

.customer-card__reason {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 13px;
  color: #7d6a5e;
  font-size: 11.9px;
}

.customer-card__reason::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue);
}

.customer-card__reason.is-warm::before {
  background: var(--accent);
}

.customer-card__reason.is-late::before {
  background: var(--danger);
}

.customer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.customer-tag {
  padding: 3px 7px;
  border-radius: 5px;
  background: var(--surface-3);
  color: #777d76;
  font-size: 11.2px;
  font-weight: 550;
  white-space: nowrap;
}

.customer-tag--stage {
  background: #eef0f1;
  color: #4f5b63;
}

.customer-tag--intent {
  background: var(--accent-soft);
  color: #ad4a26;
}

.customer-tag--intent.low {
  background: #f2f0ea;
  color: #82847c;
}

.customer-tag--high {
  background: #fbe3d7;
  color: #a93f1d;
}

.customer-tag--low {
  background: #f2f0ea;
  color: #82847c;
}

.customer-tag--finance {
  border: 1px dashed #ddd7c9;
  background: transparent;
  color: #7f7d74;
}

.customer-note {
  margin-top: 12px;
  padding: 10px 11px;
  border-radius: 9px;
  background: #f8f5ee;
  color: #777b74;
  font-size: 11.9px;
  line-height: 1.55;
}

.customer-note b {
  color: #5e655f;
  font-weight: 600;
}

.customer-card__foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 13px;
  padding-top: 13px;
  border-top: 1px solid #f1eee7;
}

.customer-card__foot .button {
  height: 32px;
  padding: 0 11px;
  border-radius: 7px;
  font-size: 11.8px;
}

.customer-card__foot .button--write {
  background: var(--ink);
  color: #fff;
}

.customer-card__foot .button--write:hover {
  background: #2c343b;
}

.load-more-row {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.load-more-row .button {
  min-width: 150px;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 70px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  background: rgba(255, 254, 250, 0.55);
  text-align: center;
}

.empty-state__icon {
  width: 46px;
  height: 46px;
  margin: 0 auto 13px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--surface-3);
  color: #999c95;
}

.empty-state__icon svg {
  width: 20px;
  height: 20px;
}

.empty-state h3 {
  font-size: 15.8px;
  font-weight: 700;
}

.empty-state p {
  margin-top: 5px;
  color: var(--muted-2);
  font-size: 11.9px;
}

/* --------------------------------------------------------------------------
   My data
   -------------------------------------------------------------------------- */

.data-head {
  margin-bottom: 22px;
}

.period-switch {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #eae6dd;
}

.period-switch button {
  height: 31px;
  padding: 0 12px;
  border-radius: 7px;
  color: #747a73;
  font-size: 11.9px;
  font-weight: 550;
}

.period-switch button:hover {
  color: var(--ink);
}

.period-switch button.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(45, 37, 20, 0.1);
}

.data-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 17px;
  align-items: stretch;
}

.data-panel {
  position: relative;
  padding: 24px 25px;
  border: 1px solid var(--line);
  border-radius: 21px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.data-panel--dark {
  border-color: transparent;
  background:
    radial-gradient(circle at 90% 8%, rgba(237, 90, 42, 0.16), transparent 17rem),
    linear-gradient(135deg, #1a2128, #232b32);
  color: #fff;
}

.data-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.data-panel__title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 18.4px;
  font-weight: 750;
  letter-spacing: -0.4px;
}

.data-panel--dark .data-panel__title {
  color: #fff;
}

.data-panel__title small {
  color: var(--muted-2);
  font-size: 11.2px;
  font-weight: 500;
}

.data-panel--dark .data-panel__title small {
  color: rgba(255, 255, 255, 0.36);
}

.data-panel__contour {
  position: absolute;
  right: -30px;
  top: -20px;
  width: 250px;
  height: 200px;
  opacity: 0.18;
  pointer-events: none;
}

.deal-hero {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin-top: 35px;
  font-family: var(--font-num);
}

.deal-hero__value {
  font-size: clamp(58px, 6vw, 78px);
  font-weight: 600;
  line-height: 0.86;
  letter-spacing: -4px;
}

.deal-hero__unit {
  color: rgba(255, 255, 255, 0.38);
  font-family: var(--font-sans);
  font-size: 13.6px;
}

.deal-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 21px;
}

.deal-sub span {
  padding: 5px 8px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.55);
  font-size: 11.2px;
}

.deal-spark {
  position: absolute;
  left: 25px;
  right: 25px;
  bottom: 20px;
  height: 54px;
  opacity: 0.42;
}

.deal-spark svg {
  width: 100%;
  height: 100%;
}

.funnel-list {
  margin-top: 19px;
}

.funnel-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 53px 37px;
  align-items: center;
  gap: 9px;
  min-height: 30px;
}

.funnel-label {
  color: #6d736c;
  font-size: 11.9px;
  white-space: nowrap;
}

.funnel-track {
  height: 8px;
  overflow: hidden;
  border-radius: 4px;
  background: #f1eee7;
}

.funnel-fill {
  display: block;
  height: 100%;
  min-width: 3px;
  border-radius: inherit;
  background: linear-gradient(90deg, #f18963, var(--accent));
  animation: bar-grow 650ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.funnel-fill--blue {
  background: linear-gradient(90deg, #6f9cc6, var(--blue));
}

@keyframes bar-grow {
  from { transform: scaleX(0); transform-origin: left; }
  to { transform: scaleX(1); transform-origin: left; }
}

.funnel-value {
  color: var(--ink-2);
  font-family: var(--font-num);
  font-size: 12.4px;
  font-weight: 650;
  text-align: right;
}

.funnel-rate {
  color: var(--muted-2);
  font-family: var(--font-num);
  font-size: 10.6px;
  text-align: right;
}

.funnel-note {
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid #f0ede6;
  color: var(--muted-2);
  font-size: 11.2px;
  line-height: 1.6;
}

.progress-list {
  margin-top: 18px;
}

.progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f2efe8;
}

.progress-row:last-child {
  border-bottom: 0;
}

.progress-row__label {
  color: #6d736c;
  font-size: 11.9px;
}

.progress-row__value {
  color: var(--ink-2);
  font-family: var(--font-num);
  font-size: 13.6px;
  font-weight: 650;
}

.progress-row--total {
  margin-top: 7px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.progress-row--total .progress-row__label {
  color: var(--ink);
  font-weight: 650;
}

.progress-row--total .progress-row__value {
  color: var(--accent);
  font-size: 17.3px;
}

.pipeline-summary {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-top: 17px;
  color: var(--muted);
  font-size: 11.9px;
}

.pipeline-summary b {
  color: var(--ink);
  font-family: var(--font-num);
  font-size: 28.1px;
  font-weight: 650;
  letter-spacing: -1px;
}

.dist-block {
  margin-top: 17px;
}

.dist-block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.dist-block__head span {
  color: var(--muted-2);
  font-size: 11.2px;
}

.dist-block__head b {
  color: var(--muted);
  font-family: var(--font-num);
  font-size: 11.2px;
  font-weight: 500;
}

.dist-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dist-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #747a73;
  font-size: 11.2px;
  white-space: nowrap;
}

.dist-chip b {
  color: var(--ink-2);
  font-family: var(--font-num);
  font-size: 11.8px;
  font-weight: 650;
}

.dist-bar {
  display: flex;
  gap: 2px;
  width: 100%;
  height: 8px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 4px;
  background: #f1eee7;
}

.dist-bar span {
  height: 100%;
}

.efficiency-panel {
  grid-column: 1 / -1;
}

.efficiency-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
  margin-top: 18px;
}

.efficiency-tile {
  padding: 15px 15px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-2);
}

.efficiency-tile__value {
  color: var(--ink);
  font-family: var(--font-num);
  font-size: 23.9px;
  font-weight: 650;
  letter-spacing: -0.8px;
}

.efficiency-tile__label {
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 11.2px;
}

.week-chart {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  height: 84px;
  margin-top: 18px;
  padding: 0 8px;
}

.week-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 100%;
  justify-content: flex-end;
}

.week-bar__fill {
  width: 100%;
  max-width: 30px;
  min-height: 4px;
  border-radius: 5px 5px 2px 2px;
  background: #e6e0d5;
  transition: height 400ms ease;
}

.week-bar.is-today .week-bar__fill {
  background: linear-gradient(180deg, #f47c53, var(--accent));
}

.week-bar__label {
  color: var(--muted-2);
  font-family: var(--font-num);
  font-size: 10px;
}

.week-bar__value {
  color: var(--muted);
  font-family: var(--font-num);
  font-size: 10.6px;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Drawers / modal / wizard
   -------------------------------------------------------------------------- */

.overlay-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(22, 20, 16, 0.36);
  backdrop-filter: blur(2px);
  animation: fade-in 180ms ease both;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.drawer {
  position: fixed;
  z-index: 81;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(488px, 100vw);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  box-shadow: -25px 0 75px rgba(25, 21, 12, 0.16);
  animation: drawer-in 300ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

@keyframes drawer-in {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.drawer__head {
  position: relative;
  flex: none;
  padding: 26px 27px 22px;
  border-bottom: 1px solid var(--line);
}

.drawer__close {
  position: absolute;
  top: 21px;
  right: 21px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-3);
  color: #747a73;
}

.drawer__close:hover {
  background: #ece8df;
  color: var(--ink);
}

.drawer__close svg {
  width: 13px;
  height: 13px;
}

.drawer__eyebrow {
  color: var(--muted-2);
  font-size: 10.6px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.drawer__title {
  margin-top: 7px;
  padding-right: 40px;
  font-size: 25px;
  font-weight: 760;
  letter-spacing: -0.7px;
}

.drawer__sub {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12.4px;
}

.drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 22px 27px 32px;
  scrollbar-width: thin;
  scrollbar-color: #d7d1c4 transparent;
}

.drawer__section {
  margin-top: 26px;
}

.drawer__section:first-child {
  margin-top: 0;
}

.drawer__section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
  color: var(--ink);
  font-size: 13.6px;
  font-weight: 700;
}

.drawer__section-title small {
  color: var(--muted-2);
  font-size: 10.6px;
  font-weight: 400;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--line);
}

.detail-cell {
  padding: 12px 13px;
  background: var(--surface);
}

.detail-cell__label {
  color: var(--muted-2);
  font-size: 10.6px;
}

.detail-cell__value {
  margin-top: 4px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
}

.detail-cell__value small {
  color: var(--muted-2);
  font-weight: 400;
}

.chip-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.chip-tags span {
  padding: 5px 8px;
  border-radius: 5px;
  background: var(--surface-3);
  color: #71766f;
  font-size: 11.2px;
}

.chip-tags span.is-warm {
  background: var(--accent-soft);
  color: #ad4926;
}

.chip-tags span.is-jade {
  background: var(--jade-soft);
  color: #2e7058;
}

.pipeline {
  display: flex;
  align-items: flex-start;
  margin-top: 4px;
}

.pipeline__step {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.pipeline__step:not(:last-child)::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: 8px;
  left: calc(50% + 10px);
  width: calc(100% - 20px);
  height: 1px;
  background: var(--line-strong);
}

.pipeline__dot {
  position: relative;
  z-index: 1;
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  color: transparent;
  font-size: 8.5px;
}

.pipeline__dot svg {
  width: 9px;
  height: 9px;
}

.pipeline__step.is-done .pipeline__dot {
  border-color: var(--jade);
  background: var(--jade);
  color: #fff;
}

.pipeline__step.is-current .pipeline__dot {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(237, 90, 42, 0.1);
}

.pipeline__label {
  color: var(--muted-2);
  font-size: 9.8px;
  line-height: 1.3;
}

.pipeline__step.is-current .pipeline__label {
  color: var(--accent);
  font-weight: 650;
}

.timeline {
  position: relative;
  padding-left: 18px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 6px;
  bottom: 10px;
  width: 1px;
  background: #ece8df;
}

.timeline-item {
  position: relative;
  padding: 0 0 16px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item__dot {
  position: absolute;
  left: -18px;
  top: 4px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 1px #f2b9a4;
}

.timeline-item.is-muted .timeline-item__dot {
  background: #c6c1b6;
  box-shadow: 0 0 0 1px #e7e2d7;
}

.timeline-item__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted-2);
  font-size: 10.6px;
}

.timeline-item__meta b {
  color: #5e655f;
  font-weight: 650;
}

.timeline-item__text {
  margin-top: 3px;
  color: #656c65;
  font-size: 11.9px;
  line-height: 1.65;
}

.note-box {
  padding: 12px 13px;
  border: 1px solid #f0e5dc;
  border-radius: 9px;
  background: #fdf7f2;
  color: #725c50;
  font-size: 11.9px;
  line-height: 1.65;
}

.drawer__foot {
  flex: none;
  display: flex;
  gap: 8px;
  padding: 15px 22px 18px;
  border-top: 1px solid var(--line);
  background: rgba(255, 254, 250, 0.95);
}

.drawer__foot .button {
  height: 40px;
  border-radius: 8px;
  font-size: 13px;
}

.drawer__foot .button--primary {
  flex: 1;
}

.modal {
  position: fixed;
  z-index: 91;
  top: 50%;
  left: 50%;
  width: min(500px, calc(100vw - 32px));
  max-height: min(85vh, 760px);
  overflow-y: auto;
  padding: 25px 26px 24px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-pop);
  transform: translate(-50%, -50%);
  animation: modal-in 220ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
  scrollbar-width: thin;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 9px)) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.modal__title {
  font-size: 21.6px;
  font-weight: 760;
  letter-spacing: -0.5px;
}

.modal__sub {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11.9px;
}

.modal__close {
  width: 28px;
  height: 28px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-3);
  color: #747a73;
}

.modal__close:hover {
  background: #ece8df;
  color: var(--ink);
}

.modal__close svg {
  width: 12px;
  height: 12px;
}

.modal__body {
  margin-top: 20px;
}

.modal__foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 23px;
}

.field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
  color: #666d66;
  font-size: 11.9px;
  font-weight: 600;
}

.field-label em {
  color: var(--accent);
  font-style: normal;
}

.field-input,
.field-select,
.field-textarea {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  outline: none;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.field-input:focus,
.field-select:focus,
.field-textarea:focus {
  border-color: #cfbca4;
  box-shadow: 0 0 0 3px rgba(237, 90, 42, 0.06);
}

.field-input.is-error {
  border-color: #df9a86;
  background: #fff8f5;
}

.field-textarea {
  min-height: 104px;
  padding: 10px 12px;
  resize: vertical;
  line-height: 1.6;
}

.field-error {
  margin-top: 5px;
  color: var(--danger);
  font-size: 11.2px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
}

/* Follow-up */

.follow-summary {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 13px;
  border-radius: 10px;
  background: var(--surface-3);
}

.follow-summary__avatar {
  width: 35px;
  height: 35px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--surface);
  color: #666d66;
  font-size: 11.9px;
  font-weight: 700;
}

.follow-summary__main {
  flex: 1;
  min-width: 0;
}

.follow-summary__main b {
  display: block;
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
}

.follow-summary__main span {
  display: block;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 11.2px;
}

.outcome-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.outcome {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 41px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: #666d66;
  font-size: 11.9px;
  font-weight: 550;
  text-align: left;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease;
}

.outcome:hover {
  border-color: #d3c9b8;
  background: var(--surface);
  color: var(--ink);
}

.outcome.is-selected {
  border-color: #e9a98f;
  background: var(--accent-faint);
  color: #a94320;
}

.outcome__dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.55;
}

.outcome.is-selected .outcome__dot {
  opacity: 1;
}

.next-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.next-chip {
  height: 28px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #747a73;
  font-size: 11.2px;
}

.next-chip:hover {
  border-color: #d3c9b8;
  color: var(--ink);
}

.next-chip.is-active {
  border-color: #e9a98f;
  background: var(--accent-faint);
  color: #a94320;
}

.follow-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 17px;
  color: var(--muted-2);
  font-size: 11.2px;
}

.follow-meta svg {
  width: 12px;
  height: 12px;
}

/* Account menu */

.account-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.account-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
  text-align: left;
}

.account-option:hover {
  background: var(--surface);
  border-color: #d8cfbf;
}

.account-option__avatar {
  width: 32px;
  height: 32px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-3);
  color: #666d66;
  font-size: 11.8px;
  font-weight: 700;
}

.account-option__main {
  flex: 1;
}

.account-option__main b {
  display: block;
  color: var(--ink-2);
  font-size: 12.4px;
  font-weight: 650;
}

.account-option__main span {
  display: block;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 10.6px;
}

.account-option__check {
  color: var(--accent);
}

.account-option__check svg {
  width: 14px;
  height: 14px;
}

.rule-note {
  margin-top: 15px;
  padding: 11px 12px;
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--muted-2);
  font-size: 11.2px;
  line-height: 1.65;
}

/* --------------------------------------------------------------------------
   New customer wizard
   -------------------------------------------------------------------------- */

.wizard {
  position: fixed;
  z-index: 91;
  top: 50%;
  left: 50%;
  width: min(860px, calc(100vw - 36px));
  max-height: min(88vh, 820px);
  display: flex;
  overflow: hidden;
  border-radius: 21px;
  background: var(--surface);
  box-shadow: var(--shadow-pop);
  transform: translate(-50%, -50%);
  animation: modal-in 240ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.wizard__rail {
  flex: none;
  width: 224px;
  padding: 27px 22px;
  background:
    radial-gradient(circle at 20% 0%, rgba(237, 90, 42, 0.14), transparent 15rem),
    linear-gradient(160deg, #1b2228, #252d34);
  color: #fff;
}

.wizard__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.52);
  font-size: 10.6px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.wizard__brand i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.wizard__rail h2 {
  margin-top: 15px;
  font-size: 23.9px;
  font-weight: 760;
  line-height: 1.28;
  letter-spacing: -0.8px;
}

.wizard__rail p {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 11.2px;
  line-height: 1.65;
}

.wizard-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 32px;
}

.wizard-step {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding-bottom: 25px;
  color: rgba(255, 255, 255, 0.34);
}

.wizard-step:last-child {
  padding-bottom: 0;
}

.wizard-step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 24px;
  bottom: 2px;
  width: 1px;
  background: rgba(255, 255, 255, 0.11);
}

.wizard-step__dot {
  width: 21px;
  height: 21px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.44);
  font-family: var(--font-num);
  font-size: 10px;
  font-weight: 600;
}

.wizard-step__dot svg {
  width: 10px;
  height: 10px;
}

.wizard-step__text b {
  display: block;
  color: inherit;
  font-size: 11.9px;
  font-weight: 600;
  transition: color 160ms ease;
}

.wizard-step__text span {
  display: block;
  margin-top: 2px;
  color: inherit;
  font-size: 10px;
  opacity: 0.74;
}

.wizard-step.is-active {
  color: #fff;
}

.wizard-step.is-active .wizard-step__dot {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(237, 90, 42, 0.16);
}

.wizard-step.is-done {
  color: rgba(255, 255, 255, 0.62);
}

.wizard-step.is-done .wizard-step__dot {
  border-color: var(--jade);
  background: var(--jade);
  color: #fff;
}

.wizard__main {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.wizard__head {
  flex: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 27px 0;
}

.wizard__head h3 {
  font-size: 21.6px;
  font-weight: 760;
  letter-spacing: -0.5px;
}

.wizard__head p {
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 11.2px;
}

.wizard__close {
  width: 28px;
  height: 28px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-3);
  color: #747a73;
}

.wizard__close:hover {
  background: #ece8df;
  color: var(--ink);
}

.wizard__close svg {
  width: 12px;
  height: 12px;
}

.wizard__body {
  flex: 1;
  overflow-y: auto;
  padding: 22px 27px 8px;
  scrollbar-width: thin;
}

.wizard__foot {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 27px 20px;
  border-top: 1px solid var(--line);
}

.wizard__foot-right {
  display: flex;
  gap: 8px;
}

.wizard-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-2);
  font-family: var(--font-num);
  font-size: 11.2px;
}

.wizard-progress__track {
  width: 74px;
  height: 4px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--surface-3);
}

.wizard-progress__fill {
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 250ms ease;
}

.option-group {
  margin-top: 20px;
}

.option-group:first-child {
  margin-top: 0;
}

.option-group__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.option-group__label {
  color: #5f665f;
  font-size: 11.9px;
  font-weight: 600;
}

.option-group__label em {
  margin-left: 4px;
  color: var(--accent);
  font-style: normal;
}

.option-group__hint {
  color: var(--muted-2);
  font-size: 10px;
}

.option-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.option-chip {
  min-height: 33px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  color: #6b726b;
  font-size: 11.8px;
  font-weight: 500;
  white-space: nowrap;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease;
}

.option-chip:hover {
  border-color: #d3c9b8;
  background: var(--surface);
  color: var(--ink);
}

.option-chip.is-selected {
  border-color: #e7a58b;
  background: var(--accent-faint);
  color: #a94320;
  font-weight: 600;
}

.option-chip--wide {
  min-width: 82px;
}

.form-note {
  margin-top: 16px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--muted-2);
  font-size: 10.6px;
  line-height: 1.6;
}

.review-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
}

.review-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 41px;
  padding: 9px 12px;
  border-top: 1px solid #f2efe8;
  font-size: 11.9px;
}

.review-row:first-child {
  border-top: 0;
}

.review-row span {
  color: var(--muted-2);
}

.review-row b {
  color: var(--ink-2);
  font-weight: 600;
  text-align: right;
}

.wizard-success {
  padding: 20px;
  border-radius: 11px;
  background: var(--jade-soft);
  color: #2c6e56;
  font-size: 11.9px;
  line-height: 1.65;
}

/* --------------------------------------------------------------------------
   Toast / footer / responsive
   -------------------------------------------------------------------------- */

.toast-region {
  position: fixed;
  z-index: 120;
  left: 50%;
  bottom: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: min(430px, calc(100vw - 32px));
  padding: 10px 14px 10px 11px;
  border-radius: 9px;
  background: rgba(24, 29, 35, 0.96);
  color: #fff;
  box-shadow: 0 14px 38px rgba(20, 18, 12, 0.22);
  font-size: 12.4px;
  font-weight: 500;
  animation: toast-in 230ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.toast.is-leaving {
  animation: toast-out 180ms ease both;
}

.toast__icon {
  width: 18px;
  height: 18px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
}

.toast__icon svg {
  width: 10px;
  height: 10px;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(7px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toast-out {
  to { opacity: 0; transform: translateY(4px) scale(0.99); }
}

.site-footer {
  width: min(100%, var(--page-max));
  margin: 0 auto;
  padding: 0 var(--page-gutter) 28px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ada89d;
  font-size: 11.2px;
}

.site-footer__dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #c6c0b4;
}

.site-footer__spacer {
  flex: 1;
}

@media (max-width: 1240px) {
  :root {
    --page-gutter: 28px;
  }

  .topbar__inner {
    gap: 16px;
  }

  .kpi-grid {
    grid-template-columns: 1fr 1fr;
  }

  .kpi {
    min-height: 140px;
  }

  .workflow {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .today-grid {
    grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.8fr);
  }

  .lead-tags {
    display: none;
  }
}

@media (max-width: 1040px) {
  .sales-nav {
    gap: 24px;
  }

  .today-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .rail {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
  }

  .rail-card {
    height: 100%;
  }

  .customer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lead-tags {
    display: flex;
  }
}

@media (max-width: 860px) {
  :root {
    --topbar-h: 112px;
  }

  .topbar__inner {
    height: var(--topbar-h);
    grid-template-columns: 1fr auto;
    grid-template-rows: 58px 41px;
    align-items: center;
    gap: 0 15px;
    padding-top: 5px;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
  }

  .account {
    grid-column: 2;
    grid-row: 1;
  }

  .sales-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: stretch;
    justify-content: flex-start;
    gap: 30px;
    height: 41px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
  }

  .page {
    padding-top: 24px;
  }

  .workflow__steps {
    overflow-x: auto;
    padding-bottom: 3px;
    scrollbar-width: none;
  }

  .workflow__steps::-webkit-scrollbar {
    display: none;
  }

  .flow-step {
    flex: 0 0 172px;
  }

  .customer-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .data-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .efficiency-panel {
    grid-column: auto;
  }

  .efficiency-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 700px) {
  :root {
    --page-gutter: 18px;
  }

  .topbar__inner {
    padding-left: 18px;
    padding-right: 18px;
  }

  .brand__mark {
    width: 27px;
    height: 27px;
  }

  .brand__name {
    font-size: 21.8px;
  }

  .brand__company,
  .brand__divider,
  .brand__tagline,
  .mode-link,
  .account__divider,
  .account__chevron {
    display: none;
  }

  .account__text {
    display: flex;
  }

  .account__text b {
    font-size: 12.4px;
  }

  .account__text small {
    display: none;
  }

  .account__profile {
    padding: 3px 4px 3px 3px;
    gap: 7px;
  }

  .account__avatar {
    width: 33px;
    height: 33px;
  }

  .sales-nav {
    gap: 26px;
  }

  .sales-nav__item {
    font-size: 14.7px;
  }

  .page {
    padding-top: 21px;
    padding-bottom: 34px;
  }

  .page-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 19px;
  }

  .page-title {
    font-size: 34.3px;
    letter-spacing: -1.3px;
  }

  .page-subtitle {
    font-size: 12.4px;
  }

  .page-head__actions {
    width: 100%;
    padding-bottom: 0;
  }

  .page-head__actions .button {
    flex: 1;
  }

  .kpi-grid {
    gap: 10px;
    margin-bottom: 14px;
  }

  .kpi {
    min-height: 122px;
    padding: 15px 15px 13px;
    border-radius: 15px;
  }

  .kpi__value {
    margin-top: 15px;
    font-size: 31.2px;
  }

  .kpi__label {
    font-size: 11.9px;
  }

  .kpi__icon {
    width: 25px;
    height: 25px;
  }

  .kpi__icon svg {
    width: 12px;
    height: 12px;
  }

  .kpi__foot {
    font-size: 11.2px;
  }

  .workflow {
    padding: 17px 16px;
    border-radius: 16px;
    margin-bottom: 14px;
  }

  .workflow__intro h2 {
    font-size: 16.2px;
  }

  .workflow__intro p {
    font-size: 11.8px;
  }

  .workflow__steps {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    overflow: visible;
    padding-bottom: 0;
  }

  .flow-step {
    flex: none;
    min-width: 0;
    padding: 7px 5px;
  }

  .flow-step:not(:last-child)::after {
    display: none;
  }

  .queue-card {
    padding: 18px 14px 16px;
    border-radius: 17px;
  }

  .card-title {
    font-size: 19.4px;
  }

  .card-head {
    flex-direction: column;
    gap: 10px;
  }

  .card-head__side {
    width: 100%;
    justify-content: space-between;
  }

  .queue-progress {
    width: 100%;
  }

  .queue-progress__track {
    flex: 1;
    width: auto;
  }

  .cohort__trigger {
    padding: 11px 13px 11px 19px;
    gap: 10px;
  }

  .cohort__trigger::before {
    left: 8px;
  }

  .cohort__hint {
    max-width: 210px;
  }

  .lead-row {
    gap: 9px;
    padding: 10px 6px;
  }

  .lead-avatar {
    width: 33px;
    height: 33px;
    border-radius: 9px;
  }

  .lead-tags {
    display: none;
  }

  .lead-actions {
    opacity: 1;
  }

  .lead-actions .button--ghost {
    display: none;
  }

  .rail {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .progress-card,
  .next-card,
  .channel-card {
    padding: 17px;
    border-radius: 16px;
  }

  .search-bar {
    height: 50px;
    border-radius: 12px;
  }

  .search-bar__hint {
    display: none;
  }

  .status-tabs {
    margin-top: 10px;
  }

  .status-tab {
    height: 41px;
    gap: 5px;
    font-size: 12.4px;
  }

  .filter-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
  }

  .filters {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .filters::-webkit-scrollbar {
    display: none;
  }

  .filter-slot {
    flex: none;
  }

  .sort-control {
    width: 100%;
    justify-content: space-between;
  }

  .sort-select {
    flex: 1;
  }

  .filter-popover {
    position: fixed;
    left: 18px;
    right: 18px;
    top: auto;
    bottom: 18px;
    width: auto;
    max-height: 45vh;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(25, 21, 12, 0.22);
  }

  .result-row {
    margin-top: 18px;
  }

  .customer-card {
    padding: 16px 15px 14px;
    border-radius: 15px;
  }

  .customer-card__name {
    font-size: 14.7px;
  }

  .customer-tags {
    gap: 4px;
  }

  .customer-tag {
    font-size: 10px;
    padding: 3px 6px;
  }

  .customer-card__foot {
    margin-top: 11px;
    padding-top: 11px;
  }

  .data-panel {
    padding: 19px 18px;
    border-radius: 17px;
  }

  .data-panel__title {
    font-size: 16.2px;
  }

  .deal-hero {
    margin-top: 25px;
  }

  .deal-hero__value {
    font-size: 60.3px;
  }

  .deal-spark {
    left: 18px;
    right: 18px;
  }

  .funnel-row {
    grid-template-columns: 53px minmax(0, 1fr) 42px 33px;
    gap: 7px;
  }

  .efficiency-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .efficiency-tile {
    padding: 12px;
  }

  .efficiency-tile__value {
    font-size: 21.6px;
  }

  .period-switch button {
    padding: 0 9px;
    font-size: 11.8px;
  }

  .wizard {
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
    transform: none;
    flex-direction: column;
    animation: fade-in 200ms ease both;
  }

  .wizard__rail {
    width: 100%;
    padding: 18px 20px 14px;
  }

  .wizard__rail h2,
  .wizard__rail p {
    display: none;
  }

  .wizard__brand {
    font-size: 9.8px;
  }

  .wizard-steps {
    flex-direction: row;
    gap: 0;
    margin-top: 13px;
  }

  .wizard-step {
    flex: 1;
    align-items: center;
    gap: 6px;
    padding-bottom: 0;
  }

  .wizard-step:not(:last-child)::after {
    left: calc(50% + 14px);
    top: 10px;
    bottom: auto;
    width: calc(100% - 28px);
    height: 1px;
  }

  .wizard-step__dot {
    width: 19px;
    height: 19px;
    font-size: 9.8px;
  }

  .wizard-step__text span {
    display: none;
  }

  .wizard-step__text b {
    font-size: 10.6px;
    white-space: nowrap;
  }

  .wizard__head {
    padding: 18px 20px 0;
  }

  .wizard__head h3 {
    font-size: 19.4px;
  }

  .wizard__body {
    padding: 17px 20px 4px;
  }

  .wizard__foot {
    padding: 12px 20px 16px;
  }

  .wizard-progress {
    display: none;
  }

  .wizard__foot .button {
    height: 41px;
  }

  .drawer {
    width: 100vw;
  }

  .drawer__head {
    padding: 21px 20px 18px;
  }

  .drawer__body {
    padding: 18px 20px 27px;
  }

  .drawer__title {
    font-size: 22.9px;
  }

  .drawer__foot {
    padding: 13px 16px 16px;
  }

  .modal {
    padding: 22px 20px 20px;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .outcome-grid {
    grid-template-columns: 1fr 1fr;
  }

  .site-footer {
    padding: 0 18px 22px;
  }
}

@media (max-width: 390px) {
  .brand__name {
    font-size: 21.6px;
  }

  .kpi__value {
    font-size: 28.1px;
  }

  .kpi__icon {
    display: none;
  }

  .status-tab {
    font-size: 11.9px;
  }

  .funnel-row {
    grid-template-columns: 47px minmax(0, 1fr) 35px 30px;
  }

  .funnel-label {
    font-size: 11.2px;
  }

  .customer-card__meta {
    font-size: 10.6px;
  }

  .customer-card__name small {
    font-size: 10.6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}


/* ==========================================================================
   AI reminders
   ========================================================================== */

.reminder-bell {
  position: relative;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 254, 250, 0.62);
  color: #7e827a;
  transition: border-color 150ms ease, color 150ms ease, background 150ms ease;
}

.reminder-bell:hover,
.reminder-bell.has-reminders {
  border-color: #ecc7b7;
  background: var(--accent-faint);
  color: var(--accent);
}

.reminder-bell svg { width: 16px; height: 16px; }

.reminder-bell__badge {
  position: absolute;
  top: -3px;
  right: -2px;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  display: grid;
  place-items: center;
  border: 2px solid var(--surface);
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 9.2px;
  font-weight: 700;
  line-height: 1;
}

.ai-reminder {
  position: relative;
  overflow: hidden;
  margin: 18px 0 14px;
  padding: 18px 19px 13px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  background:
    radial-gradient(circle at 92% 0%, rgba(237, 90, 42, 0.22), transparent 22rem),
    radial-gradient(circle at 5% 100%, rgba(82, 215, 232, 0.06), transparent 18rem),
    linear-gradient(135deg, #1a2129, #252e37);
  color: #fff;
  box-shadow: 0 15px 45px rgba(28, 24, 17, 0.13);
}

.ai-reminder::after {
  content: "";
  position: absolute;
  top: -90px;
  right: -60px;
  width: 290px;
  height: 290px;
  border: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: 50%;
  box-shadow: 0 0 0 26px rgba(255, 255, 255, 0.018), 0 0 0 58px rgba(255, 255, 255, 0.012);
  pointer-events: none;
}

.ai-reminder.is-empty {
  background:
    radial-gradient(circle at 92% 0%, rgba(237, 90, 42, 0.27), transparent 22rem),
    radial-gradient(circle at 8% 100%, rgba(187, 132, 49, 0.1), transparent 20rem),
    linear-gradient(135deg, #1a2129, #252e37);
}

.ai-reminder__top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.ai-reminder__mark {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(135deg, #f48259, #e74d21);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 7px 20px rgba(237, 90, 42, 0.24);
}

.ai-reminder__mark svg { width: 20px; height: 20px; }

.ai-reminder__copy { flex: 1; min-width: 0; }

.ai-reminder__kicker {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.35);
  font-family: var(--font-num);
  font-size: 9.2px;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.ai-reminder__offline {
  padding: 2px 5px;
  border: 1px solid rgba(246, 193, 95, 0.22);
  border-radius: 3px;
  background: rgba(246, 193, 95, 0.08);
  color: rgba(246, 193, 95, 0.72);
  font-size: 7.9px;
  letter-spacing: 0.04em;
}

.ai-reminder__copy h2 {
  margin-top: 5px;
  color: #fff;
  font-size: 19.4px;
  font-weight: 760;
  letter-spacing: -0.45px;
  line-height: 1.2;
}

.ai-reminder__copy h2 em { color: #ff8258; font-style: normal; }

.ai-reminder__copy p {
  margin-top: 5px;
  max-width: 790px;
  color: rgba(255, 255, 255, 0.46);
  font-size: 11.2px;
  line-height: 1.6;
}

.ai-reminder__actions {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 9px;
  flex: none;
  padding-top: 3px;
}

.ai-reminder__count {
  color: rgba(255, 255, 255, 0.34);
  font-family: var(--font-num);
  font-size: 9.8px;
  white-space: nowrap;
}

.ai-reminder__all {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 29px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
  font-weight: 550;
  white-space: nowrap;
  transition: background 150ms ease, border-color 150ms ease;
}

.ai-reminder__all:hover {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.1);
}

.ai-reminder__all svg { width: 10px; height: 10px; }

.ai-reminder__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 15px;
}

.ai-tip {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 11px 11px 10px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.045);
}

.ai-tip--warm { border-color: rgba(255, 130, 88, 0.26); background: rgba(237, 90, 42, 0.08); }
.ai-tip--blue { border-color: rgba(82, 215, 232, 0.14); background: rgba(82, 215, 232, 0.045); }
.ai-tip--gold { border-color: rgba(246, 193, 95, 0.14); background: rgba(246, 193, 95, 0.04); }
.ai-tip--danger { border-color: rgba(255, 100, 90, 0.16); background: rgba(255, 100, 90, 0.04); }

.ai-tip__head {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 19px;
}

.ai-tip__icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  color: #ff9e7d;
}

.ai-tip__icon svg { width: 11px; height: 11px; }
.ai-tip--blue .ai-tip__icon { color: #7fe7f2; background: rgba(82, 215, 232, 0.1); }
.ai-tip--gold .ai-tip__icon { color: #f6c15f; background: rgba(246, 193, 95, 0.09); }
.ai-tip--danger .ai-tip__icon { color: #ff9a8f; background: rgba(255, 100, 90, 0.09); }

.ai-tip__kind {
  color: rgba(255, 255, 255, 0.38);
  font-family: var(--font-num);
  font-size: 7.9px;
  letter-spacing: 0.06em;
}

.ai-tip__priority {
  margin-left: auto;
  padding: 2px 4px;
  border-radius: 2px;
  background: rgba(237, 90, 42, 0.14);
  color: #ff9c78;
  font-size: 7.3px;
}

.ai-tip h3 {
  margin-top: 8px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.87);
  font-size: 11.9px;
  font-weight: 600;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-tip p {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 10px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.ai-tip__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.ai-tip__tags span {
  padding: 2px 5px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 3px;
  color: rgba(255, 255, 255, 0.31);
  font-size: 7.9px;
  white-space: nowrap;
}

.ai-tip__foot {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 10px;
}

.ai-tip__primary,
.ai-tip__deep {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 27px;
  padding: 0 8px;
  border-radius: 5px;
  font-size: 9.8px;
  font-weight: 550;
  white-space: nowrap;
}

.ai-tip__primary {
  background: var(--accent);
  color: #fff;
}

.ai-tip__primary:hover { background: var(--accent-strong); }
.ai-tip__primary svg { width: 9px; height: 9px; }

.ai-tip__deep {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  color: rgba(255, 255, 255, 0.47);
}

.ai-tip__deep:hover { border-color: rgba(255, 255, 255, 0.22); color: rgba(255, 255, 255, 0.8); }
.ai-tip__deep svg { width: 10px; height: 10px; color: #ff9e7d; }

.ai-reminder__foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 11px;
  padding-top: 9px;
  border-top: 1px solid rgba(255, 255, 255, 0.065);
  color: rgba(255, 255, 255, 0.25);
  font-size: 9.2px;
  line-height: 1.5;
}

.ai-reminder__foot span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.ai-reminder__foot span svg { width: 9px; height: 9px; color: #ff9e7d; flex: none; }

.ai-reminder__foot button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
  color: rgba(255, 255, 255, 0.37);
  font-size: 9.2px;
}

.ai-reminder__foot button:hover { color: rgba(255, 255, 255, 0.75); }
.ai-reminder__foot button svg { width: 9px; height: 9px; }

.ai-reminder.is-loading {
  min-height: 145px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 8px;
  align-content: center;
}

.ai-reminder__skeleton {
  height: 40px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.09), rgba(255,255,255,.04));
  background-size: 200% 100%;
  animation: ai-shimmer 1.4s ease infinite;
}

.ai-reminder__skeleton:first-child { height: 74px; grid-row: span 2; }

@keyframes ai-shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

/* Reminder drawer */
.reminder-drawer { width: min(540px, 100vw); }

.reminder-drawer .drawer__head { padding-bottom: 16px; }
.reminder-drawer .drawer__sub { max-width: 390px; font-size: 10.6px; line-height: 1.6; }

.reminder-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-bottom: 12px;
}

.reminder-stats > div {
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.reminder-stats b {
  display: block;
  color: var(--ink);
  font-family: var(--font-num);
  font-size: 19.4px;
  font-weight: 600;
  line-height: 1;
}

.reminder-stats span { display: block; margin-top: 4px; color: var(--muted-2); font-size: 9.2px; }

.reminder-drawer__list { display: flex; flex-direction: column; gap: 8px; }

.ai-tip--wide {
  padding: 13px 14px 12px;
  border-color: var(--line);
  background: var(--surface-2);
}

.ai-tip--wide .ai-tip__icon { background: var(--accent-soft); color: var(--accent); }
.ai-tip--wide .ai-tip__kind { color: var(--muted-2); }
.ai-tip--wide .ai-tip__priority { background: var(--accent-soft); color: var(--accent); }
.ai-tip--wide h3 { color: var(--ink); font-size: 13.6px; }
.ai-tip--wide p { color: var(--muted); font-size: 11.2px; -webkit-line-clamp: 4; }
.ai-tip--wide .ai-tip__tags span { border-color: var(--line); color: var(--muted-2); }
.ai-tip--wide .ai-tip__foot { padding-top: 9px; }
.ai-tip--wide .ai-tip__deep { border-color: var(--line-strong); color: var(--muted); }
.ai-tip--wide .ai-tip__deep:hover { border-color: #e5bca9; color: var(--accent); }
.ai-tip--wide .ai-tip__deep svg { color: var(--accent); }

.reminder-offline-note {
  margin-top: 10px;
  padding: 9px 10px;
  border: 1px solid #f0ddc0;
  border-radius: 7px;
  background: #fff8e9;
  color: #9a733b;
  font-size: 10px;
  line-height: 1.55;
}

/* AI deep read */
.ai-read-modal { width: min(620px, calc(100vw - 32px)); }
.ai-read-modal .modal__sub { max-width: 500px; line-height: 1.6; }

.ai-read__context {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10.6px;
}

.ai-read__context .ai-tip__icon { width: 25px; height: 25px; background: var(--accent-soft); color: var(--accent); }
.ai-read__context .ai-tip__icon svg { width: 12px; height: 12px; }

.ai-read__loading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11.8px;
}

.ai-read__loading span {
  width: 22px;
  height: 22px;
  flex: none;
  border: 2px solid var(--line-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.ai-read__reply {
  margin-top: 15px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 12.4px;
  line-height: 1.9;
}

.ai-read__reply strong { color: var(--ink); font-weight: 700; }
.ai-read__reply code { padding: 1px 4px; border-radius: 3px; background: var(--surface-3); color: var(--accent-strong); font-family: ui-monospace, monospace; font-size: 11.2px; }

.ai-read__error {
  margin-top: 15px;
  padding: 13px 14px;
  border: 1px solid #f0d9ca;
  border-radius: 9px;
  background: #fff8f2;
  color: #8c5a40;
  font-size: 11.2px;
  line-height: 1.6;
}

.ai-read__error b { display: block; color: #6e4632; font-size: 12.4px; }
.ai-read__error p { margin-top: 4px; }
.ai-read__error .text-action { display: inline-flex; margin-top: 7px; }
.ai-read__error .ai-read__fallback { color: #a58b79; font-size: 10px; }

@media (max-width: 1180px) {
  .ai-reminder__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .ai-reminder__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ai-reminder__grid .ai-tip:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .reminder-bell { width: 32px; height: 32px; margin-right: 2px; }
  .ai-reminder { padding: 15px 14px 11px; margin: 14px 0 11px; }
  .ai-reminder__top { flex-wrap: wrap; }
  .ai-reminder__mark { width: 34px; height: 34px; }
  .ai-reminder__copy h2 { font-size: 17.3px; }
  .ai-reminder__actions { width: 100%; padding-left: 46px; padding-top: 0; }
  .ai-reminder__grid { grid-template-columns: 1fr; margin-top: 12px; }
  .ai-reminder__grid .ai-tip:last-child:nth-child(odd) { grid-column: auto; }
  .ai-reminder__foot { align-items: flex-start; flex-direction: column; gap: 6px; }
  .ai-reminder__foot button { padding-left: 0; }
  .ai-reminder.is-loading { grid-template-columns: 1fr; min-height: 110px; }
  .ai-reminder__skeleton:first-child { grid-row: auto; height: 40px; }
  .reminder-drawer { width: 100vw; }
  .reminder-drawer .drawer__head { padding: 21px 18px 15px; }
  .reminder-drawer .drawer__body { padding-left: 18px; padding-right: 18px; }
}

@media (max-width: 430px) {
  .reminder-bell { display: none; }
  .ai-reminder__actions { padding-left: 0; }
  .ai-reminder__count { display: none; }
  .ai-reminder__copy p { font-size: 10.6px; }
  .ai-tip h3 { white-space: normal; }
  .ai-tip__foot { flex-wrap: wrap; }
  .ai-tip__primary, .ai-tip__deep { flex: 1; }
  .ai-read-modal { width: calc(100vw - 22px); padding: 19px 17px 17px; }
  .ai-read-modal .modal__foot { flex-wrap: wrap; }
  .ai-read-modal .modal__foot .button { flex: 1; }
}


/* ==========================================================================
   Voice, photo and report material
   ========================================================================== */

.note-wrap { position: relative; }

.note-wrap .field-textarea {
  padding-right: 74px;
  padding-bottom: 13px;
}

.voice-btn {
  position: absolute;
  right: 9px;
  bottom: 9px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 27px;
  padding: 0 8px;
  border: 1px solid #e6d8cc;
  border-radius: 5px;
  background: rgba(255, 254, 250, 0.94);
  color: #8b7769;
  font-size: 9.8px;
  font-weight: 550;
  transition: border-color 150ms ease, color 150ms ease, background 150ms ease;
}

.voice-btn:hover { border-color: #e4b8a4; color: var(--accent); }
.voice-btn svg { width: 12px; height: 12px; }

.voice-btn.is-recording {
  border-color: #e7a18c;
  background: var(--accent-soft);
  color: var(--accent);
  animation: voice-pulse 1.3s ease-in-out infinite;
}

@keyframes voice-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(237, 90, 42, 0.14); }
  50% { box-shadow: 0 0 0 5px rgba(237, 90, 42, 0.04); }
}

.follow-photos {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.photo-empty {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 58px;
  padding: 10px;
  border: 1px dashed #ded5c7;
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--muted-2);
  font-size: 9.8px;
  text-align: center;
}

.photo-empty svg { width: 14px; height: 14px; color: #b9aa9a; }

.photo-tile {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid #e7dfd4;
  border-radius: 7px;
  background: #f3eee6;
}

.photo-tile img { width: 100%; height: 100%; display: block; object-fit: cover; }

.photo-tile__remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(20, 24, 27, 0.6);
  color: #fff;
  backdrop-filter: blur(3px);
}

.photo-tile__remove svg { width: 8px; height: 8px; }
.photo-tile__remove:hover { background: var(--danger); }

.photo-tile__state {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 4px;
  background: rgba(20, 24, 27, 0.6);
  color: #fff;
  font-size: 7.9px;
  text-align: center;
}

.photo-tile.is-uploading img { opacity: 0.55; }
.photo-tile.is-error { border-color: #e7b6aa; }

.photo-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
}

.photo-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 9px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 10px;
  font-weight: 550;
}

.photo-action:hover { border-color: #e2b49f; color: var(--accent); }
.photo-action svg { width: 12px; height: 12px; color: var(--accent); }
.photo-actions > span { margin-left: auto; color: var(--muted-2); font-size: 8.5px; }

.timeline-photos {
  display: flex;
  gap: 5px;
  margin-top: 6px;
}

.timeline-photos img {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 5px;
}

/* Camera overlay */
.camera-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(9, 12, 15, 0.8);
  backdrop-filter: blur(5px);
}

.camera-card {
  width: min(560px, 100%);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 15px;
  background: #11161c;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.4);
}

.camera-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px 12px;
  color: #fff;
}

.camera-head span {
  display: block;
  color: rgba(255, 255, 255, 0.3);
  font-family: var(--font-num);
  font-size: 7.9px;
  letter-spacing: 0.14em;
}

.camera-head h3 { margin: 3px 0 0; font-size: 16.2px; font-weight: 650; }

.camera-head button {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.65);
}

.camera-head button:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }
.camera-head button svg { width: 11px; height: 11px; }

.camera-stage {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  margin: 0 12px;
  border-radius: 8px;
  background: #050709;
}

.camera-stage video { width: 100%; height: 100%; display: block; object-fit: cover; }

.camera-guide {
  position: absolute;
  inset: 11%;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 5px;
  pointer-events: none;
}

.camera-guide::before,
.camera-guide::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  border-color: #ff9e7d;
  border-style: solid;
}

.camera-guide::before { left: -1px; top: -1px; border-width: 2px 0 0 2px; border-radius: 4px 0 0 0; }
.camera-guide::after { right: -1px; bottom: -1px; border-width: 0 2px 2px 0; border-radius: 0 0 4px 0; }

.camera-hint {
  position: absolute;
  left: 50%;
  bottom: 12px;
  padding: 4px 8px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.45);
  color: rgba(255, 255, 255, 0.6);
  font-size: 8.5px;
  white-space: nowrap;
  transform: translateX(-50%);
}

.camera-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 22px 19px;
}

.camera-btn {
  min-width: 70px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 5px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 9.8px;
}

.camera-btn:hover { border-color: rgba(255, 255, 255, 0.25); color: #fff; }

.camera-shutter {
  width: 53px;
  height: 53px;
  display: grid;
  place-items: center;
  border: 3px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 5px rgba(237, 90, 42, 0.14);
}

.camera-shutter:hover { background: var(--accent-strong); }
.camera-shutter svg { width: 21px; height: 21px; }

/* Report builder */
.report-modal {
  width: min(900px, calc(100vw - 30px));
  max-height: 92vh;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 14px;
}

.report-toolbar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 16px 13px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.report-toolbar > div:first-child > span {
  display: block;
  color: var(--muted-2);
  font-family: var(--font-num);
  font-size: 7.9px;
  letter-spacing: 0.14em;
}

.report-toolbar h2 { margin: 2px 0 0; color: var(--ink); font-size: 16.2px; font-weight: 700; }
.report-toolbar__actions { display: flex; align-items: center; gap: 6px; }
.report-toolbar__actions .button { height: 30px; font-size: 10px; }
.report-toolbar__actions .button svg { width: 11px; height: 11px; }
.report-toolbar .modal__close { margin-left: 2px; }

.report-scroll {
  overflow-y: auto;
  padding: 17px;
  background: #ece8df;
  scrollbar-width: thin;
}

.report-sheet {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 28px 32px 20px;
  border: 1px solid #e5ded2;
  border-radius: 7px;
  background: #fffefa;
  box-shadow: 0 12px 40px rgba(45, 37, 20, 0.08);
}

.report-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--ink);
}

.report-brand {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--ink);
  font-size: 12.4px;
  font-weight: 750;
}

.report-brand__mark {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  margin-right: 3px;
  border-radius: 5px;
  background: var(--accent);
  color: #fff;
}

.report-brand__mark svg { width: 12px; height: 12px; }
.report-brand b { color: var(--accent); font-weight: inherit; }
.report-brand em {
  padding: 2px 4px;
  border: 1px solid #f0c8b8;
  border-radius: 3px;
  color: #c66a45;
  font-size: 7.3px;
  font-style: normal;
  font-weight: 500;
}

.report-head h1 { margin-top: 12px; color: var(--ink); font-size: 25px; font-weight: 780; letter-spacing: -0.8px; }
.report-head p { margin-top: 4px; color: var(--muted); font-size: 10.6px; }
.report-head__meta { flex: none; text-align: right; }
.report-head__meta span { display: block; color: var(--muted-2); font-family: var(--font-num); font-size: 7.9px; letter-spacing: 0.12em; }
.report-head__meta b { display: block; margin-top: 5px; color: var(--ink); font-family: var(--font-num); font-size: 13.6px; font-weight: 500; }
.report-head__meta small { display: block; margin-top: 3px; color: var(--muted-2); font-size: 7.9px; }

.report-kpis {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-top: 16px;
}

.report-kpis > div {
  padding: 10px 10px 9px;
  border: 1px solid #eee8dd;
  border-radius: 5px;
  background: #fbf8f2;
}

.report-kpis span { display: block; color: var(--muted-2); font-size: 8.5px; }
.report-kpis b { display: inline-block; margin-top: 5px; color: var(--ink); font-family: var(--font-num); font-size: 22.9px; font-weight: 500; line-height: 1; letter-spacing: -0.06em; }
.report-kpis small { margin-left: 2px; color: var(--muted-2); font-size: 7.9px; }

.report-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 11px;
}

.report-highlights span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 6px;
  border-radius: 3px;
  background: #f4f0e8;
  color: #756f65;
  font-size: 8.5px;
}

.report-highlights span svg { width: 8px; height: 8px; color: var(--jade); }

.report-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.report-card {
  padding: 12px 12px 11px;
  border: 1px solid #eee8dd;
  border-radius: 5px;
  background: #fffefa;
}

.report-card--wide { margin-top: 8px; }

.report-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.report-card__head h3 { color: var(--ink); font-size: 11.2px; font-weight: 700; }
.report-card__head span { color: var(--muted-2); font-size: 7.9px; }

.report-bar {
  display: grid;
  grid-template-columns: 47px minmax(0, 1fr) 25px;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.report-bar > span { overflow: hidden; color: var(--muted); font-size: 8.5px; text-overflow: ellipsis; white-space: nowrap; }
.report-bar > div { height: 4px; overflow: hidden; border-radius: 2px; background: #f0ece4; }
.report-bar > div i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #f4a082); }
.report-bar b { color: var(--ink-2); font-family: var(--font-num); font-size: 8.5px; font-weight: 500; text-align: right; }

.report-prefs { display: flex; flex-direction: column; gap: 5px; }
.report-prefs > div { display: flex; align-items: baseline; gap: 7px; padding: 5px 0; border-top: 1px solid #f3efe7; }
.report-prefs > div:first-child { border-top: 0; }
.report-prefs b { min-width: 40px; color: var(--ink); font-size: 9.8px; }
.report-prefs span { flex: 1; color: var(--muted); font-size: 9.2px; }
.report-prefs em { color: var(--accent); font-size: 7.9px; font-style: normal; }

.report-followups { display: flex; flex-direction: column; gap: 1px; }
.report-followups > div { padding: 7px 0; border-top: 1px solid #f3efe7; }
.report-followups > div:first-child { border-top: 0; padding-top: 0; }
.report-followup__top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.report-followup__top b { color: var(--ink); font-size: 9.8px; }
.report-followup__top span { color: var(--muted-2); font-size: 7.9px; }
.report-followups p { margin-top: 2px; color: var(--muted); font-size: 9.2px; line-height: 1.55; }
.report-deal {
  margin-top: 5px;
  padding: 5px 7px;
  border: 1px solid #ecd9cb;
  border-radius: 4px;
  background: #fff9f4;
  color: #8f6d5b;
  font-size: 7.9px;
  line-height: 1.55;
}

.report-followup__photos { display: flex; gap: 4px; margin-top: 5px; }
.report-followup__photos img { width: 42px; height: 42px; object-fit: cover; border-radius: 4px; }

.report-photo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid #f3efe7;
}

.report-photo { margin: 0; overflow: hidden; border: 1px solid #eee8dd; border-radius: 4px; background: #f7f3eb; }
.report-photo img { width: 100%; aspect-ratio: 4 / 3; display: block; object-fit: cover; }
.report-photo figcaption { padding: 3px 5px; color: var(--muted-2); font-size: 7.3px; }

.report-empty {
  padding: 12px;
  border: 1px dashed #e3dbcf;
  border-radius: 5px;
  background: #fbf8f2;
  color: var(--muted-2);
  font-size: 9.2px;
  line-height: 1.55;
  text-align: center;
}

.report-ai {
  margin-top: 9px;
  padding: 12px 13px;
  border: 1px solid #e9d8cb;
  border-radius: 5px;
  background: #fff8f2;
}

.report-ai__head { display: flex; align-items: center; gap: 7px; }
.report-ai__head > span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 6px; background: var(--accent); color: #fff; }
.report-ai__head > span svg { width: 12px; height: 12px; }
.report-ai__head b { display: block; color: var(--ink); font-size: 10px; }
.report-ai__head small { display: block; margin-top: 1px; color: var(--muted-2); font-size: 7.9px; }
.report-ai p { margin-top: 7px; color: #5f5b52; font-size: 10px; line-height: 1.75; }
.report-ai__loading { margin-top: 7px; color: var(--accent); font-size: 9.2px; }
.report-ai__error { margin-top: 7px; padding: 5px 7px; border-radius: 3px; background: #fce9e3; color: var(--danger); font-size: 8.5px; }

.report-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 17px;
  padding-top: 10px;
  border-top: 1px solid #eee8dd;
  color: var(--muted-2);
  font-family: var(--font-num);
  font-size: 7.9px;
}

.report-loading {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #ece8df;
  color: var(--muted);
  font-size: 10.6px;
}

.report-loading span {
  width: 24px;
  height: 24px;
  border: 2px solid #d9d2c6;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

@media (max-width: 900px) {
  .report-grid { grid-template-columns: 1fr 1fr; }
  .report-grid > .report-card:last-child { grid-column: 1 / -1; }
  .report-kpis { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 700px) {
  .report-modal { width: 100vw; max-height: 100vh; border-radius: 0; }
  .report-toolbar { align-items: flex-start; padding: 11px 13px; }
  .report-toolbar__actions { flex-wrap: wrap; justify-content: flex-end; }
  .report-toolbar__actions .button { height: 27px; padding: 0 7px; }
  .report-toolbar__actions .button svg { display: none; }
  .report-scroll { padding: 10px; }
  .report-sheet { padding: 20px 17px 14px; }
  .report-head { flex-direction: column; gap: 10px; }
  .report-head__meta { text-align: left; }
  .report-head h1 { font-size: 21.8px; }
  .report-kpis { grid-template-columns: repeat(3, 1fr); }
  .report-grid { grid-template-columns: 1fr; }
  .report-grid > .report-card:last-child { grid-column: auto; }
  .report-photo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .report-bar { grid-template-columns: 40px minmax(0, 1fr) 21px; }
  .follow-photos { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .photo-actions > span { display: none; }
  .camera-overlay { padding: 10px; }
  .camera-card { width: 100%; }
}

@media (max-width: 430px) {
  .report-toolbar__actions .button { font-size: 9.2px; }
  .report-kpis { grid-template-columns: 1fr 1fr; }
  .report-kpis > div:last-child { grid-column: 1 / -1; }
  .report-photo-grid { grid-template-columns: 1fr 1fr; }
  .follow-photos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media print {
  @page { size: A4; margin: 10mm; }
  body.printing-report * { visibility: hidden !important; }
  body.printing-report .report-sheet,
  body.printing-report .report-sheet * { visibility: visible !important; }
  body.printing-report .report-modal {
    position: static !important;
    display: block !important;
    width: 100% !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
    transform: none !important;
    animation: none !important;
  }
  body.printing-report .report-toolbar,
  body.printing-report .report-scroll { position: static !important; display: block !important; overflow: visible !important; padding: 0 !important; background: #fff !important; }
  body.printing-report .report-toolbar { display: none !important; }
  body.printing-report { overflow: visible !important; }
  body.printing-report .report-sheet { position: static !important; width: 100% !important; max-width: none !important; margin: 0 !important; border: 0 !important; box-shadow: none !important; }
  body.printing-report .report-card,
  body.printing-report .report-ai,
  body.printing-report .report-photo { break-inside: avoid; }
  body.printing-report .overlay-backdrop { display: none !important; }
  body.printing-report .report-photo img { max-height: 40mm; }
}


@media (max-width: 360px) {
  .page-head__actions { flex-wrap: wrap; }
  .page-head__actions .button { flex: 1 1 calc(50% - 5px); padding: 0 9px; font-size: 12.4px; }
  .page-head__actions .button--primary { flex-basis: 100%; }
}


/* ==========================================================================
   Repayment / overdue
   ========================================================================== */

.repayment-line {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 9px;
  padding: 7px 8px;
  border: 1px solid #eee7db;
  border-radius: 6px;
  background: #fbf8f2;
  color: var(--muted);
  font-size: 9.8px;
}

.repayment-line.is-overdue {
  border-color: #f0c8bd;
  background: #fff5f1;
}

.repayment-line__label { color: var(--muted-2); font-size: 8.5px; white-space: nowrap; }
.repayment-line b { color: var(--ink); font-family: var(--font-num); font-size: 11.8px; font-weight: 600; white-space: nowrap; }
.repayment-line b em { margin-left: 2px; color: var(--muted-2); font-family: var(--sans); font-size: 8.5px; font-style: normal; font-weight: 400; }
.repayment-line__divider { width: 1px; height: 13px; background: #e8e1d5; }
.repayment-line__hint { margin-left: auto; color: var(--muted-2); font-size: 8.5px; white-space: nowrap; }
.repayment-line.is-overdue .repayment-line__hint { color: #c26d58; }

.repayment-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 21px;
  padding: 0 6px;
  border: 1px solid #cfe7db;
  border-radius: 3px;
  background: #eef8f3;
  color: var(--jade);
  font-size: 8.5px;
  font-weight: 650;
  white-space: nowrap;
}

.repayment-status.is-overdue {
  border-color: #efc2b8;
  background: #fde9e4;
  color: var(--danger);
}

.repayment-status:hover { filter: brightness(.97); }
.repayment-status.is-overdue:hover { border-color: #df9c8e; }

.repayment-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.repayment-summary > div {
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
}

.repayment-summary span { display: block; color: var(--muted-2); font-size: 8.5px; }
.repayment-summary b { display: block; margin-top: 5px; color: var(--ink); font-family: var(--font-num); font-size: 14.7px; font-weight: 600; }
.repayment-summary .repayment-status { margin-top: 5px; }

.overdue-modal { width: min(470px, calc(100vw - 32px)); }

.overdue-hero {
  padding: 17px 18px;
  border-radius: 10px;
  background:
    radial-gradient(circle at 100% 0%, rgba(110, 231, 183, .13), transparent 14rem),
    linear-gradient(135deg, #1a2623, #22322c);
  color: #fff;
}

.overdue-hero.is-overdue {
  background:
    radial-gradient(circle at 100% 0%, rgba(237, 90, 42, .23), transparent 15rem),
    linear-gradient(135deg, #2a1d19, #3b241d);
}

.overdue-hero > span { color: rgba(255,255,255,.45); font-family: var(--font-num); font-size: 8.5px; letter-spacing: .1em; }
.overdue-hero b { display: block; margin-top: 5px; color: #fff; font-family: var(--font-num); font-size: 39.5px; font-weight: 500; line-height: 1; letter-spacing: -.06em; }
.overdue-hero b small { margin-left: 3px; color: rgba(255,255,255,.48); font-family: var(--sans); font-size: 10.6px; font-weight: 400; }
.overdue-hero p { margin-top: 7px; color: rgba(255,255,255,.55); font-size: 10.6px; line-height: 1.6; }
.overdue-hero.is-overdue p { color: rgba(255, 191, 173, .85); }

.overdue-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-top: 10px;
}

.overdue-grid > div {
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
}

.overdue-grid span { display: block; color: var(--muted-2); font-size: 8.5px; }
.overdue-grid b { display: block; margin-top: 5px; color: var(--ink); font-family: var(--font-num); font-size: 14.7px; font-weight: 600; }
.overdue-grid b em { margin-left: 2px; color: var(--muted-2); font-family: var(--sans); font-size: 8.5px; font-style: normal; font-weight: 400; }

.overdue-note {
  margin-top: 10px;
  padding: 9px 10px;
  border: 1px solid #d8e9df;
  border-radius: 6px;
  background: #f1f8f4;
  color: #5f7c6e;
  font-size: 9.8px;
  line-height: 1.65;
}

.overdue-note.is-danger {
  border-color: #f0cec4;
  background: #fff4f0;
  color: #a65b48;
}

@media (max-width: 430px) {
  .repayment-line__hint { display: none; }
  .repayment-line__divider { display: none; }
  .repayment-summary, .overdue-grid { grid-template-columns: 1fr 1fr; }
  .repayment-summary > div:last-child, .overdue-grid > div:last-child { grid-column: 1 / -1; }
  .overdue-hero b { font-size: 34.3px; }
}


/* ==========================================================================
   Deal information
   ========================================================================== */

.deal-section {
  padding: 12px 13px 11px;
  border: 1px solid #ecd8ca;
  border-radius: 9px;
  background: #fff9f4;
}

.deal-section .drawer__section-title { color: #8d5d47; }
.deal-section .drawer__section-title small { color: #bd8e78; }

.deal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.deal-field { min-width: 0; }
.deal-field--full { grid-column: 1 / -1; }
.deal-subhead {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
  padding-top: 9px;
  border-top: 1px solid #f0e2d6;
}
.deal-subhead span { color: #7f5d49; font-size: 10.6px; font-weight: 650; }
.deal-subhead small { color: #b08e7d; font-size: 7.9px; }
.deal-inline-hint { margin-top: 3px; color: #b59a8b; font-size: 7.9px; }
.deal-remaining {
  display: flex;
  align-items: center;
  height: 35px;
  padding: 0 9px;
  border: 1px solid #eadfd3;
  border-radius: 5px;
  background: #fbf8f2;
  color: #8c6a56;
  font-family: var(--font-num);
  font-size: 12.4px;
  font-weight: 550;
}

.deal-label {
  display: block;
  margin-bottom: 4px;
  color: #7f6a5e;
  font-size: 9.8px;
  font-weight: 550;
}

.deal-label em { margin-left: 2px; color: var(--danger); font-style: normal; }
.deal-field .field-input { height: 35px; font-size: 11.2px; background: #fff; }
.deal-field .field-input::placeholder { color: #c1b1a6; font-size: 10px; }

.deal-money { position: relative; }
.deal-money .field-input { padding-right: 31px; }
.deal-money > span {
  position: absolute;
  right: 9px;
  top: 50%;
  color: #a08b7e;
  font-size: 8.5px;
  pointer-events: none;
  transform: translateY(-50%);
}

.deal-hint { margin-top: 7px; color: #b08e7d; font-size: 8.5px; line-height: 1.55; }
.deal-section .field-error { margin-top: 7px; }

.deal-record {
  margin-top: 7px;
  padding: 8px 9px;
  border: 1px solid #ead8ca;
  border-radius: 6px;
  background: #fff9f4;
}

.deal-record__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #9a6e57;
  font-size: 9.2px;
}

.deal-record__head span { font-weight: 650; letter-spacing: 0.04em; }
.deal-record__head b { color: #a17a65; font-size: 8.5px; font-weight: 500; }

.deal-record__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px 10px;
  margin-top: 6px;
}

.deal-record__grid div { min-width: 0; }
.deal-record__grid span { display: block; color: #b19382; font-size: 7.9px; }
.deal-record__grid b { display: block; overflow: hidden; margin-top: 2px; color: #6e5a4f; font-size: 9.8px; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.deal-record__repayment { grid-column: 1 / -1; padding-top: 5px; border-top: 1px solid #f2e5da; }
.deal-record__repayment b em { color: var(--danger); font-style: normal; }

@media (max-width: 430px) {
  .deal-grid { grid-template-columns: 1fr; }
  .deal-field--full { grid-column: auto; }
}


/* ==========================================================================
   Customer handover
   ========================================================================== */

.transfer-modal { width: min(480px, calc(100vw - 32px)); }
.transfer-select { height: 40px; margin-bottom: 13px; background: var(--surface); }
.transfer-reason-label { margin-top: 0; }
.transfer-modal .field-textarea { min-height: 82px; background: var(--surface); }

.transfer-warning {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 10px;
  padding: 9px 10px;
  border: 1px solid #f0dfc2;
  border-radius: 6px;
  background: #fff9ec;
  color: #927044;
  font-size: 9.8px;
  line-height: 1.55;
}

.transfer-warning svg { width: 12px; height: 12px; flex: none; margin-top: 1px; }

.transfer-modal .field-error { margin-top: 8px; }
.transfer-modal .modal__foot { margin-top: 18px; }
.transfer-modal .modal__foot .button { flex: 1; }


/* ==========================================================================
   Customer tags
   ========================================================================== */

.filter-chip--key {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-color: #efd4c3;
  background: #fff8f2;
  color: #9a6048;
}

.filter-chip--key svg { width: 11px; height: 11px; color: var(--accent); }
.filter-chip--key b { min-width: 14px; padding: 1px 3px; border-radius: 3px; background: #f7e3d8; color: #a66348; font-family: var(--font-num); font-size: 8.5px; text-align: center; }
.filter-chip--key.is-active { border-color: var(--accent); background: var(--accent); color: #fff; }
.filter-chip--key.is-active svg, .filter-chip--key.is-active b { color: #fff; }
.filter-chip--key.is-active b { background: rgba(255,255,255,.2); }

.customer-label-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-top: 7px;
}

.customer-label {
  display: inline-flex;
  align-items: center;
  height: 21px;
  padding: 0 6px;
  border: 1px solid #eadfd3;
  border-radius: 3px;
  background: #fffaf5;
  color: #8b7465;
  font-size: 8.5px;
  font-weight: 550;
}

.customer-label.is-key {
  border-color: #f0c5b2;
  background: #fff0e9;
  color: #b55734;
}

.customer-label.is-key::before {
  content: "★";
  margin-right: 3px;
  font-size: 8.5px;
}

.customer-label:hover { border-color: #e5b89f; color: var(--accent); }
.customer-label-more { color: var(--muted-2); font-size: 8.5px; }

.tag-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tag-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 6px;
  border: 1px solid #ead9ca;
  border-radius: 4px;
  background: #fff9f4;
  color: #a46b50;
  font-size: 9.2px;
  font-weight: 550;
}

.tag-edit-btn svg { width: 9px; height: 9px; color: var(--accent); }
.tag-edit-btn:hover { border-color: #e4b49d; color: var(--accent); }

.tag-list { display: flex; flex-wrap: wrap; gap: 5px; }
.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 22px;
  padding: 2px 7px;
  border: 1px solid #eadfd3;
  border-radius: 4px;
  background: #fbf8f2;
  color: #7f746a;
  font-size: 9.8px;
}
.tag-pill.is-key { border-color: #f0c5b2; background: #fff0e9; color: #b55734; }
.tag-pill button { display: grid; place-items: center; width: 14px; height: 14px; padding: 0; border-radius: 50%; color: #b19382; font-size: 12.4px; line-height: 1; }
.tag-pill button:hover { background: #f2e6da; color: var(--danger); }

.tag-empty {
  display: block;
  padding: 8px 9px;
  border: 1px dashed #e3dbcf;
  border-radius: 5px;
  background: #fbf8f2;
  color: var(--muted-2);
  font-size: 9.8px;
  line-height: 1.5;
}

.tag-modal { width: min(520px, calc(100vw - 32px)); }
.tag-modal__label { display: flex; align-items: center; justify-content: space-between; margin: 3px 0 7px; color: #8f7d70; font-size: 9.8px; font-weight: 600; }
.tag-modal__label span { color: var(--muted-2); font-size: 8.5px; font-weight: 400; }

.tag-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tag-choice {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 30px;
  padding: 0 9px;
  border: 1px solid #e5dbcf;
  border-radius: 5px;
  background: #fff;
  color: #766b61;
  font-size: 10px;
}
.tag-choice:hover { border-color: #e5b89f; color: var(--accent); }
.tag-choice.is-selected { border-color: #f0bda8; background: #fff0e9; color: #b55734; }
.tag-choice svg { width: 9px; height: 9px; }

.tag-custom { display: flex; gap: 6px; margin-bottom: 13px; }
.tag-custom .field-input { flex: 1; height: 35px; background: #fff; font-size: 10.6px; }
.tag-custom .button { height: 35px; padding: 0 10px; font-size: 10px; }

.tag-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 40px;
  padding: 9px;
  border: 1px solid #ece4d8;
  border-radius: 6px;
  background: #fbf8f2;
}

.tag-hint {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  margin-top: 10px;
  padding: 8px 9px;
  border-radius: 5px;
  background: #fff8ec;
  color: #a17b4b;
  font-size: 9.2px;
  line-height: 1.55;
}
.tag-hint svg { width: 11px; height: 11px; flex: none; margin-top: 1px; color: #d39a45; }
.tag-modal .field-error { margin-top: 8px; }


/* Refined brand mark tile */
.brand__mark, .login-brand__mark, .portal-login__mark, .screen-brand__mark, .hud-brand__mark {
  background: linear-gradient(145deg, #ff7b48 0%, #f05a28 48%, #dc4618 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 7px 18px rgba(230, 72, 26, 0.26) !important;
}
.brand__mark svg, .login-brand__mark svg, .portal-login__mark svg, .screen-brand__mark svg, .hud-brand__mark svg {
  filter: drop-shadow(0 1px 1px rgba(100, 25, 0, 0.18));
}


/* Mobile adaptation: sales workspace */
@media (max-width: 860px) {
  html, body { overflow-x: hidden; }
  .sales-nav { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .sales-nav::-webkit-scrollbar { display: none; }
  .sales-nav__item { flex: 0 0 auto; white-space: nowrap; }
}
@media (max-width: 520px) {
  .brand__name { font-size: 19px; letter-spacing: -.4px; }
  .brand__tagline, .brand__divider, .brand__company { display: none; }
  .account__text { display: none; }
  .sales-nav { gap: 22px; }
  .page-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .page-head__actions { width: 100%; flex-wrap: wrap; }
}


/* Mobile sales app tab bar */
.sales-tabbar { display: none; }
@media (max-width: 760px) {
  .topbar__inner {
    height: 58px;
    min-height: 58px;
    grid-template-columns: 1fr auto;
    grid-template-rows: 58px;
    padding-top: 0;
  }
  .sales-nav { display: none !important; }
  .page { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  .site-footer { display: none; }
  .sales-tabbar {
    position: fixed;
    z-index: 90;
    left: 0; right: 0; bottom: 0;
    display: flex;
    align-items: stretch;
    padding: 7px 10px calc(7px + env(safe-area-inset-bottom));
    background: rgba(22, 28, 34, .97);
    border-top: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 -10px 30px rgba(21, 24, 27, .16);
    backdrop-filter: blur(18px);
  }
  .sales-tab {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 0;
    height: 54px;
    border-radius: 12px;
    color: rgba(255, 255, 255, .46);
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
  }
  .sales-tab > span {
    width: 27px; height: 27px;
    display: grid; place-items: center;
    border-radius: 9px;
  }
  .sales-tab svg { width: 21px; height: 21px; }
  .sales-tab em { font-style: normal; font-size: 9.5px; white-space: nowrap; }
  .sales-tab.is-active { color: #ffb08e; }
  .sales-tab.is-active > span { background: rgba(240, 90, 42, .18); color: #ff9b73; }
  .sales-tab.is-active::before {
    content: "";
    position: absolute;
    top: -7px; left: 50%;
    width: 18px; height: 2px;
    border-radius: 2px;
    background: #f26a3d;
    transform: translateX(-50%);
  }
}


/* Mobile enterprise name in topbar */
@media (max-width: 760px) {
  .topbar .brand {
    min-width: 0;
    max-width: calc(100vw - 106px);
    overflow: hidden;
  }
  .topbar .brand__name { flex: none; }
  .topbar .brand__company {
    display: inline-block;
    max-width: 118px;
    margin-left: 8px;
    padding-left: 8px;
    overflow: hidden;
    border-left: 1px solid rgba(255, 255, 255, .16);
    color: rgba(255, 255, 255, .62);
    font-size: 10px;
    font-weight: 550;
    letter-spacing: .04em;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
@media (max-width: 380px) {
  .topbar .brand__company { max-width: 78px; }
}


/* Distinct workflow icon tones */
.flow-step--visit.is-pending .flow-step__node {
  border-color: #d8e5f8;
  background: #f2f7ff;
  color: #4f7fc9;
}
.flow-step--deal.is-pending .flow-step__node {
  border-color: #efdfba;
  background: #fff9e9;
  color: #b98522;
}
.flow-step--visit.is-pending .flow-step__text small { color: #738db5; }
.flow-step--deal.is-pending .flow-step__text small { color: #a28a56; }
