:root {
  --red: #cc1f1f;
  --red-hot: #e02222;
  --ink: #1a1a1a;
  --muted: #666666;
  --line: #e2e2e2;
  --page: #f5f5f5;
  --card: #ffffff;
  --header: #ffffff;
  --topbar: #1c1c1c;
  --amber: #f5a623;
  --offline: #888888;
  --radius: 14px;
  --font: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --dock-h: 148px;
  --tabbar-h: 64px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
}
body {
  font-family: var(--font);
  background: #111;
  color: var(--ink);
}

.phone {
  min-height: 100dvh;
  max-width: 430px;
  margin: 0 auto;
  background: var(--page);
  display: flex;
  flex-direction: column;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--header);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--topbar);
  color: #ccc;
  font-size: 13px;
  line-height: 1.2;
  padding: 8px 12px;
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.city-picker {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 22px;
}
.topbar-pin {
  color: var(--red);
  display: flex;
  align-items: center;
}
.city-label {
  font-weight: 700;
  color: #eee;
  white-space: nowrap;
}
.city-caret {
  flex-shrink: 0;
  color: #ccc;
  display: block;
}
.city-select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
}
.city-select:focus { outline: none; }
.city-select option { color: #1a1a1a; }
.topbar-support {
  color: #eee;
  text-decoration: none;
  white-space: nowrap;
  margin-left: auto;
  font-weight: 600;
  font-size: 13px;
}
.topbar-support:active { color: #fff; }

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
}

.brand {
  text-decoration: none;
  color: inherit;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: contain;
  flex-shrink: 0;
  background: #fff;
}
.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}
.brand-name {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
}
.brand-tag {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 500;
  color: #888;
  letter-spacing: 0.08em;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.header-phone {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--red);
  color: #fff;
  border-radius: 10px;
}
.header-phone:active { background: var(--red-hot); }

.presence {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: 10px;
  color: #555;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--offline);
  flex-shrink: 0;
}
.dot.online { background: #1f9d55; }
.dot.offline { background: var(--offline); }

.page {
  flex: 1;
  width: 100%;
  padding: 12px 12px 16px;
}

.page-user {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: calc(var(--dock-h) + var(--tabbar-h) + env(safe-area-inset-bottom));
}

body.session-live {
  --dock-h: 88px;
}

body.user-page {
  overflow: hidden;
  height: 100dvh;
}
body.user-page .phone {
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}
body.user-page .page-user {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  gap: 8px;
  padding-top: 8px;
}
body.user-page:not(.session-live) {
  --dock-h: 88px;
}
body.user-page:not(.session-live) .back-link,
body.user-page:not(.session-live) .charge-btn-stop {
  display: none !important;
}
body.user-page:not(.session-live) .user-dock {
  grid-template-columns: 1fr;
}
body.user-page:not(.session-live) .status-card {
  padding: 14px 14px 12px;
}
body.user-page:not(.session-live) .user-station {
  font-size: 12px;
}
body.user-page:not(.session-live) .connectors {
  margin-top: 6px;
  gap: 5px;
}
body.user-page:not(.session-live) .connector-chip {
  font-size: 11px;
  padding: 3px 8px;
}
body.user-page:not(.session-live) .user-tariff {
  display: none;
}
body.user-page:not(.session-live) .user-status {
  margin-top: 6px;
  font-size: clamp(24px, 7vw, 30px);
}
body.user-page:not(.session-live) .user-session {
  margin-top: 4px;
  font-size: 14px;
}
body.user-page:not(.session-live) .user-target {
  margin-top: 8px;
  padding: 10px;
}
body.user-page:not(.session-live) .user-target-top {
  margin-bottom: 8px;
}
body.user-page:not(.session-live) .user-msg {
  font-size: 13px;
  line-height: 1.35;
}

body.session-live .page-user {
  padding-bottom: calc(var(--dock-h) + var(--tabbar-h) + env(safe-area-inset-bottom));
}
body.session-live .user-setup-only {
  display: none !important;
}
body.session-live .user-live-only {
  display: block;
}
.user-live-only {
  display: none;
}
.session-kicker {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #1f9d55;
  font-weight: 800;
}
.session-head {
  margin-top: 2px;
}
body.session-live .session-head {
  margin-top: 0;
}
body.session-live .user-station {
  margin-bottom: 4px;
}
body.session-live .user-status {
  margin-top: 0;
  font-size: clamp(24px, 7vw, 30px);
}
body.session-live .user-session {
  margin-top: 4px;
  color: #1f9d55;
  font-weight: 700;
}
body.session-live .status-card {
  padding: 16px 14px 14px;
  border-color: #cfe9d8;
  box-shadow: 0 8px 24px rgba(31, 157, 85, 0.08);
}
body.session-live .user-cost {
  margin-top: 12px;
}
body.session-live .user-target {
  margin-top: 10px;
  background: #fff;
}
body.session-live .user-metrics {
  margin-top: 10px;
  padding-top: 0;
  border-top: 0;
}
body.session-live .user-metrics > div {
  background: #fff;
}
body.session-live .user-hint {
  margin-top: 10px;
  font-size: 13px;
  text-align: center;
}
.session-id {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.02em;
}
body.session-live .session-id {
  display: block;
}
body.session-live .user-dock {
  grid-template-columns: 1fr;
}
body.session-live .charge-btn-stop {
  min-height: 58px;
  font-size: 18px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: flex-start;
  margin: 0 0 2px;
  padding: 0;
  min-height: 40px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: 700 15px/1 var(--font);
  cursor: pointer;
}
.back-link svg { flex-shrink: 0; }

.status-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 16px 16px;
}

.user-station {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.user-status {
  margin: 10px 0 0;
  font-size: clamp(28px, 9vw, 36px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
}
.user-status.is-charging { color: #1f9d55; }

.user-session {
  margin: 8px 0 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.user-cost {
  margin: 12px 0 0;
  padding: 12px;
  border: 1px solid #cfe9d8;
  background: #f3fbf6;
  border-radius: 12px;
}
.user-cost .k {
  display: block;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 6px;
}
.user-cost-value {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  color: #1f9d55;
  letter-spacing: -0.03em;
}

.user-tariff {
  margin: 10px 0 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}

.user-target {
  margin: 12px 0 0;
  padding: 12px;
  border: 1px solid var(--line);
  background: #fafafa;
  border-radius: 12px;
}
.user-target-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}
.user-target-top .k {
  margin: 0;
}
.user-target-top strong {
  font-size: 18px;
  color: var(--ink);
}
.user-target input[type="range"] {
  width: 100%;
  height: 6px;
  appearance: none;
  border-radius: 999px;
  background: linear-gradient(90deg, #1f9d55 0%, #1f9d55 var(--pct, 100%), #e6e6e6 var(--pct, 100%), #e6e6e6 100%);
  outline: none;
}
.user-target input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: #1f9d55;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}
.user-target input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: #1f9d55;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}
.user-target input[type="range"]:disabled {
  opacity: 0.55;
}
.user-target-eta {
  margin: 10px 0 0;
  font-size: 14px;
  font-weight: 700;
  color: #1f9d55;
}

.user-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.user-metrics > div {
  border: 1px solid var(--line);
  background: #fafafa;
  border-radius: 10px;
  padding: 10px;
}

.user-hint {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
  white-space: pre-line;
}

.user-msg {
  margin: 0 4px;
}

.user-msg-wait {
  color: var(--muted) !important;
  animation: user-msg-pulse 1.4s ease-in-out infinite;
}

@keyframes user-msg-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.user-dock {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  padding: 10px 12px 12px;
  background: linear-gradient(180deg, transparent, var(--page) 18%);
  display: grid;
  gap: 8px;
  z-index: 15;
}

.charge-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  padding: 0 16px;
  border-radius: 12px;
  font: 700 17px/1 var(--font);
  letter-spacing: 0;
  cursor: pointer;
}
.charge-ico {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}
.charge-ico-stop {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}
.user-dock .charge-btn-start {
  border: 0;
  background: var(--red);
  color: #fff;
  justify-content: flex-start;
}
.user-dock .charge-btn-start .charge-btn-label {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}
.user-dock .charge-btn-start .charge-btn-title {
  font: inherit;
  letter-spacing: inherit;
}
.user-dock .charge-btn-start .charge-btn-tariff {
  font-size: 14px;
  font-weight: 700;
  opacity: 0.92;
  white-space: nowrap;
  flex-shrink: 0;
}
.charge-btn-start {
  border: 0;
  background: var(--red);
  color: #fff;
}
.charge-btn-start:active:not(:disabled) { background: var(--red-hot); }
.charge-btn-stop {
  border: 1.5px solid var(--red);
  background: #fff;
  color: var(--red);
}
.charge-btn-stop:active:not(:disabled) {
  background: var(--red);
  color: #fff;
}
.page-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: calc(var(--tabbar-h) + 20px + env(safe-area-inset-bottom));
}

.list-lead {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
}

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

.station-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.station-card.is-soon {
  cursor: default;
  opacity: 0.72;
  background: #fafafa;
}
.station-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: var(--red);
  border-radius: 999px;
  padding: 4px 8px;
}
.badge.free {
  background: #1f9d55;
}
.badge.busy {
  background: var(--red);
}
.badge.soon {
  background: #bbb;
}
.station-card-address {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}
.station-card-tariff {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}
.station-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 10px;
  margin-top: 10px;
}
.station-card-go {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
}
.station-card-go.is-free { color: #1f9d55; }
.station-card-go.is-busy { color: var(--red); }

.connectors {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.connector-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  background: #fafafa;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}
.connector-pick {
  appearance: none;
  cursor: pointer;
  font: inherit;
}
.connector-pick.is-selected {
  border-color: var(--red);
  background: #fff5f5;
  color: var(--red);
}
.connector-pick.is-busy:not(.is-selected) {
  opacity: 0.55;
}
.connector-pick:disabled {
  cursor: default;
}

.connector-picks {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 8px;
}
.connector-picks legend {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  padding: 0 4px;
}
.conn-pick {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 8px;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: var(--ink) !important;
}
.conn-pick input[type="number"] {
  width: 72px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 8px;
  font: 600 14px/1 var(--font);
}
.conn-pick input[data-role="count"] {
  width: 52px;
  margin-left: auto;
}
.conn-unit {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.add-form {
  display: grid;
  gap: 10px;
}
.add-form label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.add-form input[type="text"],
.add-form select {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  font: 500 15px/1 var(--font);
  color: var(--ink);
  background: #fff;
}
.add-form .check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--ink);
}

.admin-station-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.city-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.city-list li {
  border: 1px solid var(--line);
  background: #fafafa;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.city-form {
  margin-bottom: 0;
}

.admin-station-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: start;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.admin-station-main {
  display: grid;
  gap: 2px;
}
.admin-edit-btn {
  min-height: 36px;
  padding: 0 12px;
  white-space: nowrap;
}
.add-form input.is-readonly {
  background: #f5f5f5;
  color: var(--muted);
}
.form-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.admin-station-list li:first-child { border-top: 0; padding-top: 0; }
.admin-station-list .sid {
  font-weight: 800;
  color: var(--red);
}

.ledger-card h2 {
  margin: 0;
}
.ledger-note {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.ledger-wrap {
  margin-top: 10px;
  overflow: auto;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.ledger-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-size: 12px;
}
.ledger-table th,
.ledger-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}
.ledger-table th {
  position: sticky;
  top: 0;
  background: #fafafa;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.ledger-table tbody tr:last-child td {
  border-bottom: 0;
}
.ledger-id {
  font-weight: 800;
  color: var(--red);
  font-family: var(--mono);
}

body.admin-open .user-dock,
body.list-open .user-dock,
body.cabinet-open .user-dock { display: none; }

body.admin-open .tabbar { display: none; }

.page-admin {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
}

.page-kicker {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}

.cpid {
  margin: 0 0 10px;
  font-size: 28px;
  font-weight: 800;
  color: var(--red);
}

h2 {
  margin: 0 0 10px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

dl { margin: 0; }
dl > div {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 8px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
dt { color: var(--muted); font-weight: 500; }
dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; word-break: break-word; }

.metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.metrics > div {
  border: 1px solid var(--line);
  background: #fafafa;
  border-radius: 10px;
  padding: 10px;
}
.k {
  display: block;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 6px;
}
.v {
  font-size: 13px;
  color: var(--muted);
}
.v strong {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  margin-right: 4px;
}

.tx-box {
  border: 1px solid var(--line);
  background: #fafafa;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 12px;
}
.tx-box p { margin: 0; font-size: 18px; font-weight: 700; }
.hb {
  margin-top: 6px !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  color: var(--muted);
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.btn {
  appearance: none;
  border-radius: 10px;
  min-height: 48px;
  padding: 0 8px;
  font: 700 12px/1 var(--font);
  letter-spacing: 0.04em;
  cursor: pointer;
}
.btn-primary {
  border: 1px solid var(--red);
  background: var(--red);
  color: #fff;
}
.btn-danger {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
}
.btn-secondary {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}
.btn-ghost {
  min-height: 40px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}
.btn:disabled { opacity: 0.4; }

.command-status {
  margin: 10px 0 0;
  color: var(--amber);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.config-panel {
  margin: 12px 0 0;
  max-height: 140px;
  overflow: auto;
  background: #f8f8f8;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  font: 12px/1.45 var(--mono);
  color: var(--ink);
}

.log-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  gap: 8px;
}
.log-actions { display: flex; gap: 6px; }

.ocpp-log {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 42vh;
  overflow: auto;
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: 12px/1.4 var(--mono);
}
.ocpp-log li {
  display: grid;
  grid-template-columns: 58px 16px 1fr;
  gap: 6px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}
.ocpp-log li:last-child { border-bottom: 0; }
.ocpp-log .time { color: var(--muted); }
.ocpp-log .dir.in { color: var(--red); font-weight: 700; }
.ocpp-log .dir.out { color: #888; font-weight: 700; }
.ocpp-log .payload {
  grid-column: 1 / -1;
  white-space: pre-wrap;
  color: #444;
  display: none;
  margin: 0;
  overflow-wrap: anywhere;
}
.ocpp-log li.open .payload { display: block; }

.session-summary {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
  background: rgba(17, 17, 17, 0.72);
  backdrop-filter: blur(4px);
}
.session-summary-card {
  width: 100%;
  max-width: 360px;
  background: #fff;
  border-radius: 18px;
  padding: 22px 18px 18px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}
.session-summary-card h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-align: center;
}
.session-summary-id {
  margin: 8px 0 0;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.session-summary-stats {
  margin: 18px 0 0;
  display: grid;
  gap: 10px;
}
.session-summary-stats div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafafa;
}
.session-summary-stats dt {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.session-summary-stats dd {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  text-align: right;
}
.session-summary-stats div:last-child dd {
  color: #1f9d55;
}
.session-summary-timer {
  margin: 16px 0 0;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}
.session-summary-timer strong {
  color: var(--ink);
  font-size: 18px;
}
.session-summary .charge-btn {
  margin-top: 14px;
  justify-content: center;
  text-align: center;
}

.tabbar {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding: 6px 8px env(safe-area-inset-bottom);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 4px;
  background: #fff;
  border-top: 1px solid var(--line);
  z-index: 25;
}
.tabbar button {
  appearance: none;
  border: 0;
  background: transparent;
  color: #888;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 52px;
  font: 700 11px/1 var(--font);
  letter-spacing: 0.02em;
  cursor: pointer;
}
.tabbar button svg {
  width: 22px;
  height: 22px;
}
.tabbar button.is-active { color: var(--red); }
.tabbar button.is-active.is-charging,
.tabbar button.is-charging svg {
  color: #1f9d55;
}
.tabbar button:disabled {
  opacity: 0.35;
  cursor: default;
}

.page-cabinet {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: calc(var(--tabbar-h) + 20px + env(safe-area-inset-bottom));
}
.cabinet-soon {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 280px;
  padding: 32px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.cabinet-soon-title {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.cabinet-soon-text {
  margin: 12px 0 0;
  max-width: 280px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--muted);
}
.balance-card {
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius);
  padding: 18px 16px;
}
.balance-card .k {
  color: #aaa;
  margin-bottom: 8px;
}
.balance-value {
  margin: 0;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.balance-value span {
  font-size: 18px;
  font-weight: 700;
  color: #ccc;
}
.topup-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}
.card-preview {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.card-meta {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.ops-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ops-list li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.ops-list li:first-child { border-top: 0; padding-top: 0; }
.ops-list .plus { color: #1f9d55; font-weight: 800; }
