/* ============================================================================
   VEERHA — INDIGO SLATE
   Component layer.

   Every state is written twice: once as the real pseudo-class so the
   component behaves, once as a forced `.is-*` class so the documentation can
   draw the state as its own frame. `.v-btn:hover, .v-btn.is-hover { … }`.
   That is what lets this folder work like a Figma file with no JavaScript.

   Naming: every class is `v-` prefixed. The prototype taught this the hard
   way — an unprefixed `.delta` collided with an existing one and silently
   broke the desktop timeline. Grep before you name.
   ============================================================================ */


/* ==========================================================================
   1 · SHELL
   ========================================================================== */

.v-shell { display: grid; grid-template-columns: var(--rail) 1fr; min-height: 100%; }
.v-shell--sectioned { grid-template-columns: var(--rail) var(--sidenav) 1fr; }
/* The rail ships expanded, so any container sized on --rail must follow it.
   Without this the content renders underneath the sidebar. */
.v-shell:has(> .v-rail.is-expanded) { grid-template-columns: var(--rail-open) 1fr; }
.v-shell--sectioned:has(> .v-rail.is-expanded) { grid-template-columns: var(--rail-open) var(--sidenav) 1fr; }

/* Icon rail — the persistent module switcher */
.v-rail {
  width: var(--rail); background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: center;
  padding: var(--s-3) 0; gap: var(--s-1);
}
.v-rail__mark {
  width: 32px; height: 32px; border-radius: var(--r-md);
  background: var(--brand); color: var(--brand-on);
  display: grid; place-items: center; font-weight: 600; font-size: 14px;
  margin-bottom: var(--s-3);
}
.v-rail__item {
  position: relative; width: 36px; height: 36px; border-radius: var(--r-md);
  display: grid; place-items: center; color: var(--text-muted);
  background: none; border: 0; cursor: pointer;
  transition: background var(--m-hover) var(--ease), color var(--m-hover) var(--ease);
}
.v-rail__item:hover, .v-rail__item.is-hover { background: var(--surface-subtle); color: var(--text-secondary); }
.v-rail__item.is-active { background: var(--brand-soft); color: var(--brand); }
.v-rail__item.is-active::before {
  content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px;
  width: 2px; border-radius: var(--r-full); background: var(--brand);
}
.v-rail__spacer { flex: 1; }

/* Expanded rail. v2 §16 puts the sidebar at 232–248px open and 64–72px
   collapsed; this sits at 240 / 56. The label is always in the DOM so the
   accessible name does not change when the rail collapses — only its
   visibility does. */
.v-rail__label {
  font-size: var(--t-small-s); font-weight: 500; white-space: nowrap;
  opacity: 0; width: 0; overflow: hidden;
  transition: opacity var(--m-hover) var(--ease);
}
.v-rail.is-expanded {
  width: var(--rail-open); align-items: stretch; padding: var(--s-3) var(--s-3);
}
.v-rail.is-expanded .v-rail__mark { margin-left: 2px; }
.v-rail.is-expanded .v-rail__item {
  width: 100%; justify-content: flex-start; grid-auto-flow: column;
  display: flex; align-items: center; gap: var(--s-3); padding: 0 var(--s-3);
}
.v-rail.is-expanded .v-rail__label { opacity: 1; width: auto; }
.v-rail.is-expanded .v-rail__item.is-active::before { left: -4px; }
/* The count carries the signal when expanded, so the dot would just sit on
   top of the number. Collapsed, the dot is all there is. */
.v-rail.is-expanded .v-rail__item:has(.v-rail__count) .v-navdot { display: none; }
.v-rail.is-expanded .v-navdot { top: 50%; right: var(--s-3); margin-top: -3px; }

/* Status dot on a rail icon — pending work in that module */
.v-navdot {
  position: absolute; top: 5px; right: 5px; width: 6px; height: 6px;
  border-radius: var(--r-full); background: var(--dn-ic);
  box-shadow: 0 0 0 2px var(--surface);
}

/* Top bar — quiet by instruction (v2 §17) */
.v-topbar {
  height: var(--topbar); background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: var(--s-4);
  padding: 0 var(--s-6);
}
.v-topbar__who { margin-left: auto; text-align: right; line-height: 1.25; }
.v-topbar__name { font-size: var(--t-small-s); font-weight: 600; }
.v-topbar__role { font-size: var(--t-meta-s); color: var(--text-muted); }

/* Breadcrumb */
.v-crumb { display: flex; align-items: center; gap: var(--s-2); font-size: var(--t-meta-s); color: var(--text-muted); }
.v-crumb__sep { color: var(--text-faint); }
.v-crumb__current { color: var(--text-secondary); font-weight: 500; }

/* Section navigation — the second-level sidebar */
.v-sidenav {
  width: var(--sidenav); background: var(--surface);
  border-right: 1px solid var(--border);
  padding: var(--s-4); display: flex; flex-direction: column; gap: var(--s-5);
  overflow-y: auto;
}
.v-sidenav__group { display: flex; flex-direction: column; gap: 2px; }
.v-sidenav__label { margin-bottom: var(--s-2); }
.v-sidenav__item {
  position: relative; display: flex; align-items: center; gap: var(--s-3);
  padding: 7px var(--s-3); border-radius: var(--r-sm);
  color: var(--text-secondary); font-size: var(--t-small-s);
  transition: background var(--m-hover) var(--ease);
}
.v-sidenav__item:hover, .v-sidenav__item.is-hover { background: var(--surface-subtle); }
.v-sidenav__item.is-active { background: var(--brand-soft); color: var(--brand); font-weight: 500; }
.v-sidenav__item.is-active::before {
  content: ""; position: absolute; left: 0; top: 6px; bottom: 6px;
  width: 2px; border-radius: var(--r-full); background: var(--brand);
}
.v-sidenav__item svg { flex: none; color: var(--text-muted); }
.v-sidenav__item.is-active svg { color: var(--brand); }

/* Dense — for a rail that holds a whole area. The live Settings rail carries
   eight groups and ~36 destinations; at the default rhythm that is taller than
   a laptop screen, so groups sit closer and items are a row shorter. Hit area
   stays 30px. */
.v-sidenav--dense { gap: var(--s-4); padding: var(--s-3); }
.v-sidenav--dense .v-sidenav__group { gap: 0; }
.v-sidenav--dense .v-sidenav__label { margin-bottom: var(--s-1); }
.v-sidenav--dense .v-sidenav__item { padding: 5px var(--s-3); min-height: 30px; }

/* The rail's last block: where to get help. Quiet by design — it is the
   bottom of the nav, not a promotion. */
.v-sidenav__help {
  margin-top: auto; padding: var(--s-3); border: 1px solid var(--border);
  border-radius: var(--r-tile); background: var(--surface-subtle);
  display: flex; flex-direction: column; gap: var(--s-2);
}
.v-sidenav__help p { margin: 0; font-size: var(--t-meta-s); color: var(--text-muted); }
.v-sidenav__help__links { display: flex; gap: var(--s-3); font-size: var(--t-meta-s); }
.v-sidenav__help__links a { color: var(--brand); font-weight: 500; }


/* ==========================================================================
   2 · PAGE STRUCTURE
   ========================================================================== */

.v-pagehead { display: flex; align-items: flex-start; gap: var(--s-6); margin-bottom: var(--s-6); }
.v-pagehead__copy { flex: 1; min-width: 0; }
.v-pagehead__title { font-size: var(--t-page-s); line-height: var(--t-page-l); font-weight: var(--t-page-w); letter-spacing: var(--t-page-k); }
.v-pagehead__sub { margin-top: var(--s-1); font-size: var(--t-small-s); color: var(--text-muted); }

/* Section — a surface per block, with ruled rows inside. Grouping is at the
   section level, never one card per number (standing client correction). */
.v-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-card); box-shadow: var(--e1);
}
.v-card__head { padding: var(--s-4) var(--s-5) var(--s-3); display: flex; align-items: flex-start; gap: var(--s-3); }
.v-card__head .v-card__title { font-size: var(--t-lead-s); line-height: var(--t-lead-l); font-weight: 600; letter-spacing: -.008em; }
.v-card__desc { margin-top: 2px; font-size: var(--t-small-s); color: var(--text-muted); }
.v-card__body { padding: 0 var(--s-5) var(--s-5); }
.v-card__foot { padding: var(--s-3) var(--s-5); border-top: 1px solid var(--border); }
.v-card__ic {
  width: 30px; height: 30px; border-radius: var(--r-md); flex: none;
  display: grid; place-items: center;
  background: var(--surface-subtle); color: var(--text-muted);
}

/* Ruled rows inside a section — the alternative to nesting cards */
.v-rows > * { padding: var(--s-3) var(--s-5); border-top: 1px solid var(--border); }
.v-rows > *:first-child { border-top: 1px solid var(--border); }

.v-accordion__trigger {
  width: 100%; display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-4) var(--s-5); background: none; border: 0; cursor: pointer; text-align: left;
}
.v-accordion__chev { margin-left: auto; color: var(--text-muted); transition: transform var(--m-dropdown) var(--ease); }
.v-accordion.is-open .v-accordion__chev { transform: rotate(180deg); }
.v-accordion__panel { padding: 0 var(--s-5) var(--s-5); border-top: 1px solid var(--border); padding-top: var(--s-4); }


/* ==========================================================================
   3 · BUTTONS
   One dominant primary action per section. Not every action is a primary
   button (v2 §20).
   ========================================================================== */

.v-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  height: 36px; padding: 0 var(--s-4);
  border-radius: var(--r-ctrl); border: 1px solid transparent;
  font-size: var(--t-small-s); font-weight: 500; white-space: nowrap;
  cursor: pointer; background: none;
  transition: background var(--m-hover) var(--ease), border-color var(--m-hover) var(--ease), box-shadow var(--m-hover) var(--ease);
}
.v-btn svg { flex: none; }
.v-btn--sm { height: 30px; padding: 0 var(--s-3); font-size: var(--t-meta-s); }
.v-btn--lg { height: 44px; padding: 0 var(--s-5); font-size: var(--t-body-s); }

.v-btn--primary { background: var(--brand); color: var(--brand-on); }
.v-btn--primary:hover, .v-btn--primary.is-hover { background: var(--brand-hover); }
.v-btn--primary:active, .v-btn--primary.is-active { background: var(--brand-800); }

.v-btn--secondary { background: var(--surface); border-color: var(--field-border); color: var(--text-secondary); }
.v-btn--secondary:hover, .v-btn--secondary.is-hover { background: var(--surface-subtle); }
.v-btn--secondary:active, .v-btn--secondary.is-active { background: var(--surface-muted); }

.v-btn--ghost { color: var(--text-secondary); }
.v-btn--ghost:hover, .v-btn--ghost.is-hover { background: var(--surface-subtle); }

.v-btn--danger { background: var(--dn-ic); color: var(--on-solid); }
.v-btn--danger:hover, .v-btn--danger.is-hover { background: var(--dn-tx); }

.v-btn--danger-ghost {
  background: transparent; color: var(--dn-tx); border-color: var(--dn-bd);
}
.v-btn--danger-ghost:hover, .v-btn--danger-ghost.is-hover {
  background: var(--dn-bg); border-color: var(--dn-ic);
}

.v-btn--icon { width: 36px; padding: 0; color: var(--text-muted); border-color: var(--border); background: var(--surface); }
.v-btn--icon:hover, .v-btn--icon.is-hover { background: var(--surface-subtle); color: var(--text-secondary); }

.v-btn:focus-visible, .v-btn.is-focus { outline: none; box-shadow: var(--focus); }
.v-btn:disabled, .v-btn.is-disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }

/* Loading — the label stays so the button does not resize */
.v-btn.is-loading { pointer-events: none; position: relative; color: transparent; }
.v-btn.is-loading::after {
  content: ""; position: absolute; width: 14px; height: 14px; border-radius: var(--r-full);
  border: 2px solid currentColor; border-top-color: transparent;
  color: var(--brand-on); animation: v-spin .7s linear infinite;
}
.v-btn--secondary.is-loading::after, .v-btn--ghost.is-loading::after { color: var(--text-secondary); }
@keyframes v-spin { to { transform: rotate(360deg); } }

/* Link — an inline action that reads as text ("Open →", "View people →").
   A real <button>, so it is focusable and announced; it takes its size from
   whatever type class sits beside it. */
.v-link {
  display: inline; padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--brand); font-weight: 500; white-space: nowrap; text-align: inherit;
  border-radius: var(--r-xs);
}
.v-link:hover, .v-link.is-hover { color: var(--brand-hover); text-decoration: underline; text-underline-offset: 2px; }
.v-link:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.v-actions { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }


/* ==========================================================================
   4 · FORM CONTROLS
   ========================================================================== */

.v-field { display: flex; flex-direction: column; gap: 6px; }
.v-field__label { font-size: var(--t-small-s); font-weight: 500; color: var(--text-secondary); }
.v-field__hint { font-size: var(--t-meta-s); color: var(--text-muted); }
.v-field__error { font-size: var(--t-meta-s); color: var(--dn-tx); display: flex; align-items: center; gap: 5px; }

.v-input, .v-select, .v-textarea {
  width: 100%; min-height: 36px; padding: 7px var(--s-3);
  background: var(--surface); color: var(--text-primary);
  border: 1px solid var(--field-border); border-radius: var(--r-ctrl);
  font-size: var(--t-field-s);
  transition: border-color var(--m-hover) var(--ease), box-shadow var(--m-hover) var(--ease);
}
.v-input::placeholder, .v-textarea::placeholder { color: var(--text-muted); }
.v-input:hover, .v-input.is-hover, .v-select:hover, .v-textarea:hover { border-color: var(--field-border-hover); }
.v-input:focus, .v-input.is-focus,
.v-select:focus, .v-select.is-focus,
.v-textarea:focus, .v-textarea.is-focus {
  outline: none; border-color: var(--brand); box-shadow: var(--focus);
}
.v-input.is-error, .v-select.is-error, .v-textarea.is-error { border-color: var(--dn-ic); }
.v-input.is-error:focus, .v-input.is-error.is-focus { box-shadow: 0 0 0 3px var(--dn-bd); }
.v-input:disabled, .v-input.is-disabled { background: var(--surface-muted); color: var(--text-faint); cursor: not-allowed; }
.v-textarea { min-height: 84px; resize: vertical; line-height: var(--t-body-l); }

.v-select { appearance: none; padding-right: var(--s-8); cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23626F85' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right var(--s-3) center;
}

.v-search { position: relative; }
.v-search .v-input { padding-left: var(--s-8); }
.v-search__ic { position: absolute; left: var(--s-3); top: 50%; transform: translateY(-50%); color: var(--text-faint); pointer-events: none; }

/* Checkbox and toggle — drawn, not native, so states can be shown */
.v-check { display: inline-flex; align-items: center; gap: var(--s-2); cursor: pointer; font-size: var(--t-small-s); }
.v-check__box {
  width: 16px; height: 16px; flex: none; border-radius: var(--r-xs);
  border: 1px solid var(--field-border); background: var(--surface);
  display: grid; place-items: center; color: transparent;
  transition: background var(--m-hover) var(--ease), border-color var(--m-hover) var(--ease);
}
.v-check:hover .v-check__box, .v-check.is-hover .v-check__box { border-color: var(--field-border-hover); }
.v-check.is-checked .v-check__box { background: var(--brand); border-color: var(--brand); color: var(--brand-on); }
.v-check.is-indeterminate .v-check__box { background: var(--brand); border-color: var(--brand); color: var(--brand-on); }
.v-check.is-disabled { opacity: .45; cursor: not-allowed; }
/* Drawn controls are focusable (role + tabindex, or a hidden native input),
   so each shows the same ring a button does. */
.v-check:focus-visible { outline: none; }
.v-check:focus-visible .v-check__box, .v-check input:focus-visible + .v-check__box { box-shadow: var(--focus); }
.v-check input:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.v-toggle { display: inline-flex; align-items: center; gap: var(--s-3); cursor: pointer; }
.v-toggle__track {
  width: 36px; height: 20px; border-radius: var(--r-full); flex: none;
  background: var(--field-border); position: relative;
  transition: background var(--m-hover) var(--ease);
}
.v-toggle__thumb {
  position: absolute; top: 2px; left: 2px; width: 16px; height: 16px;
  border-radius: var(--r-full); background: var(--surface); box-shadow: var(--e1);
  transition: transform var(--m-hover) var(--ease);
}
.v-toggle.is-on .v-toggle__track { background: var(--brand); }
.v-toggle.is-on .v-toggle__thumb { transform: translateX(16px); }
.v-toggle.is-disabled { opacity: .45; cursor: not-allowed; }
.v-toggle:focus-visible { outline: none; }
.v-toggle:focus-visible .v-toggle__track { box-shadow: var(--focus); }

/* Radio card — a bordered, selectable explanation block */
.v-radiocard {
  display: flex; gap: var(--s-3); padding: var(--s-4);
  border: 1px solid var(--field-border); border-radius: var(--r-tile);
  background: var(--surface); cursor: pointer;
  transition: border-color var(--m-hover) var(--ease), background var(--m-hover) var(--ease);
}
.v-radiocard:hover, .v-radiocard.is-hover { border-color: var(--field-border-hover); }
.v-radiocard.is-selected { border-color: var(--brand); background: var(--brand-soft); }
.v-radiocard:focus-visible, .v-radiocard:has(input:focus-visible) { outline: none; box-shadow: var(--focus); }
.v-radiocard__dot {
  width: 16px; height: 16px; flex: none; margin-top: 2px; border-radius: var(--r-full);
  border: 1px solid var(--field-border); background: var(--surface);
}
.v-radiocard.is-selected .v-radiocard__dot { border: 5px solid var(--brand); }

/* Dropzone */
.v-drop {
  border: 1px dashed var(--field-border); border-radius: var(--r-tile);
  background: var(--surface-subtle); padding: var(--s-10) var(--s-6);
  text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--s-3);
}
.v-drop.is-hover { border-color: var(--brand); background: var(--brand-soft); }


/* ==========================================================================
   5 · NAVIGATION CONTROLS
   ========================================================================== */

.v-tabs { display: flex; gap: var(--s-5); border-bottom: 1px solid var(--border); }
.v-tab {
  padding: var(--s-3) 0; margin-bottom: -1px; background: none; border: 0; cursor: pointer;
  font-size: var(--t-small-s); font-weight: 500; color: var(--text-muted);
  border-bottom: 2px solid transparent;
}
.v-tab:hover, .v-tab.is-hover { color: var(--text-secondary); }
.v-tab.is-active { color: var(--brand); border-bottom-color: var(--brand); }

.v-seg { display: inline-flex; background: var(--surface-subtle); border: 1px solid var(--border); border-radius: var(--r-ctrl); padding: 2px; }
.v-seg__opt {
  padding: 5px var(--s-3); border-radius: var(--r-xs); border: 0; background: none; cursor: pointer;
  font-size: var(--t-meta-s); font-weight: 500; color: var(--text-muted);
}
.v-seg__opt.is-active { background: var(--surface); color: var(--text-primary); box-shadow: var(--e1); }

.v-pilltabs { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.v-pill {
  height: 30px; padding: 0 var(--s-3); display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border); border-radius: var(--r-ctrl); background: var(--surface);
  font-size: var(--t-meta-s); font-weight: 500; color: var(--text-secondary); cursor: pointer;
}
.v-pill:hover, .v-pill.is-hover { background: var(--surface-subtle); }
.v-pill.is-active { background: var(--brand-soft); border-color: var(--brand-soft-bd); color: var(--brand); }
.v-pill__n { color: var(--text-muted); font-family: var(--num); }
.v-pill.is-active .v-pill__n { color: var(--brand); }

.v-stepper { display: flex; align-items: center; gap: var(--s-3); }
.v-stepper__step { display: flex; align-items: center; gap: var(--s-2); font-size: var(--t-meta-s); color: var(--text-muted); }
.v-stepper__n {
  width: 20px; height: 20px; border-radius: var(--r-full); display: grid; place-items: center;
  background: var(--surface-muted); color: var(--text-secondary); font-size: var(--t-micro-s); font-weight: 600;
}
.v-stepper__step.is-active { color: var(--text-primary); font-weight: 500; }
.v-stepper__step.is-active .v-stepper__n { background: var(--brand); color: var(--brand-on); }
.v-stepper__step.is-done .v-stepper__n { background: var(--ok-ic); color: var(--on-solid); }
.v-stepper__bar { flex: 1; height: 2px; background: var(--border); border-radius: var(--r-full); }

.v-pager { display: flex; align-items: center; gap: var(--s-3); font-size: var(--t-meta-s); color: var(--text-muted); }
.v-pager__n { margin-left: auto; display: flex; align-items: center; gap: var(--s-1); }


/* ==========================================================================
   6 · STATUS
   Colour is never the only signal — every status carries a label, and the
   semantic ones carry an icon too (v2 §46).
   ========================================================================== */

.v-badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 20px; padding: 0 7px; border-radius: var(--r-chip);
  font-size: var(--t-micro-s); font-weight: 600; letter-spacing: .02em;
  border: 1px solid transparent; white-space: nowrap;
}
.v-badge--neutral { background: var(--surface-subtle); border-color: var(--border); color: var(--text-secondary); }
.v-badge--ok      { background: var(--ok-bg);  border-color: var(--ok-bd);  color: var(--ok-tx); }
.v-badge--warn    { background: var(--wn-bg);  border-color: var(--wn-bd);  color: var(--wn-tx); }
.v-badge--danger  { background: var(--dn-bg);  border-color: var(--dn-bd);  color: var(--dn-tx); }
.v-badge--info    { background: var(--in-bg);  border-color: var(--in-bd);  color: var(--in-tx); }
.v-badge--brand   { background: var(--brand-soft); border-color: var(--brand-soft-bd); color: var(--brand); }
.v-badge--ai      { background: var(--ai-bg);  border-color: var(--ai-bd);  color: var(--ai-tx); }

.v-dot { width: 7px; height: 7px; border-radius: var(--r-full); flex: none; }
.v-dot--ok { background: var(--ok-ic); } .v-dot--warn { background: var(--wn-ic); }
.v-dot--danger { background: var(--dn-ic); } .v-dot--muted { background: var(--text-faint); }

/* A badge that is also a control — inline record editing */
.v-selectchip {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 7px;
  white-space: nowrap; max-width: 100%;   /* a chip never wraps */
  border: 1px solid var(--border); border-radius: var(--r-chip); background: var(--surface);
  font-size: var(--t-meta-s); font-weight: 500; color: var(--text-secondary); cursor: pointer;
}
.v-selectchip:hover, .v-selectchip.is-hover { background: var(--surface-subtle); border-color: var(--border-strong); }
button.v-selectchip { font-family: inherit; line-height: 1; }   /* a chip that opens a menu */
.v-selectchip.is-active {
  background: var(--brand-50); border-color: var(--brand);
  color: var(--brand); font-weight: 600;
}
.v-selectchip.is-active:hover { background: var(--brand-100); }
.v-selectchip.is-active svg { color: var(--brand); }
.v-selectchip svg { color: var(--text-faint); }

.v-legend { display: flex; gap: var(--s-4); flex-wrap: wrap; font-size: var(--t-meta-s); color: var(--text-muted); }
.v-legend span { display: inline-flex; align-items: center; gap: 6px; }


/* ==========================================================================
   7 · DATA DISPLAY
   ========================================================================== */

.v-avatar {
  width: 32px; height: 32px; border-radius: var(--r-md); flex: none;
  display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand);
  font-size: var(--t-meta-s); font-weight: 600;
}
.v-avatar--sm { width: 24px; height: 24px; font-size: var(--t-micro-s); border-radius: var(--r-sm); }
.v-avatar--lg { width: 40px; height: 40px; font-size: var(--t-small-s); }
.v-avatar--xl { width: 56px; height: 56px; font-size: var(--t-card-s); border-radius: var(--r-lg); }
.v-avatar--ai { background: var(--ai-bg); color: var(--ai-ic); border: 1px solid var(--ai-bd); }

/* Stat tile. Selectable — acts as a filter on index screens. */
.v-stat {
  flex: 1; min-width: 0; padding: var(--s-4);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-tile);
  display: flex; flex-direction: column; gap: 6px; cursor: pointer; text-align: left;
  transition: border-color var(--m-hover) var(--ease), box-shadow var(--m-hover) var(--ease);
}
.v-stat:hover, .v-stat.is-hover { border-color: var(--border-strong); box-shadow: var(--e1); }
.v-stat.is-selected { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.v-stat.is-attn { border-color: var(--dn-bd); background: var(--dn-bg); }
.v-stat__ic { width: 24px; height: 24px; border-radius: var(--r-sm); display: grid; place-items: center; background: var(--surface-subtle); color: var(--text-muted); }
.v-stat.is-attn .v-stat__ic { background: var(--dn-bg); color: var(--dn-ic); border: 1px solid var(--dn-bd); }
.v-stat__n { font-family: var(--num); font-size: var(--t-figure-s); line-height: var(--t-figure-l); font-weight: 600; letter-spacing: -.02em; }
.v-stat__cap { font-size: var(--t-meta-s); color: var(--text-muted); }
.v-stats { display: flex; gap: var(--s-3); flex-wrap: wrap; }
/* A tile never squeezes below the width of the number it exists to show. */
.v-stat { flex: 1 1 158px; }

.v-delta { display: inline-flex; align-items: center; gap: 3px; font-size: var(--t-meta-s); font-weight: 500; }
.v-delta--up { color: var(--ok-tx); } .v-delta--down { color: var(--dn-tx); }

/* Table. Dense, strongly aligned, minimal borders (v2 §22). */
.v-table { font-size: var(--t-small-s); }
.v-table th {
  text-align: left; padding: var(--s-2) var(--s-3);
  font-size: var(--t-micro-s); font-weight: 600; letter-spacing: var(--label-tracking);
  text-transform: uppercase; color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  /* A header that cannot wrap sets a floor on the table's width, which is
     what made an 11-column table overrun its card and clip a column. It wraps
     between words only: "anywhere" split CUSTOMER into CUSTO / MER, and the
     card now scrolls a table that is still too wide. */
  white-space: normal; overflow-wrap: break-word;
}
.v-table td { padding: var(--s-3); border-bottom: 1px solid var(--border); vertical-align: top; }
.v-table tbody tr:hover, .v-table tbody tr.is-hover { background: var(--surface-subtle); }
.v-table tbody tr.is-selected { background: var(--brand-soft); }
.v-table tbody tr.is-selected td:first-child { box-shadow: inset 2px 0 0 var(--brand); }
.v-table__num { font-family: var(--num); text-align: right; }
/* `.v-table th` is more specific than `.v-table__num`, so a numeric column
   header left-aligned over right-aligned cells until this was added. */
.v-table th.v-table__num { text-align: right; }

/* MONEY IS NEVER MONO.
   A monospace comma occupies a full character cell, so "₹8,69,500" renders as
   "₹8 , 69 , 500" — and Indian grouping ("₹1,10,400") makes it worse. Three
   separate components set mono on their numeric slot (.v-stat__n, .v-table__num,
   .v-kv dd), so this is one utility rather than a modifier on each: put `.amount`
   on anything carrying a currency symbol, wherever it sits. The UI face already
   carries tabular-nums, which is the only alignment a money column needs. */
.amount,
.v-kv dd.amount,
td.v-table__num.amount { font-family: var(--ui); }

/* The utility swaps the FACE and nothing else. It used to carry 22px/28px in the
   same rule, which meant every `.amount` on the site rendered at 22px whatever it
   was paired with: money in a table cell, in `.t-meta`, and in a `.t-display`
   figure that got silently shrunk. The one place the swap genuinely needs a size
   with it is the stat number — the UI face runs wider than the mono face, so 26px
   of "₹1,13,044" overflows the card — and that belongs on the component. */
.v-stat__n.amount { font-size: 22px; line-height: 28px; }

.v-identity__name { font-weight: 600; }
.v-identity__ref { font-family: var(--num); font-size: var(--t-meta-s); color: var(--text-muted); }
.v-identity__line { font-size: var(--t-meta-s); color: var(--text-muted); }

.v-attrs { display: flex; flex-direction: column; gap: 3px; }
.v-attrs__row { display: flex; align-items: center; gap: 6px; font-size: var(--t-meta-s); color: var(--text-secondary); }
.v-attrs__row svg { color: var(--text-faint); flex: none; }

.v-kv { display: grid; grid-template-columns: auto 1fr; gap: var(--s-2) var(--s-4); font-size: var(--t-small-s); }
.v-kv dt { color: var(--text-muted); }
.v-kv dd { text-align: right; font-family: var(--num); }

/* Record card — the queue/list unit */
.v-record {
  position: relative; display: flex; gap: var(--s-4); padding: var(--s-4) var(--s-5);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-tile);
  overflow: hidden;
}
.v-record::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--border-strong); }
.v-record--danger::before { background: var(--dn-ic); }
.v-record--warn::before   { background: var(--wn-ic); }
.v-record--ok::before     { background: var(--ok-ic); }
.v-record__body { flex: 1; min-width: 0; }
.v-record__title { font-weight: 600; display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
.v-record__desc { margin-top: 3px; font-size: var(--t-small-s); color: var(--text-muted); }

.v-meter { height: 6px; border-radius: var(--r-full); background: var(--track); overflow: hidden; }
.v-meter__fill { display: block; height: 100%; border-radius: var(--r-full); background: var(--brand); }
/* `display:block` is load-bearing: height:100% is void on an inline box, so a
   <span class="v-meter__fill"> rendered as an empty track with no warning. */
.v-meter__fill--ok { background: var(--ok-ic); }
.v-meter__fill--warn { background: var(--wn-ic); }

.v-score { display: inline-grid; place-items: center; width: 44px; height: 44px; position: relative; }
.v-score__n { font-family: var(--num); font-size: var(--t-card-s); font-weight: 600; }

.v-ranked { display: flex; flex-direction: column; }
.v-ranked__row { display: flex; align-items: center; gap: var(--s-3); padding: 7px 0; border-top: 1px solid var(--border); font-size: var(--t-small-s); }
.v-ranked__row:first-child { border-top: 0; }
.v-ranked__n { margin-left: auto; font-family: var(--num); color: var(--text-secondary); }


/* ==========================================================================
   8 · FEEDBACK
   ========================================================================== */

/* Empty state must answer: what is empty, why, what do I do (v2 §40). */
.v-empty { text-align: center; padding: var(--s-12) var(--s-6); display: flex; flex-direction: column; align-items: center; gap: var(--s-3); }
.v-empty__ic { width: 40px; height: 40px; border-radius: var(--r-tile); display: grid; place-items: center; background: var(--surface-subtle); color: var(--text-faint); }
.v-empty__title { font-size: var(--t-lead-s); font-weight: 600; }
.v-empty__body { font-size: var(--t-small-s); color: var(--text-muted); max-width: 42ch; }

.v-callout {
  display: flex; gap: var(--s-3); padding: var(--s-3) var(--s-4);
  border: 1px solid var(--border); border-radius: var(--r-tile);
  background: var(--surface-subtle); font-size: var(--t-small-s);
}
.v-callout--ok     { background: var(--ok-bg); border-color: var(--ok-bd); color: var(--ok-tx); }
.v-callout--warn   { background: var(--wn-bg); border-color: var(--wn-bd); color: var(--wn-tx); }
.v-callout--danger { background: var(--dn-bg); border-color: var(--dn-bd); color: var(--dn-tx); }
.v-callout--info   { background: var(--in-bg); border-color: var(--in-bd); color: var(--in-tx); }
.v-callout--ai     { background: var(--ai-bg); border-color: var(--ai-bd); color: var(--ai-tx); }
.v-callout__ic { flex: none; margin-top: 1px; }
.v-callout__link { margin-left: auto; font-weight: 500; white-space: nowrap; }

/* Errors are specific and always offer the next action (v2 §42). */
.v-error { display: flex; gap: var(--s-3); padding: var(--s-4); border: 1px solid var(--dn-bd); border-radius: var(--r-tile); background: var(--dn-bg); }
.v-error__title { font-weight: 600; color: var(--dn-tx); }
.v-error__body { font-size: var(--t-small-s); color: var(--dn-tx); opacity: .85; margin-top: 2px; }

/* Skeleton — preserves the eventual layout rather than being a grey block */
.v-skel { background: var(--surface-muted); border-radius: var(--r-xs); position: relative; overflow: hidden; }
.v-skel::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, var(--shimmer), transparent);
  animation: v-shimmer 1.4s infinite;
}
@keyframes v-shimmer { 100% { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) {
  .v-skel::after, .v-btn.is-loading::after { animation: none; }
}
.v-skel--text { height: 11px; } .v-skel--title { height: 15px; width: 40%; }
.v-skel--line { height: 11px; width: 100%; } .v-skel--short { height: 11px; width: 60%; }
.v-skel--avatar { width: 32px; height: 32px; border-radius: var(--r-md); }

.v-savebar {
  display: inline-flex; align-items: center; gap: var(--s-3);
  padding: var(--s-2) var(--s-2) var(--s-2) var(--s-4);
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--r-full); box-shadow: var(--e2); font-size: var(--t-small-s);
}
.v-savebar__state { display: inline-flex; align-items: center; gap: 6px; color: var(--ok-tx); }
.v-savebar.is-dirty .v-savebar__state { color: var(--wn-tx); }


/* ==========================================================================
   9 · OVERLAY
   Drawers preserve context; modals are for confirmation and destructive
   actions (v2 §43).
   ========================================================================== */

.v-scrim { position: absolute; inset: 0; background: var(--scrim); }

.v-drawer {
  background: var(--surface); border-left: 1px solid var(--border);
  box-shadow: var(--e3); display: flex; flex-direction: column;
  width: 560px; max-width: 100%;
}
.v-drawer__head { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--border); }
.v-drawer__body { flex: 1; overflow-y: auto; padding: var(--s-5); }
.v-drawer__foot { padding: var(--s-3) var(--s-5); border-top: 1px solid var(--border); display: flex; gap: var(--s-2); }

.v-modal {
  background: var(--surface); border-radius: var(--r-card); box-shadow: var(--e3);
  width: 420px; max-width: 100%; padding: var(--s-5);
  display: flex; flex-direction: column; gap: var(--s-3);
}
.v-modal__title { font-size: var(--t-card-s); font-weight: 600; }
.v-modal__body { font-size: var(--t-small-s); color: var(--text-secondary); }
.v-modal__foot { display: flex; justify-content: flex-end; gap: var(--s-2); margin-top: var(--s-2); }
/* A modal that holds a short form — convert, book a follow-up, log a call. */
.v-modal--wide { width: 560px; }
.v-modal__sub { font-size: var(--t-small-s); color: var(--text-muted); margin-top: -6px; }

.v-footbar { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-5); border-top: 1px solid var(--border); background: var(--surface); }


/* ==========================================================================
   10 · CONVERSATION
   ========================================================================== */

.v-convitem { display: flex; gap: var(--s-3); padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--border); cursor: pointer; }
.v-convitem:hover, .v-convitem.is-hover { background: var(--surface-subtle); }
.v-convitem.is-active { background: var(--brand-soft); box-shadow: inset 2px 0 0 var(--brand); }
.v-convitem__top { display: flex; align-items: baseline; gap: var(--s-2); }
.v-convitem__name { font-weight: 600; font-size: var(--t-small-s); }
.v-convitem__time { margin-left: auto; font-size: var(--t-meta-s); color: var(--text-muted); }
.v-convitem__snip { font-size: var(--t-meta-s); color: var(--text-muted); margin-top: 2px; }
.v-convitem__unread { min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--r-full); background: var(--brand); color: var(--brand-on); font-size: var(--t-micro-s); font-weight: 600; display: grid; place-items: center; }

.v-msg { max-width: 68%; }
.v-msg__bubble { padding: var(--s-3) var(--s-4); border-radius: var(--r-tile); font-size: var(--t-small-s); }
.v-msg--in  .v-msg__bubble { background: var(--surface-subtle); border: 1px solid var(--border); border-bottom-left-radius: var(--r-xs); }
.v-msg--out { margin-left: auto; }
.v-msg--out .v-msg__bubble { background: var(--brand); color: var(--brand-on); border-bottom-right-radius: var(--r-xs); }
.v-msg__meta { margin-top: 5px; font-size: var(--t-meta-s); color: var(--text-muted); display: flex; align-items: center; gap: 5px; }
.v-msg--out .v-msg__meta { justify-content: flex-end; }

.v-composer { display: flex; gap: var(--s-2); padding: var(--s-3) var(--s-4); border-top: 1px solid var(--border); background: var(--surface); }


/* ==========================================================================
   10b · CHARTS
   Hand-authored inline SVG. No library, no runtime, one series colour.

   Every chart carries four slots and is not finished without all four:
     .label   context eyebrow    (Volume · Autonomy · Conversion · Sources)
     h3       plain-language title
     .v-card__desc  timeframe or denominator
     takeaway one bolded conclusion + one explaining sentence

   And a role="img" with an aria-label that states the data as a sentence —
   an SVG of a line is nothing at all to a screen reader.
   ========================================================================== */

.g-grid   { stroke: var(--chart-grid); stroke-width: 1; }
.g-axis   { font-family: var(--num); font-size: 11px; fill: var(--text-muted); }
.g-name   { font-size: 12px; font-weight: 500; fill: var(--text-secondary); }
.g-val    { font-family: var(--num); font-size: 12px; font-weight: 600; fill: var(--text-primary); }
.g-line   { fill: none; stroke: var(--chart-1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.g-area   { fill: var(--chart-fill); stroke: none; }
.g-dot    { fill: var(--chart-1); stroke: var(--surface); stroke-width: 2; }
.g-bar    { fill: var(--chart-1); rx: 4; }
.g-target { stroke: var(--border-strong); stroke-width: 1; stroke-dasharray: 3 3; }

/* A sparkline is the same line with no furniture. */
.g-spark  { fill: none; stroke: var(--chart-1); stroke-width: 1.5; stroke-linejoin: round; }


/* ==========================================================================
   11 · SIGNATURE PATTERNS
   These are the product language — more recognisable than the palette
   (v2 §57). Every one is built from the components above.
   ========================================================================== */

/* The AI system layer container, shared by the intelligence patterns */
.v-ai {
  background: var(--ai-bg); border: 1px solid var(--ai-bd);
  border-radius: var(--r-tile); padding: var(--s-4);
}
.v-ai__label { display: flex; align-items: center; gap: 7px; color: var(--ai-tx); margin-bottom: var(--s-2); }
.v-ai__mark {
  width: 18px; height: 18px; border-radius: var(--r-xs); flex: none;
  display: grid; place-items: center;
  background: var(--ai-ic); color: var(--ai-bg);
  font-size: 10px; font-weight: 600;
}

/* 1 · Veerha's Read — conclusion, evidence, attributes, provenance */
.v-read__conclusion { font-size: var(--t-lead-s); line-height: var(--t-lead-l); font-weight: 600; }
.v-read__evidence { font-size: var(--t-small-s); line-height: 19px; color: var(--ai-tx); margin-top: 5px; }
.v-read__attrs { margin-top: var(--s-3); font-size: var(--t-meta-s); color: var(--ai-tx); }
.v-read__based { margin-top: var(--s-2); padding-top: var(--s-2); border-top: 1px solid var(--ai-bd); font-size: var(--t-meta-s); color: var(--ai-ic); }

/* 2 · Recommended Next Step — action with a time, and why */
.v-next { background: var(--brand-soft); border: 1px solid var(--brand-soft-bd); border-radius: var(--r-tile); padding: var(--s-4); }
.v-next__label { color: var(--brand); margin-bottom: var(--s-2); display: flex; align-items: center; gap: 7px; }
.v-next__action { font-size: var(--t-lead-s); line-height: var(--t-lead-l); font-weight: 600; }
.v-next__why { font-size: var(--t-small-s); color: var(--text-secondary); margin-top: 4px; }
.v-next__acts { display: flex; gap: var(--s-2); margin-top: var(--s-3); }

/* 3 · Evidence — a claim/source ledger. Every row is clickable. */
.v-ev { width: 100%; font-size: var(--t-small-s); }
.v-ev th { text-align: left; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.v-ev td { padding: var(--s-2) 0; border-bottom: 1px solid var(--border); }
.v-ev__claim { display: flex; align-items: flex-start; gap: var(--s-2); }
.v-ev__glyph { flex: none; margin-top: 2px; }
.v-ev__glyph--ok { color: var(--ok-ic); }
.v-ev__glyph--gap { color: var(--wn-ic); }
.v-ev__source { text-align: right; color: var(--brand); white-space: nowrap; font-weight: 500; }

/* 4 · Veerha Is Working — a timeline, not decorative cards */
.v-working__row { display: flex; gap: var(--s-4); padding: var(--s-2) 0; border-top: 1px solid var(--border); font-size: var(--t-small-s); }
.v-working__row:first-child { border-top: 0; }
.v-working__time { font-family: var(--num); color: var(--text-muted); flex: none; width: 48px; }
.v-working__act { flex: 1; min-width: 0; }
.v-working__obj { color: var(--text-muted); text-align: right; white-space: nowrap; }

/* 5 · Waiting on You — the core relationship: AI autonomy + human judgment */
/* "20 decisions" is a phrase, not a column figure — mono would set the word
   in monospace too. Body already carries tabular-nums, which is all the
   numeral needs. */
.v-waiting__count { font-size: var(--t-page-s); line-height: var(--t-page-l); font-weight: 600; letter-spacing: -.018em; }
.v-waiting__row { display: flex; align-items: center; gap: var(--s-4); padding: var(--s-3) 0; border-top: 1px solid var(--border); }
.v-waiting__body { flex: 1; min-width: 0; }
.v-waiting__title { font-size: var(--t-small-s); font-weight: 500; }
.v-waiting__ctx { font-size: var(--t-meta-s); color: var(--text-muted); margin-top: 2px; }
.v-waiting__verb { color: var(--brand); font-size: var(--t-small-s); font-weight: 500; white-space: nowrap; }

/* 6 · AI Employee — a workforce member, not a bot */
.v-employee__top { display: flex; gap: var(--s-3); align-items: flex-start; }
.v-employee__role { font-size: var(--t-lead-s); font-weight: 600; }
.v-employee__state { display: flex; align-items: center; gap: 6px; font-size: var(--t-meta-s); color: var(--text-muted); margin-top: 2px; }
.v-employee__scope { font-size: var(--t-small-s); color: var(--text-muted); margin-top: var(--s-3); }
.v-employee__stats { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--border); border-radius: var(--r-md); margin-top: var(--s-4); overflow: hidden; }
.v-employee__stat { padding: var(--s-2) var(--s-3); border-right: 1px solid var(--border); }
.v-employee__stat:last-child { border-right: 0; }
.v-employee__stat b { font-family: var(--num); font-size: var(--t-card-s); font-weight: 600; display: block; }
.v-employee__stat span { font-size: var(--t-meta-s); color: var(--text-muted); }


/* --- TOAST ---------------------------------------------------------------
   Transient confirmation. Used where an action succeeds and there is nothing
   to navigate to -- a copy, a bulk action, a saved filter. It states what
   happened, never "Success". Four tones, matching the callout vocabulary. */
.v-toasts {
  position: fixed; left: 50%; bottom: var(--s-6); transform: translateX(-50%);
  z-index: var(--z-toast); display: flex; flex-direction: column; gap: var(--s-2);
  pointer-events: none; width: min(460px, calc(100vw - 32px));
}
.v-toast {
  display: flex; gap: var(--s-3); align-items: flex-start;
  background: var(--inverse-bg); color: var(--inverse-tx);
  border-radius: var(--r-tile); padding: var(--s-3) var(--s-4);
  font-size: var(--t-small-s); line-height: 19px; box-shadow: var(--e3);
  pointer-events: auto; opacity: 0; transform: translateY(8px);
  transition: opacity var(--m-hover) var(--ease), transform var(--m-hover) var(--ease);
}
.v-toast.is-in { opacity: 1; transform: translateY(0); }
.v-toast.is-leaving { opacity: 0; transform: translateY(6px); }
.v-toast__ic { flex: none; margin-top: 1px; }
.v-toast b { font-weight: 600; display: block; }
.v-toast span { color: var(--border-strong); }
.v-toast--ok   .v-toast__ic { color: var(--ok-ic); }
.v-toast--warn .v-toast__ic { color: var(--wn-ic); }
.v-toast--danger .v-toast__ic { color: var(--dn-ic); }
@media (prefers-reduced-motion: reduce) { .v-toast { transition: none; } }

/* --- BULK BAR ------------------------------------------------------------
   Appears when rows are selected, and only then. It answers the question a
   row checkbox raises and the live product never did: selected for what? */
.v-bulkbar {
  display: flex; align-items: center; gap: var(--s-3);
  background: var(--brand-soft); border: 1px solid var(--brand-200);
  border-radius: var(--r-tile); padding: var(--s-2) var(--s-4);
  margin-bottom: var(--s-3);
}
.v-bulkbar__n { font-weight: 600; color: var(--brand-700); }
.v-bulkbar[hidden] { display: none; }

/* --- SORTABLE COLUMN ------------------------------------------------------ */
.v-table th.is-sortable { cursor: pointer; user-select: none; }
.v-table th.is-sortable:hover { color: var(--text-secondary); }
.v-table th.is-sortable:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.v-table tr[tabindex]:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.v-table th.is-sortable::after {
  content: ""; display: inline-block; width: 0; height: 0; margin-left: 5px;
  vertical-align: middle; opacity: 0;
  border-left: 3.5px solid transparent; border-right: 3.5px solid transparent;
  border-bottom: 4px solid currentColor;
}
.v-table th[aria-sort]::after { opacity: 1; }
.v-table th[aria-sort="descending"]::after {
  border-bottom: 0; border-top: 4px solid currentColor;
}
.v-table tr.is-selected > td { background: var(--brand-50); }


/* --- SIDEBAR: GROUPS, COUNTS, ACCOUNT ------------------------------------
   The rail ships EXPANDED by default. Sixteen unlabelled icons is not
   navigation -- you cannot tell what any of them are without hovering, and the
   collapsed rail is the exception you reach for when you want the room back.

   Everything here is written so the collapsed state degrades cleanly: group
   headers and counts fold to nothing, the account card becomes its avatar. */

.v-rail__group {
  font-size: var(--t-micro-s); font-weight: 600; letter-spacing: var(--label-tracking);
  text-transform: uppercase; color: var(--text-muted);
  padding: var(--s-4) var(--s-3) var(--s-2);
  white-space: nowrap; overflow: hidden;
  height: 0; opacity: 0; padding-top: 0; padding-bottom: 0;   /* collapsed: gone */
  transition: opacity var(--m-hover) var(--ease);
}
.v-rail.is-expanded .v-rail__group { height: auto; opacity: 1; padding: var(--s-4) var(--s-3) var(--s-2); }
.v-rail.is-expanded .v-rail__group:first-of-type { padding-top: var(--s-2); }

/* A count is the reason to look at a nav item. Collapsed, it degrades to the
   existing .v-navdot so the signal survives without the number. */
.v-rail__count {
  margin-left: auto; flex: none;
  font-family: var(--num); font-size: 11px; line-height: 16px; font-weight: 500;
  min-width: 18px; text-align: center; padding: 0 5px; border-radius: var(--r-full);
  background: var(--surface-subtle); color: var(--text-muted);
  opacity: 0; width: 0; padding: 0; overflow: hidden;
  transition: opacity var(--m-hover) var(--ease);
}
.v-rail.is-expanded .v-rail__count { opacity: 1; width: auto; padding: 0 5px; }
.v-rail__item.is-active .v-rail__count { background: var(--brand); color: var(--brand-on); }
.v-rail__count--attn { background: var(--dn-bg); color: var(--dn-tx); }

.v-rail__acct {
  margin-top: auto; display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3); border-top: 1px solid var(--border);
  margin-left: calc(-1 * var(--s-3)); margin-right: calc(-1 * var(--s-3));
}
.v-rail:not(.is-expanded) .v-rail__acct { margin: auto 0 0; justify-content: center; border-top: 0; }
.v-rail__acct__who { min-width: 0; opacity: 0; width: 0; overflow: hidden; white-space: nowrap; }
.v-rail.is-expanded .v-rail__acct__who { opacity: 1; width: auto; }
.v-rail__acct__name { font-size: var(--t-small-s); font-weight: 600; }
.v-rail__acct__sub  { font-size: var(--t-meta-s); color: var(--text-muted); }

/* --- TOP BAR ICON BUTTON -------------------------------------------------
   Notifications and help. The count sits on the glyph, not beside it. */
.v-topbar__icon {
  position: relative; width: 32px; height: 32px; flex: none;
  display: grid; place-items: center; border: 0; background: none; cursor: pointer;
  border-radius: var(--r-sm); color: var(--text-muted);
}
.v-topbar__icon:hover { background: var(--surface-subtle); color: var(--text-secondary); }
.v-topbar__icon__n {
  position: absolute; top: 2px; right: 1px;
  font-family: var(--num); font-size: 9.5px; line-height: 14px; font-weight: 600;
  min-width: 14px; padding: 0 3px; border-radius: var(--r-full);
  background: var(--dn-ic); color: var(--on-solid); text-align: center;
}

/* --- FILTER CHIP ---------------------------------------------------------
   A labelled filter, so you can see what is being filtered without opening
   anything. Replaces a single unlabelled "Filters" button. */
.v-filterchip {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: var(--r-ctrl); background: var(--surface);
  font-size: var(--t-small-s); color: var(--text-secondary); cursor: pointer; white-space: nowrap;
}
.v-filterchip:hover { border-color: var(--border-strong); }
.v-filterchip.is-set { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-700); }
.v-filterchip__k { color: var(--text-muted); }
.v-filterchip.is-set .v-filterchip__k { color: var(--brand-700); }
.v-filterchip__v { font-weight: 500; }
.v-filterchip svg { color: var(--text-faint); flex: none; }
.v-filterchip.is-set svg { color: var(--brand); }

/* --- A SELECT INSIDE A TABLE CELL ----------------------------------------
   "Proposal sent" wrapped to two lines and collided with its own chevron. A
   control in a cell gets one line and truncates. */
.v-table .v-select {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  min-width: 0; max-width: 100%;
}

/* The keyboard hint inside the command search. Mono, because it is a key. */
.v-kbd {
  flex: none; font-size: 10.5px; line-height: 16px; padding: 1px 5px;
  border: 1px solid var(--border-strong); border-radius: var(--r-xs);
  background: var(--surface); color: var(--text-muted);
}
.vs-topbar__search { flex: 1; max-width: 420px; }
/* The hint sits INSIDE the field, at its right edge. Left in flow it wrapped
   under the input on every frame, which read as a broken top bar. */
.v-search .v-kbd { position: absolute; right: var(--s-2); top: 50%; transform: translateY(-50%); pointer-events: none; }
.v-search:has(.v-kbd) .v-input { padding-right: var(--s-10); }

/* A table wider than its card must SCROLL, not clip. The 11-column Touchpoints
   table overran its card by 83px at 1512 and 203px at 1280, so "Last touch"
   was simply not there -- and because the page itself did not overflow, no
   check caught it. Silent truncation is the worst failure a data table has. */
/* !important is deliberate and the only thing that works here: these cards
   carry an inline style="overflow:hidden", which no stylesheet rule can
   outrank. A card clipping a data column is never the intent. */
.v-card:has(> .v-table),
.v-card:has(> .v-rows > .v-table) { overflow-x: auto !important; }
/* Deliberately NOT min-width:max-content -- that forces every column to its
   natural width and pushes the last data columns out of view. */

/* Making wide tables scroll fixed the silent clipping but pushed the row-action
   column out of view -- the least discoverable control, hidden. So the last
   column pins to the right edge and the rest scrolls under it. It keeps the
   row's own background so a selected row stays tinted, and takes a hairline on
   its left so it reads as pinned rather than as part of the data. */
.v-card:has(> .v-table) > .v-table tr > *:last-child {
  position: sticky; right: 0; z-index: var(--z-raised);
  background: var(--surface); box-shadow: -1px 0 0 var(--border);
}
.v-card:has(> .v-table) > .v-table thead tr > *:last-child { background: var(--surface-subtle); }
.v-card:has(> .v-table) > .v-table tr.is-selected > *:last-child { background: var(--brand-50); }


/* --------------------------------------------------------------------------
   Upload target
   The guest check-in page asks for a government ID, and the only device in the
   room is a phone. So it is one large tap target, it names the formats, and it
   says what happens to the file -- people hand over an ID more readily when the
   page admits how long it keeps it.
   ========================================================================== */

.v-upload {
  border: 1.5px dashed var(--border-strong); border-radius: var(--r-md);
  background: var(--surface-subtle); padding: var(--s-5) var(--s-4);
  text-align: center; cursor: pointer;
  transition: border-color var(--m-hover) var(--ease), background var(--m-hover) var(--ease);
}
.v-upload:hover, .v-upload.is-hover { border-color: var(--brand); background: var(--brand-50); }
.v-upload.is-error { border-color: var(--dn-ic); background: var(--dn-bg); }
.v-upload__ico {
  width: 38px; height: 38px; margin: 0 auto var(--s-3);
  border-radius: var(--r-full); background: var(--surface);
  border: 1px solid var(--border); color: var(--text-muted);
  display: grid; place-items: center;
}
.v-upload:hover .v-upload__ico { color: var(--brand); border-color: var(--brand-200); }

/* ==========================================================================
   A12 — GUEST PAGES
   The tokenized pages a customer opens from a WhatsApp message. No app shell,
   no navigation, no account: a single column on a phone, brand-themed from
   Workspace -> Brand.

   Built from the three real captures. The live page's own shape is the spec:
   photo -> brand block -> stay summary -> detail cards -> optional input ->
   trust lines. The trust triple at the foot is the point of the archetype --
   a stranger needs to know what this link is before they touch it.
   ========================================================================== */

.v-guest {
  max-width: 440px; margin: 0 auto; background: var(--canvas); min-height: 100%;
  /* No bottom padding: the footer below is sticky, not fixed, so it already
     takes flow space at the end of the page. */
}
.v-guest__photo { position: relative; aspect-ratio: 16/10; background: var(--surface-muted); overflow: hidden; }
.v-guest__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* The brand block: who this link is from. Never Veerha's branding -- the guest
   has a relationship with the property, not with the platform. */
.v-guest__brand { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-6) var(--s-5) var(--s-4); }
.v-guest__mark {
  width: 42px; height: 42px; flex: none; border-radius: var(--r-tile);
  background: var(--brand); color: var(--brand-on);
  display: grid; place-items: center; font-weight: 600; font-size: var(--t-lead-s);
}
.v-guest__name { font-size: 20px; line-height: 26px; font-weight: 600; letter-spacing: -.018em; }
.v-guest__meta { font-size: var(--t-small-s); color: var(--text-secondary); margin-top: 2px; }
.v-guest__times { font-size: var(--t-meta-s); color: var(--text-muted); margin-top: 4px; }

.v-guest__card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card);
  margin: 0 var(--s-4) var(--s-4); overflow: hidden;
}
.v-guest__card__hd {
  display: flex; align-items: center; gap: var(--s-2);
  padding: var(--s-4) var(--s-4) var(--s-3); font-weight: 600; font-size: var(--t-card-s);
}
.v-guest__card__hd svg { color: var(--text-muted); flex: none; }
.v-guest__card__bd { padding: 0 var(--s-4) var(--s-4); }
.v-guest__card__bd > .rule { margin: var(--s-3) 0; }

/* check-in -> check-out -> nights, the one thing a guest looks for first */
.v-guest__span { display: grid; grid-template-columns: 1fr auto 1fr auto; gap: var(--s-3); align-items: end; }
.v-guest__span .label { display: block; margin-bottom: 2px; }
.v-guest__span__v { font-size: var(--t-small-s); font-weight: 600; }
.v-guest__span__arrow { color: var(--text-faint); padding-bottom: 2px; }

/* A sticky footer, because the action must be reachable without scrolling back. */
.v-guest__foot {
  position: sticky; bottom: 0; z-index: var(--z-overlay);
  background: var(--surface); border-top: 1px solid var(--border);
  padding: var(--s-4); display: flex; flex-direction: column; gap: var(--s-2);
}
.v-guest__foot .v-btn { width: 100%; }
.v-guest__foot__note { font-size: var(--t-meta-s); color: var(--text-muted); text-align: center; }

/* The trust triple. Quiet by design -- reassurance, not marketing. */
.v-guest__trust { padding: var(--s-5) var(--s-5) var(--s-8); display: flex; flex-direction: column; gap: var(--s-3); }
.v-guest__trust div { display: flex; gap: var(--s-3); align-items: flex-start; font-size: var(--t-meta-s); color: var(--text-muted); }
.v-guest__trust svg { flex: none; margin-top: 1px; color: var(--text-faint); }

.v-guest__addr { padding: var(--s-4) var(--s-5); border-top: 1px solid var(--border); }
.v-guest__addr div { display: flex; gap: var(--s-3); align-items: flex-start; font-size: var(--t-meta-s); color: var(--text-muted); margin-bottom: 6px; }

/* ==========================================================================
   12 · ACTIONS — labelled action, action menu, tooltip
   The live app hangs every lead action on an unlabelled icon (WhatsApp, Call,
   Email, Archive, Convert) and puts the meaning in a tooltip. An action that
   changes a record is named on its face here; an icon alone is for chrome.
   ========================================================================== */

/* An icon and a word, small enough to sit in a table row. */
.v-action {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: var(--r-ctrl); background: var(--surface);
  color: var(--text-secondary); font: inherit; font-size: var(--t-meta-s); font-weight: 500;
  white-space: nowrap; cursor: pointer;
  transition: background var(--m-hover) var(--ease), border-color var(--m-hover) var(--ease);
}
.v-action svg { flex: none; color: var(--text-muted); }
.v-action:hover, .v-action.is-hover { background: var(--surface-subtle); border-color: var(--border-strong); color: var(--text-primary); }
.v-action:focus-visible, .v-action.is-focus { outline: none; box-shadow: var(--focus); }
.v-action--brand { color: var(--brand); border-color: var(--brand-200); background: var(--brand-soft); }
.v-action--brand svg { color: var(--brand); }
.v-action--brand:hover, .v-action--brand.is-hover { background: var(--brand-50); border-color: var(--brand); color: var(--brand-700); }
.v-action--quiet { border-color: transparent; background: transparent; }
.v-action--quiet:hover, .v-action--quiet.is-hover { background: var(--surface-subtle); border-color: transparent; }
.v-actions-row { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }

/* The ··· menu: every item a verb, the destructive ones last and set apart. */
.v-menu-host { position: relative; display: inline-flex; }
.v-menu {
  position: absolute; top: calc(100% + 4px); right: 0; z-index: var(--z-menu); min-width: 232px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-tile);
  box-shadow: var(--e2); padding: var(--s-1); display: flex; flex-direction: column; text-align: left;
}
.v-menu[hidden] { display: none; }
.v-menu--left { right: auto; left: 0; }
.v-menu__label { padding: 6px 10px 2px; font-size: var(--t-micro-s); font-weight: 600; letter-spacing: .075em;
  text-transform: uppercase; color: var(--text-muted); }
.v-menu__item {
  display: flex; align-items: center; gap: var(--s-3); width: 100%; padding: 7px 10px;
  border: 0; border-radius: var(--r-sm); background: none; font: inherit; font-size: var(--t-small-s);
  color: var(--text-secondary); text-align: left; cursor: pointer;
}
.v-menu__item svg { flex: none; color: var(--text-muted); }
.v-menu__item:hover, .v-menu__item.is-hover { background: var(--surface-subtle); color: var(--text-primary); }
.v-menu__item.is-active { color: var(--brand); font-weight: 500; }
.v-menu__item.is-active svg { color: var(--brand); }
.v-menu__hint { margin-left: auto; font-size: var(--t-meta-s); color: var(--text-muted); }
.v-menu__item--danger, .v-menu__item--danger svg { color: var(--dn-tx); }
.v-menu__item--danger:hover, .v-menu__item--danger.is-hover { background: var(--dn-bg); color: var(--dn-tx); }
.v-menu__sep { height: 1px; background: var(--border); margin: var(--s-1) 0; }

/* Tooltip — only for chrome that is genuinely icon-only. */
[data-tip] { position: relative; }
.v-tip, [data-tip]:hover::after, [data-tip]:focus-visible::after {
  padding: 4px 8px; border-radius: var(--r-sm); background: var(--inverse-bg); color: var(--inverse-tx);
  font-size: var(--t-meta-s); font-weight: 500; white-space: nowrap; pointer-events: none;
}
.v-tip { display: inline-block; }
[data-tip]:hover::after, [data-tip]:focus-visible::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); z-index: var(--z-tip);
}



/* --- NARROW SCREENS ------------------------------------------------------
   Components stay the same components on a phone; only what has to give
   gives. Breakpoint numbers: --bp-phone in tokens.css. */
/* --- TOUCH ---------------------------------------------------------------
   A finger needs --tap (44px) where a pointer needs 30. Controls keep their
   look and grow their box; things drawn small (a check, a switch, an inline
   link) keep their drawing and grow the area around it. */
@media (pointer: coarse), (max-width: 760px) {
  .v-btn, .v-btn--sm, .v-btn--lg { height: auto; min-height: var(--tap); }
  .v-btn--sm { padding: 0 var(--s-4); font-size: var(--t-small-s); }
  .v-btn--icon { width: var(--tap); }
  /* !important: compact filter selects carry an inline min-height:30px. */
  .v-input, .v-select { min-height: var(--tap) !important; }
  .v-tab, .v-pill, .v-selectchip, .v-filterchip, .v-action { min-height: var(--tap); }
  .v-seg__opt { min-height: calc(var(--tap) - 6px); }
  .v-check, .v-toggle { min-height: var(--tap); min-width: var(--tap); }
  .v-tab { min-width: var(--tap); justify-content: center; }
  :is(.v-link, .v-callout__link):not(.v-btn) { padding-block: 12px; margin-block: -12px; }
  .v-kbd { display: none; }
  .v-topbar__icon { width: 40px; height: 40px; }
  .v-ai__mark { font-size: var(--t-micro-s); width: 20px; height: 20px; }
  .v-rail__count { font-size: var(--t-micro-s); }
}

@media (max-width: 760px) {
  .v-topbar { padding: 0 var(--s-4); gap: var(--s-2); }
  .v-pagehead { flex-wrap: wrap; gap: var(--s-3); }
  .v-pagehead > .v-pagehead__copy { flex-basis: 100%; }
  .v-pagehead > .v-actions { width: 100%; flex-wrap: wrap; }
  .v-pagehead > .v-actions > .v-btn--primary { margin-left: auto; }
  .v-pagehead > .v-actions > .v-seg { flex: 0 1 auto; min-width: 0; }

  /* Stat tiles are a summary, not the page. As a wrapped grid six of them
     filled the first screen; as one row that scrolls they take a strip and
     the list they summarise starts above the fold. */
  .v-stats {
    flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x mandatory;
    scrollbar-width: none; padding: 2px; margin: -2px;
  }
  .v-stats::-webkit-scrollbar { display: none; }
  .v-stats > .v-stat { flex: 0 0 42%; scroll-snap-align: start; padding: var(--s-3); gap: var(--s-1); }
  .v-stats .v-stat svg:has(.g-spark), .v-stats .v-stat__ic { display: none; }
  .v-stats .v-stat__n { font-size: var(--t-section-s); line-height: var(--t-section-l); }
  .v-stat { padding: var(--s-3); }
  .v-modal, .v-modal--wide { max-width: 100%; }

  /* A modal on a phone is a sheet from the bottom edge: it can hold a form
     taller than the screen, its body scrolls, and its buttons stay pinned
     under the thumb instead of below the fold. Paired fields stack. */
  .v-modal {
    width: 100%; padding: var(--s-5) var(--s-4) 0;
    border-radius: var(--r-card) var(--r-card) 0 0;
  }
  .v-modal::before {
    content: ""; flex: none; align-self: center; width: 36px; height: 4px;
    margin: calc(-1 * var(--s-2)) 0 var(--s-1); border-radius: var(--r-full); background: var(--border-strong);
  }
  .v-modal .row:has(> .v-field) > .v-field { flex: 1 1 100%; }
  .v-modal .v-field > :is(.v-input, .v-select, .v-textarea) { width: 100%; }
  .v-modal__foot {
    position: sticky; bottom: 0; margin: var(--s-2) calc(-1 * var(--s-4)) 0;
    padding: var(--s-3) var(--s-4) calc(var(--s-3) + env(safe-area-inset-bottom));
    background: var(--surface); border-top: 1px solid var(--border);
  }
  .v-modal__foot > .v-btn { flex: 1 1 0; }
  .v-drawer { max-width: 100%; }
  /* A record's drawer head (avatar, name and chips, score, star, close) was
     one row: the name column got what the score and buttons left over and its
     contact line wrapped to four lines. On a phone the controls and the score
     take the first row and the identity gets the full width under them. */
  .v-drawer__head:has(> .v-avatar + .grow) {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center; column-gap: var(--s-2); row-gap: var(--s-3);
  }
  .v-drawer__head:has(> .v-avatar + .grow) > .v-avatar { grid-column: 1; grid-row: 1; }
  .v-drawer__head:has(> .v-avatar + .grow) > .grow { grid-column: 1 / -1; grid-row: 2; min-width: 0; }
  .v-drawer__head:has(> .v-avatar + .grow) > [style*="flex:none"] {
    grid-column: 2; grid-row: 1; justify-self: start; text-align: left !important;
    display: flex; align-items: baseline; gap: var(--s-2);
  }
  .v-drawer__head:has(> .v-avatar + .grow) > [style*="flex:none"] > [style*="line-height"] { line-height: 1 !important; }
  .v-drawer__head:has(> .v-avatar + .grow) > .v-btn:nth-last-child(2) { grid-column: 3; grid-row: 1; }
  .v-drawer__head:has(> .v-avatar + .grow) > .v-btn:last-child { grid-column: 4; grid-row: 1; }
  .v-card__head, .v-card__body, .v-card__foot { padding-left: var(--s-4); padding-right: var(--s-4); }
  .v-rows > * { padding-left: var(--s-4); padding-right: var(--s-4); }

  /* A row that holds a sentence and some controls. Desktop keeps them on one
     line; on a phone the controls are nowrap, so the sentence was squeezed to
     one word per line. Here the row wraps instead, and the sentence keeps a
     readable measure before anything gives -- the controls drop below it. */
  :is(.row, .spread, .v-card__head, .v-card__foot, .v-pager, .v-record, .v-callout, .v-error,
      .v-waiting__row, .v-working__row, .v-drawer__head, .v-drawer__foot, .v-footbar,
      .v-employee__top, .v-ranked__row, .v-next__acts, .v-savebar):not(td *) { flex-wrap: wrap; }
  :is(.row, .spread, .v-card__head, .v-card__foot, .v-record, .v-callout, .v-error,
      .v-waiting__row, .v-working__row, .v-drawer__head, .v-footbar, .v-employee__top):not(td *)
    > :is(.grow, [style*="flex:1"], .v-record__body, .v-waiting__body, .v-working__act):not(:empty) {
    flex: 1 1 0; min-width: min(14rem, 100%);
  }
  /* ...except a title between icon buttons (a month and its arrows): the
     buttons are small enough to stay on the title's line. */
  .v-card__head:not(:has(> :not(.grow, .v-btn--icon))) { flex-wrap: nowrap; }
  .v-card__head:not(:has(> :not(.grow, .v-btn--icon))) > .grow { min-width: 0; }
  /* The text beside a leading icon stays beside it. */
  :is(.v-callout, .v-error) > :not(svg, .v-callout__ic, .v-callout__link, button, .v-actions, .v-btn, [style*="flex:none"], :has(> svg:only-child)) {
    flex: 1 1 0; min-width: min(13rem, calc(100% - 32px));
  }
  .v-callout__link { margin-left: auto; }
  .v-drawer__foot > :is(span, p) { flex-basis: 100%; }
  .v-working__obj { white-space: normal; text-align: left; }
  .v-pager__n { margin-left: 0; }
  .v-bulkbar { padding-left: var(--s-4); padding-right: var(--s-3); }
  .v-bulkbar > .t-small { display: none; }
  .v-bulkbar__n { white-space: nowrap; }
  .v-msg { max-width: 86%; }
  .v-composer { flex-wrap: wrap; }

  /* One-line navigation scrolls sideways rather than wrapping into a block. */
  .v-tabs, .v-stepper {
    overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  .v-tabs::-webkit-scrollbar, .v-stepper::-webkit-scrollbar { display: none; }
  .v-tab, .v-stepper__step { flex: none; white-space: nowrap; }
  .v-stepper__bar { flex: 0 0 var(--s-4); }
  .v-seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .v-seg__opt { white-space: nowrap; flex: none; }

  /* Tables. A list of records (leads, orders, invoices) becomes a stack of
     cards: the record's name on top, its row actions beside it, and every
     other column as a "label  value" line. behaviour.js marks such tables
     .v-table--cards and stamps each cell with its column's name. A table
     that is a matrix -- read across and down, like permissions -- carries
     .v-table--keep and stays a table, scrolled sideways at a readable width
     with its action column pinned (above). */
  :has(> .v-table:not(.v-table--cards)) { overflow-x: auto; }
  .v-table:not(.v-table--cards):has(tr > :nth-child(3)) { min-width: 520px; }
  .v-table:not(.v-table--cards):has(tr > :nth-child(4)) { min-width: 620px; }
  .v-table:not(.v-table--cards):has(tr > :nth-child(6)) { min-width: 760px; }
  .v-table:not(.v-table--cards):has(tr > :nth-child(9)) { min-width: 960px; }

  .v-table--cards, .v-table--cards tbody { display: block; width: 100%; }
  .v-table--cards thead { display: none; }
  .v-table--cards tr {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
    column-gap: var(--s-3); row-gap: var(--s-2);
    padding: var(--s-4); border-bottom: 1px solid var(--border);
  }
  .v-table--cards tbody tr:last-child { border-bottom: 0; }
  .v-table--cards td { display: block; padding: 0; border: 0; grid-column: 2 / -1; min-width: 0; }
  .v-table--cards td.v-table__sel { grid-column: 1; grid-row: 1 / span 2; }
  .v-table--cards td.v-table__sel .v-check { align-items: flex-start; }
  .v-table--cards td.v-table__title { grid-column: 2; grid-row: 1; }
  .v-table--cards td.v-table__acts { grid-column: 3; grid-row: 1; align-self: start; }
  .v-table--cards td.v-table__acts > * { flex-wrap: nowrap; }
  .v-table--cards td[colspan] { grid-column: 1 / -1; }
  /* !important: number cells carry an inline text-align:right, which in a
     label-and-value list leaves money stranded at the far edge. */
  .v-table--cards td[data-label] { position: relative; padding-left: 7.5rem; text-align: left !important; }
  .v-table--cards td[data-label]::before {
    content: attr(data-label); position: absolute; left: 0; top: 0; width: 7rem;
    font-family: var(--ui); font-size: var(--t-meta-s); font-weight: 400; line-height: var(--t-body-l);
    color: var(--text-muted); text-align: left; text-transform: none; letter-spacing: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .v-table--cards td:not(.v-table__title):not([data-label]):empty, .v-table--cards td.v-table__sep { display: none; }
  .v-table--cards tbody tr.is-selected { box-shadow: inset 2px 0 0 var(--brand); }
  .v-table--cards tbody tr.is-selected td:first-child { box-shadow: none; }
  .v-card:has(> .v-table) > .v-table.v-table--cards tr > *:last-child {
    position: relative; background: none; box-shadow: none;
  }
  .v-card:has(> .v-table--cards) { overflow-x: visible !important; }

  /* Selecting rows on a phone: the bar sits where the thumb is. */
  .v-bulkbar {
    position: sticky; bottom: var(--s-3); z-index: var(--z-overlay);
    box-shadow: var(--e2);
  }

  .v-kv { gap: var(--s-2) var(--s-3); }
  .v-employee__stat { padding: var(--s-2); }
  .v-menu { min-width: min(232px, calc(100vw - 2 * var(--s-4))); }
}
