:root {
  --bg: #eef2f1;
  --surface: #fbfaf4;
  --surface-strong: #ffffff;
  --ink: #17211f;
  --muted: #63726f;
  --line: rgba(29, 37, 34, 0.12);
  --gold: #c98d2c;
  --gold-dark: #825714;
  --green: #145e53;
  --green-soft: #dceee9;
  --red: #a84732;
  --blue: #2b6073;
  --midnight: #17211f;
  --shadow: 0 18px 55px rgba(18, 28, 26, 0.12);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% -10%, rgba(43, 96, 115, 0.18), transparent 34%),
    linear-gradient(120deg, rgba(255, 255, 255, 0.88), rgba(232, 240, 239, 0.72)),
    var(--bg);
  color: var(--ink);
}

body.payment-open {
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}

.sidebar {
  padding: 24px;
  border-right: 1px solid var(--line);
  background: rgba(255, 253, 247, 0.82);
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.brand strong,
.brand span {
  display: block;
}

.brand span,
.status-card small,
.muted {
  color: var(--muted);
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #1d2522;
  color: #f7c763;
  font-weight: 800;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-item {
  border: 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  color: var(--muted);
  background: transparent;
  border-radius: 8px;
}

.nav-item.active {
  background: #1d2522;
  color: #fff8df;
}

.nav-item svg,
.icon-button svg,
.primary-button svg,
.ghost-button svg {
  width: 18px;
  height: 18px;
}

.status-card {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.status-card strong,
.status-card small {
  display: block;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--gold-dark);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
}

.main {
  min-width: 0;
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 30px;
  letter-spacing: 0;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ghost-link {
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.66);
  text-decoration: none;
}

.ghost-link.light {
  color: #fff8df;
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.1);
}

.ghost-link svg {
  width: 18px;
  height: 18px;
}

.icon-button,
.primary-button,
.ghost-button {
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.icon-button {
  width: 42px;
  background: var(--surface-strong);
}

.primary-button {
  padding: 0 16px;
  border-color: #1d2522;
  background: #1d2522;
  color: #fff8df;
  font-weight: 720;
}

.ghost-button {
  width: 100%;
  background: transparent;
  color: var(--ink);
}

.wide-button {
  width: 100%;
}

button:disabled {
  cursor: progress;
  opacity: 0.72;
}

.spinning svg {
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.hero-panel {
  min-height: 280px;
  border-radius: 8px;
  overflow: hidden;
  padding: 28px;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  color: #fffdf7;
  background:
    linear-gradient(90deg, rgba(18, 21, 18, 0.84), rgba(18, 21, 18, 0.2)),
    url("/meili-feilai.jpg")
      center/cover;
  box-shadow: var(--shadow);
}

.hero-copy {
  max-width: 680px;
}

.hero-copy h2 {
  margin: 10px 0 8px;
  font-size: 42px;
  line-height: 1.05;
  letter-spacing: 0;
}

.hero-copy p {
  margin-bottom: 0;
  color: rgba(255, 253, 247, 0.86);
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.glass-button {
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid rgba(255, 253, 247, 0.42);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  color: #fffdf7;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.glass-button svg {
  width: 18px;
  height: 18px;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(220, 239, 231, 0.92);
  color: #124735;
  font-weight: 720;
  font-size: 13px;
}

.live-pill.locked {
  background: rgba(255, 238, 198, 0.94);
  color: #7b4e0d;
}

.score-gauge {
  flex: 0 0 auto;
  width: 142px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  align-content: center;
  border: 1px solid rgba(255, 253, 247, 0.5);
  background: rgba(29, 37, 34, 0.38);
  backdrop-filter: blur(12px);
}

.score-gauge span {
  font-size: 42px;
  font-weight: 820;
}

.score-gauge small {
  color: rgba(255, 253, 247, 0.76);
}

.score-gauge.locked {
  background: rgba(29, 37, 34, 0.58);
}

.score-gauge.locked span {
  font-size: 34px;
  color: #f7c763;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 18px 0;
  flex-wrap: wrap;
}

.segmented {
  display: inline-flex;
  padding: 4px;
  gap: 4px;
  border-radius: 8px;
  background: rgba(29, 37, 34, 0.08);
}

.segmented button {
  border: 0;
  border-radius: 6px;
  padding: 8px 12px;
  background: transparent;
  color: var(--muted);
}

.segmented button.active {
  color: var(--ink);
  background: var(--surface-strong);
  box-shadow: 0 4px 18px rgba(30, 25, 17, 0.08);
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.toggle input {
  display: none;
}

.toggle span {
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: rgba(29, 37, 34, 0.18);
  position: relative;
}

.toggle span::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: white;
  transition: transform 0.2s ease;
}

.toggle input:checked + span {
  background: var(--green);
}

.toggle input:checked + span::after {
  transform: translateX(16px);
}

.freshness {
  color: var(--muted);
  margin-left: auto;
}

.decision-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 18px;
}

.decision-strip article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 30px rgba(18, 28, 26, 0.07);
}

.decision-strip span,
.itinerary-card span,
.partner-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.decision-strip strong {
  display: block;
  margin-top: 6px;
  font-size: 16px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.8fr);
  gap: 16px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.9);
  box-shadow: 0 8px 34px rgba(38, 31, 20, 0.08);
  padding: 18px;
  min-width: 0;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.panel-head h3 {
  margin: 0;
  font-size: 18px;
}

.panel-badge,
.source-status,
#billingState {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 720;
  background: #f5e6bf;
  color: #7b4e0d;
}

.panel-badge.ok,
.state-ok {
  background: var(--green-soft);
  color: var(--green);
}

.state-lock {
  background: #f5e6bf;
  color: #7b4e0d;
}

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

.day-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 249, 244, 0.86)),
    var(--surface-strong);
  position: relative;
  overflow: hidden;
}

.day-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--green), var(--blue));
  opacity: 0.72;
}

.day-card.locked-day {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 241, 231, 0.9)),
    var(--surface-strong);
}

.day-top,
.window-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.day-top strong,
.day-top span {
  display: block;
}

.day-top span,
.window-row,
.analysis-text,
.source-item span {
  color: var(--muted);
}

.mini-score {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 50%;
  color: #fffdf7;
  background: var(--green);
  font-weight: 820;
  line-height: 1;
}

.mini-score strong {
  font-size: 18px;
}

.mini-score small {
  margin-top: 3px;
  font-size: 10px;
  font-weight: 650;
  color: rgba(255, 253, 247, 0.78);
}

.mini-score.locked-score {
  background: #1d2522;
  color: #f7c763;
}

.day-signal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 14px 0;
}

.tier-badge {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 760;
  background: rgba(29, 37, 34, 0.08);
  color: var(--muted);
}

.tier-badge.prime {
  background: rgba(201, 141, 44, 0.18);
  color: #7b4e0d;
}

.tier-badge.good {
  background: var(--green-soft);
  color: var(--green);
}

.tier-badge.watch {
  background: #f5e6bf;
  color: #7b4e0d;
}

.tier-badge.low {
  background: #f5d8d1;
  color: var(--red);
}

.signal-bars {
  display: grid;
  grid-template-columns: repeat(4, 18px);
  gap: 5px;
}

.signal-bars span {
  height: 8px;
  border-radius: 999px;
  background: rgba(29, 37, 34, 0.11);
}

.signal-bars span.on {
  background: linear-gradient(90deg, var(--gold), var(--green));
}

.day-advice {
  min-height: 42px;
  margin: 0 0 12px;
  padding: 10px;
  border-radius: 8px;
  color: var(--ink);
  line-height: 1.45;
  background: rgba(43, 96, 115, 0.08);
}

.prob-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(29, 37, 34, 0.08);
  margin: 14px 0;
  overflow: hidden;
}

.prob-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), var(--green));
}

.window-row {
  justify-content: flex-start;
  font-size: 14px;
  margin-bottom: 12px;
}

.window-row svg {
  width: 15px;
  height: 15px;
}

.drivers {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.driver {
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 12px;
  background: rgba(29, 37, 34, 0.07);
}

.driver.good {
  background: var(--green-soft);
  color: var(--green);
}

.driver.watch {
  background: #f5e6bf;
  color: #7b4e0d;
}

.driver.bad {
  background: #f5d8d1;
  color: var(--red);
}

.lock-strip {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.lock-strip svg {
  width: 15px;
  height: 15px;
}

.data-panel {
  margin-top: 16px;
}

.hourly-table {
  display: grid;
  gap: 8px;
}

.hour-row {
  display: grid;
  grid-template-columns: 0.8fr repeat(6, minmax(90px, 1fr));
  gap: 10px;
  align-items: center;
  min-height: 42px;
  padding: 0 10px;
  border-radius: 8px;
  background: rgba(29, 37, 34, 0.04);
  overflow-x: auto;
}

.hour-row.header {
  color: var(--muted);
  font-size: 13px;
  background: transparent;
}

.bar-cell {
  position: relative;
  min-height: 24px;
  border-radius: 999px;
  background: rgba(29, 37, 34, 0.08);
  overflow: hidden;
}

.bar-cell i {
  position: absolute;
  inset: 0 auto 0 0;
  background: rgba(212, 154, 37, 0.45);
}

.bar-cell b {
  position: relative;
  z-index: 1;
  display: block;
  padding: 3px 8px;
  font-size: 12px;
}

.locked-table {
  min-height: 180px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed rgba(29, 37, 34, 0.24);
  border-radius: 8px;
}

.locked-table svg {
  width: 28px;
  height: 28px;
  color: var(--gold-dark);
}

.locked-cta {
  margin-top: 4px;
}

.analysis-text p {
  margin: 0 0 12px;
  line-height: 1.68;
}

.source-list {
  display: grid;
  gap: 10px;
}

.source-item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.source-item strong,
.source-item span {
  display: block;
}

.source-status.active {
  background: var(--green-soft);
  color: var(--green);
}

.source-status.not_configured,
.source-status.unavailable {
  background: #edf1f0;
  color: var(--muted);
}

.weights {
  display: grid;
  gap: 12px;
}

.weight-row {
  display: grid;
  grid-template-columns: 110px 1fr 42px;
  gap: 10px;
  align-items: center;
}

.weight-track {
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(29, 37, 34, 0.08);
}

.weight-track span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--blue);
}

.billing-layout {
  display: grid;
  grid-template-columns: minmax(320px, 480px) minmax(0, 1fr);
  gap: 16px;
}

.pricing-card h3 {
  font-size: 28px;
  line-height: 1.14;
}

.price {
  margin: 20px 0;
  font-size: 46px;
  font-weight: 850;
}

.price span {
  font-size: 15px;
  color: var(--muted);
}

.feature-list {
  padding: 0;
  margin: 0 0 18px;
  list-style: none;
  display: grid;
  gap: 10px;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.feature-list svg {
  width: 17px;
  height: 17px;
  color: var(--green);
}

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

.itinerary-card,
.partner-card {
  min-height: 150px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.itinerary-card svg {
  width: 24px;
  height: 24px;
  color: var(--gold-dark);
  margin-bottom: 16px;
}

.itinerary-card strong {
  display: block;
  margin-top: 8px;
  line-height: 1.45;
}

.itinerary-card.good {
  border-color: rgba(20, 94, 83, 0.24);
  background: linear-gradient(180deg, rgba(220, 238, 233, 0.78), #fff);
}

.itinerary-card.watch {
  border-color: rgba(201, 141, 44, 0.28);
  background: linear-gradient(180deg, rgba(248, 232, 190, 0.7), #fff);
}

.reminder-list {
  display: grid;
  gap: 12px;
}

.reminder-list label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}

.partner-card {
  position: relative;
  overflow: hidden;
}

.partner-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gold), var(--green), var(--blue));
}

.partner-card strong {
  display: block;
  margin: 10px 0 8px;
  font-size: 18px;
}

.partner-card p {
  color: var(--muted);
  line-height: 1.58;
}

.partner-card small {
  color: var(--gold-dark);
  font-weight: 760;
}

.pricing-note {
  margin-top: 18px;
  padding: 14px;
  border-radius: 8px;
  background: rgba(20, 94, 83, 0.08);
  display: grid;
  gap: 6px;
}

.pricing-note span {
  color: var(--muted);
  line-height: 1.56;
}

.payment-box {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 142px 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.payment-box.hidden {
  display: none;
}

.qr-frame {
  width: 142px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.qr-frame img {
  width: 126px;
  height: 126px;
  object-fit: contain;
}

.payment-meta {
  display: grid;
  gap: 6px;
}

.payment-meta span,
.payment-meta small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.payment-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
}

.payment-overlay.hidden,
.payment-spinner.hidden,
.qr-frame img.hidden {
  display: none;
}

.payment-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  width: 100%;
  height: 100%;
  background: rgba(12, 18, 17, 0.62);
  backdrop-filter: blur(8px);
}

.payment-sheet {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.98);
  box-shadow: 0 26px 88px rgba(7, 12, 11, 0.34);
}

.payment-sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.payment-sheet-head h3 {
  margin-bottom: 0;
  font-size: 22px;
}

.payment-sheet .payment-box {
  margin-top: 16px;
  border-color: rgba(20, 94, 83, 0.22);
  background:
    linear-gradient(180deg, rgba(220, 238, 233, 0.48), rgba(255, 255, 255, 0.96)),
    #fff;
}

.payment-spinner {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid rgba(29, 37, 34, 0.12);
  border-top-color: var(--gold);
  animation: spin 0.8s linear infinite;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  max-width: 320px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #1d2522;
  color: #fff8df;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.success-page {
  display: grid;
  place-items: center;
  padding: 24px;
}

.success-card {
  width: min(460px, 100%);
  padding: 28px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}

.success-card .brand-mark {
  margin: 0 auto 16px;
}

.admin-body {
  background:
    radial-gradient(circle at 82% 0%, rgba(201, 141, 44, 0.2), transparent 30%),
    linear-gradient(180deg, #12211f 0, #203735 360px, #edf2f1 360px);
}

.admin-shell {
  width: min(1280px, calc(100% - 36px));
  margin: 0 auto;
  padding: 28px 0;
}

.admin-hero {
  min-height: 220px;
  padding: 28px;
  border-radius: 8px;
  color: #fffdf7;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  background:
    linear-gradient(120deg, rgba(18, 33, 31, 0.96), rgba(20, 94, 83, 0.64)),
    url("/meili-feilai.jpg") center/cover;
  box-shadow: var(--shadow);
}

.admin-hero h1 {
  font-size: 44px;
  margin-bottom: 10px;
}

.admin-hero p {
  max-width: 720px;
  color: rgba(255, 253, 247, 0.78);
  line-height: 1.65;
}

.admin-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.kpi-card {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 30px rgba(18, 28, 26, 0.1);
}

.kpi-card span,
.kpi-card small {
  display: block;
  color: var(--muted);
}

.kpi-card strong {
  display: block;
  margin: 10px 0 6px;
  font-size: 28px;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 16px;
  margin-bottom: 16px;
}

.admin-weather,
.order-list,
.business-plan,
.visit-table,
.split-bars {
  display: grid;
  gap: 10px;
}

.weather-row,
.order-row,
.visit-row {
  display: grid;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(23, 33, 31, 0.04);
}

.weather-row {
  grid-template-columns: 1fr 52px 72px 108px minmax(220px, 1.4fr);
}

.weather-row strong {
  color: var(--green);
  font-size: 20px;
}

.weather-row small,
.order-row span,
.visit-row span {
  color: var(--muted);
}

.bar-group {
  display: grid;
  gap: 8px;
}

.bar-group h4,
.strategy-columns h4 {
  margin: 0;
}

.traffic-row {
  display: grid;
  grid-template-columns: 72px 1fr 42px;
  gap: 10px;
  align-items: center;
}

.traffic-row div {
  height: 9px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(23, 33, 31, 0.08);
}

.traffic-row i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), var(--green));
}

.order-row {
  grid-template-columns: 1fr auto auto;
}

.order-row strong,
.order-row span {
  display: block;
}

.business-tone {
  padding: 12px;
  border-radius: 8px;
  color: #fffdf7;
  background: var(--midnight);
  font-weight: 760;
}

.strategy-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.strategy-columns p {
  margin: 10px 0 0;
  padding: 12px;
  border-radius: 8px;
  background: rgba(23, 33, 31, 0.04);
}

.strategy-columns p strong,
.strategy-columns p span {
  display: block;
}

.strategy-columns p span,
.next-actions span {
  color: var(--muted);
  line-height: 1.55;
}

.next-actions {
  display: grid;
  gap: 8px;
}

.next-actions span {
  padding-left: 12px;
  border-left: 3px solid var(--gold);
}

.visit-row {
  grid-template-columns: 120px 90px 120px 1fr;
}

.visit-row.header {
  color: var(--muted);
  background: transparent;
}

.empty-state {
  padding: 18px;
  border-radius: 8px;
  color: var(--muted);
  background: rgba(23, 33, 31, 0.04);
  text-align: center;
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
  }

  .brand {
    margin-bottom: 0;
  }

  .nav-list {
    display: flex;
  }

  .status-card {
    display: none;
  }

  .grid,
  .billing-layout,
  .admin-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  .main {
    padding: 18px;
  }

  .sidebar {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-list {
    width: 100%;
    overflow-x: auto;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
  }

  .primary-button {
    flex: 1;
  }

  .hero-panel {
    min-height: 360px;
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-copy h2 {
    font-size: 32px;
  }

  .score-gauge {
    width: 118px;
  }

  .day-grid {
    grid-template-columns: 1fr;
  }

  .decision-strip,
  .itinerary-grid,
  .partner-grid,
  .admin-kpis,
  .strategy-columns {
    grid-template-columns: 1fr;
  }

  .admin-hero {
    flex-direction: column;
  }

  .admin-hero h1 {
    font-size: 34px;
  }

  .weather-row,
  .visit-row {
    grid-template-columns: 1fr;
  }

  .hour-row {
    min-width: 760px;
  }

  .hourly-table {
    overflow-x: auto;
  }

  .payment-box {
    grid-template-columns: 1fr;
  }

  .payment-overlay {
    align-items: end;
    padding: 10px;
  }

  .payment-sheet {
    width: 100%;
    max-height: calc(100vh - 20px);
    padding: 16px;
  }

  .qr-frame {
    width: min(220px, 100%);
    margin: 0 auto;
  }

  .qr-frame img {
    width: min(196px, 86vw);
    height: min(196px, 86vw);
  }

  .freshness {
    width: 100%;
    margin-left: 0;
  }
}
