:root {
  --brand-red: #CC2229;
  --brand-gold: #F9B020;
  --sidebar-w: 220px;
  --bg: #f5f6fa;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: #222;
}

/* ── Sidebar ─────────────────────────────────────────────────────────────── */
.sidebar {
  position: fixed; inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: #1c1c1c;
  color: #ccc;
  display: flex; flex-direction: column;
  z-index: 100;
  overflow-y: auto;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 16px 14px;
  border-bottom: 1px solid #333;
}
.sidebar-logo {
  width: 34px; height: 34px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 14px; color: #fff;
}
.sidebar-logo img {
    max-width: 100%;
    max-height: 100%;
}
.sidebar-brand-text { font-size: 13px; line-height: 1.3; }
.sidebar-brand-name { font-weight: 800; color: #fff; font-size: 15px; }
.sidebar-brand-sub  { font-size: 11px; color: #888; }

.sidebar-section {
  font-size: 10px; font-weight: 700; letter-spacing: 1px;
  color: #666; padding: 16px 16px 4px; text-transform: uppercase;
}
.sidebar-link {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 16px; font-size: 13px; color: #aaa;
  text-decoration: none; border-radius: 0;
  transition: background .15s, color .15s;
}
.sidebar-link:hover { background: #2a2a2a; color: #fff; }
.sidebar-link.active { background: var(--brand-red); color: #fff !important; font-weight: 600; }
.sidebar-footer {
  margin-top: auto; padding: 14px 16px;
  font-size: 10px; color: #555;
  border-top: 1px solid #2a2a2a;
}

/* ── Main content ────────────────────────────────────────────────────────── */
.main-wrap {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex; flex-direction: column;
}

/* ── Top bar ─────────────────────────────────────────────────────────────── */
.topbar {
  background: #fff; border-bottom: 1px solid #eee;
  padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
}
.topbar-title { font-size: 20px; font-weight: 800; color: #111; }
.topbar-sub   { font-size: 13px; color: #999; margin-left: 10px; }
.topbar-meta { font-size: 13px; color: #666; }
.clock { font-variant-numeric: tabular-nums; }

.kpi-section-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
}
.kpi-section-title { font-size: 12px; font-weight: 600; color: #666; }
.source-tag {
  display: inline-block; font-size: 10px; font-weight: 600; color: #fff;
  background: #bbb; border-radius: 3px; padding: 1px 6px; letter-spacing: 0.04em;
  vertical-align: middle;
}

.chart-block { margin-bottom: 20px; }
.chart-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 12px;
}
.chart-title { font-size: 14px; font-weight: 700; color: #222; margin-right: 8px; }
.chart-sub { font-size: 11px; color: #bbb; width: 100%; margin-top: 2px; }

.filter-label { font-size: 13px; color: #666; }
.btn-reset {
  padding: 6px 14px; font-size: 13px; font-weight: 600; color: #555;
  border: 1px solid #ddd; border-radius: 5px; background: #fafafa; text-decoration: none;
}
.btn-reset:hover { background: #eee; }

/* ── Filter bar ──────────────────────────────────────────────────────────── */
.filter-bar {
  background: #fff; border-bottom: 1px solid #eee;
  padding: 10px 24px;
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
}
.filter-bar select,
.filter-bar input[type="date"] {
  padding: 5px 10px; border: 1px solid #ddd; border-radius: 5px;
  font-size: 13px; background: #fafafa;
}
.btn-apply {
  padding: 6px 16px; background: var(--brand-red); color: #fff;
  border: none; border-radius: 5px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.btn-apply:hover { opacity: .9; }

/* ── Page body ───────────────────────────────────────────────────────────── */
.page-body { padding: 20px 24px; flex: 1; }

/* ── KPI cards ───────────────────────────────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px; margin-bottom: 22px;
}
.kpi-card {
  background: #fff; border: 1px solid #eee; border-radius: 8px;
  padding: 16px 18px;
}
.kpi-label { font-size: 11px; font-weight: 700; color: #999; letter-spacing: .5px; text-transform: uppercase; }
.kpi-value { font-size: 24px; font-weight: 800; color: #111; margin-top: 4px; line-height: 1.1; }
.kpi-value.red  { color: var(--brand-red); }
.kpi-value.gold { color: var(--brand-gold); }
.kpi-value.blue { color: #2563eb; }
.kpi-value.mom-up   { color: #2e7d32; }
.kpi-value.mom-down { color: #c62828; }
.kpi-mom-row { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.kpi-mom-arrow { font-size: 0.85em; line-height: 1; }
.kpi-sub  { font-size: 12px; color: #aaa; margin-top: 2px; }

/* ── Chart cards ─────────────────────────────────────────────────────────── */
.chart-row {
  display: grid; gap: 18px; margin-bottom: 20px;
  grid-template-columns: 1fr;
}
.chart-row.two   { grid-template-columns: 1fr 1fr; }
.chart-row.three { grid-template-columns: 1fr 1fr 1fr; }

.chart-card {
  background: #fff; border: 1px solid #eee; border-radius: 8px;
  padding: 18px 20px;
}
.chart-card h3 {
  margin: 0 0 14px; font-size: 14px; font-weight: 700; color: #333;
}

/* ── Data table ──────────────────────────────────────────────────────────── */
.data-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
.data-table th {
  background: #f7f7f7; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .4px;
  padding: 10px 12px; text-align: left;
  border-bottom: 2px solid #eee;
}
.data-table td { padding: 9px 12px; border-bottom: 1px solid #f0f0f0; }
.data-table tr:hover td { background: #fafafa; }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }

/* rank badge */
.rank { display: inline-flex; align-items: center; justify-content: center;
        width: 22px; height: 22px; border-radius: 50%;
        background: var(--bg); font-size: 11px; font-weight: 700; color: #888; }
.rank.top { background: var(--brand-gold); color: #222; }

/* upload page */
.btn-primary {
  padding: 8px 18px; background: var(--brand-red); color: #fff;
  border: none; border-radius: 5px; font-size: 14px; font-weight: 600; cursor: pointer;
}
.btn-primary:hover { opacity: .92; }
.btn-outline-secondary {
  padding: 8px 16px; border: 1px solid #ccc; border-radius: 5px;
  background: #fff; color: #333; text-decoration: none; font-size: 14px;
}
.btn-outline-secondary:hover { background: #f5f5f5; }
.form-label { display: block; margin-bottom: 6px; }
.form-control {
  display: block; width: 100%; max-width: 480px;
  padding: 8px 10px; border: 1px solid #ddd; border-radius: 5px; font-size: 14px;
}
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; }
.alert-success { background: #e8f5e9; border: 1px solid #c8e6c9; color: #1b5e20; }
.alert-danger { background: #ffebee; border: 1px solid #ffcdd2; color: #b71c1c; }

.upload-intro { color: #666; font-size: 14px; margin-bottom: 20px; max-width: 720px; }
.upload-field { margin-bottom: 18px; }
.upload-form { margin-top: 8px; }
.upload-result-list { margin: 0; padding-left: 18px; }

/* Food Monthly — month vs month */
.food-monthly-filters { flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; }
.food-monthly-note { margin: 8px 24px 0; font-size: 13px; color: #555; }
.food-monthly-range-caption { margin: 4px 24px 0; font-size: 13px; color: #666; font-weight: 600; }
.food-monthly-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.food-monthly-kpi {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 14px 16px;
  border-left: 4px solid var(--brand-red);
}
.food-monthly-kpi-title {
  font-size: 11px;
  font-weight: 700;
  color: #999;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 10px;
}
.food-monthly-kpi-months {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 10px;
}
.food-monthly-kpi-val { font-size: 20px; font-weight: 800; color: #111; line-height: 1.15; }
.food-monthly-kpi-val.fm-blue { color: #1e40af; }
.fm-blue-td { color: #1e40af; }
.food-monthly-mom { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.food-monthly-mom-val { font-size: 15px; font-weight: 800; }
.food-monthly-mom-val.mom-up { color: #2e7d32; }
.food-monthly-mom-val.mom-down { color: #c62828; }

.source-tag.food-monthly-tag { background: #ffe8e8; color: #a00; border: 1px solid #f5c2c2; }
.source-tag.fm-tag-legacy {
  background: #dc3545;
  color: #fff;
  border: 1px solid #c82333;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
}
.fm-topbar .fm-clock-red { color: #dc3545; font-weight: 600; }
.fm-banner-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 0 24px 12px;
  padding-right: 8px;
}
.fm-banner-row .food-monthly-note { margin: 0; flex: 1 1 320px; max-width: 100%; }
.fm-range-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #eceff1;
  border: 1px solid #dde3e8;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
}
.fm-range-caption { font-weight: 600; color: #444; }
.btn-copy-range {
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.btn-copy-range:hover { background: #f5f5f5; }
.fm-filter-form .fm-label-a { color: #dc3545; font-weight: 700; }
.fm-filter-form .fm-label-b { color: #007bff; font-weight: 700; }
.fm-store-group { flex: 1 1 280px; min-width: 200px; }
.fm-store-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.fm-store-btn {
  border: 1px solid #ccc;
  background: #fff;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: #333;
}
.fm-store-btn:hover { background: #f5f5f5; }
.fm-store-btn.active {
  background: #dc3545;
  color: #fff;
  border-color: #dc3545;
}
.fm-kpi-heading {
  font-size: 14px;
  font-weight: 700;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 12px;
}
.fm-kpi-month {
  font-size: 11px;
  font-weight: 700;
  text-transform: capitalize;
  margin-bottom: 4px;
}
.fm-kpi-month--a { color: #dc3545; }
.fm-kpi-month--b { color: #007bff; }
.fm-val-b { color: #111 !important; }
.fm-mom-label { font-size: 12px; color: #888; }
.fm-line-wrap { min-height: 320px; }
.fm-bar-wrap { min-height: 280px; }
.fm-dow-wrap { min-height: 300px; }
.fm-dow-sub {
  font-size: 12px;
  color: #777;
  margin: 0 0 10px;
  line-height: 1.4;
}
.fm-th-a { color: #dc3545 !important; }
.fm-th-b { color: #007bff !important; }
.fm-td-a { color: #c62828; font-weight: 600; }
.fm-td-b { color: #1565c0; font-weight: 600; }
.fm-cat-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 6px;
}
.fm-cat-badge--red { background: #ffebee; color: #b71c1c; border: 1px solid #ffcdd2; }
.fm-cat-badge--purple { background: #f3e5f5; color: #6a1b9a; border: 1px solid #e1bee7; }
.fm-cat-badge--neutral { background: #f5f5f5; color: #555; border: 1px solid #e0e0e0; }
.fm-data-table tbody tr:nth-child(even) td { background: #fafafa; }
.fm-page-body { padding-left: 24px; padding-right: 24px; }

/* Café Monthly — layout (shares fm-* with Food Monthly) */
.fm-filter-months-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 16px;
}
.cm-vs {
  font-size: 14px;
  font-weight: 800;
  color: #888;
  padding-bottom: 10px;
  letter-spacing: 0.05em;
}
.fm-swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin-right: 6px;
  vertical-align: middle;
}
.fm-swatch-a { background: #dc3545; }
.fm-swatch-b { background: #007bff; }
.cm-daily-sub {
  font-size: 12px;
  color: #666;
  margin: 0 0 10px;
  line-height: 1.4;
}
.cm-cafe-note {
  border-left: 3px solid #F9B020;
  padding-left: 10px;
}
.cm-monthly-page .cm-store-btn.active {
  background: #333;
  color: #fff;
  border-color: #333;
}
.cm-monthly-page .cm-store-btn:not(.active):hover {
  background: #f0f0f0;
}

/* System Configuration */
.cfg-page { max-width: 1320px; }
.cfg-save-msg {
  color: #2e7d32;
  font-weight: 700;
  margin: 2px 0 10px;
}
.cfg-note {
  background: #fff7e6;
  border: 1px solid #ffe0a3;
  color: #8a6d3b;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 12px;
}
.cfg-form-stack {
  display: grid;
  gap: 12px;
}
.cfg-card {
  padding: 14px 16px;
}
.cfg-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.cfg-card h3 {
  margin: 0;
  font-size: 16px;
}
.cfg-btn-mini {
  border: 1px solid #f6c65b;
  background: #fff9e8;
  color: #8c6d1f;
  font-size: 12px;
  font-weight: 700;
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
}
.cfg-btn-mini:hover { background: #fff2cf; }
.cfg-subhead {
  font-size: 12px;
  color: #666;
  font-weight: 700;
  margin: 6px 0;
}
.cfg-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cfg-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
}
.cfg-chip--red { background: #ffe9ec; color: #b00020; border: 1px solid #ffcdd5; }
.cfg-chip--amber { background: #fff4dd; color: #ad6b00; border: 1px solid #ffd79a; }
.cfg-chip--muted { background: #f3f4f6; color: #666; border: 1px solid #e5e7eb; }
.cfg-platform { color: #d17e00; font-weight: 700; }
.cfg-foot-note {
  margin: 6px 0 0;
  font-size: 12px;
  color: #888;
}
.cfg-mini-table th,
.cfg-mini-table td {
  padding-top: 6px;
  padding-bottom: 6px;
}
.cfg-threshold-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.cfg-th {
  border-radius: 8px;
  padding: 10px 12px;
  border: 1px solid #eee;
  text-align: center;
}
.cfg-th-label {
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 4px;
}
.cfg-th-value { font-size: 28px; font-weight: 900; line-height: 1.1; }
.cfg-th--over { background: #e9f6ff; border-color: #cce8ff; color: #1976d2; }
.cfg-th--ok { background: #ecf9ee; border-color: #cfedd4; color: #2e7d32; }
.cfg-th--under { background: #fff1f1; border-color: #ffd8d8; color: #c62828; }
.cfg-inline-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.cfg-target-wrap {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-weight: 700;
}
.cfg-target-input {
  width: 90px;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 22px;
  font-weight: 900;
  color: #d59500;
  text-align: right;
}
.cfg-target-input--green {
  color: #2e7d32;
}
.cfg-sch-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
  min-height: 0;
}
.cfg-sch-preview:empty {
  display: none;
}
.cfg-sch-preview-tile {
  border-radius: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  text-align: center;
}
.cfg-sch-preview-name {
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
  opacity: 0.95;
}
.cfg-sch-preview-val {
  font-size: 20px;
  font-weight: 900;
  line-height: 1.15;
  word-break: break-word;
}
.cfg-sch-table .form-control-sm {
  min-width: 0;
}
.cfg-fixed-val {
  font-size: 32px;
  font-weight: 900;
  color: #42b549;
  line-height: 1;
}
.cfg-target-unit {
  font-size: 12px;
  color: #666;
  font-weight: 600;
}
.cfg-food-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 10px;
}
.cfg-pill-panel {
  border-radius: 8px;
  padding: 10px;
  border: 1px solid #eee;
}
.cfg-pill-panel--food { background: #fff7f8; border-color: #ffd8de; }
.cfg-pill-panel--cafe { background: #fffdf6; border-color: #ffe7b2; }
.cfg-pill-title {
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 6px;
}
.cfg-card-head--row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.cfg-agg-edit-btn {
  flex-shrink: 0;
}
.cfg-agg-summary-table {
  margin-bottom: 0;
}
.cfg-agg-add-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(160px, 2fr) minmax(88px, 120px) auto;
  gap: 12px 16px;
  align-items: end;
}
.cfg-agg-add-field--wide {
  min-width: 0;
}
.cfg-agg-add-field--color {
  min-width: 0;
  max-width: 140px;
}
.cfg-agg-add-btn-wrap {
  padding-bottom: 2px;
}
@media (max-width: 700px) {
  .cfg-agg-add-row {
    grid-template-columns: 1fr;
  }
}
.cfg-agg-pat-cell {
  word-break: break-word;
  max-width: 420px;
}
.cfg-agg-color-swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  vertical-align: middle;
  margin-right: 6px;
}
.cfg-agg-color-code {
  font-size: 12px;
  color: #555;
}
.cfg-agg-color-cell-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.cfg-agg-color-pick {
  width: 38px;
  height: 32px;
  padding: 2px;
  cursor: pointer;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
  flex-shrink: 0;
}
.cfg-agg-color-hex {
  width: 7.5rem;
  min-width: 0;
}
.cfg-agg-block {
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 14px;
  background: #fafafa;
}
.cfg-agg-row-head {
  margin-bottom: 8px;
}
.cfg-agg-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 10px;
}
.cfg-agg-grid--2 {
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 900px) {
  .cfg-agg-grid,
  .cfg-agg-grid--2 {
    grid-template-columns: 1fr;
  }
}
.cfg-agg-grid label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #555;
  margin-bottom: 4px;
}
.cfg-text-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
}
.cfg-textarea {
  width: 100%;
  border: 1px solid #d7d7d7;
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 12px;
  margin-top: 4px;
}
.cfg-store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}
.cfg-store-card {
  background: #fafafa;
  border: 1px solid #efefef;
  border-radius: 8px;
  padding: 10px;
}
.cfg-store-top {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cfg-store-id {
  background: #c62828;
  color: #fff;
  font-size: 11px;
  border-radius: 4px;
  padding: 1px 6px;
  font-weight: 700;
}
.cfg-store-code {
  color: #d59500;
  font-size: 11px;
  font-weight: 800;
}
.cfg-store-name {
  font-weight: 800;
  margin-top: 4px;
  font-size: 14px;
}
.cfg-store-date {
  color: #888;
  font-size: 12px;
}
.cfg-store-period-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  margin: 8px 0 6px;
}
.cfg-month-chip {
  background: #e3f2fd;
  color: #1565c0;
  border: 1px solid #bbdefb;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
}
@media (max-width: 900px) {
  .cfg-threshold-grid { grid-template-columns: 1fr; }
  .cfg-food-grid { grid-template-columns: 1fr; }
  .cfg-inline-row { flex-direction: column; align-items: flex-start; }
}
.source-tag.cafe-monthly-tag { background: #fff8e1; color: #856404; border: 1px solid #e6c200; }
.cafe-monthly-banner { border-left: 3px solid #ffc107; padding-left: 10px; }
.cafe-monthly-kpi { border-left-color: #F9B020; }
.cafe-cat-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  background: #fff3e0;
  color: #b45309;
  border: 1px solid #fcd34d;
}

/* Weekly Day-of-Week Analysis */
.weekly-topbar { align-items: flex-start; }
.weekly-main-title {
  font-size: 18px;
  font-weight: 700;
  color: #666;
  letter-spacing: 0.02em;
}
.topbar-actions.weekly-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.btn-weekly-pptx {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  background: var(--brand-gold);
  color: #222;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}
.btn-weekly-pptx:hover { filter: brightness(0.95); }
.btn-weekly-pdf {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  background: #fff;
  color: var(--brand-red);
  border: 2px solid var(--brand-red);
  border-radius: 5px;
  cursor: pointer;
}
.btn-weekly-pdf:hover { background: #fff5f5; }
.btn-weekly-refresh {
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  background: var(--brand-red);
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}
.btn-weekly-refresh:hover { opacity: 0.92; }

.weekly-filter-bar { align-items: flex-end; gap: 14px 16px; }
.weekly-year-group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.year-pills { display: inline-flex; gap: 0; border-radius: 6px; overflow: hidden; border: 1px solid #ddd; }
.year-pill {
  margin: 0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  background: #fafafa;
  color: #555;
  border-right: 1px solid #ddd;
}
.year-pill:last-child { border-right: none; }
.year-pill input { position: absolute; opacity: 0; pointer-events: none; }
.year-pill.active {
  background: var(--brand-red);
  color: #fff;
}
.year-pill:hover:not(.active) { background: #eee; }

.weekly-kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.weekly-kpi .kpi-label { letter-spacing: 0.06em; }
.weekly-chart-hint {
  font-size: 12px;
  color: #888;
  margin: 0 0 12px;
  line-height: 1.45;
}
.weekly-chart-wrap {
  position: relative;
  min-height: 280px;
}
.weekly-dow-charts .chart-card h3 { font-size: 13px; }
.weekly-table-card h3 { margin-bottom: 12px; }

.badge-dow {
  display: inline-block;
  margin-left: 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 4px;
  vertical-align: middle;
}
.badge-best { background: #ffebee; color: var(--brand-red); border: 1px solid #ffcdd2; }
.badge-slow { background: #e3f2fd; color: #1565c0; border: 1px solid #90caf9; }

.dow-row-slow td { background: #f5fbff; }
.dow-row-best td { background: #fff8f8; }
.dow-row-slow:hover td, .dow-row-best:hover td { filter: brightness(0.98); }
.net-emphasis { color: var(--brand-red); font-weight: 700; }

.week-row-best td { background: #fffbf0; }
.week-row-best:hover td { background: #fff5e0; }
.wow-up { color: #2e7d32; font-weight: 600; }
.wow-down { color: #c62828; font-weight: 600; }

@media (max-width: 1100px) {
  .weekly-kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Store Comparison */
.store-comparison-page { padding-top: 4px; }
.sc-metric-toggle-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-bottom: 18px;
}
.sc-metric-toggle {
  display: inline-flex;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid #ddd;
  background: #fafafa;
}
.sc-toggle-opt {
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 700;
  color: #555;
  text-decoration: none;
  border: none;
  background: transparent;
}
.sc-toggle-opt:hover { background: #eee; color: #222; }
.sc-toggle-opt.active {
  background: var(--brand-red);
  color: #fff;
}
.sc-toggle-hint { font-size: 12px; color: #aaa; }
.sc-more-stores-note {
  font-size: 13px;
  color: #666;
  margin: 0 0 14px;
  max-width: 900px;
  line-height: 1.45;
}

.sc-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 22px;
}
.sc-store-card {
  position: relative;
  background: #fff;
  border: 3px solid #eee;
  border-radius: 10px;
  padding: 18px 20px 20px;
  min-height: 200px;
}
.sc-store-card--leader { border-color: var(--brand-red); }
.sc-store-card--runner { border-color: var(--brand-gold); }
.sc-store-card--empty {
  border-style: dashed;
  border-color: #ddd;
  background: #fafafa;
  min-height: 200px;
}
.sc-trophy {
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 26px;
  line-height: 1;
}
.sc-store-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  padding-right: 36px;
}
.sc-store-name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.03em;
}
.sc-store-name--leader { color: var(--brand-red); }
.sc-store-name--runner { color: #b8860b; }
.sc-leader-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #fff;
  background: var(--brand-red);
  padding: 3px 8px;
  border-radius: 4px;
}
.sc-store-primary {
  font-size: 28px;
  font-weight: 800;
  color: #111;
  line-height: 1.15;
}
.sc-store-sub { font-size: 12px; color: #888; margin-top: 4px; }
.sc-store-stats {
  margin-top: 16px;
  font-size: 13px;
  color: #444;
  line-height: 1.65;
}
.sc-store-stats strong { color: #111; font-weight: 700; }
.sc-stat-label { color: #888; margin-right: 6px; }

.sc-chart-row .sc-chart-wrap {
  position: relative;
  min-height: 260px;
}
.sc-table-footnote-top {
  font-size: 12px;
  color: #666;
  line-height: 1.5;
  margin: 0 0 14px;
}
.sc-compare-table tbody tr:nth-child(odd) td { background: #fafafa; }
.sc-compare-table tbody tr:hover td { filter: brightness(0.98); }
.sc-row-active td { background: #fff8f8 !important; }
.sc-row-share td { background: #f7f7f7 !important; font-weight: 600; }
.sc-val-leader { color: var(--brand-red) !important; font-weight: 700; }
.sc-val-runner { color: #b8860b !important; font-weight: 700; }
.sc-th-name { font-size: 11px; letter-spacing: 0.04em; }
.sc-th-leader { color: var(--brand-red); }
.sc-th-runner { color: #b8860b; }
.sc-th-trophy { margin-right: 4px; }
.sc-col-head { text-align: right !important; vertical-align: bottom; }

/* Sales Forecasting (Analytics) */
.forecasting-topbar {
  background: #1e1e1e !important;
  border-bottom: 1px solid #333 !important;
}
.forecasting-title { color: #fff !important; font-weight: 800; }
.forecasting-sub { color: #b8b8b8 !important; }
.forecasting-clock { color: #e0e0e0 !important; }
.btn-forecast-pdf {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  background: #fff;
  color: #111;
  border: 1px solid #bbb;
  border-radius: 5px;
  cursor: pointer;
}
.btn-forecast-pdf:hover { background: #f3f3f3; }

.forecasting-page { padding-top: 4px; }
.fc-kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fc-kpi-card .kpi-label { letter-spacing: 0.05em; }
.fc-kpi-gold { color: #b8860b !important; font-weight: 800; }

.fc-methodology-banner {
  background: linear-gradient(90deg, #fff9e6 0%, #fffdf5 100%);
  border: 1px solid #f0e0b8;
  border-left: 4px solid #c9a227;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  color: #6b5a1e;
  line-height: 1.5;
  margin-bottom: 20px;
}
.fc-methodology-banner strong { color: #5c4d15; }

.fc-main-chart-card { margin-bottom: 20px; }
.fc-chart-main-title { margin: 0 0 6px; font-size: 15px; font-weight: 700; color: #333; }
.fc-chart-legend-note {
  font-size: 12px;
  color: #666;
  margin: 0 0 12px;
  line-height: 1.45;
}
.fc-chart-wrap {
  position: relative;
  min-height: 320px;
}

.fc-table-title { margin-bottom: 4px; }
.fc-table-sub {
  font-size: 12px;
  color: #888;
  margin: 0 0 12px;
}
.fc-forecast-table tbody tr:nth-child(odd) td { background: #fafafa; }
.fc-cell-forecast { color: #b8860b; font-weight: 700; }
.fc-cell-band { color: #999; font-size: 13px; }

@media (max-width: 1100px) {
  .fc-kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Day-Part Analysis */
.dp-topbar { align-items: flex-start; }
.dp-title-block {
  background: #eceff1;
  padding: 8px 14px 10px;
  border-radius: 6px;
  border: 1px solid #dde3e8;
}
.dp-main-title { color: #333 !important; }
.dp-main-sub { color: #666 !important; }

.dp-kpi-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 8px;
}
.dp-kpi-card {
  border-top-width: 5px !important;
  border-top-style: solid;
  border-left: 1px solid #eee;
  border-right: 1px solid #eee;
  border-bottom: 1px solid #eee;
}
.dp-kpi--dinner { border-top-color: #CC2229 !important; }
.dp-kpi--late { border-top-color: #2e7d32 !important; }
.dp-kpi--lunch { border-top-color: #2196F3 !important; }
.dp-kpi--breakfast { border-top-color: #F9B020 !important; }
.dp-kpi--other { border-top-color: #9e9e9e !important; }

.dp-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 16px;
  padding: 4px;
  background: #f0f0f0;
  border-radius: 10px;
  width: fit-content;
  max-width: 100%;
}
.dp-tab {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  color: #555;
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}
.dp-tab:hover { background: rgba(255,255,255,0.7); color: #222; }
.dp-tab.active {
  background: #fff;
  color: #111;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.dp-summary-row { align-items: stretch; }
.dp-donut-card h3 { text-transform: none; }
.dp-chart-hint { font-size: 12px; color: #aaa; margin: -6px 0 10px; }
.dp-donut-wrap { position: relative; min-height: 280px; max-width: 420px; margin: 0 auto; }

.dp-detail-table tbody tr { position: relative; }
.dp-detail-row td:first-child { padding-left: 16px; }
.dp-detail-row.dp-row--dinner td:first-child { box-shadow: inset 4px 0 0 0 #CC2229; }
.dp-detail-row.dp-row--late td:first-child { box-shadow: inset 4px 0 0 0 #2e7d32; }
.dp-detail-row.dp-row--lunch td:first-child { box-shadow: inset 4px 0 0 0 #2196F3; }
.dp-detail-row.dp-row--breakfast td:first-child { box-shadow: inset 4px 0 0 0 #F9B020; }
.dp-detail-row.dp-row--other td:first-child { box-shadow: inset 4px 0 0 0 #9e9e9e; }

/* Check Analysis */
.ca-title-block {
  background: #eceff1;
  padding: 8px 14px 10px;
  border-radius: 6px;
  border: 1px solid #dde3e8;
}
.ca-kpi-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.ca-kpi {
  border-top-width: 4px !important;
  border-top-style: solid;
  border-left: 1px solid #eee;
  border-right: 1px solid #eee;
  border-bottom: 1px solid #eee;
}
.ca-kpi--black   { border-top-color: #333 !important; }
.ca-kpi--red     { border-top-color: #CC2229 !important; }
.ca-kpi--orange  { border-top-color: #F9B020 !important; }
.ca-kpi--blue    { border-top-color: #2196F3 !important; }
.ca-kpi--green   { border-top-color: #2e7d32 !important; }
.ca-kpi--purple  { border-top-color: #8E24AA !important; }
.ca-kpi--black .ca-kpi-val   { color: #111; }
.ca-kpi--red .ca-kpi-val     { color: #CC2229; }
.ca-kpi--orange .ca-kpi-val  { color: #e65100; }
.ca-kpi--blue .ca-kpi-val    { color: #1976d2; }
.ca-kpi--green .ca-kpi-val   { color: #2e7d32; }
.ca-kpi--purple .ca-kpi-val  { color: #7b1fa2; }
.ca-chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.ca-chart-head h3 { margin: 0; flex: 1; }
.ca-copy-btn {
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #555;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 5px;
  cursor: pointer;
}
.ca-copy-btn:hover { background: #f5f5f5; }
.ca-chart-hint {
  font-size: 12px;
  color: #888;
  margin: 0 0 12px;
}
.ca-bar-wrap {
  position: relative;
  height: 260px;
}
.ca-table-sub {
  font-size: 12px;
  color: #888;
  margin: -6px 0 12px;
}
.ca-dist-cell { vertical-align: middle; min-width: 120px; }
.ca-mini-bar-track {
  height: 10px;
  background: #f0f0f0;
  border-radius: 4px;
  overflow: hidden;
}
.ca-mini-bar {
  height: 100%;
  border-radius: 4px;
  min-width: 2px;
  transition: width 0.2s ease;
}
.ca-heat-card h3 { text-transform: none; }
.ca-heat-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 14px;
}
.ca-heat-btn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  background: #f0f0f0;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  cursor: pointer;
}
.ca-heat-btn:hover { background: #e8e8e8; }
.ca-heat-btn.active {
  background: var(--brand-red);
  color: #fff;
  border-color: var(--brand-red);
}
.ca-heat-scroll {
  overflow-x: auto;
  margin-bottom: 10px;
  -webkit-overflow-scrolling: touch;
}
.ca-heat-table {
  border-collapse: collapse;
  font-size: 11px;
  width: max-content;
  min-width: 100%;
}
.ca-heat-table th,
.ca-heat-table td {
  padding: 4px 5px;
  text-align: center;
  border: 1px solid #eee;
  white-space: nowrap;
}
.ca-heat-table .ca-heat-d {
  text-align: left;
  font-weight: 700;
  background: #fafafa;
  min-width: 44px;
}
.ca-heat-h { font-weight: 600; color: #666; background: #fafafa; }
.ca-heat-cell {
  font-variant-numeric: tabular-nums;
  min-width: 36px;
  color: #222;
}
.ca-heat-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  font-size: 11px;
  color: #888;
  margin-top: 4px;
}
.ca-heat-gradient {
  width: 120px;
  height: 10px;
  border-radius: 4px;
  background: linear-gradient(90deg, rgb(255,245,220), rgb(45,35,30));
}
.ca-insights-banner {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-top: 22px;
  padding: 14px 18px;
  background: #fff8e6;
  border: 1px solid #ffe0a3;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.5;
  color: #4a3c00;
}
.ca-insights-icon { font-size: 20px; line-height: 1.2; flex-shrink: 0; }
.ca-insights-banner strong { display: block; margin-bottom: 4px; color: #333; }
.ca-insights-text { margin: 0; }

/* Service Time */
.st-page {
  background: #e9e9e9;
  border-radius: 6px;
}
.st-mid-row {
  align-items: stretch;
}
.st-kpi-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.st-kpi {
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
  border-top-width: 4px !important;
  border-top-style: solid;
  border-left: 1px solid #e8e8e8;
  border-right: 1px solid #e8e8e8;
  border-bottom: 1px solid #e8e8e8;
}
.st-kpi--red {
  border-top-color: #CC2229 !important;
}
.st-kpi--red .st-kpi-main {
  color: #CC2229;
}
.st-kpi--gold {
  border-top-color: #F9B020 !important;
}
.st-kpi--gold .st-kpi-main {
  color: #c49000;
}
.st-kpi--green {
  border-top-color: #2e7d32 !important;
}
.st-kpi--green .st-kpi-main {
  color: #2e7d32;
}
.st-kpi--neutral {
  border-top-color: #bdbdbd !important;
}
.st-kpi--neutral .st-kpi-main {
  color: #111;
}
.st-kpi .kpi-label {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 10px;
}
.st-kpi-main {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.15;
  margin-top: 4px;
}
.st-kpi-sub {
  font-size: 12px;
  color: #888;
  margin-top: 6px;
  line-height: 1.3;
}
.st-chart-card h3 {
  text-transform: none;
  font-size: 15px;
}
.st-hour-card {
  margin-bottom: 18px;
}
.st-hour-wrap {
  min-height: 280px;
}
.st-rev-wrap {
  min-height: 260px;
}
.st-dist-wrap {
  min-height: 280px;
}
.st-legend-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 8px;
  font-size: 12px;
  color: #555;
}
.st-leg {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.st-leg-sq {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  display: inline-block;
}
.st-leg-ok { background: #2e7d32; }
.st-leg-bad { background: #CC2229; }
.st-dist-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-bottom: 8px;
  font-size: 11px;
  color: #666;
}
.st-dist-leg {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.st-dist-leg span:first-child {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  display: inline-block;
}
.st-d0 { background: #2e7d32; }
.st-d1 { background: #F9B020; }
.st-d2 { background: #FF9800; }
.st-d3 { background: #CC2229; }
.st-bullet-card {
  margin-bottom: 18px;
}
.st-bullet-legend-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-bottom: 14px;
  font-size: 11px;
  color: #555;
}
.st-bl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.st-bl-on {
  width: 18px;
  height: 10px;
  background: #c8e6c9;
  border-radius: 2px;
}
.st-bl-mid {
  width: 18px;
  height: 10px;
  background: #fff9c4;
  border-radius: 2px;
}
.st-bl-over {
  width: 18px;
  height: 10px;
  background: #ffcdd2;
  border-radius: 2px;
}
.st-bl-line {
  width: 2px;
  height: 12px;
  background: #111;
  border-radius: 1px;
}
.st-bullet-row {
  display: grid;
  grid-template-columns: minmax(100px, 120px) 1fr minmax(140px, 180px);
  gap: 12px 16px;
  align-items: center;
  margin-bottom: 12px;
}
.st-bullet-name {
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.st-rc-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
  display: inline-block;
}
.st-bullet-track {
  position: relative;
  height: 28px;
  border-radius: 6px;
  overflow: visible;
}
.st-bullet-zones {
  position: absolute;
  inset: 0;
  display: flex;
  border-radius: 6px;
  overflow: hidden;
}
.st-zone-on {
  flex: 8;
  background: #c8e6c9;
}
.st-zone-border {
  flex: 4;
  background: #fff9c4;
}
.st-zone-over {
  flex: 12;
  background: #ffcdd2;
}
.st-bullet-target {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: #111;
  z-index: 2;
  pointer-events: none;
}
.st-bullet-bar {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 12px;
  background: rgba(33, 33, 33, 0.88);
  border-radius: 3px;
  z-index: 1;
  max-width: 100%;
  pointer-events: none;
}
.st-bullet-meta {
  text-align: right;
  font-size: 13px;
}
.st-bullet-avg {
  display: block;
  font-size: 15px;
}
.st-bullet-delta {
  font-size: 12px;
  font-weight: 600;
}
.st-delta-over {
  color: #c62828;
}
.st-delta-under {
  color: #2e7d32;
}
.st-delta-na {
  color: #999;
  font-weight: 500;
}
.st-rc-table .st-slow-good {
  color: #2e7d32;
  font-weight: 700;
}
.st-rc-table .st-slow-bad {
  color: #c62828;
  font-weight: 700;
}
.st-rc-table .st-avg-good {
  color: #2e7d32;
  font-weight: 700;
}
.st-rc-table .st-avg-warn {
  color: #c62828;
  font-weight: 700;
}
.st-delta-icon {
  font-size: 11px;
  margin-right: 3px;
}
.st-delta-under .st-delta-icon {
  color: #2e7d32;
  font-weight: 800;
}
.st-delta-over .st-delta-icon {
  color: #c62828;
}

@media (max-width: 1200px) {
  .st-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Order Mode (channels / RevCenter) */
.om-page {
  background: #e9e9e9;
  border-radius: 6px;
}
.om-kpi-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
@media (max-width: 1400px) {
  .om-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .om-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .om-kpi-grid { grid-template-columns: 1fr; }
}
.om-kpi {
  border-top-width: 4px !important;
  border-top-style: solid;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
  border-left: 1px solid #e8e8e8;
  border-right: 1px solid #e8e8e8;
  border-bottom: 1px solid #e8e8e8;
}
.om-kpi .kpi-label {
  font-size: 10px;
  letter-spacing: 0.06em;
}
.om-kpi-val {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
  margin-top: 4px;
}
.om-kpi-meta {
  margin: 8px 0 0;
  font-size: 12px;
  color: #666;
  line-height: 1.45;
}
.om-chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.om-chart-head h3 {
  margin: 0;
}
.om-chart-hint {
  margin-top: 0;
}
.om-metric-toggle,
.om-stack-toggle {
  display: inline-flex;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}
.om-metric-btn,
.om-stack-btn {
  border: none;
  background: #fff;
  color: #555;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 10px;
  cursor: pointer;
  line-height: 1.2;
}
.om-metric-btn + .om-metric-btn,
.om-stack-btn + .om-stack-btn {
  border-left: 1px solid #e0e0e0;
}
.om-metric-btn:hover,
.om-stack-btn:hover {
  background: #fafafa;
}
.om-metric-btn.active,
.om-stack-btn.active {
  background: #fff9e8;
  color: #8c6d1f;
  box-shadow: inset 0 -2px 0 0 #f6c65b;
}
.om-donut-wrap,
.om-bar-wrap,
.om-month-wrap {
  position: relative;
  min-height: 260px;
}
.om-month-wrap {
  min-height: 300px;
}
.om-charts-top {
  align-items: stretch;
}
.om-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin-right: 8px;
  vertical-align: middle;
}
.om-table .om-row-other td {
  background: #fafafa;
}

/* Payment Methods */
.pm-page {
  background: #e9e9e9;
  border-radius: 6px;
}
.pm-kpi-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
@media (max-width: 1400px) {
  .pm-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .pm-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .pm-kpi-grid { grid-template-columns: 1fr; }
}
.pm-kpi {
  border-top-width: 4px !important;
  border-top-style: solid;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
  border-left: 1px solid #e8e8e8;
  border-right: 1px solid #e8e8e8;
  border-bottom: 1px solid #e8e8e8;
}
.pm-kpi .kpi-label {
  font-size: 10px;
  letter-spacing: 0.06em;
}
.pm-kpi-val {
  font-size: 21px;
  font-weight: 800;
  line-height: 1.2;
  margin-top: 4px;
}
.pm-kpi-meta {
  margin: 8px 0 0;
  font-size: 12px;
  color: #666;
  line-height: 1.45;
}
.pm-charts-row {
  align-items: stretch;
}
.pm-donut-wrap,
.pm-month-wrap {
  position: relative;
  min-height: 280px;
}
.pm-chart-hint {
  margin-top: 0;
}
.pm-table-card h3 {
  margin-bottom: 6px;
}
.pm-table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.pm-table-head h3 {
  margin: 0;
}
.pm-raw-toggle {
  border: 1px solid #e0e0e0;
  background: #fff;
  color: #555;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
}
.pm-raw-toggle:hover {
  background: #fafafa;
}
.pm-raw-title {
  font-size: 13px;
  font-weight: 700;
  margin: 16px 0 10px;
  color: #444;
}
.pm-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin-right: 8px;
  vertical-align: middle;
}
.pm-raw-table {
  margin-bottom: 0;
}

/* Budget Dashboard */
.bd-page {
  background: #e9e9e9;
  border-radius: 6px;
}
.bd-kpi-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
@media (max-width: 1200px) {
  .bd-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .bd-kpi-grid { grid-template-columns: 1fr; }
}
.bd-kpi {
  border-top-width: 4px !important;
  border-top-style: solid;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
  border-left: 1px solid #e8e8e8;
  border-right: 1px solid #e8e8e8;
  border-bottom: 1px solid #e8e8e8;
}
.bd-kpi--year {
  border-top-color: #bdbdbd !important;
}
.bd-kpi--purple {
  border-top-color: #8e44ad !important;
}
.bd-kpi--neutral {
  border-top-color: #bdbdbd !important;
}
.bd-kpi--gold {
  border-top-color: #f39c12 !important;
}
.bd-kpi--gap {
  border-top-color: #e74c3c !important;
}
.bd-kpi .kpi-label {
  font-size: 10px;
  letter-spacing: 0.06em;
}
.bd-kpi-val {
  font-size: 21px;
  font-weight: 800;
  line-height: 1.2;
  margin-top: 4px;
}
.bd-kpi-val--black {
  color: #111 !important;
}
.bd-kpi-val--gold {
  color: #f39c12 !important;
}
.bd-kpi-val--red {
  color: #c62828 !important;
}
.bd-kpi-val--green {
  color: #2e7d32 !important;
}
.bd-kpi--purple .bd-kpi-val {
  color: #8e44ad;
}
.bd-kpi-meta {
  margin: 8px 0 0;
  font-size: 12px;
  color: #666;
  line-height: 1.45;
}
.bd-year-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 6px;
}
.bd-year-arrow {
  font-size: 20px;
  font-weight: 800;
  color: #555;
  text-decoration: none;
  line-height: 1;
  padding: 2px 8px;
  border-radius: 6px;
}
.bd-year-arrow:hover {
  background: #f0f0f0;
  color: #111;
}
.bd-year-val {
  font-size: 24px;
  font-weight: 800;
  color: #333;
}
.bd-table-card h3 {
  margin-bottom: 12px;
}
.bd-table-wrap {
  max-width: 100%;
}
.bd-table {
  font-size: 12px;
}
.bd-table thead th {
  vertical-align: bottom;
  text-align: center;
}
.bd-table thead th:first-child {
  text-align: left;
  vertical-align: middle;
}
.bd-th-store,
.bd-th-combined {
  font-weight: 800;
  color: #333;
}
.bd-th-combined {
  border-bottom: 3px solid #8e24aa !important;
}
.bd-table tbody td.num {
  white-space: nowrap;
}
.bd-row-total {
  background: #f5f5f5;
  font-weight: 700;
}
.bd-pct--ok {
  color: #2e7d32;
  font-weight: 700;
}
.bd-pct--mid {
  color: #f39c12;
  font-weight: 700;
}
.bd-pct--bad {
  color: #c62828;
  font-weight: 700;
}
.bd-chart-row {
  align-items: stretch;
}
.bd-chart-wrap {
  position: relative;
  min-height: 280px;
}
.bd-hint {
  margin-top: 0;
}

/* Anomaly Alerts */
.aa-topbar {
  align-items: flex-start;
}
.aa-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.aa-top-actions {
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.aa-range-pill {
  font-size: 13px;
  font-weight: 600;
  color: #555;
  background: #f0f0f0;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
}
.aa-kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.aa-kpi {
  border-top-width: 4px !important;
  border-top-style: solid;
  border-left: 1px solid #eee;
  border-right: 1px solid #eee;
  border-bottom: 1px solid #eee;
}
.aa-kpi--total { border-top-color: #FFC107 !important; }
.aa-kpi--high { border-top-color: #4CAF50 !important; }
.aa-kpi--medium { border-top-color: #f44336 !important; }
.aa-kpi--freq { border-top-color: #9C27B0 !important; }
.aa-kpi--total .aa-kpi-num { color: #f9a825; }
.aa-kpi--high .aa-kpi-num { color: #4CAF50; }
.aa-kpi--medium .aa-kpi-num { color: #e53935; }
.aa-kpi--freq .aa-kpi-num { color: #9C27B0; }
.aa-kpi .kpi-label {
  text-transform: none;
  font-size: 11px;
  letter-spacing: 0.04em;
}
.aa-kpi-num {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
}
.aa-kpi-sub {
  font-size: 12px;
  color: #888;
  margin-top: 6px;
}
.aa-method-banner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 16px;
  background: #e3f2fd;
  border: 1px solid #90caf9;
  border-radius: 8px;
  margin-bottom: 18px;
  font-size: 13px;
  line-height: 1.5;
  color: #1565c0;
}
.aa-method-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #2196F3;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.aa-method-banner p {
  margin: 0;
}
.aa-chart-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.aa-chart-head h3 {
  margin: 0;
  font-size: 15px;
  text-transform: none;
}
.aa-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12px;
  color: #555;
}
.aa-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.aa-lg-bar {
  width: 14px;
  height: 10px;
  background: rgba(255, 205, 210, 0.88);
  border-radius: 2px;
  display: inline-block;
}
.aa-lg-hi {
  width: 10px;
  height: 10px;
  background: #4CAF50;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #ddd;
}
.aa-lg-med {
  width: 10px;
  height: 10px;
  background: #9C27B0;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #ddd;
}
.aa-chart-wrap {
  min-height: 320px;
}
.aa-log-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.aa-log-head h3 {
  margin: 0;
  font-size: 15px;
  text-transform: none;
}
.aa-log-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.aa-btn-outline {
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-red);
  background: #fff;
  border: 2px solid var(--brand-red);
  border-radius: 5px;
  cursor: pointer;
}
.aa-btn-outline:hover {
  background: #fff5f5;
}
.aa-table tbody tr:nth-child(even) td {
  background: #fafafa;
}
.aa-dev-pos {
  color: #2e7d32;
  font-weight: 600;
}
.aa-dev-neg {
  color: #c62828;
  font-weight: 600;
}
.aa-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}
.aa-badge-high {
  background: #4CAF50;
}
.aa-badge-medium {
  background: #9C27B0;
}
.aa-empty-log {
  margin-top: 10px;
  font-size: 13px;
}
@media (max-width: 1100px) {
  .aa-kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .aa-kpi-grid { grid-template-columns: 1fr; }
}

/* Month Comparison */
.mc-topbar {
  align-items: flex-start;
}
.mc-title-block {
  background: #2c2c2c;
  color: #fff;
  padding: 10px 16px 12px;
  border-radius: 8px;
  border: 1px solid #444;
}
.mc-title-block .topbar-title,
.mc-title-block .topbar-sub {
  color: #fff !important;
}
.mc-title-block .topbar-sub {
  opacity: 0.85;
  font-size: 13px;
}
.mc-filter {
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 16px;
}
.mc-month-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #555;
}
.mc-sq {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  display: inline-block;
}
.mc-sq-a { background: #DC3545; }
.mc-sq-b { background: #007BFF; }
.mc-month-select {
  min-width: 150px;
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 13px;
}
.mc-vs {
  font-weight: 800;
  color: #999;
  font-size: 13px;
  padding: 0 4px;
}
.mc-store-toggles {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.mc-store-lbl { margin-right: 4px; }
.mc-store-pill {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #444;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 6px;
  text-decoration: none;
}
.mc-store-pill:hover {
  background: #eee;
}
.mc-store-pill.active {
  background: #222;
  color: #fff;
  border-color: #222;
}
.mc-apply { margin-left: auto; }
.mc-range-caption {
  font-size: 12px;
  color: #666;
  text-align: right;
  padding: 8px 24px 0;
  font-weight: 600;
}
.mc-body { padding-top: 8px; }
.mc-section-title {
  font-size: 16px;
  font-weight: 800;
  color: #333;
  margin: 0 0 14px;
}
.mc-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.mc-kpi-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.mc-kpi-name {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #888;
  margin-bottom: 10px;
}
.mc-kpi-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}
.mc-kpi-side {
  border-radius: 6px;
  padding: 10px 10px;
  min-height: 64px;
}
.mc-kpi-a {
  background: rgba(220, 53, 69, 0.08);
  border: 1px solid rgba(220, 53, 69, 0.25);
}
.mc-kpi-b {
  background: rgba(0, 123, 255, 0.08);
  border: 1px solid rgba(0, 123, 255, 0.25);
}
.mc-kpi-m {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #666;
  margin-bottom: 4px;
}
.mc-kpi-v {
  font-size: 18px;
  font-weight: 800;
  color: #222;
}
.mc-kpi-a .mc-kpi-v { color: #c82333; }
.mc-kpi-b .mc-kpi-v { color: #0069d9; }
.mc-kpi-foot {
  font-size: 12px;
  font-weight: 700;
}
.mc-chg-good { color: #2e7d32; }
.mc-chg-bad { color: #c62828; }
.mc-chart-card h3 {
  text-transform: none;
  font-size: 15px;
}
.mc-chart-legend-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  color: #555;
  margin-bottom: 8px;
}
.mc-lg-line {
  display: inline-block;
  width: 28px;
  height: 3px;
  vertical-align: middle;
  margin-right: 6px;
  border-radius: 2px;
}
.mc-lg-a { background: #DC3545; }
.mc-lg-b {
  background: repeating-linear-gradient(90deg, #007BFF 0, #007BFF 4px, transparent 4px, transparent 7px);
  height: 3px;
}
.mc-line-wrap {
  min-height: 340px;
}
.mc-bar-wrap {
  min-height: 280px;
}
.mc-chart-row {
  margin-bottom: 18px;
}
.mc-th-a { color: #c82333 !important; }
.mc-th-b { color: #0069d9 !important; }
.mc-sum-table tbody tr:nth-child(even) td {
  background: #fafafa;
}
.mc-t-good {
  color: #2e7d32;
  font-weight: 700;
}
.mc-t-bad {
  color: #c62828;
  font-weight: 700;
}
@media (max-width: 1200px) {
  .mc-kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .mc-kpi-grid { grid-template-columns: 1fr; }
}

/* Product Sales (Products/Index) */
.ps-title-block {
  background: #eceff1;
  padding: 8px 14px 10px;
  border-radius: 6px;
  border: 1px solid #dde3e8;
}
.ps-kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.ps-kpi {
  border: 1px solid #e0e0e0;
}
.ps-kpi--hero {
  border: 2px solid #D12027;
  border-top-width: 4px;
}
.ps-kpi--hero .ps-kpi-val {
  color: #D12027;
  font-size: 26px;
}
.ps-kpi .kpi-label {
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.06em;
}
.ps-kpi-top-name {
  font-size: 17px !important;
  font-weight: 800 !important;
  line-height: 1.25;
}
.ps-kpi-note {
  font-size: 11px;
  color: #888;
  margin: 8px 0 0;
  line-height: 1.4;
}
.ps-chart-card h3 {
  text-transform: none;
  font-size: 15px;
  margin: 0;
}
.ps-chart-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.ps-chart-hint {
  font-size: 12px;
  color: #999;
}
.ps-bar-wrap {
  min-height: 320px;
}
.ps-table-card h3 {
  text-transform: none;
  font-size: 15px;
  margin: 0;
}
.ps-table-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.ps-table-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}
.ps-select {
  padding: 5px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 13px;
  min-width: 140px;
}
.ps-table tbody tr:nth-child(even) td {
  background: #fafafa;
}
.ps-pos-id {
  color: #D12027 !important;
  font-weight: 700;
  font-size: 12px;
}
.ps-share-cell {
  min-width: 120px;
}
.ps-share-pct {
  display: inline-block;
  margin-right: 8px;
  font-variant-numeric: tabular-nums;
}
.ps-share-track {
  display: inline-block;
  vertical-align: middle;
  width: 72px;
  height: 8px;
  background: #eee;
  border-radius: 4px;
  overflow: hidden;
}
.ps-share-bar {
  height: 100%;
  background: #D12027;
  border-radius: 4px;
  min-width: 2px;
}
.ps-row-highlight {
  outline: 2px solid #F9B020;
  background: #fffbf0 !important;
}
.ps-row-highlight td {
  background: #fffbf0 !important;
}

/* Meal Sales (Products/MealSales) */
.ms-clock-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 4px;
}
.ms-status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c62828;
  flex-shrink: 0;
}
.ms-kpi--combo {
  border: 2px solid #c62828;
  border-top-width: 4px;
}
.ms-kpi--combo .ms-kpi-val-combo {
  color: #c62828;
  font-size: 26px;
  font-weight: 800;
}
.ms-kpi--ala {
  border: 2px solid #e65100;
  border-top-width: 4px;
}
.ms-kpi--ala .ms-kpi-val-ala {
  color: #e65100;
  font-size: 26px;
  font-weight: 800;
}
.ms-table-head h3 {
  margin: 0;
  font-size: 15px;
}
.ms-seg {
  display: inline-flex;
  border: 1px solid #ccc;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.ms-seg-btn {
  border: none;
  background: #fff;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: #333;
}
.ms-seg-btn.active {
  background: #D12027;
  color: #fff;
}
.ms-seg-btn:not(.active):hover {
  background: #f5f5f5;
}
.ms-meal-sub {
  font-size: 12px;
  color: #666;
  font-weight: 500;
  margin-top: 2px;
}

/* Menu Engineering (Products/MenuEngineering) */
.me-kpi-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.me-kpi--gross {
  border: 2px solid #5d4037;
  border-top-width: 4px;
}
.me-kpi--gross .me-kpi-num {
  color: #5d4037;
  font-size: 24px;
  font-weight: 800;
}
.me-kpi--net {
  border: 2px solid #1565c0;
  border-top-width: 4px;
}
.me-kpi--net .me-kpi-num {
  color: #1565c0;
  font-size: 24px;
  font-weight: 800;
}
.me-kpi-foot {
  font-size: 12px;
  color: #666;
  margin: 8px 0 0;
}
.me-updated-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 8px;
  font-size: 13px;
  color: #555;
}
.me-tab-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.me-tab {
  border: 1px solid #ccc;
  background: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: #333;
}
.me-tab:hover {
  background: #f5f5f5;
}
.me-tab.active {
  background: #D12027;
  color: #fff;
  border-color: #D12027;
}
.me-chart-card h3.me-chart-title {
  margin: 0 0 6px;
  font-size: 16px;
}
.me-chart-note {
  font-size: 12px;
  color: #777;
  margin: 0 0 12px;
  line-height: 1.4;
}
.me-scatter-wrap {
  min-height: 420px;
}
.me-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 16px;
  font-size: 12px;
}
.me-legend-item {
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
}
.me-legend--star { background: #e8f5e9; border-color: #a5d6a7; }
.me-legend--plowhorse { background: #fff8e1; border-color: #ffe082; }
.me-legend--puzzle { background: #e3f2fd; border-color: #90caf9; }
.me-legend--dog { background: #ffebee; border-color: #ef9a9a; }
.me-table-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.me-search {
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  min-width: 200px;
  font-size: 13px;
}
.btn-me-export {
  border: 1px solid #ccc;
  background: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.btn-me-export:hover {
  background: #f5f5f5;
}
.me-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: capitalize;
}
.me-badge--star { background: #c8e6c9; color: #1b5e20; }
.me-badge--plowhorse { background: #fff9c4; color: #f57f17; }
.me-badge--puzzle { background: #bbdefb; color: #0d47a1; }
.me-badge--dog { background: #ffcdd2; color: #b71c1c; }
.me-table tbody tr:nth-child(even) td {
  background: #fafafa;
}
@media (max-width: 900px) {
  .me-kpi-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1100px) {
  .ps-kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .ps-kpi-grid { grid-template-columns: 1fr; }
}

@media print {
  .sidebar { display: none !important; }
  .main-wrap { margin-left: 0 !important; }
  .weekly-actions .btn-weekly-refresh { display: none; }
  .forecasting-topbar .btn-weekly-refresh { display: none; }
  .aa-log-actions,
  .aa-filter-bar,
  .btn-forecast-pdf,
  .btn-weekly-refresh,
  .aa-top-actions .btn-forecast-pdf,
  .aa-top-actions .btn-weekly-refresh {
    display: none !important;
  }
  .mc-filter .btn-apply,
  .mc-store-toggles,
  .weekly-actions .btn-weekly-refresh,
  .weekly-actions .btn-weekly-pptx,
  .weekly-actions .btn-forecast-pdf,
  .ps-filter,
  .ms-filter,
  .em-filter,
  .em-filter-note,
  .vc-filter,
  .vc-filter-note,
  .agg-filter,
  .ms-seg,
  .me-filter,
  .me-tab-row,
  .me-table-tools,
  .fm-filter-form,
  .btn-copy-range,
  .cfg-btn-mini,
  .cfg-target-input,
  .ps-table-tools {
    display: none !important;
  }
}

@media (max-width: 900px) {
  .chart-row.two, .chart-row.three { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .food-monthly-kpi-months { grid-template-columns: 1fr; }
  .weekly-kpi-grid { grid-template-columns: 1fr; }
  .fc-kpi-grid { grid-template-columns: 1fr; }
  .dp-summary-row { grid-template-columns: 1fr; }
  .dp-kpi-grid { grid-template-columns: 1fr; }
  .ca-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .st-kpi-grid { grid-template-columns: 1fr; }
  .st-bullet-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .st-bullet-meta { text-align: left; }
  .topbar-actions.weekly-actions { width: 100%; justify-content: flex-end; }
  .sc-hero-grid { grid-template-columns: 1fr; }
}

/* People / Employees (staff hours & overview) */
.em-filter-note {
  margin: 8px 0 16px;
  font-size: 12px;
  max-width: 960px;
}
.em-page {
  padding-top: 4px;
}
.em-store-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.em-store-card {
  display: block;
  width: 100%;
  text-align: left;
  padding: 16px 18px;
  border-radius: 12px;
  background: #fff;
  border: 2px solid #e0e0e0;
  border-top-width: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  font: inherit;
  transition: box-shadow 0.15s ease, transform 0.12s ease;
}
.em-store-card:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}
.em-store-card--0 {
  border-color: #c62828;
  border-top-color: #D12027;
}
.em-store-card--1 {
  border-color: #f9a825;
  border-top-color: #F9B020;
}
.em-store-select--active {
  outline: 3px solid #1F3864;
  outline-offset: 2px;
}
.em-store-card-title {
  display: block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #333;
  margin-bottom: 8px;
}
.em-store-card-main {
  margin-bottom: 6px;
}
.em-store-card-num {
  font-size: 32px;
  font-weight: 800;
  color: #111;
  font-variant-numeric: tabular-nums;
}
.em-store-card-label {
  font-size: 14px;
  color: #666;
  margin-left: 6px;
}
.em-store-card-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  font-size: 14px;
  color: #555;
  font-variant-numeric: tabular-nums;
}
.em-store-card-sal {
  font-weight: 600;
}
.em-chart-row {
  margin-bottom: 18px;
}
.em-chart-card .ps-bar-wrap {
  min-height: 220px;
}
.em-table-sub {
  font-size: 13px;
  margin-top: 4px;
}
.em-table .num {
  font-variant-numeric: tabular-nums;
}

/* Operations / Voids & Comps */
.vc-filter-note {
  margin: 8px 0 16px;
  font-size: 12px;
  max-width: 960px;
  padding: 0 24px;
}
.vc-page {
  padding-top: 4px;
}
.vc-kpi-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
@media (max-width: 1200px) {
  .vc-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .vc-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.vc-kpi {
  border: 1px solid #eee;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.vc-kpi--void {
  border: 2px solid #d9534f;
  border-top-width: 4px;
}
.vc-kpi-val--void {
  color: #d9534f !important;
  font-size: 22px;
  font-weight: 800;
}
.vc-kpi--voidct {
  border: 2px solid #c62828;
  border-top-width: 4px;
}
.vc-kpi-val--voidct {
  color: #c62828 !important;
  font-size: 22px;
  font-weight: 800;
}
.vc-kpi--comps {
  border: 2px solid #5bc0de;
  border-top-width: 4px;
}
.vc-kpi-val--comps {
  color: #5bc0de !important;
  font-size: 22px;
  font-weight: 800;
}
.vc-kpi--promos {
  border: 2px solid #5cb85c;
  border-top-width: 4px;
}
.vc-kpi-val--promos {
  color: #5cb85c !important;
  font-size: 22px;
  font-weight: 800;
}
.vc-kpi--discount {
  border: 2px solid #f0ad4e;
  border-top-width: 4px;
}
.vc-kpi-val--discount {
  color: #f0ad4e !important;
  font-size: 22px;
  font-weight: 800;
}
.vc-kpi-note {
  font-size: 12px;
  color: #888;
  margin: 6px 0 0;
}
.vc-chart-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.vc-chart-head h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
}
.vc-chart-sub {
  font-size: 13px;
}
.vc-chart-mode {
  display: inline-flex;
  border: 1px solid #ccc;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.vc-mode-btn {
  border: none;
  background: #fff;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: #333;
}
.vc-mode-btn.active {
  background: var(--brand-red);
  color: #fff;
}
.vc-mode-btn:not(.active):hover {
  background: #f5f5f5;
}
.vc-chart-card {
  margin-bottom: 20px;
}
.vc-chart-wrap {
  position: relative;
  min-height: 320px;
}
.vc-table-head h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
}
.vc-table-sub {
  font-size: 13px;
}
.vc-table tbody tr:nth-child(even) td {
  background: #fafafa;
}
.vc-table tfoot td {
  background: #f0f0f0 !important;
  border-top: 2px solid #ddd;
}
.vc-cell-void {
  color: #d9534f !important;
  font-weight: 600;
}
.vc-cell-comps {
  color: #5bc0de !important;
  font-weight: 600;
}
.vc-cell-promos {
  color: #5cb85c !important;
  font-weight: 600;
}
.vc-month-row {
  cursor: pointer;
}
.vc-month-row:hover td {
  background: #fff8f0 !important;
}
.vc-row-active td {
  background: #fff3e0 !important;
  outline: 1px solid #f0ad4e;
}

/* Operations / Aggregators */
.agg-page {
  padding-top: 4px;
}
.agg-banner {
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 18px;
  font-size: 14px;
  color: #5d4037;
}
.agg-section-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #666;
  margin: 18px 0 10px;
}
.agg-kpi-grid {
  margin-bottom: 20px;
}
.agg-kpi-grid--4 {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.agg-kpi-tender,
.agg-kpi-item {
  position: relative;
  border-top-width: 4px !important;
  border: 1px solid #eee;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.agg-kpi-val-combined {
  color: #c62828 !important;
  font-size: 22px;
  font-weight: 800;
}
.agg-kpi-val-share {
  color: #f9a825 !important;
  font-size: 22px;
  font-weight: 800;
}
.agg-kpi-note {
  font-size: 12px;
  color: #888;
  margin: 6px 0 0;
}
.agg-net-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #1565c0;
  background: #e3f2fd;
  padding: 2px 6px;
  border-radius: 4px;
}
.agg-kpi--totals .kpi-value {
  font-size: 22px;
  font-weight: 800;
}
.agg-chart-wrap {
  position: relative;
  min-height: 300px;
}
.agg-table .num {
  font-variant-numeric: tabular-nums;
}
.agg-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin-right: 6px;
  vertical-align: middle;
}
.agg-row-highlight td {
  background: #fff8e1 !important;
  outline: 1px solid #ffb300;
}
