.sales-dashboard-root {
  --sales-ink: #152033;
  --sales-muted: #64748b;
  --sales-line: #dbe3ef;
  --sales-surface: #ffffff;
  --sales-canvas: #f3f6fb;
  --sales-blue: #2563eb;
  --sales-green: #059669;
  --sales-red: #dc2626;
  --sales-amber: #d97706;
  color: var(--sales-ink);
  display: grid;
  gap: 14px;
  padding: 14px;
  border-radius: 18px;
  background: var(--sales-canvas);
}

.workspace .sales-dashboard-root header { height: auto; min-height: 0; }

.platform-mark.sales, .platform-dot.sales { background: #2563eb; }

.sales-dashboard-root * { box-sizing: border-box; }

.sales-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  min-height: 126px;
  padding: 21px 24px;
  border: 1px solid #d4deec;
  border-radius: 14px;
  background:
    radial-gradient(circle at 90% 15%, rgba(59, 130, 246, .17), transparent 31%),
    linear-gradient(125deg, #f8fbff 0%, #edf5ff 62%, #f7fbff 100%);
  box-shadow: 0 8px 24px rgba(30, 64, 175, .065);
}

.sales-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(37, 99, 235, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(37, 99, 235, .045) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(90deg, transparent, black 40%);
}

.sales-hero > * { position: relative; z-index: 1; }
.sales-eyebrow, .sales-section-kicker { margin: 0 0 7px; color: var(--sales-blue); font-size: 10px; font-weight: 900; letter-spacing: .14em; }
.sales-hero h2 { margin: 0; font-size: clamp(23px, 2vw, 32px); line-height: 1.12; letter-spacing: -.035em; }
.sales-hero p:not(.sales-eyebrow) { max-width: 780px; margin: 11px 0 0; color: #52637a; font-size: 13px; line-height: 1.65; }
.sales-hero-meta { min-width: 240px; display: grid; justify-items: end; gap: 8px; text-align: right; }
.sales-hero-meta strong { font-size: 14px; }
.sales-hero-meta small { max-width: 300px; color: var(--sales-muted); font-size: 11px; }
.sales-status { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--sales-line); border-radius: 999px; background: white; padding: 6px 10px; font-size: 11px; font-weight: 800; }
.sales-status i { width: 7px; height: 7px; border-radius: 50%; background: #94a3b8; }
.sales-status.good { color: #047857; border-color: #a7f3d0; background: #ecfdf5; }
.sales-status.good i { background: var(--sales-green); box-shadow: 0 0 0 4px rgba(5, 150, 105, .1); }
.sales-status.warn { color: #92400e; border-color: #fde68a; background: #fffbeb; }
.sales-status.warn i { background: var(--sales-amber); }
.sales-status.danger { color: #991b1b; border-color: #fecaca; background: #fef2f2; }
.sales-status.danger i { background: var(--sales-red); }

.sales-toolbar {
  display: grid;
  gap: 13px;
  padding: 15px 16px 16px;
  border: 1px solid var(--sales-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 7px 22px rgba(15, 23, 42, .045);
}

.sales-toolbar-top { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-bottom: 12px; border-bottom: 1px solid #edf1f6; }
.sales-toolbar-title { display: grid; flex: 0 0 auto; gap: 1px; }
.sales-toolbar-title > span { color: var(--sales-blue); font-size: 9px; font-weight: 900; letter-spacing: .14em; }
.sales-toolbar-title > strong { color: #1e293b; font-size: 13px; }
.sales-toolbar-title > small { color: #94a3b8; font-size: 9px; }
.sales-toolbar-grid { display: grid; grid-template-columns: minmax(330px, 1.3fr) minmax(150px, .55fr) minmax(190px, .7fr) auto; gap: 10px; align-items: end; }
.sales-date-range { display: grid; grid-template-columns: minmax(140px, 1fr) 18px minmax(140px, 1fr); gap: 7px; align-items: end; min-width: 0; }
.sales-date-range > i { display: grid; place-items: center; min-height: 42px; color: #94a3b8; font-size: 10px; font-style: normal; }
.sales-toolbar label { display: grid; gap: 5px; min-width: 0; }
.sales-toolbar label > span { color: var(--sales-muted); font-size: 10px; font-weight: 800; }
.sales-toolbar input, .sales-toolbar select, .sales-order-tools input, .sales-order-tools select {
  width: 100%; min-height: 42px; border: 1px solid #d4ddea; border-radius: 8px; background: #fbfcfe; padding: 9px 11px; color: var(--sales-ink); font: inherit; font-size: 12px;
}
.sales-toolbar input:focus, .sales-toolbar select:focus, .sales-order-tools input:focus, .sales-order-tools select:focus { outline: 2px solid rgba(37, 99, 235, .18); border-color: var(--sales-blue); }
.sales-presets, .sales-toolbar-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.sales-presets { justify-content: flex-end; }
.sales-presets button, .sales-secondary, .sales-primary, .sales-tabs button, .sales-panel header button, .sales-pagination button {
  min-height: 36px; border: 1px solid #cbd5e1; border-radius: 7px; background: #fff; color: #334155; padding: 8px 11px; font: inherit; font-size: 11px; font-weight: 850; cursor: pointer;
}
.sales-presets button { min-height: 30px; padding: 6px 10px; background: #f8fafc; font-size: 10px; }
.sales-presets button:hover, .sales-secondary:hover, .sales-tabs button:hover, .sales-panel header button:hover { border-color: var(--sales-blue); color: var(--sales-blue); }
.sales-presets button:disabled, .sales-secondary:disabled { cursor: wait; opacity: .62; }
.sales-primary { border-color: var(--sales-blue); background: var(--sales-blue); color: #fff; }
.sales-primary:hover { background: #1d4ed8; }
.sales-toolbar-actions { justify-content: flex-end; flex-wrap: nowrap; }
.sales-toolbar-actions > button { min-height: 42px; }

.sales-tabs { position: sticky; top: -16px; z-index: 8; display: flex; gap: 6px; overflow-x: auto; padding: 8px; border: 1px solid var(--sales-line); border-radius: 10px; background: rgba(248, 250, 252, .94); backdrop-filter: blur(10px); }
.sales-inline-error { display: flex; align-items: center; gap: 10px; border: 1px solid #fecaca; border-radius: 8px; background: #fef2f2; padding: 10px 12px; color: #991b1b; font-size: 10px; }
.sales-inline-error strong { font-size: 11px; }
.sales-tab { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.sales-tab b { min-width: 20px; border-radius: 999px; background: #e2e8f0; padding: 2px 6px; color: #475569; font-size: 9px; }
.sales-tab.active { border-color: var(--sales-blue); background: #eff6ff; color: #1d4ed8; box-shadow: inset 0 -2px 0 var(--sales-blue); }
.sales-tab.active b { background: #dbeafe; color: #1d4ed8; }
.sales-tab-content { display: grid; gap: 14px; margin-top: 14px; scroll-margin-top: 70px; }

.sales-inline-loading { position: relative; overflow: hidden; display: flex; align-items: center; gap: 11px; border: 1px solid #bfdbfe; border-radius: 9px; background: linear-gradient(90deg, #eff6ff, #f8fbff); padding: 11px 14px; color: #1e40af; }
.sales-inline-loading::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 25%, rgba(255,255,255,.72) 48%, transparent 72%); transform: translateX(-100%); animation: sales-shimmer 1.3s ease-in-out infinite; }
.sales-inline-loading > span { z-index: 1; width: 19px; height: 19px; border: 2px solid #bfdbfe; border-top-color: var(--sales-blue); border-radius: 50%; animation: sales-spin .8s linear infinite; }
.sales-inline-loading > div { z-index: 1; display: grid; gap: 2px; }
.sales-inline-loading strong { font-size: 11px; }
.sales-inline-loading small { color: #5670a0; font-size: 9px; }

.sales-alert-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sales-alert { display: flex; gap: 11px; min-height: 78px; border: 1px solid var(--sales-line); border-radius: 10px; background: #fff; padding: 12px 14px; }
.sales-alert > span { flex: 0 0 auto; width: 9px; height: 9px; margin-top: 4px; border-radius: 50%; background: #94a3b8; box-shadow: 0 0 0 5px rgba(148, 163, 184, .12); }
.sales-alert strong { display: block; margin-bottom: 4px; font-size: 13px; }
.sales-alert p { margin: 0; color: var(--sales-muted); font-size: 11px; line-height: 1.55; }
.sales-alert.good { border-color: #bbf7d0; background: #f6fef9; }
.sales-alert.good > span { background: var(--sales-green); box-shadow: 0 0 0 5px rgba(5, 150, 105, .1); }
.sales-alert.warn { border-color: #fde68a; background: #fffdf5; }
.sales-alert.warn > span { background: var(--sales-amber); box-shadow: 0 0 0 5px rgba(217, 119, 6, .1); }
.sales-alert.danger { border-color: #fecaca; background: #fff8f8; }
.sales-alert.danger > span { background: var(--sales-red); box-shadow: 0 0 0 5px rgba(220, 38, 38, .1); }

.sales-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.sales-kpi { position: relative; overflow: hidden; min-height: 132px; border: 1px solid rgba(203,213,225,.88); border-radius: 12px; background: linear-gradient(145deg, #fff 0%, #fbfdff 100%); padding: 15px 16px; box-shadow: 0 7px 21px rgba(15, 23, 42, .05); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.sales-kpi.is-link { appearance: none; width: 100%; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.sales-kpi:hover { transform: translateY(-2px); border-color: #bdd0ee; box-shadow: 0 14px 32px rgba(30,64,175,.09); }
.sales-kpi.is-link:focus-visible { outline: 3px solid rgba(37,99,235,.25); outline-offset: 2px; border-color: #2563eb; }
.sales-kpi::after { content: ""; position: absolute; top: -24px; right: -24px; width: 108px; height: 108px; border-radius: 50%; background: #f1f5f9; opacity: .72; }
.sales-kpi.blue::after { background: #dbeafe; }
.sales-kpi.green::after, .sales-kpi.good::after { background: #d1fae5; }
.sales-kpi.red::after, .sales-kpi.danger::after { background: #fee2e2; }
.sales-kpi.warn::after, .sales-kpi.review::after { background: #fef3c7; }
.sales-kpi-icon { position: absolute; z-index: 2; top: 14px; right: 14px; display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid rgba(148,163,184,.18); border-radius: 10px; background: rgba(255,255,255,.82); box-shadow: 0 5px 14px rgba(15,23,42,.08); }
.sales-kpi-icon img { width: 20px; height: 20px; opacity: .82; filter: invert(31%) sepia(89%) saturate(1767%) hue-rotate(213deg) brightness(91%) contrast(101%); }
.sales-kpi-head { position: relative; z-index: 1; display: flex; align-items: center; gap: 6px; min-height: 36px; padding-right: 42px; color: var(--sales-muted); font-size: 11px; font-weight: 800; }
.sales-help { display: inline-grid; place-items: center; width: 15px; height: 15px; border: 1px solid #cbd5e1; border-radius: 50%; color: #64748b; font-size: 9px; cursor: help; }
.sales-kpi > strong { position: relative; z-index: 1; display: block; margin: 9px 0 7px; font-size: clamp(22px, 1.8vw, 29px); line-height: 1; letter-spacing: -.035em; }
.sales-delta { color: #64748b; font-size: 11px; font-weight: 800; }
.sales-delta.up { color: #047857; }
.sales-delta.down { color: #b91c1c; }
.sales-delta small { margin-left: 3px; color: #94a3b8; font-weight: 600; }
.sales-kpi p { margin: 9px 0 0; padding-right: 70px; color: #78879b; font-size: 10px; line-height: 1.35; }
.sales-kpi-action { position: absolute; z-index: 2; right: 15px; bottom: 14px; color: #64748b; font-size: 9px; font-weight: 800; transition: color .2s ease, transform .2s ease; }
.sales-kpi.is-link:hover .sales-kpi-action, .sales-kpi.is-link:focus-visible .sales-kpi-action { color: #2563eb; transform: translateX(2px); }

.sales-grid-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.sales-trend-config { display: flex; align-items: center; justify-content: space-between; gap: 18px; border: 1px solid #c7d7f2; border-radius: 10px; background: linear-gradient(120deg, #f8fbff, #eef6ff); padding: 13px 16px; box-shadow: 0 5px 18px rgba(37, 99, 235, .05); }
.sales-trend-config > div:first-child { display: grid; gap: 3px; }
.sales-trend-config span { color: #64748b; font-size: 9px; font-weight: 900; letter-spacing: .08em; }
.sales-trend-config strong { color: #1e3a8a; font-size: 13px; }
.sales-trend-config small { color: #6b7f9d; font-size: 9px; }
.sales-trend-config > div:last-child { display: flex; gap: 6px; padding: 4px; border: 1px solid #d6e2f4; border-radius: 9px; background: rgba(255,255,255,.86); }
.sales-trend-config button { min-width: 56px; min-height: 32px; border: 0; border-radius: 6px; background: transparent; color: #52657e; font: inherit; font-size: 10px; font-weight: 850; cursor: pointer; }
.sales-trend-config button:hover { color: var(--sales-blue); background: #eff6ff; }
.sales-trend-config button.active { color: #fff; background: var(--sales-blue); box-shadow: 0 4px 10px rgba(37,99,235,.22); }
.sales-panel { min-width: 0; border: 1px solid rgba(203,213,225,.9); border-radius: 13px; background: #fff; padding: 18px; box-shadow: 0 8px 24px rgba(15, 23, 42, .05); }
.sales-panel > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.sales-panel > header h3 { margin: 0; font-size: 16px; line-height: 1.25; }
.sales-panel > header p { margin: 5px 0 0; color: var(--sales-muted); font-size: 11px; line-height: 1.5; }
.sales-panel > header > strong { font-size: 18px; white-space: nowrap; }
.sales-panel header button { min-height: 31px; padding: 6px 9px; white-space: nowrap; }
.sales-line-chart { display: block; width: 100%; min-height: 220px; overflow: visible; }
.sales-echart { width: 100%; height: 270px; min-height: 240px; }
.sales-echart-combined { position: relative; z-index: 1; width: calc(100% - 24px); height: 342px; min-height: 310px; margin: 0 12px 10px; }
.sales-chart-combined { isolation: isolate; overflow: hidden; padding: 0; border-color: #cdd8e8; box-shadow: 0 12px 34px rgba(30, 64, 175, .075); }
.sales-chart-combined > header { position: relative; z-index: 2; display: grid; height: auto; min-height: 0; grid-template-columns: minmax(0, 1fr); justify-content: stretch; gap: 13px; margin: 0; padding: 17px 20px 13px; border-bottom: 1px solid #e8edf4; background: linear-gradient(180deg, #fff, #fbfdff); }
.sales-combined-header { align-items: stretch; }
.sales-chart-title-row, .sales-chart-control-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; width: 100%; }
.sales-chart-control-row { position: relative; z-index: 3; align-items: stretch; }
.sales-trend-copy { display: grid; justify-items: start; }
.sales-trend-copy p { max-width: 720px; }
.sales-chart-grain { display: flex; flex: 0 0 auto; gap: 3px; padding: 3px; border: 1px solid #d9e2ef; border-radius: 8px; background: #f4f7fb; }
.sales-chart-grain button { min-width: 40px; min-height: 29px; border: 0; border-radius: 6px; background: transparent; color: #64748b; padding: 5px 10px; font: inherit; font-size: 10px; font-weight: 850; cursor: pointer; }
.sales-chart-grain button:hover { color: #1d4ed8; background: #fff; }
.sales-chart-grain button.active { color: #fff; background: var(--sales-blue); box-shadow: 0 4px 10px rgba(37,99,235,.22); }
.sales-metric-switch { display: grid; grid-template-columns: repeat(3, minmax(108px, 1fr)); gap: 7px; min-width: min(460px, 60%); }
.sales-metric-switch button { display: grid; grid-template-columns: 10px auto auto; align-items: center; justify-content: start; gap: 7px; min-height: 40px; border: 1px solid #dbe3ef; border-radius: 9px; background: #f8fafc; padding: 7px 11px; color: #64748b; font: inherit; cursor: pointer; transition: color .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.sales-metric-switch button:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--trend-color) 50%, #dbe3ef); color: #334155; }
.sales-metric-switch button:focus-visible { outline: 3px solid color-mix(in srgb, var(--trend-color) 22%, transparent); outline-offset: 2px; }
.sales-metric-switch button i { width: 9px; height: 9px; border: 2px solid var(--trend-color); border-radius: 50%; background: transparent; }
.sales-metric-switch button span { font-size: 11px; font-weight: 850; white-space: nowrap; }
.sales-metric-switch button small { color: #94a3b8; font-size: 8px; font-weight: 800; }
.sales-metric-switch button.active { border-color: color-mix(in srgb, var(--trend-color) 44%, #dbe3ef); background: color-mix(in srgb, var(--trend-color) 8%, #fff); color: var(--trend-color); box-shadow: 0 5px 14px color-mix(in srgb, var(--trend-color) 13%, transparent); }
.sales-metric-switch button.active i { background: var(--trend-color); box-shadow: 0 0 0 3px color-mix(in srgb, var(--trend-color) 12%, transparent); }
.sales-focused-total { display: grid; min-width: 250px; justify-items: end; align-content: center; gap: 1px; border-left: 3px solid var(--trend-color); border-radius: 7px; background: #f8fafc; padding: 6px 12px; text-align: right; }
.sales-focused-total small { color: #64748b; font-size: 9px; font-weight: 800; }
.sales-focused-total strong { color: var(--trend-color); font-size: 18px; line-height: 1.25; white-space: nowrap; }
.sales-focused-total span { color: #94a3b8; font-size: 8px; }
.sales-chart-tooltip { display: grid; gap: 3px; min-width: 120px; }
.sales-chart-tooltip small { color: #a9b9ce; font-size: 9px; }
.sales-chart-tooltip strong { color: #fff; font-size: 15px; letter-spacing: -.02em; }
.sales-chart-tooltip span { color: #d6e2f0; font-size: 9px; }
.sales-chart-tooltip-combined { min-width: 190px; gap: 7px; }
.sales-chart-tooltip-combined > span { display: grid; grid-template-columns: 8px 42px minmax(74px, 1fr) auto; align-items: center; gap: 6px; }
.sales-chart-tooltip-combined i { width: 7px; height: 7px; border-radius: 50%; }
.sales-chart-tooltip-combined b { font-size: 10px; }
.sales-chart-tooltip-combined strong { text-align: right; font-size: 12px; }
.sales-chart-tooltip-combined em { color: #94a3b8; font-size: 9px; font-style: normal; }
.sales-hover-tooltip { position: absolute; z-index: 12; width: max-content; max-width: 240px; border: 0; border-radius: 9px; background: rgba(15,23,42,.95); padding: 10px 12px; color: #fff; pointer-events: none; box-shadow: 0 12px 28px rgba(15,23,42,.22); }
.sales-hover-tooltip[hidden], .sales-hover-guide[hidden] { display: none; }
.sales-hover-guide { position: absolute; z-index: 11; top: 62px; bottom: 48px; width: 1px; border-left: 1px dashed #94a3b8; pointer-events: none; transform: translateX(-.5px); }
.sales-line-chart text { fill: #8190a4; font-size: 10px; }
.sales-line-chart .sales-point-label { fill: #334155; font-size: 10px; font-weight: 850; paint-order: stroke; stroke: #fff; stroke-width: 4px; stroke-linejoin: round; }
.sales-line-chart circle { fill: #fff; stroke: currentColor; stroke-width: 2; }
.sales-grid-line { stroke: #edf1f6; stroke-width: 1; }
.sales-chart-empty, .sales-empty { display: grid; place-items: center; min-height: 140px; border: 1px dashed #cbd5e1; border-radius: 8px; background: #f8fafc; color: #64748b; font-size: 12px; text-align: center; padding: 18px; }

.sales-bar-list, .sales-risk-list { display: grid; gap: 11px; }
.sales-bar-row { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 9px; align-items: center; }
.sales-rank { display: inline-grid; place-items: center; width: 25px; height: 25px; border-radius: 6px; background: #eff6ff; color: #1d4ed8; font-size: 10px; font-weight: 900; }
.sales-bar-label { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 5px; font-size: 11px; }
.sales-bar-label span { color: #64748b; }
.sales-bar-track { height: 7px; overflow: hidden; border-radius: 999px; background: #eef2f7; }
.sales-bar-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2563eb, #60a5fa); }
.sales-bar-row small { display: block; margin-top: 5px; color: #8190a4; font-size: 9px; }
.sales-risk-list > article { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; border-bottom: 1px solid #edf1f6; padding: 9px 0; }
.sales-risk-list > article:last-child { border-bottom: 0; }
.sales-risk-list strong { display: block; font-size: 11px; }
.sales-risk-list p, .sales-risk-list small { margin: 3px 0 0; color: #8190a4; font-size: 9px; }
.sales-risk-list > article > div:last-child { text-align: right; }

.sales-insight-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.sales-insight-grid article { min-height: 135px; border: 1px solid #e2e8f0; border-top: 3px solid #94a3b8; border-radius: 8px; background: #fbfdff; padding: 14px; }
.sales-insight-grid article.good { border-top-color: var(--sales-green); }
.sales-insight-grid article.warn { border-top-color: var(--sales-amber); }
.sales-insight-grid article.danger { border-top-color: var(--sales-red); }
.sales-insight-grid article > span { color: #64748b; font-size: 9px; font-weight: 900; letter-spacing: .1em; }
.sales-insight-grid article > strong { display: block; margin: 9px 0 7px; font-size: 13px; line-height: 1.4; }
.sales-insight-grid article p { margin: 0; color: #64748b; font-size: 10px; line-height: 1.55; }

.sales-table-wrap { width: 100%; overflow: auto; border: 1px solid #e2e8f0; border-radius: 8px; }
.sales-table { width: 100%; border-collapse: collapse; color: #334155; font-size: 11px; white-space: nowrap; }
.sales-table thead { position: sticky; top: 0; z-index: 1; background: #f8fafc; }
.sales-table th { color: #64748b; font-size: 9px; font-weight: 900; letter-spacing: .04em; text-align: left; }
.sales-table th, .sales-table td { border-bottom: 1px solid #edf1f6; padding: 10px 11px; }
.sales-table tbody tr:last-child td { border-bottom: 0; }
.sales-table tbody tr:hover { background: #f8fbff; }
.sales-table tr[data-sales-platform-row] { cursor: pointer; }
.sales-table td strong { display: block; color: #172033; font-size: 11px; }
.sales-table td small { display: block; margin-top: 3px; color: #94a3b8; font-size: 9px; }
.sales-positive { color: #047857; font-weight: 800; }
.sales-negative { color: #b91c1c; font-weight: 800; }
.sales-badge { display: inline-flex; align-items: center; border: 1px solid #cbd5e1; border-radius: 999px; background: #f8fafc; padding: 4px 7px; color: #475569; font-size: 9px; font-weight: 900; }
.sales-badge.good { border-color: #a7f3d0; background: #ecfdf5; color: #047857; }
.sales-badge.warn { border-color: #fde68a; background: #fffbeb; color: #92400e; }
.sales-badge.danger { border-color: #fecaca; background: #fef2f2; color: #991b1b; }
.sales-badge.review { border-color: #ddd6fe; background: #f5f3ff; color: #6d28d9; }
.sales-coverage { min-width: 100px; }
.sales-coverage strong { font-size: 10px !important; }
.sales-coverage > span { display: block; width: 100%; height: 4px; overflow: hidden; margin: 4px 0; border-radius: 99px; background: #e2e8f0; }
.sales-coverage i { display: block; height: 100%; background: var(--sales-green); }
.sales-coverage small { margin: 0 !important; }

.sales-product-summary, .sales-quality-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.sales-product-summary article, .sales-quality-strip article { border: 1px solid var(--sales-line); border-radius: 9px; background: #fff; padding: 14px; }
.sales-product-summary span, .sales-quality-strip span { display: block; color: #64748b; font-size: 10px; font-weight: 800; }
.sales-product-summary strong, .sales-quality-strip strong { display: block; margin: 8px 0 5px; font-size: 22px; }
.sales-product-summary small, .sales-quality-strip small { color: #8190a4; font-size: 9px; }
.sales-head-stat { text-align: right; }
.sales-head-stat strong { display: block; color: var(--sales-blue); font-size: 23px; }
.sales-head-stat small { color: #64748b; font-size: 9px; }
.sales-pareto { display: grid; gap: 9px; }
.sales-pareto-row { display: grid; grid-template-columns: 20px 110px minmax(100px, 1fr) 150px; gap: 8px; align-items: center; font-size: 10px; }
.sales-pareto-row > span { color: #94a3b8; font-weight: 900; }
.sales-pareto-row > strong { overflow: hidden; text-overflow: ellipsis; }
.sales-pareto-row > div { position: relative; height: 8px; border-radius: 999px; background: #eef2f7; }
.sales-pareto-row > div i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2563eb, #60a5fa); }
.sales-pareto-row > div b { position: absolute; top: 50%; width: 8px; height: 8px; border: 2px solid white; border-radius: 50%; background: var(--sales-green); transform: translate(-50%, -50%); box-shadow: 0 0 0 1px var(--sales-green); }
.sales-pareto-row small { color: #64748b; text-align: right; }

.sales-cost-list { display: grid; gap: 12px; }
.sales-cost-list > div { display: grid; grid-template-columns: 88px minmax(80px, 1fr) 90px; gap: 10px; align-items: center; font-size: 10px; }
.sales-cost-list > div > div { height: 9px; overflow: hidden; border-radius: 999px; background: #eef2f7; }
.sales-cost-list i { display: block; height: 100%; border-radius: inherit; }
.sales-cost-list strong { text-align: right; font-size: 10px; }
.sales-band-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.sales-band-grid article { border: 1px solid #e2e8f0; border-radius: 8px; background: #fbfdff; padding: 11px; }
.sales-band-grid span { color: #64748b; font-size: 9px; font-weight: 800; }
.sales-band-grid strong { display: block; margin: 6px 0; font-size: 14px; }
.sales-band-grid article > div { height: 5px; overflow: hidden; border-radius: 99px; background: #e2e8f0; }
.sales-band-grid i { display: block; height: 100%; background: #2563eb; }
.sales-band-grid article.warn i { background: var(--sales-amber); }
.sales-band-grid article.danger i { background: var(--sales-red); }
.sales-band-grid article.review i { background: #7c3aed; }
.sales-band-grid small { display: block; margin-top: 6px; color: #8190a4; font-size: 9px; }

.sales-order-tools { display: grid; grid-template-columns: minmax(260px, 1fr) 180px auto; gap: 9px; align-items: center; margin-bottom: 12px; }
.sales-order-tools > span { color: #64748b; font-size: 10px; font-weight: 800; text-align: right; }
.sales-order-table { min-width: 1750px; }
.sales-pagination { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 12px; }
.sales-pagination button { min-height: 32px; padding: 6px 10px; }
.sales-pagination button:disabled { cursor: not-allowed; opacity: .45; }
.sales-pagination span { color: #64748b; font-size: 10px; }

.sales-state-card { display: grid; justify-items: center; gap: 8px; min-height: 300px; place-content: center; border: 1px solid var(--sales-line); border-radius: 10px; background: #fff; text-align: center; }
.sales-state-card h3 { margin: 8px 0 0; font-size: 16px; }
.sales-state-card p { max-width: 460px; margin: 0; color: #64748b; font-size: 11px; line-height: 1.6; }
.sales-spinner { width: 34px; height: 34px; border: 3px solid #dbeafe; border-top-color: var(--sales-blue); border-radius: 50%; animation: sales-spin .8s linear infinite; }
.sales-state-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: #fee2e2; color: #b91c1c; font-size: 20px; font-weight: 900; }
.sales-state-card.error { border-color: #fecaca; }
@keyframes sales-spin { to { transform: rotate(360deg); } }
@keyframes sales-shimmer { to { transform: translateX(100%); } }
.sales-loading-card { overflow: hidden; background: radial-gradient(circle at 50% 35%, #f2f7ff, #fff 60%); }
.sales-loading-skeleton { display: grid; gap: 6px; width: min(330px, 72vw); margin-top: 12px; }
.sales-loading-skeleton i { height: 7px; overflow: hidden; border-radius: 99px; background: linear-gradient(90deg, #e8eef7 20%, #cfe0fa 48%, #e8eef7 76%); background-size: 220% 100%; animation: sales-skeleton 1.25s ease-in-out infinite; }
.sales-loading-skeleton i:nth-child(2) { width: 82%; }
.sales-loading-skeleton i:nth-child(3) { width: 64%; }
@keyframes sales-skeleton { to { background-position: -220% 0; } }

.sales-footnote { margin: 0; padding: 12px 14px; border: 1px dashed #cbd5e1; border-radius: 8px; background: #f8fafc; color: #64748b; font-size: 10px; line-height: 1.6; }
.sales-footnote code { border-radius: 4px; background: #eaf0f8; padding: 2px 4px; color: #334155; }

@media (max-width: 1380px) {
  .sales-toolbar-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sales-date-range { grid-column: 1 / -1; }
  .sales-toolbar-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .sales-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sales-insight-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .sales-hero { align-items: flex-start; flex-direction: column; }
  .sales-hero-meta { min-width: 0; justify-items: start; text-align: left; }
  .sales-toolbar-top { align-items: flex-start; flex-direction: column; }
  .sales-presets { justify-content: flex-start; }
  .sales-toolbar-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sales-toolbar-actions { flex-wrap: wrap; }
  .sales-kpi-grid, .sales-product-summary, .sales-quality-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sales-grid-two { grid-template-columns: 1fr; }
  .sales-alert-grid { grid-template-columns: 1fr; }
  .sales-chart-title-row, .sales-chart-control-row { align-items: flex-start; flex-direction: column; }
  .sales-metric-switch { min-width: 0; width: 100%; }
  .sales-focused-total { width: 100%; min-width: 0; justify-items: start; text-align: left; }
  .sales-pareto-row { grid-template-columns: 20px 90px minmax(80px, 1fr); }
  .sales-pareto-row small { grid-column: 2 / -1; text-align: left; }
}

@media (max-width: 660px) {
  .sales-dashboard-root { padding: 8px; border-radius: 12px; }
  .sales-hero { min-height: 0; padding: 20px; }
  .sales-toolbar-grid, .sales-kpi-grid, .sales-insight-grid, .sales-product-summary, .sales-quality-strip, .sales-order-tools { grid-template-columns: 1fr; }
  .sales-date-range { grid-column: 1; grid-template-columns: 1fr; }
  .sales-date-range > i { min-height: 12px; }
  .sales-toolbar-actions { grid-column: 1; }
  .sales-toolbar-actions > button { flex: 1; }
  .sales-kpi { min-height: 126px; }
  .sales-echart { height: 245px; min-height: 220px; }
  .sales-echart-combined { width: calc(100% - 10px); height: 320px; min-height: 290px; margin: 0 5px 8px; }
  .sales-chart-combined > header { padding: 14px; }
  .sales-chart-grain { width: 100%; }
  .sales-chart-grain button { flex: 1; }
  .sales-metric-switch { grid-template-columns: 1fr; }
  .sales-panel { padding: 13px; }
  .sales-chart-combined { padding: 0; }
  .sales-panel > header { display: block; }
  .sales-panel > header > button, .sales-head-stat { margin-top: 10px; }
  .sales-trend-config { align-items: stretch; flex-direction: column; }
  .sales-trend-config > div:last-child { display: grid; grid-template-columns: repeat(4, 1fr); }
  .sales-trend-config button { min-width: 0; }
  .sales-band-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sales-order-tools > span { text-align: left; }
}
