:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --panel: #ffffff;
  --text: #172033;
  --muted: #647086;
  --line: #e2e8f0;
  --brand: #146ef5;
  --green: #0f9f6e;
  --orange: #d97706;
  --red: #dc2626;
  --shadow: 0 12px 32px rgba(18, 32, 55, 0.08);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding-block: 28px 22px;
  padding-inline: max(36px, calc((100vw - 1320px) / 2 + 36px));
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 26px rgba(18, 32, 55, 0.06);
}

h1, h2, p { margin: 0; }
h1 { font-size: 28px; line-height: 1.25; letter-spacing: 0; }
h2 { font-size: 18px; letter-spacing: 0; }
.topbar-brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 16px;
}
.topbar-brand img {
  width: 300px;
  height: 72px;
  object-fit: contain;
  object-position: left center;
  flex: 0 0 auto;
}
.topbar-brand > div { min-width: 0; }
.topbar p { margin-top: 8px; color: var(--muted); font-size: 14px; }
.top-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  justify-content: flex-end;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
}
.top-nav a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.top-nav a.active,
.top-nav a:hover {
  color: var(--brand);
  background: #eaf2ff;
  border-color: rgba(20,110,245,.25);
  box-shadow: 0 4px 12px rgba(20,110,245,.10);
}

.date-picker {
  min-width: 210px;
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}
.date-picker select,
.calendar-trigger {
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  font-size: 15px;
  background: #fff;
  color: var(--text);
}
.calendar-picker { position: relative; }
.calendar-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font: inherit;
  font-size: 15px;
}
.calendar-trigger:focus-visible,
.calendar-nav:focus-visible,
.calendar-day:focus-visible {
  outline: 2px solid rgba(20,110,245,.35);
  outline-offset: 2px;
}
.calendar-chevron { color: var(--muted); font-size: 12px; }
.calendar-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 306px;
  z-index: 20;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 12px;
}
.calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.calendar-head strong { color: var(--text); font-size: 15px; }
.calendar-nav {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}
.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.calendar-weekdays {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.calendar-day {
  position: relative;
  height: 34px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
}
.calendar-day.has-data { font-weight: 700; }
.calendar-day.has-data::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 4px;
  height: 4px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--brand);
}
.calendar-day.selected {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.calendar-day.selected::after { background: #fff; }
.calendar-day:not(:disabled):hover { border-color: rgba(20,110,245,.35); background: #f8fbff; }
.calendar-day.selected:hover { background: var(--brand); }
.calendar-day:disabled {
  color: #c4ccd8;
  cursor: default;
}
.calendar-day.empty { visibility: hidden; }
.topbar-actions, .admin-actions {
  display: flex;
  align-items: end;
  gap: 12px;
}
.admin-actions form { margin: 0; }
.secondary-btn, .primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 6px;
  padding: 0 14px;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
}
.secondary-btn { border: 1px solid var(--line); color: var(--text); background: #fff; }
.primary-btn { border: 1px solid var(--brand); color: #fff; background: var(--brand); }
.auth-gate-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin: 0 0 18px; padding: 14px 16px; border: 1px solid #cfe0f7; border-radius: 8px;
  background: linear-gradient(135deg, #f4f9ff 0%, #eef5ff 100%); box-shadow: var(--shadow);
}
.auth-gate-banner div { display: grid; gap: 4px; min-width: 0; }
.auth-gate-banner strong { color: #183b64; font-size: 14px; }
.auth-gate-banner span { color: #52677f; font-size: 12px; line-height: 1.45; }
.auth-gate-banner .primary-btn { flex: 0 0 auto; text-decoration: none; white-space: nowrap; }

/* Homepage guest locked summary */
.home-main.is-guest {
  max-width: 1320px;
  margin: 0 auto;
}
.home-locked-panel {
  margin: 0 0 18px;
  padding: 18px;
  border: 1px solid #d7e5f7;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(247,251,255,.98)),
    radial-gradient(circle at top right, rgba(20,110,245,.08), transparent 42%);
  box-shadow: var(--shadow);
}
.home-locked-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.home-locked-head h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
}
.home-locked-head p {
  margin: 6px 0 0;
  max-width: 720px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.home-locked-head .primary-btn {
  flex: 0 0 auto;
  min-height: 40px;
  border-radius: 999px;
  padding: 0 18px;
  box-shadow: 0 8px 18px rgba(20,110,245,.18);
}
.home-locked-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.home-locked-card {
  min-height: 118px;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 14px 15px;
  border: 1px dashed #c9daf0;
  border-radius: 10px;
  background: rgba(255,255,255,.82);
}
.home-locked-card span {
  color: #5b7391;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
}
.home-locked-card strong {
  color: #183b64;
  font-size: 16px;
  line-height: 1.35;
}
.home-locked-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.home-main.is-guest .page-intro {
  padding: 16px 18px;
  margin-bottom: 14px;
}
.home-main.is-guest .live-strip {
  margin-bottom: 14px;
}
.home-main.is-guest .live-grid div {
  min-height: 96px;
  background: linear-gradient(180deg, #fff, #f7fbff);
}
.revenue-page.is-guest {
  max-width: 1320px;
  margin: 0 auto;
}
.revenue-page.is-guest .revenue-guest-intro {
  margin-bottom: 14px;
}
.revenue-page.is-guest .revenue-locked-panel {
  margin-bottom: 0;
}
.weekly-report-page.is-guest {
  max-width: 1320px;
  margin: 0 auto;
}
.weekly-report-page.is-guest .weekly-guest-intro {
  margin-bottom: 14px;
}
.weekly-report-page.is-guest .weekly-locked-panel {
  margin-bottom: 0;
}
@media (max-width: 1100px) {
  .home-locked-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .home-main.is-guest .live-strip.desktop-only {
    display: block !important;
  }
  .home-main.is-guest .page-intro.desktop-only {
    display: none !important;
  }
  .home-locked-head {
    align-items: stretch;
    flex-direction: column;
  }
  .home-locked-head .primary-btn {
    width: 100%;
    text-align: center;
  }
  .home-locked-grid {
    grid-template-columns: 1fr;
  }
  .home-locked-card {
    min-height: 0;
  }
}
.date-picker[hidden],
.analysis-period-tools[hidden],
.calendar-picker[hidden] { display: none !important; }
.sales-priority-note {
  display: grid; gap: 4px; margin: 0 0 14px; padding: 12px 14px;
  border: 1px solid #dbe7f5; border-radius: 8px; background: #f7fbff;
}
.sales-priority-note strong { color: #183b64; font-size: 13px; }
.sales-priority-note span { color: #52677f; font-size: 12px; line-height: 1.5; }
.missing-report-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 10px; padding: 10px 12px; border: 1px solid #f9c9c3; border-radius: 8px; background: #fff6f5;
}
.missing-report-banner > div:first-child { display: grid; gap: 3px; min-width: 0; }
.missing-report-banner strong { color: #b42318; font-size: 13px; }
.missing-report-banner span { color: #7a3418; font-size: 12px; }
.missing-report-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.missing-report-actions button,
.missing-report-actions .secondary-btn {
  min-height: 32px; padding: 0 12px; border-radius: 6px; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer;
}
.missing-report-actions button { border: 1px solid #f3b0a8; color: #b42318; background: #fff; }
.missing-report-panel {
  margin-top: 10px; border: 1px solid #f0d2ce; border-radius: 8px; background: #fff; overflow: hidden;
}
.missing-report-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; border-bottom: 1px solid #f3e2df; background: #fffaf9;
}
.missing-report-head strong { color: #7a2e22; font-size: 13px; }
.missing-report-head span { color: #8a5a4d; font-size: 12px; }
.missing-report-table { max-height: 280px; overflow: auto; }
.missing-report-tools {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 8px 12px; border-bottom: 1px solid #f3e2df; background: #fff;
}
.missing-report-tools label { display: inline-flex; align-items: center; gap: 6px; color: #7a2e22; font-size: 12px; font-weight: 700; }
.missing-report-tools button {
  min-height: 28px; padding: 0 10px; border: 1px solid #f3b0a8; border-radius: 6px;
  color: #b42318; background: #fff; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer;
}
.missing-report-tools span { color: #8a5a4d; font-size: 12px; }
.missing-report-row {
  display: grid; grid-template-columns: 18px minmax(140px, 1.35fr) minmax(120px, 1fr) minmax(80px, .7fr) 70px;
  gap: 10px; padding: 9px 12px; border-bottom: 1px solid #f5ecea; font-size: 12px; align-items: center;
}
.missing-report-row input { margin: 0; }
.missing-report-row strong {
  display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; color: #7a2e22;
}
.missing-report-row.streak-level-2 { background: #fff8f1; }
.missing-report-row.streak-level-3 { background: #fff1f0; }
.missing-streak-pill {
  display: inline-flex; align-items: center; min-height: 18px; padding: 0 6px;
  border-radius: 999px; font-style: normal; font-size: 11px; font-weight: 800; white-space: nowrap;
}
.missing-streak-pill.level-1 { color: #8a5a4d; background: #f8ece9; border: 1px solid #f0d2ce; }
.missing-streak-pill.level-2 { color: #b54708; background: #fffaeb; border: 1px solid #fedf89; }
.missing-streak-pill.level-3 { color: #b42318; background: #fef3f2; border: 1px solid #fecdca; }
.missing-week-card { border-color: rgba(180, 35, 24, .18); }
.missing-week-card strong { color: #b42318; }
.week-missing-actions {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px;
}
.week-missing-link {
  display: inline-block; color: #b42318; font-size: 12px; font-weight: 700;
  text-decoration: underline; text-underline-offset: 2px;
}
.week-missing-export-btn {
  min-height: 26px; padding: 0 8px; border: 1px solid #f3b0a8; border-radius: 6px;
  background: #fff; color: #b42318; font: inherit; font-size: 11px; font-weight: 700; cursor: pointer;
}
.fee-contract-panel-actions {
  display: inline-flex; align-items: center; gap: 10px;
}
.fee-export-contracts-btn,
.fee-copy-table-btn,
.fee-copy-names-btn {
  min-height: 30px; padding: 0 10px; font-size: 12px;
}
.fee-contract-name {
  display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.fee-copy-name-btn {
  min-height: 22px; padding: 0 6px; border: 1px solid #d7e3f4; border-radius: 999px;
  background: #fff; color: #183b64; font: inherit; font-size: 11px; font-weight: 700; cursor: pointer;
}
.fee-copy-name-btn:hover { border-color: #f3b0a8; color: #b42318; background: #fff6f5; }
.week-missing-heat {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-top: 8px;
}
.week-heat-cell {
  display: grid; gap: 1px; justify-items: center; min-height: 54px; padding: 4px 2px;
  border-radius: 8px; text-decoration: none; color: #7a2e22; background: #f8fafc; border: 1px solid #e7eef7;
}
.week-heat-cell em { font-style: normal; font-size: 10px; color: #8a5a4d; }
.week-heat-cell b { font-size: 11px; color: #183b64; }
.week-heat-cell span { font-size: 12px; font-weight: 800; }
.week-heat-cell.level-0 { background: #eefaf3; border-color: #c7efd8; color: #08734d; }
.week-heat-cell.level-1 { background: #fff7ed; border-color: #f7d7b5; }
.week-heat-cell.level-2 { background: #ffedd5; border-color: #fdba74; }
.week-heat-cell.level-3 { background: #fee4e2; border-color: #f3b0a8; }
.week-heat-cell.level-4 { background: #fecdca; border-color: #f97066; }
.week-heat-cell.is-worst { box-shadow: inset 0 0 0 1.5px #f04438; }
.week-heat-cell.is-disabled,
.week-heat-cell.level--1 { background: #f8fafc; border-color: #e7eef7; color: #94a3b8; pointer-events: none; }
.missing-zone-filter { display: inline-flex; align-items: center; gap: 6px; }
.missing-zone-filter select {
  min-height: 28px; border: 1px solid #f3b0a8; border-radius: 6px; background: #fff;
  color: #7a2e22; font: inherit; font-size: 12px; font-weight: 700; padding: 0 8px;
}
.missing-zone-bars {
  margin: 0; padding: 10px 12px 8px; border-bottom: 1px solid #f3e2df; background: #fffaf9;
}
.missing-zone-bars-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px;
}
.missing-zone-bars-actions { display: inline-flex; align-items: center; gap: 8px; }
.missing-zone-export-btn {
  min-height: 26px; padding: 0 8px; border: 1px solid #f3b0a8; border-radius: 6px;
  background: #fff; color: #b42318; font: inherit; font-size: 11px; font-weight: 700; cursor: pointer;
}
.missing-zone-bars-head strong { color: #7a2e22; font-size: 12px; }
.missing-zone-bars-head span { color: #8a5a4d; font-size: 11px; }
.missing-zone-bars-list { display: grid; gap: 6px; }
.missing-zone-bar {
  display: grid; grid-template-columns: 42px 1fr 28px 40px; gap: 8px; align-items: center;
  width: 100%; border: 1px solid transparent; border-radius: 8px; background: transparent;
  padding: 4px 6px; cursor: pointer; font: inherit; text-align: left;
}
.missing-zone-bar:hover { background: #fff; border-color: #f3d0cb; }
.missing-zone-bar.active { background: #fff; border-color: #f3b0a8; box-shadow: inset 0 0 0 1px rgba(240, 68, 56, .12); }
.missing-zone-bar .zone-name { color: #7a2e22; font-size: 12px; font-weight: 800; }
.missing-zone-bar .zone-track {
  display: block; height: 8px; border-radius: 999px; background: #f5e7e4; overflow: hidden;
}
.missing-zone-bar .zone-track i {
  display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #fda29b, #f04438);
}
.missing-zone-bar .zone-count { color: #b42318; font-size: 12px; font-weight: 800; text-align: right; }
.missing-zone-bar .zone-share { color: #8a5a4d; font-size: 11px; text-align: right; }
.week-heat-cell { position: relative; }
.week-heat-cell[title] { cursor: pointer; }
.week-heat-tooltip {
  position: fixed; z-index: 1200; min-width: 150px; max-width: 240px;
  padding: 10px 12px; border-radius: 10px; border: 1px solid #f3b0a8;
  background: rgba(255, 250, 249, .98); box-shadow: 0 10px 28px rgba(24, 59, 100, .16);
  color: #7a2e22; display: grid; gap: 3px; pointer-events: auto;
}
.week-heat-tooltip strong { font-size: 13px; color: #b42318; }
.week-heat-tooltip span { font-size: 12px; color: #7a2e22; }
.week-heat-tooltip em { font-style: normal; font-size: 11px; color: #8a5a4d; margin-top: 2px; }
.week-heat-copy-btn {
  margin-top: 4px; min-height: 28px; border: 1px solid #f3b0a8; border-radius: 6px;
  background: #fff; color: #b42318; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer;
}
.fee-quick-ranges { display: flex; flex-wrap: wrap; gap: 6px; align-items: end; padding-bottom: 2px; }
.fee-quick-btn {
  min-height: 32px; padding: 0 10px; border: 1px solid #d7e3f4; border-radius: 999px;
  background: #fff; color: #183b64; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer;
}
.fee-quick-btn.active { border-color: #f3b0a8; background: #fff6f5; color: #b42318; }
.fee-quick-btn.is-clear { color: #64748b; }
.fee-filter-amount input { min-width: 110px; }
.missing-report-row:last-child { border-bottom: 0; }
.missing-report-row strong { color: var(--text); }
.missing-report-row span { color: var(--muted); }
.missing-report-empty { padding: 18px 12px; color: var(--muted); text-align: center; }
.revenue-missing-link { color: #b42318; text-decoration: underline; text-underline-offset: 2px; font-weight: 700; }
.revenue-missing-link:hover { color: #912018; }
.fee-filter-unpaid select { min-width: 120px; }

main { padding: 24px 36px 42px; }
main:not(.login-wrap) {
  width: 100%;
  max-width: 1320px;
  margin-inline: auto;
}
.page-intro,
.placeholder-section,
.revenue-section,
.asset-section {
  scroll-margin-top: 122px;
}
.page-intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 18px;
  margin-bottom: 18px;
  background: linear-gradient(135deg, #fff 0%, #f8fbff 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.realtime-traffic-intro {
  align-items: stretch;
  display: grid;
  grid-template-columns: minmax(260px, .52fr) minmax(0, 1fr);
  grid-template-areas:
    "side main"
    "bottom bottom";
  gap: 14px;
}
.realtime-side-panel {
  grid-area: side;
  display: grid;
  grid-template-rows: 116px 1fr;
  gap: 14px;
  align-content: stretch;
}
.realtime-traffic-grid {
  grid-area: main;
  grid-template-areas:
    "total car"
    "mall street";
}
.realtime-bottom-stack {
  grid-area: bottom;
  display: grid;
  gap: 14px;
  width: 100%;
  min-width: 0;
}
.realtime-bottom-stack > .traffic-row {
  width: 100%;
  max-width: 100%;
  margin: 0;
  box-sizing: border-box;
}
.realtime-side-heading {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 0;
}
.realtime-side-heading > .realtime-heading-copy {
  min-width: 0;
  align-self: start;
}
.realtime-side-heading h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}
.realtime-title-actions {
  margin-top: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.realtime-refresh-button {
  height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  border: 1px solid rgba(20,110,245,.32);
  border-radius: 7px;
  color: var(--brand);
  background: rgba(239,246,255,.9);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, color .18s ease, opacity .18s ease;
}
.realtime-refresh-button:hover:not(:disabled) {
  border-color: var(--brand);
  background: #e5f0ff;
}
.realtime-freshness {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  white-space: nowrap;
}
.realtime-freshness small { font-size: 11px; }
.realtime-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.realtime-status::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #94a3b8;
  box-shadow: 0 0 0 3px rgba(148,163,184,.14);
}
.realtime-status[data-state="live"] { color: var(--green); }
.realtime-status[data-state="live"]::before { background: var(--green); box-shadow: 0 0 0 3px rgba(15,159,110,.14); }
.realtime-status[data-state="degraded"] { color: #b45309; }
.realtime-status[data-state="degraded"]::before { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,.16); }
.realtime-refresh-button:disabled { cursor: wait; opacity: .78; }
.realtime-refresh-button.loading .realtime-refresh-icon { animation: realtime-refresh-spin .7s linear infinite; }
.realtime-refresh-button.success { color: var(--green); border-color: rgba(22,163,74,.32); background: rgba(240,253,244,.92); }
.realtime-refresh-button.error { color: var(--red); border-color: rgba(220,38,38,.3); background: rgba(254,242,242,.92); }
@keyframes realtime-refresh-spin { to { transform: rotate(360deg); } }

.realtime-toast-stack {
  position: fixed;
  z-index: 200;
  right: 24px;
  bottom: 24px;
  display: grid;
  gap: 10px;
  align-items: end;
  justify-items: end;
  pointer-events: none;
}
.realtime-toast {
  pointer-events: auto;
  min-width: 200px;
  max-width: 320px;
  padding: 10px 14px 10px 38px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.96);
  color: var(--text);
  box-shadow: 0 12px 28px rgba(15, 30, 60, .12);
  font-size: 13px;
  font-weight: 600;
  position: relative;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .25s ease, transform .25s ease;
}
.realtime-toast::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 14px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--brand);
  transform: translateY(-50%);
  box-shadow: 0 0 0 4px rgba(20,110,245,.18);
}
.realtime-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.realtime-toast[data-state="success"]::before { background: var(--green); box-shadow: 0 0 0 4px rgba(15,159,110,.18); }
.realtime-toast[data-state="error"]::before { background: var(--red); box-shadow: 0 0 0 4px rgba(220,38,38,.18); }
.realtime-toast strong { display: block; color: var(--text); font-size: 13px; line-height: 1.45; }
.realtime-toast small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; font-weight: 500; }

@media (max-width: 600px) {
  .realtime-toast-stack {
    right: 16px;
    left: 16px;
    bottom: 16px;
  }
  .realtime-toast { max-width: none; }
}

.live-grid div {
  position: relative;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}
.live-grid div.is-pulse {
  animation: live-card-pulse .9s ease;
}
@keyframes live-card-pulse {
  0% { transform: scale(1); }
  35% { transform: scale(1.012); box-shadow: 0 10px 26px rgba(20,110,245,.18); background: #f1f7ff; }
  100% { transform: scale(1); }
}
.realtime-clock {
  min-width: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 4px;
  text-align: center;
}
.realtime-clock strong {
  color: var(--text);
  font-size: 40px;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.realtime-clock small { color: var(--muted); font-size: 15px; white-space: nowrap; }
.realtime-side-card {
  min-height: 116px;
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.realtime-side-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.realtime-side-card strong {
  color: var(--text);
  font-size: 22px;
  line-height: 1;
}
.realtime-side-card small {
  color: var(--muted);
  font-size: 12px;
}
.realtime-side-card #trafficLiveWeather {
  font-size: 24px;
  line-height: 28px;
  margin-top: 0;
}
.realtime-side-card #trafficLiveWeatherMeta {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.35;
}
.realtime-weather-card {
  position: relative;
  display: block;
  height: 100%;
  padding: 0;
  overflow: hidden;
  isolation: isolate;
}
.realtime-weather-card::after {
  content: '';
  position: absolute;
  z-index: 2;
  inset: 0;
  background: linear-gradient(90deg, rgba(234,244,249,.98) 0%, rgba(234,244,249,.96) 30%, rgba(238,247,251,.74) 55%, rgba(238,247,251,.24) 76%, rgba(238,247,251,0) 100%);
  backdrop-filter: blur(.6px) saturate(104%);
  -webkit-backdrop-filter: blur(.6px) saturate(104%);
  pointer-events: none;
}
.weather-card-copy {
  position: relative;
  z-index: 4;
  width: 54%;
  height: 100%;
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 10px 10px 10px 18px;
  background: transparent;
  text-shadow: 0 1px 2px rgba(255,255,255,.72);
}
.weather-scene {
  position: absolute;
  z-index: 1;
  inset: 0;
  isolation: isolate;
  min-width: 0;
  overflow: hidden;
  background:
    linear-gradient(90deg, #eaf4f9 0%, rgba(234,244,249,.98) 30%, rgba(238,247,251,.82) 54%, rgba(234,244,249,.34) 76%, rgba(234,244,249,0) 100%),
    radial-gradient(circle at 76% 24%, rgba(255,221,117,.48) 0 9%, transparent 29%),
    linear-gradient(145deg, rgba(205,232,247,.72), rgba(247,251,254,.88) 52%, rgba(206,224,237,.72));
  box-shadow: inset 1px 0 0 rgba(142,176,199,.14);
}
.weather-scene::before {
  content: '';
  position: absolute;
  z-index: 4;
  inset: -45% -65%;
  background: linear-gradient(112deg, transparent 35%, rgba(255,255,255,.08) 43%, rgba(255,255,255,.72) 49%, rgba(255,255,255,.1) 56%, transparent 64%);
  transform: translateX(-35%) rotate(-4deg);
  animation: weather-glass-sheen 8s ease-in-out infinite;
  pointer-events: none;
}
.weather-scene-sun {
  position: absolute;
  z-index: 1;
  top: 16px;
  right: 25px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255,245,188,.82);
  border-radius: 50%;
  background: rgba(247,196,67,.76);
  box-shadow:
    inset -5px -6px 11px rgba(206,139,24,.18),
    inset 4px 4px 9px rgba(255,248,201,.56),
    0 0 0 9px rgba(255,221,115,.1),
    0 0 27px rgba(239,186,54,.34);
  filter: saturate(.9);
  animation: weather-glass-sun 6s ease-in-out infinite;
}
.weather-scene-cloud {
  position: absolute;
  z-index: 2;
  width: 78px;
  height: 25px;
  border: 0;
  border-radius: 999px;
  background: rgba(238,247,252,.78);
  box-shadow:
    inset 0 -5px 10px rgba(118,151,174,.08),
    0 8px 16px rgba(56,89,111,.1);
  backdrop-filter: blur(8px) saturate(125%);
  -webkit-backdrop-filter: blur(8px) saturate(125%);
}
.weather-scene-cloud::before,
.weather-scene-cloud::after {
  content: '';
  position: absolute;
  border: 0;
  border-radius: 50%;
  background: rgba(238,247,252,.78);
  box-shadow: inset -3px -4px 8px rgba(117,151,175,.06);
  backdrop-filter: inherit;
  -webkit-backdrop-filter: inherit;
}
.weather-scene-cloud::before { width: 31px; height: 31px; left: 13px; bottom: 6px; }
.weather-scene-cloud::after { width: 40px; height: 40px; right: 9px; bottom: 5px; }
.weather-scene-cloud-back {
  top: 31px;
  left: 8px;
  opacity: .78;
  transform: scale(.72);
  animation: weather-glass-cloud-back 8s ease-in-out infinite;
}
.weather-scene-cloud-front {
  top: 62px;
  left: 42px;
  background: rgba(217,232,242,.76);
  animation: weather-glass-cloud-front 6.5s ease-in-out infinite;
}
@keyframes weather-glass-sun {
  0%,100% { transform: scale(.94); opacity: .72; filter: saturate(.78) blur(.15px); }
  50% { transform: scale(1.05); opacity: .98; filter: saturate(1) blur(0); }
}
@keyframes weather-glass-cloud-back {
  0%,100% { transform: translateX(-7px) translateY(1px) scale(.72); }
  50% { transform: translateX(22px) translateY(-2px) scale(.76); }
}
@keyframes weather-glass-cloud-front {
  0%,100% { transform: translateX(-14px) translateY(0); }
  50% { transform: translateX(18px) translateY(-3px); }
}
@keyframes weather-glass-sheen {
  0%,22% { transform: translateX(-40%) rotate(-4deg); opacity: 0; }
  38% { opacity: .72; }
  55%,100% { transform: translateX(42%) rotate(-4deg); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .weather-scene::before,
  .weather-scene-sun,
  .weather-scene-cloud { animation: none !important; }
  .weather-scene-cloud-back { left: 18px; }
  .weather-scene-cloud-front { left: 34px; }
}
#trafficWeatherCanvas {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}
.traffic-flow-layout-compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}
.realtime-traffic-grid {
  grid-template-areas:
    "total car"
    "mall street";
}
.realtime-total-card {
  grid-area: total;
  position: relative;
  overflow: hidden;
  display: block !important;
  padding: 0 !important;
  isolation: isolate;
}
.realtime-total-card::after {
  content: '';
  position: absolute;
  z-index: 8;
  inset: 0;
  background: rgba(248,251,253,.04);
  backdrop-filter: blur(.6px) saturate(104%);
  -webkit-backdrop-filter: blur(.6px) saturate(104%);
  pointer-events: none;
}
.realtime-total-card .traffic-row-main,
.realtime-car-card .traffic-row-main {
  position: relative;
  z-index: 9;
  width: 100%;
  height: 114px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 14px 10px 14px 16px;
  background: transparent;
  text-shadow: 0 1px 2px rgba(255,255,255,.76);
  pointer-events: none;
}
.visitor-entry-scene {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 0;
  overflow: hidden;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(208,230,244,.66), rgba(241,247,251,.36) 72%),
    linear-gradient(90deg, rgba(221,238,248,.48), rgba(255,255,255,.28));
}
.visitor-mall-entrance {
  position: absolute;
  z-index: 3;
  right: 86px;
  bottom: 7px;
  width: 108px;
  height: 96px;
  border: 2px solid rgba(111,82,51,.68);
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #886848 0 28px, #4f3b2b 28px 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.3), 0 5px 12px rgba(92,62,35,.19);
}
.visitor-mall-sign {
  position: absolute;
  z-index: 7;
  top: 4px;
  left: 5px;
  right: 5px;
  color: #f8b830;
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
  letter-spacing: 0;
  white-space: nowrap;
  text-align: center;
  text-shadow: 0 1px 3px rgba(38,24,13,.56), 0 0 6px rgba(248,184,48,.16);
}
.visitor-mall-canopy {
  position: absolute;
  z-index: 8;
  top: 25px;
  left: -8px;
  width: 120px;
  height: 7px;
  border-radius: 2px;
  background: linear-gradient(90deg, #a00080 0 25%, #f8b830 25% 50%, #c01828 50% 75%, #0068b0 75% 100%);
  box-shadow: 0 3px 5px rgba(83,57,35,.25), inset 0 1px 0 rgba(255,255,255,.46);
}
.visitor-door {
  position: absolute;
  z-index: 5;
  left: 9px;
  right: 9px;
  bottom: 4px;
  height: 61px;
  border: 2px solid rgba(181,151,115,.76);
  border-bottom-width: 3px;
  background:
    linear-gradient(90deg, transparent 47%, rgba(248,184,48,.22) 50%, transparent 53%),
    linear-gradient(180deg, rgba(68,53,42,.9), rgba(34,27,23,.96));
  box-shadow: inset 0 0 13px rgba(248,184,48,.15), 0 0 0 1px rgba(255,255,255,.22);
  overflow: hidden;
}
.visitor-door::before {
  content: '';
  position: absolute;
  z-index: 3;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: rgba(136,104,72,.34);
}
.visitor-door-panel {
  position: absolute;
  z-index: 2;
  top: 1px;
  bottom: 1px;
  width: calc(50% - 1px);
  border: 1px solid rgba(255,255,255,.7);
  background: linear-gradient(135deg, rgba(255,255,255,.5), rgba(173,137,96,.18));
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  animation: visitor-door-cycle 18s ease-in-out infinite;
}
.visitor-door-panel::after {
  content: '';
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 22px;
  transform: translate(-50%, -46%);
  background: url('/static/assets/gemdale-plaza-mark.png') center / contain no-repeat;
  opacity: .84;
  filter: saturate(1.08) contrast(1.08);
  pointer-events: none;
}
.visitor-door-left { left: 1px; transform-origin: left center; }
.visitor-door-right { right: 1px; transform-origin: right center; animation-name: visitor-door-cycle-right; }
.visitor-door-floor {
  position: absolute;
  left: -9px;
  right: -9px;
  bottom: -3px;
  height: 3px;
  background: rgba(111,82,51,.3);
}
.visitor-person {
  position: absolute;
  z-index: 4;
  left: auto;
  right: 210px;
  bottom: 18px;
  width: 16px;
  height: 33px;
  border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, #2684d6, #0c4f8e);
  box-shadow: 0 3px 8px rgba(20,58,88,.32), inset 0 1px 0 rgba(255,255,255,.28);
  opacity: 0;
}
.visitor-male { background: linear-gradient(180deg, #2684d6, #0c4f8e); }
.visitor-female {
  width: 15px;
  border-radius: 7px 7px 6px 6px;
  background: linear-gradient(180deg, #c8458d 0 57%, #873261 57% 100%);
  box-shadow: 0 3px 8px rgba(95,40,76,.3), inset 0 1px 0 rgba(255,255,255,.3);
}
.visitor-child {
  width: 12px;
  height: 23px;
  border-radius: 6px 6px 4px 4px;
  background: linear-gradient(180deg, #f1b837, #c77c12);
  box-shadow: 0 3px 7px rgba(118,76,17,.28), inset 0 1px 0 rgba(255,255,255,.3);
}
.visitor-person::before {
  content: '';
  position: absolute;
  left: 4px;
  top: -10px;
  width: 9px;
  height: 9px;
  border: 1px solid rgba(114,72,49,.18);
  border-radius: 50%;
  background: #efc19f;
  box-shadow: 0 -2px 0 #4c352b;
}
.visitor-female::before { left: 3px; box-shadow: 0 -3px 0 #5f302c, -2px 1px 0 #5f302c; }
.visitor-child::before { left: 2px; top: -8px; width: 8px; height: 8px; }
.visitor-person::after,
.visitor-person i::before {
  content: '';
  position: absolute;
  bottom: -10px;
  width: 5px;
  height: 12px;
  border-radius: 2px;
  background: #183b59;
  transform-origin: top center;
  animation: visitor-leg-walk 18s ease-in-out infinite;
}
.visitor-female::after,
.visitor-female i::before { background: #542a4a; }
.visitor-child::after,
.visitor-child i::before { bottom: -7px; width: 4px; height: 8px; background: #674719; }
.visitor-person::after { left: 1px; }
.visitor-person i::before { right: 1px; animation-delay: -.22s; }
.visitor-person-single { animation: visitor-single-enter 18s ease-in-out infinite; }
.visitor-person-pair { animation: visitor-pair-enter 18s ease-in-out infinite; }
.visitor-person-pair-man { bottom: 20px; }
.visitor-person-pair-woman { bottom: 12px; animation-name: visitor-pair-enter-offset; }
.visitor-person-family { animation: visitor-family-enter 18s ease-in-out infinite; }
.visitor-family-man { bottom: 21px; }
.visitor-family-woman { bottom: 12px; animation-name: visitor-family-enter-offset; }
.visitor-family-child { bottom: 17px; animation-name: visitor-family-child-enter; }
.visitor-entry-count {
  position: absolute;
  z-index: 6;
  top: 5px;
  right: 29px;
  width: 38px;
  height: 25px;
}
.visitor-entry-count span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #0b6b48;
  background: rgba(221,248,235,.9);
  border: 1px solid rgba(30,163,112,.24);
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  opacity: 0;
  transform: translateY(4px) scale(.82);
}
.visitor-count-one { animation: visitor-count-one 18s ease-out infinite; }
.visitor-count-two { animation: visitor-count-two 18s ease-out infinite; }
.visitor-count-three { animation: visitor-count-three 18s ease-out infinite; }
@keyframes visitor-door-cycle {
  0%,4%,28%,34%,38%,61%,67%,71%,94%,100% { transform: translateX(0); }
  8%,24%,42%,57%,75%,90% { transform: translateX(-96%); }
}
@keyframes visitor-door-cycle-right {
  0%,4%,28%,34%,38%,61%,67%,71%,94%,100% { transform: translateX(0); }
  8%,24%,42%,57%,75%,90% { transform: translateX(96%); }
}
@keyframes visitor-single-enter {
  0%,4% { opacity: 0; transform: translateX(0) translateY(0) scale(1); filter: brightness(1); }
  6% { opacity: 1; }
  15% { opacity: 1; transform: translateX(78px) translateY(0) scale(.96); filter: brightness(1); }
  21% { opacity: 1; transform: translateX(101px) translateY(-2px) scale(.82); filter: brightness(.82); }
  26% { opacity: .72; transform: translateX(113px) translateY(-6px) scale(.58); filter: brightness(.56); }
  29%,100% { opacity: 0; transform: translateX(120px) translateY(-8px) scale(.42); filter: brightness(.38); }
}
@keyframes visitor-pair-enter {
  0%,38% { opacity: 0; transform: translateX(0) translateY(0) scale(1); filter: brightness(1); }
  40% { opacity: 1; }
  49% { opacity: 1; transform: translateX(78px) translateY(0) scale(.96); filter: brightness(1); }
  55% { opacity: 1; transform: translateX(101px) translateY(-2px) scale(.82); filter: brightness(.82); }
  60% { opacity: .72; transform: translateX(113px) translateY(-6px) scale(.58); filter: brightness(.56); }
  63%,100% { opacity: 0; transform: translateX(120px) translateY(-8px) scale(.42); filter: brightness(.38); }
}
@keyframes visitor-pair-enter-offset {
  0%,38% { opacity: 0; transform: translateX(-12px) translateY(0) scale(1); filter: brightness(1); }
  40% { opacity: 1; }
  49% { opacity: 1; transform: translateX(66px) translateY(0) scale(.96); filter: brightness(1); }
  55% { opacity: 1; transform: translateX(89px) translateY(-2px) scale(.82); filter: brightness(.82); }
  60% { opacity: .72; transform: translateX(101px) translateY(-6px) scale(.58); filter: brightness(.56); }
  63%,100% { opacity: 0; transform: translateX(108px) translateY(-8px) scale(.42); filter: brightness(.38); }
}
@keyframes visitor-family-enter {
  0%,71% { opacity: 0; transform: translateX(0) translateY(0) scale(1); filter: brightness(1); }
  73% { opacity: 1; }
  82% { opacity: 1; transform: translateX(78px) translateY(0) scale(.96); filter: brightness(1); }
  88% { opacity: 1; transform: translateX(101px) translateY(-2px) scale(.82); filter: brightness(.82); }
  93% { opacity: .72; transform: translateX(113px) translateY(-6px) scale(.58); filter: brightness(.56); }
  96%,100% { opacity: 0; transform: translateX(120px) translateY(-8px) scale(.42); filter: brightness(.38); }
}
@keyframes visitor-family-enter-offset {
  0%,71% { opacity: 0; transform: translateX(-14px) translateY(0) scale(1); filter: brightness(1); }
  73% { opacity: 1; }
  82% { opacity: 1; transform: translateX(64px) translateY(0) scale(.96); filter: brightness(1); }
  88% { opacity: 1; transform: translateX(87px) translateY(-2px) scale(.82); filter: brightness(.82); }
  93% { opacity: .72; transform: translateX(99px) translateY(-6px) scale(.58); filter: brightness(.56); }
  96%,100% { opacity: 0; transform: translateX(106px) translateY(-8px) scale(.42); filter: brightness(.38); }
}
@keyframes visitor-family-child-enter {
  0%,71% { opacity: 0; transform: translateX(-27px) translateY(0) scale(1); filter: brightness(1); }
  73% { opacity: 1; }
  82% { opacity: 1; transform: translateX(51px) translateY(0) scale(.96); filter: brightness(1); }
  88% { opacity: 1; transform: translateX(74px) translateY(-2px) scale(.82); filter: brightness(.82); }
  93% { opacity: .72; transform: translateX(86px) translateY(-5px) scale(.58); filter: brightness(.56); }
  96%,100% { opacity: 0; transform: translateX(93px) translateY(-7px) scale(.42); filter: brightness(.38); }
}
@keyframes visitor-leg-walk {
  0%,4%,27%,38%,61%,71%,94%,100% { transform: rotate(0); }
  7%,13%,42%,48%,75%,81% { transform: rotate(13deg); }
  10%,17%,45%,52%,78%,85% { transform: rotate(-13deg); }
}
@keyframes visitor-count-one {
  0%,17% { opacity: 0; transform: translateY(4px) scale(.82); }
  20%,26% { opacity: 1; transform: translateY(0) scale(1); }
  30%,100% { opacity: 0; transform: translateY(-4px) scale(.9); }
}
@keyframes visitor-count-two {
  0%,51% { opacity: 0; transform: translateY(4px) scale(.82); }
  54%,60% { opacity: 1; transform: translateY(0) scale(1); }
  64%,100% { opacity: 0; transform: translateY(-4px) scale(.9); }
}
@keyframes visitor-count-three {
  0%,84% { opacity: 0; transform: translateY(4px) scale(.82); }
  87%,93% { opacity: 1; transform: translateY(0) scale(1); }
  97%,100% { opacity: 0; transform: translateY(-4px) scale(.9); }
}
@media (prefers-reduced-motion: reduce) {
  .visitor-door-panel,
  .visitor-person,
  .visitor-entry-count span,
  .parking-gate-arm,
  .entry-car,
  .entry-car-wheel,
  .car-entry-count { animation: none !important; }
}
.realtime-car-card {
  grid-area: car;
  position: relative;
  overflow: hidden;
  display: block !important;
  padding: 0 !important;
  isolation: isolate;
}
.realtime-car-card::after {
  content: '';
  position: absolute;
  z-index: 8;
  inset: 0;
  background: rgba(248,251,253,.04);
  backdrop-filter: blur(.6px) saturate(104%);
  -webkit-backdrop-filter: blur(.6px) saturate(104%);
  pointer-events: none;
}
.car-entry-scene {
  position: absolute;
  z-index: 1;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  background:
    linear-gradient(90deg, #eaf4f9 0%, rgba(234,244,249,.98) 28%, rgba(222,237,244,.78) 54%, rgba(213,230,238,.28) 76%, rgba(204,220,228,0) 100%),
    linear-gradient(180deg, rgba(213,230,238,.78) 0 58%, rgba(178,194,202,.48) 58% 100%),
    linear-gradient(90deg, rgba(242,247,249,.72), rgba(204,220,228,.46));
}
.car-entry-scene::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42%;
  background: linear-gradient(90deg, rgba(67,78,84,0) 0%, rgba(67,78,84,.03) 30%, rgba(72,84,91,.14) 60%, rgba(67,78,84,.28) 100%);
  border-top: 1px solid rgba(255,255,255,.48);
}
.parking-sign {
  position: absolute;
  z-index: 3;
  right: 31px;
  top: 8px;
  width: 62px;
  height: 31px;
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  border: 2px solid rgba(255,255,255,.82);
  border-radius: 4px;
  overflow: hidden;
  background: #1769aa;
  color: #fff;
  box-shadow: 0 3px 7px rgba(21,65,95,.22);
}
.parking-sign strong {
  display: grid;
  place-items: center;
  height: 100%;
  font-size: 20px;
  line-height: 1;
  border-right: 1px solid rgba(255,255,255,.45);
}
.parking-sign span {
  padding: 0 2px;
  font-size: 8px;
  line-height: 1.1;
  text-align: center;
}
.parking-booth {
  position: absolute;
  z-index: 3;
  right: 37px;
  bottom: 12px;
  width: 49px;
  height: 55px;
  border: 2px solid #526a78;
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, #e7edf0 0 15px, #829ba8 15px 100%);
  box-shadow: 0 4px 9px rgba(35,57,69,.24), inset 0 0 0 1px rgba(255,255,255,.4);
}
.parking-booth::before,
.parking-booth::after {
  content: '';
  position: absolute;
  top: 19px;
  width: 17px;
  height: 23px;
  border: 1px solid rgba(45,79,98,.62);
  background: linear-gradient(145deg, rgba(217,241,250,.82), rgba(90,135,157,.48));
}
.parking-booth::before { left: 4px; }
.parking-booth::after { right: 4px; }
.parking-booth span {
  position: absolute;
  left: -5px;
  right: -5px;
  top: 13px;
  height: 4px;
  background: #1769aa;
  box-shadow: 0 2px 4px rgba(30,69,93,.25);
}
.parking-gate {
  position: absolute;
  z-index: 5;
  right: 92px;
  bottom: 14px;
  width: 86px;
  height: 58px;
}
.parking-gate-base {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 17px;
  height: 36px;
  border: 2px solid rgba(94,101,105,.7);
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(90deg, #f6f7f8, #c9d0d4);
  box-shadow: 0 3px 6px rgba(49,58,63,.22);
}
.parking-gate-base::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #28a86e;
  box-shadow: 0 0 5px rgba(40,168,110,.62);
}
.parking-gate-arm {
  position: absolute;
  z-index: 2;
  right: 11px;
  bottom: 27px;
  width: 76px;
  height: 8px;
  border: 1px solid rgba(123,49,49,.55);
  border-radius: 4px 2px 2px 4px;
  transform-origin: calc(100% - 2px) center;
  background: repeating-linear-gradient(90deg, #f8f8f5 0 13px, #dc3f3f 13px 25px);
  box-shadow: 0 2px 4px rgba(65,47,44,.24);
  animation: parking-bar-lift 8s ease-in-out infinite;
}
.entry-car {
  position: absolute;
  z-index: 4;
  left: auto;
  right: 180px;
  bottom: 15px;
  width: 62px;
  height: 29px;
  border-radius: 14px 18px 7px 7px;
  background: linear-gradient(180deg, #f4b435, #ce7811);
  border: 1px solid rgba(129,78,15,.44);
  box-shadow: 0 5px 9px rgba(57,62,65,.26), inset 0 1px 0 rgba(255,255,255,.48);
  opacity: 0;
  animation: parking-car-enter 8s ease-in-out infinite;
}
.entry-car::before {
  content: '';
  position: absolute;
  left: 14px;
  top: -12px;
  width: 32px;
  height: 15px;
  border-radius: 11px 13px 0 0;
  background: #dc951f;
  border: 1px solid rgba(129,78,15,.4);
}
.entry-car-window {
  position: absolute;
  z-index: 2;
  left: 19px;
  top: -9px;
  width: 23px;
  height: 10px;
  border-radius: 7px 8px 1px 1px;
  background: linear-gradient(135deg, #dff3fb, #709aad);
}
.entry-car-wheel {
  position: absolute;
  bottom: -6px;
  width: 12px;
  height: 12px;
  border: 3px solid #293238;
  border-radius: 50%;
  background: #9aa8ae;
  animation: parking-wheel-spin 8s linear infinite;
}
.entry-car-wheel-front { right: 8px; }
.entry-car-wheel-back { left: 8px; }
.parking-road-line {
  position: absolute;
  z-index: 2;
  left: 49%;
  right: 92px;
  bottom: 7px;
  height: 2px;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.86) 0 13px, transparent 13px 22px);
}
.car-entry-count {
  position: absolute;
  z-index: 7;
  top: 6px;
  right: 104px;
  width: 38px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #0b6b48;
  background: rgba(221,248,235,.9);
  border: 1px solid rgba(30,163,112,.24);
  font-size: 15px;
  font-weight: 800;
  opacity: 0;
  animation: parking-count-one 8s ease-out infinite;
}
@keyframes parking-bar-lift {
  0%,18%,82%,100% { transform: rotate(0deg); }
  29%,72% { transform: rotate(68deg); }
}
@keyframes parking-car-enter {
  0%,7% { opacity: 0; transform: translateX(0) scale(1); }
  10% { opacity: 1; }
  26% { opacity: 1; transform: translateX(54px) scale(.98); }
  46% { opacity: 1; transform: translateX(100px) scale(.9); filter: brightness(.92); }
  66% { opacity: 1; transform: translateX(139px) scale(.77); filter: brightness(.74); }
  76% { opacity: .45; transform: translateX(158px) scale(.66); filter: brightness(.58); }
  82%,100% { opacity: 0; transform: translateX(170px) scale(.58); filter: brightness(.48); }
}
@keyframes parking-wheel-spin {
  0%,7%,82%,100% { transform: rotate(0); }
  76% { transform: rotate(720deg); }
}
@keyframes parking-count-one {
  0%,47% { opacity: 0; transform: translateY(4px) scale(.82); }
  53%,69% { opacity: 1; transform: translateY(0) scale(1); }
  76%,100% { opacity: 0; transform: translateY(-4px) scale(.9); }
}
.realtime-mall-card { grid-area: mall; }
.realtime-street-card { grid-area: street; }
.realtime-network-wide { grid-column: 1 / -1; min-height: 0; padding: 16px; }
.realtime-metro-card {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  min-height: 0;
  padding: 16px;
  border-color: rgba(20,110,245,.18);
  background: linear-gradient(135deg, #fff 0%, #f3f8ff 100%);
}
.realtime-ab-card {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  min-height: 0;
  padding: 16px;
}
.traffic-metro-network {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
.traffic-metro-network-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}
.traffic-metro-network .traffic-network-segment header {
  min-height: 56px;
  grid-template-columns: 1fr;
  justify-items: center;
}
.traffic-metro-network .traffic-network-building {
  width: 100%;
  justify-content: space-between;
  padding: 0 4px;
}
.traffic-metro-network .traffic-network-building strong {
  font-size: 14px;
}
.traffic-metro-network .traffic-network-building em {
  min-width: 72px;
  font-size: 18px;
}
.traffic-metro-total-segment header {
  background: #eef5ff;
}
.traffic-metro-total-segment .traffic-network-building em {
  min-width: 84px;
  font-size: 20px;
}
.traffic-metro-segment-note {
  padding: 8px 10px 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: #fff;
  font-size: 12px;
  line-height: 1.3;
}
.traffic-metro-segment-compare {
  justify-content: flex-end;
  padding: 8px 10px 10px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.traffic-metro-row {
  border-color: var(--line);
  background: #f8fafc;
}
.traffic-flow-layout-compact .traffic-row {
  grid-template-columns: 1fr;
  min-height: 116px;
  padding: 14px 16px;
}
.traffic-flow-layout-compact .traffic-row-main strong { font-size: 25px; }
.traffic-flow-layout-compact .traffic-total-row strong { font-size: 30px; }
.traffic-subrow small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}
.traffic-ab-history-row {
  margin-top: 2px;
}
.ab-connector-panel {
  display: grid;
  grid-template-columns: minmax(220px, .55fr) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}
.ab-connector-summary {
  min-width: 0;
}
.ab-connector-summary small {
  justify-self: start;
  text-align: left;
  letter-spacing: 0;
}
.ab-total-lines {
  display: grid;
  gap: 4px;
  justify-content: start;
}
.ab-total-lines div {
  display: grid;
  grid-template-columns: 92px max-content;
  align-items: baseline;
  column-gap: 10px;
}
.ab-total-lines strong {
  color: var(--text);
  font-size: 28px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.ab-total-lines span {
  color: var(--muted);
  font-size: 12px;
}
.ab-connector-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 0;
  align-content: center;
}
.ab-connector-line {
  display: grid;
  grid-template-columns: 38px max-content;
  justify-content: start;
  align-items: baseline;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.ab-connector-line strong { color: var(--text); font-size: 12px; white-space: nowrap; }
.traffic-method-note {
  max-width: 760px;
  margin-top: 7px;
  color: #475569;
  font-size: 12px;
  line-height: 1.55;
}
.traffic-network-row {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 14px;
}
.traffic-network-head { display: flex; justify-content: space-between; gap: 16px; }
.traffic-network-head > div { display: grid; gap: 4px; }
.traffic-network-head small { color: var(--muted); font-size: 12px; }
.traffic-network {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.traffic-network-segment { min-width: 0; background: #fff; }
.traffic-network-segment + .traffic-network-segment { border-left: 1px solid var(--line); }
.traffic-network-segment header {
  min-height: 46px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  color: var(--text);
  background: #f8fafc;
  text-align: center;
  font-size: 13px;
}
.traffic-network-segment header > span { color: var(--brand); font-size: 18px; }
.traffic-network-building {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.traffic-network-building strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.traffic-network-building em {
  min-width: 60px;
  max-width: 100%;
  padding: 3px 7px;
  border: 1px solid rgba(20,110,245,.26);
  border-radius: 6px;
  color: var(--brand);
  background: rgba(239,246,255,.92);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.traffic-network-columns,
.traffic-network-data-row {
  display: grid;
  grid-template-columns: 42px minmax(58px, 1fr) minmax(58px, 1fr) minmax(72px, 1fr);
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  border-top: 1px solid var(--line);
  text-align: right;
}
.traffic-network-columns { color: var(--muted); font-size: 10px; font-weight: 700; }
.traffic-network-columns span:first-child,
.traffic-network-data-row > span { text-align: left; }
.traffic-network-data-row { min-height: 37px; font-size: 12px; }
.traffic-network-data-row strong { font-size: 13px; font-variant-numeric: tabular-nums; }
.traffic-network-data-row small { color: var(--muted); font-size: 11px; white-space: nowrap; }

.traffic-analysis-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}
.traffic-date-tools {
  display: grid;
  gap: 8px;
  justify-items: end;
}
.traffic-date-mode {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
}
.traffic-date-mode button {
  border: 0;
  border-radius: 999px;
  padding: 6px 12px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
}
.traffic-date-mode button.active {
  background: #fff;
  color: var(--brand);
  box-shadow: 0 1px 5px rgba(15, 23, 42, .12);
}
.traffic-date-fields {
  display: flex;
  align-items: end;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.traffic-date-fields label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.traffic-date-fields label[hidden] { display: none; }
.traffic-date-fields input {
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 9px;
  color: var(--text);
  background: #fff;
}
.traffic-date-fields button {
  height: 34px;
  border: 1px solid var(--brand);
  border-radius: 8px;
  padding: 0 14px;
  color: #fff;
  background: var(--brand);
  font-weight: 700;
  cursor: pointer;
}
.page-intro p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.section-title {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}
.section-title > h2 { margin-right: auto; }
.section-title .live-strip-refresh { margin-bottom: 0; }
.date-context { margin-top: 6px; color: var(--muted); font-size: 14px; }
.eyebrow { display: block; color: #be123c; font-size: 13px; font-weight: 700; margin-bottom: 5px; }
.sales-title-row {
  width: 100%;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.live-strip, .yesterday-section, .accumulated-section, .panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.live-strip { padding: 18px; margin-bottom: 18px; }
.live-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.live-grid div {
  min-height: 86px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  display: grid;
  align-content: space-between;
  background: #f8fafc;
}
.live-grid span, .kpi span { color: var(--muted); font-size: 13px; }
.live-grid strong { font-size: 24px; letter-spacing: 0; }
.weather-icon {
  display: inline-block;
  width: 54px;
  height: 40px;
  margin-right: 12px;
  flex: 0 0 auto;
  object-fit: contain;
  vertical-align: middle;
}

#liveWeather,
#weather,
#trafficLiveWeather {
  display: inline-flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
}
.weather-text {
  color: var(--text) !important;
  font: inherit !important;
  font-weight: 700 !important;
  line-height: inherit !important;
  letter-spacing: 0;
}
#liveWeather {
  font-size: 24px;
  line-height: 28px;
}
#weather {
  font-size: 24px;
  line-height: 28px;
}
#liveWeather .weather-icon,
#weather .weather-icon {
  width: 37px;
  height: 28px;
}
#trafficLiveWeather .weather-icon {
  width: 37px;
  height: 28px;
}
.live-grid small { color: var(--muted); font-size: 12px; line-height: 1.35; }

.yesterday-section, .accumulated-section { padding: 18px; }
.accumulated-section { margin-top: 18px; }
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.kpi {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  min-height: 160px;
  display: grid;
  gap: 10px;
  align-content: start;
}
.kpi strong { font-size: 27px; line-height: 1.15; letter-spacing: 0; }
.kpi.primary { border-color: rgba(20,110,245,.35); }
.kpi.primary strong { color: var(--brand); }
.compare-lines { display: grid; gap: 4px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.compare { font-variant-numeric: tabular-nums; font-weight: 700; }
.compare.up { color: var(--red); }
.compare.down { color: var(--green); }
.compare.flat, .compare.muted { color: var(--muted); }

.realtime-compare-box {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: nowrap;
  width: 100%;
  min-width: 0;
}
.realtime-compare-tag {
  display: inline-flex;
  align-items: center;
  flex: 0 1 auto;
  max-width: 100%;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
  color: var(--muted);
  background: rgba(241, 245, 249, 0.9);
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid var(--line);
}
.realtime-compare-tag .compare {
  font-weight: 700;
  margin-left: 3px;
}
.muted-note { color: var(--muted); font-size: 12px; }

.accumulated-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.accumulated {
  min-height: 160px;
  align-content: start;
}
.accumulated.primary strong {
  color: var(--brand);
}
.analysis-section { margin-top: 18px; }
.analysis-head { align-items: flex-start; }
.analysis-period-tools { display: flex; align-items: end; gap: 10px; }
.analysis-period-picker { display: grid; gap: 4px; }
.analysis-period-picker span { color: var(--muted); font-size: 11px; font-weight: 700; }
.analysis-period-picker select {
  height: 32px;
  min-width: 230px;
  padding: 0 30px 0 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 13px;
}
.analysis-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.analysis-card {
  min-height: 102px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  background: #fff;
  display: grid;
  align-content: space-between;
  gap: 8px;
}
.analysis-card.primary { border-color: rgba(20,110,245,.35); }
.analysis-card span { color: var(--muted); font-size: 13px; }
.analysis-card strong { color: var(--text); font-size: 24px; line-height: 1.15; }
.analysis-card.primary strong { color: var(--brand); }
.analysis-card small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.analysis-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, .75fr);
  gap: 16px;
  align-items: stretch;
}
.insight-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  background: #f8fafc;
  display: grid;
  gap: 10px;
  align-content: start;
}
.insight-item {
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
  padding-left: 12px;
  border-left: 3px solid rgba(20,110,245,.3);
}
.placeholder-section { margin-top: 18px; }
.placeholder-panel {
  display: grid;
  gap: 16px;
}
.placeholder-panel p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.55;
  font-size: 14px;
}
.placeholder-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.placeholder-grid div {
  min-height: 78px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 14px 16px;
  border: 1px dashed rgba(100,112,134,.35);
  border-radius: 8px;
  background: #f8fafc;
}
.placeholder-grid strong {
  color: var(--text);
  font-size: 15px;
}
.placeholder-grid span {
  color: var(--muted);
  font-size: 13px;
}
.traffic-flow-layout {
  display: grid;
  gap: 14px;
}
.traffic-row {
  display: grid;
  grid-template-columns: minmax(260px, .9fr) minmax(0, 1.4fr);
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
}
.traffic-total-row {
  grid-template-columns: 1fr;
  background: linear-gradient(135deg, #fff 0%, #eef6ff 100%);
  border-color: rgba(20,110,245,.25);
}
.traffic-history-total-row { grid-template-columns: minmax(260px, .9fr) minmax(0, 1.4fr); align-items: stretch; }
.traffic-history-side-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.traffic-history-side-grid.has-single-card,
.traffic-history-side-grid:has(.traffic-selected-weather[hidden]) {
  grid-template-columns: 1fr;
}
.traffic-selected-card {
  min-height: 112px; display: grid; align-content: center; gap: 7px; padding: 16px 20px;
  border: 1px solid #d6e5f7; border-radius: 9px; background: rgba(232, 243, 255, .72);
}
.traffic-selected-carflow { background: rgba(255, 247, 229, .78); border-color: #f0dfbd; }
.traffic-selected-carflow .traffic-compare-lines { margin-top: 2px; }
.traffic-history-side-grid[hidden], .traffic-selected-card[hidden] { display: none; }
.traffic-selected-card > span { color: var(--muted); font-size: 13px; font-weight: 700; }
.traffic-history-total-row .traffic-selected-carflow > strong { color: #183b64; font-size: 24px; line-height: 28px; }
.traffic-history-total-row .traffic-selected-weather > strong { display: flex; align-items: center; gap: 0; flex-wrap: nowrap; color: #183b64; font-size: 24px; line-height: 28px; white-space: nowrap; }
.traffic-history-total-row .traffic-selected-weather > strong .weather-icon { width: 37px; height: 28px; flex: 0 0 auto; }
.traffic-history-total-row .traffic-selected-weather > strong .weather-text { display: inline-block; font-size: 24px; line-height: 28px; }
.traffic-selected-temperature { display: inline-block; margin-left: 8px; color: #52677f; font-size: 24px; line-height: 28px; font-style: normal; font-weight: 700; white-space: nowrap; }
.traffic-selected-card > small { color: var(--muted); font-size: 12px; }
.traffic-row-main {
  display: grid;
  gap: 8px;
  align-content: center;
}
.traffic-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.traffic-row-main strong {
  color: var(--text);
  font-size: 28px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.traffic-total-row strong { color: var(--brand); font-size: 34px; }
.traffic-row-main small { color: var(--muted); font-size: 12px; }
.traffic-subgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.traffic-subrow {
  min-height: 96px;
  display: grid;
  gap: 6px;
  align-content: center;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.traffic-subrow span { color: var(--muted); font-size: 13px; }
.traffic-subrow strong { color: var(--text); font-size: 18px; font-variant-numeric: tabular-nums; }
.traffic-entrance-row { background: #f8fafc; border-color: var(--line); }
.traffic-entrance-card { align-content: start; }
.traffic-entrance-card > span { color: var(--muted); font-size: 13px; }
.traffic-entrance-card > strong { color: var(--text); font-size: 18px; font-variant-numeric: tabular-nums; }
.traffic-gate-list { display: grid; gap: 6px; margin-top: 8px; }
.traffic-gate-item {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px;
  padding: 8px 0 0; border-top: 1px solid var(--line);
}
.traffic-gate-item:first-child { padding-top: 0; border-top: 0; }
.traffic-gate-item span { color: var(--muted); font-size: 13px; }
.traffic-gate-item strong { color: var(--text); font-size: 15px; font-variant-numeric: tabular-nums; }
.traffic-gate-item em { color: var(--brand); font-size: 12px; font-style: normal; white-space: nowrap; }
.traffic-compare-lines {
  min-height: 17px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  white-space: nowrap;
}
.traffic-compare-lines > span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--muted);
  font-size: inherit;
}
.traffic-compare-lines i { color: #cbd5e1; font-style: normal; }
.traffic-compare-lines .compare { font-size: 11px; }
.traffic-compare-lines .compare-val {
  color: #64748b;
  font-size: 11px;
  font-weight: 500;
  margin-left: 2px;
  font-variant-numeric: tabular-nums;
}
.revenue-section { margin-top: 18px; }
.revenue-page { display: grid; gap: 16px; }
.revenue-hero-toolbar {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.revenue-hero-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.revenue-hero-title h2 {
  margin: 0;
  font-size: 18px;
  color: var(--text);
  font-weight: 700;
}
.revenue-hero-title p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.revenue-ctrl-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.revenue-ctrl-group label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
.revenue-ctrl-group label[hidden],
.revenue-ctrl-group [hidden] {
  display: none !important;
}
.revenue-ctrl-group select,
.revenue-ctrl-group input[type="text"],
.revenue-ctrl-group input[type="date"] {
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
  color: var(--text);
  background: #fff;
  outline: none;
}
.revenue-ctrl-group select:focus,
.revenue-ctrl-group input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(20,110,245,.15);
}
.revenue-btn-primary {
  height: 34px;
  padding: 0 18px;
  background: var(--brand);
  color: #fff;
  border: 1px solid var(--brand);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .15s ease;
}
.revenue-btn-primary:hover {
  background: #0d5dd3;
  border-color: #0d5dd3;
}
.revenue-btn-excel {
  height: 34px;
  padding: 0 16px;
  background: #059669;
  color: #fff;
  border: 1px solid #059669;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all .15s ease;
}
.revenue-btn-excel:hover {
  background: #047857;
  color: #fff;
  border-color: #047857;
}
.revenue-query-fields {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: nowrap;
}
.revenue-query-fields label {
  display: grid;
  gap: 6px;
  min-width: 0;
  margin: 0;
}
.revenue-query-fields label > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}
.revenue-query-fields select,
.revenue-query-fields input {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  box-sizing: border-box;
}
.revenue-query-fields #revenueFormalMerchantInput {
  width: 240px;
}
.revenue-query-fields #revenueTemporaryMerchantSelect {
  width: 240px;
}
.revenue-query-fields #revenueMonthSelect {
  min-width: 130px;
}
.revenue-query-fields #revenuePeriodApply {
  height: 36px;
  padding: 0 18px;
  border: 0;
  border-radius: 6px;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.revenue-period-bar {
  min-height: 52px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 6px; background: #fff;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.revenue-period-bar div { display: flex; align-items: baseline; gap: 12px; }
.revenue-period-bar strong { font-size: 14px; }
.revenue-period-bar span { color: var(--muted); font-size: 12px; }
.revenue-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.revenue-kpi {
  min-height: 104px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  transition: box-shadow 0.15s ease;
}
.revenue-kpi:hover {
  box-shadow: 0 4px 12px rgba(15,23,42,.05);
}
.revenue-kpi.primary {
  border: 1px solid var(--line);
  padding-top: 16px;
}
.revenue-kpi > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.revenue-kpi strong {
  color: #0f172a;
  font-size: clamp(22px, 1.8vw, 26px);
  font-weight: 700;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  margin: 6px 0;
  overflow-wrap: anywhere;
}
.revenue-kpi.primary strong {
  color: #0f172a;
}
.revenue-kpi small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 4px;
}
.revenue-day-average-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.revenue-day-average-row[hidden] { display: none; }
.revenue-day-average-card {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  transition: box-shadow 0.15s ease;
}
.revenue-day-average-card:hover {
  box-shadow: 0 4px 12px rgba(15,23,42,.05);
}
.revenue-day-average-card > div {
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 14px 16px;
  background: #f8fafc;
  border-right: 1px solid var(--line);
}
.revenue-day-average-card.holiday > div {
  background: #fff7ed;
}
.revenue-day-average-card > div span {
  color: #0f172a;
  font-size: 14px;
  font-weight: 700;
}
.revenue-day-average-card.holiday > div span {
  color: #c2410c;
}
.revenue-day-average-card > div small {
  color: var(--muted);
  font-size: 11px;
}
.revenue-day-average-card dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.revenue-day-average-card dl > div {
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 12px 16px;
  min-width: 0;
}
.revenue-day-average-card dl > div + div {
  border-left: 1px solid #f1f5f9;
}
.revenue-day-average-card dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.revenue-day-average-card dd {
  margin: 0;
  color: #0f172a;
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.revenue-day-average-card dl small {
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.revenue-day-average-card dl small .compare.up { color: #dc2626; font-weight: 600; }
.revenue-day-average-card dl small .compare.down { color: #16a34a; font-weight: 600; }
.revenue-day-average-card dl small .compare.flat { color: var(--muted); }
.revenue-day-average-card dl small.up { color: #dc2626; font-weight: 600; }
.revenue-day-average-card dl small.down { color: #16a34a; font-weight: 600; }
.revenue-day-average-card.holiday dd { color: #0f172a; }
.revenue-insight-strip {
  min-height: 44px; padding: 9px 14px; border-left: 3px solid #0f9f6e; background: #f4faf7;
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 22px;
}
.revenue-insight-strip span { position: relative; color: #245446; font-size: 12px; }
.revenue-insight-strip span + span::before { content: ''; position: absolute; left: -12px; top: 4px; width: 1px; height: 10px; background: #b8d8ca; }
.revenue-analysis-row { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(270px, .65fr); gap: 16px; align-items: start; }
.revenue-section-head { min-height: 43px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.revenue-section-head h3 { margin: 3px 0 0; font-size: 16px; }
.revenue-section-head > span { color: var(--muted); font-size: 12px; }
.revenue-chart-box { height: 290px; margin-top: 10px; }
.revenue-diagnosis-list { margin-top: 10px; display: grid; }
.revenue-diagnosis-list div { padding: 13px 0; border-bottom: 1px solid #edf2f7; display: grid; grid-template-columns: 28px 1fr; gap: 9px; }
.revenue-diagnosis-list div:last-child { border-bottom: 0; }
.revenue-diagnosis-list b { color: var(--brand); font-size: 11px; }
.revenue-diagnosis-list span { color: var(--text); font-size: 13px; line-height: 1.45; }
.revenue-structure-panel, .revenue-merchant-panel { margin: 0; }
.revenue-switch-head { align-items: center; }
.revenue-merchant-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.revenue-mom-filters { display: flex; align-items: center; gap: 6px; }
.revenue-mom-filter { position: relative; }
.revenue-mom-trigger {
  height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 4px;
  background: #fff; color: var(--text); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer;
}
.revenue-mom-trigger span { color: var(--muted); margin-left: 4px; }
#revenueMerchantGrowth.active { border-color: #0f9f6e; color: #087653; background: #edf9f4; }
#revenueMerchantDecline.active { border-color: #dc5b5b; color: #b42323; background: #fff2f2; }
.revenue-mom-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; min-width: 172px;
  padding: 5px; border: 1px solid var(--line); border-radius: 6px; background: #fff;
  box-shadow: 0 10px 24px rgba(15,23,42,.14);
}
.revenue-mom-menu[hidden] { display: none; }
.revenue-mom-menu button {
  width: 100%; min-height: 34px; padding: 7px 10px; border: 0; border-radius: 4px;
  background: transparent; color: var(--text); text-align: left; font: inherit; font-size: 12px; cursor: pointer;
}
.revenue-mom-menu button:hover { background: #f3f6fa; color: var(--brand); }
.revenue-table-scroll { margin-top: 14px; overflow-x: auto; }
.revenue-table { min-width: 900px; }
.revenue-table-head, .revenue-table-row {
  display: grid; align-items: center; gap: 12px; min-height: 46px; padding: 0 10px; border-bottom: 1px solid #edf2f7;
}
.revenue-structure-table .revenue-table-head, .revenue-structure-table .revenue-table-row { grid-template-columns: minmax(110px, 1.25fr) repeat(6, minmax(90px, 1fr)); }
.revenue-merchant-table .revenue-table-head, .revenue-merchant-table .revenue-table-row { grid-template-columns: minmax(180px, 1.5fr) minmax(150px, 1.2fr) repeat(5, minmax(90px, 1fr)); }
.revenue-table-head { position: sticky; top: 0; z-index: 2; min-height: 38px; border: 0; background: #f6f8fb; color: var(--muted); font-size: 11px; font-weight: 700; }
.revenue-table-row { color: var(--text); font-size: 12px; }
.revenue-table-row:hover { background: #f8fbff; }
.revenue-table-row strong { min-width: 0; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.revenue-table-row strong i {
  display: inline-flex; width: 22px; height: 22px; margin-right: 8px; align-items: center; justify-content: center;
  border-radius: 50%; background: #eef4fc; color: var(--brand); font-size: 10px; font-style: normal;
}
.revenue-table-row span { min-width: 0; font-variant-numeric: tabular-nums; }
.revenue-table-head span:not(:first-child), .revenue-table-row > span:not(:first-child) { text-align: right; }
.revenue-table-row span b { color: var(--brand); }
.revenue-table-row .mom-up { color: #dc2626; font-weight: 700; }
.revenue-table-row .mom-down { color: #16a34a; font-weight: 700; }
.revenue-table-empty { padding: 34px 16px; color: var(--muted); font-size: 13px; text-align: center; border-bottom: 1px solid #edf2f7; }
.revenue-pagination { margin-top: 12px; display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.revenue-pagination button {
  width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 4px; background: #fff;
  color: var(--brand); font: inherit; font-size: 21px; line-height: 1; cursor: pointer;
}
.revenue-pagination button:hover:not(:disabled) { border-color: var(--brand); background: #f3f7fd; }
.revenue-pagination button:disabled { color: #b8c1cc; background: #f5f7f9; cursor: not-allowed; }
.revenue-pagination span { min-width: 120px; color: var(--muted); font-size: 12px; text-align: center; font-variant-numeric: tabular-nums; }
.revenue-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.revenue-grid.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rank-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
  min-width: 0;
}
.fee-section { margin-top: 18px; }
.fee-workbench { display: grid; gap: 16px; }
.fee-head {
  align-items: end;
  gap: 16px;
}
.fee-month-form {
  display: flex;
  align-items: end;
  gap: 10px;
  margin: 0;
}
.fee-month-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.fee-month-form input {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  color: var(--text);
  font: inherit;
}
.fee-summary-grid .analysis-card.danger { border-color: rgba(220,38,38,.25); }
.fee-summary-grid .analysis-card.danger strong { color: var(--red); }
.user-menu { position: relative; }
.user-menu summary {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--brand);
  background: #eaf2ff;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
}
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary::after { content: '⌄'; margin-left: 7px; font-size: 11px; }
.user-menu[open] summary { border-color: rgba(20,110,245,.25); }
.user-menu-popover {
  position: absolute;
  z-index: 50;
  top: calc(100% + 8px);
  right: 0;
  min-width: 148px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(15,23,42,.16);
}
.top-nav .user-menu-popover a,
.user-menu-popover button {
  width: 100%;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 10px;
  border: 0;
  border-radius: 5px;
  color: var(--text);
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.top-nav .user-menu-popover a:hover,
.user-menu-popover button:hover { color: var(--brand); background: #eff6ff; box-shadow: none; }
.user-menu-popover form { margin: 0; }
.top-nav-logout { margin: 0; }
.top-nav-logout button {
  appearance: none;
  padding: 9px 12px;
  border: 0;
  border-radius: 6px;
  color: #475569;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.top-nav-logout button:hover { color: var(--brand); background: #eff6ff; }
.fee-toolbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 148px)) minmax(0, 220px) 168px;
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  overflow: visible;
}
.fee-toolbar label {
  min-width: 0;
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.fee-toolbar input,
.fee-toolbar select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  color: var(--text);
  font: inherit;
}
.fee-toolbar-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 10px;
  min-width: 168px;
}
.fee-toolbar .primary-btn,
.fee-toolbar .fee-reset-btn {
  flex: 1 1 0;
  width: auto;
  min-height: 38px;
  white-space: nowrap;
}
.fee-toolbar .fee-reset-btn {
  border-color: #cbd5e1;
  color: #475569;
  background: #fff;
}
.fee-toolbar .fee-reset-btn:hover { border-color: var(--brand); color: var(--brand); }
.fee-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}
.fee-grid > .fee-panel {
  min-width: 0;
  height: 700px;
  overflow: hidden;
}
.fee-grid > .fee-panel:first-child {
  display: flex;
  flex-direction: column;
}
.fee-monthly-summary {
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.fee-summary-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #f8fbff;
}
.fee-summary-total div,
.fee-summary-row div,
.fee-summary-empty { display: grid; gap: 4px; }
.fee-summary-total span { color: var(--text); font-size: 14px; font-weight: 800; }
.fee-summary-total small,
.fee-summary-row small,
.fee-summary-empty small { color: var(--muted); font-size: 11px; }
.fee-summary-total strong {
  color: var(--brand);
  font-size: 23px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.fee-summary-breakdown {
  max-height: 244px;
  overflow-y: auto;
}
.fee-summary-row {
  min-height: 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px;
  gap: 16px;
  align-items: center;
  padding: 10px 16px;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.fee-summary-row:last-child { border-bottom: 0; }
.fee-summary-row:hover { background: #f8fbff; }
.fee-summary-row span { color: var(--text); font-size: 13px; font-weight: 700; }
.fee-summary-row small {
  color: var(--muted);
  font-size: 11px;
  text-align: left;
  white-space: nowrap;
}
.fee-summary-row strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.fee-summary-empty { padding: 18px 16px; }
.fee-progress-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.fee-task-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.fee-progress-list div,
.fee-progress-list a,
.fee-task-list div,
.fee-task-list a {
  min-height: 68px;
  display: grid;
  gap: 4px;
  align-content: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}
.fee-progress-list a {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  position: relative;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  background: linear-gradient(180deg, #fff, #f8fafc);
}
.fee-progress-list a span,
.fee-progress-list a small { grid-column: 1 / 2; }
.fee-progress-list a strong { grid-column: 2 / 3; grid-row: 1 / 3; align-self: center; }
.fee-progress-list a:hover { border-color: rgba(37,99,235,.35); background: #f1f5ff; }
.fee-progress-list a i {
  grid-column: 1 / -1;
  display: block;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), #60a5fa);
  opacity: .82;
  margin-top: 6px;
}
.fee-progress-list span,
.fee-task-list span,
.fee-progress-list small {
  color: var(--muted);
  font-size: 12px;
}
.fee-progress-list strong,
.fee-task-list strong {
  color: var(--text);
  font-size: 18px;
}
.fee-contract-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.fee-contract-card {
  color: inherit;
  text-decoration: none;
}
.fee-contract-card:hover { border-color: rgba(37,99,235,.35); background: #f1f5ff; }
.fee-contract-card.active {
  border-color: rgba(37,99,235,.55);
  background: #eff6ff;
  box-shadow: inset 3px 0 0 var(--brand);
}
.fee-contract-title strong { min-width: 0; font-size: 15px; }
.fee-contract-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-top: 2px;
}
.fee-contract-meta b { color: var(--brand); font-size: 15px; }
.fee-contract-meta small { color: var(--muted); font-size: 12px; }
.fee-inline-detail {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.fee-panel > h3,
.fee-inline-head h3,
.fee-contract-panel-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.3;
}
.fee-detail-contract,
.fee-contract-panel-head > div span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}
.fee-inline-head,
.fee-contract-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.fee-inline-head > span,
.fee-contract-panel-head b {
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
}
.fee-bill-list {
  flex: 1;
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 8px;
  margin-top: 12px;
  overflow-y: auto;
  padding-right: 4px;
}
.fee-bill-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}
.fee-bill-list article div { display: grid; gap: 4px; }
.fee-bill-list article strong { font-size: 13px; color: var(--text); }
.fee-bill-list article span { font-size: 11px; color: var(--muted); }
.fee-bill-value { text-align: right; }
.fee-bill-value b { color: var(--brand); font-size: 15px; font-variant-numeric: tabular-nums; }
.fee-contract-panel {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.fee-contract-panel-head > div span { color: var(--muted); font-size: 12px; }
.fee-contract-list {
  flex: 1;
  min-height: 0;
  margin-top: 12px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.fee-contract-columns {
  position: sticky;
  top: 0;
  z-index: 2;
}
.fee-contract-columns,
.fee-contract-row {
  display: grid;
  grid-template-columns: 64px 128px minmax(150px, 1fr) 96px;
  gap: 12px;
  align-items: center;
}
.fee-contract-columns {
  padding: 9px 12px;
  color: var(--muted);
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  font-weight: 800;
}
.fee-contract-row {
  min-height: 52px;
  padding: 8px 12px;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.fee-contract-row:last-child { border-bottom: 0; }
.fee-contract-row:hover { background: #f8fbff; }
.fee-contract-row.active { background: #eff6ff; box-shadow: inset 3px 0 0 var(--brand); }
.fee-contract-row .fee-zone {
  width: fit-content;
  padding: 3px 7px;
  border-radius: 4px;
  color: #1d4ed8;
  background: #dbeafe;
  font-size: 12px;
  font-weight: 800;
}
.fee-contract-row .fee-unit { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.fee-contract-row .fee-unit b { font-size: 12px; color: var(--text); }
.fee-contract-row .fee-unit small { overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: 11px; white-space: nowrap; }
.fee-contract-row strong { overflow: hidden; text-overflow: ellipsis; font-size: 13px; white-space: nowrap; }
.fee-contract-row code { color: #475569; font: 12px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; }
.fee-contract-meta { display: grid; justify-items: end; gap: 4px; min-width: 0; }
.fee-status-pill {
  display: inline-flex; align-items: center; min-height: 20px; padding: 0 7px;
  border-radius: 999px; font-size: 11px; font-weight: 800; white-space: nowrap;
}
.fee-status-pill.unpaid { color: #b42318; background: #fee4e2; }
.fee-status-pill.paid { color: #08734d; background: #e8f7f0; }
.fee-contract-row.has-unpaid { background: #fff8f7; }
.fee-contract-row.has-unpaid:hover { background: #fff1f0; }
.fee-contract-row.has-unpaid.active { background: #fff1f0; box-shadow: inset 3px 0 0 #f04438; }
.fee-bill-list article.bill-unpaid { border-color: rgba(240, 68, 56, .18); background: #fff8f7; }
.fee-bill-list article.bill-paid { border-color: rgba(8, 115, 77, .12); background: #f7fcf9; }
.fee-bill-status.unpaid { color: #b42318; font-weight: 700; }
.fee-bill-status.paid { color: #08734d; font-weight: 700; }
.fee-detail-empty {
  margin-top: 12px;
  min-height: 132px;
  display: grid;
  place-content: center;
  gap: 6px;
  text-align: center;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
}
.fee-detail-empty strong { color: var(--text); font-size: 15px; }
.fee-detail-empty span { color: var(--muted); font-size: 13px; }
.fee-table-wrap {
  margin-top: 12px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.fee-table-wrap::-webkit-scrollbar { height: 10px; }
.fee-table-wrap::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 999px; }
.fee-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
  background: #fff;
}
.fee-table th,
.fee-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 13px;
  white-space: nowrap;
}
.fee-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--muted);
  background: #f8fafc;
  font-weight: 800;
}
.fee-table th:nth-child(7),
.fee-table th:nth-child(8),
.fee-table th:nth-child(9),
.fee-table td:nth-child(7),
.fee-table td:nth-child(8),
.fee-table td:nth-child(9) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.fee-table th:nth-child(10),
.fee-table td:nth-child(10) { text-align: center; }
.fee-table tr:last-child td { border-bottom: 0; }
.fee-table .empty-cell {
  color: var(--muted);
  text-align: center;
  padding: 28px 14px;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--orange);
  background: #fff7ed;
  border: 1px solid rgba(217,119,6,.25);
  font-size: 12px;
  font-weight: 800;
}
.rank-panel h3 {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.3;
}
.mini-rank-list,
.table-rank-list {
  display: grid;
  gap: 10px;
}
.mini-rank-item {
  display: grid;
  gap: 6px;
}
.mini-rank-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}
.mini-rank-head strong { color: var(--text); }
.mini-rank-head span { color: var(--muted); font-variant-numeric: tabular-nums; }
.mini-rank-bar {
  height: 8px;
  border-radius: 999px;
  background: #eef2f7;
  overflow: hidden;
}
.mini-rank-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), #65a3ff);
}
.mini-rank-meta { color: var(--muted); font-size: 12px; }
.table-rank-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #edf2f7;
}
.table-rank-row:last-child { border-bottom: 0; }
.table-rank-name {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.table-rank-name strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}
.table-rank-name span,
.table-rank-value span {
  color: var(--muted);
  font-size: 12px;
}
.table-rank-value {
  text-align: right;
  display: grid;
  gap: 4px;
  font-variant-numeric: tabular-nums;
}
.table-rank-value strong { color: var(--brand); font-size: 13px; }
.watch-panel { margin-top: 16px; background: #fff; }
.asset-section { margin-top: 18px; }
.asset-empty {
  margin-top: 16px;
  padding: 18px;
  border: 1px dashed rgba(100,112,134,.35);
  border-radius: 8px;
  background: #f8fafc;
  display: grid;
  gap: 8px;
}
.asset-empty strong { color: var(--text); font-size: 15px; }
.asset-empty span { color: var(--muted); font-size: 13px; line-height: 1.55; }
.toggle-buttons {
  display: flex;
  gap: 6px;
}
.toggle-btn {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.toggle-btn.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.toggle-btn:hover:not(.active) {
  background: #f8fafc;
}

.chart-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 18px;
}
.panel { padding: 18px; min-width: 0; }
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.panel-head span { color: var(--muted); font-size: 13px; }
.chart-box { height: 320px; position: relative; }

.rank-list { display: grid; gap: 12px; padding-top: 2px; }
.rank-item { display: grid; grid-template-columns: 92px 1fr 88px; gap: 10px; align-items: center; font-size: 13px; }
.rank-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-track { height: 12px; background: #edf2f7; border-radius: 999px; overflow: hidden; }
.rank-fill { height: 100%; min-width: 3px; background: linear-gradient(90deg, #146ef5, #0f9f6e); border-radius: 999px; }
.rank-value { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }

.admin-page-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.admin-page-intro > strong { color: var(--brand); font-size: 18px; }
.admin-workspace { width: min(1320px, calc(100% - 40px)); margin: 22px auto 40px; display: grid; gap: 18px; }
.admin-tool-panel, .admin-merchant-panel, .admin-upload-panel { margin: 0; }
.admin-tool-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.admin-tool-group { padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: #f8fafc; }
.admin-tool-group h3 { margin: 0 0 12px; font-size: 15px; }
.admin-tool-group .import-tools { margin: 0; }
.admin-merchant-panel .merchant-editor { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.admin-merchant-panel .form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.admin-merchant-panel .merchant-card input,
.admin-merchant-panel .merchant-card textarea { min-width: 0; }
.admin-merchant-panel .merchant-title > div { min-width: 0; }
.admin-merchant-panel .merchant-title strong,
.admin-merchant-panel .merchant-title span { overflow-wrap: anywhere; }
.admin-upload-workspace { grid-template-columns: minmax(0, 1180px); justify-content: center; }
.admin-upload-panel { min-height: 0; }
.sales-import-summary { margin-top: 16px; padding: 15px; border: 1px solid #cfe0f4; border-radius: 8px; background: #f7fbff; }
.sales-import-summary-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.sales-import-summary-head > div { display: grid; gap: 3px; }
.sales-import-summary-head strong { color: var(--text); font-size: 15px; }
.sales-import-summary-head span, .sales-import-summary-head em { color: var(--muted); font-size: 12px; font-style: normal; }
.sales-import-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sales-import-summary-grid article { display: grid; gap: 5px; min-width: 0; padding: 12px; border: 1px solid #dde8f4; border-radius: 7px; background: #fff; }
.sales-import-summary-grid article span { color: var(--muted); font-size: 12px; }
.sales-import-summary-grid article strong { overflow-wrap: anywhere; color: #183b64; font-size: 17px; font-variant-numeric: tabular-nums; }
.sales-import-summary-grid .sales-import-refund strong { color: #b42318; }
.sales-import-summary > p { margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.sales-anomaly-panel { margin-top: 16px; border: 1px solid #f2c66d; border-radius: 7px; overflow: hidden; background: #fffdf5; }
.sales-anomaly-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 12px 14px; border-bottom: 1px solid #f2d89d; }
.sales-anomaly-head strong { color: #8a4b08; font-size: 14px; }
.sales-anomaly-head span { color: #7c5a2d; font-size: 12px; }
.sales-anomaly-table-wrap { overflow-x: auto; }
.sales-anomaly-table { width: 100%; min-width: 980px; border-collapse: collapse; font-size: 12px; }
.sales-anomaly-table th, .sales-anomaly-table td { padding: 9px 10px; border-bottom: 1px solid #f4e4bd; text-align: left; white-space: nowrap; }
.sales-anomaly-table th { color: #68400f; background: #fff7df; font-weight: 800; }
.sales-anomaly-table tbody tr:last-child td { border-bottom: 0; }
.sales-anomaly-error { background: #fff4f4; }
.sales-anomaly-status { display: inline-block; color: #7a3f00; font-weight: 800; }
.sales-anomaly-error .sales-anomaly-status { color: #b42318; }
.admin-upload-form { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.admin-upload-form form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.admin-file-field { display: grid; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 700; }
.admin-file-field input { width: 100%; min-height: 42px; padding: 7px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }

.user-admin-grid { width: min(1320px, calc(100% - 40px)); margin: 22px auto 18px; display: grid; grid-template-columns: minmax(280px, .38fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.admin-message { width: min(1320px, calc(100% - 40px)); margin: 18px auto 0; }
.user-create-form { display: grid; gap: 13px; }
.user-create-form label, .access-log-filters label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 700; }
.user-create-form input, .user-create-form select, .inline-password-form input, .user-default-home-form select, .access-log-filters input, .access-log-filters select { width: 100%; min-height: 38px; border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; color: var(--text); background: #fff; font: inherit; }
.user-account-list { display: grid; gap: 10px; }
.user-account-row { display: grid; grid-template-columns: minmax(130px, .7fr) auto minmax(180px, .85fr) minmax(210px, 1fr) minmax(250px, 1.2fr) auto; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.user-account-identity strong, .user-account-identity span, .user-account-dates span { display: block; }
.user-account-identity span, .user-account-dates { color: var(--muted); font-size: 12px; line-height: 1.55; }
.status-pill { padding: 4px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.status-active { color: #08734d; background: #e8f7f0; }
.status-disabled { color: #a11b35; background: #fff0f3; }
.inline-password-form { display: grid; grid-template-columns: minmax(140px, 1fr) auto; gap: 8px; }
.user-default-home-form { display: grid; grid-template-columns: minmax(130px, 1fr) auto; gap: 8px; align-items: end; }
.user-default-home-form label { display: grid; gap: 4px; color: var(--muted); font-size: 12px; font-weight: 700; }
.danger-btn { min-height: 36px; padding: 7px 12px; border: 1px solid #fecdd3; border-radius: 6px; color: #be123c; background: #fff1f2; font: inherit; font-weight: 700; cursor: pointer; }
.access-log-panel { width: min(1320px, calc(100% - 40px)); margin: 0 auto 40px; }
.access-log-filters { display: grid; grid-template-columns: minmax(190px, 1fr) repeat(2, minmax(150px, .65fr)) auto auto; align-items: end; gap: 10px; margin-bottom: 14px; }
.access-log-table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 6px; }
.access-log-table td { vertical-align: top; }
.access-log-table td:nth-child(2) span { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.access-log-table code { color: #174d86; background: #eff6ff; padding: 3px 6px; border-radius: 4px; }
.user-agent-cell { max-width: 340px; overflow: hidden; text-overflow: ellipsis; }
.empty-state { padding: 28px; color: var(--muted); text-align: center; }
.date-filter { display: flex; align-items: end; gap: 10px; }
.date-filter label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; }
.date-filter input { min-height: 40px; border: 1px solid var(--line); border-radius: 6px; padding: 0 10px; color: var(--text); background: #fff; }
.admin-sales-detail .data-table td:nth-child(2), .admin-sales-detail .data-table td:nth-child(3) { text-align: right; }
.sales-fill-overview { margin-bottom: 18px; }
.sales-fill-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.sales-fill-kpis > div { display: grid; gap: 6px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: #f8fafc; }
.sales-fill-kpis span { color: var(--muted); font-size: 12px; }
.sales-fill-kpis strong { color: var(--text); font-size: 22px; font-variant-numeric: tabular-nums; }
.sales-fill-kpis .is-missing { border-color: #f9c9c3; background: #fff6f5; }
.sales-fill-kpis .is-missing strong { color: #b42318; }
.sales-fill-missing-list { margin-top: 14px; }
.sales-fill-missing-list .table-wrap { max-height: 360px; }
.sales-fill-missing-list .data-table td:last-child { white-space: nowrap; }
.sales-fill-missing-list .missing-streak-row.level-2 { background: #fff8f1; }
.sales-fill-missing-list .missing-streak-row.level-3 { background: #fff1f0; }
@media (max-width: 700px) { .sales-fill-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .date-filter { width: 100%; } .date-filter label { flex: 1; } }

@media (max-width: 1100px) {
  .user-admin-grid { grid-template-columns: 1fr; }
  .user-account-row { grid-template-columns: minmax(140px, 1fr) auto minmax(220px, 1fr); }
  .user-default-home-form { grid-column: 1 / 3; }
  .inline-password-form { grid-column: 1 / 3; }
  .access-log-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .user-account-row { grid-template-columns: minmax(0, 1fr) auto; }
  .user-account-dates, .user-default-home-form, .inline-password-form { grid-column: 1 / -1; }
  .user-account-row > form:last-child { grid-column: 1 / -1; }
  .user-account-row > form:last-child button { width: 100%; }
}

@media (max-width: 900px) {
  .auth-gate-banner { align-items: stretch; flex-direction: column; }
  .auth-gate-banner .primary-btn { width: 100%; text-align: center; }
  .missing-report-banner { align-items: stretch; flex-direction: column; }
  .missing-report-actions { width: 100%; }
  .missing-report-actions button,
  .missing-report-actions .secondary-btn { flex: 1; text-align: center; }
  .missing-report-row { grid-template-columns: 1fr 1fr; }
  .admin-tool-grid, .admin-merchant-panel .merchant-editor { grid-template-columns: 1fr; }
  .admin-merchant-panel .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sales-import-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-upload-form form { grid-template-columns: 1fr; }
  .admin-upload-form form .primary-btn { width: 100%; }
}
@media (max-width: 560px) {
  .revenue-day-average-card { grid-template-columns: 1fr; }
  .revenue-day-average-card > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .revenue-day-average-card dl > div { padding: 11px 9px; }
  .revenue-day-average-card dd { font-size: 14px; }
  .sales-import-summary-head { flex-direction: column; gap: 6px; }
  .sales-import-summary-grid { grid-template-columns: 1fr; }
  .admin-page-intro { align-items: flex-start; flex-direction: column; }
  .admin-workspace { width: min(100% - 24px, 1320px); }
  .admin-merchant-panel .form-grid { grid-template-columns: 1fr; }
}

.table-panel { margin-top: 18px; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 6px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: var(--muted); font-weight: 600; background: #f8fafc; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr:hover { background: #f8fbff; }

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background:
    radial-gradient(circle at top right, rgba(20,110,245,.10), transparent 34%),
    radial-gradient(circle at bottom left, rgba(15,159,110,.08), transparent 30%),
    linear-gradient(180deg, #f7f9fc 0%, #eef3f9 100%);
}
.login-wrap {
  width: min(440px, calc(100vw - 32px));
  padding: 0;
}
.login-card {
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(226,232,240,.95);
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(18, 32, 55, 0.10);
  padding: 28px;
  display: grid;
  gap: 16px;
  backdrop-filter: blur(10px);
}
.login-card h1 {
  margin: 0;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: 0;
}
.login-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.login-brand {
  display: grid;
  gap: 14px;
  padding-bottom: 4px;
  border-bottom: 1px solid #edf2f7;
}
.login-brand img {
  width: min(220px, 100%);
  height: 48px;
  object-fit: contain;
  object-position: left center;
}
.login-brand-copy {
  display: grid;
  gap: 6px;
}
.login-brand-copy .eyebrow {
  margin-bottom: 0;
}
.login-fields {
  display: grid;
  gap: 14px;
}
.login-card label,
.merchant-card label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.login-card input,
.merchant-card input,
.merchant-card textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  min-height: 44px;
  padding: 10px 12px;
  font: inherit;
  color: var(--text);
  background: #fff;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.login-card input::placeholder {
  color: #94a3b8;
}
.login-card input:hover {
  border-color: #cbd5e1;
}
.login-card input:focus {
  outline: none;
  border-color: rgba(20,110,245,.55);
  box-shadow: 0 0 0 4px rgba(20,110,245,.12);
  background: #fcfdff;
}
.login-card textarea,
.merchant-card textarea { resize: vertical; }
.remember-device-row {
  display: flex !important;
  grid-template-columns: none;
  align-items: center;
  gap: 10px !important;
  cursor: pointer;
}
.remember-device-row input {
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 0;
  padding: 0;
  accent-color: var(--brand);
}
.remember-device-row > span { display: grid; gap: 2px; }
.remember-device-row strong { color: var(--text); font-size: 13px; }
.remember-device-row small { color: var(--muted); font-size: 11px; font-weight: 500; }
.login-submit {
  width: 100%;
  min-height: 44px;
  border-radius: 999px;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(20,110,245,.18);
}
.login-feature-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 2px;
  padding-top: 14px;
  border-top: 1px solid #edf2f7;
}
.login-feature-list span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border: 1px solid #dbe7f5;
  border-radius: 999px;
  background: linear-gradient(180deg, #f8fbff, #f3f8ff);
  color: #3f5d7d;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.success-box {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
}
.error-box {
  background: #fff1f2;
  color: #be123c;
  border: 1px solid #fecdd3;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
}
.plain-link {
  color: var(--muted);
  text-align: center;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}
.plain-link:hover {
  color: var(--brand);
}
.session-expiry-notice {
  position: fixed;
  z-index: 260;
  right: 24px;
  bottom: 24px;
  width: min(360px, calc(100vw - 32px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid #f1d18a;
  border-radius: 8px;
  background: #fffdf7;
  box-shadow: 0 14px 34px rgba(15,30,60,.16);
}
.session-expiry-notice > div { display: grid; gap: 3px; min-width: 0; }
.session-expiry-notice strong { color: var(--text); font-size: 14px; }
.session-expiry-notice small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.session-expiry-notice button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: var(--brand);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.session-expiry-actions { display: flex; align-items: center; gap: 6px; }
.session-expiry-notice .session-dismiss {
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
}
.session-expiry-notice button:disabled { opacity: .7; cursor: wait; }
.page-load-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid #f0c36d;
  border-left: 4px solid #d97706;
  border-radius: 6px;
  background: #fffaf0;
  color: var(--text);
}
.page-load-error > div { display: grid; gap: 2px; min-width: 0; }
.page-load-error strong { font-size: 14px; }
.page-load-error small { color: var(--muted); font-size: 12px; line-height: 1.45; }
.page-load-error button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #d97706;
  border-radius: 6px;
  background: #fff;
  color: #9a4d00;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.page-load-error button:disabled { opacity: .65; cursor: wait; }
@media (max-width: 560px) {
  .page-load-error { align-items: flex-start; margin-bottom: 12px; }
  .page-load-error button { min-width: 64px; }
}
@media (max-width: 560px) {
  .session-expiry-notice {
    right: 16px;
    bottom: calc(88px + env(safe-area-inset-bottom));
    left: 16px;
    width: auto;
  }
}
@media (max-width: 560px) {
  .login-page { padding: 16px 12px; align-items: start; }
  .login-wrap { width: min(100%, 440px); margin-top: 24px; }
  .login-card { padding: 22px 18px; border-radius: 12px; gap: 14px; }
  .login-brand img { width: min(190px, 100%); height: 42px; }
  .login-card h1 { font-size: 23px; }
  .login-feature-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.merchant-editor { display: grid; gap: 14px; }
.import-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.import-tools form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0; }
.import-tools input[type="file"] { border: 1px solid var(--line); border-radius: 6px; padding: 8px; background: #fff; }
.merchant-card { border: 1px solid var(--line); border-radius: 8px; padding: 16px; display: grid; gap: 14px; background: #fff; }
.merchant-title { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.merchant-title strong { display: block; font-size: 16px; }
.merchant-title span { color: var(--muted); font-size: 12px; }
.checkline { display: flex !important; grid-template-columns: none; align-items: center; gap: 8px !important; white-space: nowrap; color: var(--text) !important; }
.checkline input { width: auto; min-height: auto; }
.form-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.note-field { display: grid; }
.card-actions { display: flex; justify-content: flex-end; }

@media (max-width: 1200px) {
  .fee-toolbar { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .fee-filter-search { grid-column: span 2; }
  .fee-toolbar-actions { grid-column: span 2; }
}
@media (max-width: 1050px) {
  .fee-grid { grid-template-columns: 1fr; }
  .fee-grid > .fee-panel { height: auto; min-height: 520px; }
  .fee-contract-list { max-height: 620px; }
}
@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .topbar {
    position: static;
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
    backdrop-filter: none;
  }
  main { padding: 14px 12px 28px; }
  .topbar-actions, .admin-actions { align-items: stretch; flex-direction: column; }
  .topbar-brand { align-items: flex-start; flex-direction: column; gap: 8px; }
  .topbar-brand img { width: 210px; height: 50px; }
  .topbar-brand h1 { font-size: 21px; }
  .topbar-brand p { margin-top: 5px; font-size: 12px; line-height: 1.4; }
  .top-nav {
    width: 100%;
    display: flex;
    align-items: stretch;
    gap: 2px;
    padding: 4px;
    overflow: visible;
    border-color: #dbe5f1;
    border-radius: 10px;
    background: #f6f8fb;
    box-shadow: 0 4px 14px rgba(18, 32, 55, .06);
  }
  .top-nav > a,
  .top-nav > .user-menu,
  .top-nav .user-menu summary {
    min-width: 0;
    min-height: 44px;
  }
  .top-nav > a {
    position: relative;
    flex: 1 1 0;
    width: auto;
    padding: 0 4px;
    border: 0;
    border-radius: 7px;
    box-shadow: none;
    font-size: 12px;
    font-weight: 650;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .top-nav > a::after {
    content: '';
    position: absolute;
    right: 12px;
    bottom: 3px;
    left: 12px;
    height: 2px;
    border-radius: 2px;
    background: transparent;
  }
  .top-nav > a.active,
  .top-nav > a:hover {
    border: 0;
    color: var(--brand);
    background: #fff;
    box-shadow: 0 2px 8px rgba(20, 110, 245, .10);
  }
  .top-nav > a.active::after { background: var(--brand); }
  .top-nav > .user-menu {
    position: relative;
    flex: 0 1 92px;
    max-width: 92px;
    margin-left: 2px;
    padding-left: 5px;
    border-left: 1px solid #dbe5f1;
  }
  .top-nav .user-menu summary {
    width: 100%;
    justify-content: center;
    padding: 0 6px;
    overflow: hidden;
    border: 0;
    border-radius: 7px;
    color: #334155;
    background: transparent;
    box-shadow: none;
    font-size: 12px;
    font-weight: 700;
    text-overflow: ellipsis;
  }
  .top-nav .user-menu summary::after {
    content: '⌄';
    flex: 0 0 auto;
    margin-left: 4px;
    font-size: 11px;
    transition: transform .18s ease;
  }
  .top-nav .user-menu[open] summary {
    color: var(--brand);
    background: #fff;
    box-shadow: 0 2px 8px rgba(20, 110, 245, .10);
  }
  .top-nav .user-menu[open] summary::after { transform: rotate(180deg); }
  .top-nav .user-menu-popover {
    position: absolute;
    top: calc(100% + 7px);
    right: 0;
    left: auto;
    width: min(240px, calc(100vw - 24px));
    min-width: 0;
    max-height: min(420px, calc(100dvh - 24px));
    overflow-y: auto;
    z-index: 100;
  }
  .sales-title-row { align-items: stretch; flex-direction: column; }
  .revenue-intro, .revenue-period-bar, .revenue-switch-head { align-items: stretch; flex-direction: column; }
  .revenue-period-controls { width: 100%; justify-items: stretch; }
  .revenue-mode-buttons { width: 100%; display: grid; grid-template-columns: repeat(4, 1fr); }
  .revenue-mode-buttons button { padding-inline: 6px; }
  .revenue-query-fields { width: 100%; align-items: stretch; flex-direction: column; }
  .revenue-query-fields label,
  .revenue-query-fields select,
  .revenue-query-fields input,
  .revenue-query-fields button { width: 100%; min-width: 0; }
  .revenue-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .revenue-day-average-row { grid-template-columns: 1fr; }
  .revenue-analysis-row { grid-template-columns: 1fr; }
  .revenue-insight-strip { align-items: flex-start; flex-direction: column; }
  .revenue-insight-strip span + span::before { display: none; }
  .revenue-switch-head .toggle-buttons { width: 100%; }
  .revenue-switch-head .toggle-btn { flex: 1; }
  .revenue-merchant-actions { width: 100%; justify-content: stretch; }
  .revenue-mom-filters { width: 100%; }
  .revenue-mom-filter { flex: 1; }
  .revenue-mom-trigger { width: 100%; }
  .revenue-mom-menu { left: 0; right: auto; width: 100%; min-width: 170px; }
  .analysis-head { align-items: stretch; flex-direction: column; }
  .analysis-period-tools { align-items: stretch; flex-wrap: wrap; }
  .analysis-period-picker { flex: 1 1 230px; }
  .analysis-period-picker select { width: 100%; min-width: 0; }
  .realtime-side-panel { grid-template-rows: auto 116px; }
  .realtime-side-heading { min-height: 80px; }
  .live-grid, .kpi-grid, .accumulated-grid, .chart-grid, .analysis-summary-grid, .analysis-content-grid, .placeholder-grid, .revenue-grid, .revenue-grid.two-col, .traffic-row, .traffic-history-total-row, .traffic-subgrid, .realtime-traffic-intro, .traffic-flow-layout-compact, .fee-toolbar, .fee-grid { grid-template-columns: 1fr; }
  .realtime-metro-line { grid-template-columns: 1fr; }
  .realtime-metro-card { margin-top: 12px; }
  .fee-filter-search, .fee-toolbar-actions { grid-column: auto; }
  .fee-progress-list { grid-template-columns: 1fr; }
  .fee-contract-columns,
  .fee-contract-row { grid-template-columns: 52px 98px minmax(120px, 1fr) 88px; gap: 8px; }
  .traffic-analysis-head, .traffic-date-fields, .fee-head, .fee-month-form { align-items: stretch; flex-direction: column; }
  .traffic-date-tools { justify-items: stretch; }
  .realtime-traffic-intro { grid-template-columns: 1fr; grid-template-areas: "side" "main" "bottom"; }
  .realtime-traffic-grid { grid-template-areas: "total" "car" "mall" "street"; }
  .realtime-total-card .traffic-row-main,
  .realtime-car-card .traffic-row-main {
    width: 100%;
    height: auto;
    min-height: 114px;
  }
  .realtime-total-card .realtime-compare-box,
  .realtime-car-card .realtime-compare-box {
    gap: 6px;
  }
  .realtime-total-card .realtime-compare-tag,
  .realtime-car-card .realtime-compare-tag {
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 4px;
  }
  .realtime-bottom-stack { width: 100%; }
  .realtime-metro-line { grid-template-columns: 1fr; }
  .ab-connector-panel, .ab-connector-list { grid-template-columns: 1fr; }
  .traffic-network { grid-template-columns: 1fr; }
  .traffic-metro-network { grid-template-columns: 1fr !important; }
  .traffic-network-segment + .traffic-network-segment { border-left: 0; border-top: 1px solid var(--line); }
  .traffic-network-columns,
  .traffic-network-data-row { grid-template-columns: 38px minmax(60px, 1fr) minmax(60px, 1fr) minmax(70px, 1fr); }
  .chart-box { height: 280px; }
  .rank-item { grid-template-columns: 84px 1fr 78px; }
  .form-grid { grid-template-columns: 1fr; }
  .merchant-title { align-items: flex-start; flex-direction: column; }
  h1 { font-size: 23px; }
}

@media (max-width: 380px) {
  .topbar { padding-inline: 12px; }
  .top-nav { gap: 1px; padding: 3px; }
  .top-nav > a { padding-inline: 2px; font-size: 11px; }
  .top-nav > a::after { right: 8px; left: 8px; }
  .top-nav > .user-menu { flex-basis: 76px; max-width: 76px; padding-left: 3px; }
  .top-nav .user-menu summary { padding-inline: 3px; font-size: 11px; }
}


/* ===== Mobile home compact mode ===== */
.mobile-home-shortcuts { display: none; }
.desktop-only-inline { display: inline-flex; }

@media (max-width: 900px) {
  .desktop-only { display: none !important; }
  .desktop-only-inline { display: none !important; }

  /* 登录后首页仍保留实时客流、车流和天气。 */
  .home-main:not(.is-guest) .live-strip.desktop-only {
    display: block !important;
  }

  .mobile-home-shortcuts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 14px;
  }
  .mobile-shortcut-card {
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid #e4edf8;
    border-radius: 12px;
    background: linear-gradient(180deg, #fff, #f7fbff);
    text-decoration: none;
    color: inherit;
    box-shadow: 0 6px 18px rgba(24, 59, 100, .06);
  }
  .mobile-shortcut-card span {
    color: #5b7391;
    font-size: 12px;
    font-weight: 700;
  }
  .mobile-shortcut-card strong {
    color: #183b64;
    font-size: 16px;
  }
  .mobile-shortcut-card small {
    color: #7d93ad;
    font-size: 11px;
  }
  .mobile-shortcut-card:first-child {
    border-color: #f3b0a8;
    background: linear-gradient(180deg, #fff8f7, #fff);
  }
  .mobile-shortcut-card:first-child strong { color: #b42318; }

  /* Keep only sales / traffic / missing heat on phone */
  .home-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .home-kpi-grid > .desktop-kpi { display: none !important; }
  .home-kpi-grid > .kpi.primary,
  .home-kpi-grid > .missing-week-card {
    grid-column: 1 / -1;
  }

  .yesterday-section .section-title h2 { font-size: 18px; }
  .missing-report-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .missing-report-actions .secondary-btn,
  .missing-report-actions button { width: 100%; }
  .missing-report-actions #missingReportExport { grid-column: 1 / -1; }

  .missing-report-row {
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 6px 10px;
  }
  .missing-report-row span:nth-child(3),
  .missing-report-row span:nth-child(4),
  .missing-report-row span:nth-child(5) {
    display: none;
  }
  .missing-report-row strong { grid-column: 2; }

  .week-missing-heat { gap: 3px; }
  .week-heat-cell { min-height: 54px; padding: 4px 2px; }
  .week-heat-cell em { font-size: 10px; }
  .week-heat-cell b { font-size: 11px; }
  .week-heat-cell span { font-size: 13px; }
}


/* Realtime business-hours status */
.realtime-business-banner {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #f5d0a9;
  background: linear-gradient(180deg, #fff8ef, #fff);
  color: #9a3412;
  font-size: 13px;
  font-weight: 700;
}
.realtime-business-banner[data-status="before_open"] {
  border-color: #f5d0a9;
  color: #9a3412;
  background: linear-gradient(180deg, #fff7ed, #fff);
}
.realtime-business-banner[data-status="final"] {
  border-color: #bfdbfe;
  color: #1d4ed8;
  background: linear-gradient(180deg, #eff6ff, #fff);
}
.realtime-traffic-grid.is-before-open .realtime-mall-card strong,
.realtime-traffic-grid.is-before-open .realtime-street-card strong,
.realtime-traffic-grid.is-before-open .realtime-total-card strong.is-status-text,
.realtime-traffic-grid.is-waiting-data .realtime-mall-card strong,
.realtime-traffic-grid.is-waiting-data .realtime-street-card strong,
.realtime-traffic-grid.is-waiting-data .realtime-total-card strong.is-status-text {
  color: #c2410c;
  font-size: 20px;
}
.traffic-row-main strong.is-status-text {
  letter-spacing: 0;
}



.traffic-metro-row {
  border-color: var(--line);
  background: #f8fafc;
}
.traffic-metro-row .traffic-subrow { background: #fff; }


/* Weekly report page */
.weekly-report-page .weekly-kpi-grid { margin-top: 0; }
.weekly-rank-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 16px 0;
}
.weekly-daily-table .revenue-table-head,
.weekly-daily-table .revenue-table-row {
  grid-template-columns: minmax(110px, 1fr) repeat(5, minmax(90px, 1fr)) minmax(120px, 1.1fr);
}
.weekly-report-page .revenue-insight-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}
.weekly-report-page .revenue-insight-strip span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.08);
  color: #166534;
  font-size: 13px;
}
@media (max-width: 900px) {
  .weekly-rank-row { grid-template-columns: 1fr; }
  .weekly-daily-table .revenue-table-head,
  .weekly-daily-table .revenue-table-row {
    grid-template-columns: minmax(90px, 1fr) repeat(3, minmax(70px, 1fr));
  }
  .weekly-daily-table .revenue-table-head span:nth-child(n+5),
  .weekly-daily-table .revenue-table-row span:nth-child(n+5),
  .weekly-daily-table .revenue-table-row strong:nth-child(n+5) { display: none; }
}


/* Weekly report key lines */
.weekly-key-lines { margin: 14px 0 16px; }
.weekly-key-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}
.weekly-key-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 8px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid rgba(20,110,245,.12);
  border-radius: 10px;
  background: linear-gradient(180deg, #f8fbff, #fff);
  color: #0f172a;
  font-size: 14px;
  line-height: 1.55;
}
.weekly-key-list em {
  color: var(--brand);
  font-style: normal;
  font-weight: 800;
}

.parking-workspace-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 14px;
}
.parking-workspace-copy h2 { margin: 3px 0 5px; font-size: 28px; letter-spacing: -.03em; }
.parking-workspace-copy p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.parking-sync-badge {
  min-width: 250px;
  display: grid;
  gap: 3px;
  padding: 11px 14px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  background: #f8fafc;
}
.parking-sync-badge span,
.parking-sync-badge small { color: var(--muted); font-size: 11px; }
.parking-sync-badge strong { color: var(--text); font-size: 13px; font-variant-numeric: tabular-nums; }
.parking-subnav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}
.parking-subnav a {
  min-width: 0;
  min-height: 54px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 7px 14px;
  border-radius: 7px;
  color: var(--muted);
  text-decoration: none;
}
.parking-subnav a strong { color: var(--text); font-size: 13px; }
.parking-subnav a span { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.parking-subnav a:hover { background: #f3f7fb; }
.parking-subnav a.active { background: var(--brand); box-shadow: 0 5px 14px rgba(20,91,161,.18); }
.parking-subnav a.active strong { color: #fff; }
.parking-subnav a.active span { color: rgba(255,255,255,.78); }

.revenue-subnav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 16px;
  background: transparent;
  border: none;
  padding: 0;
}
.revenue-subnav a {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.15s ease;
}
.revenue-subnav a strong {
  font-size: 14px;
  color: var(--text);
  font-weight: 700;
}
.revenue-subnav a span {
  font-size: 12px;
  color: var(--muted);
}
.revenue-subnav a:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}
.revenue-subnav a.active {
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: 0 4px 14px rgba(20,110,245,.2);
}
.revenue-subnav a.active strong {
  color: #fff;
}
.revenue-subnav a.active span {
  color: rgba(255,255,255,.8);
}

.revenue-type-toggle {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  height: 36px;
  box-sizing: border-box;
  align-items: center;
}
.revenue-type-toggle button {
  border: 0;
  border-radius: 6px;
  padding: 0 14px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  height: 28px;
  line-height: 28px;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.revenue-type-toggle button.active {
  background: #fff;
  color: var(--brand);
  box-shadow: 0 1px 5px rgba(15, 23, 42, .12);
}

#revenueMerchantControlField {
  display: grid;
  gap: 6px;
  width: 240px;
}
#revenueMerchantControlField span, #revenueMerchantTypeField span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
#revenueFormalMerchantInput, #revenueTemporaryMerchantSelect {
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  padding: 0 10px;
  font-size: 13px;
  width: 240px;
  box-sizing: border-box;
}

.temporary-day-average-row .revenue-day-average-card dl {
  grid-template-columns: 1fr;
}
.temporary-day-average-row .revenue-day-average-card dl > div:nth-child(2),
.temporary-day-average-row .revenue-day-average-card dl > div:nth-child(3) {
  display: none !important;
}

.parking-filter-panel { display: grid; grid-template-columns: minmax(180px, 1fr) auto; align-items: end; gap: 24px; margin-bottom: 16px; padding: 14px 16px; }
.parking-filter-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 0; }
.parking-filter-head h3 { margin: 2px 0 0; font-size: 16px; }
.parking-filter-head > span { color: var(--muted); font-size: 12px; }
.parking-page-intro { align-items: end; }
.parking-filter [hidden] { display: none !important; }
.parking-filter {
  display: grid;
  grid-template-columns: 150px minmax(260px, 360px) auto;
  gap: 10px;
  align-items: end;
}
.parking-filter label { display: grid; gap: 6px; min-width: 0; }
.parking-filter label span { color: var(--muted); font-size: 12px; font-weight: 700; }
.parking-filter input,
.parking-filter select {
  width: 100%;
  min-width: 0;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  padding: 0 10px;
}
.parking-filter button { height: 36px; white-space: nowrap; }
.parking-scope-field { width: 112px; }
.parking-mode-buttons {
  align-self: end;
  width: 112px;
  height: 36px;
  box-sizing: border-box;
  overflow: hidden;
}
.parking-mode-buttons button {
  min-width: 0;
  height: 28px;
  flex: 1;
  padding: 0;
  line-height: 28px;
  box-shadow: none;
}
.parking-mode-buttons button.active {
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .03);
}
.parking-jparking-filter,
.parking-member-filter,
.parking-binding-filter { display: flex; align-items: flex-end; justify-content: flex-end; flex-wrap: nowrap; }
.parking-date-field,
.parking-month-field { width: 158px; flex: 0 0 158px; }
.parking-jparking-filter > label:not(.parking-scope-field):not(.parking-date-field):not(.parking-month-field) { width: 320px; flex: 0 1 320px; }
.parking-binding-filter > label:not(.parking-scope-field):not(.parking-date-field):not(.parking-month-field) { width: 190px; flex: 0 1 190px; }
.parking-binding-filter > label:nth-of-type(4) { width: 160px; flex-basis: 160px; }
.parking-filter-actions { display: flex; flex: 0 0 auto; flex-wrap: nowrap; gap: 8px; }
.parking-filter-actions > * { min-width: 68px; flex: 0 0 auto; padding: 0 16px; }
.parking-filter-actions .primary-btn { min-width: 80px; }
.parking-filter-actions .parking-filter-reset { min-width: 60px; padding: 0 12px; color: var(--muted); }
.parking-filter-reset { height: 36px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.parking-error { margin: 0 0 16px; }
.parking-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.parking-kpi {
  min-width: 0;
  min-height: 112px;
  display: grid;
  align-content: space-between;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(31,55,78,.035);
}
.parking-kpi > span { color: var(--muted); font-size: 12px; font-weight: 700; }
.parking-kpi strong { color: var(--text); font-size: 24px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.parking-kpi strong em { margin-left: 2px; margin-right: 2px; color: var(--muted); font-size: 12px; font-style: normal; font-weight: 700; }
.parking-kpi small { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.parking-kpi-pending { border-left-color: #d97706; }
.parking-kpi-primary { border-color: #bfd7ef; border-left-color: var(--brand); background: linear-gradient(145deg, #fff, #f3f8fd); }
.parking-kpi-clear-amount { border-left-color: #10b981; background: linear-gradient(145deg, #fff, #f0fdf4); }
.parking-kpi-clear-amount strong { color: #059669; }
.parking-day-type-section {
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}
.parking-day-type-head,
.parking-day-type-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.parking-day-type-head { margin-bottom: 12px; }
.parking-day-type-head h2 { margin: 2px 0 0; font-size: 18px; }
.parking-day-type-head > span { color: var(--muted); font-size: 12px; text-align: right; }
.parking-day-type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.parking-day-type-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 3px solid #2563eb;
  border-radius: 6px;
  background: #f8fafc;
}
.parking-day-type-holiday { border-left-color: #d97706; }
.parking-day-type-title strong { font-size: 15px; }
.parking-day-type-title span { color: var(--muted); font-size: 12px; font-weight: 700; }
.parking-day-type-card dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0 0;
}
.parking-day-type-card dl div { min-width: 0; }
.parking-day-type-card dt { color: var(--muted); font-size: 12px; }
.parking-day-type-card dd { margin: 5px 0 0; color: var(--text); font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.parking-detail-panel { padding: 16px; }
.parking-table-wrap {
  margin-top: 12px;
  overflow: auto;
  max-height: 620px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.parking-table { min-width: 1180px; }
.parking-table thead th { position: sticky; top: 0; z-index: 2; background: #f2f6fa; box-shadow: inset 0 -1px var(--line); }
.parking-table tbody tr:nth-child(even) td { background: #fbfcfd; }
.parking-table tbody tr:hover td { background: #eef6ff; }
.parking-table th:first-child,
.parking-table td:first-child { position: sticky; left: 0; z-index: 1; background: #fff; box-shadow: 1px 0 var(--line); }
.parking-table thead th:first-child { z-index: 3; background: #f2f6fa; }
.parking-table tbody tr:nth-child(even) td:first-child { background: #fbfcfd; }
.parking-table tbody tr:hover td:first-child { background: #eef6ff; }
.parking-table td:not(:first-child),
.parking-table th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.parking-table td:last-child,
.parking-table th:last-child { white-space: nowrap; }
.parking-member-empty {
  min-height: 240px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  padding: 32px;
  text-align: center;
}
.parking-member-empty h2 { margin: 0; font-size: 20px; }
.parking-member-empty p { max-width: 560px; margin: 0; color: var(--muted); line-height: 1.7; }
.parking-benefit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.parking-benefit-item {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: 6px;
  background: #f8fafc;
}
.parking-benefit-item span { color: var(--muted); font-size: 12px; font-weight: 700; }
.parking-benefit-item strong { font-size: 17px; font-variant-numeric: tabular-nums; }
.parking-member-table { min-width: 760px; }
.parking-plate-link { color: var(--brand); font-weight: 800; text-decoration: none; }
.parking-plate-link:hover { text-decoration: underline; }
.parking-table tr.is-selected td { background: #eef6ff; }
.parking-member-detail { margin-top: 16px; padding: 16px; }
.parking-detail-close { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.parking-risk-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.parking-risk-summary > div { display: grid; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: #f8fafc; }
.parking-risk-summary span { color: var(--muted); font-size: 12px; font-weight: 700; }
.parking-risk-summary strong { font-size: 17px; font-variant-numeric: tabular-nums; }
.parking-risk-status.risk-normal { border-left: 3px solid #16825d; }
.parking-risk-status.risk-medium { border-left: 3px solid #d97706; }
.parking-risk-status.risk-high { border-left: 3px solid #c2413b; background: #fff7f6; }
.parking-risk-note { margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.parking-member-detail-block { margin-top: 18px; }
.parking-detail-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.parking-detail-heading h3 { margin: 0; font-size: 16px; }
.parking-detail-heading span { color: var(--muted); font-size: 12px; }
.parking-member-detail-table { min-width: 1240px; }
.parking-member-order-table { min-width: 1260px; }
.parking-jparking-detail-table { min-width: 1420px; }
.parking-binding-table { min-width: 1120px; }
.parking-binding-actions { display: flex; align-items: center; gap: 10px; }

/* Member points and sales analysis */
.member-analysis-page { max-width: 1320px; margin: 0 auto; }
.member-analysis-intro { align-items: end; }
.member-analysis-month {
  display: flex;
  align-items: end;
  gap: 8px;
}
.member-analysis-month label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 700; }
.member-analysis-month [hidden] { display: none !important; }
.member-analysis-month .member-mode-field { min-width: 112px; }
.member-mode-buttons { height: 40px; }
.member-mode-buttons button { min-width: 54px; }
.member-analysis-month input {
  width: 170px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  background: #fff;
  color: var(--text);
  font: inherit;
}
.member-data-empty {
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid #d7e3f4;
  border-radius: 8px;
  background: #f8fbff;
}
.member-data-empty h2 { margin-top: 4px; font-size: 18px; }
.member-data-empty p { margin-top: 6px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.member-analysis-section { margin-bottom: 18px; }
.member-analysis-section .section-title { margin-bottom: 10px; }
.member-analysis-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.member-analysis-grid article {
  min-height: 126px;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(18, 32, 55, .05);
}
.member-analysis-grid span { color: var(--muted); font-size: 12px; font-weight: 700; }
.member-analysis-grid strong { color: #183b64; font-size: 25px; line-height: 1.15; }
.member-analysis-grid small { color: #7d8da3; font-size: 11px; line-height: 1.5; }
.member-analysis-placeholder {
  min-height: 150px;
  display: grid;
  place-content: center;
  gap: 7px;
  margin-top: 10px;
  padding: 20px;
  border: 1px dashed #cbd8e8;
  border-radius: 8px;
  background: #fbfcfe;
  text-align: center;
}
.member-analysis-placeholder span { color: #29496f; font-size: 14px; font-weight: 700; }
.member-analysis-placeholder p { max-width: 620px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.member-analysis-rule { margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.member-growth-title { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.member-growth-copy { width: 128px; height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; flex: 0 0 auto; white-space: nowrap; }
.member-growth-copy .copy-label { display: inline-block; width: 48px; text-align: center; }
.member-growth-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}
.member-growth-grid article {
  min-width: 0;
  min-height: 104px;
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(18, 32, 55, .05);
}
.member-growth-grid span { color: var(--muted); font-size: 11px; font-weight: 700; }
.member-growth-grid strong { color: #183b64; font-size: 23px; line-height: 1.15; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.member-growth-grid small { color: #7d8da3; font-size: 10px; }
.member-count-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.member-count-summary article {
  min-width: 0;
  min-height: 112px;
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(18, 32, 55, .05);
}
.member-count-summary span { color: var(--muted); font-size: 12px; font-weight: 700; }
.member-count-summary strong { color: #183b64; font-size: 27px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.member-count-summary small { color: #7d8da3; font-size: 11px; }
.member-month-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.member-month-summary article {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(18, 32, 55, .05);
}
.member-month-summary article > span { color: var(--muted); font-size: 12px; font-weight: 700; }
.member-month-summary article.is-pending { background: #f8fafc; box-shadow: none; }
.member-month-summary article.is-pending > strong { color: #94a3b8; }
.member-month-summary article > strong {
  display: block;
  margin-top: 7px;
  color: #183b64;
  font-size: 22px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.member-month-summary dl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0 0; }
.member-month-summary dl > div { min-width: 0; padding-top: 8px; border-top: 1px solid #edf2f7; }
.member-month-summary dt { color: #7d8da3; font-size: 11px; }
.member-month-summary dd { margin: 4px 0 0; color: #334e70; font-size: 12px; font-weight: 700; overflow-wrap: anywhere; }
.member-month-summary dd small { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; font-weight: 500; }
.member-daily-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.member-daily-table { min-width: 980px; }
.member-daily-table th,
.member-daily-table td { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.member-daily-table th:first-child,
.member-daily-table th:nth-child(2),
.member-daily-table td:first-child,
.member-daily-table td:nth-child(2) { text-align: center; }
.member-daily-table tr.is-weekend td:first-child { color: var(--brand); font-weight: 800; }
.member-daily-table tr.is-incomplete { background: #fff8f1; }
.member-daily-table tr.is-incomplete td:nth-child(5),
.member-daily-table tr.is-incomplete td:nth-child(6) { color: #b54708; }
.member-daily-table td:nth-child(2) small { display: block; color: #b54708; font-size: 10px; font-weight: 700; }
.member-daily-table tbody tr:hover { background: #f8fbff; }
@media (max-width: 900px) {
  .member-analysis-intro { align-items: stretch; flex-direction: column; }
  .member-analysis-month { width: 100%; }
  .member-analysis-month label { flex: 1; }
  .member-analysis-month input { width: 100%; }
  .member-analysis-grid,
  .member-count-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .member-growth-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .member-month-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .member-growth-title { align-items: stretch; flex-direction: column; }
  .member-growth-copy { width: 100%; }
  .member-growth-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .member-analysis-grid,
  .member-count-summary,
  .member-month-summary { grid-template-columns: 1fr; }
  .member-analysis-grid article { min-height: 108px; }
}
.parking-binding-actions .primary-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; text-decoration: none; white-space: nowrap; }

@media (max-width: 1100px) {
  .parking-workspace-head { align-items: stretch; flex-direction: column; gap: 12px; }
  .parking-sync-badge { min-width: 0; }
  .parking-page-intro { align-items: stretch; flex-direction: column; }
  .parking-filter-panel { grid-template-columns: 1fr; gap: 12px; }
  .parking-filter { justify-content: start; }
  .parking-filter { display: grid; grid-template-columns: 150px minmax(220px, 1fr) auto; }
  .parking-jparking-filter > label:not(.parking-scope-field):not(.parking-date-field):not(.parking-month-field),
  .parking-binding-filter > label:not(.parking-scope-field):not(.parking-date-field):not(.parking-month-field),
  .parking-binding-filter > label:nth-of-type(4) { width: auto; flex-basis: auto; }
  .parking-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .parking-workspace-copy h2 { font-size: 24px; }
  .parking-subnav { width: 100%; overflow-x: auto; grid-template-columns: repeat(3, minmax(138px, 1fr)); }
  .parking-subnav a { padding: 7px 10px; }
  .parking-filter-head { align-items: flex-start; flex-direction: column; gap: 4px; }
  .parking-filter { grid-template-columns: 1fr 1fr; }
  .parking-filter label:nth-child(2) { grid-column: 1 / -1; }
  .parking-filter button { width: 100%; }
  .parking-filter-actions { grid-column: 1 / -1; }
  .parking-member-filter { grid-template-columns: 1fr 1fr; }
  .parking-member-filter label { grid-column: 1 / -1; }
  .parking-benefit-grid { grid-template-columns: 1fr; }
  .parking-risk-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .parking-detail-heading { align-items: flex-start; flex-direction: column; }
  .parking-binding-filter { grid-template-columns: 1fr 1fr; }
  .parking-binding-filter label:first-child { grid-column: auto; }
  .parking-binding-actions { align-items: flex-end; flex-direction: column; }
  .parking-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .parking-kpi { min-height: 102px; }
  .parking-kpi strong { font-size: 23px; }
  .parking-day-type-section { padding: 12px; }
  .parking-day-type-head { align-items: flex-start; flex-direction: column; }
  .parking-day-type-head > span { text-align: left; }
  .parking-day-type-grid { grid-template-columns: 1fr; }
  .parking-day-type-card dl { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 8px; }
  .parking-day-type-card dd { font-size: 15px; }
  .parking-detail-panel { padding: 12px; }
  .parking-detail-panel .panel-head { align-items: start; gap: 8px; }
}
