/* ============================================================
   common-mobile.css — UMAY Charge Mobile UI Baseline (Ant Design Mobile semantics)
   Platform: mobile (Batch 1: P-01 to P-10)
   Single source of truth for design tokens inside :root. Zero hex values outside :root.
   ============================================================ */
:root {
  /* Brand & high-contrast semantic colors (UMAY Charge #00A870) */
  --primary: #00a870;
  --primary-fill: #008558;
  --primary-hover: #00704a;
  --primary-weak: #e6f7f1;
  --primary-text: #006b46;

  --info: #1677ff;
  --info-weak: #e6f4ff;
  --info-text: #0958d9;

  --success: #00a870;
  --success-weak: #e6f7f1;
  --success-text: #006b46;

  --warning: #d97706;
  --warning-weak: #fff7e6;
  --warning-text: #92400e;

  --error: #dc2626;
  --error-weak: #fef2f2;
  --error-text: #b91c1c;

  /* Text, surfaces & borders */
  --white: #ffffff;
  --text: #111827;
  --text-secondary: #4b5563;
  --text-tertiary: #525866;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --border-light: #f0f1f3;
  --bg-outer: #e5e9ef;
  --bg-page: #f3f5f7;
  --bg-card: #ffffff;
  --bg-active: #f8fafc;
  --bg-disabled: #f3f4f6;
  --bg-dark-surface: #0f172a;
  --bg-dark-panel: #1e293b;
  --text-on-dark-muted: #cbd5e1;
  --wallet-grad: linear-gradient(135deg, #008558 0%, #006b46 100%);
  --surface-glass: rgba(255, 255, 255, 0.94);
  --dark-chip-bg: rgba(255, 255, 255, 0.14);
  --dark-chip-border: rgba(255, 255, 255, 0.28);

  /* Map vector palette */
  --map-land: #eef3f0;
  --map-park: #d7efe4;
  --map-water: #dbeafe;
  --map-road: #ffffff;
  --map-road-stroke: #d1d5db;

  --mask-scrim: rgba(15, 23, 42, 0.48);
  --toast-bg: rgba(17, 24, 39, 0.92);
  --fab-shadow: rgba(0, 133, 88, 0.28);
  --shadow-card: 0 2px 10px rgba(15, 23, 42, 0.06);
  --shadow-overlay: 0 -4px 18px rgba(15, 23, 42, 0.14);
  --shadow-dialog: 0 12px 32px rgba(15, 23, 42, 0.2);

  /* Radius scale */
  --radius-control: 10px;
  --radius-module: 16px;
  --radius-feedback: 12px;
  --radius-overlay: 20px;
  --radius-cta: 14px;
  --radius-pill: 999px;

  /* Platform shell dimensions */
  --app-max-w: 430px;
  --navbar-h: 52px;
  --navbar-slot-w: 44px;
  --page-tabs-h: 44px;
  --tabbar-h: 72px;
  --gutter: 16px;
  --touch-min: 44px;
  --touch-gap: 8px;

  /* Typography */
  --font-xs: 12px;
  --font-sm: 13px;
  --font-base: 14px;
  --font-md: 15px;
  --font-lg: 16px;
  --font-title: 17px;
  --font-display: 26px;
  --font-hero: 36px;
  --font-balance: 38px;

  /* Spacing scale */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 24px;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: var(--font-base);
  color: var(--text);
  background: var(--bg-outer);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--primary-text); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; color: var(--text); }
p { margin: 0; }
.mono {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}
.tnum { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }

/* ---------- Accessibility baseline ---------- */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--radius-control);
}
.touch-target {
  min-width: var(--touch-min);
  min-height: var(--touch-min);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ============================================================
   App Shell
   ============================================================ */
[data-mobile-app] {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  width: 100%;
  max-width: var(--app-max-w);
  margin: 0 auto;
  background: var(--bg-page);
  position: relative;
  overflow: hidden;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}
[data-safe-area="top"] { height: var(--safe-top); flex: none; background: var(--bg-card); }
[data-safe-area="bottom"] { height: var(--safe-bottom); flex: none; background: var(--bg-card); }

/* NavBar: 44px | minmax(0,1fr) | 44px */
[data-mobile-navbar] {
  flex: none;
  height: var(--navbar-h);
  display: grid;
  grid-template-columns: var(--navbar-slot-w) minmax(0, 1fr) var(--navbar-slot-w);
  align-items: center;
  padding: 0 var(--space-xs);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 60;
}
[data-nav-left-slot], [data-nav-right-slot] {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-width: var(--navbar-slot-w);
}
[data-nav-left-slot] { justify-content: flex-start; }
[data-nav-right-slot] { justify-content: flex-end; }
[data-nav-title] {
  font-size: var(--font-title);
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 var(--space-xs);
}
.nav-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--navbar-slot-w);
  min-height: var(--navbar-slot-w);
  padding: 0;
  border: none;
  background: none;
  color: var(--text);
  cursor: pointer;
  border-radius: var(--radius-control);
}
.nav-action:active { background: var(--bg-active); }
.nav-action[aria-pressed="true"] {
  background: var(--primary-weak);
  color: var(--primary-text);
}
.nav-action svg { width: 22px; height: 22px; }
.nav-lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: var(--navbar-slot-w);
  min-height: var(--navbar-slot-w);
  padding: 0 var(--space-xs);
  border: none;
  background: none;
  color: var(--primary-text);
  font-size: var(--font-xs);
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

/* Primary vertical scroll owner */
[data-primary-scroll] {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  display: flex;
  flex-direction: column;
}
[data-mobile-screen] {
  display: none;
  flex: 1;
  flex-direction: column;
}
[data-mobile-screen].active {
  display: flex;
}

/* Page Tabs */
[data-page-tabs] {
  height: var(--page-tabs-h);
  display: flex;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
  flex: none;
}
[data-page-tabs] .pt-tab {
  flex: 1;
  border: none;
  background: none;
  font-size: var(--font-md);
  font-family: inherit;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  min-height: var(--page-tabs-h);
  padding: 0 var(--space-sm);
}
[data-page-tabs] .pt-tab.active {
  color: var(--primary-text);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

/* TabBar: fixed 4 items, L1 only */
[data-mobile-tabbar] {
  flex: none;
  height: var(--tabbar-h);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--bg-card);
  border-top: 1px solid var(--border-light);
  position: sticky;
  bottom: 0;
  z-index: 60;
}
[data-mobile-tabbar][hidden] { display: none; }
[data-mobile-tabbar] .tb-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: var(--touch-min);
  border: none;
  background: none;
  color: var(--text-tertiary);
  font-size: var(--font-xs);
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
}
[data-mobile-tabbar] .tb-item.active {
  color: var(--primary-text);
  font-weight: 600;
}
[data-mobile-tabbar] .tb-item svg { width: 24px; height: 24px; }

/* Page spacing & rhythm */
[data-page-stack] {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding: var(--gutter);
  flex: 1;
}
[data-page-stack][data-gap="8"] { gap: var(--space-sm); }
[data-page-stack][data-gap="16"] { gap: var(--space-lg); }
[data-page-tools] {
  background: var(--bg-card);
  padding: var(--space-sm) var(--gutter) var(--space-md);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  flex: none;
}
[data-list-region] {
  background: var(--bg-card);
  border-radius: var(--radius-module);
  overflow: hidden;
  border: 1px solid var(--border-light);
}
[data-page-actions] {
  display: flex;
  gap: var(--touch-gap);
  padding: var(--space-md) var(--gutter);
  background: var(--bg-card);
  border-top: 1px solid var(--border-light);
  flex: none;
}
[data-page-actions].stick-bottom { margin-top: auto; }

/* ============================================================
   Components (Ant Design Mobile Semantics)
   ============================================================ */

/* Section caption */
.adm-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--font-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
  padding: var(--space-xs) var(--space-xs) 0;
}

/* List / ListItem / Cell */
.adm-list { background: var(--bg-card); }
.adm-cell-group {
  background: var(--bg-card);
  border-radius: var(--radius-module);
  border: 1px solid var(--border-light);
  overflow: hidden;
}
.adm-list-item, .adm-cell {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  min-height: 48px;
  padding: var(--space-md) var(--gutter);
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-card);
  color: var(--text);
  width: 100%;
  text-align: left;
  font-family: inherit;
  font-size: var(--font-base);
}
.adm-list-item:last-child, .adm-cell:last-child { border-bottom: none; }
a.adm-list-item, a.adm-cell, button.adm-list-item, button.adm-cell {
  border-left: none;
  border-right: none;
  border-top: none;
  cursor: pointer;
}
.adm-list-item.clickable:active,
a.adm-list-item:active,
.adm-cell.clickable:active,
button.adm-cell:active,
a.adm-cell:active {
  background: var(--bg-active);
}
.adm-list-item.is-selected {
  background: var(--primary-weak);
  box-shadow: inset 3px 0 0 var(--primary);
}
.adm-list-item.is-disabled {
  opacity: 0.62;
  cursor: not-allowed;
}
.adm-cell .cell-label {
  color: var(--text-secondary);
  flex: 0 1 auto;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.adm-cell .cell-icon { width: 18px; height: 18px; color: var(--text-secondary); flex: none; }
.adm-cell .cell-value {
  margin-left: auto;
  color: var(--text);
  text-align: right;
  font-weight: 500;
  min-width: 0;
  overflow-wrap: anywhere;
}
.adm-cell .cell-extra {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--text-secondary);
  flex: none;
}
.adm-cell .cell-arrow { width: 16px; height: 16px; color: var(--text-muted); flex: none; }
.conn-radio {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--text-muted);
  background: var(--white);
  flex: none;
  margin-top: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.adm-list-item.is-selected .conn-radio {
  border-color: var(--primary-fill);
  background: var(--primary-fill);
}
.adm-list-item.is-selected .conn-radio::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--white);
}
.adm-list-item.li { align-items: flex-start; min-height: 64px; gap: var(--space-md); }
.li-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-feedback);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  margin-top: 2px;
  background: var(--bg-page);
  color: var(--text-secondary);
}
.li-icon svg { width: 20px; height: 20px; }
.li-icon.is-green { background: var(--primary-weak); color: var(--primary-text); }
.li-icon.is-blue { background: var(--info-weak); color: var(--info-text); }
.li-icon.is-orange { background: var(--warning-weak); color: var(--warning-text); }
.li-icon.is-red { background: var(--error-weak); color: var(--error-text); }
.li-main { flex: 1; min-width: 0; }
.li-title {
  font-size: var(--font-md);
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.li-desc {
  font-size: var(--font-sm);
  color: var(--text-secondary);
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.li-meta {
  font-size: var(--font-xs);
  color: var(--text-tertiary);
  margin-top: 6px;
}
.li-side {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.li-amount {
  font-size: var(--font-md);
  font-weight: 600;
  color: var(--text);
}
.li-amount.is-plus { color: var(--primary-text); }
.li-amount.is-minus { color: var(--text); }

/* Card / Divider / Collapse / Steps */
.adm-card {
  background: var(--bg-card);
  border-radius: var(--radius-module);
  padding: var(--space-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-card);
}
.adm-card-title {
  font-size: var(--font-md);
  font-weight: 600;
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}
.adm-divider {
  height: 1px;
  background: var(--border-light);
  border: none;
  margin: var(--space-md) 0;
}
.adm-divider.with-text {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-tertiary);
  font-size: var(--font-xs);
  height: auto;
  background: none;
}
.adm-divider.with-text::before, .adm-divider.with-text::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-light);
}
.adm-collapse {
  background: var(--bg-card);
  border-radius: var(--radius-module);
  border: 1px solid var(--border-light);
  overflow: hidden;
}
.adm-collapse-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  min-height: 48px;
  padding: var(--space-md) var(--gutter);
  width: 100%;
  border: none;
  background: none;
  font-size: var(--font-base);
  font-weight: 500;
  font-family: inherit;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.adm-collapse-header .chev {
  width: 18px;
  height: 18px;
  color: var(--text-tertiary);
  transition: transform 0.2s;
  flex: none;
}
.adm-collapse-header[aria-expanded="true"] .chev { transform: rotate(180deg); }
.adm-collapse-panel {
  display: none;
  padding: 0 var(--gutter) var(--space-md);
  color: var(--text-secondary);
  font-size: var(--font-sm);
  border-top: 1px solid var(--border-light);
}
.adm-collapse-panel.active { display: block; }

.adm-steps { display: flex; flex-direction: column; gap: var(--space-md); padding: var(--space-sm) 0; }
.adm-step { display: flex; gap: var(--space-md); }
.adm-step-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex: none;
  margin-top: 1px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--border);
  color: var(--white);
  font-size: var(--font-xs);
  font-weight: 600;
}
.adm-step.finish .adm-step-icon { background: var(--success); }
.adm-step.process .adm-step-icon { background: var(--primary-fill); }
.adm-step.error .adm-step-icon { background: var(--error); }
.adm-step-title { font-size: var(--font-base); font-weight: 500; }
.adm-step-desc { font-size: var(--font-xs); color: var(--text-tertiary); margin-top: 2px; }

/* Buttons & FAB */
.adm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: var(--touch-min);
  padding: 8px var(--space-lg);
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  font-size: var(--font-lg);
  font-weight: 600;
  font-family: inherit;
  line-height: 1.25;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  white-space: normal;
  transition: opacity 0.15s, background 0.15s;
}
.adm-btn:active { opacity: 0.86; }
.adm-btn-sm { min-height: var(--touch-min); padding: 0 var(--space-md); font-size: var(--font-sm); }
.adm-btn-lg,
[data-page-actions] .adm-btn-block {
  min-height: 48px;
  border-radius: var(--radius-cta);
  font-size: var(--font-md);
}
.adm-btn-primary { background: var(--primary-fill); color: var(--white); }
.adm-btn-primary:hover { background: var(--primary-hover); }
.adm-btn-default { background: var(--bg-card); border-color: var(--border); color: var(--text); }
.adm-btn-danger { background: var(--error); color: var(--white); }
.adm-btn-danger-outline { background: var(--bg-card); border-color: var(--error); color: var(--error-text); }
.adm-btn-inverse { background: var(--white); color: var(--primary-text); border-color: transparent; }
.adm-btn-inverse[disabled] { background: var(--bg-disabled); color: var(--text-muted); border-color: transparent; cursor: not-allowed; }
.adm-btn-text { background: none; color: var(--primary-text); padding: 0 var(--space-sm); }
.adm-btn-block { width: 100%; flex: none; }
.adm-popup-footer > .adm-btn-block,
.scan-demo-row > .adm-btn-block { flex: 1; min-width: 0; }
.adm-btn[disabled] {
  background: var(--bg-disabled);
  color: var(--text-muted);
  border-color: var(--border);
  cursor: not-allowed;
}
.adm-btn svg { width: 18px; height: 18px; flex: none; }
.adm-fab {
  position: absolute;
  right: var(--space-md);
  bottom: var(--space-md);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border-light);
  z-index: 30;
  background: var(--bg-card);
  color: var(--primary-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-card);
  cursor: pointer;
}
.adm-fab.is-primary {
  background: var(--primary-fill);
  color: var(--white);
  border-color: transparent;
  box-shadow: 0 4px 12px var(--fab-shadow);
}
.adm-fab svg { width: 22px; height: 22px; }

/* Filter chips & Segmented toggle */
.adm-filter-strip {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.adm-filter-strip::-webkit-scrollbar { display: none; }
.adm-chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: var(--touch-min);
  padding: 0 var(--space-md);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: var(--font-sm);
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.adm-chip.active {
  background: var(--primary-weak);
  border-color: var(--primary);
  color: var(--primary-text);
  font-weight: 600;
}
.adm-chip-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}
.adm-segmented {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  background: var(--bg-page);
  padding: 3px;
  border-radius: var(--radius-control);
  border: 1px solid var(--border-light);
  gap: 2px;
}
.adm-segmented button {
  min-height: var(--touch-min);
  border: none;
  background: none;
  border-radius: var(--radius-control);
  font-size: var(--font-sm);
  font-weight: 500;
  font-family: inherit;
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.adm-segmented button.active {
  background: var(--bg-card);
  color: var(--text);
  font-weight: 600;
  box-shadow: var(--shadow-card);
}
.adm-chip-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-sm);
}
.adm-chip-row .adm-chip { width: 100%; min-width: 0; min-height: var(--touch-min); padding: 0 6px; font-size: var(--font-sm); justify-content: center; }

/* Forms */
.adm-form-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  min-height: 48px;
  padding: var(--space-sm) var(--gutter);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
}
.adm-form-item:last-child { border-bottom: none; }
.adm-form-item.stack {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding: var(--space-md) var(--gutter);
}
.adm-form-label { font-size: var(--font-sm); color: var(--text-secondary); font-weight: 500; flex: none; }
.adm-form-required::after { content: " *"; color: var(--error); }
.adm-input, .adm-textarea {
  flex: 1;
  min-width: 0;
  width: 100%;
  min-height: 36px;
  border: none;
  outline: none;
  background: none;
  font-size: var(--font-lg);
  font-family: inherit;
  color: var(--text);
}
.adm-input-box {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: 44px;
  padding: 0 var(--space-md);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--bg-card);
}
.adm-input-box:focus-within { border-color: var(--primary); }
.adm-prefix {
  font-size: var(--font-md);
  font-weight: 600;
  color: var(--text-secondary);
  padding-right: var(--space-sm);
  border-right: 1px solid var(--border);
}
.adm-form-help { font-size: var(--font-xs); color: var(--text-tertiary); }
.adm-form-error { font-size: var(--font-xs); color: var(--error-text); margin-top: 2px; }

/* SearchBar */
.adm-search-row { display: flex; align-items: center; gap: var(--space-sm); }
.adm-search-bar {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  height: 40px;
  padding: 0 var(--space-md);
  border-radius: var(--radius-pill);
  background: var(--bg-page);
  color: var(--text-tertiary);
  border: 1px solid var(--border-light);
}
.adm-search-bar svg { width: 18px; height: 18px; flex: none; }
.adm-search-bar input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: none;
  font-size: var(--font-lg);
  font-family: inherit;
  color: var(--text);
}

/* Picker / Switch / Checkbox / Radio */
.adm-picker-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  flex: 1;
  min-width: 0;
  min-height: 36px;
  border: none;
  background: none;
  font-size: var(--font-lg);
  font-family: inherit;
  color: var(--text);
  text-align: right;
  cursor: pointer;
}
.adm-picker-trigger .picker-val { margin-left: auto; color: var(--text); }
.adm-picker-trigger .ph { color: var(--text-muted); }
.adm-picker-trigger svg { width: 16px; height: 16px; color: var(--text-muted); flex: none; }
.adm-picker-popup { display: flex; flex-direction: column; }
.adm-picker-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--gutter);
  border-bottom: 1px solid var(--border-light);
}
.adm-picker-toolbar .title { font-size: var(--font-md); font-weight: 600; }
.adm-picker-column { max-height: 220px; overflow-y: auto; }
.adm-picker-option {
  min-height: var(--touch-min);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-lg);
  font-family: inherit;
  color: var(--text);
  border: none;
  background: none;
  width: 100%;
  cursor: pointer;
}
.adm-picker-option.selected { color: var(--primary-text); font-weight: 600; background: var(--primary-weak); }

.adm-switch {
  position: relative;
  width: 46px;
  height: 26px;
  border-radius: var(--radius-pill);
  border: none;
  background: var(--border);
  cursor: pointer;
  flex: none;
  transition: background 0.2s;
  padding: 0;
}
.adm-switch[aria-checked="true"] { background: var(--primary); }
.adm-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--white);
  transition: transform 0.2s;
  box-shadow: var(--shadow-card);
}
.adm-switch[aria-checked="true"]::after { transform: translateX(20px); }

.adm-checkbox, .adm-radio {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: var(--touch-min);
  font-size: var(--font-base);
  color: var(--text);
  cursor: pointer;
  position: relative;
}
.adm-checkbox input, .adm-radio input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.adm-checkbox .box, .adm-radio .dot {
  width: 20px;
  height: 20px;
  flex: none;
  border: 1.5px solid var(--text-muted);
  background: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
}
.adm-checkbox .box { border-radius: 4px; }
.adm-radio .dot { border-radius: 50%; }
.adm-checkbox input:checked + .box,
.adm-radio input:checked + .dot {
  background: var(--primary-fill);
  border-color: var(--primary-fill);
}
.adm-checkbox .box svg { width: 14px; height: 14px; opacity: 0; }
.adm-checkbox input:checked + .box svg { opacity: 1; }
.adm-radio input:checked + .dot::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--white);
}
.adm-checkbox input:focus-visible + .box,
.adm-radio input:focus-visible + .dot {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Data Display */
.adm-badge { position: relative; display: inline-flex; align-items: center; justify-content: center; }
.adm-badge .dot, .adm-badge .count {
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--error);
  color: var(--white);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  border-radius: var(--radius-pill);
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.adm-badge .dot { min-width: 8px; width: 8px; height: 8px; padding: 0; }
.adm-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-control);
  font-size: var(--font-xs);
  font-weight: 600;
  line-height: 18px;
  white-space: nowrap;
}
.tag-blue { color: var(--info-text); background: var(--info-weak); }
.tag-green { color: var(--success-text); background: var(--success-weak); }
.tag-orange { color: var(--warning-text); background: var(--warning-weak); }
.tag-red { color: var(--error-text); background: var(--error-weak); }
.tag-gray { color: var(--text-secondary); background: var(--bg-page); }

.adm-notice-bar {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: 40px;
  padding: var(--space-xs) var(--gutter);
  background: var(--warning-weak);
  color: var(--warning-text);
  font-size: var(--font-sm);
  font-weight: 500;
}
.adm-notice-bar svg { width: 16px; height: 16px; flex: none; }
.adm-notice-bar .nb-text { flex: 1; min-width: 0; }
.adm-notice-bar .nb-link { font-weight: 600; white-space: nowrap; text-decoration: underline; }
.adm-notice-bar .close {
  margin-left: auto;
  min-width: var(--touch-min);
  min-height: var(--touch-min);
  border: none;
  background: none;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.notice-info { background: var(--info-weak); color: var(--info-text); }
.notice-success { background: var(--success-weak); color: var(--success-text); }
.notice-error { background: var(--error-weak); color: var(--error-text); }

.adm-progress { height: 8px; border-radius: 4px; background: var(--border-light); overflow: hidden; }
.adm-progress .fill { height: 100%; border-radius: 4px; background: var(--primary); }
.adm-progress.done .fill { background: var(--success); }
.adm-progress.fail .fill { background: var(--error); }

.adm-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex: none;
  background: var(--primary-weak);
  color: var(--primary-text);
  border: 1px solid var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-md);
  font-weight: 700;
}

.adm-metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-sm); }
.adm-metric {
  background: var(--bg-card);
  border-radius: var(--radius-module);
  padding: var(--space-md);
  border: 1px solid var(--border-light);
}
.adm-metric .metric-title { font-size: var(--font-xs); color: var(--text-tertiary); }
.adm-metric .metric-value {
  display: flex;
  align-items: baseline;
  flex-wrap: nowrap;
  gap: 4px;
  font-size: var(--font-display);
  font-weight: 700;
  color: var(--text);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.adm-metric .metric-unit {
  font-size: var(--font-sm);
  font-weight: 500;
  color: var(--text-secondary);
}
.adm-metric .metric-footer { font-size: var(--font-xs); color: var(--text-secondary); margin-top: 4px; }

.wallet-hero-card {
  background: var(--wallet-grad);
  color: var(--white);
  border-color: transparent;
  padding: 20px var(--space-lg);
  box-shadow: var(--fab-shadow);
}
.wallet-hero-card .metric-title,
.wallet-hero-card .metric-footer {
  color: var(--text-on-dark-muted);
}
.wallet-hero-card .metric-value {
  font-size: var(--font-balance);
  color: var(--white);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.wallet-hero-card .metric-unit {
  color: var(--text-on-dark-muted);
  font-size: var(--font-lg);
}

.adm-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  display: inline-block;
  animation: adm-pulse 1.5s ease-in-out infinite;
}
@keyframes adm-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

.adm-qr-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-lg);
  background: var(--bg-page);
  border-radius: var(--radius-module);
  border: 1px solid var(--border-light);
}

.pay-redirect-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--bg-page);
  border-radius: var(--radius-module);
  border: 1px solid var(--border-light);
}
.pay-redirect-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
}
.pay-redirect-title {
  font-size: var(--font-lg);
  font-weight: 700;
  color: var(--text);
}
.pay-redirect-amt {
  font-size: var(--font-display);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.pay-redirect-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

/* ============================================================
   Overlays ([data-overlay-host])
   ============================================================ */
.adm-mask { position: fixed; inset: 0; background: var(--mask-scrim); z-index: 100; }
.adm-popup {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 110;
  max-width: var(--app-max-w);
  margin: 0 auto;
  max-height: 84vh;
  background: var(--bg-card);
  border-radius: var(--radius-overlay) var(--radius-overlay) 0 0;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-overlay);
  padding-bottom: var(--safe-bottom);
}
.adm-popup::before,
.adm-action-sheet::before {
  content: "";
  display: block;
  width: 36px;
  height: 4px;
  border-radius: var(--radius-pill);
  background: var(--border);
  margin: 8px auto 2px;
  flex: none;
}
.adm-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--gutter);
  min-height: 48px;
  border-bottom: 1px solid var(--border-light);
  font-size: var(--font-md);
  font-weight: 600;
}
.adm-popup-body { flex: 1; overflow-y: auto; }
.adm-popup-footer {
  padding: var(--space-md) var(--gutter);
  border-top: 1px solid var(--border-light);
  display: flex;
  gap: var(--touch-gap);
}
.adm-dialog {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 110;
  width: min(320px, 86vw);
  background: var(--bg-card);
  border-radius: var(--radius-overlay);
  box-shadow: var(--shadow-dialog);
  overflow: hidden;
}
.adm-dialog-header {
  padding: var(--space-lg) var(--space-lg) var(--space-sm);
  font-size: var(--font-lg);
  font-weight: 600;
  text-align: center;
}
.adm-dialog-body {
  padding: 0 var(--space-lg) var(--space-lg);
  font-size: var(--font-base);
  color: var(--text-secondary);
  text-align: center;
  max-height: 50vh;
  overflow-y: auto;
}
.adm-dialog-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--border-light);
}
.adm-dialog-footer button, .adm-dialog-footer a {
  min-height: var(--touch-min);
  border: none;
  background: none;
  font-size: var(--font-md);
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.adm-dialog-footer > :nth-child(2) {
  border-left: 1px solid var(--border-light);
  color: var(--primary-text);
  font-weight: 600;
}
.adm-dialog-footer.single { grid-template-columns: 1fr; }
.adm-action-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 110;
  max-width: var(--app-max-w);
  margin: 0 auto;
  background: var(--bg-card);
  border-radius: var(--radius-overlay) var(--radius-overlay) 0 0;
  overflow: hidden;
  padding-bottom: var(--safe-bottom);
  box-shadow: var(--shadow-overlay);
}
.adm-action-sheet .as-head {
  padding: var(--space-md) var(--gutter);
  text-align: center;
  font-size: var(--font-xs);
  color: var(--text-tertiary);
  border-bottom: 1px solid var(--border-light);
}
.adm-action-sheet .as-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  min-height: 48px;
  width: 100%;
  border: none;
  background: none;
  border-bottom: 1px solid var(--border-light);
  font-size: var(--font-md);
  font-weight: 500;
  font-family: inherit;
  color: var(--text);
  cursor: pointer;
}
.adm-action-sheet .as-item.is-selected { color: var(--primary-text); font-weight: 600; }
.adm-action-sheet .as-item.danger { color: var(--error-text); }
.adm-action-sheet .as-cancel {
  margin: var(--space-sm) var(--gutter) var(--space-md);
  border-radius: var(--radius-control);
  border: none;
  background: var(--bg-page);
  min-height: var(--touch-min);
  width: calc(100% - 2 * var(--gutter));
  font-size: var(--font-md);
  font-weight: 500;
  font-family: inherit;
  color: var(--text-secondary);
  cursor: pointer;
}
.adm-toast {
  position: fixed;
  left: 50%;
  top: 45%;
  transform: translate(-50%, -50%);
  z-index: 200;
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  max-width: 78vw;
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-feedback);
  background: var(--toast-bg);
  color: var(--white);
  font-size: var(--font-base);
  text-align: center;
  box-shadow: var(--shadow-dialog);
}
.adm-toast svg { width: 18px; height: 18px; flex: none; }

/* States */
.adm-empty, .adm-error-block, .adm-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px var(--gutter);
  gap: var(--space-sm);
  background: var(--bg-card);
  border-radius: var(--radius-module);
  border: 1px solid var(--border-light);
}
.adm-empty svg, .adm-error-block svg, .adm-result svg { width: 44px; height: 44px; color: var(--text-muted); }
.adm-result.is-success svg { color: var(--primary); }
.adm-result.is-warning svg { color: var(--warning); }
.adm-result.is-error svg { color: var(--error); }
.adm-empty .t, .adm-error-block .t, .adm-result .t { font-size: var(--font-md); font-weight: 600; }
.adm-result .t.hero-amount {
  font-size: var(--font-hero);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.adm-empty .d, .adm-error-block .d, .adm-result .d { font-size: var(--font-sm); color: var(--text-secondary); }
.adm-spinner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  color: var(--text-secondary);
  font-size: var(--font-sm);
}
.adm-spinner svg { width: 20px; height: 20px; animation: adm-spin 1s linear infinite; }
@keyframes adm-spin { to { transform: rotate(360deg); } }
.adm-skeleton {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--bg-card);
  border-radius: var(--radius-module);
}
.adm-skeleton .bar { height: 14px; border-radius: var(--radius-control); background: var(--border-light); }
.adm-skeleton .bar.w60 { width: 60%; }
.adm-skeleton .bar.w40 { width: 40%; }
.adm-ptr {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  font-size: var(--font-xs);
  color: var(--text-tertiary);
  padding: 2px 0;
}
.adm-list-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  min-height: var(--touch-min);
  padding: var(--space-sm) var(--gutter);
  font-size: var(--font-xs);
  color: var(--text-tertiary);
  background: var(--bg-card);
  border-top: 1px solid var(--border-light);
}
.runtime-state { display: none; }
.runtime-state.visible { display: block; }

.adm-icon-del {
  min-width: var(--touch-min);
  min-height: var(--touch-min);
  border: none;
  background: none;
  color: var(--error-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: var(--radius-control);
}
.adm-icon-del:active { background: var(--error-weak); }

/* Mobile & Landscape responsiveness */
@media (max-width: 480px) {
  [data-mobile-app] {
    max-width: 100%;
    border-left: none;
    border-right: none;
    box-shadow: none;
  }
}
@media (max-width: 360px) {
  :root { --gutter: 12px; }
}
@media (orientation: landscape) and (max-height: 480px) {
  :root { --gutter: 12px; --navbar-h: 46px; --tabbar-h: 58px; }
  [data-mobile-app] { max-width: 100%; border: none; }
  [data-primary-scroll] { -webkit-overflow-scrolling: auto; }
  .map-stage { min-height: 0 !important; flex: none !important; }
  .map-canvas { height: 180px !important; min-height: 150px !important; flex: none !important; }
}
