/* ============================================================
   PayPilot Web — "Ledger" professional theme
   Neutral slate surfaces · single accent · production minimal
   Mobile-first, scales up to desktop automatically
   ============================================================ */

:root {
  /* Dark theme (default) — calm, low-contrast neutrals, single indigo accent */
  --bg: #0b0f1a;
  --bg-2: #0d1220;
  --bg-3: #111828;
  --surface: rgba(255, 255, 255, 0.025);
  --surface-2: rgba(255, 255, 255, 0.045);
  --surface-solid: #121a2b;
  --card: #131b2c;
  --card-hover: #172033;
  --border: #243049;
  --border-strong: #313e5b;
  --line: #1e2840;
  --line-soft: #19223a;
  --fg: #e8ecf5;
  --fg-strong: #ffffff;
  --muted: #97a2bc;
  --muted-2: #6d7893;
  --primary: #4f46e5;
  --primary-2: #4338ca;
  --primary-hover: #6366f1;
  --primary-soft: rgba(99, 102, 241, 0.14);
  --primary-border: rgba(99, 102, 241, 0.45);
  --accent: #6366f1;
  --accent-2: #818cf8;
  --accent-grad: linear-gradient(180deg, #4f46e5, #4338ca);
  --success: #2fb56b;
  --success-soft: rgba(47, 181, 107, 0.13);
  --success-border: rgba(47, 181, 107, 0.4);
  --warning: #d9a13b;
  --warning-soft: rgba(217, 161, 59, 0.13);
  --warning-border: rgba(217, 161, 59, 0.4);
  --danger: #e15b6b;
  --danger-soft: rgba(225, 91, 107, 0.12);
  --danger-border: rgba(225, 91, 107, 0.42);
  --info: #3aa5c9;
  --info-soft: rgba(58, 165, 201, 0.13);
  --radius: 12px;
  --radius-sm: 9px;
  --radius-xs: 7px;
  --r-sm: 8px;
  --r-md: 11px;
  --r-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(4, 8, 18, 0.4);
  --shadow-md: 0 6px 22px rgba(4, 8, 18, 0.45);
  --shadow-lg: 0 16px 48px rgba(4, 8, 18, 0.55);
  --glow: 0 0 0 1px rgba(99, 102, 241, 0.4);
  --side-w: 240px;
  --topbar-h: 58px;
  --font: 'Inter', 'Hind Siliguri', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Code', Menlo, Consolas, monospace;
}

[data-theme="light"] {
  --bg: #f6f7fb;
  --bg-2: #f9fafc;
  --bg-3: #edf0f6;
  --surface: rgba(15, 30, 60, 0.02);
  --surface-2: rgba(15, 30, 60, 0.045);
  --surface-solid: #ffffff;
  --card: #ffffff;
  --card-hover: #fbfcfe;
  --border: #dfe4ec;
  --border-strong: #c8d1de;
  --line: #e6eaf1;
  --line-soft: #eef1f6;
  --fg: #1a2434;
  --fg-strong: #0c1524;
  --muted: #5e6b82;
  --muted-2: #8593a8;
  --primary: #4f46e5;
  --primary-2: #4338ca;
  --primary-hover: #4338ca;
  --primary-soft: rgba(79, 70, 229, 0.09);
  --primary-border: rgba(79, 70, 229, 0.38);
  --accent: #4f46e5;
  --accent-2: #4338ca;
  --accent-grad: linear-gradient(180deg, #4f46e5, #4338ca);
  --success: #199a55;
  --success-soft: rgba(25, 154, 85, 0.09);
  --success-border: rgba(25, 154, 85, 0.35);
  --warning: #b47714;
  --warning-soft: rgba(180, 119, 20, 0.09);
  --warning-border: rgba(180, 119, 20, 0.35);
  --danger: #c93a4c;
  --danger-soft: rgba(201, 58, 76, 0.08);
  --danger-border: rgba(201, 58, 76, 0.35);
  --info: #0e7ea6;
  --info-soft: rgba(14, 126, 166, 0.08);
  --shadow-sm: 0 1px 2px rgba(22, 34, 58, 0.06);
  --shadow-md: 0 4px 16px rgba(22, 34, 58, 0.08);
  --shadow-lg: 0 14px 40px rgba(22, 34, 58, 0.14);
}

/* ── Base ─────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

body::before { content: none; }

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  cursor: pointer;
}

img { max-width: 100%; }

.code-inline {
  font-family: var(--mono);
  font-size: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  padding: 1px 6px;
  color: var(--fg);
}

[data-theme="light"] .code-inline { background: var(--bg-3); }

.hidden { display: none !important; }
.muted { color: var(--muted); }
.sm { font-size: 12px; }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

/* ── Layout shell ─────────────────────────────────────────── */

.layout { display: grid; grid-template-columns: 1fr; min-height: 100vh; }

.main {
  padding: calc(var(--topbar-h) + 16px) 14px 92px;
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
}

.side-nav { display: none; }

.top-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.top-shell-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 14px;
  height: var(--topbar-h);
}

.top-bar-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--fg-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-cluster { display: flex; align-items: center; gap: 10px; }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
}
.theme-toggle:hover { color: var(--fg); border-color: var(--border-strong); }
.theme-toggle svg { width: 16px; height: 16px; }

.profile-card {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 10px 5px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
  min-width: 0;
}
.profile-card:hover { background: var(--card-hover); border-color: var(--border-strong); }

.profile-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-3);
  flex-shrink: 0;
}

.profile-meta { min-width: 0; }

.profile-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--fg-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 128px;
}

.profile-role { font-size: 11px; color: var(--muted); }

/* ── Bottom nav (mobile) ──────────────────────────────────── */

.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 40;
  display: grid;
  grid-auto-flow: column;
  justify-content: space-around;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}

.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  text-decoration: none;
  position: relative;
}

.bottom-nav a svg { width: 19px; height: 19px; }
.bottom-nav a span { letter-spacing: 0.01em; }
.bottom-nav a.active { color: var(--primary); }
.bottom-nav a.active svg { color: var(--primary); }
.bottom-nav a.active::before {
  content: '';
  position: absolute;
  top: -7px;
  left: 50%;
  transform: translateX(-50%);
  width: 34px; height: 2.5px;
  border-radius: 2px;
  background: var(--primary);
}

/* ── Desktop sidebar ──────────────────────────────────────── */

@media (min-width: 992px) {
  .layout { grid-template-columns: var(--side-w) 1fr; }
  .main {
    grid-column: 2;
    padding: calc(var(--topbar-h) + 22px) 26px 40px;
  }
  /* Keep the fixed top bar clear of the sidebar so the page title is visible */
  .top-bar { left: var(--side-w); right: 0; }
  .side-nav {
    display: flex;
    flex-direction: column;
    position: fixed !important;
    top: 0; left: 0; bottom: 0;
    width: var(--side-w);
    background: var(--bg-2);
    border-right: 1px solid var(--line);
    padding: 16px 12px;
    z-index: 50;
  }
  .bottom-nav { display: none !important; }
}

.side-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 16px;
  border-bottom: 1px solid var(--line);
}

.side-brand svg { width: 34px; height: 34px; flex-shrink: 0; }
.side-brand svg rect { fill: var(--accent); }

.side-brand-name {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--fg-strong);
}
.side-brand-name span { color: var(--primary); }

.side-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 14px;
  flex: 1;
  overflow-y: auto;
}

.side-links a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.12s ease, color 0.12s ease;
}

.side-links a svg { width: 17px; height: 17px; flex-shrink: 0; }
.side-links a span { white-space: nowrap; }

.side-links a:hover { background: var(--surface-2); color: var(--fg); }

.side-links a.active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}
[data-theme="light"] .side-links a.active { background: var(--primary-soft); }
.side-links a.active svg { color: var(--primary); }

.side-foot {
  padding: 12px 10px 2px;
  font-size: 11px;
  color: var(--muted-2);
  border-top: 1px solid var(--line);
}

/* ── Buttons ──────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-strong);
  background: var(--card);
  color: var(--fg);
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  line-height: 1.25;
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.06s ease;
  user-select: none;
}

.btn:hover { background: var(--card-hover); border-color: var(--border-strong); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn-cta, .btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}
.btn-cta:hover, .btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.btn-ghost { background: transparent; border-color: var(--border-strong); color: var(--fg); }
.btn-ghost:hover { background: var(--surface-2); }

.btn-danger { background: transparent; border-color: var(--danger-border); color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); }

.btn-success { background: var(--success); border-color: var(--success); color: #fff; }
.btn-success:hover { filter: brightness(1.06); background: var(--success); }

.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: var(--radius-xs); }
.btn-block { display: flex; width: 100%; }

.btn-google {
  background: var(--card);
  border: 1px solid var(--border-strong);
  color: var(--fg);
  font-weight: 600;
  padding: 10px 16px;
}
.btn-google:hover { background: var(--card-hover); border-color: var(--border-strong); }
.btn-google svg { flex-shrink: 0; }
.btn-google:disabled { opacity: 0.6; }

.link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 600;
}
.link-btn:hover { color: var(--primary-hover); text-decoration: underline; }

/* ── Forms ────────────────────────────────────────────────── */

.form-group { margin-bottom: 14px; }

.form-group label, label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}

input, textarea, select {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-2);
  color: var(--fg);
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

/* Prevent iOS Safari auto-zoom: focusing any control below 16px on a
   small screen makes the page zoom in and stick. 16px stops that. */
@media (max-width: 640px) {
  input, textarea, select { font-size: 16px; }
}

textarea { resize: vertical; min-height: 70px; }

input::placeholder, textarea::placeholder { color: var(--muted-2); }

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

input:disabled { opacity: 0.6; cursor: not-allowed; background: var(--bg-3); }

select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238a94a8' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

[data-theme="light"] select option { background: #fff; color: #1a2434; }

.form-stack { display: flex; flex-direction: column; gap: 4px; }

.create-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}
@media (min-width: 720px) {
  .create-grid { grid-template-columns: 1fr 1fr; }
}

.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 42px; }

.pw-toggle {
  position: absolute;
  right: 6px; top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border: none;
  background: transparent;
  color: var(--muted);
  border-radius: var(--radius-xs);
}
.pw-toggle:hover { color: var(--fg); background: var(--surface-2); }

/* ── Badges & chips ───────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  white-space: nowrap;
}

.badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
}

.badge-success, .badge-online, .badge-active, .badge-available, .badge-allowed {
  background: var(--success-soft);
  border-color: var(--success-border);
  color: var(--success);
}
.badge-success::before, .badge-online::before, .badge-active::before,
.badge-available::before, .badge-allowed::before { background: var(--success); }

.badge-warn, .badge-pending, .badge-claimed, .badge-expired {
  background: var(--warning-soft);
  border-color: var(--warning-border);
  color: var(--warning);
}
.badge-warn::before, .badge-pending::before, .badge-claimed::before,
.badge-expired::before { background: var(--warning); }

.badge-danger, .badge-error, .badge-rejected, .badge-unwanted, .badge-attack, .badge-used {
  background: var(--danger-soft);
  border-color: var(--danger-border);
  color: var(--danger);
}
.badge-danger::before, .badge-error::before, .badge-rejected::before,
.badge-unwanted::before, .badge-attack::before, .badge-used::before { background: var(--danger); }

.badge-disabled, .badge-offline {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--muted);
}
.badge-disabled::before, .badge-offline::before { background: var(--muted); }

.badge-personal, .badge-business, .badge-otp, .badge-info {
  background: var(--info-soft);
  border-color: var(--info);
  color: var(--info);
}
.badge-personal::before, .badge-business::before, .badge-otp::before, .badge-info::before { background: var(--info); }

.meta-chip {
  display: inline-flex;
  align-items: center;
  font-size: 11.5px;
  font-weight: 600;
  padding: 2.5px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  margin-right: 6px;
}
.meta-chip b { color: var(--fg); }

.meta-chip-warn {
  background: var(--warning-soft);
  border-color: var(--warning-border);
  color: var(--warning);
}

.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--card);
  color: var(--muted);
}
.chip-btn:hover { color: var(--fg); border-color: var(--border-strong); background: var(--card-hover); }
.chip-btn.on {
  background: var(--primary-soft);
  border-color: var(--primary-border);
  color: var(--primary);
}

/* ── Cards & sections ─────────────────────────────────────── */

.section-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 14px;
  overflow: hidden;
}
.section-card::before { content: none; }

.sh {
  padding: 13px 16px 11px;
  border-bottom: 1px solid var(--line);
}
.sh h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--fg-strong);
  letter-spacing: -0.01em;
}

.sb { padding: 14px 16px; }

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--fg-strong);
  margin: 0 0 2px;
}

.card-sub { font-size: 12px; color: var(--muted); margin: 0; }

.card-meta { font-size: 12px; color: var(--muted); margin-top: 8px; }

.card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.mono-box {
  font-family: var(--mono);
  font-size: 12.5px;
  background: var(--bg-2);
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  color: var(--fg);
  word-break: break-all;
  user-select: all;
}

.list-stack { display: flex; flex-direction: column; gap: 10px; }

.empty {
  padding: 26px 14px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.empty.loading { opacity: 0.7; }

/* ── Login ────────────────────────────────────────────────── */

.login-body { min-height: 100vh; }

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 14px;
  background: var(--bg);
}

.login-bg { content: none; display: none; }
.login-bg, .login-bg::before, .login-bg::after { display: none; }

.login-shell { width: 100%; max-width: 408px; }

.login-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 30px 26px 24px;
  box-shadow: var(--shadow-md);
}
.login-card::before { content: none; }

.login-brand { text-align: center; margin-bottom: 22px; }

.login-logo { display: inline-flex; margin-bottom: 12px; }
.login-logo svg { width: 52px; height: 52px; }
.login-logo svg rect { fill: var(--accent); }

.login-brand h1 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--fg-strong);
}

.login-brand p { margin: 0; font-size: 12.5px; color: var(--muted); }

.login-submit { margin-top: 4px; padding: 11px 16px; font-size: 14px; }

.login-row-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 7px;
}

.login-foot {
  margin: 16px 0 0;
  text-align: center;
  font-size: 11.5px;
  color: var(--muted-2);
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 14px;
  color: var(--muted-2);
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.login-divider::before, .login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

.forgot-panel {
  margin-top: 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.forgot-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--fg-strong);
  margin-bottom: 8px;
}

.forgot-steps {
  margin: 0 0 12px;
  padding-left: 18px;
  color: var(--muted);
  font-size: 12.5px;
  display: grid;
  gap: 6px;
}
.forgot-steps code {
  font-family: var(--mono);
  font-size: 11.5px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 5px;
}

/* ── Alerts & toasts ──────────────────────────────────────── */

.alert {
  padding: 10px 13px;
  border-radius: var(--r-sm);
  font-size: 13px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--fg);
  margin-bottom: 12px;
}

.alert-error {
  background: var(--danger-soft);
  border-color: var(--danger-border);
  color: var(--danger);
  font-weight: 500;
}

.toast-wrap {
  position: fixed;
  bottom: calc(18px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  width: max-content;
  max-width: calc(100vw - 24px);
}

.toast {
  background: var(--surface-solid);
  color: var(--fg);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: pp-toast-in 0.18s ease;
  max-width: 100%;
}

.toast.error { border-color: var(--danger-border); color: var(--danger); }
.toast.info { border-color: var(--primary-border); color: var(--primary); }

@keyframes pp-toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Modal ────────────────────────────────────────────────── */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(5, 9, 18, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

@media (min-width: 640px) {
  .modal-backdrop { align-items: center; padding: 20px; }
}

.modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px 16px 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  padding: 20px;
  box-shadow: var(--shadow-lg);
  animation: pp-modal-in 0.16s ease;
}
.modal::before { content: none; }

@media (min-width: 640px) {
  .modal { border-radius: 16px; max-height: 86vh; }
}

@keyframes pp-modal-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: var(--fg-strong);
}

.modal-lead { margin: 0 0 14px; font-size: 12.5px; color: var(--muted); }

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.modal-actions .btn { min-width: 90px; }

.modal-scroll { overflow-y: auto; padding-right: 2px; }

/* ── Page toolbar ─────────────────────────────────────────── */

.page-toolbar {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 16px;
}
@media (min-width: 720px) {
  .page-toolbar { flex-direction: row; align-items: flex-end; justify-content: space-between; }
}

.page-toolbar-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--fg-strong);
  margin: 0;
}

.page-toolbar-sub { font-size: 12.5px; color: var(--muted); margin: 0; }

/* ── Filters & search ─────────────────────────────────────── */

.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 14px;
}

.filter-bar input, .filter-bar select, .search-bar {
  width: auto;
  min-width: 0;
  flex: 1 1 150px;
  max-width: 100%;
  padding: 8px 12px;
  font-size: 13px;
  border-radius: var(--r-sm);
}
.filter-bar select { flex: 0 0 auto; }

.search-bar:focus { border-color: var(--primary); }

.pay-toolbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}
@media (min-width: 640px) {
  .pay-toolbar { flex-direction: row; align-items: center; justify-content: space-between; }
}

.pay-search { max-width: 340px; }

.pay-filters { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Dashboard ────────────────────────────────────────────── */

.dash-hero {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.dash-hero::before { content: none; }
@media (min-width: 860px) {
  .dash-hero { flex-direction: row; align-items: center; justify-content: space-between; }
}

.dash-hero-main { min-width: 0; }

.dash-hero-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 6px;
}

.dash-hero-value {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--fg-strong);
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.dash-hero-sub { font-size: 12.5px; color: var(--muted); margin: 6px 0 0; }

.dash-hero-side {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.dash-mini {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 10px 14px;
  min-width: 118px;
}
.dash-mini span { display: block; font-size: 11px; color: var(--muted); font-weight: 600; }
.dash-mini b { display: block; font-size: 17px; color: var(--fg-strong); margin-top: 2px; font-variant-numeric: tabular-nums; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
@media (min-width: 720px) { .stat-grid { grid-template-columns: repeat(4, 1fr); } }

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 13px 15px;
}
.stat-card:hover { border-color: var(--border-strong); }

.stat-card .label { font-size: 11.5px; color: var(--muted); font-weight: 600; }

.stat-card .value {
  font-size: 20px;
  font-weight: 800;
  color: var(--fg-strong);
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.stat-card.accent .value { color: var(--primary); }

.dash-panels {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 860px) { .dash-panels { grid-template-columns: 1fr 1fr; } }

.dash-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

/* ── Chart bars ───────────────────────────────────────────── */

.chart-bars {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 8px;
  align-items: end;
  padding-top: 6px;
}

.chart-col { display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 0; }

.chart-bar-wrap {
  width: 100%;
  height: 110px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: var(--bg-2);
  border-radius: var(--radius-xs);
  border: 1px solid var(--line-soft);
  padding: 5px 4px;
}

.chart-bar {
  width: 70%;
  max-width: 26px;
  border-radius: 4px;
  background: var(--primary);
  min-height: 3px;
  transition: height 0.2s ease;
}

.chart-label {
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.chart-val { font-size: 10.5px; font-weight: 700; color: var(--fg); font-variant-numeric: tabular-nums; }

/* ── Wallet bars ──────────────────────────────────────────── */

.wallet-bars { display: flex; flex-direction: column; gap: 12px; }

.wallet-bar-row { }

.wallet-bar-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.wallet-bar-name { font-size: 13px; font-weight: 600; color: var(--fg-strong); }

.wallet-bar-meta { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

.wallet-bar-track {
  height: 8px;
  background: var(--bg-2);
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  overflow: hidden;
}

.wallet-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--primary);
  transition: width 0.25s ease;
}

.wallet-device-select { max-width: 260px; margin-bottom: 12px; }

/* ── Transactions ─────────────────────────────────────────── */

.tx-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 13px 14px;
  margin-bottom: 10px;
  transition: border-color 0.12s ease;
}
.tx-card:hover { border-color: var(--border-strong); }
.tx-card:focus-within { border-color: var(--primary-border); }
.tx-card:focus-within .tx-expand { visibility: visible; }
.tx-card.is-open { border-color: var(--primary-border); }
.tx-card.is-open .tx-expand { visibility: visible; }

.tx-card.needs-review { border-left: 3px solid var(--warning); }
.tx-card.used { opacity: 0.78; }
.tx-card.available { border-left: 3px solid var(--success); }

.tx-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.tx-main-left { display: flex; flex-direction: column; gap: 3px; min-width: 0; }

.tx-amt {
  font-size: 16.5px;
  font-weight: 800;
  color: var(--fg-strong);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.tx-wallet-line { font-size: 12px; color: var(--muted); }

.tx-main-right { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }

.tx-age { font-size: 11.5px; color: var(--muted-2); white-space: nowrap; }

.tx-id-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.tx-trx { font-family: var(--mono); font-size: 12px; color: var(--fg); }

.btn-copy {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--muted);
}
.btn-copy:hover { color: var(--primary); border-color: var(--primary-border); background: var(--primary-soft); }

.tx-expand {
  visibility: hidden;
  border-top: 1px solid var(--line);
  margin-top: 10px;
  padding-top: 10px;
}

.tx-detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}
@media (min-width: 640px) { .tx-detail-grid { grid-template-columns: 1fr 1fr; } }

.tx-d { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; }
.tx-d span { color: var(--muted); }
.tx-d b { color: var(--fg); font-weight: 600; text-align: right; word-break: break-all; }

.tx-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* ── SMS cards ────────────────────────────────────────────── */

.sms-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 14px;
  margin-bottom: 10px;
}
.sms-card:hover { border-color: var(--border-strong); }

.sms-card.attack { border-left: 3px solid var(--danger); }
.sms-card.otp { border-left: 3px solid var(--info); }
.sms-card.claimed { opacity: 0.75; }
.sms-card.unwanted { opacity: 0.6; }
.sms-card.pending { border-left: 3px solid var(--warning); }

.sms-body {
  font-size: 12.5px;
  color: var(--fg);
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-xs);
  padding: 8px 10px;
  margin-top: 8px;
  word-break: break-word;
  font-family: var(--mono);
  line-height: 1.45;
}

/* ── Wallet types ─────────────────────────────────────────── */

.wallet-type-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px;
  margin-bottom: 10px;
}
.wallet-type-card:hover { border-color: var(--border-strong); }

.wtc-body { display: flex; gap: 12px; align-items: flex-start; }

.wtc-logo {
  width: 44px; height: 44px;
  border-radius: var(--r-sm);
  background: var(--bg-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  font-weight: 800;
  color: var(--primary);
}

.wtc-logo img { width: 100%; height: 100%; object-fit: cover; }
.wtc-logo.no-img::after { content: attr(data-initial); font-size: 17px; }

.wtc-fallback { display: flex; }
.wtc-fallback svg { width: 22px; height: 22px; }

.wtc-info { flex: 1; min-width: 0; }

.wtc-title { font-size: 14px; font-weight: 700; color: var(--fg-strong); margin: 0 0 2px; }

.wtc-sub { font-size: 12px; color: var(--muted); margin: 0; }

.wtc-meta { font-size: 12px; color: var(--muted); margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }

.wtc-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* ── Devices / users / license cards ──────────────────────── */

.device-card, .user-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 13px 14px;
  margin-bottom: 10px;
}
.device-card:hover, .user-card:hover { border-color: var(--border-strong); }

.lt-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px;
  margin-bottom: 12px;
}
.lt-card:hover { border-color: var(--border-strong); }

.lt-card-title { font-size: 14px; font-weight: 700; color: var(--fg-strong); margin: 0 0 3px; }

.lt-card-desc { font-size: 12.5px; color: var(--muted); margin: 0 0 10px; }

.lt-item {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  margin-bottom: 8px;
}

.lt-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.lt-name { font-size: 12.5px; font-weight: 700; color: var(--fg); }

.lt-use { font-size: 11px; color: var(--muted); }

.lt-ver { font-size: 11px; color: var(--muted-2); font-family: var(--mono); }

.lt-mask {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg);
  background: var(--surface-2);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-xs);
  padding: 6px 9px;
  margin-top: 8px;
  word-break: break-all;
  user-select: all;
}

.lt-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

.lt-divider { height: 1px; background: var(--line); margin: 14px 0; }

/* ── Account / settings ───────────────────────────────────── */

.account-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
}

.account-avatar {
  width: 54px; height: 54px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-3);
  flex-shrink: 0;
}

.account-info { min-width: 0; }

.account-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--fg-strong);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-meta {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
  min-width: 0;
}

.settings-actions { display: flex; flex-direction: column; gap: 8px; }

/* Profile details grid (Me page) */
.profile-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 640px) {
  .profile-grid { grid-template-columns: 1fr 1fr; }
}
.profile-cell {
  min-width: 0;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 10px 12px;
}
.profile-cell-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-2);
  margin-bottom: 4px;
}
.profile-cell-value {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--fg-strong);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pin-copy {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  border-radius: 999px;
  padding: 2px 9px;
  cursor: pointer;
}
.pin-copy:hover { border-color: var(--primary); }

.support-pin-actions { margin-top: 10px; }

.profile-edit-card { }

.profile-preview-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 8px;
}
.profile-preview-row img {
  width: 38px; height: 38px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-3);
  border: 1px solid var(--border);
}

/* ── Telegram card ────────────────────────────────────────── */

.tg-connected-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 14px;
}

.tg-connected-main { flex: 1; min-width: 0; }

.tg-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-3);
  flex-shrink: 0;
}

.tg-meta { font-size: 11.5px; color: var(--muted); min-width: 0; }

.tg-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--fg-strong);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tg-user {
  font-size: 12.5px;
  color: var(--primary);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
[data-theme="light"] .tg-user { color: var(--primary); }

.tg-id {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tg-unbind { flex-shrink: 0; }

/* ── Utility grids ────────────────────────────────────────── */

.grid-cards { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 860px) { .grid-cards { grid-template-columns: 1fr 1fr; } }

.page { animation: pp-page-in 0.15s ease; }

@keyframes pp-page-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pp-spin { to { transform: rotate(360deg); } }

.empty.loading::before {
  content: '';
  display: inline-block;
  width: 14px; height: 14px;
  margin-right: 8px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--primary);
  border-radius: 50%;
  vertical-align: -2px;
  animation: pp-spin 0.8s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ════════════════════════════════════════════════════════════ */
/* v1.5.0 — Control Center components                              */
/* ════════════════════════════════════════════════════════════ */

/* ── Impersonation banner ───────────────────────────────────── */
.imp-banner {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 8px 14px;
  background: var(--warning-soft);
  border-bottom: 1px solid var(--warning-border);
  color: var(--fg);
  font-size: 12.5px;
}
.imp-banner .imp-text { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.imp-banner .imp-text b { color: var(--fg-strong); }
.imp-banner::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--warning);
  flex-shrink: 0;
}
body.has-imp .top-bar { top: 38px; }
body.has-imp .main { padding-top: calc(var(--topbar-h) + 38px + 16px); }
@media (min-width: 960px) {
  body.has-imp .side-nav { padding-top: 38px; }
}

/* ── Accounts page: search + pagination ─────────────────────── */
.accounts-toolbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}
.accounts-search-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.accounts-search {
  flex: 1;
  min-width: 0;
}
.accounts-search input {
  width: 100%;
}
.accounts-filters {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
/* Compact plan filter — full-width selects belong to forms, not toolbars */
.accounts-filters select { width: auto; min-width: 140px; max-width: 200px; flex: 0 0 auto; }
.accounts-count {
  font-size: 12px;
  color: var(--muted);
  margin-left: auto;
  white-space: nowrap;
}
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 0 4px;
  flex-wrap: wrap;
}
.pager-info {
  font-size: 12.5px;
  color: var(--muted);
  padding: 0 6px;
}
.pager button {
  min-width: 34px;
}

.pin-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  color: var(--accent-2);
  border-radius: 999px;
  padding: 2px 10px;
  cursor: pointer;
}
[data-theme="light"] .pin-chip { color: var(--primary); }
.pin-chip:hover { border-color: var(--primary); }
.pin-chip .pin-label {
  font-family: var(--font);
  font-size: 10.5px;
  letter-spacing: 0;
  color: var(--muted);
}

.plan-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
  padding: 2px 9px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  white-space: nowrap;
}
.plan-badge.is-paid {
  background: var(--primary-soft);
  border-color: var(--primary-border);
  color: var(--accent-2);
}
[data-theme="light"] .plan-badge.is-paid { color: var(--primary); }
.plan-badge.is-expired {
  background: var(--warning-soft);
  border-color: var(--warning-border);
  color: var(--warning);
}

/* ── Plans page (owner) ─────────────────────────────────────── */
.plans-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 720px) {
  .plans-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1080px) {
  .plans-grid { grid-template-columns: repeat(4, 1fr); }
}
.plan-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  min-width: 0;
}
.plan-card.is-current {
  border-color: var(--primary-border);
  box-shadow: var(--glow);
}
.plan-card.is-inactive { opacity: 0.55; }
.plan-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.plan-head-name { min-width: 0; }
.plan-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--fg-strong);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.plan-code {
  font-size: 11px;
  color: var(--muted-2);
  font-family: var(--mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.plan-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}
.plan-price .amount {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--fg-strong);
  white-space: nowrap;
}
.plan-price .period {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.plan-tagline {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.45;
  min-height: 34px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.plan-feats {
  display: flex;
  flex-direction: column;
  gap: 0;
  font-size: 12.5px;
  color: var(--fg);
}
.plan-feats .pf-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--line-soft);
}
.plan-feats .pf-row:last-child { border-bottom: 0; }
.plan-feats .pf-row span { color: var(--muted); }
.plan-feats b { font-weight: 600; color: var(--fg-strong); }
.plan-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 6px;
  border-top: 1px solid var(--line-soft);
}
.plan-foot .card-actions { margin: 0; gap: 6px; }
.plan-subs {
  font-size: 11.5px;
  color: var(--muted-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.plan-card .card-actions { margin-top: auto; }

/* plan request rows */
.request-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  flex-wrap: wrap;
}
.request-row + .request-row { margin-top: 8px; }
.request-main {
  flex: 1;
  min-width: 200px;
}
.request-name {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--fg-strong);
}
.request-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.request-note {
  width: 100%;
  font-size: 12.5px;
  color: var(--muted);
  background: var(--surface);
  border-left: 2px solid var(--border-strong);
  padding: 6px 10px;
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  margin-top: 4px;
}

/* ── Support inbox (owner) ──────────────────────────────────── */
.support-thread {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sup-msg {
  max-width: 78%;
  padding: 10px 13px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  font-size: 13px;
  line-height: 1.5;
}
.sup-msg.in { align-self: flex-start; }
.sup-msg.out {
  align-self: flex-end;
  background: var(--primary-soft);
  border-color: var(--primary-border);
}
.sup-msg .sup-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--muted-2);
  margin-bottom: 4px;
}
.sup-msg .sup-meta b { color: var(--muted); font-weight: 600; }
.support-date-sep {
  align-self: center;
  font-size: 11px;
  color: var(--muted-2);
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--surface-2);
}
.support-reply-box {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.support-reply-box input { flex: 1; min-width: 0; }
.support-empty-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--accent-2);
  margin: 0 auto 10px;
}
[data-theme="light"] .support-empty-icon { color: var(--primary); }

/* ── Me page: plan + support cards (user) ───────────────────── */
.plan-usage-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line-soft);
  font-size: 13px;
}
.plan-usage-row:last-child { border-bottom: 0; }
.plan-usage-row .u-label { color: var(--muted); }
.plan-usage-row .u-value { font-weight: 600; color: var(--fg-strong); }
.u-value .limit { color: var(--muted); font-weight: 500; }

.usage-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
  margin: 8px 0 2px;
}
.usage-bar .fill {
  height: 100%;
  border-radius: 999px;
  background: var(--primary);
  transition: width 0.4s ease;
}
.usage-bar .fill.full { background: var(--danger); }

.support-pin-card {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.support-pin-big {
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--fg-strong);
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
}
.support-pin-side {
  flex: 1;
  min-width: 200px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.55;
}
.support-pin-side b { color: var(--fg); }

/* plan picker in upgrade modal */
.plan-pick {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.plan-pick label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  cursor: pointer;
}
.plan-pick label:hover { border-color: var(--border-strong); }
.plan-pick input { accent-color: var(--primary); }
.plan-pick .pp-name { font-weight: 600; font-size: 13px; }
.plan-pick .pp-meta { font-size: 11.5px; color: var(--muted); }
.plan-pick .pp-price { margin-left: auto; font-size: 12.5px; font-weight: 600; color: var(--fg-strong); white-space: nowrap; }

/* ── More sheet (mobile) ────────────────────────────────────── */
.more-sheet {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: flex-end;
}
.more-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 8, 18, 0.55);
  backdrop-filter: blur(2px);
}
.more-panel {
  position: relative;
  width: 100%;
  max-height: 70vh;
  overflow-y: auto;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  padding: 10px 16px calc(18px + env(safe-area-inset-bottom));
  box-shadow: var(--shadow-lg);
  animation: moreUp 0.22s ease;
}
@keyframes moreUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.more-handle {
  width: 38px; height: 4px;
  border-radius: 999px;
  background: var(--border-strong);
  margin: 4px auto 10px;
}
.more-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-2);
  margin-bottom: 8px;
}
#more-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
#more-links a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  color: var(--fg);
  font-size: 14px;
  font-weight: 500;
}
#more-links a:active, #more-links a.active { background: var(--primary-soft); color: var(--accent-2); }
[data-theme="light"] #more-links a.active { color: var(--primary); }
#more-links a svg { width: 19px; height: 19px; opacity: 0.8; }

/* bottom nav "more" dot */
.bottom-nav a[data-more] { position: relative; }

/* ── responsive guards for new components ───────────────────── */
@media (max-width: 520px) {
  .imp-banner { font-size: 11.5px; gap: 8px; padding: 7px 10px; }
  .support-pin-big { font-size: 21px; letter-spacing: 0.16em; }
  .plan-price .amount { font-size: 19px; }
  .accounts-count { display: none; }
}

/* ══════════════════════════════════════════════════════════════ */
/* v1.19.0 — Accounts tab, Instant Pay checkout, gateway settings */
/* ══════════════════════════════════════════════════════════════ */

/* ── Accounts tab ──────────────────────────────────────────── */
.filter-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.filter-chip {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font);
  border-radius: 999px;
  padding: 5px 12px;
  cursor: pointer;
  transition: all 0.12s ease;
  white-space: nowrap;
}
.filter-chip:hover { border-color: var(--border-strong); color: var(--fg); }
.filter-chip.active {
  background: var(--primary-soft);
  border-color: var(--primary-border);
  color: var(--accent-2);
}
[data-theme="light"] .filter-chip.active { color: var(--primary); }

.accounts-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}
@media (min-width: 900px) {
  .accounts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1400px) {
  .accounts-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.bulk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 10px;
  font-size: 13px;
}
.bulk-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.user-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}
.uc-select {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1;
}
.uc-check {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}
.uc-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding-right: 26px;
}
.uc-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--bg);
  flex-shrink: 0;
}
.uc-id { min-width: 0; flex: 1; }
.uc-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--fg-strong);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.uc-sub {
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.uc-badges {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.uc-meta {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  min-width: 0;
}
.uc-ellipsis {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.uc-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--line-soft);
}
.uc-actions .btn {
  width: 100%;
  min-width: 0;
  padding-left: 6px;
  padding-right: 6px;
  white-space: nowrap;
}
.uc-actions .uc-act-main { grid-column: 1 / -1; }
@media (max-width: 480px) {
  .uc-actions { grid-template-columns: repeat(2, 1fr); }
}

.btn-warn {
  background: var(--warning-soft);
  border-color: var(--warning-border);
  color: var(--warning);
}
.btn-warn:hover { border-color: var(--warning); }

/* ── Merchant plan card (Me) ───────────────────────────────── */
.plan-current-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.plan-current-name {
  font-size: 17px;
  font-weight: 800;
  color: var(--fg-strong);
  letter-spacing: -0.01em;
}

/* ── Instant Pay checkout ──────────────────────────────────── */
.co-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.co-head h3 { margin: 0; }
.co-instant-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--accent-2);
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}
[data-theme="light"] .co-instant-badge { color: var(--primary); }

.co-plan-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.co-plan {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  border-radius: var(--r-md);
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
  min-width: 0;
}
.co-plan:hover { border-color: var(--border-strong); }
.co-plan.selected {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.co-plan input { position: absolute; opacity: 0; pointer-events: none; }
.co-plan-radio {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  flex-shrink: 0;
  transition: all 0.12s ease;
}
.co-plan.selected .co-plan-radio {
  border-color: var(--primary);
  background: radial-gradient(circle, var(--primary) 0 4px, transparent 4.5px);
}
.co-plan-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.co-plan-name { font-weight: 700; font-size: 14px; color: var(--fg-strong); }
.co-plan-meta { font-size: 12px; color: var(--muted); }
.co-plan-price {
  font-size: 15px;
  font-weight: 800;
  color: var(--fg-strong);
  white-space: nowrap;
}

.co-summary {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg-2);
  padding: 4px 12px;
  margin: 10px 0;
}
.co-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  font-size: 13px;
  border-bottom: 1px dashed var(--line-soft);
}
.co-summary-row:last-child { border-bottom: 0; }
.co-summary-row > span:first-child { color: var(--muted); }
.co-summary-row b { color: var(--fg-strong); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co-summary-row.co-total { border-bottom: 0; padding-top: 10px; }
.co-summary-row.co-total b { font-size: 16px; font-weight: 800; }

.co-methods {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.co-method {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  border-radius: var(--r-md);
  padding: 10px 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--fg);
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.12s ease;
}
.co-method:hover { border-color: var(--border-strong); }
.co-method.selected {
  border-color: var(--logo, var(--primary));
  box-shadow: 0 0 0 1px var(--logo, var(--primary)) inset;
}
.co-method-logo {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--logo, var(--primary));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9.5px;
  font-weight: 800;
  flex-shrink: 0;
}

.co-payto {
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-md);
  padding: 12px 14px;
  margin-bottom: 12px;
  background: var(--bg-2);
}
.co-payto-label { font-size: 11.5px; color: var(--muted); margin-bottom: 6px; }
.co-payto-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.co-payto-number {
  font-family: var(--mono);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--fg-strong);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.co-steps {
  margin: 0 0 4px;
  padding-left: 18px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.7;
}

.co-status { text-align: center; }
.co-status-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 800;
  margin: 8px auto 12px;
}
.co-status-icon.ok {
  background: var(--success-soft, rgba(34, 197, 94, 0.12));
  color: var(--success);
  border: 1px solid var(--success);
}
.co-status-icon.warn {
  background: var(--warning-soft);
  color: var(--warning);
  border: 1px solid var(--warning-border);
}
.co-status h3 { margin: 0 0 6px; }
.co-receipt {
  text-align: left;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg-2);
  padding: 4px 12px;
  margin: 10px 0 14px;
}
.co-spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  animation: co-spin 0.8s linear infinite;
  margin: 14px auto 10px;
}
@keyframes co-spin { to { transform: rotate(360deg); } }

/* ── Owner payments list (Plans page) ──────────────────────── */
.orders-alert {
  background: var(--warning-soft);
  border: 1px solid var(--warning-border);
  color: var(--warning);
  border-radius: var(--r-md);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
}
.order-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  flex-wrap: wrap;
}
.order-row + .order-row { margin-top: 8px; }
.order-main { flex: 1; min-width: 220px; }
.order-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--fg-strong);
}
.order-title b { font-weight: 700; }
.order-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.order-meta code { font-size: 11px; }
.order-side {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── Owner gateway settings ────────────────────────────────── */
.gw-methods {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
@media (min-width: 760px) {
  .gw-methods { grid-template-columns: 1fr 1fr; }
}
.gw-method {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg-2);
  padding: 12px 14px;
  min-width: 0;
}
.gw-method-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.gw-method-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--logo, var(--primary));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}
.gw-method-title {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.gw-method-title b { font-size: 14px; color: var(--fg-strong); }
.gw-method-body { margin-top: 10px; }
.gw-method-body.gw-muted { opacity: 0.5; }
.gw-switch { position: relative; display: inline-block; flex-shrink: 0; }
.gw-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.gw-switch-slider {
  display: block;
  width: 40px;
  height: 22px;
  background: var(--border-strong);
  border-radius: 999px;
  transition: background 0.15s ease;
  pointer-events: none;
}
.gw-switch-slider::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s ease;
}
.gw-switch input:checked + .gw-switch-slider { background: var(--success); }
.gw-switch input:checked + .gw-switch-slider::after { transform: translateX(18px); }

.form-grid2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
@media (min-width: 560px) {
  .form-grid2 { grid-template-columns: 1fr 1fr; }
}

.gw-gwaccount {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--bg-2);
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 10px;
}
.gw-gwaccount.gw-ok { border-color: var(--success); }
.gw-gwaccount.gw-warn { border-color: var(--warning-border); }
.gw-gwaccount code { font-size: 12px; }

/* forgot panel note */
.forgot-note {
  font-size: 12.5px;
  color: var(--muted);
  margin: 0 0 10px;
  line-height: 1.5;
}

/* Bengali taka glyph — isolated so fallback-font metrics never collide
   with Inter digits at tight letter-spacing. */
.taka {
  letter-spacing: normal;
  margin-right: 0.08em;
  font-family: "Hind Siliguri", Inter, sans-serif;
  font-weight: 700;
}
.dash-hero-value .taka { margin-right: 0.1em; }

/* ── v1.20 additions ──────────────────────────────────────── */

/* Kill double-tap zoom on interactive elements (app-like feel) */
button, a, input, select, textarea, label, .filter-chip, .pin-chip, .meta-chip {
  touch-action: manipulation;
}

/* Full account details popup (owner) */
.ud-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}
.ud-head h3 { margin: 0 0 2px; }
.ud-avatar {
  width: 46px; height: 46px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--bg);
  flex-shrink: 0;
}
.ud-id { min-width: 0; }
.ud-sub { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.ud-grid {
  display: flex;
  flex-direction: column;
  margin-bottom: 14px;
}
.ud-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line-soft);
  min-width: 0;
}
.ud-row:last-child { border-bottom: 0; }
.ud-row > span {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  flex-shrink: 0;
}
.ud-val {
  min-width: 0;
  text-align: right;
  font-size: 13px;
  color: var(--fg-strong);
  font-weight: 600;
  overflow-wrap: anywhere;
}
.ud-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.ud-actions .btn {
  width: 100%;
  min-width: 0;
  padding-left: 6px;
  padding-right: 6px;
  white-space: nowrap;
}
.ud-actions [data-act="delete"] { grid-column: span 2; }
@media (max-width: 480px) {
  .ud-actions { grid-template-columns: repeat(2, 1fr); }
}

/* Dashboard mini lists (latest payments / newest accounts) */
.tx-mini-list { display: flex; flex-direction: column; }
.tx-mini-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line-soft);
  min-width: 0;
}
.tx-mini-row:last-child { border-bottom: 0; }
.tx-mini-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.tx-mini-main b { font-size: 13.5px; color: var(--fg-strong); }
.tx-mini-main .muted {
  font-size: 11.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tx-mini-side {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  white-space: nowrap;
}

/* Checkout TrxID verify */
.co-trx-check {
  margin: 14px 0 4px;
  padding: 12px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-md);
  background: var(--bg-2);
}
.co-trx-check label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 8px;
}
.co-trx-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.co-trx-row input {
  flex: 1;
  min-width: 0;
  font-family: var(--mono);
  letter-spacing: 0.06em;
}
.co-trx-row .btn { flex-shrink: 0; }

/* Gateway account picker */
.gw-acct-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.gw-acct-row select {
  flex: 1;
  min-width: 180px;
  max-width: 340px;
}

/* Grid item must be allowed to shrink below min-content, or long
   unbreakable content widens the whole page on phones. */
.layout > .main { min-width: 0; }
