/*!*************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./app/globals.css ***!
  \*************************************************************************************************************************************************************************************************************************************************************/
@import url('https://api.fontshare.com/v2/css?f[]=satoshi@400,500,700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Anta&display=swap');

:root {
  --bg-page: #ebeff4;
  --bg-surface: #ffffff;
  --text-primary: #0d0d0d;
  --text-heading: #101828;
  --text-muted: #6a707c;
  --text-subtle: #6a7282;
  --text-secondary: #667085;
  --blue-500: #0362dd;
  --blue-600: #0247a1;
  --font-body: 'Satoshi', 'Segoe UI', sans-serif;
  --font-display: 'Anta', 'Satoshi', sans-serif;
  font-family: var(--font-body);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg-page);
  color: var(--text-primary);
}

img {
  max-width: 100%;
}

button {
  border: 0;
  font: inherit;
  cursor: pointer;
}

/* ─── App shell ──────────────────────────────────────────────────────────── */

.analytics-demo {
  min-height: 100vh;
  background: var(--bg-page);
  display: grid;
  grid-template-columns: 256px minmax(0, 1fr);
  grid-column-gap: 0;
  column-gap: 0;
  padding: 24px 40px 24px 24px;
  align-items: start;
}

.analytics-demo.sidebar-is-collapsed {
  grid-template-columns: 80px minmax(0, 1fr);
}

/* ─── Full-width top navbar ──────────────────────────────────────────────── */

.app-topnav {
  position: -webkit-sticky;
  position: sticky;
  top: 24px;
  z-index: 50;
  display: flex;
  align-items: center;
  height: 72px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.72);
  border-left: 0;
  border-radius: 0 12px 12px 0;
  padding: 0 20px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.035);
  gap: 16px;
  flex-shrink: 0;
}

.app-main-shell {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 12px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  flex-shrink: 0;
  padding: 0 20px;
  border-bottom: 1px solid #eef2f6;
}

.app-topnav-title {
  flex: 1 1;
  min-width: 0;
}

/* ─── App body row (sidebar + content) ──────────────────────────────────── */

.app-body {
  display: flex;
  flex: 1 1;
  min-height: 0;
}

/* ─── Sidebar ──────────────────────────────────────────────────────────── */

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  background: var(--bg-surface);
  position: -webkit-sticky;
  position: sticky;
  top: 24px;
  height: calc(100vh - 48px);
  overflow: hidden;
  width: 100%;
  flex-shrink: 0;
  border: 1px solid rgba(226, 232, 240, 0.72);
  border-right: 0;
  border-radius: 12px 0 0 12px;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.05);
}

.sidebar.is-collapsed {
  align-items: center;
}

.sidebar-is-collapsed .sidebar-brand {
  width: 100%;
  justify-content: space-between;
  padding: 0 8px;
}

.sidebar-is-collapsed .sidebar-brand .sidebar-logo-img {
  width: 28px;
  height: 28px;
}

.sidebar-collapse-icon {
  display: block;
  color: #8c95a6;
}

.sidebar-toggle {
  color: #8c95a6;
  padding: 4px;
  border-radius: 6px;
  transition: background 150ms ease, color 150ms ease;
}

.sidebar-toggle:hover {
  background: #f0f3f8;
  color: #374151;
}

.sidebar-logo-img {
  height: 26px;
  width: auto;
  display: block;
}

.sidebar-logo-img.is-compact {
  width: 36px;
  height: 28px;
  object-fit: contain;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1;
  color: #0d0d0d;
  transform: translateY(1px);
}

.sidebar-nav {
  display: flex;
  flex: 1 1;
  flex-direction: column;
  justify-content: space-between;
  min-height: 0;
  padding: 32px 16px 20px;
}

.sidebar.is-collapsed .sidebar-nav,
.sidebar.is-collapsed .nav-group {
  width: 100%;
}

.sidebar.is-collapsed .sidebar-nav {
  padding: 32px 8px 20px;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0;
  text-align: left;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
  text-decoration: none;
}

.sidebar.is-collapsed .nav-item {
  justify-content: center;
  padding: 12px;
}

.nav-item:hover {
  background: #f5f8fc;
}

.nav-item.is-active {
  background: #e2efff;
  color: var(--blue-600);
  box-shadow: inset 0 0 0 1px rgba(2, 71, 161, 0.04);
}

.nav-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

/* ─── Content area ──────────────────────────────────────────────────────── */

.content-column {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 0;
  margin-left: 24px;
  flex: 1 1;
  min-width: 0;
  min-height: calc(100vh - 48px);
  max-height: none;
  background: transparent;
  border-top-left-radius: 0;
  overflow: visible;
}

.app-body.sidebar-is-collapsed .content-column {
  width: 100%;
}

/* kept for legacy references */
.app-frame { display: contents; }
.app-frame.sidebar-is-collapsed { display: contents; }

.content-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar-title {
  margin: 0;
  color: #0d0d0d;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.02em;
}

.dashboard-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ─── Page headers ──────────────────────────────────────────────────────── */

.page-header {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.page-header-analytics { gap: 16px; }
.page-header-recon { gap: 20px; }

.page-title-row,
.page-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.page-title {
  margin: 0;
  color: #000;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0;
}

.page-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
}

.page-actions-inline {
  display: flex;
  align-items: center;
  gap: 12px;
}

.export-button {
  min-width: 0;
  gap: 8px;
  padding: 0 16px;
}

.export-button .icon {
  width: 16px;
  height: 16px;
}

.export-popover {
  min-width: 280px;
}

/* ─── Tabs ───────────────────────────────────────────────────────────────── */

.tab-list {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.exec-summary-tabs {
  width: min(100%, 760px);
}

.recon-tab-list .tab-button { min-width: 0; }
.recon-tab-list .tab-button:first-child { min-width: 175px; }

.tab-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 134px;
  height: 40px;
  padding: 0 28px;
  border: 0;
  border-radius: 8px;
  background: var(--bg-surface);
  color: #292b30;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.25;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.tab-button:first-child { min-width: 175px; }
.tab-button:hover { background: #f5f8fc; }

.tab-button.is-active {
  border: 2px solid var(--blue-600);
  background: #e2efff;
  color: var(--blue-600);
  font-weight: 700;
}

/* ─── Menus & popovers ──────────────────────────────────────────────────── */

.menu-wrap { position: relative; }

.menu-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  display: flex;
  min-width: 180px;
  flex-direction: column;
  padding: 8px;
  background: white;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(16, 24, 40, 0.12);
}

.menu-popover button {
  display: flex;
  width: 100%;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 10px 12px;
  border-radius: 8px;
  background: transparent;
  color: #101828;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  text-align: left;
}

.menu-popover button:hover { background: #f5f8fc; }
.menu-popover button:disabled {
  color: #98a2b3;
  cursor: not-allowed;
}
.menu-popover button:disabled:hover { background: transparent; }

.user-menu {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: 172px;
  padding: 4px 8px 4px 4px;
  border: 1px solid #d3d7de;
  border-radius: 999px;
  background: var(--bg-surface);
  color: #0d0d0d;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--blue-500);
  color: white;
}

.user-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-menu-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.user-menu-chevron .icon-chevron {
  width: 12px;
  height: 6px;
}

/* ─── Buttons ────────────────────────────────────────────────────────────── */

.date-chip,
.secondary-button,
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 152px;
  height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.25;
  transition: transform 120ms ease, background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.date-chip:hover,
.secondary-button:hover,
.primary-button:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

.user-menu:hover {
  transform: none;
}

.date-chip {
  min-width: 0;
  max-width: 360px;
  height: 44px;
  padding: 0 16px;
  border: 1px solid #e4e7ec;
  border-radius: 14px;
  background: var(--bg-surface);
  color: #344054;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  font-size: 14px;
  font-weight: 600;
  justify-content: space-between;
}

.date-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.date-chip.date-chip-bordered { border-color: #d0d5dd; }

.primary-button {
  border: 0;
  background: var(--blue-500);
  color: white;
  font-weight: 700;
  padding: 0 16px;
}

.primary-button.small {
  min-width: 113px;
  height: 36px;
  font-size: 14px;
}

.secondary-button {
  min-width: 99px;
  height: 36px;
  border: 1px solid var(--blue-500);
  background: white;
  color: var(--blue-500);
  font-size: 14px;
  font-weight: 700;
}

/* ─── Surfaces & cards ───────────────────────────────────────────────────── */

.surface {
  background: var(--bg-surface);
  border-radius: 12px;
  width: 100%;
}

.overview-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  padding: 24px 40px;
  min-height: 150px;
}

.overview-metric,
.recon-metric {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 102px;
}

.overview-metric { width: 212px; }

.recon-metric {
  flex: 1 1;
  min-width: 0;
  padding: 0;
  background: transparent;
  border-radius: 8px;
  border: 0;
  cursor: pointer;
  transition: background 160ms ease, box-shadow 160ms ease;
}

.recon-metric:hover .recon-metric-copy {
  background: #f5f8fc;
  border-radius: 8px;
}

.recon-metric.is-active .recon-metric-copy {
  background: #e2efff;
  border-radius: 8px;
}

.overview-copy,
.recon-metric-copy {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  min-height: 102px;
  padding: 24px;
}

.metric-divider {
  flex: 0 0 auto;
  width: 1px;
  height: 102px;
  background: #d0d8e4;
}

.metric-label {
  margin: 0 0 12px;
  color: #6a707c;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.metric-value-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.metric-value {
  margin: 0;
  color: #101828;
  font-size: 36px;
  font-weight: 700;
  line-height: 28px;
  letter-spacing: 0.02em;
}

.recon-metric.is-active .metric-label,
.recon-metric.is-active .metric-value {
  color: var(--blue-600);
}

.trend-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  color: white;
  font-size: 12px;
  font-weight: 500;
  line-height: 15px;
}

.trend-pill-up { background: #10b981; }
.trend-pill-down { background: #e10909; }

/* ─── Section headers ────────────────────────────────────────────────────── */

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.section-header-stack { justify-content: flex-start; }

.section-title {
  margin: 0;
  color: #101828;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
}

.section-subtitle {
  margin: 2px 0 0;
  color: #6a7282;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.375;
}

/* ─── Funnel ─────────────────────────────────────────────────────────────── */

.funnel-card,
.breakdown-card,
.recon-workbench,
.placeholder-surface {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px;
}

.settings-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.settings-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 24px;
}

.settings-intro {
  margin: 8px 0 0;
  max-width: 780px;
  color: var(--text-secondary);
}

.settings-hero-copy {
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: #f7fafc;
  color: var(--text-primary);
}

.settings-eyebrow {
  font-size: 12px;
  line-height: 18px;
  text-transform: uppercase;
  letter-spacing: 0;
  color: var(--text-secondary);
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 16px;
  gap: 16px;
}

.settings-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
}

.settings-card-wide {
  grid-column: 1 / -1;
}

.settings-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.settings-card-header h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.settings-card-header p {
  margin: 8px 0 0;
  max-width: 760px;
  color: var(--text-secondary);
}

.settings-control-grid,
.settings-summary-grid,
.settings-config-grid,
.settings-switch-grid {
  display: grid;
  grid-gap: 12px;
  gap: 12px;
}

.settings-control-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-control-grid-compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.settings-summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.settings-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
  color: var(--text-primary);
}

.settings-field small {
  color: var(--text-secondary);
}

.settings-input,
.settings-select-wrap {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid #dbe3ee;
  background: var(--bg-surface);
  padding: 0 12px;
  font-size: 14px;
  color: var(--text-primary);
}

.settings-input {
  font: inherit;
}

.settings-input:disabled,
.settings-select:disabled,
.settings-switch input:disabled + span {
  color: #98a2b3;
  cursor: not-allowed;
}

.settings-select-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.settings-select-wrap .icon-chevron {
  flex-shrink: 0;
}

.settings-select {
  width: 100%;
  border: 0;
  background: transparent;
  font: inherit;
  color: inherit;
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  outline: none;
}

.settings-summary-tile,
.settings-empty-state {
  border-radius: 8px;
  border: 1px solid #e4e7ec;
  background: #f7fafc;
}

.settings-summary-tile {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 20px;
}

.settings-summary-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.settings-action-row,
.settings-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.settings-alert {
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
}

.settings-alert.is-error {
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #b42318;
}

.settings-alert.is-success {
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #067647;
}

.settings-config-group {
  display: grid;
  grid-gap: 12px;
  gap: 12px;
}

.settings-config-group h4 {
  margin: 0;
  font-size: 15px;
  line-height: 1.3;
}

.settings-config-grid {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
}

.settings-number-wrap {
  position: relative;
}

.settings-number-wrap .settings-input {
  padding-right: 48px;
}

.settings-number-wrap em {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  font-style: normal;
  font-size: 12px;
  pointer-events: none;
}

.settings-switch-grid {
  grid-template-columns: repeat(4, minmax(160px, 1fr));
}

.settings-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: #ffffff;
  font-size: 14px;
}

.settings-switch input {
  width: 16px;
  height: 16px;
  accent-color: var(--blue-500);
}

.settings-user-create {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(190px, 1.2fr) minmax(140px, 1fr) minmax(130px, 0.8fr) auto;
  grid-gap: 10px;
  gap: 10px;
  align-items: center;
}

.settings-user-table {
  display: grid;
  grid-gap: 8px;
  gap: 8px;
  overflow-x: auto;
}

.settings-user-row {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) minmax(130px, 0.7fr) minmax(130px, 0.7fr) minmax(150px, 0.9fr) minmax(180px, auto);
  grid-gap: 10px;
  gap: 10px;
  align-items: center;
  min-width: 920px;
  padding: 10px;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: #ffffff;
}

.settings-user-row-head {
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.settings-user-identity {
  display: grid;
  grid-gap: 6px;
  gap: 6px;
}

.settings-user-identity small {
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.settings-danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fff;
  color: #b42318;
  font-size: 14px;
  font-weight: 600;
}

.settings-danger-button:disabled {
  color: #98a2b3;
  cursor: not-allowed;
}

.settings-empty-state {
  padding: 14px;
  color: var(--text-secondary);
}

@media (max-width: 980px) {
  .settings-grid,
  .settings-control-grid,
  .settings-control-grid-compact,
  .settings-summary-grid,
  .settings-config-grid,
  .settings-switch-grid,
  .settings-user-create {
    grid-template-columns: minmax(0, 1fr);
  }

  .settings-hero,
  .settings-card-header {
    flex-direction: column;
  }

  .settings-hero-copy {
    width: 100%;
    min-width: 0;
  }

  .settings-action-row,
  .settings-action-row .primary-button,
  .settings-action-row .secondary-button,
  .settings-row-actions,
  .settings-row-actions .secondary-button,
  .settings-row-actions .settings-danger-button {
    width: 100%;
  }
}

.funnel-scroll {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: 8px;
}

.funnel-canvas {
  position: relative;
  width: 100%;
  min-width: 1136px;
  aspect-ratio: 1136 / 288;
}

.funnel-stage { position: absolute; }
.funnel-stage img { display: block; width: 100%; height: 100%; }

.funnel-label {
  position: absolute;
  margin: 0;
  color: #0d0d0d;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.357;
  text-align: center;
}

.funnel-value-box {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.funnel-value-box-dark { color: #012c65; }
.funnel-value-box-light { color: white; }

.funnel-value {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.333;
}

.funnel-percentage {
  margin: 0;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.333;
}

/* ─── Breakdown / Donut ──────────────────────────────────────────────────── */

.breakdown-visual {
  display: flex;
  align-items: flex-start;
  gap: 48px;
}

.breakdown-donut-wrap {
  position: relative;
  flex-shrink: 0;
  width: 300px;
  height: 300px;
}

.breakdown-donut-svg { display: block; width: 300px; height: 300px; }

.breakdown-donut-centre {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  pointer-events: none;
}

.breakdown-donut-pct {
  font-size: 34px;
  font-weight: 700;
  color: #101828;
  line-height: 1;
}

.breakdown-donut-sub {
  font-size: 13px;
  font-weight: 500;
  color: #6a707c;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.breakdown-donut-sub-interactive {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-transform: none;
  letter-spacing: 0;
  text-align: center;
  line-height: 1.2;
}

.breakdown-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-gap: 16px;
  gap: 16px;
  align-content: center;
  flex: 1 1;
}

.breakdown-metric {
  padding: 16px 20px;
  border-radius: 8px;
  min-height: 96px;
  background: #f9fafb;
  border: 1px solid #f0f2f5;
}

.breakdown-metric-button {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  width: 100%;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.breakdown-metric-button:hover {
  border-color: #c9d5e6;
  background: #f5f8fc;
}

.breakdown-metric-button.is-active {
  border-color: #0f52cc;
  background: #edf5ff;
  box-shadow: inset 0 0 0 1px rgba(15, 82, 204, 0.08);
}

.breakdown-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 24px;
}

.breakdown-values {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: 12px;
}

.breakdown-values p {
  margin: 0;
  color: #101828;
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.01em;
}

.breakdown-values span {
  color: #6a707c;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
}

.breakdown-gap-value {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #edf1f6;
}

.breakdown-gap-value span {
  color: #6a707c;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

.breakdown-gap-value strong {
  color: #b23b1d;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.breakdown-title h4 {
  margin: 0;
  color: #344054;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  flex-shrink: 0;
}

/* ─── Banners ────────────────────────────────────────────────────────────── */

.demo-notice {
  padding: 12px 16px;
  background: #e2efff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  color: var(--blue-600);
  font-size: 14px;
  font-weight: 500;
}

.demo-notice-warning {
  background: #fff7ed;
  border-color: #fdba74;
  color: #9a3412;
}

.demo-notice-error {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #b91c1c;
}

/* ─── Recon workbench ────────────────────────────────────────────────────── */

.recon-workbench { gap: 20px; }

.recon-layout .secondary-button:hover,
.recon-layout .primary-button:hover,
.recon-layout .icon-button:hover {
  transform: none;
}

.recon-layout .secondary-button:hover {
  border-color: #0247a1;
  background: #f5f8fc;
  color: #0247a1;
}

.recon-layout .primary-button:hover {
  background: #0247a1;
}

.run-panel {
  background: white;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.run-panel label { font-size: 13px; font-weight: 600; color: #6a7282; white-space: nowrap; }
.run-panel select { flex: 1 1; min-width: 280px; height: 36px; padding: 0 10px; border: 1px solid #dbe3ee; border-radius: 8px; font-size: 14px; background: white; }

.recon-metric-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  width: 100%;
}

.recon-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-left: 12px;
}

.recon-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 4px;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #344054;
  cursor: pointer;
  transition: background 120ms ease;
}

.pagination-btn:hover:not(:disabled) { background: #f5f7fa; }
.pagination-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.pagination-numbers {
  display: flex;
  align-items: center;
  gap: 2px;
}

.pagination-num {
  min-width: 32px;
  height: 32px;
  padding: 0 4px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #344054;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}

.pagination-num:hover { background: #f5f7fa; border-color: #e2e8f0; }
.pagination-num.is-active {
  background: #0f52cc;
  border-color: #0f52cc;
  color: white;
  font-weight: 600;
}

.pagination-ellipsis {
  min-width: 28px;
  text-align: center;
  color: #6a7282;
  font-size: 13px;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.recon-selection-copy,
.recon-pagination p {
  margin: 0;
  color: #6a707c;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.357;
}

.recon-toolbar-actions {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
  align-content: flex-start;
}

.recon-order-search {
  display: flex;
  align-items: center;
  flex: 1 1 420px;
  gap: 12px;
  min-width: 320px;
  max-width: 560px;
}

.recon-order-search-input {
  flex: 1 1 220px;
  min-width: 0;
}

.recon-toolbar-actions > .secondary-button,
.recon-toolbar-actions > .primary-button,
.recon-toolbar-actions > .menu-wrap {
  flex: 0 0 auto;
}

.recon-summary-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.recon-summary-tab-shell {
  padding: 12px;
}

.recon-summary-tabs {
  gap: 8px;
}

.recon-summary-tabs .tab-button,
.recon-summary-tabs .tab-button:first-child {
  min-width: 0;
  height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  font-size: 15px;
  font-weight: 600;
}

.recon-summary-tabs .tab-button:hover {
  background: #f5f8fc;
}

.recon-summary-tabs .tab-button.is-active {
  border-color: var(--blue-600);
  background: #e2efff;
  box-shadow: inset 0 0 0 1px rgba(2, 71, 161, 0.08);
}

.recon-summary-overview {
  min-height: 0;
  padding: 20px 28px;
}

.recon-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 24px;
  gap: 24px;
}

.recon-summary-card {
  min-height: 100%;
}

.recon-summary-stat {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  min-height: 146px;
  padding: 18px 20px;
  border: 1px solid #eef2f6;
  border-radius: 12px;
  background: #fafbfd;
}

.recon-summary-stat p,
.summary-list-copy strong,
.summary-order-heading strong {
  margin: 0;
  color: #101828;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}

.recon-summary-stat strong {
  color: #101828;
  display: block;
  font-size: 44px;
  font-weight: 700;
  line-height: 0.98;
}

.recon-summary-stat span,
.summary-list-copy span,
.summary-order-heading span,
.summary-order-supporting span,
.summary-order-delta-label {
  color: #6a7282;
  display: block;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
}

.recon-summary-stat-value {
  display: flex;
  align-items: flex-end;
  min-height: 56px;
}

.recon-summary-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 16px;
  gap: 16px;
}

.summary-list,
.summary-orders-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.summary-list-row,
.summary-order-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  border: 1px solid #edf1f6;
  border-radius: 12px;
  background: #fafbfd;
}

.summary-list-copy,
.summary-order-copy {
  display: flex;
  flex: 1 1;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.summary-order-row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(190px, 0.9fr) auto;
  align-items: center;
}

.summary-order-primary,
.summary-order-secondary,
.summary-order-side {
  min-width: 0;
}

.summary-order-heading,
.summary-order-supporting,
.summary-order-secondary,
.summary-order-side {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.summary-order-supporting {
  justify-content: flex-start;
  gap: 18px;
}

.summary-order-secondary {
  justify-content: flex-start;
}

.summary-order-gateway {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: #eef3fb;
  color: #344054;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.summary-order-side {
  justify-content: flex-end;
  gap: 20px;
}

.summary-order-delta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.summary-list-row p,
.summary-order-delta p {
  margin: 0;
  color: #101828;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.1;
}

.summary-list-row-gateway p {
  min-width: 140px;
  text-align: right;
}

.gateway-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 16px;
  gap: 16px;
}

.gateway-summary-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid #edf1f6;
  border-radius: 12px;
  background: #fafbfd;
}

.gateway-summary-header,
.gateway-summary-amount {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.gateway-summary-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.gateway-summary-copy strong {
  margin: 0;
  color: #101828;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
}

.gateway-summary-copy span,
.gateway-summary-amount span,
.gateway-summary-metric span {
  color: #6a7282;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}

.gateway-summary-amount {
  align-items: flex-end;
}

.gateway-summary-amount p {
  margin: 0;
  color: #101828;
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}

.gateway-summary-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-gap: 12px;
  gap: 12px;
}

.gateway-summary-metric {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 88px;
  padding: 14px 12px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #eef2f6;
}

.gateway-summary-metric strong {
  margin: 0;
  color: #101828;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.05;
}

/* ─── Table ──────────────────────────────────────────────────────────────── */

.table-shell {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  overflow-x: auto;
}

.table-header-row,
.table-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1.1fr) minmax(0, 0.8fr) minmax(0, 1fr) minmax(0, 0.7fr) minmax(0, 0.7fr) minmax(0, 0.7fr) minmax(0, 1.2fr) 64px;
  align-items: center;
  grid-column-gap: 12px;
  column-gap: 12px;
  padding: 12px;
  width: 100%;
  min-width: 0;
}

.table-header-row {
  background: #eff2f6;
  border-radius: 8px;
  color: #292b30;
  font-size: 14px;
  font-weight: 500;
  min-height: 46px;
}

.table-row {
  border-bottom: 1px solid #b5bece;
  color: #0d0d0d;
  font-size: 16px;
  font-weight: 500;
  min-height: 64px;
  transition: background 120ms ease;
}

.table-row:hover {
  background: #f8fafc;
}

.table-row strong { font-weight: 700; }

.table-cell-order,
.table-cell-date,
.table-cell-gateway {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-cell-gateway {
  font-feature-settings: none;
  font-variant-ligatures: none;
  letter-spacing: 0;
}

.table-cell-money {
  justify-self: end;
  min-width: 0;
  text-align: right;
  white-space: nowrap;
}

.table-header-row > span,
.table-header-row > button,
.table-row > span,
.table-row > strong,
.table-row > div {
  min-width: 0;
}

.table-sort-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 500;
  text-align: left;
}

.table-sort-button:hover {
  color: #0f52cc;
}

.table-sort-button.is-active {
  color: #0f52cc;
  font-weight: 700;
}

.table-sort-button > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-sort-indicator {
  flex-shrink: 0;
  color: #98a2b3;
  font-size: 12px;
  line-height: 1;
}

.table-sort-button.is-active .table-sort-indicator {
  color: currentColor;
}

.checkbox-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  background: transparent;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 1px solid #0d0d0d;
  border-radius: 2px;
  background: white;
}

.checkbox.is-checked {
  border-color: var(--blue-500);
  background: var(--blue-500);
  color: white;
}

.checkbox-icon { width: 12px; height: 12px; stroke-width: 2; }

.delta-negative { color: #e10909; }

/* ─── Status pills ───────────────────────────────────────────────────────── */

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  min-width: 150px;
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.status-pill-compact {
  width: auto;
  min-width: 0;
  max-width: 220px;
  padding-inline: 10px;
}

.status-mismatch,
.status-tone-risk { background: #e10909; color: white; }

.status-reviewing,
.status-tone-explainable { background: #f59e0b; color: white; }

.status-resolved,
.status-tone-resolved { background: #10b981; color: white; }

.status-tone-neutral { background: #64748b; color: white; }

.text-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 8px;
  background: transparent;
  color: var(--blue-500);
  font-size: 14px;
  font-weight: 700;
  transition: background 120ms ease, color 120ms ease;
}

.text-action:hover {
  background: #e2efff;
  color: #0247a1;
}

.table-action-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.table-inline-action {
  padding: 0;
  background: transparent;
  color: #0d0d0d;
  font-size: 14px;
  font-weight: 700;
}

/* ─── Placeholder & gap lists ────────────────────────────────────────────── */

.placeholder-surface h2,
.placeholder-surface h3 {
  margin: 0;
  color: #101828;
}

.placeholder-surface p {
  margin: 0;
  max-width: 720px;
  color: #6a7282;
  font-size: 16px;
  line-height: 1.5;
}

.recon-detail-surface { gap: 20px; }

.detail-surface-header,
.detail-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.detail-panel h4 {
  margin: 0;
  color: #101828;
  font-size: 16px;
  font-weight: 700;
}

.detail-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-gap: 16px;
  gap: 16px;
}

.detail-stat-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 104px;
  padding: 20px;
  background: #f8fafc;
  border-radius: 10px;
}

.detail-stat-label {
  margin: 0;
  color: #6a7282;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

.detail-stat-value {
  margin: 0;
  color: #101828;
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
}

.detail-two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-gap: 20px;
  gap: 20px;
}

/* ─── Simple list ────────────────────────────────────────────────────────── */

.simple-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
}

.simple-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
  color: #4a5565;
  font-size: 14px;
  line-height: 1.45;
}

.simple-list-row:last-child { border-bottom: 0; }
.simple-list-row strong { color: #101828; }

.simple-list-row-stack { align-items: flex-start; }
.simple-list-row-stack > div { display: flex; flex-direction: column; gap: 4px; }
.simple-list-row-stack > div span { color: #6a7282; }

.gap-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
  color: #4a5565;
  font-size: 14px;
  line-height: 1.5;
}

.gap-list strong { color: #101828; }

.integration-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 4px;
}

.integration-meta h3 {
  margin: 0;
  color: #101828;
  font-size: 16px;
  font-weight: 700;
}

.table-empty-state,
.timeline-empty-state {
  padding: 18px 16px;
  border-radius: 10px;
  background: #f8fafc;
  color: #6a7282;
  font-size: 14px;
  line-height: 1.5;
}

/* ─── Order summary page ─────────────────────────────────────────────────── */

.order-summary-page {
  gap: 32px;
  padding: 24px;
}

.order-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.order-detail-hero {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.order-detail-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  color: #0362dd;
  background: white;
  border: none;
  border-radius: 8px;
  font-size: 18px;
}

.order-detail-heading {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.order-detail-heading h2,
.order-detail-copy h3,
.timeline-copy h4 {
  margin: 0;
  color: #101828;
}

.order-detail-heading h2 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.order-detail-meta {
  display: flex;
  gap: 12px;
  color: #6a7282;
  font-size: 16px;
}

.order-detail-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.order-status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.order-status-chip.is-blue {
  color: #0247a1;
  background: #9bc7fd;
}

.order-status-chip.is-green {
  color: white;
  background: #10b981;
}

.order-status-chip.is-amber {
  color: #92400e;
  background: #fef3c7;
}

.order-status-chip.is-neutral {
  color: #4a5565;
  background: #eff2f6;
}

.order-detail-copy h3 {
  font-size: 16px;
  font-weight: 700;
}

.order-detail-copy p,
.timeline-copy p,
.timeline-subtitle {
  margin: 0;
  color: #4a5565;
  font-size: 14px;
}

.order-detail-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.order-detail-layout {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.order-detail-top-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 546px);
  grid-gap: 32px;
  gap: 32px;
}

.order-detail-timeline-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 32px;
  gap: 32px;
}

.order-detail-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.order-detail-card {
  padding: 24px;
  background: white;
  border: 1px solid #95a0b1;
  border-radius: 12px;
}

.order-recon-tally-card {
  padding: 20px 24px;
}

.order-recon-tally-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-gap: 16px;
  gap: 16px;
}

.order-recon-tally-grid div {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.order-recon-tally-grid span {
  color: #4a5565;
  font-size: 12px;
  font-weight: 600;
}

.order-recon-tally-grid strong {
  overflow-wrap: anywhere;
  color: #101828;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.order-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 24px 80px;
  gap: 24px 80px;
  margin: 0;
}

.order-detail-grid-span {
  grid-column: 1 / -1;
}

.order-detail-grid dt {
  margin: 0 0 8px;
  color: #292b30;
  font-size: 12px;
  font-weight: 500;
}

.order-detail-grid dd {
  margin: 0;
  color: #0d0d0d;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.order-context-card,
.order-recon-summary-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.order-case-brief-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.order-case-answer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border-radius: 8px;
  background: #f8fafc;
}

.order-case-answer span,
.order-case-route span,
.order-case-facts span,
.order-next-step span {
  color: #5f6878;
  font-size: 12px;
  font-weight: 800;
}

.order-case-answer strong {
  color: #101828;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.order-case-answer p {
  margin: 0;
  color: #4a5565;
  font-size: 14px;
  line-height: 1.45;
}

.order-case-route,
.order-next-step {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.order-case-route strong,
.order-next-step strong {
  color: #101828;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.order-case-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-gap: 10px;
  gap: 10px;
}

.order-case-facts div {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #e1e7f0;
  border-radius: 8px;
  background: #fff;
}

.order-case-facts strong {
  color: #101828;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.order-evidence-checklist {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.order-evidence-checklist span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
}

.order-evidence-checklist .is-present {
  color: #047857;
  background: #dcfce7;
}

.order-evidence-checklist .is-missing {
  color: #92400e;
  background: #fef3c7;
}

.order-context-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 20px 32px;
  gap: 20px 32px;
}

.order-context-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.order-context-group h4 {
  margin: 0;
  color: #101828;
  font-size: 14px;
  font-weight: 800;
}

.order-context-group dl {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
}

.order-context-row {
  display: grid;
  grid-template-columns: minmax(104px, 0.48fr) minmax(0, 1fr);
  grid-gap: 12px;
  gap: 12px;
  align-items: baseline;
  min-width: 0;
}

.order-context-row dt {
  margin: 0;
  color: #5f6878;
  font-size: 12px;
  font-weight: 600;
}

.order-context-row dd {
  margin: 0;
  color: #101828;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.order-recon-equation {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  grid-gap: 12px;
  gap: 12px;
  align-items: stretch;
}

.order-recon-equation div {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 14px;
  border-radius: 8px;
  background: #eff2f6;
}

.order-recon-equation div.is-success {
  background: #dcfce7;
}

.order-recon-equation div.is-risk {
  background: #fee2e2;
}

.order-recon-equation span,
.order-recon-simple-row span,
.order-oms-makeup > span,
.order-discount-main span {
  color: #4a5565;
  font-size: 12px;
  font-weight: 800;
}

.order-recon-equation strong {
  color: #101828;
  font-size: 24px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.order-recon-equation .is-risk strong,
.order-recon-simple-row.is-risk > strong {
  color: #dc2626;
}

.order-recon-equation .is-success strong,
.order-recon-simple-row.is-success > strong {
  color: #047857;
}

.order-recon-operator {
  display: flex;
  align-items: center;
  color: #5f6878;
  font-size: 20px;
  font-weight: 800;
}

.order-recon-simple-list {
  display: flex;
  flex-direction: column;
  border: 1px solid #e1e7f0;
  border-radius: 8px;
  overflow: hidden;
}

.order-recon-simple-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-gap: 16px;
  gap: 16px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid #e1e7f0;
}

.order-recon-simple-row:last-child {
  border-bottom: 0;
}

.order-recon-simple-row div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.order-recon-simple-row small,
.order-oms-makeup small,
.order-discount-main p,
.order-discount-side span,
.order-payment-evidence-item span {
  color: #5f6878;
  font-size: 12px;
  line-height: 1.4;
}

.order-recon-simple-row > strong {
  color: #101828;
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
}

.order-oms-makeup {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.order-oms-makeup div {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-gap: 8px;
  gap: 8px;
}

.order-oms-makeup p {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 10px;
  border-radius: 8px;
  background: #f8fafc;
}

.order-oms-makeup strong {
  color: #101828;
  font-size: 13px;
  font-weight: 800;
}

.order-waterfall-card {
  gap: 20px;
}

.order-waterfall-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  grid-gap: 16px;
  gap: 16px;
}

.order-waterfall-kpi {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  background: #ebeff4;
  border-radius: 8px;
}

.order-waterfall-kpi span {
  color: #4a505a;
  font-size: 16px;
  font-weight: 700;
}

.order-waterfall-kpi strong {
  color: #0d0d0d;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
}

.order-waterfall-kpi strong.is-accent,
.order-waterfall-final strong {
  color: #10b981;
}

.order-waterfall-kpi strong.is-risk,
.order-waterfall-final strong.is-risk {
  color: #dc2626;
}

.order-waterfall-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.order-waterfall-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #292b30;
  font-size: 14px;
}

.order-waterfall-row strong {
  color: #0d0d0d;
  font-size: 14px;
  font-weight: 700;
}

.order-waterfall-divider {
  width: 100%;
  height: 1px;
  background: #d4dce8;
}

.order-waterfall-final span {
  letter-spacing: 0.05em;
}

.order-story-map,
.order-ledger-card,
.order-evidence-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.order-story-signal-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-gap: 12px;
  gap: 12px;
}

.order-story-signal {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 12px;
  background: #eff2f6;
  border-radius: 8px;
}

.order-story-signal span,
.order-completeness-pill,
.order-ledger-head,
.order-evidence-head {
  color: #4a5565;
  font-size: 12px;
  font-weight: 700;
}

.order-story-signal strong {
  overflow-wrap: anywhere;
  color: #101828;
  font-size: 14px;
  line-height: 1.4;
}

.order-story-signal.is-success { background: #dcfce7; }
.order-story-signal.is-warning,
.order-story-signal.is-info { background: #fef3c7; }
.order-story-signal.is-risk { background: #fee2e2; }

.order-completeness-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.order-completeness-pill {
  padding: 6px 8px;
  border-radius: 6px;
  background: #eff2f6;
}

.order-completeness-pill.is-available {
  color: #047857;
  background: #dcfce7;
}

.order-completeness-pill.is-missing {
  color: #92400e;
  background: #fef3c7;
}

.order-ledger-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.order-ledger-section h4 {
  margin: 0;
  color: #101828;
  font-size: 15px;
}

.order-ledger-table,
.order-evidence-table,
.order-evidence-stack {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.order-ledger-head,
.order-ledger-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) 108px 108px 108px minmax(240px, 1.6fr);
  grid-gap: 12px;
  gap: 12px;
  align-items: center;
}

.order-ledger-head,
.order-evidence-head {
  padding: 10px 12px;
  border-radius: 8px;
  background: #eff2f6;
}

.order-ledger-row,
.order-evidence-row,
.order-evidence-mini-row {
  padding: 12px;
  border-bottom: 1px solid #e1e7f0;
  color: #292b30;
  font-size: 13px;
}

.order-ledger-row.is-total {
  background: #f8fafc;
  font-weight: 700;
}

.order-ledger-row strong,
.order-evidence-row strong,
.order-evidence-mini-row strong {
  color: #101828;
}

.order-ledger-row > *,
.order-evidence-row > *,
.order-evidence-mini-row > * {
  min-width: 0;
  overflow-wrap: anywhere;
}

.order-evidence-head,
.order-evidence-row {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(110px, 1fr) 96px minmax(100px, 1fr) minmax(180px, 1.4fr);
  grid-gap: 12px;
  gap: 12px;
  align-items: center;
}

.order-evidence-mini-row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) 96px minmax(180px, 1.6fr) 96px;
  grid-gap: 12px;
  gap: 12px;
  align-items: center;
}

.order-discount-list,
.order-payment-evidence-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.order-discount-item,
.order-payment-evidence-item {
  display: grid;
  grid-gap: 14px;
  gap: 14px;
  align-items: center;
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid #e1e7f0;
  border-radius: 8px;
  background: #f8fafc;
}

.order-discount-item {
  grid-template-columns: minmax(0, 1fr) 132px;
}

.order-discount-main,
.order-discount-side,
.order-payment-evidence-item div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.order-discount-main strong,
.order-payment-evidence-item strong {
  color: #101828;
  font-size: 14px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.order-discount-main p {
  margin: 0;
  overflow-wrap: anywhere;
}

.order-discount-side {
  align-items: flex-end;
  text-align: right;
}

.order-discount-side strong {
  color: #101828;
  font-size: 18px;
  font-weight: 800;
}

.order-payment-evidence-item {
  grid-template-columns: minmax(0, 1fr) 112px 92px;
}

.order-payment-evidence-item > strong,
.order-payment-evidence-item > span {
  text-align: right;
}

.order-payment-evidence-item > span {
  display: inline-flex;
  justify-self: end;
  padding: 4px 8px;
  border-radius: 6px;
  background: #dcfce7;
  color: #047857;
  font-weight: 800;
}

/* ─── Timeline ───────────────────────────────────────────────────────────── */

.timeline-shell {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  padding: 24px;
  background: white;
  border: 1px solid #95a0b1;
  border-radius: 12px;
}

.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0;
  padding: 4px 8px 4px 0;
  list-style: none;
  width: 100%;
  max-height: 380px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.timeline-list::-webkit-scrollbar {
  width: 6px;
}

.timeline-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.timeline-list::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.timeline-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 66px;
}

.timeline-marker {
  position: relative;
  display: inline-flex;
  align-items: flex-start;
  justify-content: center;
  width: 22.53px;
  min-height: 48.3px;
  flex-shrink: 0;
}

.timeline-line {
  position: absolute;
  left: 10.5px;
  top: 22.5px;
  width: 2px;
  height: calc(100% + 18px);
}

.timeline-dot {
  position: relative;
  width: 22.53px;
  height: 22.53px;
  border-radius: 999px;
  background: white;
  flex-shrink: 0;
}

.timeline-dot::after {
  content: '';
  position: absolute;
  inset: 5.89px;
  border-radius: 999px;
}

.timeline-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 0;
  width: 100%;
}

.timeline-copy h4 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.timeline-list-green .timeline-line,
.timeline-list-green .timeline-dot::after {
  background: #10b981;
}

.timeline-list-green .timeline-dot {
  border: 2px solid #10b981;
}

.timeline-list-blue .timeline-line,
.timeline-list-blue .timeline-dot::after {
  background: #4a97fc;
}

.timeline-list-blue .timeline-dot {
  border: 2px solid #4a97fc;
}

.order-status-evolution-copy {
  gap: 6px;
}

.order-status-evolution-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.order-status-evolution-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid #dbe3ee;
  border-radius: 999px;
  padding: 0 8px;
  background: #f8fafc;
  color: #475467;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.order-sku-card {
  padding: 24px 16px 16px;
}

.order-sku-table-shell {
  width: 100%;
  overflow-x: auto;
}

.order-sku-head,
.order-sku-row {
  display: grid;
  grid-template-columns: 132px minmax(220px, 1.8fr) 56px 96px 96px 108px 96px 140px;
  grid-gap: 12px;
  gap: 12px;
  align-items: center;
  min-width: 980px;
}

.order-sku-head {
  padding: 12px 24px;
  border-radius: 8px;
  background: #eff2f6;
  color: #292b30;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.order-sku-body {
  display: flex;
  flex-direction: column;
}

.order-sku-row {
  padding: 18px 24px;
  border-bottom: 1px solid #b5bece;
  color: #0d0d0d;
  font-size: 16px;
}

.order-sku-row strong {
  font-size: 16px;
  font-weight: 700;
}

.order-sku-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-copy p { font-size: 14px; line-height: 1.35; }
.timeline-time { color: #6a7282; font-size: 14px; font-weight: 700; }

/* ─── Order detail view toggle ───────────────────────────────────────────── */

.order-view-toggle {
  display: inline-flex;
  padding: 3px;
  background: #eff2f6;
  border-radius: 999px;
  gap: 2px;
}

.order-view-toggle-btn {
  padding: 6px 14px;
  border: none;
  background: transparent;
  color: #4a5565;
  font-size: 13px;
  font-weight: 600;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.order-view-toggle-btn:hover {
  color: #0d0d0d;
}

.order-view-toggle-btn.is-active {
  background: #ffffff;
  color: #0d0d0d;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* ─── Focus view ─────────────────────────────────────────────────────────── */

.order-focus-layout {
  gap: 24px;
}

.order-focus-decision-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.order-focus-headline {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}

.order-focus-eyebrow {
  display: inline-block;
  padding: 3px 10px;
  margin-bottom: 8px;
  background: #fef3c7;
  color: #7c4a03;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: 999px;
  text-transform: uppercase;
}

.order-focus-headline h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  color: #0d0d0d;
}

.order-focus-outcome {
  margin: 6px 0 0;
  color: #6a7282;
  font-size: 14px;
}

.order-focus-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.order-focus-narrative {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: #292b30;
  padding: 14px 16px;
  background: #f7f9fc;
  border-left: 3px solid #3b6ff6;
  border-radius: 6px;
}

.order-focus-numbers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  grid-gap: 12px;
  gap: 12px;
}

.order-focus-numbers > div {
  padding: 12px 14px;
  background: #f7f9fc;
  border: 1px solid #dee2eb;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.order-focus-numbers span {
  font-size: 12px;
  color: #6a7282;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.order-focus-numbers strong {
  font-size: 18px;
  color: #0d0d0d;
  font-weight: 700;
}

.order-focus-numbers strong.is-negative {
  color: #b3261e;
}

.order-focus-numbers small {
  font-size: 11px;
  color: #6a7282;
}

.order-focus-number-total {
  background: #fff3f1 !important;
  border-color: #f3c2bc !important;
}

.order-focus-number-total.is-success {
  background: #dcfce7 !important;
  border-color: #99d7af !important;
}

.order-focus-number-total.is-risk strong {
  color: #b3261e;
}

.order-focus-route {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  grid-gap: 12px 20px;
  gap: 12px 20px;
  padding: 14px 0;
  border-top: 1px solid #dee2eb;
  border-bottom: 1px solid #dee2eb;
}

.order-focus-route > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.order-focus-route span {
  font-size: 12px;
  color: #6a7282;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 600;
}

.order-focus-route strong {
  font-size: 14px;
  color: #0d0d0d;
  font-weight: 600;
}

.order-focus-payment-ids {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.order-focus-payment-ids > span {
  font-size: 12px;
  color: #6a7282;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 600;
}

.order-focus-payment-ids ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.order-focus-payment-ids li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: #eff2f6;
  border-radius: 6px;
  font-size: 13px;
}

.order-focus-payment-ids em {
  font-style: normal;
  color: #6a7282;
  font-weight: 600;
}

.order-focus-payment-ids code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #0d0d0d;
  font-size: 12px;
}

.order-focus-evidence-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.order-focus-evidence-chips span {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.order-focus-evidence-chips .is-present {
  background: #dcfce7;
  color: #1a6332;
}

.order-focus-evidence-chips .is-missing {
  background: #fee2e2;
  color: #b3261e;
}

/* Money Movement table */

.order-focus-money-card {
  padding: 0;
  overflow: hidden;
}

.order-focus-money-table {
  display: flex;
  flex-direction: column;
}

.order-focus-money-head,
.order-focus-money-row {
  display: grid;
  grid-template-columns: 160px minmax(180px, 1fr) 140px minmax(240px, 2fr);
  grid-gap: 16px;
  gap: 16px;
  padding: 14px 24px;
  align-items: start;
}

.order-focus-money-head {
  background: #eff2f6;
  font-size: 12px;
  font-weight: 700;
  color: #4a5565;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.order-focus-money-row {
  border-bottom: 1px solid #e3e7ee;
  font-size: 14px;
  color: #0d0d0d;
}

.order-focus-money-row:last-child {
  border-bottom: none;
}

.order-focus-money-row.is-negative {
  background: #fffbfa;
}

.order-focus-money-row.is-warn {
  background: #fffaed;
}

.order-focus-money-row.is-positive {
  background: #f8fcf9;
}

.order-focus-money-time {
  font-size: 13px;
  color: #4a5565;
  font-weight: 600;
}

.order-focus-money-event {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.order-focus-money-event strong {
  font-size: 14px;
  color: #0d0d0d;
  font-weight: 600;
}

.order-focus-money-event em {
  font-style: normal;
  font-size: 12px;
  color: #6a7282;
}

.order-focus-money-amount {
  font-weight: 700;
  color: #0d0d0d;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.order-focus-money-amount.is-negative {
  color: #b3261e;
}

.order-focus-money-evidence {
  font-size: 13px;
  color: #4a5565;
  line-height: 1.35;
  word-break: break-all;
}

/* Evidence & Tally block */

.order-focus-evidence-card {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.order-focus-evidence-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.order-focus-evidence-block h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #0d0d0d;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.order-focus-evidence-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.order-focus-evidence-list li {
  display: grid;
  grid-template-columns: 120px minmax(140px, 1fr) minmax(200px, 2fr) 120px 120px;
  grid-gap: 12px;
  gap: 12px;
  padding: 10px 12px;
  background: #f7f9fc;
  border-radius: 6px;
  align-items: center;
  font-size: 13px;
}

.order-focus-evidence-type {
  color: #6a7282;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.order-focus-evidence-note {
  color: #4a5565;
  font-size: 13px;
}

.order-focus-evidence-amount {
  font-weight: 700;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.order-focus-evidence-list em {
  font-style: normal;
  font-size: 11px;
  color: #6a7282;
  text-align: right;
}

.order-focus-ledger-toggle {
  align-self: flex-start;
  padding: 8px 14px;
  border: 1px solid #b5bece;
  background: #ffffff;
  color: #0d0d0d;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.order-focus-ledger-toggle:hover {
  background: #eff2f6;
}

.order-focus-ledger-inline {
  margin-top: 10px;
  padding: 16px !important;
  border: 1px solid #dee2eb !important;
  border-radius: 8px;
}

.order-focus-ledger-inline h5 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: #4a5565;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Management block */

.order-focus-management-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.order-focus-management-current {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  background: #f7f9fc;
  border-radius: 8px;
}

.order-focus-management-current > span {
  font-size: 12px;
  color: #6a7282;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 600;
}

.order-focus-management-current strong {
  font-size: 16px;
  color: #0d0d0d;
}

.order-focus-management-current p {
  margin: 0;
  color: #292b30;
  font-size: 14px;
}

.order-focus-management-current small {
  font-size: 12px;
  color: #6a7282;
}

.order-focus-management-current em {
  font-style: normal;
  font-size: 12px;
  color: #4a5565;
  font-weight: 600;
}

.order-focus-management-history {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.order-focus-management-history > span {
  font-size: 13px;
  font-weight: 700;
  color: #0d0d0d;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.order-focus-management-history ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.order-focus-management-history li {
  padding: 10px 12px;
  background: #f7f9fc;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}

.order-focus-management-history strong {
  font-size: 13px;
  color: #0d0d0d;
}

.order-focus-management-history p {
  margin: 0;
  color: #292b30;
  font-size: 13px;
}

.order-focus-management-history small {
  color: #6a7282;
  font-size: 12px;
}

.order-focus-management-logistics {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.order-focus-management-logistics > span {
  font-size: 13px;
  font-weight: 700;
  color: #0d0d0d;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.order-focus-management-skus {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (max-width: 1000px) {
  .order-focus-money-head,
  .order-focus-money-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .order-focus-evidence-list li {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .order-focus-evidence-amount,
  .order-focus-evidence-list em {
    text-align: left;
  }
}

/* ─── Order summary polish ───────────────────────────────────────────────── */

.order-summary-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 28px;
  border: 1px solid #e4e7ec;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  max-height: none;
  overflow: visible;
}

.order-summary-page * {
  min-width: 0;
}

.order-detail-header {
  align-items: center;
  padding-bottom: 24px;
  border-bottom: 1px solid #eff2f6;
}

.order-detail-hero {
  align-items: center;
}

.order-detail-back {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border: 1px solid #dbe3ee;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.order-detail-back:hover {
  transform: translateY(-1px);
  border-color: #bfd8ff;
  background: #f0f7ff;
}

.order-detail-heading h2 {
  max-width: 100%;
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.12;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.order-detail-meta {
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
}

.order-detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid #e4e7ec;
  border-radius: 999px;
  background: #f8fafc;
  color: #4a5565;
  font-weight: 600;
}

.order-detail-status-row {
  max-width: 100%;
}

.order-status-chip {
  max-width: 100%;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.order-status-chip.is-blue {
  border-color: #bfd8ff;
  background: #e7f1ff;
  color: var(--blue-600);
}

.order-status-chip.is-green {
  border-color: #bbf7d0;
  background: #dcfce7;
  color: #047857;
}

.order-status-chip.is-amber {
  border-color: #fde68a;
  background: #fef3c7;
  color: #92400e;
}

.order-status-chip.is-neutral {
  border-color: #e4e7ec;
  background: #f8fafc;
  color: #4a5565;
}

.order-detail-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.order-detail-actions .secondary-button,
.order-detail-actions .primary-button {
  height: 40px;
  min-width: 124px;
  white-space: nowrap;
}

.order-section-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 6px;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: #f8fafc;
}

.order-section-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #344054;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.order-section-tab:hover,
.order-section-tab:focus-visible {
  border-color: #bfd8ff;
  background: #e7f1ff;
  color: var(--blue-600);
  outline: none;
}

.order-detail-layout {
  gap: 24px;
}

.order-detail-top-grid,
.order-detail-timeline-grid {
  gap: 24px;
}

.order-detail-top-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.order-detail-section {
  scroll-margin-top: 24px;
}

.order-detail-copy {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.order-detail-copy h3 {
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: 0;
}

.order-detail-copy p,
.timeline-copy p,
.timeline-subtitle {
  color: #667085;
  line-height: 1.45;
}

.order-detail-card,
.timeline-shell {
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.order-case-answer {
  border: 1px solid #e4e7ec;
  background: #f8fafc;
}

.order-case-answer span,
.order-case-route span,
.order-case-facts span,
.order-next-step span,
.order-recon-equation span,
.order-recon-simple-row span,
.order-oms-makeup > span,
.order-discount-main span {
  letter-spacing: 0;
}

.order-case-answer strong {
  font-size: clamp(20px, 2vw, 26px);
  letter-spacing: 0;
}

.order-case-route,
.order-next-step {
  padding: 14px 16px;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: #fff;
}

.order-case-facts {
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
}

.order-case-facts div,
.order-oms-makeup p,
.order-recon-equation div {
  border: 1px solid #e4e7ec;
  background: #fff;
}

.order-evidence-checklist span {
  border: 1px solid transparent;
  letter-spacing: 0;
}

.order-evidence-checklist .is-present {
  border-color: #bbf7d0;
}

.order-evidence-checklist .is-missing {
  border-color: #fde68a;
}

.order-recon-equation {
  grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr) 24px minmax(0, 1fr);
}

.order-recon-equation div {
  padding: 16px;
  background: #f8fafc;
}

.order-recon-equation strong {
  font-size: clamp(18px, 2vw, 24px);
  letter-spacing: 0;
}

.order-recon-operator {
  justify-content: center;
  font-size: 18px;
}

.order-recon-simple-list {
  border-color: #e4e7ec;
}

.order-recon-simple-row {
  border-bottom-color: #eff2f6;
}

.order-recon-simple-row > strong,
.order-oms-makeup strong,
.order-discount-side strong {
  letter-spacing: 0;
}

.order-oms-makeup div {
  grid-template-columns: repeat(auto-fit, minmax(116px, 1fr));
}

.order-ledger-card,
.order-evidence-card,
.order-sku-card {
  overflow-x: auto;
}

.order-ledger-section h4 {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0;
}

.order-ledger-head,
.order-ledger-row {
  grid-template-columns: minmax(168px, 1.2fr) minmax(88px, 0.6fr) minmax(88px, 0.6fr) minmax(96px, 0.7fr) minmax(220px, 1.6fr);
}

.order-ledger-head,
.order-evidence-head {
  background: #f2f5f9;
  color: #667085;
  letter-spacing: 0;
}

.order-ledger-row,
.order-evidence-row,
.order-evidence-mini-row {
  border-bottom-color: #eff2f6;
  line-height: 1.45;
}

.order-ledger-row.is-total {
  background: #f8fafc;
}

.order-discount-item,
.order-payment-evidence-item {
  border-color: #e4e7ec;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
}

.order-payment-evidence-item {
  grid-template-columns: minmax(0, 1fr) minmax(96px, auto) minmax(92px, auto);
}

.order-payment-evidence-item > span {
  max-width: 180px;
  border: 1px solid #bbf7d0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.timeline-shell {
  padding: 20px;
}

.timeline-list {
  max-height: 420px;
  padding-right: 4px;
}

.timeline-list li {
  min-height: auto;
}

.timeline-copy {
  gap: 4px;
}

.timeline-copy h4 {
  font-size: 15px;
  letter-spacing: 0;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.timeline-time {
  font-size: 13px;
  font-weight: 700;
}

.order-sku-card {
  padding: 18px;
}

.order-sku-table-shell {
  border: 1px solid #e4e7ec;
  border-radius: 8px;
}

.order-sku-head,
.order-sku-row {
  grid-template-columns: minmax(120px, 0.9fr) minmax(260px, 1.8fr) 56px 96px 96px 108px 96px minmax(132px, 1fr);
  gap: 12px;
  min-width: 980px;
}

.order-sku-head {
  padding: 12px 16px;
  border-radius: 0;
  background: #f2f5f9;
  color: #667085;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

.order-sku-row {
  align-items: flex-start;
  padding: 14px 16px;
  border-bottom-color: #eff2f6;
  color: #344054;
  font-size: 14px;
  line-height: 1.45;
}

.order-sku-row strong {
  font-size: 14px;
  overflow-wrap: anywhere;
}

.order-sku-name {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* ─── Icons ──────────────────────────────────────────────────────────────── */

.icon {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  color: #6a707c;
  background: transparent;
}

.icon-chevron { width: 14px; height: 8px; }
.icon-menu, .icon-user, .icon-close { width: 24px; height: 24px; }
.icon-arrow { width: 20px; height: 20px; }
.icon-trend { width: 12px; height: 12px; stroke-width: 1.5; }

/* ─── Data table ─────────────────────────────────────────────────────────── */

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th {
  background: #eff2f6;
  color: #292b30;
  font-weight: 500;
  font-size: 13px;
  padding: 10px 12px;
  text-align: left;
  border-radius: 4px;
}

.data-table td {
  padding: 12px 12px;
  border-bottom: 1px solid #b5bece;
  color: #0d0d0d;
  font-size: 14px;
}

.data-table tr:last-child td { border-bottom: 0; }

/* ─── Analytics tabs ─────────────────────────────────────────────────────── */

.analytics-tabs { flex-wrap: wrap; }

.analytics-kpi-rows {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.analytics-kpi-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.analytics-kpi-section-label {
  color: #101828;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.34px;
  padding: 0 4px;
}

.analytics-kpi-row {
  padding: 16px 24px;
  border-radius: 12px;
}

.analytics-kpi-row .home-kpi-value-row {
  align-items: center;
  justify-content: space-between;
}

.analytics-kpi-row .home-kpi-value {
  font-size: 28px;
  letter-spacing: 0.56px;
}

.analytics-order-recon-figma {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.analytics-order-recon-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.analytics-order-recon-section-title {
  margin: 0;
  padding: 0;
  color: #101828;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.34px;
}

.analytics-order-recon-kpi-card {
  display: grid;
  align-items: stretch;
  grid-gap: 12px;
  gap: 12px;
  min-width: 0;
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--bg-surface);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  overflow: visible;
}

.analytics-order-recon-kpi-card-4 {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
}

.analytics-order-recon-kpi-card-5 {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
}

.analytics-order-recon-kpi-item {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 14px;
}

.analytics-order-recon-kpi-label {
  color: #6a707c;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
}

.analytics-order-recon-kpi-value-row {
  display: flex;
  min-height: 30px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.analytics-order-recon-kpi-value {
  min-width: 0;
  color: #0d0d0d;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.56px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

.analytics-order-recon-kpi-value.is-risk-value {
  color: #b42318;
}

.analytics-order-recon-figma .home-gateway-vbar-card {
  min-height: 360px;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.analytics-order-recon-figma .home-gateway-vbar-chart {
  justify-content: flex-start;
  gap: 28px;
  padding: 0 4px 4px;
}

.analytics-order-recon-figma .home-gateway-vbar-col {
  flex: 0 0 86px;
  max-width: 86px;
}

.analytics-order-recon-figma .home-gateway-vbar-track {
  width: 64px;
}

.analytics-order-recon-exception-flow {
  min-height: 330px;
  padding: 20px 24px 18px;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.analytics-order-recon-exception-flow .home-chart-card-header {
  margin-bottom: 8px;
}

.analytics-order-recon-exception-flow .home-chart-card-title {
  color: #111827;
  font-size: 18px;
  line-height: 1.25;
}

.analytics-order-recon-exception-flow .home-chart-card-subtitle {
  color: #667085;
  font-size: 14px;
  line-height: 1.3;
}

.analytics-flow-bars {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 0;
  width: 100%;
  flex: 1 1 auto;
  justify-content: center;
}

.analytics-flow-bars-svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 310px;
  aspect-ratio: 970 / 290;
}

.analytics-flow-axis-label,
.analytics-flow-week-label {
  fill: #667085;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
}

.analytics-flow-bar-opened {
  fill: #0b63d8;
  filter: drop-shadow(0 0 0.5px rgba(11, 99, 216, 0.8));
}

.analytics-flow-bar-resolved {
  fill: #ff5b0a;
}

.analytics-flow-legend {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: -2px;
  color: #111827;
  font-size: 12px;
  font-weight: 500;
}

.analytics-flow-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.analytics-flow-legend-swatch {
  display: inline-block;
  width: 12px;
  height: 7px;
  border-radius: 1px;
}

.analytics-flow-legend-swatch.is-opened {
  background: #0b63d8;
}

.analytics-flow-legend-swatch.is-resolved {
  background: #ff5b0a;
}

.analytics-order-recon-flow-footer {
  justify-content: center;
  gap: 42px;
  padding-top: 14px;
  margin-top: 16px;
}

.analytics-order-recon-flow-footer .home-chart-footer-item {
  gap: 8px;
}

.analytics-order-recon-flow-footer .home-chart-footer-label {
  font-size: 12px;
}

.analytics-order-recon-flow-footer .home-chart-footer-value {
  font-size: 15px;
}

.kpi-trend-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  flex-shrink: 0;
}

.kpi-trend-pill-green {
  background: #ecfdf3;
  color: #027a48;
}

.kpi-trend-pill-red {
  background: #fff1f0;
  color: #b42318;
}

.kpi-trend-arrow {
  font-size: 10px;
}

.analytics-kpi-row-4 .home-kpi-item {
  flex: 1 1 25%;
}

.analytics-kpi-row-5 .home-kpi-item {
  flex: 1 1 20%;
}

.recon-mix-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-gap: 16px;
  gap: 16px;
  width: 100%;
  align-items: stretch;
}

.recon-mix-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #e6ebf2;
  border-radius: 18px;
  background: #f8fafc;
  overflow: hidden;
  min-height: 420px;
}

.recon-mix-card.is-expanded {
  border-color: #bfd6fe;
  background: #f3f8ff;
}

.recon-mix-trigger {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 20px;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.recon-mix-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.recon-mix-header h4 {
  margin: 0;
  color: #344054;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}

.recon-mix-summary {
  display: flex;
  width: 100%;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.recon-mix-summary strong {
  color: #101828;
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
}

.recon-mix-summary span {
  color: #6a7282;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.2;
}

.recon-mix-meta {
  color: #6a7282;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
}

.recon-mix-details {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 10px;
  padding: 0 20px 18px;
  min-height: 240px;
}

.recon-mix-detail-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-gap: 12px;
  gap: 12px;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid #dbe5f2;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  width: 100%;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.recon-mix-detail-row span {
  color: #475467;
  font-size: 13px;
  line-height: 1.4;
}

.recon-mix-detail-row.is-active {
  background: rgba(74, 151, 252, 0.08);
  border-radius: 12px;
  padding-inline: 10px;
}

.recon-mix-detail-row strong {
  color: #101828;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

.match-command-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-gap: 0;
  gap: 0;
  padding: 16px 24px;
}

.match-command-kpi {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 0 14px;
  border-right: 1px solid #d7dee8;
}

.match-command-kpi:last-child {
  border-right: none;
  padding-right: 0;
}

.match-command-kpi:first-child {
  padding-left: 0;
}

.match-command-kpi-label {
  margin: 0;
  color: #6a707c;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}

.match-command-kpi-value {
  margin: 0;
  color: #0d0d0d;
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.01em;
}

.match-command-kpi-meta {
  margin: 0;
  color: #6a7282;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─── Donut (exceptions analytics) ──────────────────────────────────────── */

.donut-chart-wrap { display: flex; align-items: center; gap: 48px; }
.donut-svg { display: block; width: 200px; height: 200px; flex-shrink: 0; }
.donut-legend { display: flex; flex-direction: column; gap: 14px; }

.donut-legend-item { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.donut-legend-label { flex: 1 1; color: #101828; font-weight: 500; }
.donut-legend-count { font-weight: 700; color: #101828; min-width: 32px; }
.donut-legend-pct { color: #6a7282; min-width: 48px; }

/* ─── Outcome buckets (recon engine) ─────────────────────────────────────── */

.outcome-buckets-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-gap: 16px;
  gap: 16px;
}

.outcome-bucket-card {
  padding: 20px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.status-category-table .simple-list-row { display: flex; align-items: center; gap: 0; }

/* ─── Order drilldown ────────────────────────────────────────────────────── */

.order-drilldown-search { width: 100%; }

.order-drilldown-search input {
  width: 100%;
  height: 44px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  padding: 0 16px;
  font-size: 16px;
  color: #0d0d0d;
  background: white;
  box-sizing: border-box;
  outline: none;
}

.order-drilldown-search input:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.order-drilldown-empty {
  padding: 32px 24px;
  background: #f8fafc;
  border-radius: 12px;
  color: #6a7282;
  font-size: 16px;
  text-align: center;
  border: 1px dashed #dbe3ee;
}

.order-drilldown-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-gap: 20px;
  gap: 20px;
  align-items: start;
}

.waterfall-table { font-size: 14px; }

/* ─── Sidebar controls ───────────────────────────────────────────────────── */

.sidebar-controls { display: flex; flex-direction: column; gap: 12px; padding: 4px 0; }
.sidebar-divider { height: 1px; background: #eff2f6; margin: 4px 0; }
.sidebar-control-group { display: flex; flex-direction: column; gap: 4px; }

.sidebar-control-label {
  font-size: 11px;
  color: #6a707c;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.sidebar-control-input {
  width: 100%;
  border: 1px solid #dbe3ee;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 13px;
  color: #0d0d0d;
  background: #f8fafc;
  box-sizing: border-box;
  outline: none;
}

.sidebar-control-input:focus { border-color: var(--blue-500); }

/* ─── Back button ────────────────────────────────────────────────────────── */

.summary-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--blue-500);
  border-radius: 8px;
  color: var(--blue-500);
  font-size: 14px;
  font-weight: 600;
  background: white;
  width: auto;
  height: auto;
}

/* ─── Filter panel ───────────────────────────────────────────────────────── */

.filter-panel {
  padding: 16px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #dbe3ee;
  animation: slideDown 140ms ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Skeleton loading ───────────────────────────────────────────────────── */

.skeleton-block {
  display: inline-block;
  border-radius: 6px;
  background: linear-gradient(90deg, #e9edf2 25%, #f5f7fa 50%, #e9edf2 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
  vertical-align: middle;
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── Data hub ───────────────────────────────────────────────────────────── */

.data-hub-layout { gap: 24px; }

.data-hub-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.page-header-data-hub {
  gap: 16px;
}

.data-hub-tabs-row {
  justify-content: flex-start;
  gap: 12px;
}

.data-hub-cta {
  min-width: 120px;
  height: 40px;
  gap: 10px;
  padding: 0 16px;
  font-size: 16px;
  font-weight: 700;
}

.data-hub-cta .icon {
  width: 16px;
  height: 16px;
}

.data-source-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.data-source-card,
.data-pipelines-surface {
  background: #fff;
  border-radius: 12px;
}

.data-source-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  min-height: 214px;
  padding: 24px;
  border: 1px solid #eef2f6;
}

.data-source-card-main {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.data-source-card-top,
.data-source-card-brand,
.data-source-health-copy,
.pipeline-table-header,
.pipeline-table-row,
.pipeline-pagination {
  display: flex;
  align-items: center;
}

.data-source-card-top,
.data-source-health-copy,
.pipeline-pagination {
  justify-content: space-between;
}

.data-source-card-brand {
  gap: 10px;
  min-width: 0;
}

.data-source-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 10px;
  background: #e2efff;
  color: #0247a1;
}

.data-source-card-icon .icon {
  width: 20px;
  height: 20px;
}

.data-source-card h3 {
  margin: 0;
  color: #101828;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
}

.data-source-card p {
  margin: 0;
  color: #6a7282;
  font-size: 14px;
  line-height: 1.35;
}

.data-source-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex-shrink: 0;
}

.data-source-status-dot.is-healthy { background: #10b981; }
.data-source-status-dot.is-warning { background: #f59e0b; }
.data-source-status-dot.is-alert { background: #e10909; }

.data-source-health {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.data-source-health-copy span,
.pipeline-summary-card span {
  color: #6a707c;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}

.data-source-health-copy strong,
.pipeline-summary-card strong {
  color: #0d0d0d;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.data-source-progress {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: #ebeff4;
  overflow: hidden;
}

.data-source-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #10b981;
}

.data-source-health p {
  align-self: flex-end;
  font-size: 12px;
  line-height: 1.2;
}

.data-source-meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.data-source-meta-strip span,
.source-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f5f8fc;
  color: #344054;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

.data-source-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-gap: 12px;
  gap: 12px;
}

.data-source-button {
  min-width: 0;
  justify-content: center;
  height: 36px;
  padding: 0 14px;
  gap: 8px;
  font-size: 14px;
  letter-spacing: 0;
}

.data-source-button .icon {
  width: 16px;
  height: 16px;
}

.data-pipelines-surface {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px;
  border: 1px solid #eef2f6;
}

.pipeline-summary-strip {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  grid-gap: 0;
  gap: 0;
  align-items: stretch;
}

.pipeline-summary-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  width: 100%;
  border-radius: 8px;
  background: #fff;
  text-align: left;
}

.pipeline-summary-card.is-selected {
  background: #e2efff;
  border-radius: 8px;
}

.pipeline-summary-card.is-selected span,
.pipeline-summary-card.is-selected strong {
  color: #0247a1;
}

.pipeline-summary-card strong {
  font-size: 28px;
  line-height: 1.1;
}

.pipeline-summary-divider {
  width: 1px;
  background: #d0d6e1;
}

.pipeline-table {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.pipeline-table-header,
.pipeline-table-row {
  display: grid;
  grid-template-columns: 1.65fr 1.7fr 0.85fr 0.75fr 0.72fr 0.55fr;
  grid-gap: 12px;
  gap: 12px;
  padding: 12px 16px;
  min-width: 0;
}

.pipeline-table-header {
  background: #eff2f6;
  border-radius: 8px;
  color: #292b30;
  font-size: 14px;
  font-weight: 500;
}

.pipeline-table-row {
  border-bottom: 1px solid #d0d6e1;
  color: #0d0d0d;
  font-size: 14px;
  font-weight: 500;
}

.pipeline-table-row:last-child {
  border-bottom: 0;
}

.pipeline-table-row strong,
.pipeline-table-row span {
  min-width: 0;
}

.pipeline-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: -moz-fit-content;
  width: fit-content;
  min-width: 44px;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}

.pipeline-status-pill.is-success { background: #10b981; }
.pipeline-status-pill.is-failed { background: #ef4444; }
.pipeline-status-pill.is-running { background: #f59e0b; }
.pipeline-status-pill.is-queued { background: #6a707c; }

.pipeline-run-button,
.pipeline-next-button {
  padding: 0;
  background: transparent;
  color: #0362dd;
  font-size: 14px;
  font-weight: 700;
}

.pipeline-next-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pipeline-next-button .icon {
  width: 14px;
  height: 14px;
}

.pipeline-next-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pipeline-pagination p {
  margin: 0;
  color: #6a707c;
  font-size: 14px;
  font-weight: 500;
}

.data-hub-config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 16px;
  gap: 16px;
}

.data-hub-config-grid .filter-input[readonly] {
  background: #f8fafc;
  color: #344054;
}

.data-hub-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 24px;
  gap: 24px;
}

.data-hub-detail-card {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px;
}

.detail-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-gap: 12px;
  gap: 12px;
}

.detail-stat {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 110px;
  padding: 18px 16px;
  border: 1px solid #eff2f6;
  border-radius: 10px;
  background: #fafcff;
}

.detail-kicker {
  color: #6a707c;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}

.detail-stat strong {
  color: #101828;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
}

.data-hub-detail-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.detail-block {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.detail-block h4,
.connector-card h4 {
  margin: 0;
  color: #101828;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
}

.mapping-table {
  display: flex;
  flex-direction: column;
  border: 1px solid #eff2f6;
  border-radius: 10px;
  overflow: hidden;
}

.mapping-table-head,
.mapping-table-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-gap: 12px;
  gap: 12px;
  padding: 12px 14px;
}

.mapping-table-head {
  background: #eff2f6;
  color: #344054;
  font-size: 13px;
  font-weight: 600;
}

.mapping-table-row {
  border-top: 1px solid #eff2f6;
  color: #344054;
  font-size: 14px;
  line-height: 1.5;
}

.mapping-table-row strong {
  color: #0d0d0d;
  font-weight: 700;
}

.source-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding-left: 18px;
  color: #344054;
  font-size: 14px;
  line-height: 1.6;
}

.feature-list strong {
  color: #0d0d0d;
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #eff2f6;
  border-radius: 10px;
  background: #fcfdff;
}

.activity-dot {
  width: 12px;
  height: 12px;
  margin-top: 5px;
  border-radius: 999px;
  flex-shrink: 0;
}

.activity-dot.is-success { background: #10b981; }
.activity-dot.is-warning { background: #f59e0b; }
.activity-dot.is-info { background: #0362dd; }

.activity-body {
  display: flex;
  flex: 1 1;
  flex-direction: column;
  gap: 6px;
}

.activity-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.activity-heading strong {
  color: #101828;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.activity-heading span {
  color: #6a7282;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.activity-body p,
.connector-card p,
.connector-note {
  margin: 0;
  color: #6a7282;
  font-size: 14px;
  line-height: 1.55;
}

.data-hub-note {
  padding: 16px 18px;
  border-radius: 10px;
  background: #f8fbff;
  color: #344054;
  font-size: 14px;
  line-height: 1.6;
}

.pipeline-stage-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pipeline-stage {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px;
  border: 1px solid #eff2f6;
  border-radius: 10px;
  background: #fcfdff;
}

.pipeline-stage-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pipeline-stage-heading strong {
  color: #101828;
  font-size: 15px;
  font-weight: 700;
}

.pipeline-stage p {
  margin: 0;
  color: #6a7282;
  font-size: 14px;
  line-height: 1.55;
}

.connector-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-gap: 16px;
  gap: 16px;
}

.connector-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
  border: 1px solid #eff2f6;
  border-radius: 12px;
  background: #fff;
}

.connector-card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.connector-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.connector-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 16px;
  gap: 16px;
}

.connector-form-full {
  grid-column: 1 / -1;
}

/* ─── Manage dialog ─────────────────────────────────────────────────────── */

.manage-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(13, 13, 13, 0.16);
  -webkit-backdrop-filter: blur(2px);
          backdrop-filter: blur(2px);
}

.manage-dialog {
  width: min(100%, 468px);
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 14px 52px rgba(0, 0, 0, 0.1);
}

.manage-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.manage-dialog h3 {
  margin: 0;
  color: #101828;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
}

.manage-dialog-header p {
  margin: 0;
  color: #6a7282;
  font-size: 16px;
  line-height: 1.4;
}

.manage-dialog-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  color: #0362dd;
  background: transparent;
  border-radius: 8px;
}

.manage-dialog-close .icon {
  width: 16px;
  height: 16px;
}

.manage-field {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.manage-field > span {
  color: #0d0d0d;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
}

.manage-select-shell {
  position: relative;
}

.manage-select,
.manage-field textarea {
  width: 100%;
  border: 1px solid #95a0b1;
  border-radius: 8px;
  background: #fff;
  color: #0d0d0d;
}

.manage-select {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  padding: 10px 16px;
  font-size: 16px;
  font-weight: 500;
  text-align: left;
}

.manage-select.is-open {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.manage-select .icon {
  width: 16px;
  height: 16px;
}

.manage-select-menu {
  position: absolute;
  top: calc(100% - 1px);
  left: 0;
  right: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid #95a0b1;
  border-top: 0;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.18);
}

.manage-select-menu button {
  width: 100%;
  padding: 12px 16px;
  background: #fff;
  border-top: 1px solid #dbe3ee;
  color: #0d0d0d;
  font-size: 16px;
  font-weight: 500;
  text-align: left;
}

.manage-select-menu button:first-child {
  border-top: 0;
}

.manage-select-menu button:hover,
.manage-select-menu button.is-selected {
  background: #f8fafc;
}

.manage-field textarea {
  min-height: 152px;
  padding: 12px 16px;
  resize: vertical;
  font: inherit;
  line-height: 1.4;
  outline: none;
}

.manage-field textarea::placeholder {
  color: #95a0b1;
}

.manage-native-select {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 40px;
  opacity: 0;
  cursor: pointer;
}

.manage-dialog-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 16px;
  gap: 16px;
}

.manage-dialog-button {
  min-width: 0;
  width: 100%;
  justify-content: center;
  height: 36px;
  padding: 0 16px;
  font-size: 14px;
}

/* ─── Login page ─────────────────────────────────────────────────────────── */

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-page);
  padding: 24px;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(360px, 0.96fr);
  grid-gap: 48px;
  gap: 48px;
  width: min(100%, 1020px);
  min-height: 685px;
  padding: 12px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 14px 52px rgba(0, 0, 0, 0.1);
}

.login-brand-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 72px 48px 48px;
  border-radius: 8px;
  background: linear-gradient(180deg, #0362dd 0%, #0247a1 100%);
}

.login-brand-copy {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.login-brand-copy p {
  margin: 0;
  color: white;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.15em;
  line-height: 1.4;
  text-transform: uppercase;
}

.login-brand-logo {
  width: min(100%, 363px);
  height: auto;
  filter: brightness(0) invert(1);
}

.login-brand-heading {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  color: white;
  font-size: 32px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.05em;
}

.login-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 64px;
}

.login-card-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 36px;
}

.login-card h2 {
  margin: 0;
  color: #101828;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.02em;
}

.login-card p {
  margin: 0;
  color: #6a7282;
  font-size: 16px;
  line-height: 1.4;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.login-field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.login-field label {
  font-size: 16px;
  font-weight: 500;
  color: #0d0d0d;
  line-height: 1.4;
}

.login-field input {
  height: 40px;
  border: 1px solid #95a0b1;
  border-radius: 8px;
  padding: 0 16px;
  font-size: 16px;
  color: #0d0d0d;
  background: white;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.login-field input::placeholder {
  color: #95a0b1;
}

.login-field input:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(3, 98, 221, 0.12);
}

.login-link-button {
  padding: 0;
  background: transparent;
  color: #0362dd;
  font-size: 14px;
  font-weight: 700;
}

.login-submit {
  width: 100%;
  height: 40px;
  border: 0;
  border-radius: 8px;
  background: var(--blue-500);
  color: white;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 4px;
  transition: background 160ms ease, transform 120ms ease;
}

.login-submit:hover { background: var(--blue-600); transform: translateY(-1px); }
.login-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.login-error {
  margin: 0;
  padding: 10px 14px;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  color: #b91c1c;
  font-size: 14px;
  line-height: 1.4;
}

@media (max-width: 1260px) {
  .data-source-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .data-hub-detail-grid,
  .data-hub-detail-columns,
  .connector-grid,
  .detail-stat-grid,
  .gateway-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pipeline-summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .pipeline-summary-divider {
    display: none;
  }
}

@media (max-width: 900px) {
  .login-shell {
    grid-template-columns: 1fr;
    gap: 20px;
    min-height: auto;
  }

  .login-brand-panel,
  .login-card {
    padding: 32px 24px;
  }

  .login-brand-panel {
    min-height: 280px;
  }

  .data-source-grid,
  .data-source-actions,
  .data-hub-config-grid,
  .data-hub-detail-grid,
  .data-hub-detail-columns,
  .detail-stat-grid,
  .connector-grid,
  .connector-form-grid,
  .manage-dialog-actions,
  .pipeline-summary-strip,
  .gateway-summary-grid,
  .gateway-summary-metric-grid {
    grid-template-columns: 1fr;
  }

  .pipeline-table {
    overflow-x: auto;
  }

  .pipeline-table-header,
  .pipeline-table-row {
    min-width: 860px;
  }

  .activity-heading {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 1260px) {
  .analytics-demo,
  .analytics-demo.sidebar-is-collapsed {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
  }

  .app-main-shell {
    gap: 20px;
  }

  .app-topnav {
    position: static;
  }

  .sidebar {
    width: 100%;
    height: auto;
    min-height: auto;
    max-height: none;
    position: static;
    overflow: visible;
    border-right: 1px solid rgba(226, 232, 240, 0.72);
    border-radius: 16px;
  }

  .sidebar.is-collapsed {
    align-items: stretch;
    width: 100%;
  }

  .sidebar.is-collapsed .nav-item {
    justify-content: flex-start;
  }

  .sidebar-brand {
    height: 64px;
  }

  .sidebar-nav {
    flex: 0 0 auto;
    flex-direction: row;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
  }

  .nav-group {
    flex: 1 1 auto;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }

  .sidebar.is-collapsed .nav-group {
    width: auto;
  }

  .nav-item {
    width: auto;
    min-height: 44px;
    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.25;
    letter-spacing: 0;
  }

  .content-column {
    margin-left: 0;
    max-height: none;
    padding-top: 0;
    overflow: visible;
    scrollbar-width: auto;
  }

  .analytics-order-recon-kpi-card,
  .analytics-order-recon-kpi-card-4,
  .analytics-order-recon-kpi-card-5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }

  .analytics-order-recon-kpi-card .home-kpi-divider {
    display: none;
  }

  .overview-card,
  .recon-metric-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-gap: 24px 0;
    gap: 24px 0;
  }

  .recon-metric-row .metric-divider {
    display: none;
  }

  .breakdown-visual,
  .order-detail-top-grid,
  .order-detail-timeline-grid,
  .recon-summary-grid {
    grid-template-columns: 1fr;
    display: grid;
    grid-gap: 24px;
    gap: 24px;
  }

  .breakdown-grid,
  .recon-summary-stat-grid { width: 100%; grid-template-columns: repeat(2, minmax(220px, 1fr)); }
  .detail-card-grid, .detail-two-column { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-recon-tally-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .order-story-signal-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .page-controls,
  .page-title-bar,
  .section-header,
  .recon-toolbar,
  .recon-pagination {
    align-items: flex-start;
    flex-direction: column;
  }

  .table-header-row, .table-row { min-width: 0; }
  .table-shell { overflow-x: auto; }
  .recon-order-search { width: 100%; min-width: 0; }
  .recon-order-search-input { width: 100%; min-width: 0; }

  .summary-list-row,
  .summary-order-row,
  .summary-order-heading,
  .summary-order-supporting,
  .summary-order-secondary,
  .summary-order-side {
    align-items: flex-start;
    flex-direction: column;
  }

  .summary-order-row {
    grid-template-columns: 1fr;
  }

  .summary-order-delta {
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
  .analytics-demo,
  .analytics-demo.sidebar-is-collapsed {
    gap: 16px;
    padding: 12px;
  }

  .app-topnav {
    height: 56px;
    padding: 0;
  }

  .sidebar {
    gap: 10px;
  }

  .sidebar-logo-img {
    height: 18px;
  }

  .sidebar-logo-img.is-compact {
    width: 24px;
    height: 20px;
  }

  .sidebar-nav {
    gap: 8px;
    overflow-x: auto;
    padding: 12px;
    padding-bottom: 2px;
  }

  .nav-group {
    flex: 0 0 auto;
    flex-wrap: nowrap;
  }

  .sidebar.is-collapsed .nav-group {
    width: auto;
  }

  .nav-item,
  .sidebar.is-collapsed .nav-item {
    justify-content: center;
    min-width: 40px;
    min-height: 36px;
    padding: 8px;
  }

  .brand-name { font-size: 24px; }

  .content-column,
  .dashboard-content {
    gap: 16px;
    padding: 0;
  }

  .analytics-order-recon-kpi-card,
  .analytics-order-recon-kpi-card-4,
  .analytics-order-recon-kpi-card-5 {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 16px;
  }

  .analytics-order-recon-kpi-value {
    font-size: 26px;
  }

  .order-summary-page {
    gap: 20px;
    padding: 12px;
  }

  .order-section-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 4px;
    scrollbar-width: none;
  }

  .order-section-tabs::-webkit-scrollbar {
    display: none;
  }

  .order-section-tab {
    flex: 0 0 auto;
    min-height: 34px;
    padding-inline: 12px;
  }

  .order-detail-card,
  .timeline-shell {
    border-radius: 8px;
    padding: 16px;
  }

  .order-detail-heading {
    min-width: 0;
  }

  .order-detail-heading h2 {
    font-size: 18px;
    overflow-wrap: anywhere;
  }

  .tab-list, .page-controls, .page-actions-inline, .recon-toolbar-actions, .recon-order-search { width: 100%; }

  .tab-button, .tab-button:first-child,
  .date-chip, .primary-button, .secondary-button, .user-menu { width: 100%; }

  .overview-card, .recon-metric-row, .breakdown-grid,
  .recon-summary-stat-grid,
  .detail-grid, .detail-card-grid, .detail-two-column,
  .order-detail-grid,
  .order-waterfall-kpis,
  .order-recon-tally-grid { grid-template-columns: 1fr; }

  .order-story-signal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .order-context-card,
  .order-recon-equation,
  .order-discount-item,
  .order-payment-evidence-item {
    grid-template-columns: 1fr;
  }

  .order-case-facts {
    grid-template-columns: 1fr;
  }

  .order-recon-operator {
    display: none;
  }

  .order-oms-makeup div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .order-discount-side,
  .order-payment-evidence-item > strong,
  .order-payment-evidence-item > span {
    align-items: flex-start;
    justify-self: start;
    text-align: left;
  }

  .order-detail-header,
  .order-detail-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .order-detail-actions .menu-wrap,
  .order-detail-actions .secondary-button,
  .order-detail-actions .primary-button {
    width: 100%;
  }

  .order-detail-hero {
    width: 100%;
  }

  .order-detail-meta {
    flex-direction: column;
    gap: 4px;
    font-size: 14px;
  }

  .order-detail-grid-span {
    grid-column: auto;
  }

  .order-ledger-card,
  .order-evidence-card {
    overflow-x: auto;
  }

  .order-ledger-section,
  .order-evidence-table {
    min-width: 720px;
  }

  .order-evidence-stack {
    min-width: 640px;
  }

  .order-waterfall-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .order-sku-card {
    padding-inline: 12px;
    overflow-x: auto;
  }

  .timeline-list {
    max-height: 320px;
  }

  .order-sku-head,
  .order-sku-row {
    min-width: 860px;
  }
  .metric-divider { display: none; }
  .outcome-buckets-grid, .order-drilldown-grid { grid-template-columns: 1fr; }
  .donut-chart-wrap { flex-direction: column; align-items: flex-start; }
}

/* ─── Filter select (dropdown) ───────────────────────────────────────────── */

.filter-select {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  font-size: 14px;
  color: #0d0d0d;
  background: white;
  outline: none;
  -webkit-appearance: auto;
     -moz-appearance: auto;
          appearance: auto;
  cursor: pointer;
  transition: border-color 140ms ease, box-shadow 140ms ease;
  font-family: inherit;
}

.filter-select:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(3, 98, 221, 0.1);
}

/* ─── Modal cancel button ─────────────────────────────────────────────────── */

.modal-cancel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 99px;
  height: 40px;
  padding: 0 20px;
  border: 1.5px solid var(--blue-500);
  border-radius: 8px;
  background: white;
  color: var(--blue-500);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 140ms ease, transform 120ms ease;
}
.modal-cancel-btn:hover:not(:disabled) { background: #f0f7ff; transform: translateY(-1px); }
.modal-cancel-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ─── Sort header button ──────────────────────────────────────────────────── */

.sort-header-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: 0;
  padding: 0;
  font-size: 14px;
  font-weight: 500;
  color: #292b30;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: color 120ms ease;
}
.sort-header-btn:hover { color: var(--blue-600); }
.sort-header-btn.sort-active { color: var(--blue-600); font-weight: 700; }

.sort-arrow {
  font-size: 12px;
  opacity: 0.7;
}

/* ─── Toast notification ─────────────────────────────────────────────────── */

.toast-notification {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.16);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  max-width: 420px;
  animation: toast-in 200ms ease;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.toast-success {
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  color: #065f46;
}

.toast-error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #b91c1c;
}

.toast-message { flex: 1 1; }

.toast-close {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: transparent;
  border: 0;
  border-radius: 4px;
  color: inherit;
  font-size: 14px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 120ms ease;
}
.toast-close:hover { opacity: 1; }

/* ─── Action options (legacy, kept for compatibility) ─────────────────────── */

.action-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.action-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease;
}
.action-option input[type="radio"] { flex-shrink: 0; margin-top: 3px; accent-color: var(--blue-500); width: 16px; height: 16px; cursor: pointer; }
.action-option:hover { background: #f8fafc; }
.action-option.is-selected { border-color: var(--blue-500); background: #f0f7ff; }

.action-option-copy { display: flex; flex-direction: column; gap: 2px; }
.action-option-label { font-size: 14px; font-weight: 600; color: #101828; line-height: 1.4; }
.action-option-desc { font-size: 13px; color: #6a7282; line-height: 1.4; }

/* ─── Select-all banner ──────────────────────────────────────────────────── */

.select-all-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 16px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  font-size: 14px;
  color: #1e40af;
  line-height: 1.5;
}
.select-all-banner-full { background: #e0f2fe; border-color: #7dd3fc; color: #0369a1; }
.select-all-banner-link {
  font-size: 14px;
  font-weight: 700;
  color: var(--blue-500);
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ─── Filter active badge ────────────────────────────────────────────────── */

.filter-active-badge {
  display: inline;
  color: var(--blue-500);
  font-weight: 600;
}

.filter-btn-active {
  border-color: var(--blue-500) !important;
  color: var(--blue-500) !important;
  background: #f0f7ff !important;
}

.button-spinner {
  width: 16px;
  height: 16px;
  animation: button-spin 900ms linear infinite;
}

.button-spinner circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 42 18;
}

@keyframes button-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ─── Modal overlay & dialog ─────────────────────────────────────────────── */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 24, 40, 0.45);
  padding: 24px;
  animation: fadeIn 120ms ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-dialog {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 48px);
  background: white;
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(16, 24, 40, 0.18);
  animation: scaleIn 140ms ease;
  overflow: hidden;
}

.modal-dialog-wide { max-width: 640px; }

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 24px 0;
}

.modal-title {
  margin: 0;
  color: #101828;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
}

.modal-subtitle {
  margin: 4px 0 0;
  color: #6a7282;
  font-size: 14px;
  line-height: 1.5;
}

.modal-close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f5f7fa;
  border: 0;
  border-radius: 8px;
  color: #6a7282;
  font-size: 16px;
  cursor: pointer;
  transition: background 120ms ease;
}
.modal-close:hover { background: #e9edf2; color: #101828; }

.modal-body {
  flex: 1 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid #eff2f6;
}

/* ─── Filter dialog internals ────────────────────────────────────────────── */

.filter-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-label {
  font-size: 13px;
  font-weight: 600;
  color: #344054;
  letter-spacing: 0.01em;
}

.filter-input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  font-size: 14px;
  color: #0d0d0d;
  background: white;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.filter-input:focus { border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(3, 98, 221, 0.1); }

.filter-checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.filter-checkbox-grid-2col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 8px 16px;
  gap: 8px 16px;
}

.filter-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #344054;
  cursor: pointer;
  line-height: 1.5;
}
.filter-checkbox-label input { flex-shrink: 0; accent-color: var(--blue-500); width: 16px; height: 16px; cursor: pointer; }

.filter-radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  font-size: 14px;
  color: #0d0d0d;
  background: white;
  resize: vertical;
  font-family: inherit;
  outline: none;
  transition: border-color 140ms ease;
}
.filter-textarea:focus { border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(3, 98, 221, 0.1); }

/* ═══════════════════════════════════════════════════════════════════════════
   HOME PAGE
   ═══════════════════════════════════════════════════════════════════════════ */

.home-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px 0 40px;
}

/* ── Loading skeleton ──────────────────────────────────────────────────── */

.home-loading {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.home-skeleton {
  background: linear-gradient(90deg, #e9ecf1 25%, #f3f5f8 50%, #e9ecf1 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease infinite;
  border-radius: 12px;
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.home-skeleton-title { height: 34px; width: 220px; border-radius: 6px; }
.home-skeleton-tabs  { height: 40px; width: 300px; border-radius: 8px; }
.home-skeleton-kpi-bar { height: 124px; width: 100%; }
.home-skeleton-charts  { height: 516px; width: 100%; }

/* ── Section header (page header with title + tabs + controls) ─────── */

.home-section-header {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.home-section-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.home-refresh-stamp {
  color: #6a7282;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  text-align: right;
}

/* ── KPI Overview Bar ──────────────────────────────────────────────── */

.home-kpi-bar {
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  padding: 16px 24px;
  overflow: visible;
  gap: 0;
}

.home-kpi-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1;
  width: auto;
  min-width: 0;
  padding: 0 14px;
  overflow: visible;
  position: relative;
}

.home-kpi-bar > .home-kpi-item:first-child {
  padding-left: 0;
}

.home-kpi-bar > .home-kpi-item:last-child {
  padding-right: 0;
}

.home-kpi-label {
  display: block;
  max-width: 100%;
  font-size: 16px;
  font-weight: 700;
  color: #6a707c;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-kpi-period {
  color: #98a2b3;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.home-metric-label {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  width: 100%;
  position: relative;
  overflow: visible;
}

.home-metric-label-text {
  min-width: 0;
  flex: 1 1 auto;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-metric-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  color: #98a2b3;
  cursor: help;
  outline: none;
}

.home-metric-help:hover,
.home-metric-help:focus-visible {
  color: #0362dd;
}

.home-metric-tooltip {
  position: fixed;
  width: 260px;
  max-width: min(320px, 60vw);
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #dbe3ee;
  background: #ffffff;
  color: #101828;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
  white-space: normal;
  box-shadow: 0 18px 44px rgba(16, 24, 40, 0.18);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 140ms ease, visibility 140ms ease;
  z-index: 10000;
}

.home-metric-tooltip-portal {
  transform: translateY(calc(-100% - 10px));
  opacity: 1;
  visibility: visible;
}

.home-metric-help:hover .home-metric-tooltip,
.home-metric-help:focus-visible .home-metric-tooltip {
  opacity: 1;
  visibility: visible;
}

.home-kpi-value-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 8px;
  min-height: 34px;
  width: 100%;
}

.home-kpi-value {
  flex: 1 1 auto;
  min-width: 0;
  font-size: clamp(30px, 2.25vw, 36px);
  font-weight: 700;
  color: #0d0d0d;
  line-height: 1;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

.home-kpi-value.is-risk-value {
  color: #b43d16;
}

.home-kpi-benchmark {
  color: #6a7282;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.home-kpi-value-context {
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: 0;
  white-space: normal;
}

.home-tone-good {
  color: #067647;
}

.home-tone-risk {
  color: #b42318;
}

.home-tone-neutral {
  color: #667085;
}

.home-kpi-divider {
  width: 1px;
  align-self: stretch;
  min-height: 92px;
  background: #d7dee8;
  flex-shrink: 0;
}

/* ── Trend pill ────────────────────────────────────────────────────── */

.home-trend-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  max-width: min(100%, 88px);
  padding: 0 7px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 500;
  color: white;
  white-space: nowrap;
  flex: 0 1 auto;
  align-self: flex-start;
  margin-bottom: 2px;
  overflow: hidden;
}

.home-trend-green { background: #10b981; }
.home-trend-red   { background: #e10909; }
.home-trend-amber { background: #f79009; }

.home-trend-pill svg { flex-shrink: 0; }
.home-trend-pill-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Chart row (2-up side by side) ─────────────────────────────────── */

.home-chart-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 20px;
  gap: 20px;
  align-items: start;
}

.home-chart-row-equal {
  align-items: stretch;
}

.home-insight-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.home-insight-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  padding: 10px 0;
  border-bottom: 1px solid #eef2f6;
}

.home-insight-row:last-child {
  border-bottom: 0;
}

.home-insight-label,
.home-insight-value {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.home-insight-label {
  color: #344054;
  font-size: 14px;
  font-weight: 600;
}

.home-insight-value {
  flex-shrink: 0;
  color: #667085;
  font-size: 13px;
  font-weight: 600;
}

.home-insight-value strong {
  color: #101828;
  font-size: 18px;
  line-height: 1;
}

.home-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}

.home-chart-row-equal > .home-chart-card,
.home-chart-row-equal > .home-insight-card {
  height: 100%;
}

.home-chart-row-recon-balanced {
  align-items: stretch;
  height: clamp(360px, 34vw, 430px);
  min-height: 0;
}

.home-chart-row-recon-balanced > .home-chart-card,
.home-chart-row-recon-balanced > .home-insight-card {
  height: 100%;
  min-height: 0;
}

.home-chart-row-recon-balanced .home-gateway-card-compact .home-gateway-scorecard {
  height: 100%;
  min-height: 0;
}

.home-chart-row-recon-stacked {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── Chart card ────────────────────────────────────────────────────── */

.home-chart-card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  overflow: visible;
}

.home-chart-card-full {
  grid-column: 1 / -1;
}

.home-chart-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.home-chart-card-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.home-chart-card-title {
  font-size: 20px;
  font-weight: 700;
  color: #101828;
  letter-spacing: -0.44px;
  line-height: normal;
  margin: 0;
}

.home-chart-card-subtitle {
  font-size: 16px;
  font-weight: 500;
  color: #6a7282;
  line-height: normal;
  margin: 0;
}

.home-chart-card-note {
  margin: 6px 0 0;
  color: #98a2b3;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.home-chart-card-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* ── Line chart ────────────────────────────────────────────────────── */

.home-line-chart {
  width: 100%;
  flex: 1 1;
}

.home-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-bottom: 8px;
}

.home-chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #6a7282;
  font-size: 12px;
  font-weight: 600;
}

.home-chart-legend-line {
  width: 20px;
  height: 0;
  border-top-width: 2px;
  border-top-style: solid;
  flex-shrink: 0;
}

.home-chart-legend-line-current {
  border-top-color: #9bc7fd;
}

.home-chart-legend-line-rolling {
  border-top-color: #0362dd;
}

.home-chart-legend-line-previous {
  border-top-color: #98a2b3;
  border-top-style: dashed;
}

.home-chart-legend-line-target {
  border-top-color: #10b981;
  border-top-style: dashed;
}

.home-line-chart-svg {
  width: 100%;
  height: auto;
  display: block;
}

.home-chart-axis-label {
  font-size: 12px;
  font-family: var(--font-body);
  fill: #9ca3af;
  font-weight: 500;
}

.home-chart-tt-date {
  font-size: 11px;
  font-family: var(--font-body);
  font-weight: 700;
  fill: #101828;
}

.home-chart-tt-label {
  font-size: 11px;
  font-family: var(--font-body);
  font-weight: 500;
  fill: #667085;
}

.home-chart-tt-value {
  font-size: 11px;
  font-family: var(--font-body);
  font-weight: 700;
  fill: #101828;
}

.home-chart-tt-good { fill: #10b981; }
.home-chart-tt-risk { fill: #e10909; }

.home-chart-target-line {
  stroke: #10b981;
  stroke-width: 1.5;
  stroke-dasharray: 6 6;
}

.home-chart-path {
  stroke-linejoin: round;
  stroke-linecap: round;
  stroke-width: 2;
}

.home-chart-path-current {
  stroke: #9bc7fd;
}

.home-chart-path-rolling {
  stroke: #0362dd;
  stroke-width: 3;
}

.home-chart-path-previous {
  stroke: #98a2b3;
  stroke-dasharray: 6 6;
}

.home-chart-point-rolling {
  fill: #0362dd;
  stroke: #fff;
  stroke-width: 2;
}

/* ── Chart footer ──────────────────────────────────────────────────── */

.home-chart-footer {
  display: flex;
  align-items: center;
  gap: 32px;
  padding-top: 16px;
  border-top: 1px solid #f3f4f6;
  margin-top: 8px;
}

.home-chart-footer-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.home-chart-footer-label {
  font-size: 14px;
  font-weight: 500;
  color: #6a7282;
}

.home-chart-footer-value {
  font-size: 18px;
  font-weight: 700;
  color: #101828;
}

/* ── Breakdown card (Exception Severity) ──────────────────────────── */

.home-breakdown-card {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px;
  overflow: hidden;
}

.home-breakdown-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 64px;
}

.home-breakdown-donut-wrap {
  flex-shrink: 0;
}

.home-breakdown-donut {
  display: block;
}

.home-breakdown-donut-shell {
  position: relative;
  width: 264px;
  height: 264px;
}

.home-breakdown-donut-segment {
  cursor: pointer;
  transition: opacity 160ms ease, stroke-width 160ms ease;
}

.home-breakdown-donut-centre {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  pointer-events: none;
}

.home-breakdown-donut-centre-label {
  font-size: 13px;
  font-weight: 600;
  color: #667085;
  text-align: center;
  max-width: 132px;
}

.home-breakdown-donut-centre-value {
  font-size: 30px;
  line-height: 1;
  font-weight: 700;
  color: #101828;
}

.home-breakdown-donut-centre-sub {
  font-size: 12px;
  font-weight: 500;
  color: #98a2b3;
}

.home-breakdown-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  align-content: center;
  width: 704px;
}

.home-breakdown-kpi {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  border: 1px solid transparent;
  border-radius: 8px;
  min-width: 164px;
  max-width: 204px;
  width: 164px;
  background: transparent;
  text-align: left;
  transition: border-color 140ms ease, background 140ms ease;
}

.home-breakdown-kpi:hover {
  background: #f8fbff;
}

.home-breakdown-kpi.is-active {
  border-color: #bfd8ff;
  background: #eef5ff;
}

.home-breakdown-kpi-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: #6a707c;
}

.home-breakdown-kpi-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.home-breakdown-kpi-data {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
}

.home-breakdown-kpi-count {
  font-size: 36px;
  font-weight: 700;
  color: #101828;
  line-height: 28px;
  letter-spacing: 0.72px;
}

.home-breakdown-kpi-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}

.home-breakdown-kpi-pct {
  font-size: 14px;
  font-weight: 500;
  color: #292b30;
  text-align: center;
}

/* ── Finance Workbench card ────────────────────────────────────────── */

.home-workbench-card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  overflow: hidden;
}

/* ── Workbench summary KPIs ────────────────────────────────────────── */

.home-workbench-summary {
  display: flex;
  align-items: stretch;
  padding: 16px 24px;
  border: 1px solid #eef2f6;
  border-radius: 12px;
  overflow: hidden;
}

.home-interactive-kpi {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 14px;
  min-height: 96px;
  min-width: 0;
  justify-content: center;
  border-radius: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  flex: 1 1;
  text-align: left;
  transition: background 160ms ease, box-shadow 160ms ease;
  border-left: none;
}

.home-interactive-kpi:hover {
  background: #f8fbff;
}

.home-interactive-kpi.is-active {
  background: #f8fbff;
  box-shadow: inset 0 -3px 0 var(--blue-500);
}

.home-interactive-kpi-title {
  font-size: 16px;
  font-weight: 700;
  color: #6a707c;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-interactive-kpi.is-active .home-interactive-kpi-title {
  color: var(--blue-600);
}

.home-interactive-kpi-value {
  font-size: 36px;
  font-weight: 700;
  color: #101828;
  letter-spacing: 0.01em;
  line-height: 1;
}

/* ── Workbench toolbar (search + action buttons) ──────────────────── */

.home-workbench-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0 0;
}

.home-search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 364px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: white;
}

.home-search-placeholder {
  font-size: 14px;
  color: #95a0b1;
  font-weight: 400;
}

.home-workbench-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ── Table ─────────────────────────────────────────────────────────── */

.home-table-container {
  margin-top: 12px;
  width: 100%;
}

.home-spotlight-table {
  margin-top: 0;
}

.home-table-header-row {
  display: flex;
  align-items: center;
  padding: 12px 12px;
  background: #eff2f6;
  border-radius: 8px;
}

.home-table-body-row {
  display: flex;
  align-items: center;
  padding: 0 12px;
  height: 64px;
  border-bottom: 1px solid #f3f4f6;
}

.home-table-body-row:last-child {
  border-bottom: none;
}

.home-table-cell {
  font-size: 14px;
  font-weight: 500;
  color: #344054;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-table-header-row .home-table-cell {
  font-size: 14px;
  font-weight: 600;
  color: #6a707c;
}

.home-table-cell-check   { width: 36px; flex-shrink: 0; display: flex; align-items: center; }
.home-table-cell-order   { flex: 1.5 1; min-width: 140px; }
.home-table-cell-date    { flex: 1.3 1; min-width: 130px; }
.home-table-cell-gateway { flex: 0.9 1; min-width: 80px; }
.home-table-cell-amount  { flex: 0.9 1; min-width: 80px; text-align: right; }
.home-table-cell-delta   { flex: 0.8 1; min-width: 80px; text-align: right; display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.home-table-cell-status  { flex: 0.8 1; min-width: 80px; }
.home-table-cell-actions { flex: 0.6 1; min-width: 50px; text-align: right; }

.home-table-cell-bold { font-weight: 700; color: #101828; }
.home-table-cell-negative { color: #e10909; font-weight: 600; }

.home-checkbox {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 1.5px solid #d0d5dd;
  border-radius: 4px;
  background: white;
  cursor: pointer;
}

.home-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.home-status-badge-truncate {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  line-height: 24px;
}

.home-status-red {
  background: #e10909;
  color: white;
}

.home-view-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--blue-500);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.home-view-link:hover { text-decoration: underline; }

/* ── Pagination ────────────────────────────────────────────────────── */

.home-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
}

.home-pagination-info {
  font-size: 14px;
  font-weight: 500;
  color: #6a707c;
}

.home-view-all-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--blue-500);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.home-view-all-link:hover { text-decoration: underline; }

/* ── Role switcher (dev tool, top-right of section title bar) ─────── */

.home-section-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.home-role-switcher {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: #e9ecf1;
  border-radius: 8px;
}

.home-role-btn {
  height: 30px;
  padding: 0 14px;
  border-radius: 6px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: #6a707c;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}

.home-role-btn:hover { background: rgba(255,255,255,0.6); color: #0d0d0d; }

.home-role-btn.is-active {
  background: white;
  color: var(--blue-600);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.home-insight-card {
  flex: 1 1;
  min-width: 0;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.home-insight-card-compact {
  padding: 20px;
  gap: 16px;
}

.home-insight-card-compact .home-chart-card-header {
  margin-bottom: 8px;
}

.home-insight-card-compact .home-chart-card-title {
  font-size: 18px;
  letter-spacing: -0.36px;
}

.home-insight-card-compact .home-chart-card-subtitle {
  font-size: 14px;
  line-height: 1.35;
}

.home-attention-card .home-chart-card-header {
  align-items: center;
  margin-bottom: 0;
}

.home-attention-card.home-insight-card-compact {
  gap: 24px;
  padding: 24px;
}

.home-attention-card .home-chart-card-title-group {
  min-width: 0;
}

.home-attention-card.home-insight-card-compact .home-chart-card-title {
  font-size: 20px;
  letter-spacing: -0.44px;
}

.home-attention-card.home-insight-card-compact .home-chart-card-subtitle {
  font-size: 16px;
  line-height: normal;
}

.home-attention-card-header-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #e10909;
  flex-shrink: 0;
}

/* ── Risk breakdown donut ───────────────────────────────────────── */

.home-donut-layout {
  display: flex;
  align-items: center;
  gap: 64px;
}

.home-donut-svg-wrap {
  flex-shrink: 0;
  width: 264px;
  height: 264px;
}

.home-donut-kpi-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  flex: 1 1;
}

.home-donut-kpi-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  padding: 24px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  color: inherit;
  min-width: 164px;
  max-width: 204px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}

.home-donut-kpi-item:focus-visible {
  outline: 2px solid #0362dd;
  outline-offset: 2px;
}

.home-donut-kpi-item.is-active {
  background: #ebeff4;
}

.home-donut-kpi-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.home-donut-kpi-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.home-donut-kpi-label {
  font-size: 14px;
  font-weight: 700;
  color: #6a707c;
  line-height: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-donut-kpi-data {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 4px 0;
}

.home-donut-kpi-count {
  font-size: 36px;
  font-weight: 700;
  color: #101828;
  letter-spacing: 0.02em;
  line-height: 1;
}

.home-donut-kpi-pct {
  font-size: 14px;
  font-weight: 500;
  color: #292b30;
}

.home-donut-center-count {
  font-size: 28px;
  font-weight: 700;
  fill: #101828;
  font-family: var(--font-body);
}

.home-donut-center-pct {
  font-size: 13px;
  font-weight: 500;
  fill: #6a7282;
  font-family: var(--font-body);
}

.home-donut-center-label {
  font-size: 10px;
  font-weight: 600;
  fill: #98a2b3;
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.home-insight-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 14px 18px;
  gap: 14px 18px;
}

.home-insight-value-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid #e8edf4;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.home-insight-value-label {
  color: #6a707c;
  font-size: 13px;
  font-weight: 500;
}

.home-insight-value-amount {
  color: #111827;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
}

.home-insight-note-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.home-insight-note-list.is-compact {
  flex: 1 1;
  gap: 10px;
}

.home-attention-list {
  gap: 16px;
}

.home-attention-list.is-compact {
  gap: 12px;
}

.home-insight-note-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 14px;
  border-bottom: 1px solid #eef2f6;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.5;
}

.home-insight-note-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.home-alert-note-item {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: none;
  border: none;
  border-radius: 8px;
  background: #ebeff4;
}

.home-alert-note-item.is-compact {
  gap: 16px;
  padding: 16px 24px;
  border-radius: 8px;
}

.home-alert-note-actions {
  display: flex;
  justify-content: flex-end;
}

.home-alert-note-main {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
  flex: 1 1;
}

.home-alert-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.home-alert-drilldown {
  color: #175cd3;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-decoration: none;
  flex-shrink: 0;
}

.home-alert-drilldown:hover {
  text-decoration: underline;
}

.home-alert-note-header {
  display: flex;
  align-items: center;
  min-width: 0;
}

.home-alert-note-header-main {
  display: flex;
  align-items: center;
  min-width: 0;
}

.home-alert-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #e10909;
  color: #ffffff;
  flex-shrink: 0;
}

.home-alert-critical {
  background: #e10909;
}

.home-alert-warning {
  background: #f79009;
}

.home-alert-info {
  background: #175cd3;
}

.home-insight-note-title {
  color: #101828;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-alert-note-item.is-compact .home-insight-note-title {
  font-size: 16px;
  line-height: 1.3;
}

.home-alert-note-body {
  color: #6a7282;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
}

.home-alert-note-body-compact {
  color: #6a7282;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
}

.home-alert-drilldown-compact {
  align-self: center;
}

.home-insight-table {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.home-insight-table-head,
.home-insight-table-row {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) 88px 88px 120px;
  grid-gap: 12px;
  gap: 12px;
  align-items: center;
}

.home-insight-table-head {
  color: #6a707c;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.home-insight-table-row {
  padding: 14px 0;
  border-top: 1px solid #eef2f6;
  color: #111827;
  font-size: 14px;
}

.home-gateway-table .home-insight-table-head,
.home-gateway-table .home-insight-table-row {
  grid-template-columns: minmax(0, 1.6fr) 88px 88px 88px 116px;
}

.home-gateway-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.home-gateway-target-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: #eef5ff;
  color: #4f6b92;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.home-gateway-scorecard {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.home-gateway-card-compact {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}

.home-gateway-card-compact .home-chart-card-header {
  margin-bottom: 6px;
}

.home-gateway-card-compact .home-gateway-score-row {
  padding: 10px 0;
}

.home-gateway-card-compact .home-gateway-score-row:first-child {
  padding-top: 0;
}

.home-gateway-score-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(152, 162, 179, 0.45) transparent;
}

.home-gateway-score-list::-webkit-scrollbar {
  width: 6px;
}

.home-gateway-score-list::-webkit-scrollbar-track {
  background: transparent;
}

.home-gateway-score-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(152, 162, 179, 0.38);
}

.home-gateway-card-compact .home-gateway-score-footnote {
  margin-top: 8px;
  padding-top: 8px;
}

.home-gateway-score-row {
  display: grid;
  grid-template-columns: minmax(0, 150px) minmax(0, 1fr) minmax(112px, 140px);
  grid-gap: 14px;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid #eef2f6;
}


.home-gateway-score-row:first-child {
  border-top: none;
  padding-top: 2px;
}

.home-gateway-score-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.home-gateway-score-name {
  color: #101828;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-gateway-score-meta {
  color: #6a7282;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-gateway-score-bar-wrap {
  display: flex;
  align-items: center;
  min-width: 0;
}

.home-gateway-score-track {
  position: relative;
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: #edf2f8;
  overflow: hidden;
}

.home-gateway-score-target {
  position: absolute;
  top: 1px;
  bottom: 1px;
  width: 2px;
  margin-left: -1px;
  border-radius: 999px;
  background: rgba(16, 24, 40, 0.15);
  z-index: 1;
}

.home-gateway-score-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 999px;
}

.home-gateway-score-fill.is-good {
  background: linear-gradient(90deg, #17b26a 0%, #12b76a 100%);
}

.home-gateway-score-fill.is-watch {
  background: linear-gradient(90deg, #fdb022 0%, #f79009 100%);
}

.home-gateway-score-fill.is-risk {
  background: linear-gradient(90deg, #f97066 0%, #f04438 100%);
}

.home-gateway-score-fill.is-neutral {
  background: linear-gradient(90deg, #cbd5e1 0%, #98a2b3 100%);
}

.home-gateway-score-reading {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  min-width: 0;
}

.home-gateway-score-rate {
  color: #101828;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.24px;
}

.home-gateway-score-rate.is-good {
  color: #067647;
}

.home-gateway-score-rate.is-watch {
  color: #b54708;
}

.home-gateway-score-rate.is-risk {
  color: #b42318;
}

.home-gateway-score-rate.is-neutral {
  color: #667085;
}

.home-gateway-score-risk {
  color: #98a2b3;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
}

.home-gateway-score-total {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-gap: 12px;
  gap: 12px;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid #eef2f6;
  color: #6a7282;
  font-size: 12px;
  font-weight: 700;
}

.home-gateway-score-total strong {
  color: #101828;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.home-gateway-score-total em {
  color: #98a2b3;
  font-style: normal;
  white-space: nowrap;
}

.home-gateway-score-footnote {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #eef2f6;
  color: #6a7282;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

/* ── Gateway Health vertical bar chart ──────────────────────────────────── */

.home-gateway-vbar-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
}

.home-gateway-vbar-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  gap: 12px;
  padding: 0 12px;
  overflow-x: auto;
  flex: 1 1;
}

.home-gateway-vbar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  flex: 1 1;
  min-width: 64px;
  max-width: 96px;
}

.home-gateway-vbar-track {
  width: 64px;
  background: #ebeff4;
  border-radius: 8px;
  display: flex;
  align-items: flex-end;
  flex-shrink: 0;
}

.home-gateway-vbar-fill {
  width: 100%;
  border-radius: 8px;
  transition: height 300ms ease;
}

.home-gateway-vbar-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
  width: 100%;
}

.home-gateway-vbar-rate {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.32px;
  color: #0a0a0a;
}

.home-gateway-vbar-name {
  font-size: 12px;
  font-weight: 500;
  color: #0d0d0d;
  letter-spacing: 0.24px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.home-gateway-vbar-risk {
  font-size: 10px;
  font-weight: 500;
  color: #6a707c;
  text-align: center;
}

.home-gateway-vbar-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  padding: 12px 0;
  border-top: 1px solid #f3f4f6;
}

.home-gateway-vbar-footer-item {
  display: flex;
  align-items: center;
  gap: 24px;
}

.home-gateway-vbar-footer-item span {
  font-size: 12px;
  color: #6a7282;
  line-height: 1.33;
}

.home-gateway-vbar-footer-item strong {
  font-size: 18px;
  font-weight: 700;
  color: #101828;
  letter-spacing: -0.44px;
  line-height: 1.55;
}

.home-ops-values {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.home-aging-table .home-insight-table-head,
.home-aging-table .home-insight-table-row {
  grid-template-columns: minmax(0, 1.6fr) 88px 132px;
}

.home-aging-placeholder {
  padding: 16px;
  border: 1px dashed #d0d5dd;
  border-radius: 12px;
  color: #667085;
  font-size: 13px;
  line-height: 1.5;
}

.home-backlog-value {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.home-flow-legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  display: inline-block;
}

.home-flow-legend-swatch.is-opened {
  background: #0362dd;
}

.home-flow-legend-swatch.is-closed {
  background: #9bc7fd;
}

.home-flow-bar {
  shape-rendering: geometricPrecision;
}

.home-flow-bar-opened {
  fill: #0362dd;
}

.home-flow-bar-closed {
  fill: #9bc7fd;
}

.home-settlement-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-gap: 12px;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border: 1px solid #e8edf4;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  color: #6a707c;
  font-size: 14px;
}

.home-settlement-meta strong {
  color: #111827;
  font-size: 18px;
}

.home-insight-product-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.home-insight-product-name {
  font-weight: 700;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-insight-product-sku {
  color: #6a707c;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-insight-empty {
  padding: 28px 0;
  color: #6a707c;
  font-size: 14px;
}

.home-loss-kpi-bar {
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0;
  padding: 16px 24px;
  border-radius: 12px;
}

.home-loss-kpi-item {
  display: flex;
  flex: 1 1;
  min-width: 0;
  flex-direction: column;
  gap: 12px;
  padding: 0 14px;
}

.home-loss-kpi-bar > .home-loss-kpi-item:first-child {
  padding-left: 0;
}

.home-loss-kpi-bar > .home-loss-kpi-item:last-child {
  padding-right: 0;
}

.home-loss-kpi-divider {
  width: 1px;
  min-height: 92px;
  background: #d7dee8;
  flex-shrink: 0;
}

.home-loss-kpi-label {
  color: #6a707c;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}

.home-loss-kpi-label.home-metric-label {
  overflow: visible;
}

.home-loss-kpi-value-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 34px;
}

.home-loss-kpi-value {
  color: #0d0d0d;
  font-size: 40px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.home-loss-kpi-meta {
  color: #6a707c;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-loss-section {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.home-loss-section-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.home-loss-section-title {
  margin: 0;
  color: #101828;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.15;
}

.home-loss-section-subtitle {
  margin: 0;
  color: #6a7282;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.35;
}

.home-loss-table-card {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px;
  border: 1px solid #95a0b1;
  border-radius: 12px;
}

.home-refund-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-gap: 16px;
  gap: 16px;
}

.home-refund-breakdown-item {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border: 1px solid #dbe5f2;
  border-radius: 8px;
  background: #f8fafc;
}

.home-refund-breakdown-item div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 8px;
}

.home-refund-breakdown-item span {
  color: #4a5565;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
}

.home-refund-breakdown-item strong {
  color: #b23b1d;
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.home-refund-breakdown-item p,
.home-refund-breakdown-item em {
  margin: 0;
  color: #6a7282;
  font-size: 13px;
  font-style: normal;
  font-weight: 600;
  line-height: 1.35;
}

.home-loss-table {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.home-loss-table-body {
  display: flex;
  flex-direction: column;
}

.home-loss-table-head,
.home-loss-table-row {
  display: grid;
  grid-template-columns: 132px minmax(260px, 1fr) 80px 80px 90px;
  grid-gap: 20px;
  gap: 20px;
  align-items: center;
  padding: 12px 24px;
}

.home-loss-table-head {
  background: #eff2f6;
  border-radius: 8px;
  color: #292b30;
  font-size: 14px;
  font-weight: 500;
}

.home-loss-table-row {
  padding-block: 18px;
  border-bottom: 1px solid #b5bece;
  color: #0d0d0d;
  font-size: 16px;
  font-weight: 500;
}

.home-loss-table-row:last-child {
  border-bottom: none;
}

.home-loss-table-head > span,
.home-loss-table-row > span {
  min-width: 0;
}

.home-loss-table-head > span:nth-child(n + 3),
.home-loss-table-row > span:nth-child(n + 3) {
  justify-self: center;
  text-align: center;
}

.home-loss-table-sku {
  display: block;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-loss-table-item {
  display: block;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-loss-table-volume {
  font-weight: 500;
}

.home-loss-drag-card {
  gap: 18px;
  padding: 24px;
}

.home-loss-drag-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(100%, 950px);
  margin: 0 auto;
  padding: 8px 0;
}

.home-loss-drag-row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) 90px;
  grid-gap: 12px;
  gap: 12px;
  align-items: center;
}

.home-loss-drag-label {
  color: #6a707c;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
}

.home-loss-drag-track {
  position: relative;
  height: 36px;
  border-radius: 4px;
  background: #ebeff4;
  overflow: hidden;
}

.home-loss-drag-guide {
  position: absolute;
  top: -6px;
  bottom: -6px;
  width: 1px;
  border-left: 1px dashed #b9c4d2;
  opacity: 0.9;
  pointer-events: none;
  z-index: 3;
}

.home-loss-drag-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 2;
}

.home-loss-drag-fill.is-left {
  left: 0;
  border-radius: 4px;
}

.home-loss-drag-fill.is-right {
  border-radius: 0 4px 4px 0;
}

.home-loss-drag-fill.is-base,
.home-loss-drag-fill.is-reconciled {
  background: #0362dd;
}

.home-loss-drag-fill.is-drag {
  background: #9bc7fd;
}

.home-loss-drag-fill.is-drag-light {
  background: #9bc7fd;
}

.home-loss-drag-fill.is-drag-faint {
  background: #9bc7fd;
}

.home-loss-drag-reading {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-start;
}

.home-loss-drag-reading strong {
  color: #0d0d0d;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

.home-loss-drag-reading strong.is-negative {
  color: #e10909;
}

.home-loss-drag-reading span {
  color: #6a707c;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
}

.home-loss-drag-footnote {
  margin: 0;
  text-align: center;
  color: #6a707c;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
}

@media (max-width: 900px) {
  .home-chart-row {
    grid-template-columns: 1fr;
  }

  .home-chart-row-recon-balanced {
    height: auto;
  }

  .home-chart-row-recon-balanced > .home-chart-card,
  .home-chart-row-recon-balanced > .home-insight-card {
    height: clamp(360px, 72vw, 430px);
  }

  .recon-mix-grid {
    grid-template-columns: 1fr;
  }

  .match-command-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 14px 16px;
  }

  .match-command-kpi {
    border-right: none;
    padding: 0;
  }

  .match-command-kpi-value {
    font-size: 30px;
  }

  .match-command-kpi-meta {
    font-size: 13px;
  }

  .home-kpi-bar {
    flex-wrap: wrap;
    gap: 14px 0;
  }

  .home-kpi-item {
    flex: 1 1 50%;
    padding-inline: 12px;
  }

  .home-kpi-divider {
    display: none;
  }

  .home-kpi-value {
    font-size: 30px;
  }

  .home-loss-kpi-bar {
    flex-wrap: wrap;
    gap: 14px 0;
  }

  .home-loss-kpi-item {
    flex: 1 1 50%;
    padding-inline: 12px;
  }

  .home-loss-kpi-divider {
    display: none;
  }

  .home-loss-kpi-value {
    font-size: 32px;
  }

  .home-loss-kpi-meta {
    font-size: 14px;
  }

  .home-loss-section-title {
    font-size: 20px;
  }

  .home-loss-table-card {
    gap: 18px;
    padding: 18px;
  }

  .home-refund-breakdown-grid {
    grid-template-columns: 1fr;
  }

  .home-loss-table {
    gap: 16px;
  }

  .home-loss-table-head,
  .home-loss-table-row {
    grid-template-columns: 120px minmax(160px, 1fr) 56px 56px 88px;
    gap: 12px;
    padding: 10px 14px;
    font-size: 13px;
  }

  .home-loss-table-row {
    padding-block: 14px;
    font-size: 14px;
  }

  .home-loss-drag-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .home-loss-drag-track {
    height: 22px;
  }

  .home-loss-drag-reading {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .home-insight-values {
    grid-template-columns: 1fr;
  }

  .home-insight-table-head,
  .home-insight-table-row {
    grid-template-columns: minmax(0, 1.5fr) 72px 72px 96px;
  }

  .home-gateway-score-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .home-gateway-score-reading {
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
  .analytics-kpi-row {
    padding: 14px 16px;
  }

  .recon-mix-summary strong {
    font-size: 28px;
  }

  .home-alert-note-item,
  .home-alert-note-item.is-compact {
    align-items: flex-start;
    padding: 16px;
  }

  .home-attention-card.home-insight-card-compact {
    gap: 20px;
    padding: 20px;
  }

  .home-attention-card.home-insight-card-compact .home-chart-card-title {
    font-size: 18px;
    letter-spacing: -0.36px;
  }

  .home-attention-card.home-insight-card-compact .home-chart-card-subtitle {
    font-size: 14px;
    line-height: 1.35;
  }

  .home-alert-note-main {
    width: 100%;
    gap: 14px;
  }

  .home-alert-drilldown,
  .home-alert-drilldown-compact {
    align-self: flex-end;
  }
}

