/* KAM Inquiry Panel: design system.
   Light, Apple-grade: grouped surfaces, frosted glass chrome, large titles, spring motion, activity rings.
   One stylesheet serves the mobile-first KAM panel (.kam) and the desktop Admin panel (.adm). */

/* ------------------------------------------------------------------ Tokens */
:root {
  color-scheme: light;
  --bg: #F2F2F7;
  --bg-elev: #FFFFFF;
  --bg-soft: #F7F7FA;
  --fill: rgba(118, 118, 128, .12);
  --fill-2: rgba(118, 118, 128, .08);
  --fill-3: rgba(118, 118, 128, .18);
  --label: #1D1D1F;
  --label-2: #6E6E73;
  --label-3: #8E8E93;
  --sep: rgba(60, 60, 67, .12);
  --sep-2: rgba(60, 60, 67, .2);

  --accent: #0071E3;
  --accent-press: #0062C4;
  --accent-soft: rgba(0, 113, 227, .1);
  --accent-text: #0066CC;
  --green: #1E8E3E;  --green-fill: #34C759; --green-soft: rgba(52, 199, 89, .14);
  --orange: #B35C00; --orange-fill: #FF9500; --orange-soft: rgba(255, 149, 0, .15);
  --red: #D70015;    --red-fill: #FF3B30;   --red-soft: rgba(255, 59, 48, .11);
  --indigo: #5856D6; --indigo-soft: rgba(88, 86, 214, .12);
  --teal: #0A7E8C;   --teal-soft: rgba(48, 176, 199, .14);
  --purple: #A240CF;
  --foton: #005BAC;   /* Foton brand blue */
  --mahindra: #E31837; /* Mahindra brand red */
  --ontime: #34C759;

  --r-xl: 28px; --r-lg: 22px; --r: 16px; --r-sm: 12px; --r-xs: 9px;
  --shadow-1: 0 1px 1px rgba(0, 0, 0, .02), 0 4px 14px rgba(0, 0, 0, .045);
  --shadow-2: 0 2px 4px rgba(0, 0, 0, .04), 0 12px 32px rgba(0, 0, 0, .08);
  --shadow-float: 0 14px 44px rgba(15, 20, 40, .16), 0 3px 8px rgba(15, 20, 40, .08);
  --glass: rgba(249, 249, 251, .84);
  --glass-strong: rgba(255, 255, 255, .86);
  --glass-edge: rgba(255, 255, 255, .7);
  --blur: saturate(180%) blur(22px);

  --spring: cubic-bezier(.32, .72, 0, 1);
  --out: cubic-bezier(.22, 1, .36, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI Variable Text", "Segoe UI", Roboto, "Nirmala UI", "Noto Sans Bengali", sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI Variable Display", "Segoe UI", Roboto, "Nirmala UI", sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
}

/* ------------------------------------------------------------------ Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--label);
  font-family: var(--font); font-size: 15px; line-height: 1.47; letter-spacing: -.011em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss03";
}
h1, h2, h3, h4, p, figure { margin: 0; }
a { color: var(--accent-text); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
img, svg { max-width: 100%; }
.ic { flex: none; display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid rgba(0, 113, 227, .45); outline-offset: 2px; border-radius: 10px; }
::selection { background: rgba(0, 113, 227, .18); }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: .9em; letter-spacing: -.02em; }
.muted { color: var(--label-2); }
.faint { color: var(--label-3); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.nowrap { white-space: nowrap; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row-flex { display: flex; align-items: center; gap: 10px; }
.wrap-flex { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pressable { transition: transform .25s var(--spring), background-color .2s, box-shadow .25s, opacity .2s; -webkit-tap-highlight-color: transparent; }
.pressable:active { transform: scale(.97); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Motion: page transitions (View Transitions API, progressive) ----------
   KAM panel pushes forward / pops back like iOS navigation; tabs and admin pages cross-fade.
   Inquiry names morph from the list into the detail title; the active tab pill glides between tabs. */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  @view-transition { navigation: auto; }
  ::view-transition-group(*) { animation-duration: .46s; animation-timing-function: var(--spring); }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .28s; animation-timing-function: var(--out); }
  ::view-transition-old(root) { animation-name: vt-fade-out; }
  ::view-transition-new(root) { animation-name: vt-fade-in; }
  html.p-kam[data-nav="forward"]::view-transition-old(root) { animation: vt-push-out .42s var(--spring) both; }
  html.p-kam[data-nav="forward"]::view-transition-new(root) { animation: vt-push-in .46s var(--spring) both; }
  html.p-kam[data-nav="back"]::view-transition-old(root) { animation: vt-pop-out .4s var(--spring) both; }
  html.p-kam[data-nav="back"]::view-transition-new(root) { animation: vt-pop-in .44s var(--spring) both; }
  html.p-adm::view-transition-new(root) { animation: vt-rise-in .32s var(--out) both; }
  ::view-transition-old(tabbar), ::view-transition-new(tabbar), ::view-transition-old(sidebar), ::view-transition-new(sidebar), ::view-transition-old(navbar), ::view-transition-new(navbar) { animation: none; }
  ::view-transition-group(tab-pill), ::view-transition-group(side-pill) { animation-duration: .5s; animation-timing-function: var(--spring); }
}
@keyframes vt-fade-out { to { opacity: 0; } }
@keyframes vt-fade-in { from { opacity: 0; } }
@keyframes vt-rise-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes vt-push-in { from { transform: translateX(32%); opacity: 0; } }
@keyframes vt-push-out { to { transform: translateX(-14%); opacity: 0; filter: brightness(.96); } }
@keyframes vt-pop-in { from { transform: translateX(-16%); opacity: 0; } }
@keyframes vt-pop-out { to { transform: translateX(34%); opacity: 0; } }
.tabbar { view-transition-name: tabbar; }
.sidebar { view-transition-name: sidebar; }
.navbar { view-transition-name: navbar; }

/* Entrance and scroll motion. Content is visible without JS; app.js opts elements in. */
@media (prefers-reduced-motion: no-preference) {
  .st-in { animation: st-rise .42s var(--out) both; animation-delay: calc(min(var(--i, 0), 14) * 32ms); }
  .rv { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--out), transform .7s var(--spring); }
  .rv.rv-in { opacity: 1; transform: none; }
}
@keyframes st-rise { from { opacity: 0; transform: translateY(10px) scale(.985); } }

/* ------------------------------------------------------------------ Type */
.large-title { font-family: var(--font-display); font-size: 34px; line-height: 1.12; font-weight: 700; letter-spacing: -.028em; text-wrap: balance; }
.title-1 { font-family: var(--font-display); font-size: 28px; line-height: 1.15; font-weight: 700; letter-spacing: -.025em; }
.title-2 { font-family: var(--font-display); font-size: 22px; line-height: 1.2; font-weight: 700; letter-spacing: -.022em; text-wrap: balance; }
.title-3 { font-size: 19px; line-height: 1.25; font-weight: 650; letter-spacing: -.018em; }
.headline { font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
.subhead { font-size: 15px; color: var(--label-2); }
.footnote { font-size: 13px; color: var(--label-2); letter-spacing: -.005em; }
.caption { font-size: 12px; color: var(--label-3); letter-spacing: 0; }
.eyebrow { font-size: 12.5px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--label-2); }

/* ------------------------------------------------------------------ Buttons */
.btn {
  --h: 44px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: var(--h); padding: 0 18px; border-radius: 999px; border: 0;
  font-size: 15px; font-weight: 600; letter-spacing: -.016em; white-space: nowrap; text-decoration: none;
  background: var(--fill); color: var(--accent-text);
  transition: transform .25s var(--spring), background-color .2s, box-shadow .2s, opacity .2s, color .2s;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.btn:active { transform: scale(.96); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.btn-filled { background: var(--accent); color: #fff; box-shadow: 0 1px 2px rgba(0, 80, 180, .25), inset 0 1px 0 rgba(255, 255, 255, .18); }
.btn-filled:hover { background: var(--accent-press); }
.btn-tinted { background: var(--accent-soft); color: var(--accent-text); }
.btn-tinted:hover { background: rgba(0, 113, 227, .15); }
.btn-gray { background: var(--fill); color: var(--label); }
.btn-gray:hover { background: var(--fill-3); }
.btn-white { background: var(--bg-elev); color: var(--label); box-shadow: var(--shadow-1), inset 0 0 0 .5px var(--sep); }
.btn-white:hover { background: var(--bg-soft); }
.btn-plain { background: transparent; color: var(--accent-text); padding: 0 6px; }
.btn-danger { background: var(--red-fill); color: #fff; }
.btn-danger-tinted { background: var(--red-soft); color: var(--red); }
.btn-green { background: var(--green-fill); color: #04310f; }
.btn-dark { background: var(--label); color: #fff; }
.btn-lg { --h: 52px; font-size: 17px; padding: 0 24px; }
.btn-sm { --h: 34px; font-size: 13.5px; padding: 0 13px; gap: 5px; }
.btn-xs { --h: 28px; font-size: 12.5px; padding: 0 10px; gap: 4px; }
.btn-block { width: 100%; }
.btn.is-loading { pointer-events: none; color: transparent !important; position: relative; }
.btn.is-loading::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .5); border-top-color: #fff; animation: spin .7s linear infinite; }
.btn-gray.is-loading::after, .btn-tinted.is-loading::after, .btn-white.is-loading::after { border-color: var(--fill-3); border-top-color: var(--accent); }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn {
  width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 50%;
  border: 0; background: var(--fill); color: var(--accent-text); position: relative;
  transition: transform .25s var(--spring), background-color .2s;
}
.icon-btn:active { transform: scale(.9); }
.icon-btn:hover { background: var(--fill-3); }
.icon-btn.glass { background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: inset 0 0 0 .5px var(--sep); }
.dot-count {
  position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--red-fill); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center;
  box-shadow: 0 0 0 2px var(--bg-elev); font-style: normal; font-variant-numeric: tabular-nums; letter-spacing: 0;
}

/* ------------------------------------------------------------------ Chips, badges, avatars */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px 0 8px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--fill-2); color: var(--label); white-space: nowrap; letter-spacing: -.005em; }
.chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--label-3); flex: none; }
.chip.stage-qualified i { background: var(--teal); }
.chip.stage-quoted i { background: var(--accent); }
.chip.stage-negotiation i { background: var(--indigo); }
.chip.stage-won { background: var(--green-soft); color: var(--green); }
.chip.stage-won i { background: var(--green-fill); }
.chip.stage-lost { background: var(--red-soft); color: var(--red); }
.chip.stage-lost i { background: var(--red-fill); }
.chip.stage-hold { background: var(--orange-soft); color: var(--orange); }
.chip.stage-hold i { background: var(--orange-fill); }
.badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 7px; font-size: 12px; font-weight: 600; white-space: nowrap; letter-spacing: -.005em; background: var(--fill-2); color: var(--label-2); }
.badge .ic { width: 12px; height: 12px; }
.tone-red, .prio-hot { background: var(--red-soft); color: var(--red); }
.tone-orange, .prio-warm { background: var(--orange-soft); color: var(--orange); }
.tone-blue { background: var(--accent-soft); color: var(--accent-text); }
.tone-green { background: var(--green-soft); color: var(--green); }
.tone-indigo { background: var(--indigo-soft); color: var(--indigo); }
.prio-cold { background: var(--teal-soft); color: var(--teal); }
.tone-gray { background: var(--fill-2); color: var(--label-2); }
.avatar { width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; color: #fff; letter-spacing: .01em; background: linear-gradient(160deg, #9BA3B4, #6E7687); }
.avatar.sm { width: 24px; height: 24px; font-size: 10px; }
.avatar.lg { width: 44px; height: 44px; font-size: 16px; }
.avatar.xl { width: 64px; height: 64px; font-size: 22px; }
.avatar.hue-0 { background: linear-gradient(160deg, #5AC8FA, #0071E3); }
.avatar.hue-1 { background: linear-gradient(160deg, #A78BFA, #5856D6); }
.avatar.hue-2 { background: linear-gradient(160deg, #6EE7B7, #1E9E5A); }
.avatar.hue-3 { background: linear-gradient(160deg, #FDBA74, #F97316); }
.avatar.hue-4 { background: linear-gradient(160deg, #F9A8D4, #DB2777); }
.avatar.hue-5 { background: linear-gradient(160deg, #67E8F9, #0E7490); }

/* ------------------------------------------------------------------ Surfaces & grouped lists */
.card { background: var(--bg-elev); border-radius: var(--r-lg); box-shadow: var(--shadow-1); position: relative; }
.card-pad { padding: 18px; }
.section { display: flex; flex-direction: column; gap: 8px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 0 4px; }
.section-head h2 { font-size: 20px; font-weight: 700; letter-spacing: -.022em; font-family: var(--font-display); }
.section-head .link { font-size: 15px; font-weight: 500; }
.group-label { font-size: 13px; font-weight: 500; color: var(--label-2); text-transform: uppercase; letter-spacing: .03em; padding: 0 16px; }
.group-label.red { color: var(--red); }
.group-note { font-size: 13px; color: var(--label-2); padding: 0 16px; }
.list { background: var(--bg-elev); border-radius: var(--r-lg); box-shadow: var(--shadow-1); overflow: hidden; }
.row {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; min-height: 52px; position: relative;
  color: inherit; text-decoration: none; background: var(--bg-elev); width: 100%; text-align: left; border: 0;
  transition: background-color .15s;
}
.row + .row::before, .row-wrap + .row-wrap::before { content: ""; position: absolute; top: 0; right: 0; left: var(--inset, 16px); height: .5px; background: var(--sep-2); }
a.row:hover, button.row:hover { background: #FAFAFC; }
a.row:active, button.row:active { background: #EFEFF4; }
.row-ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: #fff; flex: none; }
.row-ic .ic { width: 17px; height: 17px; }
.row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.row-title { font-size: 16px; font-weight: 600; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { font-size: 13.5px; color: var(--label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 5px; }
.row-trail { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex: none; text-align: right; }
.row-trail .val { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.chev { color: var(--label-3); opacity: .7; flex: none; }
.kv-row { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; padding: 12px 16px; font-size: 15px; position: relative; }
.kv-row + .kv-row::before { content: ""; position: absolute; top: 0; right: 0; left: 16px; height: .5px; background: var(--sep-2); }
.kv-row dt { color: var(--label-2); }
.kv-row dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.kv-row dd small { display: block; color: var(--label-2); font-size: 13.5px; }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 34px 20px; color: var(--label-2); font-size: 14.5px; }
.empty .em-ic { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: var(--fill-2); color: var(--label-3); margin-bottom: 6px; }
.empty b { color: var(--label); font-size: 17px; font-weight: 600; }

/* ------------------------------------------------------------------ Forms */
.form { display: flex; flex-direction: column; gap: 22px; }
.fgroup { display: flex; flex-direction: column; gap: 7px; }
.fcard { background: var(--bg-elev); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.frow { padding: 11px 16px 12px; display: flex; flex-direction: column; gap: 6px; position: relative; min-width: 0; }
.frow:focus-within { z-index: 6; }
.frow + .frow::before { content: ""; position: absolute; top: 0; right: 0; left: 16px; height: .5px; background: var(--sep-2); }
.frow > label, .frow > .flabel { font-size: 13px; font-weight: 500; color: var(--label-2); letter-spacing: -.003em; }
.req { color: var(--red); margin-left: 2px; }
.frow.inline { flex-direction: row; align-items: center; gap: 12px; }
.frow.inline > label, .frow.inline > .flabel { flex: none; width: 112px; font-size: 15px; color: var(--label); font-weight: 400; }
.input {
  width: 100%; min-width: 0; height: 44px; border: 0; border-radius: var(--r-sm); background: var(--fill-2);
  padding: 0 14px; font-size: 16px; color: var(--label); outline: none; -webkit-appearance: none; appearance: none;
  transition: background-color .2s, box-shadow .2s;
}
.input::placeholder { color: var(--label-3); }
.input:focus { background: var(--bg-elev); box-shadow: 0 0 0 1px rgba(0, 113, 227, .55), 0 0 0 4px rgba(0, 113, 227, .14); }
.input.plain { background: transparent; padding: 0; height: 30px; border-radius: 0; }
.input.plain:focus { box-shadow: none; }
textarea.input { height: auto; min-height: 92px; padding: 11px 14px; line-height: 1.45; resize: vertical; }
select.input { padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238E8E93' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; text-overflow: ellipsis; }
input[type="date"].input, input[type="time"].input { min-width: 0; }
.input.money { font-variant-numeric: tabular-nums; }
.has-error .input, .has-error .segmented { box-shadow: 0 0 0 1.5px var(--red-fill); background: #FFF6F5; border-radius: var(--r-sm); }
.has-error .choice span { background: #FFF1F0; }
.field-error { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--red); font-weight: 500; }
.field-help { font-size: 12.5px; color: var(--label-3); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.check-row { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; cursor: pointer; }
.check-row small { display: block; color: var(--label-2); font-size: 13px; }
.switch { position: relative; width: 51px; height: 31px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--fill-3); transition: background-color .25s; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, .15), 0 1px 1px rgba(0, 0, 0, .16); transition: transform .3s var(--spring); }
.switch input:checked + span { background: var(--green-fill); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 3px solid rgba(0, 113, 227, .45); outline-offset: 2px; }

/* Segmented control with a sliding thumb */
.segmented { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); background: var(--fill); border-radius: 11px; padding: 2px; isolation: isolate; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label, .segmented a, .segmented button { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 0 10px; border: 0; background: none; font-size: 14px; font-weight: 500; color: var(--label); border-radius: 9px; cursor: pointer; text-decoration: none; white-space: nowrap; transition: color .2s; letter-spacing: -.012em; }
.segmented .is-on, .segmented input:checked + label { font-weight: 600; }
.segmented .thumb { position: absolute; z-index: 0; top: 2px; bottom: 2px; left: 0; width: 0; border-radius: 9px; background: var(--bg-elev); box-shadow: 0 3px 8px rgba(0, 0, 0, .12), 0 3px 1px rgba(0, 0, 0, .04), inset 0 0 0 .5px rgba(0, 0, 0, .04); transform: translateX(var(--x, 2px)); width: var(--w, 0); transition: transform .4s var(--spring), width .4s var(--spring); }
.segmented.lg label { min-height: 40px; font-size: 15px; }

/* Selectable chips (radio / checkbox look) */
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 999px; background: var(--fill-2); font-size: 14px; font-weight: 500; color: var(--label); transition: background-color .2s, color .2s, box-shadow .2s, transform .25s var(--spring); }
.choice span .ic { width: 16px; height: 16px; color: var(--label-2); }
.choice input:checked + span { background: var(--accent); color: #fff; box-shadow: 0 2px 8px rgba(0, 113, 227, .3); }
.choice input:checked + span .ic { color: #fff; }
.choice input:focus-visible + span { outline: 3px solid rgba(0, 113, 227, .45); outline-offset: 2px; }
.choice:active span { transform: scale(.95); }
button.choice { border: 0; background: none; padding: 0; }
button.choice.is-on span { background: var(--accent); color: #fff; box-shadow: 0 2px 8px rgba(0, 113, 227, .3); }
.choices.tone-check .choice input:checked + span { background: var(--label); box-shadow: none; }

/* Option cards (stage picker, payment options) */
.opt-cards { display: flex; flex-direction: column; gap: 8px; }
.opt-card { position: relative; display: block; }
.opt-card input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.opt-card input:disabled { cursor: not-allowed; }
.opt-card .oc { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r); background: var(--bg-elev); box-shadow: inset 0 0 0 1px var(--sep); transition: box-shadow .2s, background-color .2s, transform .25s var(--spring); }
.opt-card .oc-ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--fill-2); color: var(--label-2); flex: none; }
.opt-card .oc b { display: block; font-size: 15.5px; font-weight: 600; letter-spacing: -.018em; }
.opt-card .oc small { display: block; font-size: 13px; color: var(--label-2); line-height: 1.35; }
.opt-card .oc .oc-trail { margin-left: auto; text-align: right; flex: none; }
.opt-card .oc .oc-trail b { font-variant-numeric: tabular-nums; }
.opt-card input:checked + .oc { box-shadow: inset 0 0 0 2px var(--accent); background: #F5F9FF; }
.opt-card input:checked + .oc .oc-ic { background: var(--accent); color: #fff; }
.opt-card input:disabled + .oc { opacity: .5; }
.opt-card input:focus-visible + .oc { outline: 3px solid rgba(0, 113, 227, .45); outline-offset: 2px; }
.opt-card:active .oc { transform: scale(.985); }
.opt-card.won .oc-ic { background: var(--green-soft); color: var(--green); }
.opt-card.lost .oc-ic { background: var(--red-soft); color: var(--red); }
.opt-card.hold .oc-ic { background: var(--orange-soft); color: var(--orange); }
.opt-card.won input:checked + .oc { box-shadow: inset 0 0 0 2px var(--green-fill); background: #F4FBF6; }
.opt-card.won input:checked + .oc .oc-ic { background: var(--green-fill); color: #fff; }
.opt-card.lost input:checked + .oc { box-shadow: inset 0 0 0 2px var(--red-fill); background: #FFF6F5; }
.opt-card.lost input:checked + .oc .oc-ic { background: var(--red-fill); color: #fff; }
.opt-card.hold input:checked + .oc { box-shadow: inset 0 0 0 2px var(--orange-fill); background: #FFF9F0; }
.opt-card.hold input:checked + .oc .oc-ic { background: var(--orange-fill); color: #fff; }
.reveal { display: none; }
.reveal.is-shown { display: flex; animation: rise .35s var(--out); }

/* Stepper */
.stepper { display: inline-flex; align-items: center; background: var(--fill-2); border-radius: 999px; height: 40px; flex: none; }
.stepper button { width: 40px; height: 40px; border: 0; background: transparent; display: grid; place-items: center; color: var(--accent-text); border-radius: 50%; transition: background-color .15s, transform .2s var(--spring); }
.stepper button:active { transform: scale(.85); background: var(--fill); }
.stepper input { width: 34px; border: 0; background: transparent; text-align: center; font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; outline: none; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Search */
.searchbar { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: var(--r-sm); background: var(--fill); color: var(--label-3); transition: box-shadow .2s, background-color .2s; }
.searchbar:focus-within { background: var(--bg-elev); box-shadow: 0 0 0 1px rgba(0, 113, 227, .5), 0 0 0 4px rgba(0, 113, 227, .12); }
.searchbar input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font-size: 16px; color: var(--label); }
.searchbar input::placeholder { color: var(--label-3); }
.searchbar kbd { font-family: var(--font); font-size: 12px; color: var(--label-3); background: var(--bg-elev); border-radius: 6px; padding: 1px 6px; box-shadow: inset 0 0 0 .5px var(--sep-2); }

/* Filter chips row */
.hscroll { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; scroll-padding-inline: 16px; margin: 0 -16px; padding: 2px 16px; }
.hscroll::-webkit-scrollbar { display: none; }
.fchip { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px; background: var(--bg-elev); box-shadow: inset 0 0 0 .5px var(--sep-2); font-size: 14px; font-weight: 500; color: var(--label); text-decoration: none; transition: background-color .2s, color .2s, transform .25s var(--spring); scroll-snap-align: start; }
.fchip:active { transform: scale(.95); }
.fchip .n { font-size: 12.5px; color: var(--label-3); font-variant-numeric: tabular-nums; }
.fchip.is-on { background: var(--label); color: #fff; box-shadow: none; }
.fchip.is-on .n { color: rgba(255, 255, 255, .6); }

/* ------------------------------------------------------------------ Activity rings & progress */
.rings svg { display: block; overflow: visible; }
.ring-track { opacity: .16; }
.ring-arc { animation: ring-fill 1.4s var(--out) both; animation-delay: var(--d, 0s); }
@keyframes ring-fill { from { stroke-dashoffset: var(--len); } }
.ring-legend { display: flex; flex-direction: column; gap: 12px; }
.ring-legend .rl { display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 0 10px; align-items: baseline; }
.ring-legend .rl i { width: 10px; height: 10px; border-radius: 50%; align-self: center; }
.ring-legend .rl b { font-size: 22px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; font-family: var(--font-display); }
.ring-legend .rl b small { font-size: 15px; color: var(--label-3); font-weight: 600; letter-spacing: -.01em; }
.ring-legend .rl span { grid-column: 2; font-size: 13px; color: var(--label-2); margin-top: -2px; }
.bar { height: 8px; border-radius: 999px; background: var(--fill-2); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: inherit; transform-origin: left; animation: grow 1s var(--out) both; }
@keyframes grow { from { transform: scaleX(0); } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes pop { 0% { transform: scale(.9); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

/* ------------------------------------------------------------------ Sheets & dialogs */
dialog { border: 0; padding: 0; color: inherit; background: transparent; max-width: none; max-height: none; }
dialog:not([open]) { display: none !important; }
dialog::backdrop { background: rgba(0, 0, 0, .32); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); animation: fade .3s var(--out); }
dialog.closing::backdrop { animation: fade-out .25s var(--out) forwards; }
.sheet { position: fixed; inset: auto 0 0 0; width: 100%; margin: 0; max-height: calc(100dvh - 40px - var(--safe-t)); display: flex; flex-direction: column; background: var(--bg); border-radius: 26px 26px 0 0; box-shadow: 0 -10px 40px rgba(0, 0, 0, .15); animation: sheet-in .5s var(--spring); overflow: hidden; }
.sheet.closing { animation: sheet-out .32s var(--out) forwards; }
.sheet-grab { width: 38px; height: 5px; border-radius: 3px; background: var(--fill-3); margin: 7px auto 0; flex: none; }
.sheet-head { flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 16px 12px; }
.sheet-head .sh-t { flex: 1; min-width: 0; }
.sheet-head h2 { font-size: 19px; font-weight: 700; letter-spacing: -.022em; }
.sheet-head p { font-size: 13.5px; color: var(--label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-body { flex: 1; overflow-y: auto; padding: 4px 16px 18px; overscroll-behavior: contain; }
.sheet-foot { flex: none; display: flex; gap: 10px; padding: 12px 16px calc(14px + var(--safe-b)); background: var(--glass-strong); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: 0 -.5px 0 var(--sep); }
.sheet-foot .btn { flex: 1; }
.sheet-foot .btn-gray { flex: 0 0 auto; }
@keyframes sheet-in { from { transform: translateY(100%); } }
@keyframes sheet-out { to { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
@media (min-width: 720px) {
  .sheet { inset: 0; margin: auto; width: min(560px, calc(100vw - 48px)); max-height: min(780px, calc(100dvh - 64px)); border-radius: 24px; animation: modal-in .45s var(--spring); }
  .sheet.closing { animation: modal-out .25s var(--out) forwards; }
  .sheet-grab { display: none; }
  .sheet-head { padding-top: 18px; }
  .sheet-foot { padding-bottom: 14px; }
  .sheet.wide { width: min(820px, calc(100vw - 48px)); }
}
@keyframes modal-in { from { opacity: 0; transform: translateY(18px) scale(.97); } }
@keyframes modal-out { to { opacity: 0; transform: translateY(10px) scale(.98); } }

/* Toast: a Dynamic Island that expands with the message */
.island { position: fixed; z-index: 1000; top: calc(10px + var(--safe-t)); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; min-height: 44px; max-width: min(92vw, 460px); padding: 8px 18px 8px 10px; border-radius: 999px; background: #0B0B0F; color: #fff; font-size: 14.5px; font-weight: 600; letter-spacing: -.015em; box-shadow: 0 12px 34px rgba(0, 0, 0, .28); animation: island-in .6s var(--spring) both; }
.island .is-ic { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--green-fill); color: #052e12; flex: none; }
.island.error .is-ic { background: var(--red-fill); color: #fff; }
.island.info .is-ic { background: var(--accent); color: #fff; }
.island.leaving { animation: island-out .45s var(--spring) forwards; }
@keyframes island-in { 0% { opacity: 0; transform: translateX(-50%) scale(.4, .6); filter: blur(4px); } 60% { opacity: 1; filter: blur(0); } 100% { transform: translateX(-50%) scale(1); } }
@keyframes island-out { to { opacity: 0; transform: translateX(-50%) scale(.5, .7); filter: blur(3px); } }

/* Confirm dialog */
.alert-dlg { margin: auto; width: min(320px, calc(100vw - 48px)); background: var(--glass-strong); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border-radius: 18px; overflow: hidden; text-align: center; animation: pop .3s var(--spring); box-shadow: var(--shadow-float); }
.alert-dlg .ad-body { padding: 20px 18px 16px; display: flex; flex-direction: column; gap: 4px; }
.alert-dlg h2 { font-size: 17px; font-weight: 600; }
.alert-dlg p { font-size: 13.5px; color: var(--label); }
.alert-dlg .ad-btns { display: grid; grid-template-columns: 1fr 1fr; border-top: .5px solid var(--sep-2); }
.alert-dlg .ad-btns button { border: 0; background: transparent; height: 46px; font-size: 17px; color: var(--accent-text); }
.alert-dlg .ad-btns button + button { border-left: .5px solid var(--sep-2); font-weight: 600; }
.alert-dlg .ad-btns button.danger { color: var(--red); }

/* ================================================================== KAM PANEL (mobile-first) */
.kam { background: var(--bg); min-height: 100dvh; }
.kam-shell { max-width: 720px; margin: 0 auto; min-height: 100dvh; position: relative; }
.aurora { position: absolute; z-index: 0; inset: 0 0 auto 0; height: 420px; overflow: hidden; pointer-events: none; }
.aurora::before, .aurora::after { content: ""; position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; }
.aurora::before { width: 340px; height: 340px; left: -80px; top: -140px; background: radial-gradient(circle, #8EC5FF 0%, rgba(142, 197, 255, 0) 70%); }
.aurora::after { width: 380px; height: 380px; right: -120px; top: -120px; background: radial-gradient(circle, #C4B5FD 0%, rgba(196, 181, 253, 0) 70%); }
.aurora i { position: absolute; width: 300px; height: 300px; left: 35%; top: 40px; border-radius: 50%; filter: blur(70px); opacity: .4; background: radial-gradient(circle, #99F6E4 0%, rgba(153, 246, 228, 0) 70%); }

.navbar { position: sticky; top: 0; z-index: 40; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; min-height: calc(52px + var(--safe-t)); padding: var(--safe-t) max(12px, var(--safe-r)) 0 max(12px, var(--safe-l)); transition: background-color .3s, box-shadow .3s, backdrop-filter .3s; }
.navbar .nb-l { display: flex; align-items: center; gap: 4px; min-width: 0; overflow: hidden; }
.navbar .nb-l .back-btn { max-width: 100%; }
.navbar .nb-r { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.navbar .nb-title { font-size: 17px; font-weight: 600; letter-spacing: -.022em; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 52vw; opacity: 0; transform: translateY(4px); transition: opacity .25s, transform .3s var(--spring); }
.navbar.is-solid, .navbar.always-solid { background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: 0 .5px 0 var(--sep-2); }
.navbar.is-solid .nb-title, .navbar.always-solid .nb-title { opacity: 1; transform: none; }
.back-btn { display: inline-flex; align-items: center; gap: 0; height: 40px; padding: 0 8px 0 0; color: var(--accent-text); font-size: 17px; font-weight: 400; letter-spacing: -.022em; text-decoration: none; border: 0; background: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.back-btn .ic { width: 28px; height: 28px; margin-left: -4px; stroke-width: 2.1; }
.kam-main { position: relative; z-index: 1; padding: 0 max(16px, var(--safe-r)) calc(118px + var(--safe-b)) max(16px, var(--safe-l)); display: flex; flex-direction: column; gap: 24px; }
.kam-main.no-tab { padding-bottom: calc(110px + var(--safe-b)); }
.page-top { display: flex; flex-direction: column; gap: 4px; padding-top: 2px; }
.page-top .eyebrow { color: var(--label-2); }

/* Floating glass tab bar */
.tabbar { position: fixed; z-index: 50; left: 50%; bottom: calc(12px + var(--safe-b)); transform: translateX(-50%); width: min(440px, calc(100vw - 24px)); height: 66px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center; padding: 0 6px; border-radius: 34px; background: rgba(255, 255, 255, .78); backdrop-filter: saturate(190%) blur(26px); -webkit-backdrop-filter: saturate(190%) blur(26px); box-shadow: 0 10px 40px rgba(20, 25, 50, .14), 0 1px 3px rgba(20, 25, 50, .08), inset 0 0 0 .5px rgba(255, 255, 255, .8), inset 0 1px 0 rgba(255, 255, 255, .9); }
.tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 56px; border-radius: 28px; color: var(--label-2); font-size: 10.5px; font-weight: 600; letter-spacing: -.005em; text-decoration: none; transition: color .2s, background-color .3s; -webkit-tap-highlight-color: transparent; }
.tab .ic { width: 25px; height: 25px; transition: transform .35s var(--spring); }
.tab:active .ic { transform: scale(.82); }
.tab.is-on { color: var(--accent); }
.tab > .ic { position: relative; z-index: 1; }
.tab .dot-count { z-index: 2; }
.tab-pill { position: absolute; inset: 3px 2px; border-radius: 26px; background: rgba(0, 113, 227, .1); view-transition-name: tab-pill; z-index: 0; }
.tab .dot-count { top: 3px; right: calc(50% - 22px); box-shadow: 0 0 0 2px rgba(255, 255, 255, .9); }
.tab-add { display: grid; place-items: center; }
.tab-add span { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(160deg, #2E8BFF 0%, #0062D6 100%); box-shadow: 0 8px 20px rgba(0, 98, 214, .4), inset 0 1px 0 rgba(255, 255, 255, .35); transition: transform .35s var(--spring), box-shadow .3s; }
.tab-add:active span { transform: scale(.88) rotate(90deg); }
.tab-add .ic { width: 26px; height: 26px; stroke-width: 2.2; }

/* Bottom glass action bar (detail, forms) */
.actionbar { position: fixed; z-index: 45; left: 50%; transform: translateX(-50%); bottom: calc(12px + var(--safe-b)); width: min(560px, calc(100vw - 24px)); display: flex; gap: 8px; padding: 8px; border-radius: 30px; background: rgba(255, 255, 255, .8); backdrop-filter: saturate(190%) blur(26px); -webkit-backdrop-filter: saturate(190%) blur(26px); box-shadow: 0 10px 40px rgba(20, 25, 50, .14), 0 1px 3px rgba(20, 25, 50, .08), inset 0 0 0 .5px rgba(255, 255, 255, .8); }
.actionbar .btn { flex: 1; --h: 48px; padding: 0 10px; font-size: 14.5px; }

/* Hot deal carousel */
.carousel { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; margin: 0 -16px; padding: 4px 16px 10px; scrollbar-width: none; }
.carousel::-webkit-scrollbar { display: none; }

/* Inquiry detail */
.d-hero { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.d-hero .org { font-size: 13.5px; color: var(--label-2); }
.d-value { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.d-value b { font-family: var(--font-display); font-size: 32px; font-weight: 700; letter-spacing: -.032em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.d-value span { font-size: 13.5px; color: var(--label-2); }
.progress { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.progress .ps { display: flex; flex-direction: column; gap: 7px; font-size: 11px; font-weight: 600; color: var(--label-3); letter-spacing: -.01em; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 400px) { .progress .ps { font-size: 10px; } }
.progress .ps i { height: 6px; border-radius: 3px; background: var(--fill); position: relative; overflow: hidden; }
.progress .ps.done i { background: var(--accent); }
.progress .ps.cur { color: var(--accent-text); }
.progress .ps.cur i { background: var(--accent); }
.progress .ps.cur i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .6), transparent); animation: shimmer 2.4s infinite; }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.progress.won .ps i { background: var(--green-fill); }
.progress.won .ps.cur { color: var(--green); }
.progress.lost .ps.cur i { background: var(--red-fill); }
.progress.lost .ps.cur { color: var(--red); }
.progress.hold .ps.cur i { background: var(--orange-fill); }
.progress.hold .ps.cur { color: var(--orange); }
.next-card { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.next-card .nc-when { display: flex; align-items: center; gap: 12px; }
.nc-date { width: 52px; height: 56px; border-radius: 14px; flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; background: linear-gradient(180deg, #fff, #F5F5F8); box-shadow: inset 0 0 0 .5px var(--sep-2), 0 2px 6px rgba(0, 0, 0, .05); overflow: hidden; }
.nc-date small { width: 100%; text-align: center; background: var(--red-fill); color: #fff; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 2px 0; }
.nc-date b { font-family: var(--font-display); font-size: 22px; font-weight: 700; flex: 1; display: grid; place-items: center; letter-spacing: -.02em; }
.contact-card { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.contact-card .cc-top { display: flex; align-items: center; gap: 12px; }
.cc-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cc-actions a { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-text); font-size: 12px; font-weight: 600; text-decoration: none; transition: transform .25s var(--spring), background-color .2s; }
.cc-actions a:active { transform: scale(.94); }
.cc-actions a.wa { background: rgba(37, 211, 102, .13); color: #128C4B; }
.banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-lg); font-size: 14px; line-height: 1.45; }
.banner .ic { margin-top: 1px; }
.banner b { display: block; font-weight: 650; }
.banner.info { background: var(--accent-soft); color: #0B4F9C; }
.banner.won { background: var(--green-soft); color: #11612A; }
.banner.lost { background: var(--red-soft); color: #A1000F; }
.banner.hold { background: var(--orange-soft); color: #8A4700; }
.banner.warn { background: var(--orange-soft); color: #8A4700; }

/* Timeline */
.tl { display: flex; flex-direction: column; padding: 4px 0; }
.tl-item { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; position: relative; padding: 0 16px 18px; }
.tl-item::before { content: ""; position: absolute; left: 32px; top: 36px; bottom: 2px; width: 2px; border-radius: 1px; background: var(--fill); }
.tl-item:last-child { padding-bottom: 6px; }
.tl-item:last-child::before { display: none; }
.tl-dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--fill-2); color: var(--label-2); }
.tl-dot .ic { width: 16px; height: 16px; }
.tl-dot.q { background: var(--accent-soft); color: var(--accent-text); }
.tl-dot.w { background: var(--green-soft); color: var(--green); }
.tl-dot.l { background: var(--red-soft); color: var(--red); }
.tl-dot.h { background: var(--orange-soft); color: var(--orange); }
.tl-body { min-width: 0; padding-top: 6px; display: flex; flex-direction: column; gap: 4px; }
.tl-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.tl-top b { font-size: 15px; font-weight: 600; letter-spacing: -.018em; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tl-top time { font-size: 12.5px; color: var(--label-3); white-space: nowrap; }
.tl-body p { font-size: 14.5px; color: var(--label); line-height: 1.45; }
.tl-next { display: flex; gap: 6px; align-items: flex-start; font-size: 13px; color: var(--label-2); }
.tl-by { font-size: 12.5px; color: var(--label-3); }

/* Quotation cards */
.qcard { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.qcard + .qcard { margin-top: 10px; }
.qcard-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.qlines { display: flex; flex-direction: column; gap: 6px; font-size: 14.5px; }
.qlines div { display: flex; justify-content: space-between; gap: 12px; }
.qlines span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.qtotal { display: flex; justify-content: space-between; align-items: baseline; padding-top: 10px; border-top: .5px solid var(--sep-2); }
.qtotal b { font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: -.028em; font-variant-numeric: tabular-nums; }
.qterms { font-size: 13.5px; background: var(--bg-soft); border-radius: 12px; padding: 10px 12px; color: var(--label); }
.file-chip { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 8px 12px; border-radius: 12px; background: var(--fill-2); font-size: 13.5px; font-weight: 500; color: var(--label); text-decoration: none; }
.file-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Quote builder */
.qline { padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; position: relative; }
.qline + .qline::before { content: ""; position: absolute; top: 0; right: 0; left: 16px; height: .5px; background: var(--sep-2); }
.qline-top { display: flex; gap: 10px; align-items: center; }
.qline-foot { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; color: var(--label-2); }
.qline-foot b { color: var(--label); font-variant-numeric: tabular-nums; font-size: 15px; }
.summary { padding: 18px; display: flex; flex-direction: column; gap: 10px; background: linear-gradient(160deg, #0B1220 0%, #16213A 60%, #1C2B4F 100%); color: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow-2); position: relative; overflow: hidden; }
.summary::after { content: ""; position: absolute; width: 260px; height: 260px; right: -90px; top: -120px; border-radius: 50%; background: radial-gradient(circle, rgba(94, 92, 230, .55), transparent 70%); pointer-events: none; }
.summary .s-row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: rgba(255, 255, 255, .7); position: relative; z-index: 1; }
.summary .s-row b { color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; }
.summary .s-big { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-top: 12px; margin-top: 2px; border-top: .5px solid rgba(255, 255, 255, .16); position: relative; z-index: 1; }
.summary .s-big span { font-size: 14px; color: rgba(255, 255, 255, .75); }
.summary .s-big b { font-family: var(--font-display); font-size: 30px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.summary .s-big b small { font-size: 15px; font-weight: 600; color: rgba(255, 255, 255, .6); }

/* Sticky form footer */
.formbar { position: fixed; z-index: 45; left: 50%; transform: translateX(-50%); bottom: calc(12px + var(--safe-b)); width: min(560px, calc(100vw - 24px)); display: flex; gap: 8px; padding: 8px; border-radius: 30px; background: rgba(255, 255, 255, .82); backdrop-filter: saturate(190%) blur(26px); -webkit-backdrop-filter: saturate(190%) blur(26px); box-shadow: 0 10px 40px rgba(20, 25, 50, .14), inset 0 0 0 .5px rgba(255, 255, 255, .8); }
.formbar .btn { --h: 48px; flex: 1; }
.formbar .btn-gray { flex: 0 0 auto; }

/* Org autocomplete */
.ac { position: relative; }
.ac { z-index: 5; }
.ac-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); background: #fff; border-radius: var(--r); box-shadow: var(--shadow-float), 0 0 0 .5px var(--sep-2); padding: 6px; display: flex; flex-direction: column; max-height: 300px; overflow-y: auto; animation: pop .25s var(--spring); }
.ac-item { display: flex; flex-direction: column; gap: 1px; text-align: left; padding: 9px 12px; border: 0; background: transparent; border-radius: 11px; }
.ac-item:hover, .ac-item.is-active { background: var(--accent-soft); }
.ac-item b { font-size: 15px; font-weight: 600; }
.ac-item small { font-size: 12.5px; color: var(--label-2); }
.hint { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border-radius: 14px; font-size: 13.5px; line-height: 1.45; }
.hint .ic { margin-top: 1px; }
.hint.ok { background: var(--green-soft); color: #11612A; }
.hint.warn { background: var(--orange-soft); color: #8A4700; }
.hint.info { background: var(--accent-soft); color: #0B4F9C; }
.hint a { font-weight: 600; color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* Notifications */
.notif { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; position: relative; color: inherit; text-decoration: none; }
.notif + .notif::before { content: ""; position: absolute; top: 0; right: 0; left: 62px; height: .5px; background: var(--sep-2); }
.notif .n-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; flex: none; }
.notif .n-ic .ic { width: 18px; height: 18px; }
.notif .n-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.notif p { font-size: 15px; line-height: 1.38; letter-spacing: -.016em; }
.notif.unread p { font-weight: 600; }
.notif time { font-size: 12.5px; color: var(--label-3); }
.notif .u-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); margin-top: 6px; flex: none; }
.n-red { background: linear-gradient(160deg, #FF6B5E, #E0201A); }
.n-orange { background: linear-gradient(160deg, #FFB443, #F08800); }
.n-blue { background: linear-gradient(160deg, #47A3FF, #0066D6); }
.n-green { background: linear-gradient(160deg, #4CD964, #1F9E3E); }
.n-indigo { background: linear-gradient(160deg, #8B89F0, #4B49C8); }
.n-gray { background: linear-gradient(160deg, #A9AEB8, #6E7480); }

/* Auth screens */
.app-mark { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 16px; letter-spacing: .02em; background: linear-gradient(150deg, #3D9BFF 0%, #0062D6 55%, #4B3FD1 100%); box-shadow: 0 10px 26px rgba(0, 98, 214, .35), inset 0 1px 0 rgba(255, 255, 255, .35); }
.app-mark.sm { width: 34px; height: 34px; border-radius: 10px; font-size: 11px; box-shadow: 0 4px 10px rgba(0, 98, 214, .3), inset 0 1px 0 rgba(255, 255, 255, .3); }
.app-mark.dark { background: linear-gradient(150deg, #2C2C30 0%, #0B0B0F 100%); box-shadow: 0 10px 26px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .15); }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 52px; }
.pw-wrap button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 0; border-radius: 50%; background: transparent; color: var(--label-3); display: grid; place-items: center; }
.pw-wrap button:hover { background: var(--fill-2); }

/* Search sheet (KAM) */
.search-sheet .sheet-body { padding-top: 0; }
.search-sheet .searchbar { height: 44px; background: var(--bg-elev); box-shadow: var(--shadow-1), inset 0 0 0 .5px var(--sep); }
.sr-meta { display: flex; justify-content: space-between; align-items: center; padding: 14px 4px 6px; }
.sr-recent { display: flex; flex-wrap: wrap; gap: 8px; }
.sr-recent button { border: 0; height: 32px; padding: 0 12px; border-radius: 999px; background: var(--bg-elev); box-shadow: inset 0 0 0 .5px var(--sep-2); font-size: 14px; display: inline-flex; align-items: center; gap: 6px; color: var(--label); }
.sr-empty { padding: 28px 8px; text-align: center; color: var(--label-2); font-size: 14.5px; }
mark.hl { background: rgba(255, 214, 10, .45); color: inherit; border-radius: 3px; padding: 0 1px; }

/* Pull to refresh */
.ptr { position: fixed; z-index: 60; top: calc(8px + var(--safe-t)); left: 50%; width: 38px; height: 38px; margin-left: -19px; border-radius: 50%; background: var(--bg-elev); box-shadow: var(--shadow-2); display: grid; place-items: center; color: var(--accent); transform: translateY(-70px) scale(.6); opacity: 0; pointer-events: none; }
.ptr .ic { transition: transform .2s; }
.ptr.ready .ic { transform: rotate(180deg); }
.ptr.loading .ic { animation: spin .8s linear infinite; }

/* Voice dictation */
.dict-wrap { position: relative; }
.dict-wrap textarea.input { padding-right: 50px; }
.dict-btn { position: absolute; right: 8px; bottom: 8px; width: 36px; height: 36px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); transition: background-color .2s, transform .25s var(--spring); }
.dict-btn:active { transform: scale(.9); }
.dict-lang { position: absolute; right: 50px; bottom: 14px; border: 0; background: transparent; font-size: 11.5px; font-weight: 700; color: var(--label-3); letter-spacing: .02em; padding: 2px 4px; border-radius: 6px; }
.dict-btn.is-live { background: var(--red-fill); color: #fff; animation: pulse-ring 1.4s infinite; }
@keyframes pulse-ring { 0% { box-shadow: 0 0 0 0 rgba(255, 59, 48, .45); } 100% { box-shadow: 0 0 0 14px rgba(255, 59, 48, 0); } }

/* Draft restore banner */
.draft-bar { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 14px; border-radius: var(--r); background: var(--bg-elev); box-shadow: var(--shadow-1), inset 0 0 0 .5px var(--accent-soft); font-size: 14px; animation: rise .4s var(--out); }
.draft-bar .ic { color: var(--accent); }
.draft-bar span { flex: 1; min-width: 0; }

/* Sheets follow the finger when dragged down */
.sheet.dragging { animation: none; transition: none; }
.sheet-grab, .sheet-head { touch-action: none; }
.sheet.snap { transition: transform .45s var(--spring); }

/* Larger screens: the KAM panel stays a focused column */
@media (min-width: 720px) {
  .kam-main { padding-left: 24px; padding-right: 24px; }
  .deal { flex-basis: 46%; }
  .hscroll, .carousel { margin: 0; padding-left: 0; padding-right: 0; }
}

/* ================================================================== ADMIN PANEL (desktop, compact)
   Dense like a macOS productivity app: 13.5px base, hairline metric strip, tight tables, small radii. */
.adm { background: #F4F4F7; font-size: 13.5px; }
.adm .btn { --h: 34px; font-size: 13.5px; padding: 0 14px; }
.adm .btn-sm { --h: 30px; font-size: 13px; padding: 0 12px; gap: 5px; }
.adm .btn-xs { --h: 26px; font-size: 12.5px; padding: 0 9px; }
.adm .btn-lg { --h: 44px; font-size: 15px; }
.adm .icon-btn { width: 32px; height: 32px; }
.adm .badge { height: 20px; font-size: 11.5px; padding: 0 7px; border-radius: 6px; }
.adm .chip { height: 22px; font-size: 12px; }
.adm .input { height: 36px; font-size: 14px; border-radius: 10px; }
.adm textarea.input { min-height: 76px; }
.adm .avatar { width: 26px; height: 26px; font-size: 10.5px; }
.adm .avatar.sm { width: 22px; height: 22px; font-size: 9px; }
/* Sidebar: an icon rail that opens over the page while the pointer or keyboard focus is on it. Pin it ( [ ) to keep it open. */
.shell { --rail: 68px; --sbw: 236px; display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); min-height: 100dvh; transition: grid-template-columns .34s var(--spring); }
html.sb-pinned .shell { grid-template-columns: var(--sbw) minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; z-index: 45; width: var(--rail); height: 100dvh; display: flex; flex-direction: column; padding: 12px 10px 10px; padding-left: max(10px, var(--safe-l)); overflow: hidden; background: rgba(236, 236, 241, .84); backdrop-filter: saturate(180%) blur(30px); -webkit-backdrop-filter: saturate(180%) blur(30px); box-shadow: inset -.5px 0 0 var(--sep-2); transition: width .34s var(--spring), box-shadow .3s, background-color .3s; }
.sidebar.is-open { width: var(--sbw); background: rgba(242, 242, 246, .95); box-shadow: inset -.5px 0 0 var(--sep-2), 18px 0 50px rgba(20, 30, 60, .16); }
html.sb-pinned .sidebar { width: var(--sbw); box-shadow: inset -.5px 0 0 var(--sep-2); }
.sb-label { opacity: 0; white-space: nowrap; pointer-events: none; transition: opacity .14s; }
.sidebar.is-open .sb-label, html.sb-pinned .sb-label { opacity: 1; pointer-events: auto; transition: opacity .24s .07s; }
.sb-brand { display: flex; align-items: center; gap: 11px; height: 44px; padding: 0 7px; margin-bottom: 4px; border-radius: 12px; color: var(--label); text-decoration: none; flex: none; }
.sb-brand .app-logo { flex: none; border-radius: 10px; box-shadow: 0 4px 12px rgba(10, 99, 224, .28); transition: transform .3s var(--spring); }
.sb-brand:hover .app-logo { transform: rotate(-6deg) scale(1.05); }
.sb-brand:hover .lg-lane { animation: lane .9s linear infinite; }
.sb-brand .wordmark { font-size: 16px; }
.sb-nav { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
.sb-nav::-webkit-scrollbar { display: none; }
.sb-h { position: relative; flex: none; height: 28px; display: flex; align-items: flex-end; padding: 0 12px 5px; font-size: 11px; font-weight: 600; color: var(--label-3); letter-spacing: .01em; }
.sb-h::before { content: ""; position: absolute; left: 12px; right: 12px; top: 55%; height: .5px; background: var(--sep-2); transition: opacity .2s; }
.sidebar.is-open .sb-h::before, html.sb-pinned .sb-h::before { opacity: 0; }
.sb-item { position: relative; flex: none; display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 10px 0 15px; border-radius: 10px; color: var(--label); font-size: 13.5px; font-weight: 500; letter-spacing: -.012em; text-decoration: none; transition: background-color .15s, color .15s; }
.sb-item .ic { position: relative; z-index: 1; flex: none; width: 18px; height: 18px; color: var(--accent); }
.sb-item > .sb-label { position: relative; z-index: 1; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sb-item:hover { background: rgba(118, 118, 128, .12); }
.sb-item:focus-visible { outline: 2px solid rgba(0, 113, 227, .55); outline-offset: -2px; }
.sb-item.is-on { color: #fff; }
.sb-item.is-on .ic { color: #fff; }
.side-pill { position: absolute; inset: 0; border-radius: 10px; background: var(--accent); box-shadow: 0 4px 12px rgba(0, 113, 227, .32); view-transition-name: side-pill; }
.sb-item .dot-count { position: absolute; z-index: 2; left: 29px; top: 3px; min-width: 16px; height: 16px; font-size: 10px; box-shadow: 0 0 0 2px rgba(236, 236, 241, .95); transition: left .34s var(--spring), top .34s var(--spring); }
.sidebar.is-open .sb-item .dot-count, html.sb-pinned .sb-item .dot-count { left: calc(100% - 30px); top: 11px; box-shadow: none; }
.sb-item.is-on .dot-count { background: #fff; color: var(--accent); }
.sb-foot { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; padding: 10px 0 2px 11px; border-top: .5px solid var(--sep-2); }
.sb-aci { display: grid; flex: none; }
.sb-aci img { grid-area: 1 / 1; height: 26px; width: auto; }
.sb-aci img:first-child { width: 26px; }
.sb-pin { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--label-2); opacity: 0; transition: opacity .2s, background-color .15s, color .15s; }
.sidebar.is-open .sb-pin, html.sb-pinned .sb-pin { opacity: 1; }
.sb-pin:hover { background: rgba(118, 118, 128, .14); }
html.sb-pinned .sb-pin { color: var(--accent); background: var(--accent-soft); }
html.sb-pinned .sb-pin .ic { transform: scaleX(-1); }
.main { min-width: 0; display: flex; flex-direction: column; }

/* Top bar: title, search, today's pulse, quick actions, notifications, account */
.toolbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 8px 24px; padding-right: max(24px, var(--safe-r)); background: rgba(244, 244, 247, .82); backdrop-filter: saturate(180%) blur(24px); -webkit-backdrop-filter: saturate(180%) blur(24px); transition: box-shadow .25s; }
.toolbar.is-solid { box-shadow: 0 .5px 0 var(--sep-2); }
.tb-title { min-width: 0; flex: 0 1 auto; }
.toolbar h1 { font-size: 16px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toolbar .tb-sub { font-size: 12px; color: var(--label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-search { flex: 0 1 300px; min-width: 34px; margin-left: auto; display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 7px 0 11px; border: 0; border-radius: 10px; background: rgba(118, 118, 128, .1); color: var(--label-3); font-size: 13px; text-align: left; transition: background-color .2s, box-shadow .2s; }
.tb-search:hover { background: rgba(118, 118, 128, .16); }
.tb-search:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(0, 113, 227, .35); }
.tb-search .ic { flex: none; }
.tb-search span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-search kbd { flex: none; font-family: var(--font); font-size: 11px; background: #fff; border-radius: 5px; padding: 1px 6px; color: var(--label-2); box-shadow: 0 .5px 0 var(--sep-2); }
.toolbar .tb-r { display: flex; align-items: center; gap: 6px; flex: none; }
.tb-pulse { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px 0 11px; border-radius: 999px; background: var(--bg-elev); box-shadow: var(--shadow-1), inset 0 0 0 .5px var(--sep); color: var(--label-2); font-size: 12.5px; text-decoration: none; white-space: nowrap; transition: transform .25s var(--spring), box-shadow .2s; }
.tb-pulse:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(20, 30, 60, .1), inset 0 0 0 .5px var(--sep); }
.tb-pulse b { color: var(--label); font-weight: 650; font-variant-numeric: tabular-nums; }
.tb-pulse .pd { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--green-fill); flex: none; }
.tb-pulse.hot .pd { background: var(--red-fill); }
.tb-pulse.hot .pd::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--red-fill); animation: ping 2s cubic-bezier(0, 0, .2, 1) infinite; }
@keyframes ping { 0% { transform: scale(.55); opacity: .85; } 80%, 100% { transform: scale(1.5); opacity: 0; } }
.tb-pulse .pd-sep { width: 1px; height: 14px; background: var(--sep-2); }
.tb-pulse .od b { color: var(--red); }
.tb-me { width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: none; display: grid; place-items: center; transition: box-shadow .2s; }
.tb-me .avatar { width: 30px; height: 30px; font-size: 11.5px; }
.tb-me:hover, .tb-me[aria-expanded="true"] { box-shadow: 0 0 0 3px rgba(0, 113, 227, .22); }

/* Popovers from the top bar */
.pop-wrap { position: relative; }
.pop { position: absolute; top: calc(100% + 8px); right: 0; z-index: 60; min-width: 270px; max-width: min(380px, calc(100vw - 24px)); padding: 6px; border-radius: 14px; background: rgba(255, 255, 255, .985); backdrop-filter: saturate(180%) blur(24px); -webkit-backdrop-filter: saturate(180%) blur(24px); box-shadow: 0 18px 50px rgba(20, 30, 60, .2), 0 0 0 .5px rgba(0, 0, 0, .08); transform-origin: top right; animation: pop-in .22s var(--spring); }
.pop[hidden] { display: none; }
.pop.closing { animation: pop-out .14s ease-in forwards; }
@keyframes pop-in { from { opacity: 0; transform: translateY(-6px) scale(.96); } }
@keyframes pop-out { to { opacity: 0; transform: translateY(-4px) scale(.97); } }
.pop-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px 6px 10px; font-size: 11.5px; font-weight: 650; color: var(--label-3); letter-spacing: .01em; }
.pop-i { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; border: 0; border-radius: 9px; background: transparent; color: var(--label); font-size: 13.5px; text-align: left; text-decoration: none; cursor: pointer; }
.pop-i:hover, .pop-i:focus-visible { background: var(--accent); color: #fff; outline: none; }
.pi-ic { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 8px; background: var(--fill-2); color: var(--accent); transition: background-color .15s, color .15s; }
.pop-i:hover .pi-ic, .pop-i:focus-visible .pi-ic { background: rgba(255, 255, 255, .22); color: #fff; }
.pi-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pi-t b { font-weight: 560; }
.pi-t small { font-size: 11.5px; color: var(--label-2); }
.pop-i:hover small, .pop-i:focus-visible small { color: rgba(255, 255, 255, .82); }
.pop-i .kbd { margin-left: auto; }
.pop-i.danger, .pop-i.danger .pi-ic { color: var(--red); }
.pop-i.danger:hover, .pop-i.danger:focus-visible { background: var(--red-fill); color: #fff; }
.pop-i.danger:hover .pi-ic, .pop-i.danger:focus-visible .pi-ic { color: #fff; }
.pop-me { display: flex; align-items: center; gap: 10px; padding: 8px 10px 12px; margin-bottom: 4px; border-bottom: .5px solid var(--sep-2); }
.pop-me b { display: block; font-size: 14px; }
.pop-me small { font-size: 12px; color: var(--label-2); }
.notif-pop { width: 380px; padding: 0; overflow: hidden; }
.notif-pop .pop-h { padding: 10px 10px 6px 14px; font-size: 13.5px; color: var(--label); }
.np-list { max-height: min(380px, 60vh); overflow-y: auto; overscroll-behavior: contain; }
.np-list .notif { padding: 10px 14px; gap: 10px; }
.np-list .notif p { font-size: 13px; }
.np-list .notif time { font-size: 11.5px; }
.np-list .notif .n-ic { width: 28px; height: 28px; border-radius: 8px; }
.np-list .notif .n-ic .ic { width: 15px; height: 15px; }
.np-list .notif + .notif::before { left: 52px; }
.np-list .empty { padding: 22px 14px; }
.pop-foot { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 10px; border-top: .5px solid var(--sep-2); font-size: 13px; font-weight: 560; color: var(--accent-text); text-decoration: none; }
.pop-foot:hover { background: var(--bg-soft); }
.content { flex: 1; padding: 4px 24px 0; padding-right: max(24px, var(--safe-r)); display: flex; flex-direction: column; gap: 12px; max-width: 1680px; width: 100%; }
.page-hero { display: flex; align-items: center; justify-content: space-between; gap: 10px 14px; flex-wrap: wrap; }
.page-hero h2 { font-family: var(--font-display); font-size: 21px; font-weight: 700; letter-spacing: -.025em; line-height: 1.2; }
.page-hero p { color: var(--label-2); font-size: 13px; margin-top: 1px; }
.month-pick { display: inline-flex; align-items: center; gap: 1px; height: 30px; padding: 0 2px; border-radius: 999px; background: var(--bg-elev); box-shadow: var(--shadow-1), inset 0 0 0 .5px var(--sep); font-size: 13px; font-weight: 600; }
.month-pick span { padding: 0 6px; white-space: nowrap; }
.month-pick a { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: var(--label-2); }
.month-pick a:hover { background: var(--fill-2); color: var(--label); }
.month-pick a.is-off { opacity: .3; pointer-events: none; }

/* Metric strip: one surface, hairline dividers, many numbers at a glance */
.kstrip { display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); background: var(--bg-elev); border-radius: 14px; box-shadow: var(--shadow-1); overflow: hidden; }
.km { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 11px 14px 12px; min-width: 0; color: var(--label); text-decoration: none; box-shadow: -.5px 0 0 var(--sep-2); transition: background-color .15s; }
a.km:hover { background: #FAFAFC; }
.km-l { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--label-2); letter-spacing: .005em; white-space: nowrap; }
.km-l i { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.km-v { display: flex; align-items: baseline; gap: 6px; font-family: var(--font-display); font-size: 21px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.15; white-space: nowrap; }
.km-v small { font-size: 13px; color: var(--label-3); font-weight: 600; letter-spacing: -.01em; }
.km-s { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.km-spark { position: absolute; right: 12px; top: 31px; opacity: .95; } /* beside the big number, clear of the label */
.km.alert .km-v { color: var(--red); }
.km .mini { display: grid; grid-template-columns: 54px minmax(0, 1fr) 34px; gap: 6px; align-items: center; font-size: 11px; font-weight: 600; color: var(--label-2); }
.km .mini .bar { height: 5px; }
.km .mini .r { text-align: right; font-variant-numeric: tabular-nums; color: var(--label); }
.delta { display: inline-flex; align-items: center; gap: 2px; font-size: 11px; font-weight: 700; padding: 1px 5px; border-radius: 5px; font-variant-numeric: tabular-nums; }
.delta.up { background: var(--green-soft); color: var(--green); }
.delta.down { background: var(--red-soft); color: var(--red); }
.delta.flat { background: var(--fill-2); color: var(--label-2); }

/* Bento grid */
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-flow: row dense; gap: 12px; }
.span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; } .span-6 { grid-column: span 6; } .span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; } .span-12 { grid-column: span 12; }
@media (max-width: 1280px) { .span-3, .span-4, .span-5 { grid-column: span 6; } .span-7, .span-8 { grid-column: span 12; } }
@media (max-width: 900px) { .bento > * { grid-column: span 12; } }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 12px; }
.grid-main { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 12px; }
.panel { background: var(--bg-elev); border-radius: 14px; box-shadow: var(--shadow-1); min-width: 0; display: flex; flex-direction: column; }
.panel-h { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 11px 14px 5px; flex-wrap: wrap; min-height: 40px; }
.panel-h h3 { font-size: 14px; font-weight: 650; letter-spacing: -.016em; display: flex; align-items: center; gap: 8px; }
.panel-h .ph-s { font-size: 12px; color: var(--label-2); }
.panel-b { padding: 6px 14px 14px; }
.panel-b.flush { padding: 0 0 4px; }
.panel-b.scroll { max-height: 330px; overflow-y: auto; scrollbar-width: thin; }
.funnel { display: flex; flex-direction: column; gap: 8px; }
.fn-row { display: grid; grid-template-columns: 84px minmax(0, 1fr) 92px; gap: 10px; align-items: center; font-size: 12.5px; }
.fn-row .fn-bar { height: 20px; border-radius: 6px; background: var(--fill-2); overflow: hidden; }
.fn-row .fn-bar span { display: block; height: 100%; border-radius: 6px; transform-origin: left; animation: grow 1.1s var(--out) both; }
.fn-row .fn-v { text-align: right; font-variant-numeric: tabular-nums; color: var(--label-2); white-space: nowrap; }
.fn-row .fn-v b { color: var(--label); font-weight: 700; }
.fn-note { margin-top: 12px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12.5px; color: var(--label-2); }
.chart svg { display: block; width: 100%; height: auto; max-height: 230px; overflow: visible; }
.chart .ax { font-size: 11px; fill: var(--label-3); font-family: var(--font); font-variant-numeric: tabular-nums; }
.chart .ax-m { font-size: 11.5px; fill: var(--label-2); font-weight: 600; font-family: var(--font); }
.chart .ax-v { font-size: 11.5px; fill: var(--label); font-weight: 700; font-family: var(--font); font-variant-numeric: tabular-nums; }
.chart .grid-l { stroke: var(--sep); stroke-dasharray: 3 4; }
.chart .bar-rise { transform-box: fill-box; transform-origin: bottom; animation: bar-rise .9s var(--out) both; animation-delay: var(--d, 0s); }
@keyframes bar-rise { from { transform: scaleY(0); } }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 11.5px; color: var(--label-2); margin-top: 8px; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.legend i.ln { height: 0; border-top: 2.5px dashed var(--orange-fill); border-radius: 0; vertical-align: 3px; width: 13px; }

/* Tables: compact, sortable, selectable */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.t th { position: sticky; top: 0; z-index: 1; text-align: left; font-size: 11.5px; font-weight: 600; color: var(--label-2); padding: 7px 10px; background: var(--bg-elev); border-bottom: .5px solid var(--sep-2); white-space: nowrap; letter-spacing: -.003em; user-select: none; }
.t th[data-sort] { cursor: pointer; }
.t th[data-sort]:hover { color: var(--label); }
.t th[data-sort]::after { content: ""; display: inline-block; width: 0; height: 0; margin-left: 5px; vertical-align: 2px; border: 4px solid transparent; opacity: 0; }
.t th.is-asc::after { border-bottom-color: currentColor; border-top-width: 0; opacity: 1; }
.t th.is-desc::after { border-top-color: currentColor; border-bottom-width: 0; opacity: 1; }
.t th:first-child, .t td:first-child { padding-left: 14px; }
.t th:last-child, .t td:last-child { padding-right: 14px; }
.t td { padding: 7px 10px; border-bottom: .5px solid var(--sep); vertical-align: middle; }
.t tbody tr:last-child td { border-bottom: 0; }
.t tr.clickable { cursor: pointer; transition: background-color .12s; }
.t tr.clickable:hover td { background: #F7F8FB; }
.t tr.is-sel td { background: #EEF4FF !important; }
.t tr.is-active td { background: #E8F0FE !important; }
.t .r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.t .strong { font-weight: 650; }
.t .sub { display: block; font-size: 11.5px; color: var(--label-2); font-weight: 400; }
.t tfoot td { font-weight: 700; background: var(--bg-soft); border-top: .5px solid var(--sep-2); border-bottom: 0; }
.t .input { height: 30px; width: 76px; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; font-size: 13.5px; }
.t .cb { width: 34px; padding-right: 0 !important; }
.t input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; vertical-align: middle; }
.who { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.who b { font-weight: 600; }
.bul { display: grid; grid-template-columns: minmax(60px, 1fr) 54px; gap: 8px; align-items: center; min-width: 130px; }
.bul .bar { height: 6px; }
.bul .r { font-size: 12px; font-weight: 600; }

/* Filters, quick chips, view switch */
.filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.filters .searchbar { flex: 1 1 240px; max-width: 340px; height: 32px; background: var(--bg-elev); box-shadow: var(--shadow-1), inset 0 0 0 .5px var(--sep); font-size: 13px; }
.filters .searchbar input { font-size: 13.5px; }
.select-pill { height: 30px; border: 0; border-radius: 999px; padding: 0 28px 0 12px; font-size: 12.5px; font-weight: 500; background-color: var(--bg-elev); box-shadow: var(--shadow-1), inset 0 0 0 .5px var(--sep); -webkit-appearance: none; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238E8E93' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; cursor: pointer; }
.select-pill:focus { outline: none; box-shadow: 0 0 0 1px rgba(0, 113, 227, .55), 0 0 0 3px rgba(0, 113, 227, .14); }
.select-pill.is-set { background-color: var(--accent-soft); color: var(--accent-text); box-shadow: none; }
.qchips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.qchip { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 999px; background: var(--bg-elev); box-shadow: inset 0 0 0 .5px var(--sep-2); font-size: 12.5px; font-weight: 500; color: var(--label); text-decoration: none; transition: background-color .15s, transform .25s var(--spring); }
.qchip:active { transform: scale(.95); }
.qchip i { width: 7px; height: 7px; border-radius: 50%; }
.qchip .n { color: var(--label-3); font-variant-numeric: tabular-nums; }
.qchip.is-on { background: var(--label); color: #fff; box-shadow: none; }
.qchip.is-on .n { color: rgba(255, 255, 255, .6); }
.viewswitch { display: inline-grid; grid-auto-flow: column; background: var(--fill); border-radius: 9px; padding: 2px; position: relative; isolation: isolate; }
.viewswitch a { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 7px; font-size: 12.5px; font-weight: 500; color: var(--label); text-decoration: none; }
.viewswitch .thumb { position: absolute; z-index: 0; top: 2px; bottom: 2px; left: 0; border-radius: 7px; background: var(--bg-elev); box-shadow: 0 2px 6px rgba(0, 0, 0, .1); transform: translateX(var(--x, 2px)); width: var(--w, 0); transition: transform .4s var(--spring), width .4s var(--spring); }

/* Board (pipeline) view */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(232px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; }
.bcol { display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 14px; background: rgba(118, 118, 128, .07); min-height: 260px; scroll-snap-align: start; }
.bcol-h { display: flex; align-items: center; gap: 7px; padding: 3px 4px 5px; font-size: 13px; font-weight: 650; }
.bcol-h i { width: 8px; height: 8px; border-radius: 50%; }
.bcol-h .n { font-size: 11.5px; color: var(--label-2); background: var(--bg-elev); border-radius: 999px; padding: 0 7px; font-variant-numeric: tabular-nums; }
.bcol-h .sum { margin-left: auto; font-size: 11.5px; color: var(--label-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.bcard { display: flex; flex-direction: column; gap: 4px; padding: 9px 10px; border-radius: 10px; background: var(--bg-elev); box-shadow: 0 1px 2px rgba(0, 0, 0, .06), inset 0 0 0 .5px rgba(0, 0, 0, .03); color: var(--label); text-decoration: none; transition: transform .3s var(--spring), box-shadow .25s; }
.bcard:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(20, 25, 50, .1); }
.bcard b { font-size: 13px; font-weight: 650; letter-spacing: -.014em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bcard .bc-sub { font-size: 11.5px; color: var(--label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bcard .bc-foot { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.bcard .bc-foot .val { font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bcard .bc-foot .badge { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.bcard .bc-foot .avatar { margin-left: auto; }
.bcol-empty { flex: 1; display: grid; place-items: center; font-size: 12px; color: var(--label-3); border: 1px dashed var(--sep-2); border-radius: 10px; min-height: 70px; }

/* Bulk action bar */
.bulkbar { position: fixed; z-index: 55; left: 50%; bottom: calc(18px + var(--safe-b)); transform: translate(-50%, 140%); display: flex; align-items: center; gap: 10px; padding: 7px 7px 7px 16px; border-radius: 999px; background: rgba(28, 28, 32, .92); color: #fff; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: 0 16px 40px rgba(0, 0, 0, .3); transition: transform .5s var(--spring); font-size: 13px; font-weight: 600; white-space: nowrap; }
.bulkbar.is-shown { transform: translate(-50%, 0); }
.bulkbar select { height: 30px; border-radius: 999px; border: 0; padding: 0 12px; font-size: 13px; background: rgba(255, 255, 255, .14); color: #fff; }
.bulkbar select option { color: #111; }
.bulkbar .btn { --h: 30px; }
.bulkbar .x { background: transparent; color: rgba(255, 255, 255, .7); border: 0; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; }
.bulkbar .x:hover { background: rgba(255, 255, 255, .12); color: #fff; }

/* Lists inside panels */
.att { display: flex; flex-direction: column; }
.att a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 14px; color: inherit; text-decoration: none; position: relative; transition: background-color .12s; }
.att a + a::before { content: ""; position: absolute; top: 0; right: 0; left: 50px; height: .5px; background: var(--sep-2); }
.att a:hover { background: #F7F8FB; }
.att .a-ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; color: #fff; }
.att .a-ic .ic { width: 14px; height: 14px; }
.att b { display: block; font-size: 13px; font-weight: 600; letter-spacing: -.014em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att small { display: block; font-size: 11.5px; color: var(--label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att .a-r { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.att .a-r b { font-variant-numeric: tabular-nums; }
.feed { display: flex; flex-direction: column; }
.feed-i { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 9px; padding: 6px 14px; position: relative; font-size: 12.5px; line-height: 1.4; color: inherit; text-decoration: none; }
.feed-i:hover { background: #F7F8FB; }
.feed-i::before { content: ""; position: absolute; left: 24px; top: 30px; bottom: -6px; width: 1.5px; background: var(--fill); }
.feed-i:last-child::before { display: none; }
.feed-i .fi-dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.feed-i .fi-dot .ic { width: 12px; height: 12px; }
.feed-i b { font-weight: 600; }
.feed-i time { display: block; font-size: 11px; color: var(--label-3); }
.hbars { display: flex; flex-direction: column; gap: 9px; }
.hb { display: grid; grid-template-columns: minmax(100px, 160px) minmax(0, 1fr) 84px; gap: 10px; align-items: center; font-size: 12.5px; }
.hb .bar { height: 8px; }
.hb .v { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.hb .v small { color: var(--label-2); font-weight: 500; }
.explain { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: 12px; background: var(--bg-elev); box-shadow: var(--shadow-1); font-size: 13px; color: var(--label); }
.explain .ic { color: var(--accent); margin-top: 1px; width: 17px; height: 17px; }
.explain.warn .ic { color: var(--orange-fill); }
.rule-row { display: grid; grid-template-columns: minmax(0, 1fr) 128px; gap: 12px; align-items: center; padding: 8px 0; border-top: .5px solid var(--sep-2); font-size: 13.5px; }
.rule-row:first-child { border-top: 0; padding-top: 0; }
.rule-row small { display: block; color: var(--label-2); font-size: 12px; }
.rule-row .unit { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--label-2); }
.rule-row .input { height: 32px; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; gap: 1px; height: 28px; padding: 0 3px 0 11px; border-radius: 999px; background: var(--fill-2); font-size: 13px; font-weight: 500; }
.tag button { width: 22px; height: 22px; border: 0; border-radius: 50%; background: transparent; display: grid; place-items: center; color: var(--label-3); }
.tag button:hover { background: var(--red-soft); color: var(--red); }
.list-block + .list-block { margin-top: 14px; padding-top: 14px; border-top: .5px solid var(--sep-2); }
.list-block h4 { font-size: 13.5px; font-weight: 650; margin-bottom: 8px; display: flex; justify-content: space-between; letter-spacing: -.014em; }
.list-block h4 small { font-weight: 500; color: var(--label-3); }
.inline-add { display: flex; gap: 6px; margin-top: 8px; max-width: 400px; }
.inline-add .input { height: 30px; font-size: 13px; }
.adm .kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.adm .kpi { display: flex; flex-direction: column; gap: 3px; padding: 11px 14px; border-radius: 12px; background: var(--bg-elev); box-shadow: var(--shadow-1); color: var(--label); text-decoration: none; min-width: 0; }
.adm .kpi .k-l { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--label-2); font-weight: 600; }
.adm .kpi .k-ic { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; color: #fff; }
.adm .kpi .k-ic .ic { width: 13px; height: 13px; }
.adm .kpi .k-v { font-family: var(--font-display); font-size: 21px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.adm .kpi .k-s { font-size: 11.5px; color: var(--label-2); }
.adm .kpi.alert .k-v { color: var(--red); }
.adm .kpi .title-3 { font-size: 15px; }

/* Drawer with skeleton loading */
.drawer { position: fixed; inset: 0 0 0 auto; width: min(600px, 100vw); height: 100dvh; max-height: none; margin: 0; background: var(--bg); box-shadow: var(--shadow-float); display: flex; flex-direction: column; animation: drawer-in .5s var(--spring); }
.drawer.closing { animation: drawer-out .3s var(--out) forwards; }
@keyframes drawer-in { from { transform: translateX(100%); } }
@keyframes drawer-out { to { transform: translateX(100%); } }
.drawer-h { display: flex; align-items: center; gap: 10px; padding: 12px 16px; padding-top: calc(12px + var(--safe-t)); background: var(--glass-strong); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: 0 .5px 0 var(--sep-2); }
.drawer-h .title-3 { font-size: 16px; }
.drawer-b { flex: 1; overflow-y: auto; padding: 14px 16px calc(20px + var(--safe-b)); display: flex; flex-direction: column; gap: 12px; scroll-behavior: smooth; }
.drawer .d-hero { padding: 14px; gap: 10px; }
.drawer .d-value b { font-size: 24px; }
.drawer-nav { display: flex; gap: 4px; }
.drawer-loading { display: flex; flex-direction: column; gap: 12px; padding: 18px; }
.sk { border-radius: 12px; background: linear-gradient(90deg, rgba(118, 118, 128, .09) 25%, rgba(118, 118, 128, .16) 37%, rgba(118, 118, 128, .09) 63%); background-size: 400% 100%; animation: sk 1.3s ease infinite; }
@keyframes sk { from { background-position: 100% 50%; } to { background-position: 0 50%; } }
.spinner { width: 24px; height: 24px; border-radius: 50%; border: 2.5px solid var(--fill); border-top-color: var(--accent); animation: spin .8s linear infinite; }

/* Command palette */
.cmdk { margin: 12vh auto auto; width: min(620px, calc(100vw - 32px)); background: var(--glass-strong); backdrop-filter: saturate(180%) blur(30px); -webkit-backdrop-filter: saturate(180%) blur(30px); border-radius: 18px; box-shadow: 0 30px 90px rgba(20, 25, 50, .3), inset 0 0 0 .5px rgba(255, 255, 255, .8); overflow: hidden; animation: pop .3s var(--spring); }
.cmdk-in { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: .5px solid var(--sep-2); }
.cmdk-in input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 17px; letter-spacing: -.02em; }
.cmdk-res { max-height: 56vh; overflow-y: auto; padding: 6px; }
.cmdk-g { font-size: 11.5px; font-weight: 600; color: var(--label-3); padding: 8px 10px 3px; }
.cmdk-i { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--label); text-decoration: none; }
.cmdk-i .ci { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; background: var(--fill-2); color: var(--label-2); flex: none; }
.cmdk-i b { display: block; font-size: 13.5px; font-weight: 600; letter-spacing: -.014em; }
.cmdk-i small { display: block; font-size: 11.5px; color: var(--label-2); }
.cmdk-i.is-active { background: var(--accent); color: #fff; }
.cmdk-i.is-active small { color: rgba(255, 255, 255, .8); }
.cmdk-i.is-active .ci { background: rgba(255, 255, 255, .2); color: #fff; }
.cmdk-empty { padding: 22px; text-align: center; color: var(--label-2); font-size: 13.5px; }
.cmdk-foot { display: flex; gap: 14px; padding: 8px 16px; border-top: .5px solid var(--sep-2); font-size: 11.5px; color: var(--label-3); }
.cmdk-foot kbd, .kbd { font-family: var(--font); font-size: 11px; background: var(--bg-elev); border-radius: 5px; padding: 0 5px; min-width: 18px; display: inline-block; text-align: center; box-shadow: inset 0 0 0 .5px var(--sep-2), 0 1px 0 var(--sep-2); margin-right: 3px; }
.keys { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 24px; font-size: 13.5px; }
.keys div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: .5px solid var(--sep); }

/* Admin, smaller screens */
@media (max-width: 1240px) { .tb-search kbd { display: none; } .tb-search { flex-basis: 210px; } }
@media (max-width: 1100px) { .grid-main { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) {
  .shell, html.sb-pinned .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar, .sidebar.is-open, html.sb-pinned .sidebar { width: auto; height: auto; flex-direction: row; align-items: center; gap: 4px; overflow-x: auto; padding: calc(8px + var(--safe-t)) 10px 8px; box-shadow: inset 0 -.5px 0 var(--sep-2); scrollbar-width: none; }
  .sidebar::-webkit-scrollbar { display: none; }
  .sb-nav { flex: none; flex-direction: row; gap: 4px; overflow: visible; }
  .sb-label { opacity: 1; pointer-events: auto; }
  .sb-brand .sb-label, .sb-h, .sb-foot { display: none; }
  .sb-brand { height: auto; margin: 0 4px 0 0; padding: 0; }
  .sb-item { height: 34px; padding: 0 12px; white-space: nowrap; }
  .sb-item .dot-count, .sidebar.is-open .sb-item .dot-count { position: relative; left: auto; top: auto; margin-left: 2px; box-shadow: none; }
  .toolbar { position: static; flex-wrap: wrap; padding: 10px 14px; }
  .tb-search { flex: 0 0 34px; padding: 0; justify-content: center; }
  .tb-search span, .tb-search kbd, .tb-pulse { display: none; }
  .content { padding: 4px 14px 0; }
  .keys { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------------ Print (quotation) */
.print-body { background: #E9E9EE; }
.print-tools { position: sticky; top: 0; z-index: 5; display: flex; justify-content: center; gap: 10px; padding: 12px; background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: 0 .5px 0 var(--sep-2); }
.paper { width: min(210mm, 100%); min-height: 297mm; margin: 24px auto; background: #fff; color: #111; padding: 18mm 16mm; box-shadow: 0 20px 60px rgba(0, 0, 0, .12); font-size: 12.5px; line-height: 1.5; position: relative; }
.lh-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding-bottom: 14px; border-bottom: 2.5px solid #0B1220; flex-wrap: wrap; }
.lh-logo { display: block; height: 52px; width: auto; margin: 0 0 6px -4px; }
.lh-co b { display: block; font-family: var(--font-display); font-size: 15px; font-weight: 700; letter-spacing: -.015em; color: #0B1220; }
.lh-co span { font-size: 11.5px; color: #555; }
.lh-doc { text-align: right; }
.lh-doc b { display: block; font-size: 15px; letter-spacing: .2em; color: var(--accent); }
.lh-doc div { font-size: 11.5px; }
.lh-to { display: flex; justify-content: space-between; gap: 20px; margin: 18px 0 12px; flex-wrap: wrap; }
.lh-k { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: #777; font-weight: 700; }
.lh-sub { font-weight: 700; margin-bottom: 8px; }
.lh-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 12px; }
.lh-table th { background: #0B1220; color: #fff; text-align: left; padding: 8px; font-weight: 600; }
.lh-table td { padding: 8px; border-bottom: 1px solid #E5E5EA; vertical-align: top; }
.lh-table .r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lh-table tfoot td { font-weight: 800; border-top: 2px solid #0B1220; border-bottom: 0; }
.lh-words { font-style: italic; margin-top: 6px; font-size: 11.5px; color: #333; }
.lh-block { margin-top: 16px; }
.lh-block h4 { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.lh-block ol { margin: 0; padding-left: 18px; }
.lh-pay { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 24px; }
.lh-pay div { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dotted #ccc; padding: 3px 0; }
.lh-pay span { color: #666; }
.lh-sign { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 40px; gap: 20px; flex-wrap: wrap; }
.lh-sign .line { border-top: 1px solid #111; padding-top: 5px; min-width: 200px; }
.lh-foot { position: absolute; left: 16mm; right: 16mm; bottom: 12mm; padding-top: 8px; border-top: 1px solid #E5E5EA; font-size: 10.5px; color: #666; text-align: center; }
@page { size: A4; margin: 0; }
@media print {
  .print-tools { display: none; }
  .print-body { background: #fff; }
  .paper { margin: 0; box-shadow: none; width: 210mm; }
}

/* ------------------------------------------------------------------ Plain pages (errors, install) */
.plain-wrap { min-height: 100dvh; display: grid; grid-template-rows: 1fr auto; justify-items: center; align-items: center; padding: 24px 24px 0; }
.plain-card { width: min(520px, 100%); background: var(--bg-elev); border-radius: 26px; box-shadow: var(--shadow-2); padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.plain-card .code { font-family: var(--font-display); font-size: 56px; font-weight: 800; letter-spacing: -.04em; color: var(--label-3); line-height: 1; }

/* ---------- Phone notifications (web push) ---------- */
.push-ic, .pp-ic { background: linear-gradient(160deg, #FF6B5E, #E0201A); }
.push-ctl .push-enable, .push-ctl .push-switch, .push-ctl .push-test, .push-ctl .push-help { display: none; }
.push-ctl[data-state="off"] .push-enable, .push-ctl[data-state="busy"] .push-enable { display: inline-flex; animation: pop .3s var(--spring) both; }
.push-ctl[data-state="on"] .push-switch { display: block; animation: pop .3s var(--spring) both; }
.push-ctl[data-state="on"] .push-test { display: flex; animation: rise .35s var(--spring) both; }
.push-ctl:is([data-state="denied"], [data-state="ios"], [data-state="unsupported"], [data-state="insecure"]) .push-help { display: block; animation: rise .35s var(--spring) both; }
.push-ctl[data-state="on"] .push-status { color: #1C7C36; font-weight: 500; }
.push-ctl:is([data-state="denied"], [data-state="insecure"]) .push-status { color: var(--red); }
.push-ctl[data-state="loading"] .push-status { color: var(--label-3); }
.push-status { white-space: normal; }
.push-help { padding: 0 16px 14px 58px; font-size: 13.5px; line-height: 1.45; color: var(--label-2); }
.push-help ol { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 3px; }
.push-help b { color: var(--label); font-weight: 600; }
.push-help .kbd-ic { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: var(--fill-2); color: var(--accent); vertical-align: -5px; }
.push-help .kbd-ic .ic { width: 14px; height: 14px; }

.push-prompt { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: start; margin: 0; padding: 14px 16px; border-radius: var(--r-lg);
  background: linear-gradient(135deg, rgba(255, 107, 94, .09), rgba(0, 113, 227, .07) 70%), var(--bg-elev); box-shadow: var(--shadow-1), inset 0 0 0 .5px rgba(224, 32, 26, .12);
  animation: rise .5s var(--spring) both; }
.push-prompt[hidden] { display: none; }
.push-prompt.is-leaving { animation: fade-out .22s ease-in forwards; }
.pp-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; box-shadow: 0 6px 14px rgba(224, 32, 26, .26); grid-row: span 2; }
.pp-ic .ic { transform-origin: 50% 12%; animation: bell-ring 2.6s ease-in-out .7s 2; }
@keyframes bell-ring { 0%, 55%, 100% { transform: rotate(0); } 8% { transform: rotate(16deg); } 16% { transform: rotate(-13deg); } 24% { transform: rotate(9deg); } 32% { transform: rotate(-6deg); } 40% { transform: rotate(3deg); } }
.pp-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 13.5px; line-height: 1.4; color: var(--label-2); }
.pp-body b { font-size: 15.5px; font-weight: 650; letter-spacing: -.02em; color: var(--label); }
.pp-actions { grid-column: 2; display: flex; gap: 4px; margin-top: 10px; }

/* Admin: one compact line, not a big card */
.adm .push-prompt { grid-template-columns: auto 1fr auto; align-items: center; padding: 10px 12px; margin-bottom: 12px; border-radius: 12px; }
.adm .pp-ic { width: 32px; height: 32px; border-radius: 9px; grid-row: auto; }
.adm .pp-ic .ic { width: 18px; height: 18px; }
.adm .pp-body { flex-direction: row; flex-wrap: wrap; gap: 0 8px; align-items: baseline; font-size: 12.5px; }
.adm .pp-body b { font-size: 13.5px; }
.adm .pp-actions { grid-column: auto; margin-top: 0; }
.adm .push-panel .row { background: transparent; padding: 10px 14px; min-height: 0; }
.adm .push-panel .row-title { font-size: 14px; }
.adm .push-panel .row-sub { font-size: 12.5px; }
.adm .push-panel .push-help { padding: 0 14px 12px 56px; font-size: 12.5px; }
.push-note { padding: 0 14px 12px 56px; font-size: 12px; color: var(--label-2); }
@media (max-width: 640px) { .adm .push-prompt { grid-template-columns: auto 1fr; } .adm .pp-actions { grid-column: 2; } }


/* ------------------------------------------------------------------ Brand: logo, wordmark, signature */
.wordmark { display: inline-flex; align-items: baseline; gap: .26em; font-family: var(--font-display); font-weight: 600; letter-spacing: -.025em; color: var(--label); white-space: nowrap; }
.wordmark b { font-weight: 800; letter-spacing: -.035em; }
.wordmark i { font-style: normal; padding: 0 .02em; background: linear-gradient(160deg, #0A63E0 25%, #22B04B 85%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wordmark em { align-self: center; margin-left: .15em; padding: .2em .5em; border-radius: 6px; background: var(--accent-soft); color: var(--accent-text); font-size: .56em; font-style: normal; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.lg-a, .lg-b { transform-box: fill-box; transform-origin: center; }
@keyframes lane { to { stroke-dashoffset: -34; } }
/* On the sign-in screen the route draws itself from the inquiry (blue) to the order (green), then the lane keeps moving */
.app-logo.draw .lg-road { stroke-dasharray: 1; stroke-dashoffset: 1; animation: road-draw 1.05s var(--spring) .3s forwards; }
.app-logo.draw .lg-lane { opacity: 0; animation: lg-show .4s 1.25s forwards, lane 1.5s linear 1.6s infinite; }
.app-logo.draw .lg-a { animation: lg-pop .45s var(--spring) .1s both; }
.app-logo.draw .lg-b { animation: lg-pop .5s var(--spring) 1.1s both; }
@keyframes road-draw { to { stroke-dashoffset: 0; } }
@keyframes lg-show { to { opacity: 1; } }
@keyframes lg-pop { from { transform: scale(0); } }

/* The signature at the very end of every page: quiet until you look for it */
.sig { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 9px; margin-top: 30px; padding: 18px 16px calc(16px + var(--safe-b)); font-size: 11px; letter-spacing: .02em; color: var(--label-3); opacity: .6; user-select: none; transition: opacity .35s; }
.sig:hover { opacity: 1; }
.sig img { width: 14px; height: 14px; filter: grayscale(1); opacity: .65; transition: filter .35s, opacity .35s; }
.sig:hover img { filter: none; opacity: 1; }
.sig b { font-weight: 600; color: var(--label-2); background: linear-gradient(90deg, #0A63E0, #22B04B, #0A63E0) 0 0 / 200% 100%; -webkit-background-clip: text; background-clip: text; transition: color .35s; }
.sig:hover b { color: transparent; animation: sig-shine 2.4s linear infinite; }
@keyframes sig-shine { to { background-position: -200% 0; } }
/* the dot between the two halves becomes a little road on hover */
.sig i { width: 3px; height: 3px; border-radius: 2px; background: currentColor; transition: width .45s var(--spring), height .3s; }
.sig:hover i { width: 22px; height: 2px; background: repeating-linear-gradient(90deg, currentColor 0 4px, transparent 4px 7px); animation: sig-lane .5s linear infinite; }
@keyframes sig-lane { to { background-position: 7px 0; } }
.kam-main > .sig { margin-top: 18px; }
.content > .sig { margin-top: auto; padding-top: 34px; }

/* Conversion pieces */
.kstrip.ks-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.speed { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.sp-col { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 12px; background: var(--bg-soft); min-width: 0; }
.sp-k { font-size: 12px; font-weight: 600; color: var(--label-2); }
.sp-v { font-family: var(--font-display); font-size: 28px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.sp-v.good { color: #1C7C36; }
.sp-col .bar { height: 6px; border-radius: 3px; background: var(--fill-2); overflow: hidden; }
.sp-col .bar span { display: block; height: 100%; border-radius: 3px; transform-origin: left; animation: grow .9s var(--spring) both; }
.sp-col small { font-size: 12px; color: var(--label-2); }
.brand-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
@media (max-width: 1100px) { .kstrip.ks-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ------------------------------------------------------------------ Dashboard: team performance table */
.kt-panel { overflow: hidden; }
.kt-panel.is-loading .kt-wrap { opacity: .4; pointer-events: none; transition: opacity .2s; }
.kt-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 14px; padding: 12px 14px 10px; }
.kt-title { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.kt-title h3 { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 650; letter-spacing: -.016em; }
.kt-title .ph-s { font-size: 11.5px; color: var(--label-3); }
.kt-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.kt-find { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 9px; border-radius: 8px; background: rgba(118, 118, 128, .1); color: var(--label-3); transition: background-color .2s, box-shadow .2s; }
.kt-find:focus-within { background: #fff; box-shadow: 0 0 0 3px rgba(0, 113, 227, .25); }
.kt-find input { width: 104px; border: 0; background: none; outline: none; font: inherit; font-size: 12.5px; color: var(--label); }
.kt-heat-ic { width: 12px; height: 12px; border-radius: 3px; background: linear-gradient(90deg, #FFB443, #E9EEF6 50%, #34C759); }
.kt-heat-btn[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-text); box-shadow: inset 0 0 0 1px rgba(0, 113, 227, .25); }
.kt-cols { width: 310px; }
.kt-col { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 9px; cursor: pointer; }
.kt-col:hover { background: var(--bg-soft); }
.switch.sm { width: 38px; height: 23px; }
.switch.sm span::after { width: 19px; height: 19px; }
.switch.sm input:checked + span::after { transform: translateX(15px); }

.kt-wrap { position: relative; overflow-x: auto; border-top: .5px solid var(--sep-2); scrollbar-width: thin; }
.kt { min-width: 100%; }
.kt th, .kt td { white-space: nowrap; }
.kt td { transition: background-color .3s; }
.kt .kt-groups th { position: static; padding: 7px 10px 0; border-bottom: 0; font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--label-3); background: var(--bg-elev); }
.kt .kt-groups th span { display: block; padding-bottom: 5px; border-bottom: 2px solid var(--g, transparent); }
.kt [data-g="pipe"] { --g: #30B0C7; } .kt [data-g="act"] { --g: #8EB1E8; } .kt [data-g="conv"] { --g: #34C759; }
.kt [data-g="speed"] { --g: #FF9F0A; } .kt [data-g="disc"] { --g: #7D7BEA; } .kt [data-g="trend"] { --g: #A6E3B6; }
.kt th button { all: unset; display: inline-flex; align-items: center; gap: 3px; cursor: pointer; border-radius: 4px; }
.kt th button:hover { color: var(--label); }
.kt th button:focus-visible { outline: 2px solid rgba(0, 113, 227, .55); outline-offset: 2px; }
.kt th button::after { content: ""; width: 0; height: 0; border: 4px solid transparent; opacity: 0; transition: opacity .15s; }
.kt th[aria-sort="ascending"] button, .kt th[aria-sort="descending"] button { color: var(--accent-text); }
.kt th[aria-sort="ascending"] button::after { border-bottom-color: currentColor; border-top-width: 0; opacity: 1; }
.kt th[aria-sort="descending"] button::after { border-top-color: currentColor; border-bottom-width: 0; opacity: 1; margin-top: 4px; }
.kt th.r button { flex-direction: row-reverse; }
/* rank and name stay in view while the rest scrolls sideways */
.kt .kt-stick { position: sticky; left: 0; z-index: 2; background: var(--bg-elev); }
.kt th.kt-stick { z-index: 3; }
.kt .kt-name { left: 40px; min-width: 190px; }
.kt-wrap.is-scrolled .kt-name { box-shadow: 8px 0 12px -8px rgba(20, 30, 60, .2); }
.kt tfoot .kt-stick { background: var(--bg-soft); }
.kt .kt-rank { width: 40px; min-width: 40px; padding-left: 10px !important; padding-right: 0; text-align: center; color: var(--label-3); font-weight: 650; font-variant-numeric: tabular-nums; }
.kt-rank span { display: inline-grid; place-items: center; min-width: 22px; height: 22px; border-radius: 50%; font-size: 11.5px; }
.kt-row[data-top="1"] .kt-rank span { background: linear-gradient(150deg, #FFE08A, #F5B300); color: #6B4500; box-shadow: 0 2px 6px rgba(245, 179, 0, .35); }
.kt-row[data-top="2"] .kt-rank span { background: linear-gradient(150deg, #EEF1F5, #C3CAD5); color: #49505C; }
.kt-row[data-top="3"] .kt-rank span { background: linear-gradient(150deg, #F7D3B5, #D9925C); color: #5E3416; }
.kt-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kt-who b { font-weight: 600; }
.kt-who small { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--label-3); }
.kt-badge { display: inline-flex; align-items: center; gap: 3px; height: 16px; padding: 0 6px; border-radius: 999px; background: linear-gradient(135deg, #FFF4D6, #FFE3A1); color: #7A4F00; font-size: 10px; font-weight: 650; }
.kt-badge .ic { width: 10px; height: 10px; }
.kt-badge.ic-only { width: 16px; padding: 0; justify-content: center; }
.kt .u { margin-left: 1px; font-size: 10.5px; color: var(--label-3); }
.kt-val { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.kt-share { position: relative; display: block; width: 58px; height: 3px; border-radius: 2px; background: var(--fill-2); overflow: hidden; }
.kt-share::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--s); border-radius: 2px; background: var(--accent); transform-origin: left; animation: grow .9s var(--out) both; }
.kt-conv .bul { display: inline-grid; vertical-align: middle; min-width: 118px; grid-template-columns: minmax(56px, 1fr) 40px; }
.dl { display: inline-block; margin-left: 5px; font-size: 10.5px; font-weight: 700; font-variant-numeric: tabular-nums; vertical-align: middle; }
.dl.up { color: #1C7C36; } .dl.down { color: var(--red); } .dl.flat { color: var(--label-3); }
.kt-trend svg { display: block; }
.kt .kt-x { width: 36px; padding-left: 0; padding-right: 8px !important; text-align: center; }
.kt-exp { width: 26px; height: 26px; display: grid; place-items: center; border: 0; border-radius: 7px; background: transparent; color: var(--label-2); transition: background-color .15s, color .15s, transform .35s var(--spring); }
.kt-exp:hover { background: var(--fill-2); }
.kt-exp[aria-expanded="true"] { transform: rotate(180deg); color: var(--accent); background: var(--accent-soft); }
.kt-row.is-open > tr:first-child td { background: #F7F9FD; }
.kt.hide-pipe [data-g="pipe"], .kt.hide-act [data-g="act"], .kt.hide-conv [data-g="conv"], .kt.hide-speed [data-g="speed"], .kt.hide-disc [data-g="disc"], .kt.hide-trend [data-g="trend"] { display: none; }
/* heatmap: each KAM against the team */
.kt.heat td.hi { background-color: rgba(52, 199, 89, .14); }
.kt.heat td.lo { background-color: rgba(255, 149, 0, .15); }
/* details under a row */
.kt-detail > td { padding: 0 !important; background: var(--bg-soft); white-space: normal; }
.kt-d { position: sticky; left: 0; box-sizing: border-box; width: var(--kt-vw, 100%); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 12px 14px 14px; animation: rise .35s var(--spring); }
.kt-b { min-width: 0; padding: 10px 12px; border-radius: 10px; background: var(--bg-elev); box-shadow: inset 0 0 0 .5px var(--sep); }
.kt-b h4 { margin-bottom: 8px; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--label-3); }
.kt-f { display: grid; grid-template-columns: 62px minmax(0, 1fr) 28px; gap: 8px; align-items: center; margin-bottom: 5px; font-size: 12px; }
.kt-f .bar { height: 6px; }
.kt-f b, .kt-why b { text-align: right; font-variant-numeric: tabular-nums; }
.kt-note { margin-top: 6px; font-size: 11.5px; color: var(--label-2); }
.kt-note.warn { color: #8A4700; }
.kt-brand { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto auto auto auto; gap: 6px; align-items: baseline; margin-bottom: 7px; font-size: 12px; }
.kt-brand small { font-size: 11px; color: var(--label-3); }
.kt-why { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; font-size: 12px; border-bottom: .5px solid var(--sep); }
.kt-why:last-child { border-bottom: 0; }
.kt-att { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 0; font-size: 12px; color: var(--label); text-decoration: none; }
.kt-att span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kt-att:hover span:first-child { color: var(--accent-text); }
.kt-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.kt-none { padding: 18px 14px; text-align: center; font-size: 12.5px; color: var(--label-2); }
.kt-foot { display: flex; align-items: center; gap: 6px; padding: 8px 14px 10px; border-top: .5px solid var(--sep); font-size: 11.5px; color: var(--label-3); }
@media (max-width: 1100px) { .kt-d { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .kt-d { grid-template-columns: minmax(0, 1fr); } .kt .kt-name { min-width: 150px; } }

/* ------------------------------------------------------------------ Dashboard: active customers */
.ct-panel { overflow: hidden; scroll-margin-top: 70px; }
.ct-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 0 14px 12px; }
.ct-find { flex: 1 1 240px; max-width: 340px; height: 30px; }
.ct-find input { width: 100%; }
.ct-filters .select-pill { height: 30px; max-width: 190px; text-overflow: ellipsis; }
.ct-chips { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.ct-chip { position: relative; display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px; border-radius: 999px; background: var(--bg-elev); box-shadow: var(--shadow-1), inset 0 0 0 .5px var(--sep); font-size: 12.5px; font-weight: 500; color: var(--label); cursor: pointer; user-select: none; transition: background-color .2s, color .2s, box-shadow .2s, transform .2s var(--spring); }
.ct-chip:active { transform: scale(.96); }
.ct-chip input { position: absolute; opacity: 0; pointer-events: none; }
.ct-chip b { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--fill-2); font-size: 10.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ct-chip .ic { color: var(--label-3); }
.ct-chip:has(input:focus-visible) { box-shadow: 0 0 0 3px rgba(0, 113, 227, .3); }
.ct-chip.red:has(input:checked) { background: var(--red-soft); color: var(--red); box-shadow: none; }
.ct-chip.green:has(input:checked) { background: var(--green-soft); color: #1C7C36; box-shadow: none; }
.ct-chip.indigo:has(input:checked) { background: var(--indigo-soft); color: var(--indigo); box-shadow: none; }
.ct-chip:has(input:checked) .ic { color: currentColor; }
.ct-chip:has(input:checked) b { background: rgba(255, 255, 255, .7); }
.ct-reset { color: var(--red); }
[data-ct-results] { transition: opacity .2s; }
.ct-panel.is-loading [data-ct-results] { opacity: .45; pointer-events: none; }
.ct-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding: 8px 14px; border-top: .5px solid var(--sep-2); background: var(--bg-soft); font-size: 12px; color: var(--label-2); }
.ct-count b { font-size: 13px; color: var(--label); font-variant-numeric: tabular-nums; }
.ct-stat { display: inline-flex; align-items: center; gap: 5px; }
.ct-stat b { color: var(--label); }
.ct-stat .brand-dot { width: 8px; height: 8px; border-radius: 2px; margin-left: 4px; }
.ct-export { margin-left: auto; }
.ct-empty { border-top: .5px solid var(--sep); }
.ct .kt-name { left: 0; min-width: 250px; }
.avatar.sq { border-radius: 8px; }
.ct-name { display: inline-flex; align-items: center; gap: 6px; }
.ct-attn { width: 7px; height: 7px; border-radius: 50%; background: var(--red-fill); box-shadow: 0 0 0 3px var(--red-soft); flex: none; }
.ct-tag { display: inline-flex; align-items: center; gap: 3px; height: 16px; padding: 0 6px; border-radius: 999px; font-size: 10px; font-weight: 650; }
.ct-tag .ic { width: 10px; height: 10px; }
.ct-tag.tier { background: var(--fill-2); color: var(--label-2); }
.ct-tag.rep { background: var(--green-soft); color: #1C7C36; }
.ct-tag.big { background: var(--indigo-soft); color: var(--indigo); }
.ct-kam { display: inline-flex; align-items: center; gap: 6px; }
.ct-inq { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.ct-inq .chip { height: 20px; font-size: 11.5px; padding: 0 8px 0 6px; }
.ct-inq small { font-size: 11px; color: var(--label-3); }
.ct-units { display: inline-flex; gap: 8px; font-variant-numeric: tabular-nums; font-weight: 600; }
.ct-units span { display: inline-flex; align-items: center; gap: 4px; }
.ct-units .brand-dot { width: 8px; height: 8px; border-radius: 2px; }
.ct .sub { display: block; font-size: 11px; color: var(--label-3); font-weight: 400; }
.ct-act { max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
.ct-exp { color: var(--orange); font-weight: 650; }
.ct .badge { white-space: nowrap; }
.ct-d { grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr) minmax(0, 1fr); }
.ct-i { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto auto auto; gap: 10px; align-items: center; padding: 6px 4px; border-bottom: .5px solid var(--sep); font-size: 12px; color: var(--label); text-decoration: none; border-radius: 6px; }
.ct-i:last-child { border-bottom: 0; }
.ct-i:hover { background: var(--bg-soft); }
.ct-i .mono { font-size: 11px; color: var(--label-2); }
.ct-i .chip { height: 20px; font-size: 11px; padding: 0 7px 0 6px; }
.ct-i-req { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-i-meta { font-size: 11px; color: var(--label-3); white-space: nowrap; }
.ct-p { font-size: 12.5px; line-height: 1.45; }
@media (max-width: 1100px) { .ct-d { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .ct-list { grid-column: 1 / -1; } }
@media (max-width: 640px) { .ct-d { grid-template-columns: minmax(0, 1fr); } .ct-i { grid-template-columns: auto minmax(0, 1fr) auto; } .ct-i .ct-i-req, .ct-i .ct-i-meta { display: none; } .ct .kt-name { min-width: 190px; } }

/* ------------------------------------------------------------------ Offers record */
.kstrip.ks-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.filters .ct-chip:has(input:checked) { background: var(--accent-soft); color: var(--accent-text); box-shadow: none; }
.filters .ct-chip:has(input:checked) .ic { color: currentColor; }
.of td { vertical-align: top; }
.of .sub { display: block; font-size: 11px; color: var(--label-3); font-weight: 400; }
.of-brand { display: inline-flex; align-items: center; gap: 5px; margin-right: 8px; font-size: 11.5px; font-weight: 650; letter-spacing: .02em; white-space: nowrap; }
.of-model span, .of-price span { display: block; white-space: nowrap; }
.of-model span + span, .of-price span + span { margin-top: 3px; }
.of-price span { font-variant-numeric: tabular-nums; font-weight: 600; }
.of-price .of-dp { font-size: 11.5px; font-weight: 500; color: var(--label-2); }
.of-status { display: inline-flex; align-items: flex-start; gap: 6px; max-width: 260px; font-weight: 550; line-height: 1.35; }
.of-status i { width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; flex: none; background: var(--accent); }
.of-status.green { color: #1C7C36; } .of-status.green i { background: var(--green-fill); }
.of-status.red { color: var(--red); } .of-status.red i { background: var(--red-fill); }
.of-status.orange { color: #8A4700; } .of-status.orange i { background: var(--orange-fill); }
.of-status.indigo i { background: var(--indigo); } .of-status.gray i { background: var(--label-3); }
.of-rem { max-width: 240px; min-width: 140px; white-space: normal; font-size: 12.5px; color: var(--label-2); }
.of-st { min-width: 220px; }
.of td:nth-child(4) { min-width: 180px; }
@media (max-width: 1100px) { .kstrip.ks-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.im td { vertical-align: top; }
.im-warn { display: flex; align-items: flex-start; gap: 4px; margin-top: 4px; font-size: 11.5px; color: #8A4700; white-space: normal; max-width: 260px; }
.im-warn .ic { flex: none; margin-top: 1px; }

/* ================================================================== COLOUR LAYER
   Each metric card wears its own colour: a light tint, an icon chip, and numbers in a deep shade of that colour
   (dark enough for 4.5:1). The headline card is a full emerald gradient. Colour never carries meaning alone:
   every card keeps its icon and its words. */
.t-blue   { --k1: #2F80FF; --k2: #5B5BF0; --ksoft: #D9E7FF; --ksoft2: #F2F7FF; --kink: #0B4A9A; --kline: rgba(47, 128, 255, .18); --kglow: rgba(47, 128, 255, .3); --kshadow: rgba(47, 128, 255, .45); }
.t-teal   { --k1: #0FA3B1; --k2: #21C29E; --ksoft: #D2F2EF; --ksoft2: #F0FBFA; --kink: #0A5F69; --kline: rgba(15, 163, 177, .2); --kglow: rgba(33, 194, 158, .32); --kshadow: rgba(15, 163, 177, .45); }
.t-violet { --k1: #8B5CF6; --k2: #C05AF2; --ksoft: #E7DCFF; --ksoft2: #F8F4FF; --kink: #5521B5; --kline: rgba(139, 92, 246, .18); --kglow: rgba(192, 90, 242, .3); --kshadow: rgba(139, 92, 246, .45); }
.t-amber  { --k1: #F59E0B; --k2: #FB7A1E; --ksoft: #FFE7BF; --ksoft2: #FFF8EC; --kink: #874600; --kline: rgba(245, 158, 11, .22); --kglow: rgba(251, 122, 30, .3); --kshadow: rgba(245, 158, 11, .45); }
.t-rose   { --k1: #F43F5E; --k2: #FF7A59; --ksoft: #FFDAE1; --ksoft2: #FFF4F6; --kink: #A50E36; --kline: rgba(244, 63, 94, .2); --kglow: rgba(255, 122, 89, .3); --kshadow: rgba(244, 63, 94, .45); }
.t-indigo { --k1: #6366F1; --k2: #8B5CF6; --ksoft: #DFE0FF; --ksoft2: #F5F5FF; --kink: #3730A3; --kline: rgba(99, 102, 241, .18); --kglow: rgba(139, 92, 246, .2); --kshadow: rgba(99, 102, 241, .45); }

.kstrip { gap: 10px; grid-template-columns: repeat(auto-fit, minmax(176px, 1fr)); background: none; border-radius: 0; box-shadow: none; overflow: visible; }
/* defaults for a card without a colour; :where() keeps them weaker than any .t-* class */
:where(.km) { --k1: #2F80FF; --k2: #5B5BF0; --ksoft: #F2F4F8; --kink: var(--label); --kline: var(--sep); --kglow: rgba(47, 128, 255, .12); --kshadow: rgba(20, 30, 60, .25); }
.km {
  isolation: isolate; overflow: hidden; gap: 4px; padding: 12px 14px 13px; border-radius: 16px; color: var(--kink);
  background: linear-gradient(155deg, var(--ksoft) 0%, var(--ksoft2, #fff) 100%); box-shadow: 0 1px 2px rgba(20, 30, 60, .05), inset 0 0 0 1px var(--kline);
  transition: transform .4s var(--spring), box-shadow .3s; }
.km::before { content: ""; position: absolute; z-index: -1; width: 170px; height: 170px; right: -56px; top: -82px; border-radius: 50%; background: radial-gradient(closest-side, var(--kglow), transparent); transition: transform .6s var(--spring); }
.km:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -14px var(--kshadow), inset 0 0 0 1px var(--kline); }
.km:hover::before { transform: scale(1.3); }
.km-l { color: var(--kink); }
.km-ic { width: 22px; height: 22px; flex: none; display: grid; place-items: center; border-radius: 7px; color: #fff; background: linear-gradient(140deg, var(--k1), var(--k2)); box-shadow: 0 4px 10px -3px var(--kshadow), inset 0 1px 0 rgba(255, 255, 255, .25); }
.km-ic .ic { width: 13px; height: 13px; stroke-width: 2.1; }
.km-v { color: var(--kink); font-size: 22px; }
.km-v small { color: var(--kink); opacity: .55; }
.km-s { color: var(--kink); opacity: .9; }
.km-spark { top: 36px; }
.km .mini { color: var(--kink); }
.km .mini .bar { background: rgba(255, 255, 255, .7); box-shadow: inset 0 0 0 .5px var(--kline); }
.km.alert .km-ic { animation: km-alert 2.4s ease-in-out infinite; }
@keyframes km-alert { 0%, 100% { box-shadow: 0 4px 10px -3px var(--kshadow), 0 0 0 0 rgba(244, 63, 94, .35); } 50% { box-shadow: 0 4px 10px -3px var(--kshadow), 0 0 0 6px rgba(244, 63, 94, 0); } }
.km.alert .km-v { color: var(--kink); }

/* the headline number: a rich emerald card with white type */
.km.t-hero { --k1: #ffffff; --k2: #D1FAE5; --kink: #fff; --kline: rgba(255, 255, 255, .12); --kshadow: rgba(8, 112, 74, .55);
  color: #fff; background: radial-gradient(120% 130% at 100% 0%, rgba(110, 231, 183, .45), rgba(110, 231, 183, 0) 55%), linear-gradient(140deg, #0B8045 0%, #0A6455 100%);
  box-shadow: 0 12px 26px -14px var(--kshadow), inset 0 1px 0 rgba(255, 255, 255, .18); }
.km.t-hero::before { background: radial-gradient(closest-side, rgba(255, 255, 255, .22), transparent); }
.km.t-hero::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .16) 50%, transparent 65%); transform: translateX(-120%); animation: km-shine 1.4s .6s var(--out) both; }
@keyframes km-shine { to { transform: translateX(120%); } }
.km.t-hero .km-ic { color: #0A6A4E; background: #fff; box-shadow: 0 4px 10px -3px rgba(0, 0, 0, .25); }
.km.t-hero .km-l, .km.t-hero .km-v, .km.t-hero .km-v small { color: #fff; }
.km.t-hero .km-v small { opacity: .8; }
.km.t-hero .km-s { color: rgba(255, 255, 255, .92); }
.km.t-hero .mini { color: rgba(255, 255, 255, .95); }
.km.t-hero .mini .r { color: #fff; }
.km.t-hero .mini .bar { background: rgba(255, 255, 255, .22); box-shadow: none; }
.km.t-hero .mini .bar > span { background: #fff !important; }
.km.t-hero .delta.up { background: rgba(255, 255, 255, .2); color: #fff; }

/* admin pages sit on a faint wash of the brand colours */
.adm .main { position: relative; isolation: isolate; }
.adm .main::before { content: ""; position: absolute; z-index: -1; inset: 0 0 auto 0; height: 520px; pointer-events: none;
  background: radial-gradient(55% 70% at 8% 0%, rgba(47, 128, 255, .12), transparent 70%), radial-gradient(45% 60% at 92% 0%, rgba(139, 92, 246, .11), transparent 70%), radial-gradient(40% 55% at 55% 6%, rgba(15, 163, 177, .09), transparent 70%); }
.toolbar { background: rgba(244, 244, 247, .72); }

/* the active place and the main action carry the brand gradient */
.side-pill { background: linear-gradient(135deg, #0A6BE0 0%, #4B4FE0 100%); box-shadow: 0 6px 16px -6px rgba(10, 107, 224, .65); }
.btn-filled { background: linear-gradient(135deg, #0A6BE0 0%, #4B4FE0 100%); box-shadow: 0 2px 8px -2px rgba(10, 107, 224, .5), inset 0 1px 0 rgba(255, 255, 255, .2); transition: filter .2s, box-shadow .2s, transform .2s var(--spring); }
.btn-filled:hover { background: linear-gradient(135deg, #0A6BE0 0%, #4B4FE0 100%); filter: brightness(1.08); box-shadow: 0 8px 18px -6px rgba(10, 107, 224, .6), inset 0 1px 0 rgba(255, 255, 255, .2); }
.tab-pill { background: linear-gradient(135deg, rgba(10, 107, 224, .13), rgba(75, 79, 224, .13)); }
.tab-add span { background: linear-gradient(140deg, #2E8BFF 0%, #0A6BE0 45%, #4B4FE0 100%); }

/* panel headings get a small coloured icon chip */
.panel-h h3 > .ic, .kt-title h3 > .ic { width: 24px; height: 24px; padding: 5px; flex: none; border-radius: 7px; color: #fff; stroke-width: 2.1; background: linear-gradient(140deg, var(--h1, #2F80FF), var(--h2, #5B5BF0)); box-shadow: 0 4px 10px -4px var(--h1, #2F80FF); }
.h-blue { --h1: #2F80FF; --h2: #5B5BF0; } .h-teal { --h1: #0FA3B1; --h2: #21C29E; } .h-violet { --h1: #8B5CF6; --h2: #C05AF2; }
.h-amber { --h1: #F59E0B; --h2: #FB7A1E; } .h-rose { --h1: #F43F5E; --h2: #FF7A59; } .h-indigo { --h1: #6366F1; --h2: #8B5CF6; }
.panel { transition: box-shadow .3s; }
.panel:hover { box-shadow: 0 1px 2px rgba(20, 30, 60, .05), 0 10px 30px -18px rgba(20, 30, 60, .25); }

/* KAM: coloured tiles and a warmer hero */

/* ------------------------------------------------------------------ Compact metric cards
   Icon on the left, three tight lines on the right, the sparkline beside the number.
   No outline: the card is defined by its tint, a soft shadow in its own colour, a corner glow
   and a dot texture that fades in towards the bottom-right corner. */
.t-blue { --kdot: rgba(47, 128, 255, .3); } .t-teal { --kdot: rgba(15, 163, 177, .3); } .t-violet { --kdot: rgba(139, 92, 246, .28); }
.t-amber { --kdot: rgba(245, 158, 11, .34); } .t-rose { --kdot: rgba(244, 63, 94, .26); } .t-indigo { --kdot: rgba(99, 102, 241, .28); }
.kstrip { gap: 10px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.km { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; grid-template-areas: "ic l l" "ic v sp" "ic s s"; align-items: center; column-gap: 10px; row-gap: 0;
  padding: 10px 12px 9px 10px; border-radius: 14px; box-shadow: 0 8px 20px -14px var(--kshadow), 0 1px 1px rgba(20, 30, 60, .03); }
.km:hover { transform: translateY(-2px); box-shadow: 0 16px 28px -16px var(--kshadow), 0 1px 1px rgba(20, 30, 60, .03); }
.km::after { content: ""; position: absolute; z-index: -1; right: 0; bottom: 0; width: 48%; height: 100%; pointer-events: none;
  background-image: radial-gradient(var(--kdot, rgba(20, 30, 60, .1)) 1px, transparent 1.5px); background-size: 7px 7px;
  -webkit-mask-image: linear-gradient(140deg, transparent 35%, #000 100%); mask-image: linear-gradient(140deg, transparent 35%, #000 100%); }
.km-ic { grid-area: ic; align-self: start; width: 34px; height: 34px; margin-top: 2px; border-radius: 11px; }
.km-ic .ic { width: 17px; height: 17px; }
.km-l { grid-area: l; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 11px; line-height: 1.3; }
.km-v { grid-area: v; min-width: 0; font-size: 20px; line-height: 1.15; }
.km-v small { font-size: 11.5px; }
.km-s { grid-area: s; min-width: 0; font-size: 11px; line-height: 1.35; }
.km-spark { grid-area: sp; position: static; align-self: end; margin-bottom: 1px; }
.km-spark svg { display: block; }
.km .delta { font-size: 10.5px; padding: 0 4px; }
/* the headline card keeps its one-time shine instead of the dots */
.km.t-hero { box-shadow: 0 12px 24px -14px var(--kshadow), inset 0 1px 0 rgba(255, 255, 255, .16); }
.km-b { display: inline-flex; align-items: center; gap: 4px; margin-right: 7px; white-space: nowrap; font-size: 10.5px; }
.km-b i { width: 7px; height: 7px; border-radius: 2px; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .75); }
.km.t-hero .km-s { font-weight: 550; }
/* KAM tiles: no outline either */
.km.t-hero::after { width: auto; height: auto; -webkit-mask-image: none; mask-image: none; }

.kstrip.ks-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1240px) { .kstrip.ks-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { .kstrip.ks-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.km-brands { grid-area: sp; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; align-self: center; }
.km-brands .km-b { margin: 0; font-size: 10px; line-height: 1.25; color: rgba(255, 255, 255, .92); }
.km-brands .km-b b { font-weight: 700; color: #fff; }

/* ------------------------------------------------------------------ KAM: list section headers */
.ic-group { display: flex; align-items: center; gap: 7px; margin: 0 0 8px; padding: 0 4px; font-size: 13px; font-weight: 700; letter-spacing: .01em; color: var(--label); }
.ic-group i { width: 8px; height: 8px; border-radius: 50%; background: var(--g, var(--accent)); box-shadow: 0 0 0 3px var(--gs, var(--accent-soft)); }
.ic-group .n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; background: var(--gs, var(--fill-2)); color: var(--gi, var(--label-2)); }
.ic-group[data-tone="red"] { --g: #F43F5E; --gs: #FFE4E9; --gi: #A50E36; color: #A50E36; }
.ic-group[data-tone="orange"] { --g: #F59E0B; --gs: #FFEFD2; --gi: #874600; }
.ic-group[data-tone="blue"] { --g: #2F80FF; --gs: #E3EDFF; --gi: #0B4A9A; }
.ic-group[data-tone="gray"] { --g: #A1A1AA; --gs: var(--fill-2); --gi: var(--label-2); }

/* ================================================================== KAM: native app layer
   Grouped lists instead of big cards: compact rows divided by hairlines, swipe actions, sticky section headers.
   Each row knows its stage: --st colours the dot and ring, --st-ink is the text shade (4.5:1 on white). */
:is(.ag, .ir, .deal, .dh) { --st: #8E8E93; --st-ink: #5C5C63; }
:is(.ag, .ir, .deal, .dh)[data-stage="qualified"] { --st: #0FA3B1; --st-ink: #0A5F69; }
:is(.ag, .ir, .deal, .dh)[data-stage="quoted"] { --st: #2F80FF; --st-ink: #0B4A9A; }
:is(.ag, .ir, .deal, .dh)[data-stage="negotiation"] { --st: #6366F1; --st-ink: #3730A3; }
:is(.ag, .ir, .deal, .dh)[data-stage="won"] { --st: #22B04B; --st-ink: #1C7C36; }
:is(.ag, .ir, .deal, .dh)[data-stage="lost"] { --st: #F43F5E; --st-ink: #A50E36; }
:is(.ag, .ir, .deal, .dh)[data-stage="hold"] { --st: #F59E0B; --st-ink: #874600; }
.kam-main { gap: 20px; }
.ic-group { margin: 0; }

/* My Day: greeting with your avatar, like a phone's home screen */
.day-me { flex: none; border-radius: 50%; transition: transform .25s var(--spring); -webkit-tap-highlight-color: transparent; }
.day-me:active { transform: scale(.9); }
.day-me .avatar { box-shadow: 0 0 0 2.5px rgba(255, 255, 255, .9), 0 8px 18px -8px rgba(20, 30, 60, .5); }

/* Today: one compact brand card. Today's plan as a ring, what to do next, and three quick counts. */
.today { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; gap: 12px; padding: 14px 14px 12px; border-radius: 22px; color: #fff;
  background: radial-gradient(110% 130% at 100% 0%, rgba(150, 120, 255, .6), transparent 55%), linear-gradient(140deg, #0A6BE0 0%, #3E4CE2 58%, #5A3ED8 100%);
  box-shadow: 0 18px 32px -20px rgba(40, 70, 220, .85), inset 0 1px 0 rgba(255, 255, 255, .22); }
.today::before { content: ""; position: absolute; z-index: -1; right: 0; top: 0; width: 55%; height: 70%; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .28) 1px, transparent 1.5px); background-size: 8px 8px;
  -webkit-mask-image: linear-gradient(220deg, #000 0%, transparent 70%); mask-image: linear-gradient(220deg, #000 0%, transparent 70%); }
.today::after { content: ""; position: absolute; z-index: -1; width: 220px; height: 220px; left: -90px; bottom: -150px; border-radius: 50%; background: radial-gradient(closest-side, rgba(94, 234, 212, .35), transparent); }
.td-row { display: flex; align-items: center; gap: 14px; }
.td-ring { position: relative; flex: none; width: 62px; height: 62px; }
.td-ring svg { display: block; }
.td-ring > span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, .85); font-variant-numeric: tabular-nums; }
.td-ring > span b { font-family: var(--font-display); font-size: 19px; font-weight: 750; line-height: 1; color: #fff; letter-spacing: -.03em; }
.td-ring .ic { stroke-width: 2.6; }
.td-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.td-k { font-size: 11px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: rgba(255, 255, 255, .8); }
.td-h { font-family: var(--font-display); font-size: 21px; font-weight: 700; letter-spacing: -.026em; line-height: 1.2; }
.td-s { font-size: 13px; color: rgba(255, 255, 255, .9); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.td-chip { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "ic v" "l l"; align-items: center; column-gap: 6px; row-gap: 3px; min-height: 44px; padding: 7px 10px 7px; border-radius: 14px; background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .24);
  color: #fff; text-decoration: none; transition: background-color .2s, transform .25s var(--spring); -webkit-tap-highlight-color: transparent; }
.td-chip:active { transform: scale(.95); }
@media (hover: hover) { .td-chip:hover { background: rgba(255, 255, 255, .22); } }
.td-chip .ic { grid-area: ic; opacity: .92; }
.td-chip span { grid-area: l; }
.td-chip b { grid-area: v; font-family: var(--font-display); font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1; }
.td-chip span { min-width: 0; font-size: 11.5px; font-weight: 600; line-height: 1.15; color: rgba(255, 255, 255, .92); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-chip.is-hot { background: rgba(255, 80, 110, .34); box-shadow: inset 0 0 0 .5px rgba(255, 190, 200, .55); }
.td-chip.is-hot .ic { animation: td-pulse 2.4s ease-in-out infinite; }
@keyframes td-pulse { 50% { transform: scale(1.18); } }

/* Conversion at a glance: four numbers on one strip, each with a small ring */
.dstats-wrap { display: flex; flex-direction: column; gap: 6px; margin-top: -8px; }
.dstats-cap { display: flex; justify-content: space-between; gap: 10px; padding: 0 4px; font-size: 12px; font-weight: 600; color: var(--label-2); }
.dstats-cap span:first-child { flex: none; }
.dstats-cap span:last-child { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dstats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--bg-elev); border-radius: 18px; box-shadow: var(--shadow-1); overflow: hidden; }
.dstat { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "r v" "l l"; align-items: center; column-gap: 5px; row-gap: 3px; padding: 10px 8px 9px 10px; min-width: 0; color: var(--label); text-decoration: none; }
.dstat + .dstat::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: .5px; background: var(--sep-2); }
.dstat .mring { grid-area: r; display: block; }
.dstat-t { display: contents; }
.dstat-t b { grid-area: v; font-family: var(--font-display); font-size: 14.5px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; white-space: nowrap; }
.dstat-t b small { font-size: 11px; font-weight: 650; margin-left: 1px; }
.dstat-t > small { grid-area: l; font-size: 11px; font-weight: 600; color: var(--label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dstat.is-money .dstat-t b { grid-column: 1 / -1; color: #5521B5; }
a.dstat:active { background: var(--fill-2); }
@media (max-width: 360px) { .dstat { padding: 9px 7px 8px; column-gap: 4px; } .dstat .mring { width: 22px; height: 22px; } .dstat-t b { font-size: 14px; } }
.tip-row { display: flex; align-items: center; gap: 8px; margin: 2px 0 0; padding: 9px 12px; border-radius: 14px; background: linear-gradient(90deg, rgba(139, 92, 246, .12), rgba(47, 128, 255, .08)); color: #4527A8; font-size: 13px; font-weight: 500; line-height: 1.35; text-decoration: none; }
.tip-row span { flex: 1; min-width: 0; }
.tip-row .ic { flex: none; }
.tip-row .ic:first-child { color: #8B5CF6; }
.tip-row .ic:last-child:not(:first-child) { opacity: .55; }
a.tip-row:active { filter: brightness(.96); }

.count-pill { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 7px; margin-left: 2px; border-radius: 999px; vertical-align: 3px; font-family: var(--font); font-size: 12px; font-weight: 700; letter-spacing: 0; background: rgba(47, 128, 255, .12); color: #0B4A9A; }
.swipe-note { display: flex; align-items: center; justify-content: center; gap: 5px; font-size: 12px; color: var(--label-3); }
.swipe-note .ic { transform: scaleX(-1); }

/* Follow-up rows: one grouped list, a hairline between rows */
.agenda { display: flex; flex-direction: column; background: var(--bg-elev); border-radius: 18px; box-shadow: var(--shadow-1); overflow: hidden; }
.ag, .ir { position: relative; overflow: hidden; background: var(--bg-elev); }
.ag + .ag::before { content: ""; position: absolute; z-index: 3; top: 0; right: 0; left: 66px; height: .5px; background: var(--sep-2); pointer-events: none; }
/* inset by a pixel so the coloured actions never show along the hairlines between rows */
.ag-actions { position: absolute; inset: 1px 0 1px auto; display: flex; }
.ag-actions a, .ag-actions button { width: 76px; border: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: #fff; font-size: 12px; font-weight: 600; text-decoration: none; }
.sa-log { background: linear-gradient(160deg, #3D8BFF, #0A6BE0); }
.sa-tmr { background: linear-gradient(160deg, #FFB443, #E57F00); }
.sa-call { background: linear-gradient(160deg, #4CD964, #1F9E3E); }
.sa-wa { background: linear-gradient(160deg, #25C76E, #0E7C43); }
.ag-front { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; padding: 10px 12px; min-height: 62px; background: var(--bg-elev); color: inherit; touch-action: pan-y; transition: transform .45s var(--spring), background-color .15s; }
.ag-front.dragging { transition: none; }
.ag-front:active { background: #F6F6F9; }
.ag-time { flex: none; width: 42px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 6px 0; border-radius: 12px; background: var(--fill-2); color: var(--label); font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1.15; }
.ag-time small { font-size: 9.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; color: var(--label-2); }
.ag.is-overdue .ag-time, .ag.is-overdue .ag-time small { background: #FFE4E9; color: #A50E36; }
.ag.is-today .ag-time, .ag.is-today .ag-time small { background: #FFEFD2; color: #874600; }
.ag-time small { background: none !important; }
.ag-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ag-link { color: var(--label); text-decoration: none; font-size: 15px; font-weight: 600; letter-spacing: -.018em; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-link::after, .ir-name::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.ag-link:focus-visible, .ir-name:focus-visible { outline: none; }
.ag-front:has(.ag-link:focus-visible, .ir-name:focus-visible) { box-shadow: inset 0 0 0 3px rgba(0, 113, 227, .45); }
.ag .act { display: block; min-width: 0; font-size: 13px; color: var(--label-2); line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-st { display: inline-flex; align-items: center; gap: 4px; margin-right: 6px; font-size: 11.5px; font-weight: 700; color: var(--st-ink); }
.ag-st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--st); }
.ag-who { flex: none; font-size: 12px; color: var(--label-2); }
.ag-call { position: relative; z-index: 2; flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #1C7C36; background: rgba(52, 199, 89, .15); transition: transform .25s var(--spring), background-color .2s; -webkit-tap-highlight-color: transparent; }
.ag-call::before { content: ""; position: absolute; inset: -4px; }
.ag-call:active { transform: scale(.86); background: rgba(52, 199, 89, .26); }
/* the first row peeks open once to show the swipe actions */
.peek .ag-front { animation: peek 1.2s var(--spring); }
@keyframes peek { 0%, 100% { transform: none; } 30%, 62% { transform: translateX(-68px); } }

/* Inquiry rows, Mail-style: account and value / stage and requirement / next step */
.ir-list { display: flex; flex-direction: column; background: var(--bg-elev); border-radius: 18px; box-shadow: var(--shadow-1); overflow: hidden; }
.ir-list > [hidden] { display: none; }
.ir-item { position: relative; }
.ir-item:not([hidden]) ~ .ir-item:not([hidden])::before { content: ""; position: absolute; z-index: 3; top: 0; right: 0; left: 70px; height: .5px; background: var(--sep-2); pointer-events: none; }
.ir .ag-front { align-items: flex-start; padding: 11px 12px; min-height: 0; }
.ir-av { position: relative; flex: none; width: 46px; height: 46px; display: grid; place-items: center; }
/* the ring around the monogram fills with the deal's progress, in the stage's colour */
.ir-av::before { content: ""; position: absolute; inset: 0; padding: 2.5px; border-radius: 15px; background: conic-gradient(var(--st) calc(var(--p, 0) * 360deg), rgba(118, 118, 128, .16) 0);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.ir[data-stage="lost"] .ir-av::before { opacity: .55; }
.ir-av .avatar.sq { width: 37px; height: 37px; border-radius: 11px; font-size: 13px; }
.ir-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ir-l1 { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.ir-name { flex: 1; min-width: 0; color: var(--label); text-decoration: none; font-size: 15.5px; font-weight: 650; letter-spacing: -.02em; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ir-val { flex: none; font-family: var(--font-display); font-size: 14px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ir-l2 { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 13px; color: var(--label-2); line-height: 1.35; }
.ir-st { flex: none; font-size: 12px; font-weight: 700; color: var(--st-ink); }
.ir-l2 .brand-dot { width: 7px; height: 7px; border-radius: 2px; flex: none; }
.ir-l2 .brand-dot + .brand-dot { margin-left: -4px; }
.ir-req { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ir-prio { flex: none; display: inline-flex; align-items: center; gap: 2px; height: 18px; padding: 0 6px; border-radius: 6px; font-size: 11px; font-weight: 700; }
.ir-prio .ic { width: 11px; height: 11px; }
.ir-l3 { display: flex; align-items: center; gap: 7px; min-width: 0; margin-top: 3px; }
.ir-due { flex: none; display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 7px; border-radius: 6px; font-size: 11.5px; font-weight: 650; white-space: nowrap; }
.ir-due .ic { width: 12px; height: 12px; }
.ir-act { flex: 1; min-width: 0; font-size: 12.5px; color: var(--label-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ir-owner { flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; color: var(--label-2); }
.ir-owner .avatar.sm { width: 20px; height: 20px; font-size: 8.5px; }
@media (max-width: 380px) { .ir-owner-n { display: none; } .ir-prio { padding: 0 4px; } }

/* Section headers stay in view while their rows scroll, like a phone's contact list */
.ic-group.sticky { position: sticky; top: calc(52px + var(--safe-t)); z-index: 20; margin: -4px -16px 0; padding: 7px 20px 6px; background: rgba(242, 242, 247, .88); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px); }
@media (min-width: 720px) { .ic-group.sticky { margin-left: -24px; margin-right: -24px; padding-left: 28px; padding-right: 28px; } }
.section[id^="g-"] { scroll-margin-top: calc(56px + var(--safe-t)); }
@media (prefers-reduced-motion: no-preference) { html:has(.week) { scroll-behavior: smooth; } }

/* Search with a sort button beside it */
.find-row { display: flex; align-items: center; gap: 8px; }
.find-row .searchbar { flex: 1; min-width: 0; }
.sort-pill { position: relative; flex: none; display: inline-flex; align-items: center; gap: 5px; height: 40px; padding: 0 12px; border-radius: var(--r-sm); background: var(--fill); color: var(--label); font-size: 13.5px; font-weight: 600; transition: background-color .2s, color .2s; }
.sort-pill.is-on { background: rgba(47, 128, 255, .13); color: #0B4A9A; }
.sort-pill select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
.sort-pill:focus-within { box-shadow: 0 0 0 3px rgba(0, 113, 227, .35); }
.fchip i { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.fchip.is-on { background: linear-gradient(135deg, #0A6BE0, #4B4FE0); box-shadow: 0 6px 14px -8px rgba(10, 107, 224, .8); }
.fchip.is-on i { box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .9); }

/* Follow-ups: the week at a glance; tap a day to jump to it */
.week { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 3px; padding: 5px; background: var(--bg-elev); border-radius: 18px; box-shadow: var(--shadow-1); }
.wk { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 0 6px; border-radius: 13px; color: var(--label); text-decoration: none; transition: background-color .2s, transform .25s var(--spring); -webkit-tap-highlight-color: transparent; }
.wk span { font-size: 10px; font-weight: 650; text-transform: uppercase; letter-spacing: .03em; color: var(--label-2); }
.wk b { height: 22px; display: grid; place-items: center; font-family: var(--font-display); font-size: 17px; font-weight: 700; line-height: 1; }
.wk i { min-width: 18px; height: 16px; padding: 0 5px; border-radius: 999px; display: grid; place-items: center; font-style: normal; font-size: 10.5px; font-weight: 700; background: rgba(47, 128, 255, .12); color: #0B4A9A; }
.wk:active { transform: scale(.93); }
.wk.is-empty { pointer-events: none; }
.wk.is-empty b { color: var(--label-3); }
.wk.is-empty i { background: none; color: var(--label-3); }
.wk.is-today { background: linear-gradient(160deg, #2F80FF, #4B4FE0); color: #fff; box-shadow: 0 8px 16px -10px rgba(47, 100, 255, .9); }
.wk.is-today span, .wk.is-today.is-empty b { color: rgba(255, 255, 255, .9); }
.wk.is-today i { background: rgba(255, 255, 255, .24); color: #fff; }
.wk.late { background: #FFF0F3; }
.wk.late b, .wk.late span { color: #A50E36; }
.wk.late i { background: #FFD6DE; color: #A50E36; }
.wk.late.is-empty { background: none; }
.wk.late.is-empty b, .wk.late.is-empty span { color: var(--label-3); }

/* Hot deals: small cards that scroll sideways */
.deal { flex: 0 0 62%; max-width: 230px; scroll-snap-align: start; position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; gap: 5px; padding: 12px; border-radius: 18px; color: var(--label); text-decoration: none; background: var(--bg-elev); box-shadow: var(--shadow-1); }
.deal::before { content: ""; position: absolute; z-index: -1; width: 150px; height: 150px; right: -60px; top: -70px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--st) 24%, transparent), transparent); }
.deal .d-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.deal .d-top .avatar.sq { width: 28px; height: 28px; border-radius: 9px; font-size: 10.5px; }
.deal .d-top b { min-width: 0; font-size: 14px; font-weight: 650; letter-spacing: -.018em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deal .d-val { margin-top: 3px; font-family: var(--font-display); font-size: 20px; font-weight: 700; letter-spacing: -.028em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.deal .d-sub { font-size: 12px; color: var(--label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; margin-top: 3px; }
.mini-steps i { height: 4px; border-radius: 2px; background: var(--fill); }
.mini-steps i.on { background: var(--st, var(--accent)); }
.d-foot { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--label-2); white-space: nowrap; }
.d-foot b { font-size: 11.5px; font-weight: 700; color: var(--st-ink); }

/* the swipe actions only show while a row is being swiped or is open */
[data-swipe] .ag-actions { opacity: 0; transition: opacity 0s .45s; }
[data-swipe].is-open .ag-actions, [data-swipe].peek .ag-actions, [data-swipe]:has(.dragging) .ag-actions { opacity: 1; transition: none; }

/* New inquiry: numbered sections that tick off as they are filled in */
.nf { gap: 20px; }
.fsec { display: flex; flex-direction: column; gap: 8px; }
.fsec-h { display: flex; align-items: center; gap: 9px; min-height: 28px; padding: 0 4px; font-size: 15px; font-weight: 700; letter-spacing: -.016em; }
.fsec-n { position: relative; flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; color: #0B4A9A; background: rgba(47, 128, 255, .13); transition: background-color .3s, color .3s, transform .45s var(--spring), box-shadow .3s; }
.fsec-n .ic { display: none; stroke-width: 2.6; }
.fsec.is-done .fsec-n { color: #fff; background: linear-gradient(140deg, #34C759, #1E9E5A); box-shadow: 0 4px 10px -4px rgba(30, 158, 90, .7); transform: scale(1.06); }
.fsec.is-done .fsec-n > span { display: none; }
.fsec.is-done .fsec-n .ic { display: block; animation: pop .35s var(--spring); }
.fsec-act { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 11px; border: 0; border-radius: 999px; background: rgba(47, 128, 255, .12); color: #0B4A9A; font-size: 13px; font-weight: 600; }
.fsec-act[hidden] { display: none; }
.fsec-act:active { transform: scale(.95); }
.fsec-sum { margin-left: auto; font-size: 12.5px; font-weight: 650; color: #1C7C36; }
.fsec.has-error .vp { box-shadow: 0 0 0 1.5px var(--red-fill), var(--shadow-1); }
.fsec > .field-error { padding: 0 4px; }

/* an icon inside the mobile field, and a tick once the number is valid */
.input-icon { position: relative; }
.input-icon > .ic { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--label-3); pointer-events: none; }
.input-icon .input { padding-left: 40px; padding-right: 40px; }
.mob-ok { position: absolute; right: 12px; top: 50%; transform: translateY(-50%) scale(.6); display: grid; color: var(--green-fill); opacity: 0; transition: opacity .2s, transform .35s var(--spring); pointer-events: none; }
.input-icon.is-ok .mob-ok { opacity: 1; transform: translateY(-50%) scale(1); }

/* Vehicle picker: brand tabs, tap + to add, a running estimate */
.vp { overflow: hidden; }
.vp-tabs { margin: 10px 12px 6px; }
.vp-tabs label { gap: 6px; }
.vp-tabs .brand-dot { width: 8px; height: 8px; border-radius: 2px; }
.vp-n { font-size: 11.5px; font-weight: 600; color: var(--label-3); }
.vp-n.is-on { color: #1C7C36; font-weight: 700; }
.vp-row { position: relative; display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 14px; transition: background-color .2s; }
.vp-row[hidden] { display: none; }
.vp-row + .vp-row::before { content: ""; position: absolute; top: 0; right: 0; left: 60px; height: .5px; background: var(--sep-2); }
.vp-ic { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: linear-gradient(140deg, #2F86E0, #005BAC); box-shadow: 0 4px 10px -5px rgba(0, 91, 172, .6); }
.vp-row[data-brand="Mahindra"] .vp-ic { background: linear-gradient(140deg, #F2475E, #C8102E); box-shadow: 0 4px 10px -5px rgba(200, 16, 46, .6); }
.vp-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.vp-txt b { font-size: 14.5px; font-weight: 600; letter-spacing: -.015em; line-height: 1.3; }
.vp-txt small { font-size: 12px; color: var(--label-2); }
.vp-row.is-on { background: #F2F7FF; }
.vp-row[data-brand="Mahindra"].is-on { background: #FFF4F5; }
.vp-step { height: 38px; }
.vp-step button { width: 38px; height: 38px; }
.vp-step input { width: 30px; }
.vp-row:not(.is-on) .vp-step { background: none; }
.vp-row:not(.is-on) .vp-step [data-step="-1"], .vp-row:not(.is-on) .vp-step input { display: none; }
.vp-row:not(.is-on) .vp-step [data-step="1"] { background: rgba(47, 128, 255, .12); color: #0B4A9A; }
.vp-row.is-on .vp-step { background: #fff; box-shadow: inset 0 0 0 .5px var(--sep-2); }
.vp-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; background: var(--bg-soft); border-top: .5px solid var(--sep-2); font-size: 12.5px; color: var(--label-2); }
.vp-foot span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vp-foot b { flex: none; color: var(--label); font-variant-numeric: tabular-nums; }

/* small selectable chips (source, type, dates) */
.choices.chips-sm { gap: 6px; }
.chips-sm .choice span { min-height: 36px; padding: 0 12px; font-size: 13.5px; }
.chips-sm .choice span .ic { width: 15px; height: 15px; }
.chips-sm .choice input:checked + span, .chips-sm button.choice.is-on span { background: linear-gradient(135deg, #0A6BE0, #4B4FE0); box-shadow: 0 6px 14px -8px rgba(10, 107, 224, .8); }

/* More details: a row that opens */
.more-d { overflow: hidden; }
.more-d > summary { cursor: pointer; list-style: none; border-radius: var(--r-lg); }
.more-d > summary::-webkit-details-marker { display: none; }
.more-d > summary .row-title { font-weight: 600; }
.more-d > summary .chev { transition: transform .3s var(--spring); }
.more-d[open] > summary .chev { transform: rotate(180deg); }
.more-d[open] > summary { border-radius: var(--r-lg) var(--r-lg) 0 0; }
.more-d .frow > label .badge { margin-left: 6px; vertical-align: 1px; }

/* the save bar shows how much is left */
.nf-bar { align-items: center; }
.nf-prog { flex: none; display: flex; align-items: center; gap: 8px; padding: 0 6px 0 4px; min-width: 0; }
.nf-prog svg { display: block; }
.nf-prog circle[data-nf-arc] { transition: stroke-dashoffset .5s var(--out); }
.nf-prog-t { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.nf-prog-t b { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.nf-prog-t small { font-size: 11.5px; color: var(--label-2); white-space: nowrap; max-width: 34vw; overflow: hidden; text-overflow: ellipsis; }
.nf-bar .btn-filled { flex: 1; }
.nf-bar.is-ready .nf-prog-t small { color: #1C7C36; font-weight: 600; }
.nf-bar.is-ready .btn-filled { animation: nf-ready .6s var(--spring); }
@keyframes nf-ready { 40% { transform: scale(1.04); } }

/* Inquiry detail: a contact-style header with round actions, then compact grouped sections */
.dh { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding-top: 2px; }
.dh-av { width: 70px; height: 70px; margin-bottom: 8px; }
.dh-av::before { padding: 3px; border-radius: 23px; }
.dh-av .avatar.sq { width: 58px; height: 58px; border-radius: 18px; font-size: 20px; box-shadow: 0 10px 22px -12px rgba(20, 30, 60, .55); }
.dh .title-1 { max-width: 100%; overflow-wrap: anywhere; }
.dh-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 8px; }
.dh-acts { display: flex; justify-content: center; gap: 6px; margin-top: 14px; }
.dh-act { width: 70px; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 0; border: 0; background: none; font-size: 11.5px; font-weight: 600; color: var(--label-2); text-decoration: none; -webkit-tap-highlight-color: transparent; }
.dh-act span { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: #fff; transition: transform .25s var(--spring); }
.dh-act:active span { transform: scale(.88); }
.dh-act.call span { background: linear-gradient(160deg, #4CD964, #1F9E3E); box-shadow: 0 8px 16px -8px rgba(31, 158, 62, .8); }
.dh-act.wa span { background: linear-gradient(160deg, #25C76E, #0E7C43); box-shadow: 0 8px 16px -8px rgba(14, 124, 67, .8); }
.dh-act.mail span { background: linear-gradient(160deg, #47A3FF, #0066D6); box-shadow: 0 8px 16px -8px rgba(0, 102, 214, .8); }
.dh-act.log span { background: linear-gradient(160deg, #A78BFA, #6D4AE0); box-shadow: 0 8px 16px -8px rgba(109, 74, 224, .8); }
.dbox { border-radius: 18px; }
.dbox-val { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px; }
.dbox .d-value b { font-size: 26px; }
.dbox .banner { padding: 11px 12px; border-radius: 14px; font-size: 13.5px; }
.dbox-contact { --inset: 16px; min-height: 0; padding: 10px 16px; }
.dbox-contact::before { content: ""; position: absolute; top: 0; right: 0; left: 16px; height: .5px; background: var(--sep-2); }
.dbox-contact .row-title { font-size: 15px; }
.nx { border-radius: 18px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.nx-top { display: flex; align-items: center; gap: 12px; }
.nx .nc-date { width: 44px; height: 48px; border-radius: 12px; }
.nx .nc-date b { font-size: 19px; }
.nx-act { font-size: 15px; font-weight: 600; letter-spacing: -.015em; line-height: 1.3; }
.nx-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.nx-btns .btn { --h: 38px; }
.nx-when { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 2px; }

/* KAM alerts: two-line rows, like a phone's notification list */
.kam .notif { gap: 11px; padding: 11px 14px; }
.kam .notif .n-ic { width: 30px; height: 30px; border-radius: 9px; }
.kam .notif .n-ic .ic { width: 16px; height: 16px; }
.kam .notif p { font-size: 14px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kam .notif time { font-size: 12px; }
.kam .notif + .notif::before { left: 55px; }
.kam .notif:active { background: #F6F6F9; }
@media (max-width: 360px) { .dstat-t b { font-size: 13.5px; } }

/* My Day: the greeting and date sit at the very top, in the bar beside search and your avatar */
.navbar.has-left { grid-template-columns: minmax(0, 1fr) auto; }
.navbar.has-left .nb-title { display: none; }
.nb-hello { display: flex; flex-direction: column; min-width: 0; margin: 0; padding-left: 4px; line-height: 1.2; }
.nb-hello b { font-family: var(--font-display); font-size: 17px; font-weight: 700; letter-spacing: -.022em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nb-hello time { font-size: 12.5px; font-weight: 600; color: var(--label-2); }
.p-kam .today:first-child { margin-top: 4px; }

/* A slimmer tab bar: shorter, narrower, smaller icons and a smaller New button */
.tabbar { height: 58px; width: min(400px, calc(100vw - 28px)); bottom: calc(10px + var(--safe-b)); padding: 0 5px; border-radius: 29px; }
.tab { height: 48px; gap: 1px; border-radius: 24px; font-size: 10px; }
.tab .ic { width: 22px; height: 22px; }
.tab-pill { inset: 2px 3px; border-radius: 22px; }
.tab .dot-count { top: 1px; right: calc(50% - 20px); }
.tab-add span { width: 46px; height: 46px; box-shadow: 0 6px 16px rgba(0, 98, 214, .38), inset 0 1px 0 rgba(255, 255, 255, .35); }
.tab-add .ic { width: 23px; height: 23px; }
.kam-main { padding-bottom: calc(100px + var(--safe-b)); }

/* ================================================================== Sign-in
   A brand hero with the sales road from the logo (inquiry → order), and the form on a sheet below it.
   On wide screens the two sit side by side. */
.auth-body { background: #fff; }
.auth { min-height: 100dvh; display: flex; flex-direction: column; background: #fff; }
.auth-hero { position: relative; isolation: isolate; overflow: hidden; color: #fff; padding: calc(18px + var(--safe-t)) 22px 54px;
  background: radial-gradient(90% 70% at 100% 0%, rgba(150, 120, 255, .55), transparent 60%), radial-gradient(70% 60% at 0% 100%, rgba(94, 234, 212, .3), transparent 60%), linear-gradient(150deg, #0A6BE0 0%, #3E4CE2 58%, #5A3ED8 100%); }
.auth-hero::before { content: ""; position: absolute; z-index: -1; right: 0; top: 0; width: 60%; height: 75%; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .26) 1px, transparent 1.5px); background-size: 9px 9px;
  -webkit-mask-image: linear-gradient(215deg, #000 0%, transparent 70%); mask-image: linear-gradient(215deg, #000 0%, transparent 70%); }
.auth-hero::after { content: ""; position: absolute; z-index: -1; width: 340px; height: 340px; left: -120px; bottom: -200px; border-radius: 50%; background: radial-gradient(closest-side, rgba(126, 240, 166, .28), transparent); animation: ah-drift 14s ease-in-out infinite alternate; }
@keyframes ah-drift { to { transform: translate3d(60px, -30px, 0) scale(1.15); } }
.ah-in { position: relative; display: flex; flex-direction: column; gap: 14px; max-width: 440px; margin: 0 auto; }
.ah-aci { align-self: flex-start; display: inline-flex; padding: 6px 12px; border-radius: 12px; background: #fff; box-shadow: 0 10px 22px -12px rgba(10, 30, 90, .7); animation: rise .5s var(--out); }
.ah-aci img { display: block; width: auto; height: 22px; }
.ah-brand { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.ah-mark { display: grid; padding: 4px; border-radius: 20px; background: rgba(255, 255, 255, .18); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3), 0 14px 26px -14px rgba(10, 20, 80, .8); }
.ah-mark .app-logo { display: block; border-radius: 16px; }
.auth-hero .wordmark { color: #fff; font-size: 30px; }
.auth-hero .wordmark i { background-image: linear-gradient(160deg, #A9D4FF 20%, #7EF0A6 85%); }
.auth-hero .wordmark em { background: rgba(255, 255, 255, .2); color: #fff; }
.ah-tag { max-width: 32ch; font-size: 15px; line-height: 1.45; color: rgba(255, 255, 255, .9); }
.ah-road { display: block; width: 100%; max-width: 380px; height: auto; overflow: visible; }
.ah-road text { font-family: var(--font); font-size: 10px; font-weight: 650; letter-spacing: .02em; fill: rgba(255, 255, 255, .88); }
.ah-line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: road-draw 1.6s var(--out) .2s forwards; }
.ah-stop { opacity: 0; transform-box: fill-box; transform-origin: center; animation: ah-pop .5s var(--spring) var(--d) forwards; }
@keyframes ah-pop { from { opacity: 0; transform: translateY(5px) scale(.6); } to { opacity: 1; transform: none; } }
.ah-car { filter: drop-shadow(0 0 6px rgba(255, 255, 255, .95)); }
.ah-points { display: none; }
@media (max-height: 700px) and (max-width: 899px) { .ah-road { display: none; } }
@media (prefers-reduced-motion: reduce) { .ah-car { display: none; } .ah-line { animation: none; stroke-dashoffset: 0; } .ah-stop { animation: none; opacity: 1; } .auth-hero::after { animation: none; } }

.auth-pane { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; align-items: center; margin-top: -30px; padding: 22px 20px 0; background: #fff; border-radius: 28px 28px 0 0; box-shadow: 0 -14px 30px -20px rgba(10, 30, 90, .5); }
.auth-card { width: min(380px, 100%); display: flex; flex-direction: column; gap: 20px; animation: rise .6s var(--out); }
.auth-switch a { font-size: 13.5px; }
.auth-switch a .ic { color: var(--label-2); }
.auth-switch a.is-on .ic { color: #0A6BE0; }
.auth-head { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.auth-head .app-mark { margin-bottom: 10px; }
.auth-head h1 { font-family: var(--font-display); font-size: 26px; font-weight: 700; letter-spacing: -.026em; line-height: 1.2; }
.auth-head p { font-size: 14.5px; color: var(--label-2); }
.auth-label { font-size: 13px; font-weight: 600; color: var(--label-2); }
.auth .input { height: 50px; border-radius: 14px; font-size: 16px; background: #F4F5F8; box-shadow: inset 0 0 0 1px rgba(60, 60, 67, .08); }
.auth .input:focus { background: #fff; box-shadow: 0 0 0 1.5px rgba(10, 107, 224, .6), 0 0 0 5px rgba(10, 107, 224, .12); }
.auth .has-error .input { background: #FFF6F5; box-shadow: 0 0 0 1.5px var(--red-fill); }
.auth .input-icon > .ic { left: 15px; transition: color .2s; }
.auth .input-icon:focus-within > .ic { color: #0A6BE0; }
.auth .input-icon .input { padding-left: 44px; }
.auth .pw-wrap .input { padding-right: 52px; }
.caps-hint { display: flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--orange); }
.caps-hint[hidden] { display: none; }
.auth-go { gap: 8px; --h: 52px; font-size: 16.5px; }
.auth-go .ic { transition: transform .3s var(--spring); }
.auth-go:hover .ic { transform: translateX(3px); }
.auth-foot { text-align: center; font-size: 13px; line-height: 1.45; color: var(--label-2); text-wrap: balance; }
.auth-foot .ic { display: inline-block; margin-right: 5px; vertical-align: -2px; color: var(--label-3); }
.auth .sig { margin-top: auto; padding-top: 28px; }

@media (min-width: 900px) {
  .auth { flex-direction: row; padding: 14px; }
  .auth-hero { flex: 1.05; display: flex; border-radius: 28px; padding: 36px 48px 40px; }
  .ah-in { width: 100%; max-width: 480px; margin: 0; gap: 18px; }
  .ah-brand { margin-top: auto; }
  .auth-hero .wordmark { font-size: 38px; }
  .ah-mark .app-logo { width: 62px; height: 62px; }
  .ah-tag { font-size: 18px; }
  .ah-road { max-width: 460px; margin: 6px 0; }
  .ah-road text { font-size: 9px; }
  .ah-points { display: flex; flex-direction: column; gap: 10px; margin: 0 0 auto; padding: 0; list-style: none; }
  .ah-points li { display: flex; align-items: center; gap: 10px; font-size: 14.5px; color: rgba(255, 255, 255, .92); }
  .ah-points span { width: 30px; height: 30px; flex: none; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, .16); box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .28); }
  .auth-pane { flex: 1; margin: 0; padding: 24px 40px 0; border-radius: 0; box-shadow: none; background: transparent; }
  .auth-card { margin: auto 0; }
  .auth .sig { margin-top: 0; }
}
@media (max-width: 360px) { .auth-switch .ic { display: none; } .auth-switch a { font-size: 13px; padding: 0 6px; } }
.src-other { margin-top: 4px; display: flex; flex-direction: column; gap: 6px; }
.src-other[hidden] { display: none; }

/* ================================================================== KAM: calm status language
   No tinted red or yellow boxes. Status chips sit on one quiet neutral surface and carry a small
   coloured dot; only what is late gets a gentle pulse. The words always say the status too. */
.kam, .auth-body {
  --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Nirmala UI", "Noto Sans Bengali", sans-serif;
  --font-display: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Nirmala UI", sans-serif;
  --dot-late: #F0445F; --dot-today: #F5A524; --dot-soon: #3B82F6; --dot-cold: #14B8A6; --dot-done: #22C55E; --dot-idle: #A1A1AA;
  --ink-late: #B42339; --ink-today: #8A5300; --chip: #F1F2F6;
  letter-spacing: -.006em; font-feature-settings: "ss01" 1, "cv11" 1;
}
.kam .large-title, .kam .title-1, .auth-head h1 { letter-spacing: -.03em; }

/* status chips: neutral surface, coloured dot, readable ink */
.kam :is(.ir-due, .ir-prio, .badge) { --dot: var(--dot-idle); background: var(--chip); color: var(--label); box-shadow: none; gap: 5px; font-weight: 600; }
.kam :is(.ir-due, .badge):is(.tone-red) { --dot: var(--dot-late); color: var(--ink-late); }
.kam :is(.ir-due, .badge):is(.tone-orange) { --dot: var(--dot-today); color: var(--ink-today); }
.kam :is(.ir-due, .badge):is(.tone-blue) { --dot: var(--dot-soon); color: #1E4FA8; }
.kam :is(.ir-due, .badge):is(.tone-green) { --dot: var(--dot-done); color: #17703A; }
.kam :is(.ir-prio, .badge).prio-hot { --dot: var(--dot-late); color: var(--label); }
.kam :is(.ir-prio, .badge).prio-warm { --dot: var(--dot-today); color: var(--label); }
.kam :is(.ir-prio, .badge).prio-cold { --dot: var(--dot-cold); color: var(--label); }
.kam :is(.ir-due, .ir-prio, .badge)::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--dot); }
.kam :is(.ir-due, .badge) > .ic { display: none; }
.kam .ir-prio:has(.ic)::before { display: none; }
.kam .ir-prio .ic { color: var(--dot-late); }
.kam .ir-due.tone-red::before, .kam .badge.tone-red::before { animation: late-pulse 2.2s ease-out infinite; }
@keyframes late-pulse { 0% { box-shadow: 0 0 0 0 rgba(240, 68, 95, .45); } 70%, 100% { box-shadow: 0 0 0 5px rgba(240, 68, 95, 0); } }

/* time tiles: a clean white face; a corner dot says late or today */
.kam .ag-time, .kam .ag.is-overdue .ag-time, .kam .ag.is-today .ag-time { position: relative; background: linear-gradient(180deg, #fff, #F5F6F9); color: var(--label); box-shadow: inset 0 0 0 1px rgba(60, 60, 67, .08), 0 1px 2px rgba(16, 24, 40, .05); }
.kam .ag-time small, .kam .ag.is-overdue .ag-time small, .kam .ag.is-today .ag-time small { color: var(--label-2); }
.kam .ag.is-overdue .ag-time { color: var(--ink-late); }
.kam .ag.is-overdue .ag-time small { color: var(--ink-late); opacity: .8; }
.kam .ag.is-today .ag-time { color: var(--ink-today); }
.kam .ag-time::after { content: ""; display: none; position: absolute; top: -3px; right: -3px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid #fff; background: var(--dot-today); }
.kam .ag.is-overdue .ag-time::after { display: block; background: var(--dot-late); animation: late-pulse 2.2s ease-out infinite; }
.kam .ag.is-today .ag-time::after { display: block; }

/* list headers: the dot carries the colour, the count stays neutral */
.kam .ic-group { color: var(--label); }
.kam .ic-group .n { background: var(--chip); color: var(--label-2); }
.kam .ic-group[data-tone="red"] i { background: var(--dot-late); box-shadow: 0 0 0 3px rgba(240, 68, 95, .16); animation: late-pulse 2.2s ease-out infinite; }
.kam .ic-group[data-tone="orange"] i { background: var(--dot-today); box-shadow: 0 0 0 3px rgba(245, 165, 36, .18); }

/* Today card: the Overdue count is glass like the others, with a pulsing coral dot */
.kam .td-chip.is-hot { position: relative; background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .24); }
.kam .td-chip.is-hot::after { content: ""; position: absolute; top: 8px; right: 9px; width: 7px; height: 7px; border-radius: 50%; background: #FF7A8A; animation: late-pulse 2.2s ease-out infinite; }
.kam .td-chip.is-hot .ic { animation: none; }

/* week strip: Late is plain, its count marked by a dot */
.kam .wk.late, .kam .wk.late.is-empty { background: none; }
.kam .wk.late span, .kam .wk.late b { color: var(--ink-late); }
.kam .wk.late i { background: var(--chip); color: var(--ink-late); }
.kam .wk.late.is-empty span, .kam .wk.late.is-empty b, .kam .wk.late.is-empty i { color: var(--label-3); }

/* call button in follow-up rows: the same white face as the time tile on the left, so each row is framed
   by a matching pair; the green lives in the handset and fills the button only while pressed */
.kam .ag-call { width: 40px; height: 40px; color: #13803B; background: linear-gradient(180deg, #fff, #F5F6F9);
  box-shadow: inset 0 0 0 1px rgba(60, 60, 67, .09), 0 1px 2px rgba(16, 24, 40, .06), 0 4px 10px -6px rgba(16, 24, 40, .18); transition: transform .25s var(--spring), background .2s, color .2s; }
.kam .ag-call .ic { stroke-width: 2.1; }
.kam .ag-call:active { color: #fff; background: linear-gradient(160deg, #22B04B, #12813A); box-shadow: 0 6px 14px -6px rgba(18, 129, 58, .7); }
@media (hover: hover) { .kam .ag-call:hover { color: #0E6E31; box-shadow: inset 0 0 0 1px rgba(19, 128, 59, .28), 0 4px 12px -6px rgba(19, 128, 59, .4); } }

/* ================================================================== KAM: stage capsules
   Every stage wears its own solid colour and icon, so the stage reads at a glance from across the list:
   slate New · teal Qualified · blue Quoted · violet Negotiation · amber On hold · green Won · rose Lost.
   Fills are deep enough for white text (4.5:1 or better); the icon gives a second cue beside the colour. */
.stg { --s1: #64748B; --s2: #475569; --sg: rgba(71, 85, 105, .45);
  display: inline-flex; align-items: center; gap: 3px; height: 18px; padding: 0 7px 0 5px; border-radius: 999px; vertical-align: 1px;
  font-family: var(--font); font-size: 10px; font-weight: 700; letter-spacing: .045em; text-transform: uppercase; line-height: 1; white-space: nowrap; color: #fff;
  background: linear-gradient(135deg, var(--s1), var(--s2)); box-shadow: 0 3px 8px -4px var(--sg), inset 0 1px 0 rgba(255, 255, 255, .22); }
.stg .ic { width: 11px; height: 11px; flex: none; stroke-width: 2.4; }
.stg[data-st="qualified"] { --s1: #0E8A94; --s2: #0B6870; --sg: rgba(11, 104, 112, .5); }
.stg[data-st="quoted"] { --s1: #2563EB; --s2: #1D4ED8; --sg: rgba(29, 78, 216, .5); }
.stg[data-st="negotiation"] { --s1: #7C3AED; --s2: #6026C9; --sg: rgba(96, 38, 201, .5); }
.stg[data-st="hold"] { --s1: #B45309; --s2: #92400E; --sg: rgba(146, 64, 14, .45); }
.stg[data-st="won"] { --s1: #16A34A; --s2: #15803D; --sg: rgba(21, 128, 61, .5); }
.stg[data-st="lost"] { --s1: #E11D48; --s2: #BE123C; --sg: rgba(190, 18, 60, .45); }
.stg.ag-st { margin-right: 7px; color: #fff; font-size: 10px; }
.stg.ag-st::before { display: none; }
.stg.ir-st { color: #fff; font-size: 10px; }

/* the stage chips on the inquiry page and in search speak the same language */
.kam .chip[class*="stage-"] { --s1: #64748B; --s2: #475569; height: 22px; padding: 0 9px 0 8px; gap: 5px; color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; background: linear-gradient(135deg, var(--s1), var(--s2)); box-shadow: 0 3px 8px -4px rgba(16, 24, 40, .35), inset 0 1px 0 rgba(255, 255, 255, .22); }
.kam .chip[class*="stage-"] i { background: rgba(255, 255, 255, .85); }
.kam .chip.stage-qualified { --s1: #0E8A94; --s2: #0B6870; }
.kam .chip.stage-quoted { --s1: #2563EB; --s2: #1D4ED8; }
.kam .chip.stage-negotiation { --s1: #7C3AED; --s2: #6026C9; }
.kam .chip.stage-hold { --s1: #B45309; --s2: #92400E; }
.kam .chip.stage-won { --s1: #16A34A; --s2: #15803D; }
.kam .chip.stage-lost { --s1: #E11D48; --s2: #BE123C; }

/* back button: a solid glass pill with a bold chevron, easy to spot and to hit */
.kam .back-btn { height: 36px; padding: 0 14px 0 6px; gap: 2px; border-radius: 999px; font-size: 15px; font-weight: 650; color: #0A5BD0;
  background: rgba(255, 255, 255, .92); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  box-shadow: 0 6px 16px -8px rgba(16, 24, 40, .35), 0 1px 2px rgba(16, 24, 40, .08), inset 0 0 0 .5px rgba(10, 91, 208, .18); transition: transform .25s var(--spring), background-color .2s; }
.kam .back-btn .ic { width: 22px; height: 22px; margin-left: 0; stroke-width: 2.6; }
.kam .back-btn:active { transform: scale(.94); background: #EEF4FF; }
.kam .navbar .nb-l { overflow: visible; }
.kam .back-btn { flex: none; max-width: none; font-size: 14px; padding-right: 12px; text-overflow: clip; }
/* the back pill takes the room it needs; the page title shares what is left */
.kam .navbar:not(.has-left) { grid-template-columns: auto minmax(0, 1fr) auto; }
.kam .navbar .nb-title { max-width: none; min-width: 0; }
.kam .back-btn { overflow: visible; }

/* Reports: a link row to the Dashboard's team table */
.rp-link { display: flex; align-items: center; gap: 12px; padding: 12px 16px; color: var(--label); text-decoration: none; transition: box-shadow .25s, transform .25s var(--spring); }
.rp-link:hover { transform: translateY(-1px); }
.rp-ic { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: linear-gradient(140deg, #2F80FF, #5B5BF0); box-shadow: 0 6px 14px -6px rgba(47, 100, 255, .7); }
.rp-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.rp-t b { font-size: 14px; font-weight: 650; }
.rp-t span { font-size: 12.5px; color: var(--label-2); }
.rp-link > .ic:last-child { flex: none; color: var(--accent-text); }

/* Dashboard: pipeline by stage */
.sp-panel .kt-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sp-pick .input { height: 32px; min-width: 190px; font-size: 13px; border-radius: 9px; }
.sp-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 0 16px 10px; font-size: 12px; color: var(--label-2); }
.sp-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sp-legend i { width: 10px; height: 10px; border-radius: 3px; }
.sp-t td.sp-c { line-height: 1.2; }
.sp-t td.sp-c b { display: block; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sp-t td.sp-c small { display: block; font-size: 11px; color: var(--label-2); white-space: nowrap; }
.sp-t .sp-tot b { color: var(--accent-text); }
.sp-mix { width: 26%; min-width: 160px; }
.sp-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--fill-2); }
.sp-bar i { display: block; height: 100%; }
.sp-bar i + i { box-shadow: -1px 0 0 #fff; }
.sp-panel.is-one .sp-bar { height: 16px; }
.sp-panel.is-one td.sp-c b { font-size: 20px; }
.sp-t tfoot td { font-weight: 600; }

/* ================================================================== Admin: salesperson summary pop-up */
.kc-link { cursor: pointer; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; transition: color .2s, text-decoration-color .2s; }
.kc-link:hover, .kc-link:focus-visible { color: var(--accent-text); text-decoration-color: currentColor; outline: none; }
a.kc-link:hover b { color: var(--accent-text); }
.kam-pop { width: min(640px, calc(100vw - 32px)); max-height: min(860px, calc(100dvh - 48px)); background: var(--bg); overflow-y: auto; }
@media (min-width: 720px) { .sheet.kam-pop { width: min(640px, calc(100vw - 48px)); } }
.kc { display: flex; flex-direction: column; gap: 16px; padding-bottom: 16px; }
.kc-hero { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; gap: 16px; padding: 22px 22px 20px; color: #fff;
  background: radial-gradient(90% 120% at 100% 0%, rgba(150, 120, 255, .55), transparent 60%), linear-gradient(135deg, #0A6BE0 0%, #3E4CE2 60%, #5A3ED8 100%); }
.kc-hero::before { content: ""; position: absolute; z-index: -1; right: 0; top: 0; width: 55%; height: 100%;
  background-image: radial-gradient(rgba(255, 255, 255, .25) 1px, transparent 1.5px); background-size: 8px 8px;
  -webkit-mask-image: linear-gradient(230deg, #000, transparent 70%); mask-image: linear-gradient(230deg, #000, transparent 70%); }
.kc-hero .avatar.xl { box-shadow: 0 0 0 3px rgba(255, 255, 255, .85), 0 12px 26px -10px rgba(10, 20, 80, .7); }
.kc-id { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.kc-id h2 { font-size: 22px; font-weight: 700; letter-spacing: -.025em; }
.kc-id p { font-size: 13px; color: rgba(255, 255, 255, .85); }
.kc-line { margin-top: 4px; display: inline-flex; align-self: flex-start; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .16); box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .3); font-weight: 600; color: #fff !important; }
.kc-x { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border: 0; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(255, 255, 255, .18); cursor: pointer; }
.kc-x:hover { background: rgba(255, 255, 255, .3); }
.kc-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 0 16px; margin-top: -2px; }
.kc-stat { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 14px; background: var(--bg-elev); box-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 6px 16px -12px rgba(16, 24, 40, .25); min-width: 0; }
.kc-stat > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.kc-stat b { font-size: 19px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kc-stat small { font-size: 11.5px; color: var(--label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kc-stat .mring { flex: none; }
.kc-ic { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: linear-gradient(140deg, var(--a), var(--b)); box-shadow: 0 6px 14px -6px var(--b); }
.kc-stat.is-late b { color: #B42339; }
.kc-sec { display: flex; flex-direction: column; gap: 10px; padding: 0 16px; }
.kc-sec h3 { display: flex; align-items: baseline; justify-content: space-between; font-size: 14px; font-weight: 700; }
.kc-sec h3 small { font-size: 12px; font-weight: 600; color: var(--label-2); }
.kc-bar { height: 12px; }
.kc-stages { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.kc-stg { position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; gap: 1px; padding: 10px 10px 9px; border-radius: 14px; background: var(--bg-elev); color: var(--label); text-decoration: none;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 6px 16px -12px rgba(16, 24, 40, .25); transition: transform .3s var(--spring), box-shadow .3s; }
.kc-stg::before { content: ""; position: absolute; z-index: -1; inset: 0 0 auto 0; height: 46px; background: linear-gradient(135deg, var(--sc), color-mix(in srgb, var(--sc) 70%, #000)); }
.kc-stg:hover { transform: translateY(-2px); box-shadow: 0 14px 24px -14px color-mix(in srgb, var(--sc) 70%, transparent); }
.kc-stg-h { display: flex; align-items: center; gap: 4px; height: 26px; margin-bottom: 8px; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #fff; }
.kc-stg-h .ic { stroke-width: 2.4; }
.kc-stg b { font-size: 24px; font-weight: 750; letter-spacing: -.03em; line-height: 1; color: color-mix(in srgb, var(--sc) 85%, #000); font-variant-numeric: tabular-nums; }
.kc-stg small { font-size: 11px; color: var(--label-2); }
.kc-stg-f { margin-top: 6px; padding-top: 6px; border-top: .5px solid var(--sep-2); font-size: 11px; line-height: 1.35; color: var(--label-2); }
.kc-stg.is-empty { opacity: .55; }
.kc-next { display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; background: var(--bg-elev); box-shadow: 0 1px 2px rgba(16, 24, 40, .05); }
.kc-next a { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "b n" "b s"; column-gap: 10px; align-items: center; padding: 9px 12px; color: var(--label); text-decoration: none; position: relative; }
.kc-next a + a::before { content: ""; position: absolute; top: 0; left: 12px; right: 0; height: .5px; background: var(--sep-2); }
.kc-next a:hover { background: #F7F8FB; }
.kc-next .badge { grid-area: b; }
.kc-next b { grid-area: n; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kc-next span:last-child { grid-area: s; font-size: 12px; color: var(--label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kc-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 0 16px; }
.kc-loading { display: flex; justify-content: center; gap: 6px; padding: 80px 0; }
.kc-loading span { width: 9px; height: 9px; border-radius: 50%; background: #5B5BF0; animation: kc-dot 1s infinite ease-in-out; }
.kc-loading span:nth-child(2) { animation-delay: .15s; } .kc-loading span:nth-child(3) { animation-delay: .3s; }
.kc-loading.err { font-size: 14px; color: var(--label-2); }
@keyframes kc-dot { 0%, 80%, 100% { transform: scale(.6); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }
@media (max-width: 620px) { .kc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kc-stages { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.kc-hero .avatar.xl { width: 60px; height: 60px; font-size: 21px; flex: none; }

/* ================================================================== Team table: fits the page, stages on demand
   Tighter cells so the default view fits without sideways scrolling; the stage columns open from a small
   button under "Pipeline now"; any hidden group comes back from a "+" chip above the table. */
.kt th, .kt td { padding-left: 8px; padding-right: 8px; }
.kt tbody td, .kt tfoot td { padding-top: 7px; padding-bottom: 7px; font-size: 12.5px; }
.kt thead tr:last-child th { font-size: 11.5px; padding-top: 6px; padding-bottom: 7px; }
.kt .kt-name { min-width: 168px; }
.kt-who small { font-size: 10.5px; }
.kt-conv .bul { min-width: 96px; grid-template-columns: minmax(44px, 1fr) 34px; }
.kt-share { width: 44px; }
.kt-trend svg { width: 56px; }
.kt .kt-groups th { padding: 6px 8px 0; }

/* group headings: a small × appears on hover to hide that group */
.kt .kt-groups th span { display: flex; align-items: center; gap: 6px; }
.kt-gx { width: 16px; height: 16px; margin-left: auto; border: 0; border-radius: 5px; display: grid; place-items: center; padding: 0; background: transparent; color: var(--label-3); cursor: pointer; opacity: 0; transition: opacity .15s, background-color .15s, color .15s; }
.kt-groups th:hover .kt-gx, .kt-gx:focus-visible { opacity: 1; }
.kt-gx:hover { background: var(--fill-2); color: var(--label); }

/* the Stages button: five stage dots, a label and a chevron that turns when open */
.kt-stg-tog { display: inline-flex; align-items: center; gap: 4px; height: 18px; padding: 0 6px 0 5px; margin-left: 2px; border: 0; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: 9.5px; font-weight: 700; letter-spacing: .04em; color: #4B3FD1; background: rgba(91, 91, 240, .1); box-shadow: inset 0 0 0 .5px rgba(91, 91, 240, .25); transition: background-color .2s, color .2s, box-shadow .2s; }
.kt-stg-tog:hover { background: rgba(91, 91, 240, .18); }
.kt-stg-tog .ic { width: 12px; height: 12px; stroke-width: 2.6; transition: transform .35s var(--spring); }
.kt-stg-tog[aria-expanded="true"] { color: #fff; background: linear-gradient(135deg, #5B5BF0, #7C3AED); box-shadow: 0 4px 10px -4px rgba(91, 91, 240, .7); }
.kt-stg-tog[aria-expanded="true"] .ic { transform: rotate(180deg); }
.kt-stg-dots { display: inline-flex; gap: 1.5px; }
.kt-stg-dots em { width: 4px; height: 10px; border-radius: 2px; }
.kt-stg-tog[aria-expanded="true"] .kt-stg-dots em { box-shadow: 0 0 0 1px rgba(255, 255, 255, .7); }

/* stage columns: a coloured cap on each heading, vehicles in the stage colour, inquiries beneath */
.kt [data-g="stg"] { --g: linear-gradient(90deg, #64748B, #0E8A94, #2563EB, #7C3AED, #B45309); }
.kt .kt-groups th[data-g="stg"] span { border-image: linear-gradient(90deg, #64748B, #0E8A94, #2563EB, #7C3AED, #B45309) 1; border-bottom: 2px solid; }
.kt th.kt-sth button { position: relative; padding-top: 4px; }
.kt th.kt-sth button::before { content: ""; position: absolute; top: -2px; right: 0; width: 18px; height: 3px; border-radius: 2px; background: var(--sc); }
.kt td.kt-st { line-height: 1.15; background: rgba(91, 91, 240, .025); }
.kt td.kt-st b { display: block; font-size: 14px; font-weight: 750; font-variant-numeric: tabular-nums; }
.kt td.kt-st small { display: block; font-size: 10px; color: var(--label-3); }
.kt:not(.hide-stg) [data-g="stg"] { animation: kt-in .35s var(--out); }
@keyframes kt-in { from { opacity: 0; } }

/* hidden groups come back with one click */
.kt-hidden { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; }
.kt-hidden[hidden] { display: none; }
.kt-hidden-l { display: inline-flex; align-items: center; gap: 5px; margin-right: 2px; font-size: 11.5px; font-weight: 600; color: var(--label-3); }
.kt-chip { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 10px 0 8px; border: 0; border-radius: 999px; cursor: pointer; font: inherit; font-size: 12px; font-weight: 600; color: var(--label);
  background: var(--bg-elev); box-shadow: inset 0 0 0 1px rgba(60, 60, 67, .14); transition: box-shadow .2s, color .2s, transform .2s var(--spring); }
.kt-chip span { font-size: 14px; font-weight: 700; color: #5B5BF0; line-height: 1; }
.kt-chip:hover { color: #4B3FD1; box-shadow: inset 0 0 0 1px rgba(91, 91, 240, .45), 0 4px 10px -6px rgba(91, 91, 240, .6); }
.kt-chip:active { transform: scale(.95); }
.kt.hide-stg [data-g="stg"] { display: none; }
/* fit: headings may wrap onto two short lines, badges show as icons (their names are in the tooltip) */
.kt thead tr:last-child th { white-space: normal; line-height: 1.15; vertical-align: bottom; }
.kt thead tr:last-child th button { max-width: 72px; }
.kt .kt-name { min-width: 150px; }
.kt-who .kt-badge { width: 16px; padding: 0; justify-content: center; font-size: 0; gap: 0; }
.kt-stg-l { display: none; }
.kt-stg-tog:hover .kt-stg-l, .kt-stg-tog[aria-expanded="true"] .kt-stg-l { display: inline; }
.kt .kt-groups th[data-g="pipe"] span { white-space: nowrap; }

/* admin pages use the full width of large screens */
.adm .content { max-width: none; }

/* Active customers: a gradient ribbon across the top of the card, with a slow light passing along it */
.ct-panel { position: relative; overflow: hidden; }
.ct-panel::before { content: ""; position: absolute; z-index: 2; inset: 0 0 auto 0; height: 4px; pointer-events: none;
  background: linear-gradient(90deg, #0FA3B1 0%, #21C29E 22%, #2F80FF 48%, #7C3AED 74%, #C05AF2 100%); box-shadow: 0 2px 10px -2px rgba(47, 128, 255, .5); }
.ct-panel::after { content: ""; position: absolute; z-index: 3; top: 0; left: -30%; width: 30%; height: 4px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .85), transparent); animation: ct-sheen 5s ease-in-out 1s infinite; }
@keyframes ct-sheen { 0% { left: -30%; } 60%, 100% { left: 100%; } }
@media (prefers-reduced-motion: reduce) { .ct-panel::after { display: none; } }
/* the table's generic heading-button reset must not undo these two */
.kt .kt-groups th .kt-gx { display: grid; place-items: center; width: 16px; height: 16px; margin-left: auto; border-radius: 5px; color: var(--label-3); cursor: pointer; opacity: 0; transition: opacity .15s, background-color .15s, color .15s; }
.kt .kt-groups th:hover .kt-gx, .kt .kt-groups th .kt-gx:focus-visible { opacity: 1; }
.kt .kt-groups th .kt-gx:hover { background: var(--fill-2); color: var(--label); }
.kt .kt-groups th .kt-stg-tog { display: inline-flex; align-items: center; gap: 4px; height: 18px; padding: 0 6px 0 5px; margin-left: 4px; border-radius: 999px; cursor: pointer;
  font-size: 9.5px; font-weight: 700; letter-spacing: .04em; color: #4B3FD1; background: rgba(91, 91, 240, .1); box-shadow: inset 0 0 0 .5px rgba(91, 91, 240, .25); transition: background-color .2s, color .2s, box-shadow .2s; }
.kt .kt-groups th .kt-stg-tog:hover { background: rgba(91, 91, 240, .18); }
.kt .kt-groups th .kt-stg-tog[aria-expanded="true"] { color: #fff; background: linear-gradient(135deg, #5B5BF0, #7C3AED); box-shadow: 0 4px 10px -4px rgba(91, 91, 240, .7); }
.kt .kt-groups th .kt-stg-tog::after { display: none; }
.kt .kt-groups th .kt-gx::after { display: none; }

/* admin menu: the highlight sits on the new item at once instead of sliding across from the old one */
.adm .side-pill { view-transition-name: none; }
.adm .sidebar { view-transition-name: none; }

/* admin top bar: title left, search in the exact centre, actions right */
@media (min-width: 901px) {
  .adm .toolbar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 460px) minmax(0, 1fr); align-items: center; }
  .adm .toolbar .tb-title { min-width: 0; }
  .adm .toolbar .tb-search { width: 100%; margin: 0; justify-self: center; }
  .adm .toolbar .tb-r { justify-self: end; min-width: 0; }
}
