/* ══════════════════════════════════════════════════════════════════════════
   Sweeps Farmer — terminal instrument panel / technical blueprint UI
   Square corners, hairline borders, monospace data, scarce neon-green signal.
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Reset & base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Surfaces */
  --bg:        #09090b;   /* dominant near-black */
  --bg-lift:   #0d0d10;   /* barely-lifted panel / input fill */
  --bg-lift2:  #111114;   /* hover / active fill */

  /* Text */
  --fg:        #fafafa;   /* headings / primary data */
  --fg-dim:    #a1a1aa;   /* body / labels (zinc-400) */
  --fg-dim2:   #71717a;   /* de-emphasized (zinc-500) */
  --fg-dim3:   #52525b;   /* faint (zinc-600) */

  /* Structural greens */
  --green-500: #3e9c35;
  --green-600: #168118;
  --green-700: #036704;
  --green-800: #084f09;
  --neon:      #4ade80;   /* accent — glows, dots, active, single primary */
  --neon-dim:  rgba(74,222,128,0.55);

  /* Hairlines */
  --hair:       rgba(255,255,255,0.08);
  --hair-soft:  rgba(255,255,255,0.05);
  --hair-strong:rgba(255,255,255,0.13);

  /* Semantics (status only, never decoration) */
  --amber:  #f59e0b;
  --red:    #f87171;
  --blue:   #60a5fa;

  /* Type roles */
  --mono:    ui-monospace, 'SF Mono', 'JetBrains Mono', 'Cascadia Code', 'Roboto Mono', Menlo, Consolas, 'Courier New', monospace;
  --sans:    'Geist', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Space Grotesk', 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --radius: 0;   /* square everything */
}

html {
  width: 560px;
  /* Chrome hands the popup a viewport a few px under the requested width (border +
     DPI rounding). Without max-width the layout stays a hard 560px and overflow:hidden
     amputates the right edge instead of reflowing — the status badges go first. */
  max-width: 100%;
  height: 600px;   /* Chrome caps popup height at 600px; 800 overflowed and forced a scroll */
  overflow: hidden;
}

body {
  width: 100%;
  max-width: 560px;
  height: 600px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg-dim);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

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

/* ── HUD viewfinder: L-brackets in the four outer corners of the popup ─────── */
#hud-frame {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 500;
}
#hud-frame .hud-c {
  position: absolute;
  width: 13px;
  height: 13px;
  border: 2px solid rgba(62,156,53,0.5);
}
#hud-frame .hud-tl { top: 4px;    left: 4px;    border-right: none; border-bottom: none; }
#hud-frame .hud-tr { top: 4px;    right: 4px;   border-left:  none; border-bottom: none; }
#hud-frame .hud-bl { bottom: 4px; left: 4px;    border-right: none; border-top:    none; }
#hud-frame .hud-br { bottom: 4px; right: 4px;   border-left:  none; border-top:    none; }

/* ── Signature "plaque": square panel with green registration marks ───────── */
.stat-block,
.macro-step-card,
.dev-note-box,
.macro-failure-banner,
.macro-row,
.site-row,
.insp-step,
.login-card {
  position: relative;
}
.stat-block::before, .stat-block::after,
.macro-step-card::before, .macro-step-card::after,
.dev-note-box::before, .dev-note-box::after,
.macro-failure-banner::before, .macro-failure-banner::after,
.macro-row::before, .macro-row::after,
.site-row::before, .site-row::after,
.insp-step::before, .insp-step::after,
.login-card::before, .login-card::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  pointer-events: none;
  border-color: var(--neon);
  opacity: 0.45;
  transition: opacity 0.16s ease;
}
/* top-left L */
.stat-block::before,
.macro-step-card::before,
.dev-note-box::before,
.macro-failure-banner::before,
.macro-row::before,
.site-row::before,
.insp-step::before,
.login-card::before {
  top: -3px; left: -3px;
  border-top: 1.5px solid;
  border-left: 1.5px solid;
}
/* bottom-right L */
.stat-block::after,
.macro-step-card::after,
.dev-note-box::after,
.macro-failure-banner::after,
.macro-row::after,
.site-row::after,
.insp-step::after,
.login-card::after {
  bottom: -3px; right: -3px;
  border-bottom: 1.5px solid;
  border-right: 1.5px solid;
}
/* interactive plaques brighten + glow on hover */
.macro-step-card:hover,
.macro-row:hover,
.site-row:hover,
.insp-step:hover {
  border-color: var(--neon);
  box-shadow: 0 0 18px rgba(62,156,53,0.25);
}
.macro-step-card:hover::before, .macro-step-card:hover::after,
.macro-row:hover::before, .macro-row:hover::after,
.site-row:hover::before, .site-row:hover::after,
.insp-step:hover::before, .insp-step:hover::after {
  opacity: 0.95;
}

/* ── Header (with blueprint grid) ─────────────────────────────────────────── */
#header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  background: var(--bg);
  border-bottom: 1px solid var(--hair);
  flex-shrink: 0;
  overflow: hidden;
}
/* fine drafting grid, faded toward the bottom */
#header::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px),
    radial-gradient(circle, rgba(74,222,128,0.4) 1px, transparent 1.6px);
  background-size: 30px 30px, 30px 30px, 120px 120px;
  background-position: 0 0, 0 0, 0 0;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 100%);
          mask-image: linear-gradient(180deg, #000 0%, transparent 100%);
}
#brand, #header-actions { position: relative; z-index: 1; }

#brand {
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand-icon { width: 18px; height: 18px; display: block; }
.brand-name {
  font-family: var(--display);
  font-weight: 600;
  font-size: 15px;
  color: var(--fg);
  letter-spacing: 0.02em;
}
.brand-version {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--fg-dim3);
  letter-spacing: 0.08em;
}

.btn-update-available {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  color: var(--amber);
  border: 1px solid rgba(245,158,11,0.5);
  border-radius: 0;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 3px 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, box-shadow 0.15s;
  animation: update-pulse 2.4s ease-in-out infinite;
}
.btn-update-available:hover { background: rgba(245,158,11,0.16); }
@keyframes update-pulse {
  0%, 100% { box-shadow: 0 0 0 rgba(245,158,11,0); }
  50%      { box-shadow: 0 0 12px rgba(245,158,11,0.4); }
}

#header-actions { display: flex; gap: 6px; }

/* ── Icon buttons (square, hairline, no glow) ─────────────────────────────── */
.icon-btn {
  background: transparent;
  border: 1px solid var(--hair);
  border-radius: 0;
  color: var(--fg-dim);
  font-family: var(--mono);
  font-size: 14px;
  width: 30px;
  height: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.icon-btn:hover { border-color: var(--neon-dim); color: var(--fg); background: var(--bg-lift); }
.icon-btn.active { border-color: var(--neon); color: var(--neon); }
.icon-btn.window-other { color: var(--fg-dim3); opacity: 0.6; }

/* ── Status bar ───────────────────────────────────────────────────────────── */
#status-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: var(--bg);
  border-bottom: 1px solid var(--hair);
  flex-shrink: 0;
}
/* margin-left:auto keeps the buttons pinned right even when the search field is
   hidden (non-list views), so the CTA never slides across the bar. */
#status-actions { display: flex; gap: 8px; margin-left: auto; flex-shrink: 0; }

/* ── Account search (filters the list, left of Collect All) ───────────────── */
#account-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}
.account-search-input {
  width: 100%;
  background: var(--bg-lift);
  border: 1px solid var(--hair);
  border-radius: 0;
  color: var(--fg);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.45;
  letter-spacing: 0.02em;
  /* Padding matches .btn-sm so the field is exactly as tall as Collect All. */
  padding: 6px 24px 6px 10px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.account-search-input:focus { border-color: var(--neon); box-shadow: 0 0 0 1px var(--neon); }
.account-search-input::placeholder { color: var(--fg-dim3); }
.account-search-input:not(:placeholder-shown) { border-color: var(--neon-dim); }

.account-search-clear {
  position: absolute;
  right: 1px;
  top: 1px;
  bottom: 1px;
  width: 22px;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--fg-dim3);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}
.account-search-clear:hover { color: var(--red); }

/* ── Status glyph dots (header count badges) ──────────────────────────────── */
.badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.badge-green  .dot { background: var(--neon); box-shadow: 0 0 6px rgba(74,222,128,0.8); }
.badge-yellow .dot { background: var(--amber); }
.badge-red    .dot { background: var(--red); }
.badge-green  { color: var(--neon); }
.badge-yellow { color: var(--amber); }
.badge-red    { color: var(--red); }

/* ══════════════════════════════════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════════════════════════════════ */

/* Primary = "circuit chip": solid green fill, black mono uppercase label,
   45°-notched opposite corners, small pulsing LED, subtle neon glow. */
.btn-primary {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green-500);
  color: #050505;
  border: none;
  border-radius: 0;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 9px 16px;
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 7px, 100% 100%, 7px 100%, 0 calc(100% - 7px));
  /* filter, not box-shadow: clip-path would crop a box-shadow, but drop-shadow
     follows the notched silhouette and paints outside it. */
  filter: drop-shadow(0 0 5px rgba(62,156,53,0.4));
  transition: background 0.15s, filter 0.15s;
}
.btn-primary::before {
  content: "";
  width: 6px;
  height: 6px;
  background: #062b06;
  box-shadow: 0 0 6px rgba(74,222,128,0.9);
  flex-shrink: 0;
  animation: led-pulse 1.6s ease-in-out infinite;
}
.btn-primary:hover { background: #46ac3c; filter: drop-shadow(0 0 9px rgba(62,156,53,0.6)); }
.btn-primary:disabled { opacity: 0.4; cursor: default; filter: none; }
.btn-primary:disabled::before { animation: none; box-shadow: none; }

@keyframes led-pulse {
  0%, 100% { background: #062b06; box-shadow: 0 0 2px rgba(74,222,128,0.5); }
  50%      { background: #b6ffce; box-shadow: 0 0 7px rgba(74,222,128,1); }
}

/* The single most important action per view: slow breathing neon glow. */
.btn-cta { animation: cta-breathe 2.2s ease-in-out infinite; }
@keyframes cta-breathe {
  0%, 100% { filter: drop-shadow(0 0 5px rgba(34,197,94,0.35)); }
  50%      { filter: drop-shadow(0 0 14px rgba(34,197,94,0.8)); }
}

/* Secondary = outlined terminal: transparent, green border/text, fills on hover */
.btn-secondary {
  background: transparent;
  color: var(--neon);
  border: 1px solid rgba(62,156,53,0.55);
  border-radius: 0;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 8px 15px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-secondary:hover { background: var(--green-500); color: #050505; border-color: var(--green-500); }
.btn-secondary:disabled { opacity: 0.4; cursor: default; }

/* Danger = outlined red terminal */
.btn-danger {
  background: transparent;
  color: var(--red);
  border: 1px solid rgba(248,113,113,0.5);
  border-radius: 0;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 8px 15px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-danger:hover { background: rgba(248,113,113,0.16); color: #fca5a5; border-color: var(--red); }
.btn-danger:disabled { opacity: 0.4; cursor: default; }

/* Small button size modifier */
.btn-sm {
  font-size: 11px;
  padding: 6px 11px;
  border-radius: 0;
}
.btn-sm.btn-primary { padding: 6px 12px; }

/* Plain square utility button (all others) */
.btn-plain {
  background: transparent;
  border: 1px solid var(--hair);
  border-radius: 0;
  color: var(--fg-dim);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 6px 11px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.btn-plain:hover { border-color: var(--neon-dim); color: var(--fg); background: var(--bg-lift); }

/* prefers-reduced-motion: hold a static glow, kill the pulses */
@media (prefers-reduced-motion: reduce) {
  .btn-cta { animation: none; filter: drop-shadow(0 0 10px rgba(34,197,94,0.55)); }
  .btn-primary::before { animation: none; background: #b6ffce; box-shadow: 0 0 6px rgba(74,222,128,0.9); }
  .btn-update-available, .row--captcha-needed td { animation: none; }
}

/* ── Main / views ─────────────────────────────────────────────────────────── */
#main {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  position: relative;
}
.view { display: none; }
.view.active { display: block; }

/* ── View header (back nav) ───────────────────────────────────────────────── */
.view-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px 10px;
  border-bottom: 1px solid var(--hair);
  margin-bottom: 12px;
}
.view-header h2 {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: 0.01em;
}
.back-btn {
  background: transparent;
  border: none;
  color: var(--neon);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  padding: 2px 0;
}
.back-btn:hover { color: var(--fg); }

/* ── Empty state ──────────────────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 56px 24px;
  color: var(--fg-dim2);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}

/* ══════════════════════════════════════════════════════════════════════════
   ACCOUNT TABLE = ruled spec sheet
   ══════════════════════════════════════════════════════════════════════════ */
#account-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
#account-table thead th {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--green-500);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--hair-strong);
  border-right: 1px solid var(--hair-soft);
}
#account-table thead th:last-child { border-right: none; }

.sort-th { cursor: pointer; user-select: none; transition: color 0.1s; white-space: nowrap; }
.sort-th:hover { color: var(--neon); }
.sort-arrow { color: var(--neon); margin-left: 4px; }

#account-table tbody tr {
  border-bottom: 1px solid var(--hair-soft);
  cursor: pointer;
  transition: background 0.1s;
}
#account-table tbody tr:hover { background: rgba(74,222,128,0.045); }
#account-table tbody td {
  padding: 9px 10px;
  vertical-align: middle;
  border-right: 1px solid var(--hair-soft);
}
#account-table tbody td:last-child { border-right: none; }

/* balance column right-aligned numerals */
#account-table thead th:nth-child(3),
#account-table tbody td.bal-cell { text-align: right; }

/* display:flex on a <th> drops it out of table layout — the browser wraps it in an
   anonymous cell, so the header stops reserving width for its own column and the
   badges end up flush against the clipped right edge. Keep the th a real table-cell
   and flex an inner wrapper instead. */
#account-table thead th:last-child {
  text-align: right;
  white-space: nowrap;
  padding: 8px 10px;
}
.badge-group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
#account-table thead th:last-child .badge { display: flex; align-items: center; gap: 5px; }

#account-table tfoot td {
  padding: 9px 10px;
  border-top: 1px solid var(--hair-strong);
}
.tfoot-label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--fg-dim2);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.tfoot-balance {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--neon);
  text-align: right;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 10px rgba(74,222,128,0.35);
}

/* Account cell */
.acc-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  /* 170px overran the 560px popup once the other three columns were at full width;
     names already ellipsize, so the column gives up 30px here. */
  max-width: 140px;
}
/* Casino chip — kept round on purpose (deliberate exception to square corners) */
.acc-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--green-500); /* overridden by inline style per-account */
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}
/* Combined overlay: radial rings (dark center, white inner ring, dark gap,
   transparent rim) + conic dark notches around the rim = poker-chip look. */
.acc-avatar::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle,
      rgba(0,0,0,0.82)       0%   48%,
      rgba(255,255,255,0.40) 49%  55%,
      rgba(0,0,0,0.55)       56%  63%,
      transparent            64%  100%
    ),
    conic-gradient(
      transparent  0deg  22.5deg, rgba(0,0,0,0.65)  22.5deg  45deg,
      transparent 45deg  67.5deg, rgba(0,0,0,0.65)  67.5deg  90deg,
      transparent 90deg 112.5deg, rgba(0,0,0,0.65) 112.5deg 135deg,
      transparent 135deg 157.5deg, rgba(0,0,0,0.65) 157.5deg 180deg,
      transparent 180deg 202.5deg, rgba(0,0,0,0.65) 202.5deg 225deg,
      transparent 225deg 247.5deg, rgba(0,0,0,0.65) 247.5deg 270deg,
      transparent 270deg 292.5deg, rgba(0,0,0,0.65) 292.5deg 315deg,
      transparent 315deg 337.5deg, rgba(0,0,0,0.65) 337.5deg 360deg
    );
  z-index: 1;
}
.acc-avatar-letter { position: relative; z-index: 2; }

.acc-name {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
  color: var(--fg);
  text-decoration: none;
}
.acc-name:hover { color: var(--neon); text-decoration: none; }

/* Balance cell */
.bal-cell { min-width: 86px; }
.bal-value {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;   /* keep "142.50 SC" on one line */
}
.bal-bar-wrap {
  height: 2px;
  background: var(--hair);
  border-radius: 0;
  margin-top: 5px;
  overflow: hidden;
}
.bal-bar-fill {
  height: 100%;
  background: var(--green-500);
  border-radius: 0;
  transition: width 0.4s ease;
}

/* Action buttons cell */
.actions-cell { white-space: nowrap; }
.row-actions { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }

/* Inline collect button (data action — solid green, no glow).
   flex:1 makes every state fill the actions column up to the cog, so the
   buttons are all as wide as the widest label ("Requires Login"). */
.collect-btn {
  flex: 1;
  border: 1px solid transparent;
  border-radius: 0;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 9px 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.collect-btn--ready    { background: var(--green-500); color: #050505; }
.collect-btn--ready:hover { background: #46ac3c; }
.collect-btn--done     { background: transparent; color: var(--fg-dim3); border-color: var(--hair); cursor: default; }
.collect-btn--running  { background: transparent; color: var(--neon); border-color: var(--neon-dim); }
.collect-btn--running:hover { background: rgba(74,222,128,0.12); }
/* failed = amber: last cycle failed but an auto-retry is scheduled */
.collect-btn--failed   { background: transparent; color: var(--amber); border-color: rgba(245,158,11,0.55); }
.collect-btn--failed:hover { background: rgba(245,158,11,0.14); }
.collect-btn--retrying { background: transparent; color: var(--red); border-color: rgba(248,113,113,0.5); }
.collect-btn--retrying:hover { background: rgba(248,113,113,0.14); }
.collect-btn--queued   { background: transparent; color: var(--neon); border-color: var(--neon-dim); }
.collect-btn--queued:hover { background: rgba(74,222,128,0.12); }
.collect-btn--captcha  { background: transparent; color: var(--amber); border-color: rgba(245,158,11,0.55); }
.collect-btn--captcha:hover { background: rgba(245,158,11,0.14); }
.collect-btn--login-required { background: transparent; color: var(--amber); border-color: rgba(245,158,11,0.55); }
.collect-btn--login-required:hover { background: rgba(245,158,11,0.14); }
.collect-btn--captcha-expired { background: transparent; color: var(--amber); border-color: rgba(245,158,11,0.55); }
.collect-btn--captcha-expired:hover { background: rgba(245,158,11,0.14); }
.stop-icon { color: var(--red); margin-left: 5px; font-size: 11px; vertical-align: middle; line-height: 1; }

/* Rows needing attention (login required) */
.row--login-required td {
  background: rgba(245,158,11,0.06);
  border-top:    1px solid var(--amber);
  border-bottom: 1px solid var(--amber);
}
.row--login-required td:first-child { border-left: 2px solid var(--amber); }
.row--login-required td:last-child  { border-right: 2px solid var(--amber); }

/* Captcha-needed row highlight */
@keyframes captcha-pulse {
  0%, 100% { border-color: var(--amber); }
  50%      { border-color: rgba(245,158,11,0.4); }
}
.row--captcha-needed td {
  background: rgba(245,158,11,0.06);
  border-top:    1px solid var(--amber);
  border-bottom: 1px solid var(--amber);
  animation: captcha-pulse 2s ease-in-out infinite;
}
.row--captcha-needed td:first-child { border-left: 2px solid var(--amber); }
.row--captcha-needed td:last-child  { border-right: 2px solid var(--amber); }

.retry-countdown {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--red);
  text-align: right;
  margin-top: 4px;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}
.retry-countdown--auto { color: var(--amber); }

/* Per-row icon buttons */
.row-icon-btn {
  background: transparent;
  border: 1px solid var(--hair);
  border-radius: 0;
  color: var(--fg-dim2);
  font-family: var(--mono);
  font-size: 11px;
  width: 26px;
  height: 26px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.1s, color 0.1s, background 0.1s;
}
.row-icon-btn:hover { border-color: var(--neon-dim); color: var(--fg); background: var(--bg-lift); }
.row-icon-btn.rec-btn { color: var(--red); border-color: rgba(248,113,113,0.4); }
.row-icon-btn.rec-btn:hover { background: rgba(248,113,113,0.14); }

/* Countdown cell */
.countdown-cell {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-dim);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.countdown-ready { color: var(--neon); font-weight: 700; text-shadow: 0 0 8px rgba(74,222,128,0.4); }
.countdown-paused { color: var(--fg-dim3); }

.timer-row { display: flex; align-items: center; gap: 5px; }

.timer-edit-btn {
  background: none;
  border: none;
  color: var(--fg-dim3);
  font-size: 11px;
  cursor: pointer;
  padding: 1px 3px;
  border-radius: 0;
  opacity: 0;
  transition: opacity 0.15s, color 0.15s;
}
tr:hover .timer-edit-btn { opacity: 1; }
.timer-edit-btn.active { opacity: 1; color: var(--neon); }

.timer-input-wrap { display: flex; align-items: center; gap: 5px; }
.timer-input {
  width: 48px;
  background: var(--bg-lift);
  border: 1px solid var(--neon-dim);
  border-radius: 0;
  color: var(--fg);
  font-family: var(--mono);
  font-size: 11px;
  padding: 3px 4px;
  outline: none;
  text-align: center;
}
.timer-set-btn {
  background: var(--green-500);
  border: none;
  border-radius: 0;
  color: #050505;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 8px;
  cursor: pointer;
}
.timer-set-btn:hover { background: #46ac3c; }
.timer-pause-btn {
  padding: 4px 10px;
  border-radius: 0;
  border: 1px solid var(--neon-dim);
  background: transparent;
  color: var(--neon);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.timer-pause-btn:hover { background: var(--green-500); color: #050505; }
.timer-pause-btn.active { border-color: var(--hair); color: var(--fg-dim2); }
.timer-pause-btn.active:hover { background: var(--bg-lift); color: var(--fg); }

/* Locked row (free plan limit exceeded) */
.row--locked { position: relative; cursor: pointer; }
.row--locked td { opacity: 0.3; filter: blur(2px); pointer-events: none; user-select: none; }
.row--locked .lock-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  gap: 6px; font-family: var(--mono); font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--fg-dim); pointer-events: none;
}
.row--locked .lock-overlay span { font-size: 13px; }

/* ══════════════════════════════════════════════════════════════════════════
   FORMS
   ══════════════════════════════════════════════════════════════════════════ */
#account-form { padding: 0 14px 20px; display: flex; flex-direction: column; }
/* Custom sites have no prefilled URL, so it is the first thing to fill in */
#account-form.form--custom #field-url-wrap { order: -1; }
.form-section-label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--fg);
  margin: 4px 0 12px;
}
.form-section-label--muted { color: var(--fg-dim2); margin-top: 0; }
.form-note { font-family: var(--mono); font-size: 10px; color: var(--fg-dim2); margin-top: -4px; }
.field { margin-bottom: 12px; }
.field label {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--green-500);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.optional { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--fg-dim3); }

.field input[type="text"],
.field input[type="url"],
.field input[type="number"],
.field input[type="password"] {
  width: 100%;
  background: var(--bg-lift);
  border: 1px solid var(--hair);
  border-radius: 0;
  padding: 8px 12px;
  color: var(--fg);
  font-family: var(--mono);
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus {
  border-color: var(--neon);
  box-shadow: 0 0 0 1px var(--neon), 0 0 12px rgba(74,222,128,0.18);
}
.field input::placeholder { color: var(--fg-dim3); }

.field-error {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--red);
  margin-top: 4px;
  min-height: 14px;
}

.password-wrap { display: flex; gap: 6px; align-items: center; }
.password-wrap input { flex: 1; }
.icon-btn-inline {
  background: transparent;
  border: 1px solid var(--hair);
  border-radius: 0;
  color: var(--fg-dim);
  font-size: 13px;
  padding: 9px 10px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.icon-btn-inline:hover { border-color: var(--neon-dim); color: var(--fg); background: var(--bg-lift); }

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--hair);
}

/* ── Segmented control ────────────────────────────────────────────────────── */
.segmented {
  display: flex;
  background: var(--bg);
  border: 1px solid var(--hair);
  border-radius: 0;
}
.seg-btn {
  flex: 1;
  background: none;
  border: none;
  border-right: 1px solid var(--hair);
  color: var(--fg-dim2);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 7px 8px;
  cursor: pointer;
  border-radius: 0;
  transition: background 0.15s, color 0.15s;
}
.seg-btn:last-child { border-right: none; }
.seg-btn:hover { color: var(--fg); }
.seg-btn.active { background: var(--green-500); color: #050505; }

/* ══════════════════════════════════════════════════════════════════════════
   DETAIL VIEW
   ══════════════════════════════════════════════════════════════════════════ */
.stat-blocks { display: flex; gap: 10px; padding: 0 14px 14px; }
.stat-block {
  flex: 1;
  background: var(--bg-lift);
  border: 1px solid var(--hair);
  border-radius: 0;
  padding: 12px;
  text-align: center;
}
.stat-label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--green-500);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 6px;
}
.stat-value {
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

/* ── Chart ────────────────────────────────────────────────────────────────── */
.chart-section { padding: 0 14px 14px; }
.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--green-500);
}
.range-buttons { display: flex; gap: 0; border: 1px solid var(--hair); }
.range-btn {
  background: transparent;
  border: none;
  border-right: 1px solid var(--hair);
  border-radius: 0;
  color: var(--fg-dim2);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 4px 8px;
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
}
.range-btn:last-child { border-right: none; }
.range-btn:hover { background: var(--bg-lift); color: var(--fg); }
.range-btn.active { background: var(--green-500); color: #050505; }

#balance-chart {
  display: block;
  width: 100%;
  border-radius: 0;
  border: 1px solid var(--hair);
  background: var(--bg-lift);
}
.chart-empty {
  text-align: center;
  color: var(--fg-dim2);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 22px 0;
  background: var(--bg-lift);
  border: 1px solid var(--hair);
}

/* ── Macro section ────────────────────────────────────────────────────────── */
.macro-section { padding: 12px 14px; border-top: 1px solid var(--hair); }
.macro-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.section-label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--green-500);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.macro-meta { font-family: var(--mono); font-size: 11px; color: var(--fg-dim2); }
.macro-actions { display: flex; gap: 6px; }

/* ── Notes section ────────────────────────────────────────────────────────── */
.notes-section {
  padding: 12px 14px;
  border-top: 1px solid var(--hair);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.notes-label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.notes-label--dev  { color: var(--blue); }
.notes-label--user { color: var(--green-500); }

.dev-note-box {
  background: rgba(96,165,250,0.06);
  border: 1px solid rgba(96,165,250,0.25);
  border-radius: 0;
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.dev-note-box::before, .dev-note-box::after { border-color: var(--blue); }
.dev-note-text {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--fg-dim);
  line-height: 1.5;
  white-space: pre-wrap;
}

.user-note-input {
  width: 100%;
  box-sizing: border-box;
  background: var(--bg-lift);
  border: 1px solid var(--hair);
  border-radius: 0;
  color: var(--fg);
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.5;
  padding: 8px 10px;
  resize: vertical;
  min-height: 62px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.user-note-input:focus { border-color: var(--neon); box-shadow: 0 0 0 1px var(--neon); }
.user-note-input::placeholder { color: var(--fg-dim3); }

/* ── Detail bottom actions ────────────────────────────────────────────────── */
.detail-bottom-actions {
  display: flex;
  gap: 8px;
  padding: 12px 14px 18px;
  border-top: 1px solid var(--hair);
}

/* ══════════════════════════════════════════════════════════════════════════
   SETTINGS
   ══════════════════════════════════════════════════════════════════════════ */
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 14px;
  border-bottom: 1px solid var(--hair);
}
.setting-label {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--fg);
  letter-spacing: 0.02em;
}
.setting-sub {
  padding: 6px 14px 10px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-dim2);
}

/* Toggle switch — square terminal style */
.toggle-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.toggle-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-track {
  width: 44px;
  height: 22px;
  background: var(--bg);
  border: 1px solid var(--hair-strong);
  border-radius: 0;
  position: relative;
  transition: border-color 0.25s, background 0.25s;
}
.toggle-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 0;
  background: var(--fg-dim2);
  transition: transform 0.22s cubic-bezier(0.4,0,0.2,1), background 0.22s;
}
.toggle-switch input:checked + .toggle-track { border-color: var(--neon); background: rgba(74,222,128,0.1); }
.toggle-switch input:checked + .toggle-track::after {
  transform: translateX(22px);
  background: var(--neon);
  box-shadow: 0 0 8px rgba(74,222,128,0.8);
}

.settings-divider { height: 1px; background: var(--hair); margin: 10px 14px 0; }
.settings-section-heading {
  padding: 14px 14px 6px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--green-500);
}
.setting-input {
  flex: 1;
  max-width: 180px;
  background: var(--bg-lift);
  border: 1px solid var(--hair);
  border-radius: 0;
  color: var(--fg);
  font-family: var(--mono);
  font-size: 12px;
  padding: 6px 9px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.setting-input:focus { border-color: var(--neon); box-shadow: 0 0 0 1px var(--neon); }

/* Backup callout row */
.setting-row.backup-row {
  background: rgba(62,156,53,0.06);
  border: 1px solid rgba(62,156,53,0.3);
  padding: 10px 12px;
  margin: 6px 0;
}
.setting-row.backup-row .setting-label { color: var(--neon); font-weight: 700; }

/* ══════════════════════════════════════════════════════════════════════════
   MACRO EDITOR
   ══════════════════════════════════════════════════════════════════════════ */
#view-macro-editor .view-header { justify-content: space-between; }
#macro-step-list {
  padding: 10px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.macro-step-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  background: var(--bg-lift);
  border: 1px solid var(--hair);
  border-radius: 0;
  cursor: grab;
  user-select: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.macro-step-card:active { cursor: grabbing; }
.macro-step-card.dragging { opacity: 0.4; }
.macro-step-card.drag-over { box-shadow: 0 -2px 0 var(--neon); }
.macro-step-card.failed-step { background: rgba(248,113,113,0.08); border-color: var(--red); }

.step-drag-handle { color: var(--fg-dim3); font-size: 14px; flex-shrink: 0; cursor: grab; line-height: 1; }
.step-thumb-wrap { position: relative; width: 64px; height: 40px; flex-shrink: 0; }
.step-thumb {
  width: 64px; height: 40px;
  object-fit: cover;
  border-radius: 0;
  flex-shrink: 0;
  background: var(--bg);
  border: 1px solid var(--hair);
  display: block;
}
.step-click-dot {
  position: absolute;
  width: 8px; height: 8px;
  background: var(--red);
  border: 1.5px solid #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  box-shadow: 0 0 4px rgba(0,0,0,0.6);
}
.step-thumb-placeholder {
  width: 64px; height: 40px;
  background: var(--bg);
  border: 1px solid var(--hair);
  border-radius: 0;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.step-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }

/* Step type tags = spec labels, not pills */
.step-badge {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 0;
  border: 1px solid;
  display: inline-block;
  align-self: flex-start;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.badge-click    { background: transparent; color: var(--blue);  border-color: rgba(96,165,250,0.4); }
.badge-type     { background: transparent; color: var(--neon);  border-color: var(--neon-dim); }
.badge-wait     { background: transparent; color: var(--amber); border-color: rgba(245,158,11,0.4); }
.badge-navigate { background: transparent; color: var(--amber); border-color: rgba(245,158,11,0.4); }
.badge-findval  { background: transparent; color: #c084fc; border-color: rgba(192,132,252,0.4); }

.step-desc {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.step-wait-row { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.step-wait-slider { flex: 1; max-width: 100px; accent-color: var(--green-500); cursor: pointer; }
.step-wait-label { font-family: var(--mono); font-size: 10px; color: var(--fg-dim2); min-width: 36px; }

.step-delete-btn {
  background: none;
  border: none;
  color: var(--fg-dim3);
  font-size: 14px;
  cursor: pointer;
  padding: 2px 5px;
  border-radius: 0;
  flex-shrink: 0;
  line-height: 1;
  transition: background 0.1s, color 0.1s;
}
.step-delete-btn:hover { background: rgba(248,113,113,0.15); color: var(--red); }

/* Failure banner */
.macro-failure-banner {
  margin: 0 14px 10px;
  padding: 10px 12px;
  background: rgba(248,113,113,0.07);
  border: 1px solid var(--red);
  border-radius: 0;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.macro-failure-banner::before, .macro-failure-banner::after { border-color: var(--red); }
.failure-thumb { width: 80px; height: 50px; object-fit: cover; border-radius: 0; border: 1px solid var(--hair); flex-shrink: 0; }
.failure-info { flex: 1; min-width: 0; }
.failure-info .step-desc {
  margin-top: 4px;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ══════════════════════════════════════════════════════════════════════════
   MACRO LIST (detail view)
   ══════════════════════════════════════════════════════════════════════════ */
.macro-list { display: flex; flex-direction: column; gap: 8px; }
.macro-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border-radius: 0;
  background: var(--bg-lift);
  border: 1px solid var(--hair);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.macro-row--active { border-color: var(--neon-dim); background: rgba(74,222,128,0.06); }
.macro-row--default { opacity: 0.8; }

.macro-radio {
  background: none;
  border: none;
  color: var(--fg-dim3);
  font-size: 15px;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  line-height: 1;
  transition: color 0.15s;
}
.macro-row--active .macro-radio { color: var(--neon); }

.macro-row-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.macro-row-name {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.macro-row-meta { font-family: var(--mono); font-size: 10px; color: var(--fg-dim2); letter-spacing: 0.04em; }
.macro-row-btns { display: flex; gap: 5px; flex-shrink: 0; }
.macro-empty { font-family: var(--mono); font-size: 11px; color: var(--fg-dim2); padding: 10px 4px; letter-spacing: 0.03em; }

/* Code-based site module row */
.macro-row--module {
  background: rgba(62,156,53,0.06);
  border: 1px solid rgba(62,156,53,0.3);
  border-radius: 0;
  cursor: default;
}
.macro-module-icon { font-size: 15px; flex-shrink: 0; width: 24px; text-align: center; color: var(--neon); }

/* ══════════════════════════════════════════════════════════════════════════
   SITE PICKER
   ══════════════════════════════════════════════════════════════════════════ */
#view-site-picker.active { display: flex; flex-direction: column; height: 100%; }
.site-picker-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--hair);
  flex-shrink: 0;
}
.site-picker-title {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  color: var(--fg);
  white-space: nowrap;
  margin-right: 4px;
}
.site-search-input {
  flex: 1;
  background: var(--bg-lift);
  border: 1px solid var(--hair);
  border-radius: 0;
  color: var(--fg);
  font-family: var(--mono);
  font-size: 12px;
  padding: 7px 12px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.site-search-input:focus { border-color: var(--neon); box-shadow: 0 0 0 1px var(--neon); }
.site-search-input::placeholder { color: var(--fg-dim3); }

.site-list { flex: 1; overflow-y: auto; padding: 8px 10px; display: flex; flex-direction: column; gap: 8px; }
.site-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid var(--hair);
  background: var(--bg-lift);
  border-radius: 0;
  gap: 10px;
}
.site-row--custom { border-color: rgba(62,156,53,0.4); }
.site-row-left { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 1; }
.site-row-name {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--fg);
  white-space: nowrap;
}

/* Site tags = spec labels */
.site-badge {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 0;
  border: 1px solid;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
  flex-shrink: 0;
}
.site-badge--popular   { background: transparent; color: var(--neon); border-color: var(--neon-dim); }
.site-badge--community { background: transparent; color: var(--fg-dim2); border-color: var(--hair-strong); }

.site-ext-link {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-dim2);
  text-decoration: none;
  flex-shrink: 0;
  opacity: 0.75;
  transition: opacity 0.15s, color 0.15s;
}
.site-ext-link:hover { opacity: 1; color: var(--neon); text-decoration: none; }

.btn-connect {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 0;
  border: 1px solid var(--neon-dim);
  background: transparent;
  color: var(--neon);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.btn-connect:hover { background: var(--green-500); color: #050505; border-color: var(--green-500); }
.btn-connect--custom { border-color: var(--green-500); }

/* ══════════════════════════════════════════════════════════════════════════
   MACRO INSPECTOR
   ══════════════════════════════════════════════════════════════════════════ */
#view-inspector #inspector-list {
  padding: 10px 14px 20px;
  overflow-y: auto;
  max-height: calc(600px - 90px);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.insp-step {
  border-radius: 0;
  border: 1px solid var(--hair);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.insp-step-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  background: var(--bg-lift);
  cursor: default;
  user-select: none;
}
.insp-step-num { color: var(--fg-dim3); font-variant-numeric: tabular-nums; min-width: 20px; font-size: 11px; }
.insp-type-badge {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 0;
  border: 1px solid;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  flex-shrink: 0;
}
.insp-step-desc {
  color: var(--fg-dim);
  font-weight: 400;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.insp-type-click    { background: transparent; color: #c084fc;    border-color: rgba(192,132,252,0.4); }
.insp-type-navigate { background: transparent; color: var(--blue); border-color: rgba(96,165,250,0.4); }
.insp-type-type     { background: transparent; color: #22d3ee;    border-color: rgba(34,211,238,0.4); }
.insp-type-wait     { background: transparent; color: var(--fg-dim2); border-color: var(--hair-strong); }
.insp-type-findVal  { background: transparent; color: var(--neon); border-color: var(--neon-dim); }
.insp-type-other    { background: transparent; color: var(--fg-dim2); border-color: var(--hair-strong); }

.insp-step-body {
  padding: 7px 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--bg);
}
.insp-field {
  display: flex;
  gap: 8px;
  font-size: 11px;
  font-family: var(--mono);
  line-height: 1.4;
}
.insp-field-key { color: var(--fg-dim3); min-width: 90px; flex-shrink: 0; text-align: right; }
.insp-field-val { color: var(--fg); word-break: break-all; }
.insp-field--hit .insp-field-key { color: var(--green-500); }
.insp-field--hit .insp-field-val { color: var(--neon); }
.insp-field--coords .insp-field-key { color: var(--fg-dim2); }
.insp-field--coords .insp-field-val { color: var(--fg-dim2); }

/* ══════════════════════════════════════════════════════════════════════════
   LOGIN VIEW
   ══════════════════════════════════════════════════════════════════════════ */
#view-login.active { display: flex; align-items: center; justify-content: center; height: 100%; padding: 24px 20px; }
.login-card {
  width: 100%;
  max-width: 340px;
  background: var(--bg-lift);
  border: 1px solid var(--hair);
  border-radius: 0;
  padding: 26px 24px 22px;
  text-align: center;
}
.login-spec {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--green-500);
  margin-bottom: 16px;
}
.login-icon {
  width: 44px; height: 44px;
  border-radius: 0;
  border: 1px solid var(--hair-strong);
  margin-bottom: 14px;
  display: inline-block;
}
.login-title {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}
.login-sub {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--fg-dim);
  margin-bottom: 20px;
  line-height: 1.55;
}
.login-input {
  width: 100%;
  box-sizing: border-box;
  background: var(--bg);
  border: 1px solid var(--hair);
  border-radius: 0;
  padding: 9px 12px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--fg);
  outline: none;
  margin-bottom: 8px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.login-input:focus { border-color: var(--neon); box-shadow: 0 0 0 1px var(--neon), 0 0 12px rgba(74,222,128,0.18); }
.login-input::placeholder { color: var(--fg-dim3); }

/* Show/hide password toggle inside the login password field */
.login-pass-wrap { position: relative; margin-bottom: 8px; }
.login-pass-wrap .login-input { margin-bottom: 0; padding-right: 60px; }
.login-show-btn {
  position: absolute;
  top: 1px; right: 1px; bottom: 1px;
  width: 52px;
  background: transparent;
  border: none;
  border-left: 1px solid var(--hair);
  color: var(--fg-dim2);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: color 0.15s;
}
.login-show-btn:hover { color: var(--neon); }
.btn-login-full { width: 100%; justify-content: center; margin: 4px 0 10px; }
.login-msg { font-family: var(--mono); font-size: 11px; min-height: 16px; color: var(--red); }
.login-foot {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-dim3);
  margin-top: 14px;
}
.login-signup { font-family: var(--mono); font-size: 11px; color: var(--fg-dim2); margin-top: 8px; }

/* ══════════════════════════════════════════════════════════════════════════
   SCROLLBARS
   ══════════════════════════════════════════════════════════════════════════ */
html::-webkit-scrollbar { display: none; }
html { scrollbar-width: none; }

#main::-webkit-scrollbar,
.view::-webkit-scrollbar,
.site-list::-webkit-scrollbar,
#inspector-list::-webkit-scrollbar { width: 8px; }
#main::-webkit-scrollbar-track,
.view::-webkit-scrollbar-track,
.site-list::-webkit-scrollbar-track,
#inspector-list::-webkit-scrollbar-track { background: var(--bg); }
#main::-webkit-scrollbar-thumb,
.view::-webkit-scrollbar-thumb,
.site-list::-webkit-scrollbar-thumb,
#inspector-list::-webkit-scrollbar-thumb { background: #26262b; border: 1px solid var(--hair); }
#main::-webkit-scrollbar-thumb:hover,
.view::-webkit-scrollbar-thumb:hover,
.site-list::-webkit-scrollbar-thumb:hover,
#inspector-list::-webkit-scrollbar-thumb:hover { background: var(--green-800); }
