:root {
  --bg: #0f1419;
  --surface: #1a222c;
  --border: #2a3544;
  --text: #e8eef5;
  --muted: #8b9cb0;
  --accent: #3d8bfd;
  --accent-dim: #2a5fad;
  --danger: #e85d6c;
  --radius: 12px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.topbar {
  padding: calc(12px + env(safe-area-inset-top, 0)) 16px 8px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.topbar-inner h1 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
}

.topbar-inner .muted {
  margin: 4px 0 0;
  font-size: 0.85rem;
}

.muted {
  color: var(--muted);
}

.main {
  padding: 16px;
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0));
  max-width: 520px;
  margin: 0 auto;
}

.hidden {
  display: none !important;
}

.center {
  text-align: center;
  padding: 32px 0;
}

.banner {
  padding: 12px 14px;
  border-radius: var(--radius);
  margin-bottom: 14px;
  font-size: 0.9rem;
}

.banner.error {
  background: rgba(232, 93, 108, 0.12);
  border: 1px solid rgba(232, 93, 108, 0.35);
  color: #ffb4bc;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.card-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}

.card-row:first-of-type {
  border-top: none;
  padding-top: 0;
}

.card-row .label {
  color: var(--muted);
  flex: 1;
}

.card-row .value {
  text-align: right;
  font-weight: 500;
}

.nav-row {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.btn {
  flex: 1;
  border: none;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn.primary {
  background: var(--accent);
  color: #fff;
}

.btn.secondary {
  background: var(--border);
  color: var(--text);
}

.section-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0 0 10px;
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.list li button {
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  margin-bottom: 8px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.95rem;
  cursor: pointer;
}

.list li button:active {
  background: var(--border);
}

.list .sub {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 4px;
}
