:root {
  --bg: #f3f4f6;
  --surface: #ffffff;
  --muted: #f9fafb;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --ink: #1f2937;
  --ink-muted: #6b7280;
  --ink-secondary: #4b5563;
  --accent: #d81818;
  --save: #10b981;
  --save-hover: #059669;
  --warning: #b45309;
  --navy: #7c818a;
  --radius: 12px;
  --radius-2xl: 16px;
  --shadow: 0 2px 14px rgba(124, 129, 138, 0.07), 0 1px 4px rgba(124, 129, 138, 0.04);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 12px;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
#auth-boot, #auth-screen, #phone-wrap { display: none !important; }
#auth-boot.is-on { display: block !important; padding: 48px 16px; text-align: center; color: var(--ink-muted); }
#auth-screen.is-on {
  display: flex !important;
  min-height: 100vh;
  min-height: 100dvh;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: #f8fafc;
}
#phone-wrap.is-on { display: flex !important; }

.lk-card {
  width: 100%;
  max-width: 420px;
  margin: 0;
  background: #fff;
  border: 1px solid #f1f5f9;
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 20px 25px -5px rgba(226, 232, 240, 0.4), 0 8px 10px -6px rgba(226, 232, 240, 0.4);
}
@media (min-width: 640px) {
  .lk-card { padding: 40px; }
}
.lk-brand {
  margin: 0 0 12px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.lk-card h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #0f172a;
}
.lk-lead {
  margin: 8px 0 32px;
  font-size: 14px;
  line-height: 1.5;
  color: #64748b;
}
#auth-screen .auth-field { margin: 0 0 16px; }
#auth-screen label {
  display: block;
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b;
}
.auth-password-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.auth-password-head label { margin: 0; }
.auth-forgot {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 500;
  color: #059669;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease;
}
.auth-forgot:hover { color: #047857; }
#auth-screen input {
  width: 100%;
  height: auto;
  padding: 12px 16px;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 12px;
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
  color: #0f172a;
  background: #f8fafc;
  transition: background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
#auth-screen input::placeholder { color: #94a3b8; }
#auth-screen input:focus {
  outline: none;
  background: #fff;
  border-color: #e2e8f0;
  box-shadow: 0 0 0 2px #e2e8f0;
}
label {
  display: block;
  margin: 12px 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
input, .search-input {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}
input:focus, .search-input:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(124, 129, 138, 0.12);
}
.auth-error {
  margin: 0;
  min-height: 0;
  color: var(--accent);
  font-size: 13px;
}
.auth-error:not(:empty) { margin-top: 4px; }
.auth-submit {
  width: 100%;
  height: auto;
  margin-top: 16px;
  padding: 12px 16px;
  border: 0;
  border-radius: 12px;
  background: var(--save);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  transition: background 0.15s ease, transform 0.1s ease;
}
.auth-submit:hover { background: var(--save-hover); }
.auth-submit:active { transform: scale(0.98); }

#phone-wrap {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: var(--navy);
}
@media (max-width: 768px) {
  #phone-wrap { padding: 0; background: var(--bg); }
}
.phone {
  position: relative;
  width: 100%;
  max-width: 430px;
  height: 100dvh;
  max-height: 844px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
}
@media (min-width: 769px) {
  .phone {
    border-radius: 28px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.35);
  }
}

.proto-header {
  display: flex;
  align-items: center;
  padding: 20px 16px 12px;
  flex-shrink: 0;
  min-height: 64px;
}
.proto-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-width: 0;
}
.proto-user {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin-right: auto;
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
}
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.avatar.has-art {
  background: #fff;
  color: transparent;
  padding: 0;
  position: relative;
}
.avatar svg,
.avatar img {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}
.avatar img {
  position: absolute;
  inset: 0;
  object-fit: contain;
  object-position: center;
}
.sheet-avatar {
  display: flex;
  justify-content: center;
  margin: 4px 0 12px;
}
.sheet-avatar .avatar {
  width: 56px;
  height: 56px;
  font-size: 18px;
}
.proto-user .who { min-width: 0; }
.proto-user .who b {
  display: block;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.2px;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.proto-user .who small {
  display: block;
  margin-top: 1px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.proto-icons { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.icon-btn {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 0;
  background: #fff;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}
.icon-btn svg { width: 14px; height: 14px; }
.icon-btn:disabled { opacity: 0.55; cursor: default; }
.icon-btn.is-spin svg { animation: lk-spin 0.8s linear infinite; }
@keyframes lk-spin { to { transform: rotate(360deg); } }
.dot-alert {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #ef4444;
  border: 1.5px solid #fff;
}
.dot-live {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 6px;
  height: 6px;
}
.dot-live-ping {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #34d399;
  opacity: 0.75;
  animation: lk-ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}
.dot-live-core {
  position: relative;
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #10b981;
  border: 1.5px solid #fff;
  box-sizing: border-box;
}
.dot-live.is-lag .dot-live-ping { background: #fbbf24; }
.dot-live.is-lag .dot-live-core { background: #f59e0b; }
.dot-live.is-off .dot-live-ping { display: none; }
.dot-live.is-off .dot-live-core { background: #94a3b8; }
@keyframes lk-ping {
  75%, 100% { transform: scale(2.2); opacity: 0; }
}

.proto-title-row { display: none; }
.proto-sub {
  margin: 0;
  font-size: 10px;
  font-weight: 500;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.scope-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: 88px;
  min-width: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 18px;
  background: #fff;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}
.scope-btn svg { width: 12px; height: 12px; flex-shrink: 0; stroke: #64748b; opacity: 1; }
.scope-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.scope-btn.is-static { cursor: default; }

#view { flex: 1; min-height: 0; overflow: auto; padding: 4px 16px 12px; }
#view.is-menu {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}
#view.is-menu > .screen-enter {
  flex: 1;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.screen-enter { min-width: 0; }
.screen-enter--fade {
  animation: screen-fade-in 0.2s ease-out both;
}
.screen-enter--slide {
  animation: screen-slide-in 0.22s ease-out both;
}
@keyframes screen-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes screen-slide-in {
  from {
    opacity: 0;
    transform: translateX(16px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .screen-enter--fade,
  .screen-enter--slide {
    animation: screen-fade-in 0.12s ease-out both;
  }
}

.seg {
  display: flex;
  gap: 2px;
  padding: 4px;
  border: 0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.seg button {
  flex: 1;
  min-width: 0;
  height: auto;
  padding: 6px 2px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #94a3b8;
  font-weight: 600;
  font-size: 10px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.seg button.is-on {
  background: #059669;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 3px 8px rgba(5, 150, 105, 0.2);
}

.kpi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.kpi {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #fff;
  border: 1.5px solid transparent;
  border-radius: 20px;
  padding: 14px;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  min-height: 110px;
  height: 100%;
  position: relative;
  box-shadow: 0 4px 16px rgba(0,0,0,0.02);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.kpi.is-on {
  border-color: #059669;
  box-shadow: 0 8px 20px rgba(5, 150, 105, 0.12);
  transform: translateY(-2px);
}
.kpi.is-on .kpi-title { color: #059669; }
.kpi:active { transform: scale(0.97); }
.kpi-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.kpi-title {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #94a3b8;
  transition: color 0.2s ease;
}
.kpi-info {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #f1f5f9;
  color: #94a3b8;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.kpi-info svg { width: 10px; height: 10px; display: block; }
.kpi-info:hover,
.kpi-info:focus-visible {
  background: #e2e8f0;
  color: #475569;
  outline: none;
}
.kpi-body {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  width: 100%;
  margin-top: auto;
  gap: 8px;
}
.kpi-value-block {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.kpi-value-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 2px;
}
.kpi-value {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.5px;
  line-height: 1.1;
  color: #0f172a;
}
.kpi-subvalue {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
}
.kpi-trend {
  display: flex;
  align-items: center;
  gap: 3px;
  margin: 0;
  font-size: 9px;
  font-weight: 700;
  color: #64748b;
  white-space: nowrap;
}
.kpi-trend svg {
  width: 10px;
  height: 10px;
  stroke-width: 2.5;
  stroke: currentColor;
  fill: none;
  flex-shrink: 0;
}
.kpi-trend-ico-up { transform: rotate(-90deg); }
.kpi-trend.up { color: #059669; }
.kpi-trend.down { color: #e11d48; }
.kpi-trend.blue { color: #2563eb; }
.kpi-mini-chart {
  width: 44px;
  height: 28px;
  flex-shrink: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}
.kpi-mini-ruler {
  width: 44px;
  height: 28px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.mini-ruler-labels {
  display: flex;
  justify-content: space-between;
  font-size: 8px;
  font-weight: 700;
  color: #94a3b8;
  margin-bottom: 4px;
}
.mini-ruler-track {
  width: 100%;
  height: 4px;
  background: #f1f5f9;
  border-radius: 2px;
  position: relative;
  margin-bottom: 2px;
}
.mini-ruler-indicator {
  position: absolute;
  bottom: -2px;
  width: 4px;
  height: 8px;
  background: #2563eb;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(37,99,235,0.3);
}
@media (prefers-reduced-motion: reduce) {
  .kpi, .seg button { transition: none; }
  .kpi.is-on, .kpi:active { transform: none; }
}

.speed-card {
  margin: 16px 0;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: var(--radius-2xl);
  padding: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.speed-card-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0 8px;
  margin-bottom: 16px;
}
.speed-card-title {
  margin: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
}
.speed-card-hint {
  font-size: 9px;
  font-weight: 400;
  text-transform: lowercase;
  color: #94a3b8;
}
.speed-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.speed-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.speed-hour {
  width: 40px;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}
.speed-row.is-jam .speed-hour {
  font-weight: 700;
  color: #f43f5e;
}
.speed-track {
  flex: 1;
  height: 8px;
  background: #f1f5f9;
  border-radius: 9999px;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.speed-row.is-jam .speed-track { background: #ffe4e6; }
.speed-bar {
  height: 100%;
  background: #60a5fa;
  border-radius: 9999px;
  transition: width 0.2s ease;
}
.speed-row.is-jam .speed-bar { background: #f43f5e; }
.speed-val {
  width: auto;
  min-width: 44px;
  flex-shrink: 0;
  text-align: right;
  font-size: 11px;
  font-weight: 700;
  color: #334155;
  font-variant-numeric: tabular-nums;
}
.speed-row.is-jam .speed-val { color: #e11d48; }

.panel {
  margin-top: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: var(--shadow);
}
.panel-title {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}
.group-title {
  margin: 12px 0 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
}
.group-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
}
.detail-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
}
.detail-row span:first-child { color: #64748b; font-size: 12px; }
.detail-row span:last-child { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }

.chart { display: flex; align-items: flex-end; gap: 6px; height: 160px; margin-top: 8px; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; min-width: 0; }
.chart-bar { width: 100%; max-width: 28px; border-radius: 6px 6px 0 0; min-height: 2px; }
.chart-lab { font-size: 10px; font-weight: 600; color: var(--ink-muted); }
.chart-val { font-size: 9px; font-weight: 700; color: #334155; font-variant-numeric: tabular-nums; line-height: 1; }
.panel-note { margin: 0 0 10px; font-size: 11px; color: #64748b; }
.detail-row.is-accent { font-weight: 700; }
.detail-row.is-accent span:first-child { color: #0f172a; font-weight: 700; }

.check-filter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 24px;
}
.check-select-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}
.check-select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.8);
  color: #334155;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 28px 8px 12px;
  border-radius: 8px;
  outline: none;
  cursor: pointer;
}
.check-select:focus { box-shadow: 0 0 0 2px #e2e8f0; }
.check-select-caret {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 10px;
  color: #94a3b8;
}
.check-feed { display: flex; flex-direction: column; }
.check-card {
  display: block;
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 8px;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.6);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.check-card:hover { border-color: #cbd5e1; }
.check-card.is-void { opacity: 0.85; }
.check-card-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.check-card-left {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
}
.check-no {
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  color: #0f172a;
}
.check-meta {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}
.check-meta--end {
  justify-content: flex-end;
  margin-top: 0;
}
.check-meta-sep { color: #cbd5e1; }
.check-meta-item {
  font-weight: 500;
  color: #64748b;
}
.check-meta-station {
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.check-meta-items {
  font-weight: 500;
  color: #94a3b8;
}
.check-speed {
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
}
.check-speed--fast { color: #059669; }
.check-speed--mid { color: #d97706; }
.check-speed--slow { color: #e11d48; }
.check-card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}
.check-amt {
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}
.check-pay-line {
  font-size: 10px;
  font-weight: 500;
  color: #94a3b8;
  white-space: nowrap;
}
.check-kind {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}
.check-kind svg {
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  fill: currentColor;
}
.check-kind.precheck { color: #d97706; }
.check-kind.open { color: #2563eb; }
.check-kind.closed { color: #64748b; }
.check-kind.void { color: #94a3b8; }
.check-summary { margin: 0 0 12px; }
.check-summary .hall-meta-name {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #94a3b8;
}

.bill-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  margin-bottom: 16px;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 24px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.bill-hero .check-kind { margin-bottom: 12px; }
.bill-hero-sum {
  margin: 0 0 4px;
  font-size: 30px;
  font-weight: 900;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}
.bill-hero-no {
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
}
.bill-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 16px;
  row-gap: 20px;
  margin-bottom: 16px;
  padding: 16px;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: var(--radius-2xl);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.bill-meta-cell {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.bill-meta-lab {
  display: block;
  margin-bottom: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
}
.bill-meta-val {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}
.bill-meta-val--fast { color: #059669; font-weight: 700; }
.bill-meta-val--mid { color: #d97706; font-weight: 700; }
.bill-meta-val--slow { color: #e11d48; font-weight: 700; }
.bill-items {
  margin-bottom: 16px;
  padding: 4px 16px 16px;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: var(--radius-2xl);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.bill-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
}
.bill-item:has(+ .bill-item-total) { border-bottom: 0; }
.bill-item-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding-right: 8px;
}
.bill-item-name {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.25;
  color: #0f172a;
}
.bill-item-qty {
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
}
.bill-item-amt {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
  white-space: nowrap;
}
.bill-item-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
}
.bill-item-total span:last-child {
  font-size: 18px;
  font-weight: 900;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.station-load {
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: var(--radius-2xl);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  padding: 16px;
  margin-bottom: 10px;
}
.station-load-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.station-load-name { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 800; color: #0f172a; }
.station-load-status { font-size: 12px; font-weight: 600; color: #94a3b8; }
.station-load-status.is-on { color: #047857; }
.station-load-meta { margin: 8px 0 0; font-size: 12px; color: #64748b; }

.hall-pick { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
.hall-pick::-webkit-scrollbar { display: none; }
.hall-chip {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: #f1f5f9;
  color: #475569;
  font-weight: 500;
  font-size: 12px;
  cursor: pointer;
}
.hall-chip.is-on {
  background: #0f172a;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
}
.hall-chip-count {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.08);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
}
.hall-chip.is-on .hall-chip-count { background: rgba(255, 255, 255, 0.2); }
.hall-meta {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0 12px;
  padding: 0 4px;
}
.hall-meta-name {
  margin: 0;
  min-width: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #334155;
}
.hall-meta-stats {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 8px;
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
}
.hall-meta-sep { color: #cbd5e1; }
.hall-sum {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #1e293b;
}
.hall-block { margin: 0 0 32px; }
.hall-block:last-child { margin-bottom: 0; }
.hall-block.is-split { padding-top: 20px; border-top: 1px solid #f1f5f9; }
.hall-block .hall-meta { margin-top: 16px; }
.hall-block.is-split .hall-meta { margin-top: 0; }

.station-pick { display: flex; gap: 10px; overflow-x: auto; margin: 0 -16px; padding: 0 16px 8px; scrollbar-width: none; }
.station-pick::-webkit-scrollbar { display: none; }
.station-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-weight: 500;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}
.station-chip.is-on {
  background: #059669;
  color: #fff;
  border-color: transparent;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(5, 150, 105, 0.25);
}
.station-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 24px;
  margin: 8px 0 12px;
  padding: 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}
.fiscal-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border: 1px solid #d1fae5;
  border-radius: 6px;
  background: #ecfdf5;
  color: #059669;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}
.fiscal-badge svg { width: 12px; height: 12px; }
.fiscal-badge.is-off { visibility: hidden; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.stat-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 76px;
  padding: 14px;
  border: 1px solid #f1f5f9;
  border-radius: var(--radius-2xl);
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.stat-value {
  margin: 8px 0 0;
  font-size: 18px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.cluster { margin-bottom: 20px; }
.cluster .group-title { margin: 0 0 8px 4px; }

.tables { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.check-tiles { grid-template-columns: 1fr 1fr; margin-top: 4px; }
.table-tile {
  min-height: 76px;
  padding: 10px;
  border-radius: 12px;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.table-tile.free {
  border: 1px dashed #e2e8f0;
  background: rgba(248, 250, 252, 0.7);
  cursor: default;
  opacity: 0.8;
}
.table-tile.busy { border: 1px solid rgba(226, 232, 240, 0.9); background: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04); }
.table-tile.precheck { border: 1px solid #fde68a; background: #fffbeb; }
.table-name { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #64748b; }
.table-tile.precheck .table-name { color: #b45309; }
.table-amt { margin-top: 2px; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.table-tile.precheck .table-amt { color: #451a03; }
.table-meta { margin-top: 6px; font-size: 10px; color: #94a3b8; }
.table-precheck {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.table-precheck svg { width: 12px; height: 12px; flex-shrink: 0; }
.table-tile.precheck .table-meta { color: #d97706; }
.table-tile.free .table-amt { display: none; }

.card-list { overflow: hidden; border: 1px solid rgba(226, 232, 240, 0.9); border-radius: var(--radius-2xl); background: #fff; }
.list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px;
  border: 0;
  border-bottom: 1px solid #f1f5f9;
  background: none;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.card-list .list-row:last-child { border-bottom: 0; }
.row-ico {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: #f8fafc;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.row-ico svg { width: 16px; height: 16px; }
.grow { min-width: 0; flex: 1; }
.row-title { display: block; font-size: 12px; font-weight: 700; }
.row-title.settings-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.row-title.settings-user .avatar {
  width: 28px;
  height: 28px;
  font-size: 10px;
}
.row-sub { display: block; margin-top: 2px; font-size: 10px; color: #94a3b8; }
.row-amt { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.chev { color: #cbd5e1; font-size: 16px; }

.tech-banner { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; font-size: 14px; font-weight: 600; }
.tech-ok { background: #ecfdf5; color: #047857; }
.tech-warn { background: #fffbeb; color: #92400e; }
.tech-err { background: #fef2f2; color: #b91c1c; }
.tech-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.tech-tile {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.dot-ok { background: var(--save); }
.dot-warn { background: var(--warning); }
.dot-err { background: var(--accent); }
.dot-unk { background: #94a3b8; }
.muted { color: var(--ink-muted); }
.empty { padding: 32px 8px; text-align: center; font-size: 12px; font-style: italic; color: #94a3b8; }

.tabbar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--line);
  background: #fff;
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar button {
  border: 0;
  background: none;
  padding: 8px 2px 10px;
  font-size: 9px;
  font-weight: 600;
  color: var(--ink-muted);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.tabbar button svg { width: 20px; height: 20px; }
.tabbar button.is-on { color: #2563eb; }

.sheet {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: flex-end;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(2px);
}
.sheet-card {
  width: 100%;
  max-height: 85%;
  overflow: auto;
  background: #fff;
  border-radius: 24px 24px 0 0;
  padding: 0 0 16px;
  box-shadow: 0 -8px 32px rgba(31, 41, 55, 0.12);
}
.grab { width: 40px; height: 6px; margin: 12px auto 8px; border-radius: 999px; background: #e2e8f0; }
.sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 0 16px 12px;
  border-bottom: 1px solid var(--line);
}
.sheet-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.sheet-head .proto-sub {
  margin-top: 2px;
  font-size: 12px;
  color: var(--ink-muted);
  letter-spacing: 0;
}
.sheet-x {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: none;
  cursor: pointer;
  color: var(--ink-muted);
  font-size: 20px;
}
.sheet-body { padding: 12px 16px; }
.kpi-help-lead {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.45;
  color: #1f2937;
}
.kpi-help-label {
  margin: 0 0 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}
.kpi-help-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #4b5563;
}
.loc-row {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  border: 0;
  border-radius: 12px;
  background: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: left;
}
.loc-row.is-on { background: #f8fafc; font-weight: 700; }
.link-btn {
  width: 100%;
  margin-top: 12px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--accent);
  font-weight: 700;
  cursor: pointer;
}
.more {
  width: 100%;
  margin-top: 12px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}
.filters { display: flex; gap: 8px; margin: 10px 0; flex-wrap: wrap; }
.lk-select {
  width: 100%;
  min-width: 0;
  height: 34px;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 8px;
  padding: 0 8px;
  background: #f8fafc;
  color: #334155;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
}
.filter-grid { display: grid; gap: 8px; margin: 12px 0; }
.filter-grid.one { grid-template-columns: 1fr; }
.filter-grid.two { grid-template-columns: 1fr 1fr; }
.filter-grid.three { grid-template-columns: 1fr 1fr 1fr; }
.bill-date-filters { margin: 0 0 12px; }
.bill-date-filters .seg { margin-top: 0; }
.bill-date-filters .filter-grid { margin: 8px 0 0; }
.proto-date.is-on { border-color: #f5c2c2; background: #fceded; color: var(--accent); }
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink-muted);
}
.check-feed + .pager { margin-top: 4px; margin-bottom: 8px; }
.pager-btns { display: flex; gap: 8px; }
.pager-btn {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink-secondary);
  cursor: pointer;
}
.pager-btn:disabled { opacity: 0.4; cursor: default; }
.event-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid #f1f5f9;
  background: none;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.event-card .event-row { padding: 12px 14px; }
.event-card .event-row:last-child, .proto-day .event-row:last-child { border-bottom: 0; }
.event-row:disabled, .event-row[style] { cursor: default; }
.event-time { width: 48px; flex-shrink: 0; font-size: 12px; color: #94a3b8; font-variant-numeric: tabular-nums; }
.row-amt.void { color: #e11d48; }
.row-amt.pay { color: #059669; }
.row-sub .up { color: #059669; }
.row-sub .down { color: #e11d48; }
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 16px -8px;
  padding: 6px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.back-btn:hover {
  color: #0f172a;
  background: #f1f5f9;
}
.back-btn:active {
  background: #e2e8f0;
}
.back-btn:focus-visible {
  outline: 2px solid #cbd5e1;
  outline-offset: 2px;
}
.back-btn-ico {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: #94a3b8;
  transition: color 0.15s ease;
}
.back-btn:hover .back-btn-ico,
.back-btn:focus-visible .back-btn-ico {
  color: #334155;
}
.back-btn-label {
  font-size: 14px;
  font-weight: 600;
}
@media (prefers-reduced-motion: reduce) {
  .back-btn,
  .back-btn-ico { transition: none; }
}
.bill-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.bill-head h2 { margin: 0; font-size: 18px; font-weight: 700; }
.bill-badge {
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.bill-badge.open { background: #eff6ff; color: #1d4ed8; }
.bill-badge.precheck { background: #fffbeb; color: #b45309; }
.bill-badge.closed { background: #ecfdf5; color: #047857; }
.bill-badge.void { background: #f1f5f9; color: #475569; }
.meta-card .list-row { padding: 10px 14px; }
.total-row { border-top: 1px solid #f1f5f9; }
.cluster-tight { margin: 0 0 16px; }
.alert-list { display: flex; flex-direction: column; }
.alert-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0 12px 12px;
  border-bottom: 1px solid #f3f4f6;
  border-left: 3px solid var(--warning);
}
.alert-row.error { border-left-color: #dc2626; }
.alert-row:last-child { border-bottom: 0; }
.alert-dot {
  width: 8px;
  height: 8px;
  margin-top: 6px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--warning);
}
.alert-row.error .alert-dot { background: #dc2626; }
.alert-body { min-width: 0; flex: 1; }
.alert-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 6px;
  margin: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.alert-meta span:last-child { color: #94a3b8; }
.alert-title {
  margin: 2px 0 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  color: #1e293b;
}
.alert-text {
  margin: 2px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink-muted);
}
.alert-time {
  flex-shrink: 0;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: #94a3b8;
}
.proto-day { margin-bottom: 8px; }

.more-list .row-ico { color: #64748b; }
