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

:root {
  --bg:      #09090f;
  --bg2:     #111118;
  --bg3:     #1a1a24;
  --bg4:     #22222f;
  --border:  #2a2a3a;
  --text:    #e2e2f0;
  --muted:   #7878a0;
  --accent:  #7c6bff;
  --accent2: #6254e8;
  --green:   #22d86a;
  --yellow:  #f5c842;
  --red:     #ff4c6a;
  --orange:  #ff8c42;
  --radius:  12px;
  --sidebar: 240px;
  --nav-h:   60px;

  /* legacy aliases used in JS/inline styles */
  --surface: var(--bg2);
  --card:    var(--bg2);
  --success: var(--green);
  --danger:  var(--red);
  --warning: var(--yellow);
  --accent-hover: var(--accent2);
}

html { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  font-size: 14px;
  line-height: 1.5;
}

::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

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

/* ── Layout ─────────────────────────────────────────────────────────────── */
.layout { display: flex; min-height: 100dvh; }

.sidebar {
  width: var(--sidebar);
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 100;
}

.sidebar-logo {
  padding: 18px 18px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 16px;
}

.sidebar-logo span { color: var(--accent); }

.sidebar-logo-icon {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}

.sidebar-nav { flex: 1; padding: 8px; overflow-y: auto; }

.nav-section { font-size: 10px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .8px; padding: 10px 12px 4px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
  transition: all .15s;
  user-select: none;
}

.nav-item:hover { background: var(--bg3); color: var(--text); text-decoration: none; }
.nav-item.active { background: rgba(124,107,255,.15); color: var(--accent); font-weight: 600; }
.nav-item .icon { font-size: 16px; width: 20px; text-align: center; }

.sidebar-footer { padding: 12px; border-top: 1px solid var(--border); }

.user-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; background: var(--bg3); border-radius: 8px;
}

.user-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff; flex-shrink: 0;
}

.user-email { font-size: 12px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-role  { font-size: 11px; color: var(--muted); }

.main {
  margin-left: var(--sidebar);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

/* ── Bottom nav (mobile) ───────────────────────────────────────────────── */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  z-index: 100;
  height: var(--nav-h);
}

.bnav-item {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 3px; cursor: pointer;
  color: var(--muted); font-size: 10px;
  transition: color .15s; padding: 6px 0;
}

.bnav-item.active { color: var(--accent); }
.bnav-icon { font-size: 20px; }

.bnav-plus {
  width: 40px; height: 40px;
  background: var(--accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: #fff; margin-bottom: 2px;
  box-shadow: 0 2px 16px rgba(124,107,255,.5);
}

@media (max-width: 768px) {
  .sidebar { display: none; }
  .main { margin-left: 0; padding-bottom: var(--nav-h); }
  .bottom-nav { display: flex; }
}

/* ── Page header ────────────────────────────────────────────────────────── */
.page-header {
  padding: 20px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.page-title    { font-size: 22px; font-weight: 700; }
.page-subtitle { color: var(--muted); font-size: 13px; margin-top: 2px; }

.scroll-area { flex: 1; overflow-y: auto; padding: 16px 24px 24px; }

/* ── Cards ──────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.card-title { font-size: 15px; font-weight: 600; margin-bottom: 14px; }

/* ── Stats ──────────────────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

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

.stat-value { font-size: 28px; font-weight: 700; }
.stat-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-top: 2px; }
.stat-diff  { font-size: 11px; color: var(--green); margin-top: 3px; }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 14px; border-radius: 8px; font-size: 13px; font-weight: 500;
  border: none; cursor: pointer; transition: all .15s;
  text-decoration: none; user-select: none; white-space: nowrap;
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent2); color: #fff; text-decoration: none; }

.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

.btn-ghost { background: transparent; border: none; color: var(--muted); }
.btn-ghost:hover { background: var(--bg3); color: var(--text); }

.btn-danger { background: rgba(255,76,106,.12); color: var(--red); border: 1px solid rgba(255,76,106,.3); }
.btn-danger:hover { background: rgba(255,76,106,.22); text-decoration: none; }

.btn-success { background: rgba(34,216,106,.12); color: var(--green); border: 1px solid rgba(34,216,106,.3); }
.btn-success:hover { background: rgba(34,216,106,.22); text-decoration: none; }

.btn-sm  { padding: 5px 10px; font-size: 12px; }
.btn-full{ width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ── Forms ──────────────────────────────────────────────────────────────── */
.form-group  { margin-bottom: 16px; }
.form-group label, label { display: block; font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 6px; }

.input, input[type="text"], input[type="email"], input[type="password"],
input[type="url"], input[type="number"], input[type="time"], select, textarea {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 8px 12px;
  font-size: 13px;
  transition: border-color .15s;
  outline: none;
  font-family: inherit;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124,107,255,.15);
}

select { cursor: pointer; background: var(--bg3); }

textarea { resize: vertical; }

input[type="range"] { accent-color: var(--accent); width: 100%; }

/* ── File upload ─────────────────────────────────────────────────────────── */
.upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.upload-area:hover, .upload-area.drag {
  border-color: var(--accent);
  background: rgba(124,107,255,.05);
}

.upload-area input { display: none; }
.upload-preview { width: 80px; height: 80px; object-fit: contain; border-radius: 12px; margin-bottom: 8px; }

/* ── Chips / badges ──────────────────────────────────────────────────────── */
.badge, .chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 20px; font-size: 11px; font-weight: 500;
  background: var(--bg3); color: var(--muted); border: 1px solid var(--border);
}

.badge-pending, .chip-yellow { background: rgba(245,200,66,.1); color: var(--yellow); border-color: rgba(245,200,66,.2); }
.badge-building              { background: rgba(124,107,255,.1); color: var(--accent); border-color: rgba(124,107,255,.2); }
.badge-done, .chip-green     { background: rgba(34,216,106,.1); color: var(--green); border-color: rgba(34,216,106,.2); }
.badge-failed, .chip-red     { background: rgba(255,76,106,.1); color: var(--red); border-color: rgba(255,76,106,.2); }
.chip-blue                   { background: rgba(124,107,255,.1); color: var(--accent); border-color: rgba(124,107,255,.2); }

/* ── Section title ──────────────────────────────────────────────────────── */
.section-title {
  font-size: 11px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: .7px;
  margin-bottom: 10px; margin-top: 4px;
}

/* ── Builds grid ────────────────────────────────────────────────────────── */
.builds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.build-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
  cursor: pointer; transition: all .15s;
  position: relative;
}

.build-card:hover { border-color: var(--accent); transform: translateY(-1px); }

/* ── Selection mode ─────────────────────────────────────────────────────── */
.card-select-overlay {
  display: none; position: absolute; inset: 0;
  border-radius: var(--radius); z-index: 5; cursor: pointer;
}
.builds-grid.selection-mode .card-select-overlay { display: block; }

.select-check {
  display: none; position: absolute; top: 10px; right: 10px; z-index: 6;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--bg3); border: 1.5px solid var(--border);
  align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: transparent;
  transition: all .12s;
}
.builds-grid.selection-mode .select-check { display: flex; }
.build-card.selected .select-check {
  background: var(--accent); border-color: var(--accent);
  color: #fff;
}
.build-card.selected {
  border-color: var(--accent) !important;
  background: rgba(124,107,255,.07);
  transform: none;
}

.selection-bar {
  display: none; align-items: center; gap: 12px;
  padding: 10px 14px; margin-bottom: 12px;
  background: var(--bg2); border: 1px solid var(--accent);
  border-radius: var(--radius);
  animation: fadeIn .15s ease;
}

.build-logo {
  width: 40px; height: 40px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--orange));
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0; overflow: hidden;
}

.build-logo img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }

/* ── Devices grid ───────────────────────────────────────────────────────── */
.devices-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.device-card {
  display: block;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
  cursor: pointer; transition: all .15s;
  text-decoration: none; color: inherit;
}

.device-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.device-card.active { border-color: var(--accent); background: rgba(124,107,255,.05); }

/* ── Online dot ─────────────────────────────────────────────────────────── */
.dot {
  display: inline-block;
  width: 8px; height: 8px; border-radius: 50%;
  flex-shrink: 0;
}

.dot-online {
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(34,216,106,.2);
  animation: pulse 2s infinite;
}

.dot-offline { background: var(--muted); }

@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 3px rgba(34,216,106,.2); }
  50%      { box-shadow: 0 0 0 6px rgba(34,216,106,.05); }
}

/* ── Battery ────────────────────────────────────────────────────────────── */
.battery-bar { display: flex; align-items: center; gap: 5px; font-size: 12px; }

/* ── Tabs ───────────────────────────────────────────────────────────────── */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 24px;
  gap: 0;
}
.tabs::-webkit-scrollbar { display: none; }

.tab {
  padding: 12px 16px; font-size: 13px; font-weight: 500;
  color: var(--muted); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: all .15s; white-space: nowrap;
}

.tab:hover { color: var(--text); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.tab-panel { display: none; }
.tab-panel.active { display: flex; flex-direction: column; flex: 1; min-height: 0; }

/* ── Detail rows ────────────────────────────────────────────────────────── */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.detail-item {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 14px;
}

.detail-label { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.detail-value { font-size: 14px; font-weight: 500; word-break: break-all; }

/* legacy detail-row for renderDetail() */
.detail-row { display: flex; gap: 8px; margin-bottom: 10px; align-items: flex-start; }
.detail-row .detail-label { width: 130px; flex-shrink: 0; font-size: 12px; color: var(--muted); padding-top: 2px; font-weight: 400; }
.detail-row .detail-value { font-size: 14px; word-break: break-all; }

/* ── SIM cards ──────────────────────────────────────────────────────────── */
.sim-cards { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }

.sim-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 14px; flex: 1; min-width: 140px;
}

.sim-slot    { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.sim-carrier { font-size: 14px; font-weight: 600; }
.sim-country { font-size: 11px; color: var(--muted); margin-top: 2px; }
.sim-imei   { font-size: 10px; color: var(--muted); font-family: monospace; margin-top: 4px; }
.sim-phone  { font-size: 13px; font-weight: 600; margin-top: 6px; color: var(--text); }

/* ── Volume bars ────────────────────────────────────────────────────────── */
.vol-bars { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }

.vol-item {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 14px;
  min-width: 88px; flex: 1; text-align: center;
}

.vol-name  { font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.vol-track { height: 4px; background: var(--bg4); border-radius: 2px; overflow: hidden; }
.vol-fill  { height: 100%; background: var(--accent); border-radius: 2px; }
.vol-pct   { font-size: 12px; font-weight: 600; margin-top: 4px; }

/* ── Notif / SMS / Log items ─────────────────────────────────────────────── */
.notif-item, .sms-item-card, .log-item, .ussd-item, .active-notif-item {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 14px; margin-bottom: 8px;
}

.notif-app   { font-size: 11px; color: var(--accent); font-weight: 600; margin-bottom: 3px; }
.notif-title { font-weight: 600; font-size: 13px; margin-bottom: 2px; }
.notif-text  { font-size: 12px; color: var(--muted); line-height: 1.4; }
.notif-meta  { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* Legacy panel styles (kept for JS compatibility) */
.notif-panel, .sms-panel, .cmd-log-panel, .active-notif-panel { display: block; }

.sms-badge { font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 4px; flex-shrink: 0; margin-top: 2px; }
.sms-badge-inbox { background: rgba(124,107,255,.2); color: var(--accent); }
.sms-badge-sent  { background: rgba(34,216,106,.15); color: var(--green); }
.sms-addr  { font-size: 13px; font-weight: 600; }
.sms-body  { font-size: 12px; color: var(--muted); margin-top: 2px; word-break: break-word; }
.sms-meta  { font-size: 11px; color: var(--muted); margin-top: 3px; }

.cmd-log-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px;
}
.cmd-log-item:last-child { border-bottom: none; }
.cmd-ok  { color: var(--green); font-weight: 700; flex-shrink: 0; }
.cmd-err { color: var(--red); font-weight: 700; flex-shrink: 0; }

.active-notif-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* ── Once btn ───────────────────────────────────────────────────────────── */
.once-btn {
  font-size: 11px; padding: 3px 8px; border-radius: 20px;
  cursor: pointer; border: 1px solid var(--border);
  background: transparent; color: var(--muted); transition: .15s;
}

.once-btn.once-on  { border-color: var(--accent); color: var(--accent); }
.once-btn.once-off { border-color: var(--green);  color: var(--green); }

/* ── App item ───────────────────────────────────────────────────────────── */
.app-item { padding: 10px 20px; border-bottom: 1px solid var(--border); }
.app-item:last-child { border-bottom: none; }
.app-item-name { font-size: 14px; font-weight: 500; }
.app-item-pkg  { font-size: 11px; color: var(--muted); font-family: monospace; margin-top: 1px; }

/* ── Modals ─────────────────────────────────────────────────────────────── */
.modal-backdrop {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.8); z-index: 200;
  align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
.modal-backdrop.open { display: flex; }

.modal {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); width: 480px; max-width: 95vw;
  max-height: 85vh; display: flex; flex-direction: column;
  overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,.7);
  animation: modalIn .2s ease;
}

@keyframes modalIn { from { opacity: 0; transform: scale(.96) translateY(8px); } to { opacity: 1; transform: none; } }

.modal-header {
  padding: 18px 20px; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  flex-shrink: 0;
}

.modal-header h3 { margin: 0; font-size: 16px; font-weight: 600; }
.modal-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.modal-close { background: none; border: none; color: var(--muted); font-size: 20px; cursor: pointer; line-height: 1; padding: 0; }
.modal-close:hover { color: var(--text); }

.modal-toolbar {
  padding: 12px 20px; border-bottom: 1px solid var(--border);
  display: flex; gap: 8px; flex-wrap: wrap; flex-shrink: 0;
}

.modal-body { overflow-y: auto; flex: 1; }

.modal-footer {
  padding: 14px 20px; border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 8px; flex-shrink: 0;
}

.modal-search { padding: 12px 20px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.modal-search input { width: 100%; }

/* ── Toast ──────────────────────────────────────────────────────────────── */
#toast-container {
  position: fixed; bottom: 24px; right: 20px; z-index: 9999;
  display: flex; flex-direction: column; gap: 8px;
}

@media (max-width: 768px) {
  #toast-container { bottom: calc(var(--nav-h) + 12px); right: 12px; left: 12px; }
}

.toast {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 10px; padding: 11px 16px; font-size: 13px;
  max-width: 340px; animation: slideIn .2s ease;
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
}

.toast.success { border-left: 3px solid var(--green); }
.toast.error   { border-left: 3px solid var(--red); }
.toast.info    { border-left: 3px solid var(--accent); }

@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ── Back button ────────────────────────────────────────────────────────── */
.back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--accent); cursor: pointer; font-size: 13px; font-weight: 500;
  background: none; border: none; padding: 6px 0; transition: opacity .15s;
}

.back-btn:hover { opacity: .75; }

/* ── Empty state ────────────────────────────────────────────────────────── */
.empty-state { text-align: center; color: var(--muted); padding: 48px 20px; }
.empty-state .empty-icon { font-size: 40px; margin-bottom: 10px; }

/* ── Filter row ─────────────────────────────────────────────────────────── */
.filter-row { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }

.search-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg3); border: 1px solid var(--border); border-radius: 8px;
  padding: 7px 12px; flex: 1;
}
.search-box input { background: none; border: none; outline: none; color: var(--text); font-size: 13px; flex: 1; min-width: 0; }
.search-box input::placeholder { color: var(--muted); }

/* ── Build status block ─────────────────────────────────────────────────── */
.build-status-block { text-align: center; padding: 48px 20px; }

.build-spinner {
  width: 48px; height: 48px;
  border: 3px solid var(--border); border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 0 auto 16px;
}

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

/* ── Tier cards ─────────────────────────────────────────────────────────── */
.tier-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }

.tier-card {
  background: var(--bg2); border: 2px solid var(--border);
  border-radius: var(--radius); padding: 20px; text-align: center;
  transition: border-color .15s;
}

.tier-card.current { border-color: var(--accent); }
.tier-name  { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.tier-price { font-size: 28px; font-weight: 700; color: var(--accent); margin-bottom: 16px; }
.tier-price span { font-size: 14px; color: var(--muted); font-weight: 400; }
.tier-features { list-style: none; text-align: left; font-size: 13px; color: var(--muted); }
.tier-features li { padding: 4px 0; }
.tier-features li::before { content: '✓ '; color: var(--green); }

/* ── Auth ───────────────────────────────────────────────────────────────── */
.auth-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: var(--bg); }
.auth-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 40px; width: 100%; max-width: 400px;
}
.auth-card h1 { font-size: 22px; margin-bottom: 8px; }
.auth-card p  { color: var(--muted); margin-bottom: 28px; font-size: 14px; }

/* ── Build preview phone ────────────────────────────────────────────────── */
.preview-phone {
  width: 160px; height: 300px;
  background: #000; border-radius: 28px; border: 3px solid #222;
  margin: 0 auto;
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 10px; padding: 20px;
}

.preview-icon { width: 56px; height: 56px; border-radius: 12px; background: var(--border); overflow: hidden; }
.preview-icon img { width: 100%; height: 100%; object-fit: cover; }
.preview-name { font-size: 12px; font-weight: 600; text-align: center; color: var(--text); }
.preview-url  { font-size: 10px; color: var(--muted); text-align: center; word-break: break-all; }
.preview-browser {
  width: 100%; flex: 1; background: var(--bg3); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--muted);
}

/* ── Divider ────────────────────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 14px 0; }

/* ── Info notice ────────────────────────────────────────────────────────── */
.info-notice {
  background: rgba(124,107,255,.08); border: 1px solid rgba(124,107,255,.2);
  border-radius: 10px; padding: 12px; font-size: 12px; color: var(--muted); line-height: 1.6;
}

/* ── Responsive table fallback ─────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; padding: 10px 12px; color: var(--muted); font-weight: 500; font-size: 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 12px; border-bottom: 1px solid rgba(42,42,58,.5); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,.02); }

/* ── Progress bar ──────────────────────────────────────────────────────── */
.progress-bar { height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); border-radius: 2px; transition: width .3s; }

/* ── Panel scroll wrapper ──────────────────────────────────────────────── */
.panel-scroll { flex: 1; min-height: 0; overflow-y: auto; }
