:root {
  --bg: #0b0f14;
  --bg-elevated: #121820;
  --card: #161d28;
  --card-hover: #1c2533;
  --border: #2a3544;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --ok: #22c55e;
  --ok-bg: rgba(34, 197, 94, 0.12);
  --warn: #f59e0b;
  --warn-bg: rgba(245, 158, 11, 0.12);
  --bad: #ef4444;
  --bad-bg: rgba(239, 68, 68, 0.12);
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}
* { box-sizing: border-box; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  background-image: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(59, 130, 246, 0.15), transparent);
  color: var(--text);
  margin: 0;
  min-height: 100vh;
  line-height: 1.5;
}
.wrap {
  width: 100%;
  max-width: none;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}
.header-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem;
  margin-left: auto;
}
.header-url {
  display: flex; align-items: center; gap: 0.35rem;
  max-width: min(420px, 40vw);
}
.header-url input {
  margin: 0; font-size: 0.78rem; padding: 0.35rem 0.5rem;
  font-family: ui-monospace, monospace;
}
.header-user {
  font-size: 0.82rem; color: var(--muted); max-width: 220px;
  line-height: 1.35;
}
.brand { display: flex; align-items: center; gap: 0.75rem; }
.brand-icon {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--accent), #6366f1);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.1rem; color: #fff;
  flex-shrink: 0;
}
h1 { font-size: 1.35rem; margin: 0; font-weight: 700; }
.tagline { color: var(--muted); font-size: 0.85rem; margin: 0.15rem 0 0; }
.health-pill {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.35rem 0.75rem; border-radius: 999px;
  font-size: 0.8rem; font-weight: 600;
  background: var(--ok-bg); color: var(--ok);
  border: 1px solid rgba(34, 197, 94, 0.3);
}
.health-pill.offline { background: var(--bad-bg); color: var(--bad); border-color: rgba(239, 68, 68, 0.3); }
.health-pill.warn { background: var(--warn-bg); color: var(--warn); border-color: rgba(245, 158, 11, 0.35); }
.health-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.stats {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.75rem;
  padding: 0.85rem 1.5rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
@media (max-width: 1200px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}
.stat-label { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.stat-value { font-size: 1.5rem; font-weight: 700; margin-top: 0.2rem; }
.stat-click { cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.stat-click:hover { border-color: var(--accent); background: var(--card-hover); }
body.admin-read-only .write-only {
  display: none !important;
}

.global-banner {
  margin: 0 1.75rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  border: 1px solid rgba(245, 158, 11, 0.4);
  background: var(--warn-bg);
}
.layout {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  min-height: 0;
}
.admin-sidebar {
  width: 240px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 0.85rem 1.25rem;
  background: var(--bg-elevated);
  border-right: 1px solid var(--border);
}
.sidebar-head { padding: 0 0.35rem 0.5rem; }
.sidebar-title {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.sidebar-tab.tab {
  width: 100%;
  text-align: left;
  justify-content: flex-start;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
}
.sidebar-tab.tab:hover:not(.active) {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}
.sidebar-spacer { flex: 1; min-height: 0.5rem; }
.sidebar-section { padding: 0.5rem 0.35rem 0; }
.sidebar-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.45rem;
}
.sidebar-hint {
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0 0 0.4rem;
  line-height: 1.35;
}
.sidebar-user {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
  word-break: break-word;
}
.sidebar-url {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.sidebar-url input {
  margin: 0;
  font-size: 0.72rem;
  padding: 0.4rem 0.5rem;
  font-family: ui-monospace, monospace;
}
.sidebar-create { width: 100%; }
.main-panel {
  padding: 1rem 1.5rem 2rem;
  min-width: 0;
  flex: 1;
  width: 100%;
}
.main-inner { width: 100%; max-width: none; }
.tab-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.75rem; margin-bottom: 1rem;
}
.tab-heading-dynamic { margin: 0; flex: 1; }
.tab-bar-create { margin-left: auto; }
@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .admin-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    padding: 0.75rem 1rem;
  }
  .sidebar-head { width: 100%; }
  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
    gap: 0.35rem;
  }
  .sidebar-tab.tab { width: auto; }
  .sidebar-spacer { display: none; }
  .sidebar-section { width: 100%; }
  .sidebar-create { display: none; }
  .tab-bar-create { display: inline-flex; }
}
@media (min-width: 901px) {
  .tab-bar-create { display: none; }
}
.page-grid { display: grid; gap: 1rem; width: 100%; margin-bottom: 1rem; }
.page-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.page-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.page-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) {
  .page-grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .page-grid.cols-2, .page-grid.cols-3, .page-grid.cols-4 { grid-template-columns: 1fr; }
  .header-url { max-width: 100%; }
}
.card.mb-0 { margin-bottom: 0; }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}
.card-title {
  font-size: 0.95rem; font-weight: 600; margin: 0 0 1rem;
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
}
label { display: block; font-size: 0.78rem; color: var(--muted); margin-bottom: 0.35rem; font-weight: 500; }
input, select, textarea {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 0.9rem;
  margin-bottom: 0.85rem;
  transition: border-color 0.15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}
.input-row { display: flex; gap: 0.5rem; }
.input-row input { flex: 1; margin-bottom: 0; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem;
  background: var(--accent); color: #fff; border: none;
  padding: 0.5rem 0.9rem; border-radius: 8px;
  cursor: pointer; font-weight: 600; font-size: 0.85rem;
  transition: background 0.15s, transform 0.1s;
  white-space: nowrap;
}
.btn:hover { background: var(--accent-hover); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.secondary { background: #334155; }
.btn.secondary:hover { background: #475569; }
.btn.ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn.ghost:hover { background: var(--card-hover); }
.btn.danger { background: var(--bad); }
.btn.sm { padding: 0.35rem 0.6rem; font-size: 0.78rem; }
.btn.icon { padding: 0.4rem 0.55rem; min-width: 2rem; }
.hint { font-size: 0.8rem; color: var(--muted); margin: -0.35rem 0 0.85rem; }
.hint code { background: var(--bg-elevated); padding: 2px 6px; border-radius: 4px; font-size: 0.78rem; }
.toolbar {
  display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center;
  margin-bottom: 1rem;
}
.toolbar input { margin-bottom: 0; flex: 1; min-width: 180px; }
.badge {
  display: inline-block; padding: 0.2rem 0.55rem; border-radius: 6px;
  font-size: 0.72rem; font-weight: 600; text-transform: uppercase;
}
.badge-active { background: var(--ok-bg); color: var(--ok); }
.badge-suspended { background: var(--bad-bg); color: var(--bad); }
.badge-lead { background: rgba(99, 102, 241, 0.15); color: #a5b4fc; }
.badge-expired { background: var(--bad-bg); color: var(--bad); }
.badge-soon { background: var(--warn-bg); color: var(--warn); }
table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
th {
  text-align: left; padding: 0.6rem 0.5rem;
  color: var(--muted); font-weight: 600; font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.03em;
  border-bottom: 1px solid var(--border);
}
td { padding: 0.65rem 0.5rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:hover td { background: rgba(255,255,255,0.02); }
.serial-cell { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }
.serial-cell code {
  font-size: 0.8rem; background: var(--bg-elevated);
  padding: 0.25rem 0.5rem; border-radius: 6px;
  border: 1px solid var(--border);
}
.detail-row td { padding: 0 0.5rem 0.85rem; background: var(--bg-elevated); }
.detail-panel {
  border: 1px solid var(--border); border-radius: 8px;
  padding: 0.75rem 1rem; margin-top: 0.25rem;
}
.device-list { list-style: none; margin: 0; padding: 0; }
.device-list li {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.5rem; padding: 0.5rem 0; border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
}
.device-list li:last-child { border-bottom: none; }
.device-id { font-family: ui-monospace, monospace; font-size: 0.75rem; color: var(--muted); }
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.empty-icon { font-size: 2.5rem; margin-bottom: 0.5rem; opacity: 0.5; }
#toast {
  position: fixed; bottom: 1.25rem; right: 1.25rem; z-index: 300;
  padding: 0.75rem 1.1rem; border-radius: 10px; font-size: 0.9rem; font-weight: 500;
  box-shadow: var(--shadow); transform: translateY(120%); opacity: 0;
  transition: transform 0.25s, opacity 0.25s;
  max-width: 360px;
}
#toast.show { transform: translateY(0); opacity: 1; }
#toast.ok { background: #14532d; color: #bbf7d0; border: 1px solid #22c55e; }
#toast.err { background: #7f1d1d; color: #fecaca; border: 1px solid #ef4444; }
.loading { opacity: 0.6; pointer-events: none; }
.tabs {
  display: flex; gap: 0.25rem; margin-bottom: 0.5rem;
  overflow-x: auto; flex-wrap: nowrap; padding-bottom: 0.25rem;
  -webkit-overflow-scrolling: touch;
}
.tab {
  padding: 0.45rem 0.85rem; border-radius: 8px; border: none;
  background: transparent; color: var(--muted); cursor: pointer;
  font-weight: 600; font-size: 0.85rem; flex-shrink: 0;
}
.tab.active { background: var(--accent); color: #fff; }
.tab-heading {
  font-size: 1.15rem; font-weight: 700; margin: 0 0 1rem;
  color: var(--text);
}
.panel { display: none; }
.panel.active { display: block; }
.filters { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.75rem; }
.filter-chip {
  padding: 0.3rem 0.65rem; border-radius: 999px; border: 1px solid var(--border);
  background: transparent; color: var(--muted); font-size: 0.78rem; font-weight: 600; cursor: pointer;
}
.filter-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.65); z-index: 200;
  display: none; align-items: center; justify-content: center; padding: 1rem;
}
.modal-backdrop.show { display: flex; }
.modal {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.25rem; width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto;
}
.modal h3 { margin: 0 0 1rem; font-size: 1rem; }
.modal-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.5rem; }
.activity-list { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow-y: auto; }
.activity-list li {
  padding: 0.6rem 0; border-bottom: 1px solid var(--border); font-size: 0.82rem;
}
.row-actions { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.action-more { position: relative; display: inline-block; }
.action-more summary { list-style: none; }
.action-more summary::-webkit-details-marker { display: none; }
.action-more-menu {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 20;
  min-width: 160px; background: var(--card); border: 1px solid var(--border);
  border-radius: 8px; padding: 0.35rem; box-shadow: var(--shadow);
}
.action-more-menu .btn { width: 100%; justify-content: flex-start; margin: 0.15rem 0; }
.auth-locked .main-panel,
.auth-locked .admin-sidebar { pointer-events: none; opacity: 0.55; }
.created-banner {
  background: var(--ok-bg); border: 1px solid rgba(34,197,94,0.35);
  border-radius: 8px; padding: 0.85rem 1rem; margin-top: 0.75rem;
  display: none;
}
.created-banner.show { display: block; }
.created-banner code { font-size: 1rem; font-weight: 600; color: var(--ok); }

/* Dashboard */
.status-strip {
  display: flex; flex-wrap: wrap; gap: 1.25rem 2rem;
  align-items: flex-start;
}
.status-strip .status-item { font-size: 0.85rem; }
.status-strip .status-label { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.2rem; }
.attention-list { list-style: none; margin: 0; padding: 0; }
.attention-list li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.65rem 0; border-bottom: 1px solid var(--border);
  cursor: pointer; font-size: 0.88rem;
}
.attention-list li:hover { color: var(--accent); }
.attention-list li:last-child { border-bottom: none; }
.attention-count {
  font-weight: 700; min-width: 2rem; text-align: right;
}
.feed-list { list-style: none; margin: 0; padding: 0; }
.feed-list li {
  padding: 0.55rem 0; border-bottom: 1px solid var(--border);
  font-size: 0.82rem; cursor: pointer;
}
.feed-list li:hover { background: rgba(255,255,255,0.02); }
.feed-type { font-size: 0.7rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; }
.setup-details { margin-top: 0.5rem; }
.setup-details summary { cursor: pointer; color: var(--muted); font-size: 0.85rem; }
.setup-steps { margin: 0.5rem 0 0; padding-left: 1.2rem; font-size: 0.85rem; color: var(--muted); }
.setup-steps li { margin-bottom: 0.35rem; }

/* Security tab */
.enterprise-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; width: 100%; }
@media (max-width: 1100px) { .enterprise-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .enterprise-grid { grid-template-columns: 1fr; } }
.security-overview-row {
  display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: flex-start;
}
.security-score-ring {
  width: 88px; height: 88px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem; font-weight: 800; flex-shrink: 0;
  border: 4px solid var(--border);
}
.security-score-ring.ok { border-color: var(--ok); color: var(--ok); }
.security-score-ring.warn { border-color: var(--warn); color: var(--warn); }
.sec-checklist.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.5rem; }
@media (max-width: 768px) { .sec-checklist.cols-2 { grid-template-columns: 1fr; } }
.quick-actions { display: flex; flex-direction: column; gap: 0.5rem; }
.quick-actions .btn { justify-content: flex-start; width: 100%; }
.diag-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem 1rem; font-size: 0.85rem;
}
.diag-item { padding: 0.5rem 0.65rem; background: var(--bg-elevated); border-radius: 8px; border: 1px solid var(--border); }
.diag-label { font-size: 0.7rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; }
.users-table { width: 100%; font-size: 0.85rem; }
.users-table th, .users-table td { padding: 0.55rem 0.5rem; }
.activity-list.tall { max-height: none; min-height: 320px; }
.user-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.5rem 0; border-bottom: 1px solid var(--border); font-size: 0.85rem; gap: 0.5rem;
}
.sec-checklist { list-style: none; margin: 0.75rem 0 0; padding: 0; font-size: 0.85rem; }
.sec-checklist li { padding: 0.35rem 0; display: flex; align-items: flex-start; gap: 0.5rem; }
.sec-checklist .ok { color: var(--ok); }
.sec-checklist .warn { color: var(--warn); }
.twofa-box { text-align: center; padding: 0.75rem; background: #0b0f14; border: 1px solid var(--border); border-radius: 10px; margin: 0.75rem 0; }
.twofa-box img { display: block; margin: 0 auto 0.75rem; border-radius: 8px; background: #fff; padding: 8px; }
.twofa-secret { font-family: ui-monospace, monospace; font-size: 0.75rem; word-break: break-all; color: var(--muted); margin-top: 0.5rem; }
.twofa-steps { font-size: 0.8rem; color: var(--muted); text-align: left; margin: 0.75rem 0 0; padding-left: 1.1rem; line-height: 1.5; }
.sec-badge { display: inline-block; font-size: 0.7rem; padding: 0.15rem 0.45rem; border-radius: 999px; font-weight: 600; }
.sec-badge.on { background: var(--ok-bg); color: var(--ok); }
.sec-badge.off { background: var(--warn-bg); color: var(--warn); }

/* Create drawer */
.drawer-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 150;
  display: none; opacity: 0; transition: opacity 0.2s;
}
.drawer-backdrop.show { display: block; opacity: 1; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100vw);
  background: var(--card); border-left: 1px solid var(--border);
  z-index: 160; transform: translateX(100%); transition: transform 0.25s ease;
  overflow-y: auto; padding: 1.25rem 1.5rem 2rem;
  box-shadow: -8px 0 32px rgba(0,0,0,0.4);
}
.drawer.show { transform: translateX(0); }
.drawer-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1rem;
}
.drawer-header h3 { margin: 0; font-size: 1.05rem; }
.drawer-close {
  background: transparent; border: none; color: var(--muted);
  font-size: 1.5rem; cursor: pointer; line-height: 1; padding: 0.25rem;
}
.drawer-close:hover { color: var(--text); }
.form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem;
}
.form-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 480px) { .form-grid { grid-template-columns: 1fr; } }

/* Login page */
body.page-login {
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem; min-height: 100vh;
}
.page-login .shell { width: 100%; max-width: 420px; }
.page-login .brand { text-align: center; margin-bottom: 1.5rem; }
.page-login .brand h1 { font-size: 1.35rem; font-weight: 600; letter-spacing: -0.02em; }
.page-login .brand p { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.875rem; }
.page-login .card { box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45); }
.page-login .steps { display: flex; gap: 0.5rem; margin-bottom: 1.25rem; }
.page-login .step { flex: 1; height: 4px; border-radius: 2px; background: var(--border); transition: background 0.3s; }
.page-login .step.active { background: var(--accent); }
.page-login .step.done { background: var(--ok); }
.page-login .panel { display: none; }
.page-login .panel.show { display: block; }
.page-login .btn { width: 100%; }
.page-login .btn.secondary { margin-top: 0.5rem; background: transparent; border: 1px solid var(--border); color: var(--text); }
.page-login .btn.secondary:hover { background: rgba(255,255,255,0.04); }
.page-login input.otp { text-align: center; font-size: 1.5rem; letter-spacing: 0.35em; font-weight: 600; }
.page-login .msg { font-size: 0.85rem; padding: 0.65rem 0.75rem; border-radius: 8px; margin-bottom: 1rem; display: none; }
.page-login .msg.err { display: block; background: rgba(239,68,68,0.12); color: #fca5a5; border: 1px solid rgba(239,68,68,0.25); }
.page-login .msg.ok { display: block; background: rgba(34,197,94,0.12); color: #86efac; border: 1px solid rgba(34,197,94,0.25); }
.page-login .secure-badge { display: flex; align-items: center; justify-content: center; gap: 0.4rem; margin-top: 1.25rem; font-size: 0.75rem; color: var(--muted); }
.page-login details { margin-top: 1.25rem; font-size: 0.8rem; color: var(--muted); }
.page-login summary { cursor: pointer; user-select: none; }
.page-login .otp-info { text-align: center; margin-bottom: 1rem; font-size: 0.875rem; color: var(--muted); }
.page-login .otp-info strong { color: var(--text); }
.page-login #legacyRecovery { opacity: 0.75; font-size: 0.78rem; }

/* Buy page */
body.page-buy {
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem; min-height: 100vh;
}
.page-buy .box { max-width: 440px; width: 100%; }
.page-buy .plan { border: 1px solid var(--border); border-radius: 8px; padding: 0.75rem; margin: 0.5rem 0; cursor: pointer; }
.page-buy .plan.selected { border-color: var(--accent); background: rgba(59,130,246,0.1); }
.page-buy .plan strong { display: block; }
.page-buy button.pay-btn { width: 100%; margin-top: 1rem; }
.page-buy .msg { margin-top: 0.75rem; font-size: 0.85rem; }
.page-buy .ok { color: var(--ok); }
.page-buy .err { color: var(--bad); }
.page-buy .footer-links { margin-top: 1.25rem; font-size: 0.8rem; color: var(--muted); text-align: center; }
.page-buy .footer-links a { color: var(--accent); text-decoration: none; }
.page-buy .footer-links a:hover { text-decoration: underline; }
