/* ==========================================================================
   蜀行租车 · 伯温智算AI
   A warm, editorial take on a rental-sales CRM.
   ========================================================================== */

:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-soft: #fafbfc;
  --ink: #1b1f27;
  --ink-2: #333944;
  --muted: #6f7682;
  --muted-2: #9298a3;
  --line: #edeff2;
  --line-strong: #e5e7eb;
  --accent: #f05a2a;
  --accent-strong: #d94a1d;
  --accent-soft: #fde9e2;
  --accent-faint: #fff7f3;
  --blue: #2f6fe4;
  --blue-soft: #eaf1ff;
  --gold: #d58a0a;
  --gold-soft: #fdf3dc;
  --red: #d84835;
  --red-soft: #fde9e4;
  --gray-accent: #9aa0aa;
  --gray-soft: #f0f1f4;
  --green: #23855d;
  --green-soft: #e6f4ed;
  --radius-card: 18px;
  --radius-md: 12px;
  --radius-sm: 9px;
  --shadow-card: 0 1px 2px rgba(20, 24, 32, 0.025), 0 10px 30px rgba(20, 24, 32, 0.035);
  --shadow-pop: 0 24px 70px rgba(16, 20, 28, 0.18), 0 4px 18px rgba(16, 20, 28, 0.08);
  --page-max: 1560px;
  --page-gutter: 36px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-num: "SF Pro Display", "DIN Alternate", "Segoe UI", "PingFang SC", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--ink);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15.8px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-locked {
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

svg {
  display: block;
}

::selection {
  background: #ffd7c9;
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 5px;
}

.skip-link {
  position: fixed;
  z-index: 200;
  left: 20px;
  top: -80px;
  padding: 10px 16px;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  transition: top 160ms ease;
}

.skip-link:focus {
  top: 12px;
}

/* --------------------------------------------------------------------------
   Shell
   -------------------------------------------------------------------------- */

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--ink);
  color: #fff;
}

.topbar__inner {
  width: min(100%, var(--page-max));
  margin: 0 auto;
  padding: 0 var(--page-gutter);
}

.topbar__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: max-content;
  color: #fff;
}

.brand__mark {
  width: 27px;
  height: 27px;
  margin-right: 10px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.brand__mark svg {
  width: 19px;
  height: 19px;
}

.brand__name {
  font-size: 23.9px;
  line-height: 1;
  font-weight: 760;
  letter-spacing: -0.8px;
}

.brand__name b {
  color: var(--accent);
  font-weight: inherit;
}

.brand__tagline {
  margin-left: 8px;
  padding: 3px 6px;
  border: 1px solid rgba(240, 90, 42, 0.2);
  border-radius: 4px;
  background: rgba(240, 90, 42, 0.09);
  color: #ffa27e;
  font-size: 9.8px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
}

.brand__divider {
  width: 1px;
  height: 15px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 12px;
}

.brand__company {
  font-size: 12.4px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.52);
}

.utility-nav {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14.7px;
  color: rgba(255, 255, 255, 0.64);
}

.utility-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 7px;
  color: rgba(255, 255, 255, 0.68);
  transition: color 150ms ease, background 150ms ease;
}

.utility-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.065);
}

.utility-link--demo {
  color: rgba(255, 255, 255, 0.72);
}

.utility-link--admin {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 650;
}

.utility-link--sales {
  color: #ffa17e;
  font-weight: 650;
}

.utility-link--sales:hover {
  color: #ffc0a6;
  background: rgba(240, 90, 42, 0.1);
}

.utility-link--muted {
  color: rgba(255, 255, 255, 0.48);
}

.utility-dot {
  color: rgba(255, 255, 255, 0.28);
  font-size: 13.6px;
}

.utility-divider {
  width: 1px;
  height: 13px;
  margin: 0 7px;
  background: rgba(255, 255, 255, 0.14);
}

.demo-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #7de0b3;
  box-shadow: 0 0 0 3px rgba(125, 224, 179, 0.12);
}

.topbar__navrow {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  height: 43px;
}

.main-nav {
  display: flex;
  align-items: stretch;
  gap: 38px;
  height: 100%;
}

.main-nav__item {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 1px 1px;
  color: rgba(255, 255, 255, 0.56);
  font-size: 16.2px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: color 160ms ease;
}

.main-nav__item::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.main-nav__item:hover {
  color: rgba(255, 255, 255, 0.88);
}

.main-nav__item.is-active {
  color: #fff;
}

.main-nav__item.is-active::after {
  transform: scaleX(1);
}

.main-nav__item--screen {
  color: rgba(255, 255, 255, 0.44);
}

.main-nav__item--screen:hover {
  color: #ffa17e;
}

.nav-external {
  display: inline-block;
  margin-left: 3px;
  font-size: 11.8px;
  line-height: 1;
  transform: translateY(-4px);
  opacity: 0.7;
}

.topbar__context {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding-bottom: 13px;
  font-size: 12.4px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.38);
  letter-spacing: 0.02em;
}

.context-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.34);
}

.page {
  flex: 1;
  width: min(100%, var(--page-max));
  margin: 0 auto;
  padding: 31px var(--page-gutter) 54px;
}

.view {
  animation: page-in 320ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --------------------------------------------------------------------------
   Page header
   -------------------------------------------------------------------------- */

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 23px;
  padding: 0 2px;
}

.page-head__eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--muted-2);
  font-size: 12.4px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.page-head__eyebrow::before {
  content: "";
  width: 17px;
  height: 2px;
  border-radius: 1px;
  background: var(--accent);
}

.page-title {
  font-size: clamp(30px, 3.1vw, 40px);
  line-height: 1.14;
  font-weight: 790;
  letter-spacing: -1.5px;
}

.page-subtitle {
  margin-top: 9px;
  color: var(--muted);
  font-size: 14.7px;
  letter-spacing: 0.005em;
}

.page-head__right {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-bottom: 4px;
}

.page-date {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  color: var(--ink-2);
  font-size: 15.8px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.page-date span {
  color: var(--muted-2);
  font-size: 13.6px;
  font-weight: 500;
}

.icon-btn {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: #fff;
  color: var(--muted);
  transition: border-color 150ms ease, color 150ms ease, transform 180ms ease;
}

.icon-btn:hover {
  color: var(--ink);
  border-color: #d6dae0;
  transform: rotate(-24deg);
}

.icon-btn svg {
  width: 15px;
  height: 15px;
}

/* --------------------------------------------------------------------------
   Layout / cards
   -------------------------------------------------------------------------- */

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

.dash-col {
  display: flex;
  flex-direction: column;
  gap: 26px;
  min-width: 0;
}

.dashboard-wide {
  margin-top: 26px;
}

.card {
  position: relative;
  overflow: hidden;
  padding: 31px 35px 29px 40px;
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  --card-accent: var(--accent);
}

.card::before {
  content: "";
  position: absolute;
  z-index: 1;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: var(--card-accent);
}

.card--blue {
  --card-accent: var(--blue);
}

.card--orange {
  --card-accent: var(--accent);
}

.card--gold {
  --card-accent: var(--gold);
}

.card--gray {
  --card-accent: var(--gray-accent);
}

.card--red {
  --card-accent: #e04f38;
}

.card__head {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 31px;
}

.card__num {
  color: var(--muted-2);
  font-family: var(--font-num);
  font-size: 15.8px;
  font-weight: 650;
  letter-spacing: 0.06em;
}

.card__title {
  font-size: 21.8px;
  line-height: 1.3;
  font-weight: 760;
  letter-spacing: -0.55px;
  color: var(--ink);
}

.info-button {
  width: 17px;
  height: 17px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #c9cdd4;
  border-radius: 50%;
  color: #8d939d;
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease;
}

.info-button:hover {
  color: var(--ink);
  border-color: #aeb4bd;
  background: #f8f9fa;
}

.info-button svg {
  width: 11px;
  height: 11px;
}

.card__badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: 19px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 5px 11px;
  border-radius: 999px;
  background: #f1f2f4;
  color: #5e6570;
  font-size: 14.1px;
  font-weight: 620;
  line-height: 1.2;
  white-space: nowrap;
}

.badge b {
  color: var(--ink);
  font-family: var(--font-num);
  font-size: 15.8px;
  font-weight: 700;
}

.badge--warm {
  background: var(--accent-soft);
  color: #b94722;
}

.badge--warm b {
  color: #ad3d1a;
}

.badge--dark {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.72);
}

.badge--dark b {
  color: #fff;
}

.badge--green {
  background: var(--green-soft);
  color: #1d7350;
}

.card__collapse {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 23px;
  margin-top: 3px;
  padding: 0;
  color: #747b87;
  border-radius: 6px;
  transition: color 150ms ease, background 150ms ease;
}

.card__collapse:hover {
  color: var(--ink);
  background: #f4f5f7;
}

.card__collapse svg {
  width: 14px;
  height: 14px;
  transition: transform 180ms ease;
}

.card__collapse[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.card__collapse--right {
  margin: 0 0 0 auto;
  align-self: center;
}

.card__head + .card__badges {
  margin-top: 17px;
}

.card__meta-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 13px;
  color: var(--muted-2);
  font-size: 13.6px;
}

.card__body {
  animation: card-body-in 230ms ease both;
}

.card.is-collapsed .card__body {
  display: none;
}

@keyframes card-body-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.divider {
  height: 1px;
  margin: 21px 0 0;
  background: var(--line);
  border: 0;
}

/* --------------------------------------------------------------------------
   Card 01 — Yesterday
   -------------------------------------------------------------------------- */

.period-tabs {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 23px 0 22px;
}

.period-tab {
  min-width: 76px;
  height: 43px;
  padding: 0 17px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: #fff;
  color: #5f6671;
  font-size: 14.7px;
  font-weight: 600;
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease,
    transform 150ms ease;
}

.period-tab:hover {
  border-color: #d8dce2;
  color: var(--ink);
}

.period-tab:active {
  transform: scale(0.98);
}

.period-tab.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.metric-tile {
  min-height: 108px;
  padding: 16px 17px 15px;
  border-radius: var(--radius-md);
  background: #f4f5f7;
}

.metric-tile--blush {
  background: #fdede7;
}

.metric-tile--dark {
  background: var(--ink);
  color: #fff;
}

.metric-tile__num {
  font-family: var(--font-num);
  font-size: clamp(28px, 2.5vw, 35px);
  font-weight: 650;
  line-height: 1.05;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}

.metric-tile__label {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14.1px;
  font-weight: 500;
}

.metric-tile--blush .metric-tile__label {
  color: #996651;
}

.metric-tile--dark .metric-tile__label {
  color: rgba(255, 255, 255, 0.54);
}

.mini-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 27px;
}

.mini-heading h3 {
  font-size: 18.4px;
  font-weight: 740;
  letter-spacing: -0.35px;
}

.mini-heading__hint {
  color: var(--muted-2);
  font-size: 13px;
}

.funnel {
  margin-top: 17px;
}

.funnel-row {
  display: grid;
  grid-template-columns: 83px minmax(0, 1fr) 26px;
  align-items: center;
  gap: 13px;
  min-height: 26px;
  margin: 7px 0;
}

.funnel-row__label {
  overflow: hidden;
  color: #656c77;
  font-size: 14.1px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.funnel-row__track {
  position: relative;
  height: 13px;
  overflow: hidden;
  border-radius: 5px;
  background: #f1f2f4;
}

.funnel-row__fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  min-width: 4px;
  border-radius: 5px;
  background: linear-gradient(90deg, #f2764f, #f05a2a);
  transform-origin: left;
  animation: bar-grow 650ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.funnel-row__fill--blue {
  background: linear-gradient(90deg, #5b90f3, #2f6fe4);
}

@keyframes bar-grow {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

.funnel-row__count {
  color: var(--ink-2);
  font-family: var(--font-num);
  font-size: 14.7px;
  font-weight: 650;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.channel {
  margin-top: 22px;
}

.channel__list {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.channel__row {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 12px;
}

.channel__name {
  color: #656c77;
  font-size: 14.1px;
  white-space: nowrap;
}

.channel__track {
  height: 8px;
  border-radius: 4px;
  background: #f1f2f4;
  overflow: hidden;
}

.channel__fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #2f6fe4;
  opacity: 0.82;
}

.channel__value {
  color: var(--muted);
  font-family: var(--font-num);
  font-size: 13.6px;
  text-align: right;
}

.channel__value b {
  color: var(--ink-2);
  font-weight: 650;
}

.empty-note {
  padding: 17px 0 12px;
  color: var(--muted-2);
  font-size: 13.6px;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Card 02 — Sales table
   -------------------------------------------------------------------------- */

.sales-table-wrap {
  margin-top: 20px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #d9dde3 transparent;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.data-table th {
  padding: 0 7px 12px;
  color: #8d939d;
  font-size: 12.4px;
  font-weight: 550;
  line-height: 1.3;
  text-align: center;
  white-space: nowrap;
}

.data-table th:first-child,
.data-table td:first-child {
  padding-left: 0;
  text-align: left;
}

.data-table th:last-child,
.data-table td:last-child {
  padding-right: 0;
}

.data-table td {
  padding: 12px 7px;
  border-top: 1px solid #f0f1f3;
  color: #5e6570;
  font-family: var(--font-num);
  font-size: 14.1px;
  text-align: center;
  white-space: nowrap;
}

.data-table tbody tr {
  transition: background 150ms ease;
}

.data-table tbody tr:hover {
  background: #fafbfc;
}

.data-table tbody tr.is-focus {
  background: #fff9f6;
}

.data-table tbody tr.is-focus:hover {
  background: #fff6f1;
}

.data-table .cell-sales {
  min-width: 118px;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15.8px;
  font-weight: 650;
}

.cell-sales__focus {
  display: flex;
  width: max-content;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
  color: var(--red);
  font-family: var(--font-sans);
  font-size: 11.8px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.cell-sales__focus::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.data-table .cell-strong {
  color: var(--ink-2);
  font-weight: 650;
}

.data-table .cell-zero {
  color: #b9bdc5;
}

.table-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 12.4px;
}

.table-foot b {
  color: var(--muted);
  font-weight: 650;
}

/* --------------------------------------------------------------------------
   Card 03 — Cohorts
   -------------------------------------------------------------------------- */

.queue-list {
  margin-top: 20px;
}

.queue-row {
  border-top: 1px solid var(--line);
}

.queue-row:first-child {
  border-top: 0;
}

.queue-trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 17px 0;
  text-align: left;
}

.queue-trigger:hover .queue-trigger__chevron {
  color: var(--ink);
  background: #f3f4f6;
}

.queue-trigger__main {
  min-width: 0;
  flex: 1;
}

.queue-trigger__label {
  color: var(--ink);
  font-size: 15.7px;
  font-weight: 650;
  letter-spacing: -0.15px;
}

.queue-trigger__meta {
  margin-left: 6px;
  color: var(--muted-2);
  font-size: 14.7px;
  font-weight: 450;
  white-space: nowrap;
}

.queue-trigger__chevron {
  width: 24px;
  height: 24px;
  flex: none;
  display: grid;
  place-items: center;
  color: #8b919b;
  border-radius: 6px;
  transition: color 150ms ease, background 150ms ease;
}

.queue-trigger__chevron svg {
  width: 13px;
  height: 13px;
  transition: transform 180ms ease;
}

.queue-trigger[aria-expanded="true"] .queue-trigger__chevron svg {
  transform: rotate(180deg);
}

.queue-panel {
  padding: 3px 0 15px 0;
  animation: card-body-in 220ms ease both;
}

.queue-panel__empty {
  margin: 0 0 8px;
  padding: 16px;
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--muted-2);
  font-size: 13.6px;
  text-align: center;
}

.mini-customer-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mini-customer {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 13px;
  border: 1px solid #f0f1f3;
  border-radius: 10px;
  background: #fcfcfd;
  text-align: left;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.mini-customer:hover {
  border-color: #e3e6ea;
  background: #fff;
  transform: translateX(2px);
}

.mini-customer__avatar {
  width: 33px;
  height: 33px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--gray-soft);
  color: #5d6470;
  font-size: 12.4px;
  font-weight: 700;
}

.mini-customer__avatar--warm {
  background: var(--accent-soft);
  color: #b64521;
}

.mini-customer__main {
  min-width: 0;
  flex: 1;
}

.mini-customer__title {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-size: 14.1px;
  font-weight: 650;
}

.mini-customer__sub {
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted-2);
  font-size: 12.4px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-customer__side {
  flex: none;
  text-align: right;
}

.mini-customer__stage {
  color: #a35438;
  font-size: 11.9px;
  font-weight: 600;
}

.mini-customer__time {
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 11.8px;
}

.queue-panel__foot {
  display: flex;
  justify-content: flex-end;
  padding-top: 12px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #8b5b49;
  font-size: 13px;
  font-weight: 600;
}

.text-link:hover {
  color: var(--ink);
}

.text-link svg {
  width: 12px;
  height: 12px;
}

/* --------------------------------------------------------------------------
   Card 04 — All customers
   -------------------------------------------------------------------------- */

.all-customers__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  padding: 11px 13px;
  border-radius: 10px;
  background: var(--surface-soft);
}

.all-customers__summary {
  color: var(--muted);
  font-size: 13px;
}

.all-customers__summary b {
  color: var(--ink-2);
  font-weight: 650;
}

.mini-filter {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mini-filter button {
  padding: 5px 9px;
  border-radius: 6px;
  color: var(--muted-2);
  font-size: 11.9px;
  font-weight: 550;
}

.mini-filter button:hover {
  background: #eef0f3;
  color: var(--ink);
}

.mini-filter button.is-active {
  background: #fff;
  color: var(--ink-2);
  box-shadow: 0 1px 3px rgba(20, 24, 32, 0.08);
}

.customer-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

.customer-table th {
  padding: 12px 6px;
  color: var(--muted-2);
  font-size: 11.9px;
  font-weight: 550;
  text-align: left;
  white-space: nowrap;
}

.customer-table td {
  padding: 11px 6px;
  border-top: 1px solid #f1f2f4;
  color: #666d78;
  font-size: 13px;
  white-space: nowrap;
}

.customer-table tbody tr {
  cursor: pointer;
  transition: background 150ms ease;
}

.customer-table tbody tr:hover {
  background: #fafbfc;
}

.customer-table .customer-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 650;
}

.status-dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--green);
}

.status-dot--warm {
  background: var(--accent);
}

.status-dot--gold {
  background: var(--gold);
}

.status-dot--muted {
  background: #b5bac2;
}

.customer-table .muted {
  color: var(--muted-2);
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 13px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.pager__info {
  color: var(--muted-2);
  font-size: 11.9px;
}

.pager__buttons {
  display: flex;
  gap: 6px;
}

.pager__button {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--muted);
  transition: background 150ms ease, color 150ms ease;
}

.pager__button:hover:not(:disabled) {
  background: var(--surface-soft);
  color: var(--ink);
}

.pager__button:disabled {
  color: #c8ccd2;
  cursor: not-allowed;
}

.pager__button svg {
  width: 12px;
  height: 12px;
}

/* --------------------------------------------------------------------------
   Card 05 — Transfer candidates
   -------------------------------------------------------------------------- */

.transfer-card .card__badges {
  margin-top: 18px;
}

.transfer-list {
  margin-top: 18px;
}

.transfer-list__section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0 12px;
  border-top: 1px solid var(--line);
}

.transfer-list__title {
  color: var(--ink);
  font-size: 15.3px;
  font-weight: 700;
}

.transfer-list__title span {
  font-weight: 500;
  color: var(--muted-2);
}

.transfer-list__hint {
  color: var(--muted-2);
  font-size: 11.9px;
}

.transfer-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid #f1f2f4;
  transition: background 150ms ease, opacity 180ms ease;
}

.transfer-row:first-of-type {
  border-top: 0;
}

.transfer-row__main {
  min-width: 0;
  flex: 1;
}

.transfer-row__title {
  color: var(--ink);
  font-size: 15.8px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.transfer-row__title span {
  color: #a2a7b0;
  font-weight: 450;
}

.transfer-row__sub {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted-2);
  font-size: 12.4px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transfer-row__actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: none;
}

.sale-select {
  appearance: none;
  width: 150px;
  height: 44px;
  padding: 0 33px 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2.5 4.5L6 8l3.5-3.5' stroke='%237d8490' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  color: #525966;
  font-size: 14.1px;
  font-weight: 550;
  cursor: pointer;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.sale-select:hover {
  border-color: #d3d8df;
}

.sale-select:focus {
  border-color: #aeb6c2;
  outline: none;
  box-shadow: 0 0 0 3px rgba(47, 111, 228, 0.1);
}

.transfer-button {
  height: 44px;
  min-width: 58px;
  padding: 0 17px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 14.7px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 12px rgba(240, 90, 42, 0.2);
  transition: background 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.transfer-button:hover {
  background: var(--accent-strong);
  box-shadow: 0 6px 18px rgba(240, 90, 42, 0.27);
}

.transfer-button:active {
  transform: scale(0.97);
}

.transfer-row.is-done {
  opacity: 0.55;
}

.transfer-empty {
  padding: 25px 0 15px;
  color: var(--muted-2);
  font-size: 13.6px;
  text-align: center;
}

.load-more {
  display: flex;
  justify-content: center;
  padding: 15px 0 1px;
  border-top: 1px solid #f1f2f4;
}

.load-more button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #7d5e51;
  font-size: 13px;
  font-weight: 600;
}

.load-more button:hover {
  color: var(--ink);
}

.load-more svg {
  width: 12px;
  height: 12px;
}

/* --------------------------------------------------------------------------
   Data page
   -------------------------------------------------------------------------- */

.data-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 2px 0 15px;
}

.filter-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-tab {
  height: 43px;
  min-width: 74px;
  padding: 0 17px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  color: #5e6570;
  font-size: 14.7px;
  font-weight: 600;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}

.filter-tab:hover {
  border-color: #d6dae0;
  color: var(--ink);
}

.filter-tab.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.data-toolbar__range {
  color: var(--muted-2);
  font-family: var(--font-num);
  font-size: 13.6px;
  font-weight: 500;
  white-space: nowrap;
}

.data-note {
  margin: 0 0 24px;
  color: #9a9fa8;
  font-size: 13px;
  letter-spacing: 0.005em;
}

.data-note::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 3px;
  margin: 0 8px 3px 0;
  border-radius: 50%;
  background: #c4c8ce;
}

.data-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

.data-card {
  padding-bottom: 27px;
}

.data-card .card__head {
  min-height: 28px;
}

.data-card .card__badges {
  margin-top: 18px;
}

.profit-panel {
  margin-top: 22px;
  padding: 22px 23px 23px;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  overflow: hidden;
}

.profit-panel__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.profit-panel__label {
  color: rgba(255, 255, 255, 0.5);
  font-size: 13.6px;
  font-weight: 500;
}

.profit-panel__amount {
  margin-top: 9px;
  font-family: var(--font-num);
  font-size: clamp(38px, 4.1vw, 53px);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -2.3px;
  font-variant-numeric: tabular-nums;
}

.profit-panel__amount sup {
  position: relative;
  top: -0.33em;
  margin-right: 2px;
  font-size: 0.47em;
  letter-spacing: 0;
  opacity: 0.8;
}

.profit-panel__delta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
  padding: 4px 7px;
  border-radius: 5px;
  background: rgba(125, 224, 179, 0.12);
  color: #8be3bc;
  font-family: var(--font-num);
  font-size: 11.8px;
  font-weight: 600;
}

.profit-panel__delta svg {
  width: 9px;
  height: 9px;
}

.profit-panel__spark {
  width: 102px;
  height: 42px;
  margin-top: 3px;
  opacity: 0.72;
}

.profit-panel__spark svg {
  width: 100%;
  height: 100%;
}

.profit-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 19px;
}

.profit-stat {
  padding: 12px 14px 11px;
  border-radius: 9px;
  background: #252a33;
}

.profit-stat__num {
  color: #fff;
  font-family: var(--font-num);
  font-size: 17.3px;
  font-weight: 600;
  letter-spacing: -0.35px;
}

.profit-stat__label {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.43);
  font-size: 11.9px;
  font-weight: 400;
}

.analysis-list {
  margin-top: 19px;
}

.analysis-row {
  display: grid;
  grid-template-columns: 69px minmax(0, 1fr) 46px 44px;
  align-items: center;
  gap: 10px;
  min-height: 31px;
}

.analysis-row__label {
  color: #646b76;
  font-size: 13.6px;
  white-space: nowrap;
}

.analysis-row__track {
  height: 10px;
  border-radius: 4px;
  background: #f1f2f4;
  overflow: hidden;
}

.analysis-row__fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f17a54, #ee5a2b);
  animation: bar-grow 650ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.analysis-row__fill--blue {
  background: linear-gradient(90deg, #6d9bf5, #2f6fe4);
}

.analysis-row__value {
  color: var(--ink-2);
  font-family: var(--font-num);
  font-size: 13.6px;
  font-weight: 650;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.analysis-row__rate {
  color: #a3a8b0;
  font-family: var(--font-num);
  font-size: 11.9px;
  text-align: right;
}

.analysis-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 17px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.analysis-foot__item {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.analysis-foot__num {
  color: var(--ink);
  font-family: var(--font-num);
  font-size: 23.9px;
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.8px;
}

.analysis-foot__label {
  color: var(--muted-2);
  font-size: 12.4px;
}

.data-expand {
  margin-top: 19px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.data-expand__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid #f3f4f6;
}

.data-expand__row:last-child {
  border-bottom: 0;
}

.data-expand__name {
  color: #555c67;
  font-size: 13.6px;
}

.data-expand__meta {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--muted-2);
  font-family: var(--font-num);
  font-size: 12.4px;
}

.data-expand__meta b {
  color: var(--ink-2);
  font-weight: 650;
}

.quality-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 18px;
}

.quality-tile {
  padding: 13px 14px;
  border-radius: 10px;
  background: var(--surface-soft);
}

.quality-tile--warm {
  background: var(--accent-faint);
}

.quality-tile__num {
  color: var(--ink);
  font-family: var(--font-num);
  font-size: 21.6px;
  font-weight: 650;
  letter-spacing: -0.5px;
}

.quality-tile__label {
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 11.9px;
}

.quality-bar {
  display: flex;
  width: 100%;
  height: 8px;
  gap: 2px;
  margin-top: 19px;
  border-radius: 5px;
  overflow: hidden;
  background: #f1f2f4;
}

.quality-bar span {
  height: 100%;
}

.quality-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 15px;
  margin-top: 11px;
}

.quality-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted-2);
  font-size: 11.8px;
}

.quality-legend i {
  width: 6px;
  height: 6px;
  border-radius: 2px;
}

.sales-follow-list {
  margin-top: 8px;
}

.sales-follow-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 47px 47px 54px;
  align-items: center;
  gap: 9px;
  padding: 11px 0;
  border-top: 1px solid #f2f3f5;
}

.sales-follow-row__name {
  color: var(--ink-2);
  font-size: 13.6px;
  font-weight: 600;
}

.sales-follow-row__name small {
  display: block;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 11.2px;
  font-weight: 400;
}

.sales-follow-row__value {
  color: var(--ink-2);
  font-family: var(--font-num);
  font-size: 13px;
  text-align: right;
}

.sales-follow-row__value small {
  display: block;
  color: var(--muted-2);
  font-family: var(--font-sans);
  font-size: 10.6px;
  font-weight: 400;
}

.sales-follow-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 47px 47px 54px;
  gap: 9px;
  padding: 12px 0 5px;
  color: var(--muted-2);
  font-size: 11.2px;
  text-align: right;
}

.sales-follow-head span:first-child {
  text-align: left;
}

/* --------------------------------------------------------------------------
   Wide data tables / form extras
   -------------------------------------------------------------------------- */

.data-card--wide {
  margin-top: 26px;
}

.wide-table-wrap {
  overflow-x: auto;
  margin-top: 13px;
  scrollbar-width: thin;
  scrollbar-color: #d9dde3 transparent;
}

.wide-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.wide-table th {
  padding: 9px 13px 11px;
  color: var(--muted-2);
  font-size: 11.9px;
  font-weight: 550;
  text-align: left;
  white-space: nowrap;
}

.wide-table td {
  padding: 12px 13px;
  border-top: 1px solid #f0f1f3;
  color: #666d78;
  font-size: 13px;
  white-space: nowrap;
}

.wide-table tbody tr:hover {
  background: #fafbfc;
}

.wide-table td strong {
  color: var(--ink-2);
  font-weight: 650;
}

.inline-bar {
  display: block;
  width: 140px;
  height: 6px;
  overflow: hidden;
  border-radius: 3px;
  background: #f1f2f4;
}

.inline-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #efa27f, #f05a2a);
}

.field-textarea {
  width: 100%;
  min-height: 116px;
  padding: 12px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  outline: none;
  resize: vertical;
  font: inherit;
  font-size: 14.1px;
  line-height: 1.65;
  color: var(--ink-2);
}

.field-textarea::placeholder {
  color: #b5bac2;
}

.field-textarea:focus {
  border-color: #aeb6c2;
  box-shadow: 0 0 0 3px rgba(47, 111, 228, 0.08);
}

.quick-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.quick-notes button {
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: #6b727d;
  font-size: 11.9px;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}

.quick-notes button:hover {
  color: var(--ink);
  background: #fafbfc;
  border-color: #d4d8df;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.icon-btn.is-spinning svg {
  animation: spin 650ms cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  width: min(100%, var(--page-max));
  margin: 0 auto;
  padding: 0 var(--page-gutter) 30px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #b0b5bd;
  font-size: 11.8px;
}

.site-footer__dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #c9cdd3;
}

.site-footer__spacer {
  flex: 1;
}

.site-footer__version {
  font-family: var(--font-num);
  color: #bcc1c8;
}

/* --------------------------------------------------------------------------
   Drawer
   -------------------------------------------------------------------------- */

.overlay-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(16, 20, 28, 0.34);
  backdrop-filter: blur(2px);
  animation: fade-in 180ms ease both;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.drawer {
  position: fixed;
  z-index: 81;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(468px, 100vw);
  display: flex;
  flex-direction: column;
  background: #fff;
  box-shadow: -22px 0 70px rgba(15, 19, 27, 0.14);
  animation: drawer-in 310ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

@keyframes drawer-in {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

.drawer__header {
  position: relative;
  flex: none;
  padding: 27px 29px 23px;
  border-bottom: 1px solid var(--line);
}

.drawer__close {
  position: absolute;
  top: 23px;
  right: 24px;
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f4f5f7;
  color: #6e7580;
  transition: background 150ms ease, color 150ms ease;
}

.drawer__close:hover {
  background: #eceef1;
  color: var(--ink);
}

.drawer__close svg {
  width: 14px;
  height: 14px;
}

.drawer__eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 11px;
  color: var(--muted-2);
  font-size: 11.9px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.drawer__title {
  padding-right: 42px;
  font-size: 26px;
  font-weight: 760;
  letter-spacing: -0.7px;
}

.drawer__sub {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13.6px;
}

.drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 29px 32px;
  scrollbar-width: thin;
  scrollbar-color: #d8dce2 transparent;
}

.drawer__section {
  margin-top: 26px;
}

.drawer__section:first-child {
  margin-top: 0;
}

.drawer__section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
  font-size: 14.7px;
  font-weight: 700;
}

.drawer__section-title small {
  color: var(--muted-2);
  font-size: 11.8px;
  font-weight: 400;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  overflow: hidden;
  border: 1px solid #f0f1f3;
  border-radius: 12px;
  background: #f0f1f3;
}

.detail-cell {
  padding: 13px 14px;
  background: #fff;
}

.detail-cell__label {
  color: var(--muted-2);
  font-size: 11.8px;
}

.detail-cell__value {
  margin-top: 4px;
  color: var(--ink-2);
  font-size: 14.1px;
  font-weight: 650;
}

.detail-cell__value small {
  color: var(--muted-2);
  font-weight: 400;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 13px;
}

.detail-tag {
  padding: 5px 9px;
  border-radius: 5px;
  background: #f4f5f7;
  color: #6b727d;
  font-size: 11.9px;
  font-weight: 550;
}

.detail-tag--warm {
  background: var(--accent-soft);
  color: #a94927;
}

.detail-tag--green {
  background: var(--green-soft);
  color: #287456;
}

.timeline {
  position: relative;
  padding-left: 20px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 12px;
  width: 1px;
  background: #e9ebef;
}

.timeline__item {
  position: relative;
  padding: 0 0 18px;
}

.timeline__item:last-child {
  padding-bottom: 0;
}

.timeline__dot {
  position: absolute;
  left: -19px;
  top: 4px;
  width: 9px;
  height: 9px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 1px #f3b9a7;
}

.timeline__item--muted .timeline__dot {
  background: #c2c7ce;
  box-shadow: 0 0 0 1px #e1e4e8;
}

.timeline__meta {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted-2);
  font-size: 11.8px;
}

.timeline__meta b {
  color: #5d6470;
  font-weight: 650;
}

.timeline__text {
  margin-top: 4px;
  color: #555c67;
  font-size: 13px;
  line-height: 1.65;
}

.note-box {
  padding: 13px 14px;
  border-radius: 10px;
  background: #faf6f3;
  border: 1px solid #f4eae4;
  color: #705b51;
  font-size: 13px;
  line-height: 1.65;
}

.drawer__footer {
  flex: none;
  display: flex;
  gap: 9px;
  padding: 17px 24px 20px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
}

.button {
  height: 42px;
  padding: 0 17px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 14.1px;
  font-weight: 650;
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.button:active {
  transform: scale(0.98);
}

.button svg {
  width: 14px;
  height: 14px;
}

.button--ghost {
  border: 1px solid var(--line-strong);
  background: #fff;
  color: #5d6470;
}

.button--ghost:hover {
  background: #fafbfc;
  border-color: #d6dae0;
}

.button--dark {
  flex: 1;
  background: var(--ink);
  color: #fff;
}

.button--dark:hover {
  background: #2c323d;
}

.button--accent {
  flex: 1;
  background: var(--accent);
  color: #fff;
}

.button--accent:hover {
  background: var(--accent-strong);
}

/* --------------------------------------------------------------------------
   Modal
   -------------------------------------------------------------------------- */

.modal {
  position: fixed;
  z-index: 91;
  top: 50%;
  left: 50%;
  width: min(520px, calc(100vw - 32px));
  max-height: min(82vh, 700px);
  overflow-y: auto;
  padding: 28px 29px 26px;
  border-radius: 17px;
  background: #fff;
  box-shadow: var(--shadow-pop);
  transform: translate(-50%, -50%);
  animation: modal-in 230ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
  scrollbar-width: thin;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 10px)) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.modal__title {
  font-size: 21.6px;
  font-weight: 760;
  letter-spacing: -0.5px;
}

.modal__sub {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.modal__close {
  width: 29px;
  height: 29px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f4f5f7;
  color: #6c737e;
}

.modal__close:hover {
  background: #eceef1;
  color: var(--ink);
}

.modal__close svg {
  width: 13px;
  height: 13px;
}

.modal__body {
  margin-top: 21px;
}

.modal__foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 24px;
}

.field-label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12.4px;
  font-weight: 600;
}

.field-input,
.field-select {
  width: 100%;
  height: 43px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #fff;
  outline: none;
  font-size: 14.1px;
}

.field-input:focus,
.field-select:focus {
  border-color: #aeb6c2;
  box-shadow: 0 0 0 3px rgba(47, 111, 228, 0.08);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.account-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.account-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-align: left;
  transition: border-color 150ms ease, background 150ms ease;
}

.account-option:hover {
  border-color: #d9dde3;
  background: #fafbfc;
}

.account-option.is-active {
  border-color: #f3b7a4;
  background: var(--accent-faint);
}

.account-option__avatar {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #eef0f3;
  color: #5b626d;
  font-size: 12.4px;
  font-weight: 700;
}

.account-option.is-active .account-option__avatar {
  background: var(--accent);
  color: #fff;
}

.account-option__main {
  flex: 1;
  min-width: 0;
}

.account-option__name {
  color: var(--ink);
  font-size: 14.1px;
  font-weight: 650;
}

.account-option__meta {
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 11.9px;
}

.account-option__check {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

.account-option__check svg {
  width: 16px;
  height: 16px;
}

.team-list {
  display: flex;
  flex-direction: column;
}

.team-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 0;
  border-top: 1px solid #f2f3f5;
}

.team-row:first-child {
  border-top: 0;
}

.team-row__avatar {
  width: 31px;
  height: 31px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #f0f1f4;
  color: #5d6470;
  font-size: 11.8px;
  font-weight: 700;
}

.team-row__main {
  flex: 1;
}

.team-row__name {
  color: var(--ink-2);
  font-size: 13.6px;
  font-weight: 650;
}

.team-row__meta {
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 11.8px;
}

.switch {
  position: relative;
  width: 33px;
  height: 19px;
  flex: none;
  border-radius: 999px;
  background: #dfe2e7;
  transition: background 160ms ease;
}

.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(20, 24, 32, 0.18);
  transition: transform 160ms ease;
}

.switch.is-on {
  background: var(--accent);
}

.switch.is-on::after {
  transform: translateX(14px);
}

.rule-note {
  margin-top: 16px;
  padding: 12px 13px;
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--muted-2);
  font-size: 11.9px;
  line-height: 1.65;
}

.danger-title {
  color: var(--red);
}

/* --------------------------------------------------------------------------
   Toast
   -------------------------------------------------------------------------- */

.toast-region {
  position: fixed;
  z-index: 120;
  left: 50%;
  bottom: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: min(440px, calc(100vw - 32px));
  padding: 11px 15px 11px 12px;
  border-radius: 10px;
  background: rgba(27, 31, 39, 0.96);
  color: #fff;
  box-shadow: 0 12px 35px rgba(15, 19, 27, 0.22);
  font-size: 13.6px;
  font-weight: 500;
  animation: toast-in 240ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.toast.is-leaving {
  animation: toast-out 180ms ease both;
}

.toast__icon {
  width: 19px;
  height: 19px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
}

.toast__icon svg {
  width: 10px;
  height: 10px;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(5px) scale(0.99);
  }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1240px) {
  :root {
    --page-gutter: 28px;
  }

  .card {
    padding: 28px 28px 26px 33px;
  }

  .data-grid,
  .dashboard-grid {
    gap: 20px;
  }

  .dashboard-wide {
    margin-top: 20px;
  }

  .dash-col {
    gap: 20px;
  }

  .metric-tile {
    padding: 14px 14px 13px;
  }
}

@media (max-width: 1080px) {
  .dashboard-grid,
  .data-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .dash-col {
    display: contents;
  }

  .dashboard-grid {
    grid-template-areas:
      "card01"
      "card02"
      "card03"
      "card04"
      "card05";
  }

  .card--01 { grid-area: card01; }
  .card--02 { grid-area: card02; }
  .card--03 { grid-area: card03; }
  .card--04 { grid-area: card04; }
  .card--05 { grid-area: card05; }

  .data-grid .data-card {
    min-width: 0;
  }

  .metric-tile__num {
    font-size: 34.3px;
  }
}

@media (max-width: 760px) {
  :root {
    --page-gutter: 18px;
  }

  .topbar__inner {
    padding: 0 18px;
  }

  .topbar__bar {
    min-height: 56px;
  }

  .brand__mark {
    width: 25px;
    height: 25px;
    margin-right: 8px;
  }

  .brand__name {
    font-size: 21.8px;
  }

  .brand__company,
  .brand__divider,
  .brand__tagline,
  .topbar__context {
    display: none;
  }

  .utility-nav {
    gap: 0;
    font-size: 13.6px;
  }

  .utility-link {
    padding: 6px;
  }

  .utility-divider,
  .utility-dot {
    display: none;
  }

  .utility-link--muted {
    margin-left: 3px;
  }

  .utility-link--demo {
    display: none;
  }

  .topbar__navrow {
    height: 41px;
  }

  .main-nav {
    gap: 29px;
  }

  .main-nav__item {
    font-size: 15.8px;
  }

  .page {
    padding-top: 24px;
    padding-bottom: 38px;
  }

  .page-head {
    align-items: flex-start;
    margin-bottom: 19px;
  }

  .page-title {
    font-size: 33.3px;
    letter-spacing: -1.1px;
  }

  .page-subtitle {
    margin-top: 6px;
    font-size: 13px;
  }

  .page-head__right {
    padding-top: 6px;
  }

  .page-date {
    font-size: 13.6px;
  }

  .page-date span {
    display: none;
  }

  .card {
    padding: 24px 20px 22px 25px;
    border-radius: 15px;
  }

  .dashboard-wide {
    margin-top: 20px;
  }

  .card__title {
    font-size: 20.5px;
  }

  .card__badges {
    margin-top: 15px;
  }

  .metric-grid {
    gap: 9px;
  }

  .metric-tile {
    min-height: 96px;
    padding: 13px 12px 12px;
  }

  .metric-tile__num {
    font-size: 29.1px;
  }

  .metric-tile__label {
    margin-top: 9px;
    font-size: 12.4px;
  }

  .period-tabs {
    margin: 19px 0 18px;
  }

  .period-tab {
    min-width: 66px;
    height: 39px;
    padding: 0 13px;
    font-size: 13.6px;
  }

  .mini-heading h3 {
    font-size: 17.3px;
  }

  .funnel-row {
    grid-template-columns: 73px minmax(0, 1fr) 22px;
    gap: 9px;
  }

  .funnel-row__label,
  .channel__name {
    font-size: 13px;
  }

  .channel__row {
    grid-template-columns: 70px minmax(0, 1fr) 44px;
    gap: 9px;
  }

  .sales-table-wrap {
    margin-right: -7px;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent 100%);
    mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent 100%);
  }

  .customer-table-wrap {
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 22px), transparent 100%);
    mask-image: linear-gradient(to right, #000 calc(100% - 22px), transparent 100%);
  }

  .data-table {
    min-width: 615px;
  }

  .queue-trigger {
    padding: 15px 0;
  }

  .queue-trigger__label {
    font-size: 15.3px;
  }

  .queue-trigger__meta {
    margin-left: 3px;
    font-size: 13.6px;
  }

  .all-customers__toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .customer-table {
    min-width: 520px;
  }

  .customer-table-wrap {
    overflow-x: auto;
  }

  .transfer-row {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 11px;
  }

  .transfer-row__main {
    width: 100%;
    flex: none;
  }

  .transfer-row__actions {
    width: 100%;
  }

  .sale-select {
    flex: 1;
    width: auto;
    min-width: 0;
  }

  .transfer-button {
    flex: none;
  }

  .data-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .filter-tabs {
    gap: 6px;
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .filter-tabs::-webkit-scrollbar {
    display: none;
  }

  .filter-tab {
    flex: 0 0 auto;
    min-width: 62px;
    height: 39px;
    padding: 0 12px;
    font-size: 13.6px;
    white-space: nowrap;
  }

  .data-toolbar__range {
    font-size: 12.4px;
  }

  .data-note {
    margin-bottom: 18px;
    line-height: 1.7;
  }

  .profit-panel {
    padding: 18px;
  }

  .profit-panel__amount {
    font-size: 42.6px;
  }

  .analysis-row {
    grid-template-columns: 62px minmax(0, 1fr) 40px 38px;
    gap: 8px;
  }

  .analysis-row__label {
    font-size: 12.4px;
  }

  .analysis-foot__num {
    font-size: 21.8px;
  }

  .drawer__header {
    padding: 23px 20px 20px;
  }

  .drawer__close {
    top: 19px;
    right: 18px;
  }

  .drawer__title {
    font-size: 23.9px;
  }

  .drawer__body {
    padding: 20px 20px 28px;
  }

  .drawer__footer {
    padding: 14px 18px 17px;
  }

  .modal {
    padding: 23px 20px 21px;
  }

  .site-footer {
    padding: 0 18px 24px;
  }
}

@media (max-width: 420px) {
  .utility-link--demo .demo-dot {
    display: none;
  }

  .brand__name {
    font-size: 21.6px;
  }

  .metric-tile__num {
    font-size: 27px;
  }

  .metric-tile__label {
    font-size: 11.9px;
  }

  .metric-tile {
    padding: 12px 10px 11px;
  }

  .card {
    padding-right: 16px;
  }

  .page-head__right {
    padding-top: 4px;
  }

  .page-date {
    font-size: 12.4px;
  }

  .filter-tab {
    flex: 0 0 auto;
    min-width: 60px;
    padding: 0 9px;
    font-size: 13px;
    white-space: nowrap;
  }

  .quality-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}


/* ==========================================================================
   Vehicle library
   ========================================================================== */

.vehicle-kpis {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr 1fr;
  gap: 9px;
  margin-bottom: 14px;
}

.vehicle-kpi {
  min-height: 96px;
  padding: 15px 16px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.vehicle-kpi--dark {
  border-color: transparent;
  background:
    radial-gradient(circle at 100% 0%, rgba(240, 90, 42, 0.18), transparent 12rem),
    linear-gradient(135deg, #1b232c, #252e37);
  color: #fff;
}

.vehicle-kpi > span { display: block; color: var(--muted-2); font-size: 9.8px; }
.vehicle-kpi--dark > span { color: rgba(255,255,255,.45); }
.vehicle-kpi > b { display: block; margin-top: 8px; color: var(--ink); font-family: var(--font-num); font-size: 30.2px; font-weight: 500; line-height: 1; letter-spacing: -0.06em; }
.vehicle-kpi--dark > b { color: #fff; }
.vehicle-kpi > b.is-danger { color: var(--danger); }
.vehicle-kpi > b em { margin-left: 3px; color: var(--muted-2); font-family: var(--font-sans); font-size: 9.8px; font-style: normal; letter-spacing: 0; }
.vehicle-kpi > small { display: block; margin-top: 7px; color: var(--muted-2); font-size: 9.2px; }
.vehicle-kpi--dark > small { color: rgba(255,255,255,.34); }

.vehicle-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.vehicle-search {
  display: flex;
  align-items: center;
  gap: 7px;
  width: min(290px, 100%);
  height: 35px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--muted-2);
}
.vehicle-search svg { width: 13px; height: 13px; flex: none; }
.vehicle-search input { min-width: 0; flex: 1; border: 0; outline: none; background: transparent; color: var(--ink); font: inherit; font-size: 10.6px; }
.vehicle-search input::placeholder { color: var(--muted-2); }
.vehicle-search button { display: grid; place-items: center; width: 18px; height: 18px; color: var(--muted-2); }
.vehicle-search button svg { width: 9px; height: 9px; }

.vehicle-tabs { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.vehicle-tab {
  height: 31px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: var(--muted-2);
  font-size: 9.8px;
}
.vehicle-tab b { margin-left: 2px; font-family: var(--font-num); font-size: 8.5px; font-weight: 500; }
.vehicle-tab:hover { background: var(--surface); color: var(--ink); }
.vehicle-tab.is-active { border-color: var(--line); background: var(--surface); color: var(--ink); box-shadow: 0 3px 10px rgba(45,37,20,.04); }
.vehicle-tab.is-active b { color: var(--accent); }

.vehicle-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  scrollbar-width: thin;
}

.vehicle-table { width: 100%; min-width: 900px; border-collapse: collapse; }
.vehicle-table th {
  padding: 10px 11px;
  border-bottom: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-align: left;
  white-space: nowrap;
}
.vehicle-table th:first-child { padding-left: 15px; }
.vehicle-table td { padding: 11px; border-bottom: 1px solid #f1ede5; font-size: 10.6px; vertical-align: middle; }
.vehicle-table tr:last-child td { border-bottom: 0; }
.vehicle-row { cursor: pointer; transition: background 140ms ease; }
.vehicle-row:hover { background: #fffaf5; }
.vehicle-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.vehicle-plate { color: var(--ink); font-family: var(--font-num); font-size: 13.6px; font-weight: 650; letter-spacing: 0.02em; white-space: nowrap; }
.vehicle-model { margin-top: 3px; color: var(--muted-2); font-size: 8.5px; white-space: nowrap; }

.vehicle-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 21px;
  padding: 0 6px;
  border: 1px solid #e4ddd2;
  border-radius: 3px;
  background: #faf7f1;
  color: var(--muted);
  font-size: 8.5px;
  white-space: nowrap;
}
.vehicle-status i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.vehicle-status.is-rented { border-color: #cfe8dd; background: #eef8f3; color: var(--jade); }
.vehicle-status.is-available { border-color: #d7e2eb; background: #f1f6fa; color: #4b7395; }
.vehicle-status.is-overdue { border-color: #f0c7bb; background: #fdeae4; color: var(--danger); }
.vehicle-status.is-repurchased { border-color: #e6dfd3; background: #f7f4ee; color: #928477; }

.vehicle-count, .vehicle-mileage, .vehicle-periods { color: var(--ink-2); font-family: var(--font-num); font-size: 12.4px; white-space: nowrap; }
.vehicle-count small, .vehicle-mileage small, .vehicle-periods small { margin-left: 2px; color: var(--muted-2); font-family: var(--font-sans); font-size: 7.9px; }
.vehicle-count.is-danger { color: var(--danger); }

.vehicle-customer { color: var(--ink-2); font-size: 10.6px; white-space: nowrap; }
.vehicle-customer small { display: block; margin-top: 2px; color: var(--muted-2); font-family: var(--font-num); font-size: 7.9px; }
.vehicle-balance { color: var(--ink); font-family: var(--font-num); font-size: 11.8px; font-weight: 550; white-space: nowrap; }
.vehicle-monthly { color: var(--muted); font-family: var(--font-num); font-size: 10.6px; white-space: nowrap; }
.is-empty { color: var(--muted-2); font-size: 9.8px; }
.vehicle-arrow { display: grid; place-items: center; color: var(--muted-2); }
.vehicle-arrow svg { width: 11px; height: 11px; }

.vehicle-empty { padding: 36px; color: var(--muted-2); font-size: 10.6px; text-align: center; }
.vehicle-footnote { display: flex; align-items: center; gap: 5px; margin-top: 8px; color: var(--muted-2); font-size: 9.2px; }
.vehicle-footnote svg { width: 10px; height: 10px; }

.vehicle-loading, .vehicle-error {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  color: var(--muted-2);
  font-size: 10.6px;
}
.vehicle-loading span { width: 24px; height: 24px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 700ms linear infinite; }
.vehicle-loading b { color: var(--muted); font-size: 10.6px; font-weight: 500; }
.vehicle-error b { color: var(--ink); font-size: 12.4px; }
.vehicle-error span { color: var(--muted-2); font-size: 9.8px; }
.vehicle-error .button { margin-top: 7px; }

/* Vehicle drawer */
.vehicle-drawer { width: min(520px, 100vw); }
.vehicle-drawer__badge { margin-top: 10px; }
.vehicle-plate-card {
  padding: 16px;
  border-radius: 10px;
  background:
    radial-gradient(circle at 100% 0%, rgba(240,90,42,.22), transparent 13rem),
    linear-gradient(135deg, #1a222b, #252e38);
  color: #fff;
}
.vehicle-plate-card span { display: block; color: rgba(255,255,255,.38); font-family: var(--font-num); font-size: 8.5px; letter-spacing: .12em; }
.vehicle-plate-card b { display: block; margin-top: 6px; color: #fff; font-family: var(--font-num); font-size: 28.1px; font-weight: 550; letter-spacing: .02em; }
.vehicle-plate-card small { display: block; margin-top: 5px; color: rgba(255,255,255,.35); font-size: 9.8px; }

.vehicle-detail-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 9px; }
.vehicle-detail-stats > div { padding: 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); }
.vehicle-detail-stats span { display: block; color: var(--muted-2); font-size: 8.5px; }
.vehicle-detail-stats b { display: block; margin-top: 5px; color: var(--ink); font-family: var(--font-num); font-size: 18.4px; font-weight: 550; }
.vehicle-detail-stats b.is-danger { color: var(--danger); }
.vehicle-detail-stats b em { margin-left: 2px; color: var(--muted-2); font-family: var(--font-sans); font-size: 8.5px; font-style: normal; font-weight: 400; }

.vehicle-customer-card {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}
.vehicle-customer-card__avatar { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-size: 11.8px; font-weight: 650; }
.vehicle-customer-card > div:nth-child(2) { flex: 1; min-width: 0; }
.vehicle-customer-card b { display: block; color: var(--ink); font-size: 11.8px; }
.vehicle-customer-card span { display: block; margin-top: 2px; color: var(--muted-2); font-size: 8.5px; }
.vehicle-customer-card__period { flex: none; color: var(--orange); font-family: var(--font-num); font-size: 18.4px; font-weight: 550; }
.vehicle-customer-card__period small { margin-left: 2px; color: var(--muted-2); font-family: var(--font-sans); font-size: 8.5px; font-weight: 400; }

.vehicle-finance { margin-top: 9px; padding: 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); }
.vehicle-finance__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted-2); font-size: 8.5px; }
.vehicle-finance__head b { color: var(--muted); font-family: var(--font-num); font-size: 9.8px; font-weight: 500; }
.vehicle-finance__track { height: 4px; margin-top: 6px; overflow: hidden; border-radius: 2px; background: #ebe5da; }
.vehicle-finance__track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #f0a083); }
.vehicle-finance__rows { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 12px; margin-top: 9px; }
.vehicle-finance__rows span { display: block; color: var(--muted-2); font-size: 8.5px; }
.vehicle-finance__rows b { display: block; margin-top: 3px; color: var(--ink-2); font-family: var(--font-num); font-size: 11.8px; font-weight: 550; }
.vehicle-no-plan { margin-top: 9px; padding: 10px; border: 1px dashed var(--line); border-radius: 6px; color: var(--muted-2); font-size: 9.8px; text-align: center; }

@media (max-width: 980px) {
  .vehicle-kpis { grid-template-columns: 1fr 1fr; }
  .vehicle-toolbar { align-items: flex-start; flex-direction: column; }
  .vehicle-search { width: 100%; }
}

@media (max-width: 560px) {
  .vehicle-kpis { gap: 7px; }
  .vehicle-kpi { min-height: 86px; padding: 11px; }
  .vehicle-kpi > b { font-size: 23.9px; }
  .vehicle-kpi > small { font-size: 7.9px; }
  .vehicle-detail-stats { gap: 5px; }
  .vehicle-detail-stats b { font-size: 15.8px; }
  .vehicle-plate-card b { font-size: 22.9px; }
}


/* Vehicle table readability — larger type for 2K/4K store displays */
.vehicle-table { min-width: 1120px; }
.vehicle-table th {
  padding: 13px 12px;
  font-size: 11.8px;
  letter-spacing: 0.02em;
}
.vehicle-table th:first-child { padding-left: 18px; }
.vehicle-table td { padding: 15px 12px; }
.vehicle-plate { font-size: 17.3px; }
.vehicle-model { margin-top: 4px; font-size: 11.2px; }
.vehicle-status {
  height: 27px;
  padding: 0 9px;
  gap: 5px;
  font-size: 11.8px;
}
.vehicle-status i { width: 5px; height: 5px; }
.vehicle-count, .vehicle-mileage, .vehicle-periods { font-size: 15.8px; }
.vehicle-count small, .vehicle-mileage small, .vehicle-periods small { margin-left: 3px; font-size: 9.8px; }
.vehicle-customer { font-size: 13.6px; }
.vehicle-customer small { margin-top: 3px; font-size: 9.8px; }
.vehicle-balance { font-size: 15.3px; }
.vehicle-monthly { font-size: 13.6px; }
.vehicle-arrow svg { width: 13px; height: 13px; }
.vehicle-tab { height: 34px; padding: 0 11px; font-size: 11.2px; }
.vehicle-search { height: 38px; }
.vehicle-search input { font-size: 11.9px; }
.vehicle-kpi > span { font-size: 10.6px; }
.vehicle-kpi > small { font-size: 10px; }

@media (max-width: 760px) {
  .vehicle-table { min-width: 980px; }
  .vehicle-table th { font-size: 10.6px; }
  .vehicle-table td { padding: 12px 10px; }
  .vehicle-plate { font-size: 15.8px; }
  .vehicle-model { font-size: 9.8px; }
  .vehicle-count, .vehicle-mileage, .vehicle-periods { font-size: 13.6px; }
  .vehicle-customer { font-size: 11.8px; }
  .vehicle-balance { font-size: 13.6px; }
  .vehicle-monthly { font-size: 11.9px; }
}


/* ==========================================================================
   Enterprise settings
   ========================================================================== */

.enterprise-scope-badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid #e9d9cb;
  border-radius: 6px;
  background: #fff9f3;
  color: #9a6b50;
  font-size: 10.6px;
  font-weight: 600;
}

.enterprise-overview {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 9px;
  margin-bottom: 14px;
}

.enterprise-card {
  min-height: 132px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.enterprise-card--dark {
  border-color: transparent;
  background:
    radial-gradient(circle at 100% 0%, rgba(240, 90, 42, .2), transparent 12rem),
    linear-gradient(135deg, #1a222b, #252e37);
  color: #fff;
}
.enterprise-card > span { color: var(--muted-2); font-size: 9.8px; }
.enterprise-card--dark > span { color: rgba(255,255,255,.42); }
.enterprise-card > b { display: block; margin-top: 10px; color: var(--ink); font-size: 27px; font-weight: 700; letter-spacing: -.6px; }
.enterprise-card--dark > b { color: #fff; }
.enterprise-card > b em { margin-left: 3px; color: var(--muted-2); font-size: 10.6px; font-style: normal; font-weight: 400; }
.enterprise-card > small { display: block; margin-top: 5px; color: var(--muted-2); font-size: 9.8px; line-height: 1.6; }
.enterprise-card--dark > small { color: rgba(255,255,255,.4); }
.enterprise-card__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 13px; padding-top: 8px; border-top: 1px solid var(--line); color: var(--muted-2); font-size: 9.2px; }
.enterprise-card--dark .enterprise-card__foot { border-top-color: rgba(255,255,255,.1); color: rgba(255,255,255,.38); }
.enterprise-card__foot strong { color: #a66a4d; font-size: 9.8px; font-weight: 650; }
.enterprise-card--dark .enterprise-card__foot strong { color: #ffad8c; }

.enterprise-section { margin-top: 12px; }
.enterprise-store-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 12px; }
.enterprise-store {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}
.enterprise-store.is-current { border-color: #e9bda7; background: #fff9f4; }
.enterprise-store__top { display: flex; align-items: center; gap: 7px; }
.enterprise-store__num { color: var(--accent); font-family: var(--font-num); font-size: 9.8px; }
.enterprise-store__top h3 { color: var(--ink); font-size: 13.6px; font-weight: 700; }
.enterprise-store__status { margin-left: auto; display: inline-flex; align-items: center; gap: 3px; color: var(--jade); font-size: 8.5px; }
.enterprise-store__status i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.enterprise-store > p { margin-top: 7px; color: var(--muted-2); font-size: 9.8px; }
.enterprise-store__meta { display: flex; gap: 18px; margin-top: 11px; }
.enterprise-store__meta span { display: flex; flex-direction: column; gap: 3px; }
.enterprise-store__meta small { color: var(--muted-2); font-size: 8.5px; }
.enterprise-store__meta b { color: var(--ink-2); font-size: 10.6px; font-weight: 600; }
.enterprise-store__scope { margin-top: 11px; padding-top: 7px; border-top: 1px solid var(--line); color: #aa8068; font-size: 9.2px; }
.enterprise-empty { padding: 22px; border: 1px dashed var(--line); border-radius: 7px; color: var(--muted-2); font-size: 10.6px; text-align: center; grid-column: 1 / -1; }

.enterprise-add { margin-top: 13px; padding: 12px; border: 1px solid #efe3d7; border-radius: 8px; background: #fffaf5; }
.enterprise-add__head { display: flex; align-items: baseline; gap: 8px; }
.enterprise-add__head b { color: var(--ink-2); font-size: 11.8px; }
.enterprise-add__head span { color: var(--muted-2); font-size: 9.2px; }
.enterprise-add__form { display: grid; grid-template-columns: 1.1fr .7fr 1.5fr .7fr .9fr auto; gap: 6px; margin-top: 9px; }
.enterprise-add__form .field-input { height: 34px; min-width: 0; background: #fff; font-size: 10px; }
.enterprise-add__form .button { height: 34px; white-space: nowrap; font-size: 10px; }
.enterprise-note { margin-top: 12px; padding: 10px 12px; border-radius: 6px; background: #fff8f0; color: #a47a60; font-size: 9.8px; line-height: 1.6; }

.permission-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.permission-row { padding: 11px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); }
.permission-row span { display: block; color: var(--muted-2); font-size: 9.2px; }
.permission-row b { display: block; margin-top: 5px; color: var(--ink-2); font-size: 11.8px; }
.permission-row small { display: block; margin-top: 3px; color: var(--muted-2); font-size: 9.2px; line-height: 1.5; }

@media (max-width: 900px) {
  .enterprise-overview { grid-template-columns: 1fr; }
  .enterprise-store-grid { grid-template-columns: 1fr; }
  .enterprise-add__form { grid-template-columns: 1fr 1fr; }
  .permission-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .enterprise-add__form, .permission-grid { grid-template-columns: 1fr; }
}


/* Larger type structure: give the data table more room and tighten cell padding */
@media (min-width: 1200px) {
  .dashboard-grid { grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr); gap: 22px; }
}
.data-table th,
.data-table td { padding-left: 4px; padding-right: 4px; }
.data-table .cell-sales { min-width: 105px; }


/* Transfer candidate categories */
.transfer-categories {
  border-top: 1px solid #eef0f2;
  margin-top: 12px;
}

.transfer-category {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 10px;
  padding: 14px 6px;
  border-top: 1px solid #eef0f2;
  color: var(--ink);
  text-align: left;
}
.transfer-category:first-child { border-top: 0; }
.transfer-category:hover { background: #fffaf6; }
.transfer-category__main { flex: 1; min-width: 0; }
.transfer-category__main b { display: block; color: var(--ink-2); font-size: 14.5px; font-weight: 650; }
.transfer-category__main small { display: block; margin-top: 3px; color: var(--muted-2); font-size: 10px; }
.transfer-category__count { flex: none; color: var(--muted); font-family: var(--font-num); font-size: 12px; }
.transfer-category__chevron { width: 16px; flex: none; display: grid; place-items: center; color: var(--muted-2); transition: transform 150ms ease; }
.transfer-category__chevron svg { width: 12px; height: 12px; }
.transfer-category.is-open { background: #fffaf6; }
.transfer-category.is-open .transfer-category__chevron { transform: rotate(180deg); color: var(--accent); }
.transfer-category.is-open .transfer-category__main b { color: var(--accent); }
.transfer-categories__hint { padding: 12px 6px 4px; border-top: 1px solid #eef0f2; color: var(--muted-2); font-size: 10px; line-height: 1.6; }


/* Enterprise name editing */
.enterprise-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.enterprise-card__head > span {
  color: rgba(255, 255, 255, 0.45);
  font-size: 10.5px;
  letter-spacing: 0.06em;
}
.enterprise-card__edit {
  padding: 4px 9px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
  font-weight: 600;
}
.enterprise-card__edit:hover {
  border-color: rgba(255, 255, 255, 0.34);
  color: #fff;
}
.enterprise-rename {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 7px 0 8px;
}
.enterprise-rename .field-input {
  flex: 1;
  min-width: 0;
  height: 36px;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.enterprise-rename .field-input::placeholder { color: rgba(255, 255, 255, 0.38); }
.enterprise-rename .field-input:focus { border-color: rgba(255, 255, 255, 0.5); }
.enterprise-rename__actions { display: flex; gap: 6px; flex: none; }
.enterprise-rename__actions .button {
  height: 36px;
  min-width: 52px;
  padding: 0 11px;
  font-size: 10px;
}
.enterprise-rename__actions .button--primary { background: #f26a3d; color: #fff; }


/* Vehicle status report */
.vehicle-report-button {
  height: 40px;
  padding: 0 14px;
  font-size: 11px;
  white-space: nowrap;
}
.vehicle-report-button svg { width: 15px; height: 15px; }
.vehicle-report-modal {
  width: min(850px, calc(100vw - 32px));
  max-height: min(88vh, 760px);
}
.vehicle-report__summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
}
.vehicle-report__summary > div {
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfaf7;
}
.vehicle-report__summary span { display: block; color: var(--muted); font-size: 10px; }
.vehicle-report__summary b { display: inline-block; margin-top: 3px; color: var(--ink); font-family: var(--font-num); font-size: 25px; line-height: 1.1; }
.vehicle-report__summary small { margin-left: 2px; color: var(--muted); font-size: 9px; }
.vehicle-report__summary .is-danger b { color: #cf5438; }
.vehicle-report__section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 22px 0 9px;
}
.vehicle-report__section-head b { color: var(--ink-2); font-size: 13.5px; }
.vehicle-report__section-head span { color: var(--muted-2); font-size: 10px; }
.vehicle-report-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.vehicle-report-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.vehicle-report-table th {
  padding: 10px 12px;
  background: #faf8f4;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}
.vehicle-report-table td {
  padding: 12px;
  border-top: 1px solid #f0eee9;
  color: #4d554e;
  font-size: 11px;
  white-space: nowrap;
}
.vehicle-report-table td b { color: var(--ink-2); font-family: var(--font-num); font-size: 14px; }
.vehicle-report-table td.is-danger { color: #cf5438; }
.vehicle-report-status { display: inline-flex; align-items: center; gap: 6px; }
.vehicle-report-status i { width: 7px; height: 7px; border-radius: 50%; background: #b8b1a7; }
.vehicle-report-status i.is-rented { background: #4c9b78; }
.vehicle-report-status i.is-available { background: #4b83a6; }
.vehicle-report-status i.is-overdue { background: #d55c3d; }
.vehicle-report-status i.is-repurchased { background: #968b7e; }
.vehicle-report-pct {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 94px;
}
.vehicle-report-pct > span {
  display: block;
  width: 60px;
  height: 6px;
  overflow: hidden;
  border-radius: 4px;
  background: #eee9e1;
}
.vehicle-report-pct > span::after {
  content: "";
  display: block;
  width: var(--pct, 0%);
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}
.vehicle-report-pct em { color: var(--muted); font-size: 10px; font-style: normal; }
.vehicle-report-overdue-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.vehicle-report-overdue {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 13px;
  border-top: 1px solid #f0eee9;
  background: #fff;
  cursor: pointer;
}
.vehicle-report-overdue:first-child { border-top: 0; }
.vehicle-report-overdue:hover { background: #fffaf6; }
.vehicle-report-overdue > div { flex: 1; min-width: 0; }
.vehicle-report-overdue b { display: block; color: var(--ink-2); font-family: var(--font-num); font-size: 14px; }
.vehicle-report-overdue span { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }
.vehicle-report-overdue strong { color: #cf5438; font-family: var(--font-num); font-size: 13px; }
.vehicle-report-overdue__arrow { color: var(--muted-2); }
.vehicle-report-overdue__arrow svg { width: 14px; height: 14px; }
.vehicle-report-empty { padding: 18px; color: var(--muted); font-size: 11px; text-align: center; }
.vehicle-report__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  color: var(--muted-2);
  font-size: 10px;
}
.vehicle-report__foot .button { height: 38px; }
@media (max-width: 700px) {
  .vehicle-report__summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vehicle-report-button { padding: 0 10px; }
  .vehicle-report-button svg { display: none; }
}


/* Vehicle status distribution */
.vehicle-status-chart {
  margin: 0 0 16px;
  padding: 15px 18px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.vehicle-status-chart__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.vehicle-status-chart__head b { color: var(--ink-2); font-size: 13px; }
.vehicle-status-chart__head span { color: var(--muted-2); font-size: 10px; }
.vehicle-status-chart__bar { display: flex; height: 9px; margin-top: 12px; overflow: hidden; border-radius: 5px; background: #f0ece5; }
.vehicle-status-chart__bar span { display: block; min-width: 3px; height: 100%; }
.vehicle-status-chart__bar .is-rented { background: #4c9b78; }
.vehicle-status-chart__bar .is-available { background: #4b83a6; }
.vehicle-status-chart__bar .is-overdue { background: #d55c3d; }
.vehicle-status-chart__bar .is-repurchased { background: #968b7e; }
.vehicle-status-chart__legend { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 10px; color: var(--muted); font-size: 10px; }
.vehicle-status-chart__legend span { display: inline-flex; align-items: center; gap: 5px; }
.vehicle-status-chart__legend i { width: 7px; height: 7px; border-radius: 50%; }
.vehicle-status-chart__legend i.is-rented { background: #4c9b78; }
.vehicle-status-chart__legend i.is-available { background: #4b83a6; }
.vehicle-status-chart__legend i.is-overdue { background: #d55c3d; }
.vehicle-status-chart__legend i.is-repurchased { background: #968b7e; }
.vehicle-status-chart__legend b { color: var(--ink-2); font-family: var(--font-num); font-size: 12px; }
.vehicle-store { color: #6b746c; font-size: 11px; white-space: nowrap; }

/* Store manager overview */
.store-quick-panel { margin-top: 18px; }
.store-quick-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 4px; }
.store-quick { display: flex; flex-direction: column; gap: 4px; min-height: 100px; padding: 14px 15px; border: 1px solid var(--line); border-radius: 11px; background: #fffdfa; color: var(--ink); text-decoration: none; transition: border-color 150ms ease, transform 150ms ease; }
.store-quick:hover { border-color: #e6bca8; transform: translateY(-2px); }
.store-quick b { font-size: 13.5px; }
.store-quick span { color: var(--muted); font-size: 10px; line-height: 1.6; }
.store-quick em { margin-top: auto; color: var(--accent); font-size: 10px; font-style: normal; font-weight: 650; }
.store-profile-panel { margin-top: 18px; }
.store-profile-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; padding-top: 5px; }
.store-profile-grid > div { padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; background: #fbfaf7; }
.store-profile-grid span { display: block; color: var(--muted); font-size: 10px; }
.store-profile-grid b { display: block; margin-top: 4px; color: var(--ink-2); font-size: 12px; }
.store-profile-grid__wide { grid-column: span 4; }

/* Enterprise employees */
.employee-section { margin-top: 18px; }
.employee-list { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.employee-row { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border-top: 1px solid #f0eee9; background: #fff; }
.employee-row:first-child { border-top: 0; }
.employee-avatar { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 8px; background: #f9e9e0; color: var(--accent); font-size: 11px; font-weight: 700; }
.employee-main { flex: 1; min-width: 0; }
.employee-main b { display: block; color: var(--ink-2); font-size: 12px; }
.employee-main span { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }
.employee-store { min-width: 110px; color: var(--muted); font-size: 10px; }
.employee-role { min-width: 54px; padding: 3px 7px; border-radius: 5px; background: #f3f0ea; color: #797267; font-size: 9px; text-align: center; }
.employee-role.store_manager { background: #eaf2f5; color: #4d7b8c; }
.employee-role.sales { background: #f8eee1; color: #a87743; }
.employee-role.hq { background: #f5e5dc; color: var(--accent); }
.employee-lock { color: var(--muted-2); font-size: 9px; }
.employee-remove { padding: 4px 8px; border: 1px solid #e7ddd4; border-radius: 5px; background: #fff; color: #a86b52; font-size: 9px; }
.employee-remove:hover { border-color: #d9a68d; background: #fff9f5; }
.employee-add { margin-top: 14px; padding-top: 13px; border-top: 1px solid #f0eee9; }
.employee-add__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.employee-add__head b { color: var(--ink-2); font-size: 12px; }
.employee-add__head span { color: var(--muted-2); font-size: 9px; }
.employee-add__form { display: grid; grid-template-columns: 1fr 1.1fr 1.2fr .8fr 1.2fr auto; gap: 7px; margin-top: 9px; }
.employee-add__form .field-input { height: 36px; min-width: 0; font-size: 10px; }
.employee-add__form .button { height: 36px; padding: 0 10px; white-space: nowrap; font-size: 10px; }
@media (max-width: 900px) {
  .store-quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .store-profile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .store-profile-grid__wide { grid-column: span 2; }
  .employee-add__form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .employee-store { display: none; }
}


/* Chart-style funnel and channel distribution */
.funnel-chart {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 8px 0 24px;
}
.funnel-chart__graphic { width: 230px; flex: none; }
.funnel-chart__graphic svg { display: block; width: 100%; height: auto; overflow: visible; }
.funnel-chart__legend { flex: 1; min-width: 0; }
.funnel-chart__row {
  display: grid;
  grid-template-columns: 9px minmax(70px, 1fr) 32px 40px;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  border-bottom: 1px solid #f3eee8;
}
.funnel-chart__row:last-of-type { border-bottom: 0; }
.funnel-chart__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dot); }
.funnel-chart__name { color: #5d655e; font-size: 11px; }
.funnel-chart__row b { color: var(--ink); font-family: var(--font-num); font-size: 15px; text-align: right; }
.funnel-chart__row em { color: var(--muted-2); font-family: var(--font-num); font-size: 9px; font-style: normal; text-align: right; }
.funnel-chart__total {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding-top: 10px;
  margin-top: 3px;
  border-top: 1px solid #e9e3da;
}
.funnel-chart__total span { color: var(--muted); font-size: 10px; }
.funnel-chart__total b { color: var(--accent); font-family: var(--font-num); font-size: 20px; }
.funnel-chart__total small { margin-left: auto; color: var(--muted-2); font-size: 9px; }

.channel-chart {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 7px;
}
.channel-chart__donut { width: 188px; flex: none; }
.channel-chart__donut svg { display: block; width: 100%; height: auto; }
.channel-chart__segment { transition: opacity 150ms ease; }
.channel-chart__total { fill: var(--ink); font-family: var(--font-num); font-size: 27px; font-weight: 700; }
.channel-chart__unit { fill: var(--muted-2); font-family: var(--font-sans); font-size: 8px; letter-spacing: .08em; }
.channel-chart__legend { flex: 1; min-width: 0; }
.channel-chart__row {
  display: grid;
  grid-template-columns: 9px minmax(82px, 1fr) 30px 40px;
  align-items: center;
  gap: 7px;
  min-height: 29px;
  border-bottom: 1px solid #f3eee8;
}
.channel-chart__row:last-child { border-bottom: 0; }
.channel-chart__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dot); }
.channel-chart__name { color: #5d655e; font-size: 11px; }
.channel-chart__row b { color: var(--ink); font-family: var(--font-num); font-size: 14px; text-align: right; }
.channel-chart__row em { color: var(--muted-2); font-family: var(--font-num); font-size: 9px; font-style: normal; text-align: right; }
@media (max-width: 560px) {
  .funnel-chart, .channel-chart { gap: 10px; }
  .funnel-chart__graphic { width: 180px; }
  .channel-chart__donut { width: 150px; }
}


/* Refined brand mark tile */
.brand__mark, .login-brand__mark, .portal-login__mark, .screen-brand__mark, .hud-brand__mark {
  background: linear-gradient(145deg, #ff7b48 0%, #f05a28 48%, #dc4618 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 7px 18px rgba(230, 72, 26, 0.26) !important;
}
.brand__mark svg, .login-brand__mark svg, .portal-login__mark svg, .screen-brand__mark svg, .hud-brand__mark svg {
  filter: drop-shadow(0 1px 1px rgba(100, 25, 0, 0.18));
}


/* Mobile adaptation: manager workspace */
@media (max-width: 760px) {
  html, body { overflow-x: hidden; }
  .topbar__inner { padding: 0 14px; }
  .topbar__bar { min-height: 54px; gap: 8px; }
  .brand__mark { width: 28px; height: 28px; margin-right: 8px; }
  .brand__name { font-size: 19px; letter-spacing: -.4px; }
  .brand__company, .brand__divider, .brand__tagline { display: none; }
  .utility-nav { gap: 1px; font-size: 11.5px; }
  .utility-link { padding: 5px 4px; white-space: nowrap; }
  .utility-divider { display: none; }
  .topbar__navrow {
    display: block;
    height: 44px;
    margin: 0 -14px;
    padding: 0 14px;
    overflow-x: auto;
    overflow-y: hidden;
    border-top: 1px solid rgba(255, 255, 255, .07);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent 100%);
    mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent 100%);
  }
  .topbar__navrow::-webkit-scrollbar { display: none; }
  .main-nav {
    width: max-content;
    min-width: 100%;
    height: 100%;
    flex-wrap: nowrap;
    gap: 22px;
  }
  .main-nav__item {
    flex: 0 0 auto;
    height: 100%;
    padding: 0 1px 1px;
    font-size: 13px;
    white-space: nowrap;
  }
  .main-nav__item--screen .nav-external { font-size: 10px; }
  .topbar__context { display: none; }
  .page { padding-top: 22px; padding-bottom: 34px; }
  .page-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .page-head__right { width: 100%; justify-content: flex-start; padding-top: 0; flex-wrap: wrap; }
  .page-title { font-size: 31px; }
  .page-subtitle { font-size: 12.5px; }
  .store-quick-grid { grid-template-columns: 1fr 1fr; }
  .store-profile-grid { grid-template-columns: 1fr; }
  .store-profile-grid__wide { grid-column: auto; }
  .employee-row { flex-wrap: wrap; }
  .employee-store { width: 100%; min-width: 0; }
  .employee-add__form { grid-template-columns: 1fr; }
  .funnel-chart, .channel-chart { flex-direction: column; align-items: stretch; gap: 12px; }
  .funnel-chart__graphic { width: min(260px, 100%); margin: 0 auto; }
  .channel-chart__donut { width: 180px; margin: 0 auto; }
  .funnel-chart__legend, .channel-chart__legend { width: 100%; }
  .channel-chart__row, .funnel-chart__row { min-height: 34px; }
  .vehicle-table-wrap { -webkit-overflow-scrolling: touch; }
}
@media (max-width: 520px) {
  .store-quick-grid { grid-template-columns: 1fr; }
  .store-quick { min-height: 88px; }
  .funnel-chart__graphic { width: 220px; }
  .channel-chart__donut { width: 160px; }
  .funnel-chart__row { grid-template-columns: 8px minmax(68px, 1fr) 30px 36px; }
  .employee-add__head { flex-direction: column; gap: 3px; }
  .employee-add__form .button { width: 100%; }
  .page-date { font-size: 12.5px; }
}


/* Mobile adaptation: enterprise settings */
@media (max-width: 760px) {
  .enterprise-overview { grid-template-columns: 1fr; }
  .enterprise-card { min-height: 112px; }
  .enterprise-store-grid { grid-template-columns: 1fr; }
  .enterprise-add__form { grid-template-columns: 1fr; }
  .permission-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .permission-grid { grid-template-columns: 1fr; }
}


/* Mobile app tab bar */
.mobile-tabbar, .mobile-sheet { display: none; }

@media (max-width: 760px) {
  .topbar__navrow { display: none !important; }
  .topbar__bar { min-height: 58px; }
  .utility-link--sales { display: none; }
  .page { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .site-footer { display: none; }
  body { background: #f8f5ef; }

  .mobile-tabbar {
    position: fixed;
    z-index: 90;
    left: 0; right: 0; bottom: 0;
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    gap: 2px;
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
    background: rgba(22, 28, 34, .97);
    border-top: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 -10px 30px rgba(21, 24, 27, .16);
    backdrop-filter: blur(18px);
  }
  .mobile-tab {
    position: relative;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    height: 54px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: rgba(255, 255, 255, .46);
    font-size: 9.5px;
    line-height: 1;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: color 150ms ease, background 150ms ease;
  }
  .mobile-tab__icon {
    width: 27px; height: 27px;
    display: grid; place-items: center;
    border-radius: 9px;
    transition: background 150ms ease, color 150ms ease;
  }
  .mobile-tab__icon svg { width: 21px; height: 21px; }
  .mobile-tab__label { white-space: nowrap; }
  .mobile-tab.is-active { color: #ffb08e; }
  .mobile-tab.is-active .mobile-tab__icon { background: rgba(240, 90, 42, .18); color: #ff9b73; }
  .mobile-tab.is-active::before {
    content: "";
    position: absolute;
    top: -7px;
    left: 50%;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: #f26a3d;
    transform: translateX(-50%);
  }
  .mobile-tab:active { background: rgba(255, 255, 255, .04); }

  .mobile-sheet { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; }
  .mobile-sheet[hidden] { display: none !important; }
  .mobile-sheet__backdrop { position: absolute; inset: 0; background: rgba(18, 20, 22, .42); backdrop-filter: blur(3px); }
  .mobile-sheet__panel {
    position: relative;
    width: 100%;
    max-height: 78vh;
    overflow-y: auto;
    padding: 18px 16px calc(16px + env(safe-area-inset-bottom));
    border-radius: 20px 20px 0 0;
    background: #fbf9f5;
    box-shadow: 0 -22px 60px rgba(20, 20, 18, .22);
    animation: mobile-sheet-in 220ms ease both;
  }
  @keyframes mobile-sheet-in { from { transform: translateY(18px); opacity: .6; } to { transform: translateY(0); opacity: 1; } }
  .mobile-sheet__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .mobile-sheet__head b { color: var(--ink); font-size: 17px; }
  .mobile-sheet__close {
    width: 30px; height: 30px; border-radius: 50%;
    background: #f1ece4; color: #6d6a63; font-size: 20px; line-height: 1;
  }
  .mobile-sheet__links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
  .mobile-sheet__link {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    min-height: 48px; padding: 0 12px;
    border: 1px solid #ebe5dc; border-radius: 11px;
    background: #fff; color: var(--ink-2); font-size: 12px;
    text-decoration: none;
  }
  .mobile-sheet__link em { color: var(--accent); font-style: normal; font-size: 18px; }
  .mobile-sheet__foot { display: flex; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #ece6de; }
  .mobile-sheet__foot-link, .mobile-sheet__logout {
    flex: 1; height: 41px; display: grid; place-items: center;
    border-radius: 9px; border: 1px solid #e7dfd5; background: #fff;
    color: #6b6359; font-size: 11px; text-decoration: none;
  }
  .mobile-sheet__logout { color: #a55e45; }
  .ai-fab { bottom: calc(78px + env(safe-area-inset-bottom)) !important; right: 16px !important; }
  .toast-region { bottom: calc(88px + env(safe-area-inset-bottom)) !important; }
}


/* Store edit / disable */
.enterprise-store { display: flex; flex-direction: column; }
.enterprise-store.is-inactive {
  border-color: #ddd3c5;
  background: #f7f4ee;
}
.enterprise-store.is-inactive .enterprise-store__top h3 { color: #776e61; }
.enterprise-store.is-inactive .enterprise-store__meta b { color: #8e8375; }
.enterprise-store__status.is-inactive { color: #8a7b68; background: #ece5da; }
.enterprise-store__status.is-inactive i { background: #a08c74; }
.enterprise-store__actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid #ece7df;
}
.enterprise-store__actions .button { height: 29px; padding: 0 10px; font-size: 10px; }
@media (max-width: 760px) {
  .enterprise-store__actions .button { flex: 1; }
}


/* HQ store directory */
.store-directory-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.store-directory-panel { margin-top: 18px; }
.store-directory-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.store-directory-card {
  padding: 18px 19px 15px;
  border: 1px solid #ece6dc;
  border-radius: 12px;
  background: #fffdf9;
  box-shadow: 0 7px 20px rgba(76, 55, 35, .035);
}
.store-directory-card.is-inactive { background: #f5f2ec; border-color: #e4ddd2; }
.store-directory-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.store-directory-card__eyebrow { color: #a79582; font-size: 9px; letter-spacing: .07em; }
.store-directory-card__head h3 { margin: 5px 0 0; color: #2f3832; font-size: 19px; font-weight: 750; letter-spacing: -.3px; }
.store-directory-card.is-inactive h3 { color: #756c60; }
.store-directory-card__address { margin: 7px 0 13px; color: #a09587; font-size: 10.5px; }
.store-directory-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid #f0e9df;
  border-radius: 8px;
  background: #f0e9df;
}
.store-directory-metrics > div { padding: 9px 8px; background: #fffdf9; }
.store-directory-card.is-inactive .store-directory-metrics > div { background: #f5f2ec; }
.store-directory-metrics span { display: block; color: #a4998a; font-size: 8.5px; white-space: nowrap; }
.store-directory-metrics b { display: block; margin-top: 3px; color: #3a3a37; font-family: var(--font-num); font-size: 19px; font-weight: 700; line-height: 1; }
.store-directory-metrics b em { font-family: var(--font-body); font-size: 9px; font-style: normal; font-weight: 500; }
.store-directory-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; color: #a39889; font-size: 9.5px; }
.store-directory-card__link { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-weight: 650; white-space: nowrap; }
.store-directory-card__link svg { width: 11px; height: 11px; }
.store-directory-card__link:hover { color: var(--accent-strong); }
@media (max-width: 1240px) {
  .store-directory-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .store-directory-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .store-directory-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .store-directory-card { padding: 15px; }
  .store-directory-metrics b { font-size: 17px; }
}


/* Employee password change */
.employee-password {
  padding: 4px 8px;
  border: 1px solid #dfe7ea;
  border-radius: 5px;
  background: #fff;
  color: #617b86;
  font-size: 9px;
  white-space: nowrap;
}
.employee-password:hover { border-color: #a9c4ce; background: #f7fbfc; }
@media (max-width: 760px) {
  .employee-row { flex-wrap: wrap; }
  .employee-password, .employee-remove { margin-left: auto; }
}


/* Compact funnel / empty state */
.funnel-empty { display: none; }
.card--01.is-funnel-empty .funnel-chart { display: none; }
.card--01.is-funnel-empty .funnel-empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin: 6px 0 20px;
  padding: 15px 16px;
  border: 1px dashed #eadfd2;
  border-radius: 10px;
  background: #fffaf4;
}
.funnel-empty b { color: #5f584e; font-size: 12px; font-weight: 650; }
.funnel-empty span { color: #a89b8c; font-size: 10px; }

@media (max-width: 760px) {
  .funnel-chart { display: block; margin: 4px 0 18px; }
  .funnel-chart__graphic { display: none; }
  .funnel-chart__legend {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 14px;
    width: 100%;
  }
  .funnel-chart__row {
    grid-template-columns: 7px minmax(0, 1fr) 27px 32px;
    gap: 5px;
    min-height: 28px;
  }
  .funnel-chart__name { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
  .funnel-chart__row b { font-size: 13px; }
  .funnel-chart__row em { font-size: 8px; }
  .funnel-chart__total { grid-column: 1 / -1; margin-top: 5px; }
  .card--01.is-funnel-empty .funnel-empty { margin-bottom: 14px; }
}


/* Mobile enterprise name in topbar */
@media (max-width: 760px) {
  .topbar .brand {
    min-width: 0;
    max-width: calc(100vw - 106px);
    overflow: hidden;
  }
  .topbar .brand__name { flex: none; }
  .topbar .brand__company {
    display: inline-block;
    max-width: 118px;
    margin-left: 8px;
    padding-left: 8px;
    overflow: hidden;
    border-left: 1px solid rgba(255, 255, 255, .16);
    color: rgba(255, 255, 255, .62);
    font-size: 10px;
    font-weight: 550;
    letter-spacing: .04em;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
@media (max-width: 380px) {
  .topbar .brand__company { max-width: 78px; }
}


/* HQ data store comparison */
.store-compare-wrap { overflow-x: auto; }
.store-compare-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.store-compare-table th { padding: 0 10px 10px; border-bottom: 1px solid #ebe4da; color: #9c9081; font-size: 9.5px; font-weight: 500; text-align: right; white-space: nowrap; }
.store-compare-table th:first-child { text-align: left; }
.store-compare-table td { padding: 12px 10px; border-bottom: 1px solid #f1ece5; color: #3d423d; font-family: var(--font-num); font-size: 14px; text-align: right; }
.store-compare-table td:first-child { text-align: left; font-family: var(--font-body); }
.store-compare-table td b { display: block; color: var(--ink-2); font-size: 11.5px; }
.store-compare-table td small { display: block; margin-top: 3px; color: var(--muted-2); font-size: 8.5px; }
.store-compare-table tr:last-child td { border-bottom: 0; }
@media (max-width: 760px) {
  .store-compare-wrap { overflow-x: hidden; }
  .store-compare-table { min-width: 0; }
  .store-compare-table th, .store-compare-table td { padding-left: 5px; padding-right: 5px; font-size: 11px; }
  .store-compare-table th:nth-child(5), .store-compare-table td:nth-child(5) { display: none; }
}
