@font-face {
  font-family: Montserrat;
  src: url("../fonts/montserrat-cyrillic-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Montserrat;
  src: url("../fonts/montserrat-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  font-family: Montserrat;
  src: url("../fonts/montserrat-cyrillic-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Montserrat;
  src: url("../fonts/montserrat-latin-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  font-family: Unbounded;
  src: url("../fonts/unbounded-cyrillic-800.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Unbounded;
  src: url("../fonts/unbounded-latin-800.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+20AC, U+2122;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: #F9FAFB;
  color: #111827;
  font-family: Montserrat, sans-serif;
  font-size: 14px;
}
h1, h2 {
  font-family: Unbounded, sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
a { color: #212528; }
label { display: flex; flex-direction: column; gap: 6px; color: #6B7280; }
.check { flex-direction: row; align-items: center; color: #111827; }
input, select {
  border: 1px solid #D1D5DB;
  border-radius: 0.75rem;
  padding: 10px 12px;
  background: #fff;
  color: #111827;
}
input:focus, select:focus { outline: none; box-shadow: 0 0 0 2px #212528; }
.muted { color: #6B7280; }
.sidebar {
  width: 256px;
  background: #212528;
  color: #fff;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 20px 16px;
}
.sidebar a {
  display: block;
  color: #fff;
  text-decoration: none;
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 4px;
}
.sidebar a.active {
  background: #2C3236;
  box-shadow: inset -3px 0 0 #fff;
}
.sidebar-brand { margin-bottom: 24px; }
.sidebar-secondary {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #3a4045;
}
.sidebar-secondary a {
  color: #d1d5db;
  font-size: 14px;
}
.sidebar-secondary a.active {
  color: #fff;
}
.brand-mark {
  font-family: Unbounded, sans-serif;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.logout { margin-top: auto; }
.content { padding: 28px; }
.topbar, .overlay { display: none; }
.btn {
  background: #212528;
  color: #fff;
  border: 0;
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.btn:hover { background: #2C3236; transform: scale(1.02); }
.btn:disabled { background: #D1D5DB; color: #6B7280; transform: none; }
.btn-danger { background: #DC2626; }
.btn-danger:hover { background: #B91C1C; }
.btn-block { width: 100%; }
.pill {
  border-radius: 1rem;
  font-size: 14px;
  font-weight: 700;
  background: #fff;
  border: 1px solid #E5E7EB;
  color: #111827;
  padding: 8px 14px;
  text-decoration: none;
  font-family: inherit;
  cursor: pointer;
}
.pill.active { background: #212528; color: #fff; border-color: #212528; }
.kpi-grid, .filters, .pills, .toolbar, .page-head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
}
.page-head { justify-content: space-between; align-items: center; }
.section-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
}
h1 { margin: 0 0 16px; }
.kpi {
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 1rem;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  padding: 16px;
  min-width: 160px;
  transition: transform 0.15s;
}
.kpi:hover { transform: translateY(-2px); }
.kpi-value { font-size: 28px; font-weight: 700; margin-top: 6px; }
body.hide-money .money { font-size: 0; }
body.hide-money .money::after { content: "•••"; font-size: 28px; }
label { display: flex; flex-direction: column; gap: 6px; color: #6B7280; }
input, select {
  border: 1px solid #D1D5DB;
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  color: #111827;
  background: #fff;
}
input:focus, select:focus { outline: 2px solid #212528; border-color: #212528; }
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: 1fr; }
.gap-4 { gap: 1rem; }
.bg-white { background: #fff; }
.rounded-2xl { border-radius: 1rem; }
.border { border-width: 1px; border-style: solid; }
.border-gray-200 { border-color: #E5E7EB; }
.shadow-md { box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); }
.order-card { padding: 16px; cursor: pointer; }
.order-figures { display: flex; flex-direction: column; gap: 12px; }
.figure { font-size: 28px; font-weight: 700; }
.figure-text { font-size: 18px; }
.badge {
  display: inline-block;
  margin-top: 4px;
  color: #6B7280;
  font-size: 12px;
}
.badge-ok { color: #16A34A; }
.badge-bad { color: #DC2626; }
.badge-raw { background: #E5E7EB; color: #6B7280; border-radius: 999px; padding: 2px 8px; }
.order-meta { font-weight: 700; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid #E5E7EB; border-radius: 1rem; }
table { width: 100%; border-collapse: collapse; }
th {
  background: #F9FAFB;
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6B7280;
  padding: 12px;
}
td { padding: 12px; border-top: 1px solid #E5E7EB; }
tr:hover td { background: #F9FAFB; }
.kanban { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.receipt-card, .card, .panel, .auth-card {
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 1rem;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}
.receipt-card {
  width: 100%;
  text-align: left;
  padding: 12px;
  margin-bottom: 8px;
  font: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.panel, .card, .stack { padding: 16px; margin-top: 16px; }
.stack { display: flex; flex-direction: column; gap: 12px; max-width: 420px; }
.flash { background: #fff; border: 1px solid #E5E7EB; border-radius: 12px; padding: 12px; margin-bottom: 12px; }
.flash-error { border-color: #DC2626; color: #DC2626; }
.auth-body { min-height: 100vh; display: grid; place-items: center; }
.auth-card { width: min(420px, calc(100% - 32px)); padding: 28px; }
.qr { width: 220px; height: 220px; }
.chart-block { background: #fff; border: 1px solid #E5E7EB; border-radius: 1rem; padding: 16px; margin-top: 16px; }
.chart-switch { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.plain { padding-left: 18px; }
.pager { display: flex; gap: 12px; align-items: center; }
.chart-slot {
  position: relative;
  height: 200px;
  max-height: 200px;
  width: 100%;
  overflow: hidden;
}
.chart-slot canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-height: 200px;
}
.chart-panel { overflow: hidden; }
.chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.chart-head .chart-subtitle,
.chart-head .chart-head-title { margin: 0; flex: 1; }
.chart-eye {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  background: #fff;
  color: #374151;
  cursor: pointer;
  padding: 0;
}
.chart-eye:hover { background: #F9FAFB; }
.chart-eye[aria-pressed="true"] { color: #9CA3AF; }
.chart-panel.chart-values-hidden .chart-slot { filter: none; }
.sub-pills { margin-bottom: 16px; }
.daily-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.daily-head-left { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.daily-head-right { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.daily-date-form { display: flex; gap: 8px; align-items: center; }
.daily-date-form input { min-width: 150px; }
.sync-label { font-size: 13px; white-space: nowrap; }
.section-heading {
  font-family: Unbounded, sans-serif;
  font-size: 16px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 16px;
}
.section-heading.with-icon::before {
  content: "▮";
  color: #212528;
  margin-right: 8px;
}
.dash-section { margin-bottom: 32px; }
.stat-grid-9 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.stat-grid-6 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.period-head { margin-bottom: 24px; }
.period-range { margin: 0 0 12px; font-size: 15px; }
.period-date-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
}
.period-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.period-date-form label { font-size: 13px; font-weight: 600; color: #374151; }
.field-month {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field-month-label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}
.month-select {
  appearance: none;
  -webkit-appearance: none;
  min-width: min(220px, 100%);
  padding: 10px 40px 10px 16px;
  border: 1px solid #E5E7EB;
  border-radius: 999px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  cursor: pointer;
  line-height: 1.2;
}
.month-select:focus {
  outline: 2px solid #212528;
  outline-offset: 2px;
}
.compare-fields .month-select { min-width: 180px; }
.money-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.manager-table-wrap { background: #fff; border: 1px solid #E5E7EB; border-radius: 1rem; padding: 8px 0; }
.manager-table { width: 100%; border-collapse: collapse; }
.manager-table th {
  text-align: left;
  font-size: 12px;
  color: #6B7280;
  font-weight: 600;
  padding: 10px 16px;
  border-bottom: 1px solid #E5E7EB;
}
.manager-table td { padding: 12px 16px; border-bottom: 1px solid #F3F4F6; vertical-align: middle; }
.manager-table tr:last-child td { border-bottom: 0; }
.manager-table .table-avatar {
  width: 32px;
  height: 32px;
  font-size: 14px;
  display: inline-grid;
  margin-right: 8px;
  vertical-align: middle;
}
.manager-table .orphan-row td { color: #B91C1C; }
.stat-card {
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 1rem;
  padding: 16px;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.08);
  transition: transform 0.15s;
}
.stat-card:hover { transform: translateY(-2px); }
.stat-card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.stat-icon {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #E5E7EB;
  flex-shrink: 0;
}
.tone-blue .stat-icon { background: #DBEAFE; }
.tone-green .stat-icon { background: #DCFCE7; }
.tone-violet .stat-icon { background: #EDE9FE; }
.tone-orange .stat-icon { background: #FFEDD5; }
.tone-red .stat-icon { background: #FEE2E2; }
.tone-amber .stat-icon { background: #FEF3C7; }
.stat-label { color: #6B7280; font-size: 13px; font-weight: 600; }
.stat-value { font-size: 32px; font-weight: 800; line-height: 1.1; }
.stat-hint { color: #6B7280; font-size: 12px; margin-top: 6px; }
.money-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.money-card {
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 1rem;
  padding: 16px;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.08);
}
.manager-sum-list { list-style: none; padding: 0; margin: 12px 0 0; }
.manager-sum-list li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid #F3F4F6;
}
.link-download {
  display: inline-block;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.chart-panel {
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 1rem;
  padding: 16px;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.08);
}
.chart-subtitle { margin: 0 0 12px; font-size: 14px; font-weight: 700; color: #374151; }
.manager-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.manager-card {
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 1rem;
  padding: 16px;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.08);
}
.manager-card.orphan { border-color: #FECACA; }
.manager-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.manager-avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: #212528;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
}
.manager-card.orphan .manager-avatar { background: #DC2626; }
.sales-count { color: #16A34A; }
.icon-download {
  margin-left: auto;
  text-decoration: none;
  font-weight: 800;
  color: #212528;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid #E5E7EB;
}
.btn-wide { display: block; width: fit-content; margin: 0 auto; }
.btn-sm { padding: 8px 12px; font-size: 13px; }

@media (max-width: 900px) {
  .stat-grid-9, .stat-grid-6, .money-row, .manager-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .stat-grid-9, .stat-grid-6, .money-row, .manager-grid { grid-template-columns: 1fr; }
}

@media (min-width: 640px) {
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-figures { flex-direction: row; }
  .order-figures > div { flex: 1; }
}
@media (min-width: 1024px) {
  .sidebar { position: fixed; inset: 0 auto 0 0; }
  .content { margin-left: 256px; }
}
@media (min-width: 1280px) {
  .xl\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1023px) {
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 20;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    width: min(288px, 88vw);
    max-height: 100dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  body.nav-open .sidebar { transform: none; }
  body.nav-open { overflow: hidden; }
  .topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #212528;
    color: #fff;
    padding: 12px 16px;
    padding-top: max(12px, env(safe-area-inset-top));
    position: sticky;
    top: 0;
    z-index: 5;
  }
  .icon-btn {
    background: #2C3236;
    color: #fff;
    border: 0;
    border-radius: 12px;
    padding: 10px 14px;
    min-height: 44px;
    font-weight: 700;
  }
  .overlay {
    position: fixed;
    inset: 0;
    background: rgb(0 0 0 / 0.5);
    z-index: 10;
    display: none;
  }
  body.nav-open .overlay { display: block; }
  .content {
    padding: 16px 12px;
    padding-bottom: max(20px, env(safe-area-inset-bottom));
  }
  h1 { font-size: 1.125rem; line-height: 1.3; margin-bottom: 12px; }
  .section-heading { font-size: 14px; }
  .section-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
    margin-bottom: 16px;
  }
  .section-nav::-webkit-scrollbar { display: none; }
  .section-nav .pill { flex: 0 0 auto; white-space: nowrap; }
  .period-presets {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    max-width: 100%;
  }
  .period-presets::-webkit-scrollbar { display: none; }
  .period-presets .pill { flex: 0 0 auto; white-space: nowrap; }
  .period-range { font-size: 14px; line-height: 1.4; }
  .daily-head {
    flex-direction: column;
    align-items: stretch;
  }
  .daily-head-right {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .daily-date-form,
  .period-date-form {
    flex-direction: column;
    align-items: stretch;
  }
  .daily-date-form input,
  .period-date-form input,
  .filters input,
  .filters select {
    width: 100%;
    min-height: 44px;
    font-size: 16px;
  }
  .filters {
    flex-direction: column;
    align-items: stretch;
  }
  .filters .btn,
  .daily-date-form .btn,
  .period-date-form .btn {
    width: 100%;
    min-height: 44px;
  }
  .stat-value { font-size: 26px; }
  .stat-card { padding: 14px; }
  .chart-slot {
    height: 160px;
    max-height: 160px;
  }
  .chart-slot canvas { max-height: 160px; }
  .chart-switch {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }
  .chart-switch::-webkit-scrollbar { display: none; }
  .chart-switch .pill { flex: 0 0 auto; white-space: nowrap; font-size: 13px; }
  .btn, .pill { min-height: 40px; }
  .btn-wide { width: 100%; text-align: center; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar .btn { width: 100%; text-align: center; }
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .manager-table { min-width: 520px; }
  .manager-table-wrap { padding: 0; }
  .kanban { grid-template-columns: 1fr; }
  .order-figures { flex-direction: column; }
  .figure { font-size: 22px; word-break: break-word; }
  .figure-text { font-size: 16px; }
  .kpi-grid { flex-direction: column; }
  .kpi { min-width: 0; width: 100%; }
  .auth-card { padding: 20px; }
  .auth-card input { font-size: 16px; min-height: 44px; }
}

@media (max-width: 640px) {
  .manager-table--cards { min-width: 0; }
  .manager-table--cards thead { display: none; }
  .manager-table--cards,
  .manager-table--cards tbody,
  .manager-table--cards tr,
  .manager-table--cards td {
    display: block;
    width: 100%;
  }
  .manager-table--cards tr {
    padding: 12px 16px;
    border-bottom: 1px solid #E5E7EB;
  }
  .manager-table--cards tr:last-child { border-bottom: 0; }
  .manager-table--cards td {
    border: 0;
    padding: 4px 0;
    display: flex;
    justify-content: space-between;
    gap: 12px;
  }
  .manager-table--cards td:first-child {
    padding-bottom: 8px;
    justify-content: flex-start;
  }
  .manager-table--cards td::before {
    content: attr(data-label);
    color: #6B7280;
    font-size: 12px;
    font-weight: 600;
  }
  .manager-table--cards td:first-child::before { content: none; }
  .manager-table-wrap:has(.manager-table--cards) { overflow: visible; }
}

.compare-head { margin-bottom: 24px; }
.compare-title { text-transform: none; font-size: 18px; letter-spacing: 0; }
.compare-panel {
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 1rem;
  padding: 16px;
}
.compare-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
}
.compare-fields label { font-size: 13px; font-weight: 600; color: #374151; }
.compare-swap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  text-decoration: none;
  color: #374151;
  margin-bottom: 2px;
}
.compare-presets { margin-top: 12px; }
.compare-banner {
  margin-top: 12px;
  background: #FEF3C7;
  color: #92400E;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px;
}
.compare-sub { margin: -8px 0 16px; color: #6B7280; font-size: 13px; }
.compare-legend { display: flex; gap: 16px; margin-bottom: 12px; font-size: 13px; }
.compare-legend.centered { justify-content: center; }
.legend-a::before, .legend-b::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
}
.legend-a::before { background: #7C3AED; }
.legend-b::before { background: #CBD5E1; }
.compare-highlights {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.compare-highlight-card, .compare-rhythm-card, .compare-rank-card, .compare-total-card {
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 1rem;
  padding: 14px;
}
.compare-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.compare-pair.compact { margin-top: 12px; }
.compare-value-box {
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  padding: 10px;
}
.compare-value-box.a strong { color: #7C3AED; }
.compare-value-box.b strong { color: #374151; }
.compare-value-box .tiny, .tiny { font-size: 11px; color: #9CA3AF; display: block; margin-bottom: 4px; }
.compare-footer { margin-top: 10px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pct-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.delta-up { color: #059669; }
.delta-down { color: #DC2626; }
.delta-neutral { color: #6B7280; }
.delta-up.pct-badge, .pct-badge.delta-up { background: #D1FAE5; color: #047857; }
.delta-down.pct-badge, .pct-badge.delta-down { background: #FEE2E2; color: #B91C1C; }
.compare-table { width: 100%; border-collapse: collapse; }
.compare-table th, .compare-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid #F3F4F6; }
.compare-table th { font-size: 12px; color: #6B7280; font-weight: 600; }
.compare-table .col-a { background: #F5F3FF; color: #6D28D9; }
.compare-table .muted-cell { color: #6B7280; }
.compare-row-highlight { background: #FAFAFA; }
.compare-totals-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.compare-total-title {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6B7280;
  margin: 0 0 8px;
}
.compare-baskets-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 16px;
  align-items: start;
}
.compare-rhythm-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.compare-ranks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.rank-num { font-size: 28px; line-height: 1.1; }
.rank-foot { margin-top: 10px; padding-top: 10px; border-top: 1px solid #F3F4F6; }
.chart-slot-tall { height: 260px; max-height: 260px; }
.chart-slot-tall canvas { max-height: 260px; }
@media (max-width: 960px) {
  .compare-highlights, .compare-totals-grid, .compare-baskets-grid, .compare-rhythm-cards, .compare-ranks {
    grid-template-columns: 1fr;
  }
}
