:root {
  --ink: #111318;
  --muted: #7d838a;
  --teal: #0f8f9d;
  --teal-dark: #087a85;
  --teal-tint: #ecf7f6;
  --paper: #faf7f2;
  --line: #ecece9;
  --orange: #a46a28;
  --orange-tint: #fbf3e7;
  --red: #b44c43;
  --white: #fff;
  --sidebar: 224px;
  font-family:
    -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button {
  color: inherit;
}
button:disabled {
  cursor: default;
  opacity: 0.4;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #7dd2d9;
  outline-offset: 3px;
}
button {
  border: 0;
  background: none;
}
h1,
h2,
h3,
p {
  margin: 0;
}
button svg {
  width: 18px;
  height: 18px;
  display: block;
}
svg {
  overflow: visible;
}
svg text {
  font-family: inherit;
}
small {
  font-size: 12px;
  color: var(--muted);
}
[hidden] {
  display: none !important;
}
.skip {
  position: fixed;
  top: -60px;
  left: 20px;
  background: white;
  padding: 12px;
  z-index: 99;
}
.skip:focus {
  top: 10px;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 31px 19px 23px;
  z-index: 20;
  display: flex;
  flex-direction: column;
}
.pilot {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -0.7px;
  padding: 0 9px;
}
.pilot-icon {
  height: 30px;
  width: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: #fff;
  border-radius: 9px;
  font-size: 18px;
  letter-spacing: -4px;
  padding-right: 4px;
}
.pilot-icon span {
  color: #90cfd1;
}
.version {
  font-size: 23px;
  font-weight: 300;
  color: #c5c8c9;
  margin-left: auto;
}
.workspace {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 36px 0 30px;
}
.rose-mark {
  display: grid;
  place-items: center;
  background: #f5eee5;
  color: #655447;
  border-radius: 9px;
  width: 34px;
  height: 34px;
  font:
    24px Georgia,
    serif;
}
.workspace strong,
.owner strong {
  display: block;
  font-size: 12px;
  font-weight: 650;
}
.workspace small,
.owner small {
  display: block;
  font-size: 10px;
  margin-top: 5px;
}
.workspace-arrow {
  color: #888;
  margin-left: auto;
}
.nav-caption {
  font-size: 9px;
  letter-spacing: 1.25px;
  color: #999da1;
  padding: 0 12px;
  margin-bottom: 13px;
}
nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.nav-item {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 43px;
  border-radius: 9px;
  padding: 0 13px;
  font-weight: 500;
  font-size: 12px;
  color: #73797f;
  text-align: left;
}
.nav-item svg {
  width: 17px;
  height: 17px;
}
.nav-item:hover {
  background: #f7f8f7;
}
.nav-item.active {
  background: var(--teal-tint);
  color: var(--teal-dark);
}
.side-bottom {
  margin-top: auto;
  padding: 0 11px;
}
.local-indicator {
  font-size: 10px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #6c747a;
}
.local-indicator span,
.snapshot-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #a8b4b4;
}
.side-bottom > p {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.6px;
  line-height: 1.3;
  margin: 16px 0 26px;
  color: #9a9ea0;
}
.owner {
  border-top: 1px solid var(--line);
  padding-top: 21px;
  display: flex;
  gap: 11px;
  align-items: center;
}
.avatar {
  height: 33px;
  width: 33px;
  border-radius: 50%;
  background: #eee9e2;
  display: inline-grid;
  place-items: center;
  font-size: 12px;
  color: #807162;
}
.shell {
  margin-left: var(--sidebar);
}
.topbar {
  height: 77px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 44px;
  border-bottom: 1px solid #e9e6e1;
  background: rgba(250, 247, 242, 0.95);
}
.breadcrumb {
  font-size: 12px;
  color: #969797;
  display: flex;
  gap: 13px;
  align-items: center;
}
.breadcrumb span {
  color: #c2c1bd;
}
.breadcrumb b {
  font-weight: 500;
  color: #50575d;
}
.top-actions {
  display: flex;
  gap: 18px;
  align-items: center;
}
.preview-tag {
  font-size: 10px;
  padding: 5px 9px;
  border: 1px solid #deddd8;
  border-radius: 6px;
  color: #83837e;
}
.icon-button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #858c90;
}
.icon-button:hover {
  background: #f0efeb;
}
.small-avatar {
  width: 28px;
  height: 28px;
  font-size: 10px;
}
main {
  max-width: 1540px;
  margin: auto;
  padding: 38px 44px 24px;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 1.7px;
  font-weight: 600;
  color: #8d918f;
  margin-bottom: 10px;
}
h1 {
  font-size: 36px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -1.5px;
}
h1 > span {
  color: var(--teal);
}
.page-subtitle {
  font-size: 12px;
  color: var(--muted);
  margin-top: 11px;
  line-height: 1.6;
}
.button {
  border: 1px solid #dfdfda;
  background: white;
  border-radius: 9px;
  padding: 10px 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 550;
  white-space: nowrap;
}
.button:hover {
  border-color: #acb4b1;
}
.button svg {
  width: 14px;
  height: 14px;
}
.primary {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}
.export-button {
  margin-top: 15px;
}
.controls {
  margin-bottom: 18px;
}
.period-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.segmented {
  display: inline-flex;
  background: #eae9e4;
  border: 3px solid #eae9e4;
  border-radius: 10px;
  gap: 1px;
}
.segmented button {
  padding: 7px 17px;
  border-radius: 7px;
  color: #717678;
  font-size: 11px;
  white-space: nowrap;
}
.segmented button.selected {
  color: #222a2d;
  background: white;
  box-shadow: 0 1px 3px #17242b0c;
  font-weight: 550;
}
.date-button {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 13px;
  border: 1px solid #e0e0db;
  border-radius: 9px;
  background: white;
  font-size: 11px;
}
.date-button svg {
  width: 14px;
  height: 14px;
  color: #90999e;
}
.date-button > span:last-child {
  color: #91989c;
  margin-left: 6px;
}
.date-form {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
  padding: 16px 0;
}
.date-form label {
  font-size: 11px;
  display: grid;
  gap: 5px;
  color: #69767c;
}
input,
select {
  border: 1px solid #dfe4e3;
  border-radius: 7px;
  padding: 8px;
  background: #fff;
  color: var(--ink);
}
.date-form p {
  font-size: 12px;
  color: var(--red);
  width: 100%;
}
.city-row {
  display: flex;
  gap: 7px;
  margin-top: 17px;
  flex-wrap: wrap;
}
.city-row button {
  padding: 7px 13px;
  border-radius: 20px;
  font-size: 11px;
  color: #727a7f;
  border: 1px solid transparent;
}
.city-row button:hover {
  background: #f0efea;
}
.city-row button.selected {
  background: #172c31;
  color: white;
}
.city-row .city-count {
  font-size: 9px;
  margin-left: 5px;
  opacity: 0.6;
}
.snapshot-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 21px 0 15px;
  color: #8b9194;
  font-size: 10px;
  line-height: 1.6;
}
.snapshot-line > span {
  display: flex;
  align-items: center;
  gap: 7px;
}
.snapshot-line button {
  font-size: 10px;
  color: #737e81;
  white-space: nowrap;
}
.snapshot-line button span {
  margin-left: 3px;
}
.snapshot-dot {
  background: #75a59d;
  flex-shrink: 0;
}
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}
.kpi {
  border: 1px solid #eeede8;
  border-radius: 14px;
  padding: 21px 22px 17px;
  background: white;
  position: relative;
  text-align: left;
  min-height: 138px;
  transition:
    transform 0.2s,
    border-color 0.2s;
}
.kpi:hover {
  border-color: #b6ceca;
  transform: translateY(-2px);
}
.kpi-label {
  font-size: 11px;
  color: #717b81;
  display: flex;
  gap: 6px;
  align-items: center;
}
.kpi-label .info {
  margin-left: auto;
  color: #bdc5c8;
  font-size: 11px;
}
.kpi-value {
  font-size: 31px;
  letter-spacing: -1.3px;
  font-weight: 550;
  margin: 12px 0 10px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.kpi-value .unit {
  font-size: 0.63em;
  color: #8b9395;
  letter-spacing: -0.5px;
  margin-left: 4px;
  font-weight: 400;
}
.kpi-foot {
  font-size: 10px;
  line-height: 1.4;
  color: #91989b;
  display: flex;
  align-items: center;
  gap: 6px;
}
.kpi-foot strong {
  color: #538c84;
  font-weight: 500;
}
.kpi.highlight {
  background: #eef7f5;
  border-color: #dcece7;
}
.kpi.highlight .kpi-value {
  color: #14605c;
}
.kpi.highlight .unit {
  color: #4a817b;
}
.partial {
  color: var(--orange);
}
.dot {
  width: 5px;
  height: 5px;
  display: inline-block;
  border-radius: 50%;
  background: currentColor;
}
.section {
  margin-top: 26px;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
h2 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.35px;
}
h3 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.1px;
}
.section-title p {
  font-size: 10px;
  color: #909699;
  margin-top: 5px;
  line-height: 1.5;
}
.text-button {
  font-size: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #718184;
  white-space: nowrap;
}
.text-button:hover {
  color: var(--teal);
}
.panel {
  background: #fff;
  border: 1px solid #eeede8;
  border-radius: 14px;
  overflow: hidden;
}
.city-table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
  table-layout: auto;
}
.city-table th {
  font-size: 9px;
  color: #959b9e;
  font-weight: 450;
  line-height: 1.4;
  padding: 13px 13px;
  border-bottom: 1px solid var(--line);
  background: #fdfdfc;
}
.city-table th:first-child {
  text-align: left;
  padding-left: 21px;
}
.city-table td {
  padding: 17px 13px;
  font-size: 12px;
  border-bottom: 1px solid #f0f1ee;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.city-table tbody tr:last-child td {
  border-bottom: 0;
}
.city-table td:first-child {
  padding-left: 21px;
  text-align: left;
}
.city-table tr.city-data:hover {
  background: #fbfcfa;
}
.city-table tr.city-data {
  cursor: pointer;
}
.city-name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 550;
  text-align: left;
  padding: 0;
}
.city-initial {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  background: #f5f4ef;
  border: 1px solid #eeece5;
  border-radius: 9px;
  font-size: 11px;
  color: #778283;
  font-weight: 500;
}
.city-name small {
  font-size: 9px;
  margin-top: 4px;
  display: block;
  font-weight: 400;
}
.badge {
  font-size: 9px;
  padding: 4px 7px;
  border-radius: 5px;
  font-weight: 500;
  display: inline-block;
  line-height: 1.3;
}
.badge.teal {
  color: #428878;
  background: #edf7f2;
}
.badge.amber {
  color: #a17a41;
  background: #fbf4e8;
}
.badge.grey {
  color: #899198;
  background: #f1f3f3;
}
.city-table .total-row {
  background: #f9faf7;
  font-weight: 650;
}
.city-table .total-row td {
  border-top: 1px solid var(--line);
  font-size: 11px;
  padding-top: 13px;
  padding-bottom: 13px;
}
.city-table .arrow-cell {
  width: 26px;
  color: #b8c0c2;
  padding-left: 0;
}
.tiny-note {
  font-size: 10px;
  color: #90999c;
  line-height: 1.7;
  margin-top: 9px;
}
.tiny-note button {
  font-size: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  color: #697b7f;
}
.analytics-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(260px, 1fr);
  gap: 16px;
  margin-top: 25px;
  align-items: start;
}
.chart-panel {
  padding: 21px 22px;
}
.chart-heading {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}
.chart-heading p {
  font-size: 10px;
  color: #939a9d;
  margin-top: 6px;
}
.chart-select {
  background: #f7f8f5;
  border: 0;
  color: #65777d;
  font-size: 10px;
  max-width: 140px;
  padding: 7px;
}
.chart-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  color: #7c898f;
  margin: 19px 0 7px;
}
.legend-dot {
  width: 6px;
  height: 6px;
  display: inline-block;
  border-radius: 2px;
  background: var(--teal);
}
.legend-dot.grey {
  background: #d1d8d6;
}
.chart-svg {
  width: 100%;
  display: block;
  height: auto;
  aspect-ratio: auto;
}
.chart-svg text {
  fill: #a4adaf;
  font-size: 9px;
}
.chart-svg .grid-line {
  stroke: #f0f2f0;
  stroke-width: 1;
}
.chart-bar {
  fill: #91c8c4;
  transition: fill 0.2s;
}
.chart-bar:hover,
.chart-bar.selected {
  fill: #178a8d;
}
.chart-bar.selected {
  stroke: #057880;
  stroke-width: 1;
}
.chart-bar.secondary {
  fill: #dee3df;
}
.chart-bar.secondary:hover {
  fill: #b5c2bd;
}
.chart-svg .chart-hit {
  fill: transparent;
  cursor: pointer;
}
.chart-days {
  display: flex;
  gap: 2px;
  margin: 7px 0 0 37px;
  justify-content: space-between;
}
.chart-days button {
  font-size: 9px;
  color: #869296;
  padding: 5px 2px;
  min-width: 0;
  flex: 1;
  border-radius: 4px;
  white-space: nowrap;
}
.chart-days button:hover,
.chart-days button.selected {
  background: var(--teal-tint);
  color: var(--teal-dark);
}
.chart-foot {
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 12px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 9px;
  color: #96a0a4;
}
.insight-panel {
  padding: 21px;
}
.insight-heading {
  display: flex;
  gap: 7px;
  align-items: center;
  margin-bottom: 4px;
}
.insight-heading svg {
  width: 16px;
  height: 16px;
  color: #9aa4a4;
}
.insight-panel > .section-title {
  margin-bottom: 0;
}
.insight {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.insight:last-child {
  padding-bottom: 0;
  border: 0;
}
.insight-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 8px;
}
.insight p {
  font-size: 11px;
  color: #838d92;
  line-height: 1.65;
}
.insight strong {
  font-weight: 550;
  color: #3e5259;
}
.insight button {
  font-size: 10px;
  color: var(--teal);
  padding: 10px 0 0;
}
.empty-state {
  padding: 40px 22px;
  text-align: center;
  color: #8b969a;
  line-height: 1.8;
  font-size: 13px;
}
.empty-state strong {
  display: block;
  font-size: 16px;
  color: #596d72;
  margin-bottom: 5px;
}
.status-note {
  margin-bottom: 15px;
  border: 1px solid #e8e0cc;
  border-radius: 10px;
  padding: 11px 14px;
  background: #fbf6e9;
  font-size: 11px;
  color: #98824f;
  line-height: 1.6;
}
.economy {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 25px;
  padding: 21px 23px;
  margin-top: 25px;
  align-items: center;
}
.economy h3 {
  margin-bottom: 8px;
}
.economy p {
  font-size: 10px;
  color: #8e999d;
  line-height: 1.7;
}
.economy-stat label {
  display: block;
  font-size: 10px;
  color: #839197;
}
.economy-stat strong {
  display: block;
  margin-top: 8px;
  font-size: 23px;
  letter-spacing: -0.7px;
  font-weight: 500;
}
.economy-stat small {
  font-size: 9px;
  display: block;
  margin-top: 5px;
}
.timeline {
  padding: 20px 23px;
  margin-top: 20px;
}
.timeline h3 {
  margin-bottom: 15px;
}
.event {
  display: flex;
  align-items: baseline;
  gap: 15px;
  padding: 9px 0;
  font-size: 11px;
}
.event time {
  color: #9aa2a5;
  font-size: 10px;
  min-width: 94px;
}
.event span {
  color: #77878d;
  line-height: 1.6;
}
.event strong {
  color: #4f6065;
  font-weight: 500;
}
.table-wrap {
  overflow: auto;
}
.orders-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
.orders-table th {
  text-align: left;
  font-weight: 450;
  font-size: 10px;
  color: #919b9e;
  background: #fafbf9;
  padding: 12px 16px;
  white-space: nowrap;
}
.orders-table td {
  padding: 13px 16px;
  border-top: 1px solid #f0f2ee;
  white-space: nowrap;
}
.orders-table a {
  color: var(--teal);
  font-weight: 500;
}
.orders-table td small {
  display: block;
  font-size: 9px;
  margin-top: 4px;
}
.view-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
}
.view-toolbar select,
.view-toolbar input {
  font-size: 11px;
  max-width: 200px;
}
.view-toolbar p {
  font-size: 11px;
  color: #8c979b;
}
.campaign-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.campaign {
  padding: 20px;
}
.campaign-top {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 13px;
}
.campaign h3 {
  line-height: 1.6;
}
.campaign-city {
  font-size: 10px;
  color: #909a9e;
  margin-top: 4px;
}
.campaign dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin: 18px 0 0;
}
.campaign dt {
  font-size: 9px;
  color: #919da2;
  margin-bottom: 6px;
}
.campaign dd {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}
.campaign-footer {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 13px;
  font-size: 9px;
  color: #a0a8ab;
  display: flex;
  justify-content: space-between;
  gap: 15px;
}
.campaign-footer a {
  color: var(--teal);
}
.quality-panel {
  padding: 23px;
  margin-top: 16px;
}
.quality-panel h3 {
  margin-bottom: 12px;
}
.quality-panel p,
.prose p {
  font-size: 12px;
  line-height: 1.85;
  color: #74838a;
  margin-bottom: 13px;
}
.quality-row {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}
.quality-row:last-child {
  border: 0;
}
.quality-row small {
  font-size: 10px;
  margin-top: 4px;
  display: block;
}
.loading {
  padding: 100px 30px;
  text-align: center;
  color: #939c9b;
  font-size: 13px;
}
.loading span {
  display: block;
  width: 22px;
  height: 22px;
  border: 2px solid #dbe9e5;
  border-top-color: var(--teal);
  border-radius: 50%;
  margin: 0 auto 20px;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.error-panel {
  padding: 18px;
  border: 1px solid #edcec7;
  color: #a65340;
  background: #fff6f1;
  border-radius: 12px;
  margin: 20px 0;
  font-size: 12px;
  line-height: 1.8;
}
footer {
  border-top: 1px solid #e9e7df;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 34px;
  padding-top: 19px;
  font-size: 9px;
  color: #a2a5a2;
}
.footer-right {
  margin-left: auto;
}
dialog {
  border: 1px solid #e6e8e4;
  border-radius: 20px;
  padding: 25px;
  max-width: 900px;
  width: calc(100% - 36px);
  max-height: 85vh;
  color: var(--ink);
  box-shadow: 0 24px 100px #193e4324;
}
dialog::backdrop {
  background: #182c354a;
  backdrop-filter: blur(4px);
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 14px;
  margin-bottom: 22px;
}
.dialog-head h2 {
  font-size: 22px;
  letter-spacing: -0.5px;
}
.dialog-head .eyebrow {
  font-size: 8px;
}
.dialog-head button {
  flex-shrink: 0;
}
.prose h3 {
  margin: 18px 0 9px;
}
.dialog-summary {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin: 10px 0 20px;
}
.dialog-summary span {
  padding: 10px 15px;
  background: #f6f8f5;
  border-radius: 10px;
  font-size: 12px;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin: 17px 0;
  font-size: 11px;
  color: #86979b;
}
.pagination button {
  padding: 7px 11px;
  border-radius: 6px;
  background: #f1f5f2;
}
@media (min-width: 1500px) {
  .kpi-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .kpi {
    padding: 21px 16px;
  }
  .kpi-value {
    font-size: 27px;
  }
  .kpi-label {
    font-size: 10px;
  }
  .kpi-foot {
    font-size: 9px;
  }
}
@media (max-width: 1150px) {
  :root {
    --sidebar: 194px;
  }
  .sidebar {
    padding-left: 12px;
    padding-right: 12px;
  }
  .topbar {
    padding: 0 27px;
  }
  main {
    padding: 30px 27px 22px;
  }
  .analytics-grid {
    grid-template-columns: minmax(0, 1.7fr) minmax(225px, 1fr);
  }
  .chart-panel {
    padding: 19px 16px;
  }
  .insight-panel {
    padding: 19px 16px;
  }
  .city-table th,
  .city-table td {
    padding-left: 10px;
    padding-right: 10px;
  }
  .city-name {
    font-size: 11px;
  }
  .city-initial {
    display: none;
  }
  .city-table td {
    font-size: 11px;
  }
  .kpi-value {
    font-size: 28px;
  }
  .kpi {
    padding: 19px;
  }
}
@media (max-width: 950px) {
  :root {
    --sidebar: 76px;
  }
  .sidebar {
    padding: 24px 12px 20px;
    align-items: center;
  }
  .pilot {
    font-size: 0;
    padding: 0;
    gap: 0;
  }
  .pilot-icon {
    font-size: 18px;
  }
  .pilot .version,
  .workspace,
  .nav-caption,
  .nav-item > span:last-child,
  .side-bottom > p,
  .owner > div,
  .local-indicator {
    display: none;
  }
  .sidebar nav {
    margin-top: 43px;
    width: 100%;
    gap: 12px;
  }
  .nav-item {
    padding: 0;
    justify-content: center;
    width: 48px;
    height: 46px;
  }
  .nav-item svg {
    width: 20px;
    height: 20px;
  }
  .side-bottom {
    padding: 0;
  }
  .owner {
    border: 0;
    padding: 0;
  }
  .analytics-grid {
    grid-template-columns: 1fr;
  }
  .insights-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
  }
  .insight {
    border-bottom: 0;
  }
  .insight:last-child {
    padding-bottom: 18px;
  }
  .kpi-grid {
    gap: 10px;
  }
  .city-table .city-initial {
    display: grid;
  }
  .economy {
    gap: 20px;
  }
}
@media (max-width: 700px) {
  :root {
    --sidebar: 0px;
  }
  .sidebar {
    inset: auto 0 0;
    width: 100%;
    height: 66px;
    border-right: 0;
    border-top: 1px solid #e7eae3;
    padding: 7px 14px 9px;
    background: #ffffffed;
    backdrop-filter: blur(15px);
  }
  .pilot,
  .side-bottom {
    display: none;
  }
  .sidebar nav {
    flex-direction: row;
    margin: 0;
    justify-content: space-between;
    gap: 4px;
  }
  .nav-item {
    flex: 1;
    height: 49px;
    min-height: 0;
    flex-direction: column;
    gap: 5px;
    border-radius: 10px;
  }
  .nav-item > span:last-child {
    display: block;
    font-size: 8px;
    white-space: nowrap;
  }
  .nav-item svg {
    width: 18px;
    height: 18px;
  }
  .topbar {
    height: 59px;
    padding: 0 20px;
  }
  .breadcrumb {
    font-size: 10px;
    gap: 9px;
  }
  .top-actions {
    gap: 9px;
  }
  .small-avatar {
    display: none;
  }
  .preview-tag {
    font-size: 8px;
    padding: 4px 6px;
  }
  .icon-button {
    width: 28px;
    height: 28px;
  }
  .top-actions .icon-button svg {
    width: 16px;
    height: 16px;
  }
  main {
    padding: 25px 18px 88px;
  }
  .page-heading {
    margin-bottom: 22px;
    align-items: flex-start;
    gap: 7px;
  }
  h1 {
    font-size: 29px;
    letter-spacing: -1.3px;
  }
  .eyebrow {
    font-size: 8px;
    letter-spacing: 1.3px;
    margin-bottom: 9px;
  }
  .page-subtitle {
    font-size: 10px;
    margin-top: 8px;
    max-width: 260px;
  }
  .export-button {
    font-size: 0;
    border: 1px solid #e1e1da;
    min-width: 31px;
    height: 31px;
    padding: 8px;
    margin-top: 22px;
    gap: 0;
    flex-shrink: 0;
  }
  .export-button svg {
    width: 14px;
    height: 14px;
  }
  .period-row {
    gap: 9px;
  }
  .segmented {
    flex: 1;
    justify-content: space-between;
    max-width: 430px;
  }
  .segmented button {
    padding: 7px 10px;
    font-size: 10px;
    flex: 1;
  }
  .date-button {
    padding: 8px 11px;
    font-size: 10px;
  }
  .city-row {
    gap: 4px;
    flex-wrap: wrap;
    overflow: auto;
    padding-bottom: 5px;
    margin-top: 13px;
    scrollbar-width: none;
  }
  .city-row button {
    font-size: 10px;
    padding: 7px 11px;
    white-space: nowrap;
  }
  .city-row .city-count {
    font-size: 8px;
    margin-left: 3px;
  }
  .snapshot-line {
    font-size: 9px;
    align-items: flex-start;
    margin-top: 13px;
  }
  .snapshot-line button {
    font-size: 9px;
  }
  .snapshot-line > span {
    align-items: flex-start;
  }
  .snapshot-dot {
    margin-top: 5px;
  }
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }
  .kpi {
    padding: 17px 15px 14px;
    border-radius: 12px;
    min-height: 126px;
  }
  .kpi-label {
    font-size: 10px;
    line-height: 1.4;
    min-height: 14px;
  }
  .kpi-value {
    font-size: 27px;
    letter-spacing: -1.1px;
    margin: 13px 0 8px;
  }
  .kpi-foot {
    font-size: 9px;
    line-height: 1.5;
  }
  .kpi-label .info {
    font-size: 10px;
  }
  .section {
    margin-top: 24px;
  }
  h2 {
    font-size: 15px;
  }
  .section-title {
    gap: 9px;
    margin-bottom: 12px;
  }
  .section-title p {
    font-size: 9px;
    line-height: 1.6;
  }
  .text-button {
    font-size: 9px;
  }
  .city-table,
  .city-table tbody {
    display: block;
    width: 100%;
  }
  .city-table thead,
  .city-table .arrow-cell {
    display: none;
  }
  .city-table tr.city-data {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px 8px;
    padding: 17px;
    border-bottom: 1px solid var(--line);
  }
  .city-table tr.city-data:last-child {
    border: 0;
  }
  .city-table td {
    border: 0 !important;
    padding: 0 !important;
    text-align: left;
    white-space: normal;
    font-size: 12px;
  }
  .city-table td:first-child {
    grid-column: 1/-1;
    margin-bottom: 3px;
  }
  .city-name {
    font-size: 13px;
    gap: 10px;
    width: 100%;
  }
  .city-table td[data-label]:before {
    content: attr(data-label);
    display: block;
    color: #9aa4a8;
    font-size: 8px;
    margin-bottom: 5px;
    font-weight: 400;
  }
  .city-name small {
    font-size: 9px;
  }
  .city-table .city-initial {
    width: 27px;
    height: 27px;
    font-size: 11px;
  }
  .city-table .total-row {
    display: none;
  }
  .tiny-note {
    font-size: 9px;
    line-height: 1.8;
  }
  .analytics-grid {
    gap: 16px;
    margin-top: 23px;
  }
  .chart-panel {
    padding: 18px 15px;
  }
  .chart-heading p {
    font-size: 9px;
    line-height: 1.6;
  }
  .chart-select {
    font-size: 9px;
    max-width: 112px;
    padding: 6px;
  }
  .chart-label {
    font-size: 9px;
    margin-top: 17px;
  }
  .chart-svg {
    aspect-ratio: auto;
  }
  .chart-days {
    margin-left: 20px;
    gap: 0;
  }
  .chart-days button {
    font-size: 8px;
    min-height: 27px;
  }
  .chart-foot {
    font-size: 8px;
    line-height: 1.6;
  }
  .insights-list {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .insight {
    border-bottom: 1px solid var(--line);
    padding: 15px 0;
  }
  .insight:last-child {
    padding-bottom: 0;
  }
  .insight p {
    font-size: 11px;
  }
  .economy {
    grid-template-columns: 1fr 1fr;
    padding: 19px;
    gap: 20px 15px;
  }
  .economy > div:first-child {
    grid-column: 1/-1;
  }
  .economy-stat strong {
    font-size: 23px;
  }
  .economy-stat label {
    font-size: 9px;
  }
  .economy-stat small {
    line-height: 1.6;
  }
  .timeline {
    padding: 18px;
  }
  .event {
    gap: 11px;
    align-items: start;
    flex-direction: column;
    padding: 10px 0;
  }
  .event time {
    font-size: 9px;
  }
  .event span {
    font-size: 11px;
  }
  .campaign-grid {
    grid-template-columns: 1fr;
  }
  .campaign {
    padding: 18px;
  }
  .campaign h3 {
    font-size: 12px;
  }
  .campaign dd {
    font-size: 11px;
  }
  .view-toolbar {
    flex-wrap: wrap;
  }
  .view-toolbar p {
    font-size: 10px;
  }
  .view-toolbar input,
  .view-toolbar select {
    max-width: 145px;
    font-size: 10px;
  }
  .quality-panel {
    padding: 19px;
  }
  .quality-row {
    font-size: 10px;
  }
  .quality-row .badge {
    font-size: 8px;
    max-width: 115px;
  }
  .quality-panel p {
    font-size: 11px;
  }
  dialog {
    padding: 21px 17px;
    width: calc(100% - 20px);
    max-height: 89vh;
    border-radius: 16px;
  }
  .dialog-head h2 {
    font-size: 19px;
  }
  .dialog-head {
    margin-bottom: 15px;
  }
  .dialog-summary {
    gap: 7px;
  }
  .dialog-summary span {
    font-size: 10px;
    padding: 9px;
  }
  .orders-table td,
  .orders-table th {
    padding-left: 11px;
    padding-right: 11px;
  }
  footer {
    font-size: 8px;
    flex-wrap: wrap;
    gap: 5px;
  }
  .footer-right {
    font-size: 8px;
  }
  .status-note {
    font-size: 10px;
  }
  .prose p {
    font-size: 11px;
  }
  .date-form {
    gap: 8px;
  }
  .date-form input {
    font-size: 12px;
    padding: 7px;
    max-width: 140px;
  }
  .date-form label {
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media (max-width: 700px) {
  .chart-svg text {
    font-size: 10px;
  }
  .chart-days {
    margin-left: 34px;
  }
  .kpi-foot {
    color: #78878d;
  }
  .city-table td[data-label]:before {
    color: #78868b;
  }
  .tiny-note {
    color: #77868c;
  }
}
/* Owner analysis: compact mobile overview, readable evidence and economics. */
:root {
  --muted: #58676c;
  --teal-dark: #086e77;
}
main {
  max-width: 1600px;
}
.page-heading {
  margin-bottom: 22px;
}
h1 {
  font-size: 36px;
}
.compare-control {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  margin: 12px 0;
}
.compare-control select {
  border: 0;
  background: transparent;
  color: var(--ink);
  min-height: 36px;
  max-width: 230px;
}
.snapshot-line {
  display: flex;
  gap: 12px;
}
.snapshot-line > span {
  margin-right: auto;
}
.snapshot-line button {
  min-height: 36px;
  white-space: nowrap;
}
.compact-kpis {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.compact-kpis .kpi {
  min-height: 135px;
  padding: 18px;
  text-align: left;
}
.kpi-label,
.kpi-foot {
  font-size: 12px;
}
.delta {
  display: inline-block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.city-section {
  margin-top: 20px;
}
.city-table .city-name {
  display: block;
  text-align: left;
  min-height: 40px;
}
.city-table .city-name small {
  display: block;
  font-weight: 400;
  font-size: 11px;
  margin-top: 4px;
}
.city-table td {
  font-variant-numeric: tabular-nums;
}
.city-table td small {
  display: block;
  font-size: 11px;
}
.table-note {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
}
.comparison-note {
  font-size: 12px;
  color: var(--muted);
  margin: 14px 0 20px;
  line-height: 1.5;
}
.attention {
  padding: 20px;
  margin-bottom: 20px;
}
.attention .insights-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.attention .insight {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.attention .insight.risk {
  background: #fff9f2;
  border-color: #efddc6;
}
.attention .insight p {
  font-size: 13px;
  line-height: 1.6;
}
.attention .insight button {
  min-height: 40px;
}
.negative {
  color: #a03c32 !important;
}
.result-preview {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.result-preview p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}
.result-number {
  font-size: 34px;
  font-weight: 650;
  letter-spacing: -1px;
  display: block;
  margin: 10px 0;
}
.result-preview dl > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0;
  font-size: 13px;
}
.result-preview dd {
  font-weight: 600;
  white-space: nowrap;
  margin: 0;
}
.economics-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 20px;
  margin: 20px 0;
}
.pnl,
.coverage,
.unit-panel,
.scenario,
.cash-panel,
.delivery-panel,
.funnel {
  padding: 24px;
  margin-bottom: 20px;
}
.pnl dl {
  margin: 16px 0;
}
.pnl dl > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.pnl dt {
  font-size: 14px;
  max-width: 65%;
}
.pnl dt small {
  display: block;
  margin-top: 5px;
  font-size: 12px;
}
.pnl dd {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
}
.pnl-result {
  background: var(--teal-tint);
  margin: 8px -12px;
  padding: 16px 12px !important;
  border-radius: 10px;
}
.coverage > p,
.scenario > p,
.cash-panel > p,
.delivery-panel > p,
.funnel > p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
}
.layer-bars {
  margin: 22px 0;
}
.layer-bars > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  margin-bottom: 16px;
  font-size: 12px;
}
.layer-bars small {
  grid-column: 1/-1;
}
.layer-bars progress {
  grid-column: 1/-1;
  width: 100%;
  height: 7px;
  border: 0;
  border-radius: 8px;
  appearance: none;
}
progress::-webkit-progress-bar {
  background: #eef0ef;
  border-radius: 8px;
}
progress::-webkit-progress-value {
  background: var(--teal);
  border-radius: 8px;
}
.funnel-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 22px 0;
}
.funnel-grid > div {
  border-left: 2px solid var(--line);
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.funnel-grid span {
  font-size: 12px;
  color: var(--muted);
}
.funnel-grid strong {
  font-size: 25px;
  letter-spacing: -0.5px;
}
.funnel-grid small {
  font-size: 12px;
  line-height: 1.4;
}
.driver-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin: 20px 0;
}
.driver-grid > div {
  background: var(--paper);
  padding: 15px;
  display: grid;
  gap: 7px;
  border-radius: 8px;
}
.driver-grid span {
  font-size: 12px;
}
#scenario-form {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 22px 0;
}
#scenario-form label {
  display: grid;
  gap: 9px;
  font-size: 12px;
  line-height: 1.5;
}
#scenario-form input {
  width: 100%;
  min-height: 44px;
  border: 1px solid #bac3c5;
  border-radius: 8px;
  padding: 9px 12px;
  background: white;
}
.scenario-result {
  padding: 16px;
  background: var(--teal-tint);
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 16px;
}
.scenario-result strong {
  font-size: 26px;
  display: block;
}
.chart-days button {
  min-height: 40px;
}
.campaign-grid {
  margin-top: 18px;
}
@media (min-width: 1100px) {
  .analytics-grid {
    grid-template-columns: 1.5fr 1fr;
  }
}
@media (max-width: 700px) {
  .sidebar nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    width: 100%;
  }
  .nav-item {
    padding: 8px 2px;
    min-width: 0;
    font-size: 10px;
    gap: 5px;
  }
  .topbar {
    height: 44px;
    padding: 0 14px;
  }
  main {
    padding: 18px 14px 85px;
  }
  .page-heading {
    margin: 0 0 14px;
    align-items: center;
    gap: 8px;
  }
  .page-heading .eyebrow,
  .page-subtitle {
    display: none;
  }
  h1 {
    font-size: 27px;
    letter-spacing: -1px;
  }
  .export-button {
    font-size: 0;
    padding: 10px;
    min-width: 40px;
  }
  .export-button svg {
    width: 18px;
  }
  .controls {
    margin-bottom: 8px;
  }
  .period-row {
    gap: 8px;
  }
  .segmented {
    width: 100%;
  }
  .segmented button {
    font-size: 12px;
    min-height: 38px;
  }
  .date-button {
    min-height: 38px;
    font-size: 12px;
  }
  .compare-control {
    margin: 2px 0;
    font-size: 11px;
  }
  .compare-control select {
    font-size: 11px;
    min-height: 32px;
  }
  .city-row {
    gap: 5px;
    padding-bottom: 0;
    margin-top: 8px;
  }
  .city-row button {
    font-size: 11px;
    min-height: 34px;
    padding: 7px 9px;
  }
  .snapshot-line {
    font-size: 10px;
    margin: 6px 0 12px;
    gap: 8px;
    line-height: 1.4;
  }
  #data-details {
    display: none;
  }
  .snapshot-line button {
    font-size: 11px;
  }
  .compact-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  .compact-kpis .kpi {
    padding: 10px 8px;
    min-height: 100px;
  }
  .compact-kpis .kpi-label {
    font-size: 10px;
    letter-spacing: 0;
    line-height: 1.4;
  }
  .compact-kpis .kpi-value {
    font-size: 21px;
    letter-spacing: -0.6px;
    margin: 9px 0;
  }
  .compact-kpis .unit {
    font-size: 12px;
    margin-left: 2px;
  }
  .compact-kpis .kpi-foot,
  .compact-kpis .delta {
    font-size: 10px;
    line-height: 1.4;
  }
  .compact-kpis .info {
    display: none;
  }
  .section-title h2 {
    font-size: 17px;
  }
  .section-title p {
    font-size: 11px;
    line-height: 1.5;
  }
  .city-section {
    margin-top: 17px;
  }
  .city-section .section-title {
    margin-bottom: 10px;
  }
  .city-table {
    display: table;
    width: 100%;
    table-layout: fixed;
  }
  .city-table thead {
    display: table-header-group;
  }
  .city-table tbody {
    display: table-row-group;
  }
  .city-table tr,
  .city-table .total-row {
    display: table-row;
  }
  .city-table th,
  .city-table td {
    display: table-cell;
    padding: 10px 6px;
    font-size: 11px;
    text-align: right;
    width: auto;
  }
  .city-table th {
    font-size: 10px;
    font-weight: 500;
    white-space: normal;
  }
  .city-table td:first-child,
  .city-table th:first-child {
    text-align: left;
    width: 26%;
    padding-left: 10px;
  }
  .city-table td:nth-child(2),
  .city-table th:nth-child(2) {
    width: 18%;
  }
  .city-table td:nth-child(3),
  .city-table th:nth-child(3),
  .city-table td:nth-child(5),
  .city-table th:nth-child(5),
  .city-table td:nth-child(7),
  .city-table th:nth-child(7) {
    display: none;
  }
  .city-table td::before {
    display: none !important;
  }
  .city-table .city-name {
    font-size: 11px;
    min-height: 30px;
    line-height: 1.4;
  }
  .city-table .city-name small {
    font-size: 9px;
    line-height: 1.3;
    margin-top: 3px;
  }
  .city-table td small {
    font-size: 9px;
  }
  .table-note {
    font-size: 10px;
    padding: 10px;
  }
  .comparison-note {
    font-size: 11px;
  }
  .attention {
    padding: 16px;
  }
  .attention .insights-list {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .attention .insight p {
    font-size: 12px;
  }
  .economics-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .pnl,
  .coverage,
  .unit-panel,
  .scenario,
  .cash-panel,
  .delivery-panel,
  .funnel,
  .result-preview {
    padding: 18px;
  }
  .pnl dt {
    font-size: 12px;
  }
  .pnl dd {
    font-size: 14px;
  }
  .pnl dt small {
    font-size: 11px;
  }
  .funnel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 10px;
  }
  .funnel-grid strong {
    font-size: 23px;
  }
  .driver-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  #scenario-form {
    grid-template-columns: 1fr;
  }
  .result-number {
    font-size: 30px;
  }
  .chart-days {
    overflow-x: auto;
    justify-content: flex-start;
    gap: 2px;
  }
  .chart-days button {
    min-width: 40px;
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
@media (max-width: 700px) {
  .city-table tr.city-data {
    display: table-row;
    grid-template-columns: none;
    padding: 0;
  }
  .city-table td {
    padding: 10px 5px !important;
    white-space: nowrap !important;
    border-bottom: 1px solid var(--line) !important;
  }
  .city-table td:first-child {
    padding-left: 10px !important;
    white-space: normal !important;
  }
  .city-table .city-name small {
    display: none;
  }
  .city-table .city-name {
    white-space: normal;
  }
  .city-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
  }
  .city-row button {
    flex: none;
  }
  .period-row {
    display: flex;
    flex-direction: row;
    align-items: center;
  }
  .period-row .segmented {
    flex: 1;
    min-width: 0;
  }
  .period-row .date-button {
    width: auto;
    padding: 6px;
  }
  .date-button svg,
  .date-button > span:last-child {
    display: none;
  }
  .compact-kpis .kpi-foot {
    overflow-wrap: normal;
  }
  .compact-kpis .delta {
    display: block;
  }
}
.balances {
  padding: 24px;
  margin-bottom: 20px;
}
.balance-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 20px 0;
}
.balance-grid > div {
  display: grid;
  gap: 9px;
}
.balance-grid strong {
  font-size: 24px;
}
.account-balance {
  font-size: 12px;
  white-space: nowrap;
}
.kpi-foot {
  white-space: normal;
  overflow-wrap: normal;
}
.kpi-value {
  white-space: nowrap;
}
.tiny-note,
.chart-foot,
.section-title p {
  color: var(--muted);
}
@media (max-width: 700px) {
  .balance-grid {
    grid-template-columns: 1fr 1fr;
  }
  .balances {
    padding: 18px;
  }
  .compact-kpis .kpi-value {
    font-size: 20px;
  }
  .compact-kpis .kpi-foot {
    font-size: 10px;
    display: block;
  }
  .compact-kpis .kpi {
    min-height: 96px;
  }
  .snapshot-line {
    margin-bottom: 6px;
  }
  .city-table .total-row td {
    font-size: 10px;
  }
  .quality-row {
    flex-wrap: wrap;
    gap: 8px;
  }
}
.overhead-panel {
  padding: 24px;
  margin: 20px 0;
}
.tariff-notes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 24px 0;
}
.tariff-notes p {
  font-size: 13px;
  line-height: 1.6;
}
.tariff-notes small {
  display: block;
  margin-top: 5px;
}
.cost-settings {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.cost-settings summary {
  cursor: pointer;
  font-weight: 600;
  min-height: 40px;
}
#service-form {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 20px 0;
}
#service-form label {
  font-size: 12px;
  display: grid;
  gap: 8px;
}
#service-form input {
  border: 1px solid #bac3c5;
  border-radius: 8px;
  padding: 10px;
  width: 100%;
  min-height: 44px;
}
@media (max-width: 700px) {
  .overhead-panel {
    padding: 18px;
  }
  .tariff-notes,
  #service-form {
    grid-template-columns: 1fr;
  }
  .city-section .section-title p {
    font-size: 11px;
  }
  .city-table tr.city-data {
    height: 46px;
  }
  .city-table td {
    padding-top: 7px !important;
    padding-bottom: 7px !important;
  }
  .city-row button {
    min-height: 38px;
  }
  .nav-item {
    min-height: 48px;
  }
  .text-button {
    font-size: 12px;
    min-height: 40px;
  }
}
.city-table-scroll {
  overflow-x: auto;
}
.mobile-metrics {
  display: none;
}
.city-table th {
  font-size: 11px;
}
.city-table td {
  font-size: 12px;
}
.city-table .city-name {
  font-size: 12px;
}
.city-table .city-name small {
  font-size: 11px;
}
@media (max-width: 700px) {
  .mobile-metrics {
    display: block;
    width: 100%;
    text-align: right;
    padding: 6px 12px;
    min-height: 32px;
    font-size: 11px;
  }
  .city-table td:nth-child(8),
  .city-table th:nth-child(8) {
    display: none;
  }
  .expanded-metrics .city-table {
    min-width: 790px;
    table-layout: auto;
  }
  .expanded-metrics .city-table th,
  .expanded-metrics .city-table td {
    display: table-cell !important;
    width: auto !important;
  }
  .expanded-metrics .city-table td:first-child,
  .expanded-metrics .city-table th:first-child {
    min-width: 85px;
  }
  .city-table .city-name {
    font-size: 11px;
  }
}
@media (min-width: 701px) {
  .topbar {
    height: 56px;
  }
  .page-heading .eyebrow {
    display: none;
  }
  main {
    padding-top: 24px;
  }
  .page-heading {
    margin-bottom: 16px;
  }
  h1 {
    font-size: 32px;
  }
  .page-subtitle {
    margin-top: 7px;
  }
  .controls {
    display: grid;
    grid-template-columns: 1fr auto;
    column-gap: 20px;
  }
  .period-row {
    grid-column: 1;
  }
  .compare-control {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
  }
  .city-row {
    grid-column: 1/-1;
    margin-top: 12px;
  }
  .date-form {
    grid-column: 1/-1;
  }
  .snapshot-line {
    margin: 6px 0 10px;
  }
  .compact-kpis .kpi {
    min-height: 112px;
    padding: 16px 18px;
  }
  .kpi-value {
    margin: 10px 0 8px;
  }
  .city-table td {
    padding-top: 9px;
    padding-bottom: 9px;
  }
  .city-table th {
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .city-section {
    margin-top: 18px;
  }
  .city-section .section-title {
    margin-bottom: 10px;
  }
}
@media (min-width: 701px) and (max-width: 1100px) {
  .controls {
    display: block;
  }
  .compare-control {
    margin: 5px 0;
  }
  .city-table-scroll {
    overflow: auto;
  }
  .city-table {
    min-width: 780px;
  }
}

/* Secondary numbers still need readable contrast on white and cream. */
.kpi-foot,.city-table th,.city-name small,.snapshot-line,.insight p,.page-subtitle,.chart-label,.chart-foot,.tiny-note,.badge.grey,.campaign-footer,.eyebrow{color:#58676c}
.badge.teal{color:#236a59}.badge.amber{color:#865617}
@media(max-width:700px){
 .page-heading .export-button{margin:0}
 .snapshot-line{min-height:28px}.snapshot-line button{min-height:28px}
 .compact-kpis .kpi{padding-top:9px;padding-bottom:9px}
 .compact-kpis .kpi-foot{font-size:9px;line-height:1.3}
 .city-section .section-title{position:relative;padding-right:70px}
 .mobile-metrics{width:70px;position:absolute;right:0;top:0;padding:0 4px;line-height:1.3;z-index:1}
 .city-section{position:relative}
 .city-table th{padding-top:7px!important;padding-bottom:7px!important;font-size:10px}
}
@media(max-width:700px){.mobile-metrics{white-space:normal;min-width:0;min-height:38px}}

.settings-actions{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:16px 0}.settings-actions span{font-size:12px;color:var(--muted)}

#content[aria-busy="true"] { opacity: .5; cursor: progress; }

/* Browser access and iPhone installation. Business responses stay online-only. */
[hidden] { display: none !important; }
html[data-rose-mode="telegram"] body:not(.rose-ready) > .sidebar,
html[data-rose-mode="telegram"] body:not(.rose-ready) > .shell,
body.needs-login > .sidebar, body.needs-login > .shell { display: none; }
.browser-login { min-height: 100dvh; display: grid; place-items: center; padding: max(24px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left)); }
.login-card { width: 100%; max-width: 420px; display: grid; gap: 20px; }
.login-card > img { border-radius: 16px; }
.login-card h1 { font-size: clamp(32px, 8vw, 44px); line-height: 1.12; letter-spacing: -1.8px; }
.login-card p, .login-card li, .access-content p { line-height: 1.6; }
.login-card ol { padding-left: 22px; margin: 0; display: grid; gap: 10px; color: var(--muted); }
#browser-login-form { display: grid; gap: 12px; }
#browser-login-form label { font-weight: 600; }
#browser-code { min-width: 0; width: 100%; border: 1px solid var(--line); border-radius: 12px; background: white; padding: 14px; font-size: 20px; letter-spacing: 2px; text-transform: uppercase; }
.access-primary { border-radius: 12px; padding: 14px 18px; background: var(--teal-dark); color: white; font-weight: 600; min-height: 48px; }
.access-link { color: var(--teal-dark); text-decoration: underline; text-underline-offset: 3px; font-size: 13px; padding: 8px 0; }
#browser-access { text-decoration: none; font-size: 12px; line-height: 1.3; max-width: 116px; }
.install-help { border-top: 1px solid var(--line); padding-top: 16px; }
.install-help summary { cursor: pointer; font-weight: 600; line-height: 1.5; }
.install-help p { padding-top: 12px; color: var(--muted); }
.access-content { display: grid; gap: 20px; }
#pair-device { display: grid; gap: 16px; }
#issued-browser-code { font-size: clamp(20px, 5vw, 30px); letter-spacing: 2px; font-weight: 600; text-align: center; user-select: all; overflow-wrap: anywhere; }
#login-message, #access-message { color: var(--teal-dark); }
@media (display-mode: standalone) {
  body { padding-top: env(safe-area-inset-top); }
  .shell { padding-bottom: env(safe-area-inset-bottom); }
}

/* Period comparison and touch-readable daily trends. */
.comparison-status {grid-column:1/-1;flex-basis:100%;display:grid;gap:5px;padding:12px 14px;border-radius:12px;background:#edf4f2;color:#344e50;font-size:13px;line-height:1.5;margin-top:12px}
.comparison-status:empty {display:none}
.comparison-status strong {font-size:15px;font-variant-numeric:tabular-nums}
.compact-kpis .kpi-foot .delta {display:block;margin-top:5px;white-space:normal;line-height:1.5;font-size:12px;overflow-wrap:anywhere}
.chart-heading {flex-wrap:wrap}
.chart-heading .chart-select {font-size:14px;max-width:100%;min-height:44px;padding:8px 10px;color:#344e50;border-radius:9px}
.chart-heading p,.chart-foot {font-size:12px;line-height:1.5}
.trend-unit {margin:16px 0 10px;font-size:13px;font-weight:600;color:#344e50}
.trend-legend {display:flex;flex-wrap:wrap;gap:8px 18px;font-size:12px;color:#344e50;line-height:1.5}
.trend-legend span {display:flex;align-items:center;gap:8px}
.trend-legend i {display:inline-block;width:22px;border-top:3px solid #137e83}
.trend-legend i.prior {border-color:#7955a5;border-top-style:dashed}
.trend-note {font-size:12px;line-height:1.5;color:#58676c;margin:9px 0}
.trend-svg {margin:12px 0 0;overflow:visible}
.trend-svg text {fill:#58676c;font-size:13px;font-variant-numeric:tabular-nums}
.trend-svg .grid-line {stroke:#dfe7e4}
.trend-line {fill:none;stroke:#137e83;stroke-width:2.5;stroke-linejoin:round}
.trend-line.prior {stroke:#7955a5;stroke-dasharray:6 4}
.trend-point {fill:#137e83;stroke:#137e83;stroke-width:2}
.trend-point.prior {fill:#7955a5;stroke:#7955a5}
.trend-point.incomplete {fill:#fff}
.trend-marker {stroke:#344e50;stroke-width:1;stroke-dasharray:2 3;pointer-events:none}
.trend-days {display:flex;gap:4px;overflow-x:auto;padding:5px 0 9px;max-width:100%}
.trend-days button {flex:0 0 auto;min-width:54px;min-height:44px;border:1px solid transparent;border-radius:9px;background:transparent;color:#344e50;font-size:13px}
.trend-days button[aria-pressed="true"] {background:#edf4f2;border-color:#137e83;font-weight:700}
.trend-days button:focus-visible {outline:2px solid #7955a5;outline-offset:-2px}
.trend-detail {padding:14px;background:#f4f7f5;border-radius:12px;margin-top:4px}
.trend-values {display:grid;grid-template-columns:1fr 1fr;gap:14px}
.trend-values span {font-size:12px;color:#58676c;display:block;line-height:1.5}
.trend-values strong {font-size:20px;display:block;margin-top:5px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.trend-difference {font-size:13px;line-height:1.6;margin:12px 0;color:#344e50}
.trend-detail .text-button {font-size:12px;min-height:44px;text-align:left}
@media (max-width:700px) {.chart-heading{gap:7px}.chart-heading>div{flex:1 1 100%}.chart-heading p,.chart-foot{font-size:12px}.trend-svg text{font-size:13px}}
/* Safari's native select can ignore min-height; an explicit appearance keeps the touch target. */
.chart-heading .chart-select,.compare-control select {appearance:none;-webkit-appearance:none;height:44px;min-height:44px;border:1px solid #cad7d2;padding-right:30px;background-image:linear-gradient(45deg,transparent 50%,#344e50 50%),linear-gradient(135deg,#344e50 50%,transparent 50%);background-position:calc(100% - 15px) 19px,calc(100% - 10px) 19px;background-size:5px 5px;background-repeat:no-repeat}
