/* =====================================================================
   SureCritic Admin (Business/Partner Kit) — v0.7 (2026-11-12), file name sc-mock-kit.css
   v0.1 2026-11-07 base kit · v0.2 2026-11-09 Modern layer (opt-in .mk-modern) · v0.3 2026-11-09 Help pattern · v0.4 2026-11-09 Help walkthrough · v0.5 2026-11-09 help step examples · v0.6 2026-11-09 eight components promoted from mockups · v0.7 2026-11-12 dashboard tiles (copy of the real tile primitives)
   Full history: the Change log at the top of sc-mock-kit.html

   The ONE stylesheet for business- and partner-admin mockups.
   - Frame (header + sidebar) matches the real app on origin/development
     (customer_admin.scss: .customer-admin-header 60px white, .admin-sidebar 260px #035583).
   - Content components are the cleaned-up TARGET: Bootstrap 5 class names,
     real tokens from sc_style/_variables.scss, one type scale, one radius,
     two shadows, five status colors.
   - Rules for using it: MOCKUP-CONTRACT.md. Catalog: sc-mock-kit.html.
   - Nothing in a mockup may add a color, font size, radius, shadow or
     badge/chip type that isn't here. New component → add it here first.
   ===================================================================== */

:root {
  /* ---- Brand + neutrals (sc_style/_variables.scss, unchanged) ---- */
  --sc-light-blue: #CDE7F4;
  --sc-blue: #0787C9;          /* $primary — actions and links */
  --sc-med-blue: #035583;      /* sidebar, page title */
  --sc-dark-blue: #154266;     /* headings */
  --sc-black: #232329;         /* body text */
  --sc-dark-green: #4CA75A;    /* $success */
  --sc-very-dark-green: #1C772A;
  --sc-gold: #FFBE0C;          /* $warning */
  --sc-red: #D64040;           /* $danger */
  --sc-very-light-red: #F6D0D0;
  --white: #FFFFFF;
  --gray-100: #F6F6F7;         /* page background ($body-bg) */
  --gray-200: #E3E3E6;
  --gray-300: #dee2e6;
  --gray-400: #CFCFD4;
  --gray-600: #8A8A94;
  --gray-700: #676773;         /* $secondary */
  --gray-800: #40404C;

  /* ---- Roles (use these in components and page CSS) ---- */
  --text: var(--sc-black);
  --text-muted: var(--gray-700);
  --text-heading: var(--sc-dark-blue);
  --surface: var(--white);
  --page-bg: var(--gray-100);
  --border: var(--gray-400);
  --border-subtle: var(--gray-200);
  --action: var(--sc-blue);
  --action-hover: #0677b1;     /* darken($primary, 5%) as the app computes it */

  /* ---- Status: color means state, nothing else ----
     success = done/healthy · attention = needs you · danger = broken/blocked
     info = informational · neutral = off/inactive
     Tint and ink values are PROPOSED NEW TOKENS (tints of existing ones),
     needed so status text passes contrast on white. */
  --success: var(--sc-dark-green);   --success-bg: #E4F3E6;  --success-ink: var(--sc-very-dark-green);
  --attention: var(--sc-gold);       --attention-bg: #FFF4D1; --attention-ink: #6B4E00;
  --danger: var(--sc-red);           --danger-bg: #FBE7E7;   --danger-ink: #A62C2C;
  --info: var(--sc-blue);            --info-bg: #E6F3FA;     --info-ink: var(--sc-med-blue);
  --neutral: var(--gray-600);        --neutral-bg: var(--gray-200); --neutral-ink: var(--gray-800);

  /* ---- Type: Roboto 400/700 only (the weights the app loads) ---- */
  --font: "Roboto", Arial, sans-serif;
  --font-mono: Menlo, Consolas, monospace;   /* code, IDs, API keys only */
  --fs-xs: 0.75rem;    /* captions, badges, table meta */
  --fs-sm: 0.875rem;   /* secondary text, tables, form help */
  --fs-base: 1rem;     /* body */
  --fs-md: 1.125rem;   /* card titles */
  --fs-lg: 1.375rem;   /* section titles */
  --fs-xl: 1.75rem;    /* stat numbers */
  --fs-xxl: 2.5rem;    /* hero stat numbers */
  --lh: 1.45;

  /* ---- Space, radius, shadow ---- */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px;
  --radius: 3px;                       /* controls, cards, badges (the app's most-used value) */
  --radius-round: 999px;               /* filter chips, switches, avatars only */
  --shadow-card: 1px 1px 2px 1px var(--gray-400);   /* real .card / .kpi-box shadow */
  --shadow-raised: 0 6px 20px rgba(35, 35, 41, 0.18); /* menus, modals, offcanvas */

  /* ---- Frame ---- */
  --header-h: 60px;
  --sidebar-w: 260px;
  --mk-bar-h: 0px;                     /* set to 34px by .mk-has-bar */
}

/* ===================== Base ===================== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); font-size: var(--fs-base); line-height: var(--lh); color: var(--text); background: var(--page-bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 400; color: var(--text-heading); line-height: 1.2; }
p { margin: 0 0 var(--sp-3); }
a { color: var(--action); text-decoration: none; }
a:hover { color: var(--sc-dark-blue); text-decoration: underline; }
:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }
[hidden] { display: none !important; }   /* as Bootstrap's reboot does */
small, .small { font-size: var(--fs-sm); }
.text-muted { color: var(--text-muted) !important; }
.fw-bold { font-weight: 700 !important; }
.text-end { text-align: right; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.num { font-variant-numeric: tabular-nums; }
code, .code { font-family: var(--font-mono); font-size: 0.85em; }
.svg-inline--fa, .fa-solid, .fa-regular, .fa-brands { width: 1.1em; }

/* ===================== Frame: real header + sidebar ===================== */
.mk-has-bar { --mk-bar-h: 34px; }
.customer-admin-header { position: fixed; top: var(--mk-bar-h); left: 0; right: 0; height: var(--header-h); z-index: 900; display: flex; align-items: center; justify-content: space-between; background: var(--white); border-bottom: 1px solid var(--gray-400); padding-right: var(--sp-3); }
.customer-admin-header .header-menu-left { display: flex; align-items: center; }
.customer-admin-header .sidebar-toggle-button { width: 70px; text-align: center; font-size: 18px; color: var(--gray-700); cursor: pointer; }
.customer-admin-header .heading-image { height: 34px; width: auto; display: block; } /* app: image_tag 'sc_logo_2023.svg' — ship sc_logo_2023.svg next to the page */
.customer-admin-header .title { position: absolute; left: 50%; transform: translateX(-50%); font-size: 20px; color: var(--sc-med-blue); white-space: nowrap; }
.customer-admin-header .header-menu-right { display: flex; align-items: center; gap: var(--sp-3); font-size: var(--fs-sm); color: var(--gray-600); }
.customer-admin-header .account { color: var(--text); }
.customer-admin-header .avatar { width: 32px; height: 32px; }

.admin-sidebar { position: fixed; top: calc(var(--mk-bar-h) + var(--header-h)); bottom: 0; left: 0; width: var(--sidebar-w); background: var(--sc-med-blue); color: var(--gray-400); overflow-y: auto; z-index: 800; padding-bottom: var(--sp-4); }
.admin-sidebar a { color: inherit; text-decoration: none; }
.admin-sidebar .entity { padding: 15px; font-size: 14px; font-weight: 700; color: var(--gray-400); display: flex; justify-content: space-between; align-items: center; }
.admin-sidebar .nav-link { display: flex; align-items: center; gap: 6px; padding: 8px 10px 8px 13px; font-size: 18px; font-weight: 400; color: var(--gray-400); }
.admin-sidebar .nav-link i, .admin-sidebar .nav-link svg { width: 24px; text-align: center; font-size: 17px; }
.admin-sidebar .nav-link:hover { background: var(--sc-blue); color: var(--white); text-decoration: none; }
.admin-sidebar .nav-link.active { background: var(--sc-dark-blue); color: var(--white); }
.admin-sidebar .sub-nav-link { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px 6px 43px; font-size: 15px; color: var(--gray-400); }
.admin-sidebar .sub-nav-link:hover { background: var(--sc-blue); color: var(--white); text-decoration: none; }
.admin-sidebar .sub-nav-link.active { color: var(--white); background: var(--sc-dark-blue); }
.admin-sidebar .nav-count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 5px; font-size: 12px; font-weight: 700; line-height: 22px; text-align: center; color: var(--sc-med-blue); background: var(--white); border-radius: 2px; }
.admin-sidebar .navigation-links-divider { height: 6px; background: var(--sc-dark-blue); margin: var(--sp-2) 0; }

.responsive-body { margin-left: var(--sidebar-w); padding-top: calc(var(--mk-bar-h) + var(--header-h)); min-height: 100vh; }
.page { padding: var(--sp-5); max-width: 1280px; }
@media (max-width: 860px) {
  .admin-sidebar { display: none; }
  .responsive-body { margin-left: 0; }
  .customer-admin-header .title { font-size: 17px; }
  .page { padding: var(--sp-4); }
}
@media (max-width: 640px) {
  .customer-admin-header .header-menu-right > span:not(.avatar) { display: none; }   /* date + account name collide with the centred title on phones */
  .customer-admin-header .sidebar-toggle-button { width: 44px; }
}

/* ===================== Page anatomy ===================== */
/* Header title (above) → optional summary row → sections. No in-page H1. */
.page-summary { display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; margin-bottom: var(--sp-5); font-size: var(--fs-sm); color: var(--text-muted); }
.page-summary .page-actions { margin-left: auto; display: flex; gap: var(--sp-2); }
.page-back { display: inline-flex; align-items: center; gap: var(--sp-1); font-size: var(--fs-sm); margin-bottom: var(--sp-3); }
.section { margin-bottom: var(--sp-6); }
.section-header { display: flex; align-items: baseline; gap: var(--sp-3); margin-bottom: var(--sp-3); }
.section-title { font-size: var(--fs-lg); color: var(--text-heading); }
.section-header .section-meta { font-size: var(--fs-sm); color: var(--text-muted); }
.section-header .section-action { margin-left: auto; font-size: var(--fs-sm); }

/* ===================== Layout helpers ===================== */
.grid { display: grid; gap: var(--sp-4); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.d-flex { display: flex; } .flex-wrap { flex-wrap: wrap; } .align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; } .ms-auto { margin-left: auto; } .w-100 { width: 100%; }
.gap-1 { gap: var(--sp-1); } .gap-2 { gap: var(--sp-2); } .gap-3 { gap: var(--sp-3); } .gap-4 { gap: var(--sp-4); }
.mt-0 { margin-top: 0; } .mt-2 { margin-top: var(--sp-2); } .mt-3 { margin-top: var(--sp-3); } .mt-4 { margin-top: var(--sp-4); }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: var(--sp-2); } .mb-3 { margin-bottom: var(--sp-3); } .mb-4 { margin-bottom: var(--sp-4); }

/* ===================== Card ===================== */
.card { background: var(--surface); border: 1px solid var(--border-subtle); border-radius: var(--radius); box-shadow: var(--shadow-card); display: flex; flex-direction: column; min-width: 0; }
.card-body { padding: var(--sp-4); }
.card-header { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--border-subtle); }
.card-title { font-size: var(--fs-md); color: var(--text-heading); margin: 0; }
.card-text { font-size: var(--fs-sm); color: var(--text-muted); }
.card-footer { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-3) var(--sp-4); border-top: 1px solid var(--border-subtle); }
.card.attention { border-left: 4px solid var(--attention); }   /* the ONE card that needs the user */
.card.blank-state { background: none; box-shadow: none; border: 2px dashed var(--border); text-align: center; }

/* ===================== Stat tile ===================== */
/* Neutral by default. Only state changes the accent. */
.stat { padding: var(--sp-4); }
.stat-label { font-size: var(--fs-sm); color: var(--text-muted); }
.stat-value { font-size: var(--fs-xl); color: var(--text-heading); line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat-value.hero { font-size: var(--fs-xxl); }
.stat-unit { font-size: var(--fs-base); color: var(--text-muted); margin-left: var(--sp-1); }
.stat-delta { font-size: var(--fs-xs); font-weight: 700; }
.stat-delta.up { color: var(--success-ink); } .stat-delta.down { color: var(--danger-ink); }
.stat-desc { font-size: var(--fs-sm); color: var(--text); margin-top: var(--sp-1); }
/* Real dashboard KPI box (navy) — use only on Dashboard pages that already have it */
.kpi-box { background: var(--sc-med-blue); color: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: var(--sp-3) var(--sp-4); min-height: 100px; display: flex; flex-direction: column; justify-content: space-between; }
.kpi-box .kpi-value { font-size: var(--fs-xxl); line-height: 1; font-variant-numeric: tabular-nums; }
.kpi-box .kpi-label { font-size: var(--fs-sm); opacity: 0.85; }

/* ===================== Buttons (Bootstrap names, real sizes) ===================== */
/* One .btn-primary per card or screen. Destructive actions use .btn-danger. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2); padding: 8px 20px; font-family: var(--font); font-size: 0.9375rem; font-weight: 400; line-height: 1.4; border-radius: 2px; border: 1px solid transparent; background: none; color: var(--text); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { text-decoration: none; }
.btn:disabled, .btn.disabled { background: var(--gray-200); border-color: var(--gray-200); color: var(--gray-600); box-shadow: none; pointer-events: none; }
.btn-primary { color: var(--white); background: var(--action); border-color: var(--action); box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.3); }
.btn-primary:hover { color: var(--white); background: var(--action-hover); border-color: var(--action-hover); box-shadow: none; }
.btn-outline-primary { color: var(--action); border-color: var(--action); background: var(--white); }
.btn-outline-primary:hover { color: var(--white); background: var(--action); }
.btn-outline-secondary { color: var(--gray-800); border-color: var(--border); background: var(--white); }
.btn-outline-secondary:hover { color: var(--text); background: var(--gray-100); border-color: var(--gray-600); }
.btn-link { color: var(--action); padding-left: var(--sp-2); padding-right: var(--sp-2); }
.btn-link:hover { color: var(--sc-dark-blue); text-decoration: underline; }
.btn-danger { color: var(--white); background: var(--danger); border-color: var(--danger); }
.btn-danger:hover { color: var(--white); background: #c13838; border-color: #c13838; }
.btn-sm { padding: 4px 12px; font-size: var(--fs-sm); }
.btn-lg { padding: 10px 26px; font-size: var(--fs-md); }
.btn-group { display: inline-flex; }
.btn-group > .btn { border-radius: 0; }
.btn-group > .btn:first-child { border-radius: 2px 0 0 2px; }
.btn-group > .btn:last-child { border-radius: 0 2px 2px 0; }
.btn-group > .btn + .btn { margin-left: -1px; }
.btn-group > .btn.active { color: var(--white); background: var(--action); border-color: var(--action); position: relative; }

/* ===================== Badges: five statuses, nothing else ===================== */
.badge { display: inline-flex; align-items: center; gap: var(--sp-1); padding: 2px 8px; font-size: var(--fs-xs); font-weight: 700; line-height: 1.5; border-radius: var(--radius); white-space: nowrap; vertical-align: 1px; }
.badge.text-bg-success { background: var(--success-bg); color: var(--success-ink); }
.badge.text-bg-warning { background: var(--attention-bg); color: var(--attention-ink); }   /* attention = needs you */
.badge.text-bg-danger  { background: var(--danger-bg);  color: var(--danger-ink); }
.badge.text-bg-info    { background: var(--info-bg);    color: var(--info-ink); }
.badge.text-bg-secondary { background: var(--neutral-bg); color: var(--neutral-ink); }  /* neutral / off */
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: currentColor; }

/* ===================== Filter chip (the one chip) ===================== */
.chip { display: inline-flex; align-items: center; gap: var(--sp-1); padding: 4px 12px; font-size: var(--fs-sm); color: var(--gray-800); background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-round); cursor: pointer; }
.chip:hover { border-color: var(--gray-600); }
.chip.active { color: var(--white); background: var(--sc-med-blue); border-color: var(--sc-med-blue); }

/* ===================== Notice: the one inline exception line ===================== */
/* Use only when something is not normal. Healthy = no notice. */
.notice { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-2) var(--sp-3); border-radius: var(--radius); font-size: var(--fs-sm); margin-bottom: var(--sp-4); }
.notice .notice-action { margin-left: auto; font-weight: 700; }
.notice-danger { background: var(--danger-bg); color: var(--danger-ink); }
.notice-warning { background: var(--attention-bg); color: var(--attention-ink); }
.notice-info { background: var(--info-bg); color: var(--info-ink); }
.notice a { color: inherit; text-decoration: underline; }

/* ===================== Forms ===================== */
.form-label { display: block; font-size: var(--fs-sm); font-weight: 700; color: var(--gray-800); margin-bottom: var(--sp-1); }
.form-text { font-size: var(--fs-xs); color: var(--text-muted); margin-top: var(--sp-1); }
.form-control, .form-select { width: 100%; padding: 7px 10px; font-family: var(--font); font-size: var(--fs-base); color: var(--text); background: var(--white); border: 1px solid var(--border); border-radius: 2px; }
.form-control:focus, .form-select:focus { outline: none; border-color: var(--action); box-shadow: 0 0 0 3px rgba(7, 135, 201, 0.2); }
textarea.form-control { min-height: 84px; resize: vertical; }
.form-check { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-base); }
.form-switch .form-check-input { appearance: none; width: 38px; height: 22px; margin: 0; border-radius: var(--radius-round); background: var(--gray-400); position: relative; cursor: pointer; transition: background 0.15s; flex-shrink: 0; }
.form-switch .form-check-input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--white); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); transition: left 0.15s; }
.form-switch .form-check-input:checked { background: var(--success); }
.form-switch .form-check-input:checked::after { left: 19px; }
.form-row { display: grid; grid-template-columns: 220px 1fr; gap: var(--sp-4); align-items: center; padding: var(--sp-3) 0; border-bottom: 1px solid var(--border-subtle); }
.form-row:last-child { border-bottom: none; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; gap: var(--sp-2); } }

/* ===================== Tables ===================== */
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); background: var(--surface); }
.table th { text-align: left; font-weight: 700; font-size: var(--fs-xs); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; padding: var(--sp-2) var(--sp-3); border-bottom: 2px solid var(--border-subtle); white-space: nowrap; }
.table td { padding: var(--sp-3); border-bottom: 1px solid var(--border-subtle); vertical-align: middle; }
.table tbody tr:hover { background: var(--gray-100); }
.table .num, .table .text-end { text-align: right; }
.table-scroll { overflow-x: auto; }

/* ===================== Tabs (underline) ===================== */
.nav-tabs { display: flex; gap: var(--sp-4); border-bottom: 1px solid var(--border); margin-bottom: var(--sp-4); overflow-x: auto; }
.nav-tabs .nav-link { padding: var(--sp-2) 0; font-size: var(--fs-base); color: var(--text-muted); border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.nav-tabs .nav-link:hover { color: var(--text); text-decoration: none; }
.nav-tabs .nav-link.active { color: var(--sc-med-blue); border-bottom-color: var(--sc-blue); }

/* ===================== List rows ===================== */
.list-group { background: var(--surface); border: 1px solid var(--border-subtle); border-radius: var(--radius); box-shadow: var(--shadow-card); }
.list-group-item { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--border-subtle); }
.list-group-item:last-child { border-bottom: none; }
.list-group-item .item-main { min-width: 0; flex: 1; }
.list-group-item .item-title { font-weight: 700; }
.list-group-item .item-meta { font-size: var(--fs-sm); color: var(--text-muted); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--sc-light-blue); color: var(--sc-med-blue); display: inline-flex; align-items: center; justify-content: center; font-size: var(--fs-sm); font-weight: 700; flex-shrink: 0; }

/* ===================== Empty state ===================== */
.empty-state { text-align: center; padding: var(--sp-6) var(--sp-4); }
.empty-state .empty-icon { font-size: 2rem; color: var(--sc-blue); margin-bottom: var(--sp-3); }
.empty-state h3 { font-size: var(--fs-md); margin-bottom: var(--sp-2); }
.empty-state p { color: var(--text-muted); max-width: 440px; margin: 0 auto var(--sp-4); font-size: var(--fs-sm); }

/* ===================== Offcanvas / modal shell ===================== */
.offcanvas { position: fixed; top: var(--mk-bar-h); right: 0; bottom: 0; width: min(480px, 100%); background: var(--surface); box-shadow: var(--shadow-raised); z-index: 1100; display: flex; flex-direction: column; }
.offcanvas-header { display: flex; align-items: center; justify-content: space-between; padding: var(--sp-4); border-bottom: 1px solid var(--border-subtle); }
.offcanvas-title { font-size: var(--fs-md); }
.offcanvas-body { padding: var(--sp-4); overflow-y: auto; flex: 1; }
.btn-close { background: none; border: 0; font-size: 1.25rem; color: var(--gray-700); cursor: pointer; }

.modal-backdrop { position: fixed; inset: 0; background: rgba(35, 35, 41, 0.45); z-index: 1090; }
.modal-dialog { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(640px, 94vw); max-height: 88vh; display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-raised); z-index: 1100; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: var(--sp-4); border-bottom: 1px solid var(--border-subtle); }
.modal-title { font-size: var(--fs-md); }
.modal-body { padding: var(--sp-4); overflow-y: auto; }
.modal-footer { display: flex; justify-content: flex-end; gap: var(--sp-2); padding: var(--sp-3) var(--sp-4); border-top: 1px solid var(--border-subtle); }

/* ===================== Progress (budgets, fill targets, funnels) ===================== */
.progress { height: 8px; background: var(--gray-200); border-radius: var(--radius-round); overflow: hidden; }
.progress-bar { height: 100%; background: var(--action); border-radius: var(--radius-round); }
.progress-bar.bg-success { background: var(--success); }
.progress-bar.bg-warning { background: var(--attention); }
.progress-bar.bg-danger { background: var(--danger); }
.progress-label { display: flex; justify-content: space-between; font-size: var(--fs-sm); color: var(--text-muted); margin-bottom: var(--sp-1); }
.progress-label b { color: var(--text); font-variant-numeric: tabular-nums; }

/* ===================== Tooltip ===================== */
/* Tooltip bg = $sc-dark-blue, as in _variables.scss. Usage: data-tip="…" */
[data-tip] { position: relative; }
[data-tip]::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); width: 220px; padding: var(--sp-2) var(--sp-3); background: var(--sc-dark-blue); color: var(--white); font-size: var(--fs-xs); font-weight: 400; line-height: 1.45; text-transform: none; letter-spacing: 0; text-align: left; border-radius: var(--radius); box-shadow: var(--shadow-raised); opacity: 0; pointer-events: none; transition: opacity 0.15s; z-index: 1150; }
[data-tip]:hover::after, [data-tip]:focus-visible::after { opacity: 1; }

/* ===================== Conversation thread ===================== */
/* Agent (outbound) right, customer (inbound) left, agent tool steps centered. */
.thread { display: flex; flex-direction: column; gap: var(--sp-3); padding: var(--sp-4); background: var(--page-bg); }
.msg { max-width: 85%; }
.msg-bubble { padding: var(--sp-2) var(--sp-3); font-size: var(--fs-sm); line-height: 1.45; border: 1px solid var(--border-subtle); border-radius: var(--radius); background: var(--surface); white-space: pre-line; }
.msg-out { align-self: flex-end; }
.msg-out .msg-bubble { background: var(--info-bg); border-color: var(--sc-light-blue); }
.msg-meta { font-size: var(--fs-xs); color: var(--text-muted); margin-top: var(--sp-1); }
.msg-out .msg-meta { text-align: right; }
.msg-subject { display: block; font-weight: 700; color: var(--sc-med-blue); margin-bottom: var(--sp-1); }
.msg-system { align-self: center; display: inline-flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-xs); color: var(--text-muted); }
/* A draft waiting for approval = the attention state */
.draft { align-self: stretch; background: var(--attention-bg); border-left: 4px solid var(--attention); border-radius: var(--radius); padding: var(--sp-3); }
.draft-label { font-size: var(--fs-xs); font-weight: 700; color: var(--attention-ink); margin-bottom: var(--sp-1); }
.draft-body { font-size: var(--fs-sm); white-space: pre-line; }
.draft-actions { display: flex; gap: var(--sp-2); margin-top: var(--sp-3); flex-wrap: wrap; }
.composer { display: flex; gap: var(--sp-2); padding: var(--sp-3) var(--sp-4); border-top: 1px solid var(--border-subtle); background: var(--surface); }

/* ===================== List + detail (inbox) — added 2026-11-07 for Messages ===================== */
.split { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); background: var(--surface); border: 1px solid var(--border-subtle); border-radius: var(--radius); box-shadow: var(--shadow-card); min-height: 600px; overflow: hidden; }
.split.with-rail { grid-template-columns: minmax(260px, 340px) minmax(0, 1fr) 280px; }
.split-pane { min-width: 0; display: flex; flex-direction: column; border-right: 1px solid var(--border-subtle); }
.split-pane:last-child { border-right: 0; }
.split-pane-head { padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--border-subtle); display: flex; flex-direction: column; gap: var(--sp-2); }
.split-pane-body { flex: 1; overflow-y: auto; min-height: 0; }
.split .list-group { border: 0; box-shadow: none; border-radius: 0; }
.split .nav-tabs { margin-bottom: 0; }
@media (max-width: 1280px) { .split.with-rail { grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); } .split.with-rail > .split-rail { display: none; } }
@media (max-width: 860px) {
  .split, .split.with-rail { grid-template-columns: 1fr; }
  .split.show-detail > .split-list { display: none; }
  .split:not(.show-detail) > .split-detail { display: none; }
}
.list-group-item.selectable { cursor: pointer; align-items: flex-start; }
.list-group-item.selectable:hover { background: var(--gray-100); }
.list-group-item.active, .list-group-item.active:hover { background: var(--info-bg); }
.list-group-item .item-time { font-size: var(--fs-xs); color: var(--text-muted); white-space: nowrap; }
.list-group-item .item-preview { font-size: var(--fs-sm); color: var(--text-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.list-group-item .item-title { font-weight: 400; }
.list-group-item.unread .item-title { font-weight: 700; }
.list-group-item.unread .item-title::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--action); margin-right: var(--sp-1); vertical-align: 1px; }
.draft-sources { font-size: var(--fs-xs); color: var(--attention-ink); margin-top: var(--sp-2); }

/* ===================== Settings layout + section list — added 2026-11-07 for Agents → Settings ===================== */
.settings-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: var(--sp-5); align-items: start; }
.section-nav { position: sticky; top: calc(var(--mk-bar-h) + var(--header-h) + var(--sp-4)); display: flex; flex-direction: column; gap: 2px; }
.section-nav .section-nav-label { font-size: var(--fs-xs); font-weight: 700; color: var(--text-muted); padding: var(--sp-3) var(--sp-3) var(--sp-1); }
.section-nav .section-nav-label:first-child { padding-top: 0; }
.section-nav a { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-3); border-radius: var(--radius); color: var(--text); font-size: var(--fs-sm); }
.section-nav a:hover { background: var(--gray-200); text-decoration: none; color: var(--text); }
.section-nav a.active { background: var(--info-bg); color: var(--sc-med-blue); font-weight: 700; }
.section-nav a i, .section-nav a svg { width: 16px; color: var(--text-muted); }
.section-nav a.active i, .section-nav a.active svg { color: var(--sc-med-blue); }
.save-bar { position: sticky; bottom: 0; display: flex; justify-content: flex-end; align-items: center; gap: var(--sp-2); padding: var(--sp-3) 0; background: var(--page-bg); border-top: 1px solid var(--border-subtle); margin-top: var(--sp-4); }
@media (max-width: 860px) {
  .settings-layout { grid-template-columns: 1fr; gap: var(--sp-3); }
  .section-nav { position: static; flex-direction: row; overflow-x: auto; padding-bottom: var(--sp-2); }
  .section-nav a { white-space: nowrap; }
  .section-nav .section-nav-label { display: none; }
}

/* ===================== Help (added 2026-11-09) =====================
   Tooltip = one term. Hint = one first-visit nudge. Help popover = how the
   page works. Side panel = a longer walkthrough. Never a modal for help. */
.help-link { display: inline-flex; align-items: center; gap: var(--sp-1); font-size: var(--fs-sm); color: var(--action); background: none; border: 0; padding: 0; cursor: pointer; font-family: var(--font); }
.help-link:hover { text-decoration: underline; }
.help-anchor { position: relative; display: inline-block; }
.help-pop { position: absolute; top: calc(100% + var(--sp-2)); right: 0; z-index: 1000; width: 380px; max-width: calc(100vw - 32px); background: var(--surface); border: 1px solid var(--border-subtle); border-radius: var(--radius); box-shadow: var(--shadow-raised); text-align: left; font-size: var(--fs-sm); color: var(--text); }
.help-pop-head { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--border-subtle); }
.help-pop-head h3 { font-size: var(--fs-base); font-weight: 700; margin: 0; }
.help-pop-head .btn-close { margin-left: auto; font-size: var(--fs-base); }
.help-pop-body { padding: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-4); }
.help-lede { margin: 0; color: var(--text); }
.help-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-3); counter-reset: help; }
.help-steps li { display: grid; grid-template-columns: 22px 1fr; gap: var(--sp-2); counter-increment: help; }
.help-steps li::before { content: counter(help); width: 22px; height: 22px; border-radius: 50%; background: var(--brand-tint); color: var(--sc-med-blue); font-size: var(--fs-xs); font-weight: 700; display: flex; align-items: center; justify-content: center; }
.help-terms { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: var(--sp-1) var(--sp-3); }
.help-terms dt { font-weight: 700; }
.help-terms dd { margin: 0; color: var(--text-muted); }
.help-pop-foot { padding: var(--sp-3) var(--sp-4); border-top: 1px solid var(--border-subtle); display: flex; justify-content: space-between; align-items: center; }
@media (max-width: 640px) { .help-pop { position: fixed; top: auto; left: var(--sp-3); right: var(--sp-3); bottom: var(--sp-3); width: auto; max-width: none; max-height: 70vh; overflow-y: auto; } }
/* Steps that point at the page: clicking or hovering a step rings that region */
.help-steps li[data-target] { cursor: pointer; border-radius: var(--radius); margin: calc(-1 * var(--sp-1)); padding: var(--sp-1); }
.help-steps li[data-target]:hover, .help-steps li[data-target].on { background: var(--gray-100); }
.help-spot { outline: 3px solid var(--action); outline-offset: 4px; border-radius: var(--radius); animation: help-ring 1.4s ease-out 2; }
@keyframes help-ring { 0% { outline-color: rgba(7, 135, 201, 0.2); } 40% { outline-color: var(--action); } 100% { outline-color: var(--action); } }
@media (prefers-reduced-motion: reduce) { .help-spot { animation: none; } }
/* Walkthrough (v0.4, 2026-11-09): "Show me" in .help-pop-foot plays the steps in order.
   While it plays: .help-pop.playing pins top-right, body.help-playing makes room for it,
   the current step gets a filling .help-step-progress, done steps a check, and an optional
   .help-cursor glides to the control a step is about and taps it. Reduced motion: no pointer. */
.help-step-progress { display: none; margin-top: var(--sp-2); height: 4px; }
.help-pop.playing .help-steps li.on .help-step-progress, .help-pop.playing .help-steps li.done .help-step-progress { display: block; }
.help-steps li.on::before { background: var(--action); color: var(--white); transition: background 0.2s, color 0.2s; }
.help-steps li.done::before { content: "\2713"; background: var(--success-bg); color: var(--success-ink); }
.help-pop.playing { position: fixed; top: calc(var(--mk-bar-h) + var(--header-h) + var(--sp-3)); right: max(var(--sp-4), env(safe-area-inset-right, 0px)); max-height: calc(100vh - var(--mk-bar-h) - var(--header-h) - 2 * var(--sp-3)); overflow-y: auto; }
/* v0.5 (2026-11-09): a step can carry a small example (a switch, a sample message) that shows only while that step is on. */
.help-ex { display: none; margin-top: var(--sp-3); }
.help-steps li.on .help-ex { display: block; }
.help-pop-foot .help-play { padding-left: 0; }
.help-foot-note { font-size: var(--fs-xs); }
.page { transition: padding-right 0.3s; }
@media (min-width: 1101px) { body.help-playing .page { padding-right: calc(380px + var(--sp-5) + var(--sp-4)); } }
.help-cursor { position: fixed; top: 0; left: 0; z-index: 1150; pointer-events: none; color: var(--sc-dark-blue); font-size: var(--fs-lg); transition: transform 0.85s cubic-bezier(.4, 0, .2, 1); }
.help-cursor svg path { stroke: var(--white); stroke-width: 40px; paint-order: stroke; }
.help-cursor::after { content: ""; position: absolute; left: -10px; top: -10px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--action); opacity: 0; }
.help-cursor.tap::after { animation: help-tap 0.6s ease-out 2; }
@keyframes help-tap { from { transform: scale(0.4); opacity: 1; } to { transform: scale(1.8); opacity: 0; } }
.help-pressed { transform: scale(0.96); transition: transform 0.12s; }
@media (max-width: 640px) { .help-pop.playing { top: auto; bottom: var(--sp-3); left: var(--sp-3); right: var(--sp-3); max-height: 45vh; } }
@media (prefers-reduced-motion: reduce) { .help-cursor { display: none; } .help-pressed { transform: none; } .page { transition: none; } }
/* Inline first-visit hint: one line, on the thing it is about, dismissed once for good */
.hint { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-3); background: var(--brand-tint); color: var(--sc-med-blue); border-radius: var(--radius); font-size: var(--fs-sm); }
.hint > i, .hint > svg { flex-shrink: 0; }
.hint .hint-dismiss { margin-left: auto; background: none; border: 0; color: inherit; font: inherit; font-weight: 700; cursor: pointer; white-space: nowrap; }

/* =====================================================================
   MODERN LAYER (proposed v0.2, 2026-11-09) — opt in with <body class="mk-modern">
   Same rules (color = state, one primary, no annotations). Softer shape,
   more air, numbers up front. Without .mk-modern nothing below changes
   how a v0.1 mockup looks, except the 7 new components, which are new
   class names and so can't collide.
   ===================================================================== */
.mk-modern {
  --radius: 8px;                        /* cards, list groups, notices */
  --radius-control: 6px;                /* buttons, inputs, badges */
  --shadow-card: 0 1px 2px rgba(16, 24, 40, 0.05), 0 1px 3px rgba(16, 24, 40, 0.07);
  --shadow-hover: 0 4px 14px rgba(16, 24, 40, 0.10);
  --border-subtle: #E6E9EE;
  --page-bg: #F4F6F8;
}
/* Shape and air */
.mk-modern .card-body { padding: var(--sp-5); }
.mk-modern .card-header, .mk-modern .card-footer { padding: var(--sp-4) var(--sp-5); }
.mk-modern .btn, .mk-modern .form-control, .mk-modern .form-select { border-radius: var(--radius-control); }
.mk-modern .btn-primary { box-shadow: 0 1px 2px rgba(16, 24, 40, 0.12); }
.mk-modern .btn-group > .btn:first-child { border-radius: var(--radius-control) 0 0 var(--radius-control); }
.mk-modern .btn-group > .btn:last-child { border-radius: 0 var(--radius-control) var(--radius-control) 0; }
.mk-modern .badge { border-radius: var(--radius-round); padding: 2px 10px; }
.mk-modern .progress { height: 6px; }
.mk-modern .section-title { font-weight: 700; font-size: var(--fs-md); }
.mk-modern .form-row { border-bottom-color: var(--border-subtle); }

/* ---------- 1. Icon tile: a neutral brand tint, never a state ---------- */
:root { --brand-tint: #E8F1F7; }
.icon-tile { width: 40px; height: 40px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-control, 6px); background: var(--brand-tint); color: var(--sc-med-blue); font-size: var(--fs-md); }
.icon-tile.sm { width: 32px; height: 32px; font-size: var(--fs-base); }
.icon-tile.off { background: var(--gray-200); color: var(--gray-600); }

/* ---------- 2. Stat row: numbers inside a card ---------- */
.stat-row { display: flex; flex-wrap: wrap; gap: var(--sp-5); }
.stat-item { min-width: 72px; display: flex; flex-direction: column; }
.stat-item .stat-num { font-size: var(--fs-lg); font-weight: 700; color: var(--text-heading); line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-item .stat-cap { font-size: var(--fs-xs); color: var(--text-muted); margin-top: 2px; }
.stat-item .stat-num.earned { color: var(--success-ink); }   /* money that came in = done */
.stat-row.divided .stat-item + .stat-item { padding-left: var(--sp-5); border-left: 1px solid var(--border-subtle); }
.spark { display: block; width: 72px; height: 20px; margin-top: var(--sp-1); }
.spark polyline { fill: none; stroke: var(--action); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- 3. Segmented control (replaces .btn-group for a choice of 2–4) ---------- */
.segmented { display: inline-flex; padding: 3px; gap: 2px; background: var(--gray-200); border-radius: var(--radius-control, 6px); }
.segmented button { border: 0; background: none; font: inherit; font-size: var(--fs-sm); color: var(--gray-800); padding: 5px 14px; border-radius: calc(var(--radius-control, 6px) - 2px); cursor: pointer; white-space: nowrap; }
.segmented button:hover { color: var(--text); }
.segmented button.active { background: var(--surface); color: var(--text-heading); font-weight: 700; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.15); }
.segmented-help { font-size: var(--fs-sm); color: var(--text-muted); margin-top: var(--sp-2); }

/* ---------- 4. Sentence setting: the choice sits inside the sentence ---------- */
.sentence-setting { font-size: var(--fs-base); line-height: 2.2; color: var(--text); }
.sentence-setting .form-select { display: inline-block; width: auto; padding: 2px 28px 2px 10px; font-size: var(--fs-base); font-weight: 700; color: var(--action); background-color: var(--brand-tint); border-color: transparent; vertical-align: baseline; }
.sentence-setting .form-select:hover { border-color: var(--action); }
.sentence-setting + .sentence-setting { margin-top: var(--sp-1); }

/* ---------- 5. Live line: what the agent is doing right now (info state) ---------- */
.live-line { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); color: var(--info-ink); background: var(--info-bg); border-radius: var(--radius-control, 6px); padding: var(--sp-2) var(--sp-3); }
.live-line a { color: inherit; font-weight: 700; margin-left: auto; white-space: nowrap; }
.live-dot { position: relative; width: 8px; height: 8px; flex-shrink: 0; border-radius: 50%; background: var(--info); }
.live-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; background: var(--info); opacity: 0.35; animation: live-pulse 1.8s ease-out infinite; }
@keyframes live-pulse { from { transform: scale(0.6); opacity: 0.45; } to { transform: scale(1.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .live-dot::after { animation: none; } }

/* ---------- 6. Timeline: planned moments on a rail ---------- */
.timeline { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); gap: var(--sp-3); position: relative; padding-top: var(--sp-5); overflow-x: auto; }
.timeline::before { content: ""; position: absolute; top: 9px; left: 0; right: 0; height: 2px; background: var(--border-subtle); }
.timeline-item { position: relative; }
.timeline-item::before { content: ""; position: absolute; top: calc(-1 * var(--sp-5) + 4px); left: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--gray-400); }
.timeline-item.info::before { background: var(--info); border-color: var(--info); }
.timeline-item.attention::before { background: var(--attention); border-color: var(--attention); }
.timeline-item.done::before { background: var(--success); border-color: var(--success); }
.timeline-when { font-size: var(--fs-xs); font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.timeline-what { font-size: var(--fs-sm); font-weight: 700; color: var(--text); margin-top: 2px; }
.timeline-sub { font-size: var(--fs-xs); color: var(--text-muted); }
.timeline-item.empty .timeline-what { font-weight: 400; color: var(--text-muted); }

/* ---------- 7. Rich row: a card per item that opens in place ---------- */
.rich-list { display: flex; flex-direction: column; gap: var(--sp-3); }
.rich-row { background: var(--surface); border: 1px solid var(--border-subtle); border-radius: var(--radius); box-shadow: var(--shadow-card); transition: box-shadow 0.15s, border-color 0.15s; }
.rich-row:hover { box-shadow: var(--shadow-hover, var(--shadow-card)); border-color: var(--border); }
.rich-head { display: flex; align-items: center; gap: var(--sp-4); padding: var(--sp-4) var(--sp-5); cursor: pointer; }
.rich-main { flex: 1; min-width: 0; }
.rich-title { font-weight: 700; color: var(--text-heading); display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.rich-sub { display: block; font-size: var(--fs-sm); color: var(--text-muted); }
.rich-end { display: flex; align-items: center; gap: var(--sp-5); }
.rich-chev { color: var(--text-muted); transition: transform 0.15s; }
.rich-head[aria-expanded=true] .rich-chev { transform: rotate(180deg); }
.rich-body { padding: 0 var(--sp-5) var(--sp-5) calc(var(--sp-5) + 40px + var(--sp-4)); display: flex; flex-direction: column; gap: var(--sp-4); }
.rich-row.off .rich-title { color: var(--text-muted); }
.rich-rank { width: 20px; text-align: center; font-weight: 700; color: var(--text-muted); font-variant-numeric: tabular-nums; }
@media (max-width: 860px) {
  .rich-end .stat-row { display: none; }
  .rich-head { padding: var(--sp-3) var(--sp-4); gap: var(--sp-3); }
  .rich-body { padding: 0 var(--sp-4) var(--sp-4); }
}

/* =====================================================================
   MOCKUP-ONLY LAYER (never part of the product UI)
   ===================================================================== */
/* Mockup bar: sits ABOVE the app frame; add class mk-has-bar to <body>. */
.mk-bar { position: fixed; top: 0; left: 0; right: 0; height: 34px; z-index: 1200; display: flex; align-items: center; gap: var(--sp-2); padding: 0 var(--sp-3); background: #2b2b33; color: #e3e3e6; font-size: 12px; overflow-x: auto; }
.mk-bar .mk-name { font-weight: 700; margin-right: var(--sp-2); white-space: nowrap; }
.mk-bar button { background: none; border: 0; color: #cfcfd4; font: inherit; padding: 4px 10px; border-radius: 2px; cursor: pointer; white-space: nowrap; }
.mk-bar button.active { background: #4a4a55; color: #fff; }
.mk-bar .mk-right { margin-left: auto; display: flex; align-items: center; gap: var(--sp-2); white-space: nowrap; }
/* Annotations: hidden unless "Show notes" is on (body.mk-annotate). */
.mk-note { display: none; }
body.mk-annotate .mk-note { display: inline-block; font-size: 11px; font-weight: 700; line-height: 1.4; color: #5b2a86; background: #f3e8ff; border: 1px dashed #b07ad6; border-radius: 2px; padding: 0 5px; margin-left: var(--sp-1); vertical-align: 1px; }
body.mk-annotate .mk-note.block { display: block; margin: var(--sp-2) 0; padding: var(--sp-2); font-weight: 400; }

/* ===================== v0.6 (2026-11-09): promoted from mockups, approved by Tim ===================== */
/* Wide modal: Bootstrap's name. For a dialog with a table or a multi-step task (e.g. an importer). */
.modal-dialog.modal-lg { width: min(780px, 94vw); }

/* Expandable table row: a row that opens a detail row under it. JS toggles aria-expanded and the detail row's hidden. */
.row-expand { cursor: pointer; }
.row-chev { color: var(--text-muted); width: var(--sp-4); display: inline-block; transition: transform 0.15s; }
.row-expand[aria-expanded=true] .row-chev { transform: rotate(90deg); }
.row-expand[aria-expanded=true] > td { background: var(--info-bg); }
.row-detail > td { background: var(--page-bg); padding: var(--sp-4); white-space: normal; }
.row-detail:hover { background: none; }

/* Usage meter: a .progress with a threshold mark and a scale under it. Set --mark (default 80%). */
.meter { position: relative; margin: var(--sp-3) 0 var(--sp-1); }
.meter-mark { position: absolute; left: var(--mark, 80%); top: calc(-1 * var(--sp-1)); bottom: calc(-1 * var(--sp-1)); width: 2px; background: var(--gray-600); border-radius: var(--radius-round); }
.meter-scale { position: relative; height: 1.5em; font-size: var(--fs-xs); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.meter-scale span { position: absolute; top: 0; white-space: nowrap; }
.meter-scale .at-start { left: 0; }
.meter-scale .at-mark { left: var(--mark, 80%); transform: translateX(-50%); }
.meter-scale .at-end { right: 0; }

/* Step rail: the list of steps beside the current step (setup flows). Items: .done, .cur, .off (not in plan). */
.step-rail { flex: 0 0 220px; background: var(--page-bg); border-right: 1px solid var(--border-subtle); padding: var(--sp-4); }
.step-rail-title { font-size: var(--fs-sm); font-weight: 700; color: var(--text-muted); margin-bottom: var(--sp-2); }
.step-list { list-style: none; margin: 0; padding: 0; }
.step-item { display: flex; align-items: center; gap: var(--sp-2); padding: 6px 0; font-size: var(--fs-sm); color: var(--text-muted); }
.step-mark { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); display: inline-flex; align-items: center; justify-content: center; font-size: var(--fs-xs); font-weight: 700; color: var(--gray-600); background: var(--surface); flex: none; }
.step-mark.lg { width: 30px; height: 30px; font-size: var(--fs-sm); }
.step-item.done .step-mark, .step-mark.done { background: var(--success); border-color: var(--success); color: var(--white); }
.step-item.cur { color: var(--text); font-weight: 700; }
.step-item.cur .step-mark { border-color: var(--action); color: var(--action); }
.step-item.off { color: var(--gray-600); }
.step-item.off .step-mark { border-style: dashed; }
.step-rail-foot { font-size: var(--fs-xs); color: var(--text-muted); margin-top: var(--sp-3); }
@media (max-width: 640px) { .step-rail { flex: none; border-right: 0; border-bottom: 1px solid var(--border-subtle); } }

/* Code: a sample block with a Copy button, and inline code for keys and IDs. Developer content only. */
.code-block { position: relative; margin: 0 0 var(--sp-2); padding: var(--sp-3); padding-right: 84px; background: var(--gray-100); border: 1px solid var(--border-subtle); border-radius: var(--radius); font-family: var(--font-mono); font-size: var(--fs-xs); line-height: 1.5; color: var(--text); white-space: pre-wrap; word-break: break-all; }
.code-block .code-block-copy { position: absolute; top: var(--sp-1); right: var(--sp-1); font-family: var(--font); }
.code-inline { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--text); background: var(--gray-100); border: 1px solid var(--border-subtle); border-radius: var(--radius-control, var(--radius)); padding: 2px var(--sp-2); white-space: nowrap; }

/* Tone: a state color carried as --tone / --tone-ink, for things drawn in a state color (pins, dots, bands). */
.tone-success { --tone: var(--success); --tone-ink: var(--white); }
.tone-attention { --tone: var(--attention); --tone-ink: var(--attention-ink); }
.tone-danger { --tone: var(--danger); --tone-ink: var(--white); }
.tone-neutral { --tone: var(--neutral); --tone-ink: var(--white); }
/* Dot grid: a small N×N thumbnail of toned dots (default 7). <span class="dot-grid"><i class="tone-success"></i>…</span> */
.dot-grid { display: inline-grid; grid-template-columns: repeat(var(--cols, 7), 6px); gap: 2px; vertical-align: middle; }
.dot-grid i { width: 6px; height: 6px; border-radius: 50%; background: var(--tone, var(--gray-400)); }
/* Legend row for toned marks. */
.legend { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); font-size: var(--fs-xs); color: var(--text-muted); margin-top: var(--sp-3); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: var(--sp-1); vertical-align: -1px; background: var(--tone, var(--gray-400)); }

/* Chart annotations: numbered markers on a chart (SVG) with a matching list under it. */
.chart-ann-line { stroke: var(--action); stroke-dasharray: 3 4; }
.chart-ann-dot { fill: var(--action); }
.chart-ann-txt { fill: var(--white); font-family: var(--font); font-size: var(--fs-xs); font-weight: 700; text-anchor: middle; dominant-baseline: central; }
.chart-ann-list { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); font-size: var(--fs-sm); color: var(--text-muted); margin-top: var(--sp-3); }
.chart-ann-num { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: var(--action); color: var(--white); font-size: var(--fs-xs); font-weight: 700; margin-right: var(--sp-1); }

/* Small line chart: an inline SVG with one polyline and point circles. */
.line-chart { display: block; width: 100%; height: auto; margin: var(--sp-2) 0 var(--sp-4); }
.line-chart polyline { fill: none; stroke: var(--action); stroke-width: 2.5; stroke-linejoin: round; }
.line-chart circle { fill: var(--action); }
@media (prefers-reduced-motion: reduce) { .row-chev { transition: none; } }

/* ===================== v0.7 (2026-11-12): Dashboard tiles =====================
   A copy of the REAL dashboard tile primitives, not a new design:
   app/views/tiles/primitives/* + page_styles/dashboards_and_tiles/dashboards.scss
   on origin/development (the NOVA and Appointments dashboards use them).
   Class names match the app so a developer can map a mock tile to a primitive:
   kpi_hero → .kpi-hero-tile · ranked_list → .ranked-list-tile ·
   horizontal_bars → .horizontal-bars-tile · stacked_bar → .stacked-bar-tile.
   Tiles keep the app's square corners and shadow even under .mk-modern.
   Two colors come from dashboards.scss, not _variables.scss: the trend green and red. */
:root {
  --font-num: 'Roboto Condensed', 'Roboto', Arial, sans-serif;   /* tile numbers (real) */
  --tile-trend-up: #70AD47;     /* $tile-green, dashboards.scss */
  --tile-trend-down: #E15759;   /* $tile-red, dashboards.scss */
}
/* Dashboard tabs (shared/_dashboard_listings): uppercase names, active tab sits on the page background. */
.db-tabs { display: flex; gap: 0; background: var(--surface); margin: calc(-1 * var(--sp-5)) calc(-1 * var(--sp-5)) 0; padding: var(--sp-2) var(--sp-5) 0; overflow-x: auto; }
.db-tabs a { padding: var(--sp-1) var(--sp-3); color: var(--sc-blue); text-transform: uppercase; white-space: nowrap; }
.db-tabs a:hover { text-decoration: none; color: var(--sc-med-blue); }
.db-tabs a.active { background: var(--page-bg); color: var(--sc-dark-blue); }
@media (max-width: 860px) { .db-tabs { margin: calc(-1 * var(--sp-4)) calc(-1 * var(--sp-4)) 0; padding: var(--sp-2) var(--sp-4) 0; } }
/* Period filter (business_dashboards/_period_filter) */
.db-period { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: var(--sp-2) 0 var(--sp-3); font-size: var(--fs-sm); }
.db-period-label { color: var(--gray-700); margin-right: var(--sp-1); }
.period-pill { background: var(--surface); border: 1px solid var(--gray-300); color: var(--gray-700); border-radius: 14px; padding: 3px 12px; font-size: 0.8rem; cursor: pointer; }
.period-pill:hover { background: var(--gray-100); }
.period-pill.active { background: var(--sc-blue); border-color: var(--sc-blue); color: var(--white); }
/* Grid: .dashboard-col-N widths (12 / 6 / 3 / 4 / 8 at desktop; one column under 900px). */
.db-row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--sp-3); margin-bottom: var(--sp-3); }
.db-col-3 { grid-column: span 3; } .db-col-4 { grid-column: span 4; } .db-col-6 { grid-column: span 6; } .db-col-8 { grid-column: span 8; } .db-col-12 { grid-column: span 12; }
@media (max-width: 1200px) { .db-col-3 { grid-column: span 6; } .db-col-4, .db-col-8 { grid-column: span 12; } }
@media (max-width: 900px) { .db-row > * { grid-column: span 12; } }
/* The tile card (tile-card-base) */
.tile-card { background: var(--surface); border: 1px solid var(--gray-100); border-radius: 0; box-shadow: var(--shadow-card); min-height: 168px; height: 100%; display: flex; flex-direction: column; overflow: hidden; }
.tile-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; padding: 10px 14px 0; }
.tile-title-row { display: flex; align-items: center; gap: 6px; }
.tile-card-header .title { font-size: 0.9rem; font-weight: 700; color: var(--gray-700); text-transform: uppercase; letter-spacing: 0.04em; }
.tile-subtitle { font-size: 0.7rem; color: var(--gray-600); }
.tile-badge { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding: 2px 6px; border-radius: 3px; line-height: 1.2; color: var(--white); background: var(--sc-blue); }
.tile-card-body { flex: 1; display: flex; flex-direction: column; padding: 6px 14px 10px; }
.tile-card-footer { margin-top: auto; padding: 6px 14px 10px; border-top: 1px solid var(--gray-200); font-size: 0.8rem; color: var(--gray-700); }
.tile-card-footer .footer-part + .footer-part::before { content: '·'; margin: 0 6px; color: var(--gray-400); }
.tile-footer-link { font-size: 0.8rem; color: var(--sc-blue); }
.tile-footer-link::after { content: ' →'; }
/* kpi_hero */
.kpi-hero-tile .kpi-value { font-family: var(--font-num); font-size: 2.4rem; line-height: 1.05; color: var(--sc-blue); margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.kpi-meta-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.kpi-subtext { font-size: 0.85rem; color: var(--gray-700); }
.kpi-trend { font-size: 0.85rem; font-weight: 700; }
.trend-up { color: var(--tile-trend-up); } .trend-down { color: var(--tile-trend-down); }
.kpi-status { align-self: flex-start; margin-top: 6px; font-size: 0.72rem; font-weight: 700; padding: 2px 8px; border-radius: 3px; background: var(--attention-bg); color: var(--attention-ink); }
/* Uppercase card label used inside tiles (tile-label mixin) */
.tile-label { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--gray-700); }
/* stacked_bar: column chart on the left, summary cards on the right */
.stacked-bar-split { display: flex; gap: 14px; align-items: stretch; }
.stacked-bar-chart { flex: 1; min-width: 0; }
.stacked-bar-cards { flex: 0 0 200px; display: flex; flex-direction: column; gap: 8px; }
.stacked-bar-card { padding: 8px 10px; background: var(--gray-100); border-radius: 3px; }
.stacked-bar-card .card-value { font-family: var(--font-num); font-size: 1.6rem; line-height: 1.05; color: var(--sc-black); margin-top: 2px; }
.stacked-bar-card .card-value.value-primary { color: var(--sc-blue); }
.stacked-bar-card .card-pct { font-size: 0.75rem; color: var(--gray-600); margin-top: 1px; }
.legend-dot { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.legend-dot.segment-primary { background: var(--sc-blue); } .legend-dot.segment-warning { background: var(--sc-gold); } .legend-dot.segment-light { background: var(--gray-200); }
@media (max-width: 640px) { .stacked-bar-split { flex-direction: column; } .stacked-bar-cards { flex: none; flex-direction: row; } .stacked-bar-card { flex: 1; min-width: 0; } }
/* Column chart drawn in CSS where the app uses Highcharts (stand-in for the mock only) */
.tile-columns { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; align-items: end; height: 170px; padding-bottom: 30px; }
.tile-col { position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; }
.tile-col-bar { width: 70%; max-width: 26px; background: var(--sc-blue); }
.tile-col-bar.is-slow { background: var(--sc-gold); }
.tile-col-label { position: absolute; bottom: -30px; font-size: 0.7rem; color: var(--gray-600); text-align: center; line-height: 1.2; white-space: nowrap; }
.tile-col-target { position: absolute; left: 0; right: 0; height: 0; border-top: 1px dashed var(--gray-600); pointer-events: none; }
.tile-col-target span { position: absolute; right: 0; top: -16px; font-size: 0.65rem; color: var(--gray-600); }
/* ranked_list */
.ranked-list { display: flex; flex-direction: column; gap: 4px; }
.ranked-list-row { display: flex; align-items: baseline; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--gray-100); }
.ranked-list-row:last-child { border-bottom: 0; }
.ranked-list-position { flex: 0 0 18px; color: var(--gray-600); font-size: 0.85rem; font-weight: 700; }
.ranked-list-label { flex: 1; min-width: 0; color: var(--sc-black); font-size: 0.9rem; }
.ranked-list-value { color: var(--sc-black); font-weight: 700; font-variant-numeric: tabular-nums; }
.ranked-list-secondary { color: var(--gray-600); font-size: 0.8rem; margin-left: 4px; min-width: 64px; text-align: right; font-variant-numeric: tabular-nums; }
/* horizontal_bars */
.horizontal-bars { display: flex; flex-direction: column; gap: 6px; }
.horizontal-bar-row { display: grid; grid-template-columns: 110px 1fr auto; gap: 10px; align-items: center; font-size: 0.85rem; }
.horizontal-bar-label { color: var(--sc-black); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.horizontal-bar-track { height: 8px; background: var(--gray-200); border-radius: 4px; overflow: hidden; }
.horizontal-bar-fill { height: 100%; background: var(--sc-blue); }
.horizontal-bar-value { color: var(--sc-black); font-weight: 700; font-variant-numeric: tabular-nums; }
.horizontal-bars-tile.thick-bars .horizontal-bar-track { height: 14px; border-radius: 7px; }
.horizontal-bars-tile.thick-bars .horizontal-bars { gap: 10px; }
/* donut_breakdown (v0.7, 2026-11-12): donut on the left, swatch / label / value table on the right.
   The app draws the donut with Highcharts (innerSize 62%); mocks draw it with a conic-gradient set
   inline from the tokens below. NOVA outcome colors are copied from ChartsHelper::NOVA_OUTCOME_COLORS. */
:root {
  --nova-booked: #4CA75A; --nova-question: #0787C9; --nova-transferred: #FA9F47; --nova-callback: #E0A800;
  --nova-abandoned: #CFCFD4; --nova-voicemail: #8896A6; --nova-rescheduled: #AD30FF; --nova-cancelled: #D64040;
}
.donut-breakdown-body { display: flex; align-items: center; gap: 14px; }
.donut-chart { flex: 0 0 160px; width: 160px; height: 160px; border-radius: 50%; position: relative; }
.donut-chart::after { content: ''; position: absolute; inset: 19%; border-radius: 50%; background: var(--surface); }
.breakdown-table { flex: 1; width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.breakdown-table td { padding: 3px 0; vertical-align: middle; }
.breakdown-swatch { width: 14px; padding-right: 6px; }
.swatch-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.breakdown-label { color: var(--sc-black); }
.breakdown-value { text-align: right; color: var(--sc-black); font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .donut-breakdown-body { flex-direction: column; align-items: stretch; } .donut-chart { align-self: center; } }
