/* ==========================================================================
   Branguard console — dark command-center theme
   ========================================================================== */

:root {
  --bg0: #05080f;
  --bg1: #0a101e;
  --bg2: #0e1628;
  --bg3: #152238;
  --panel: #0c1424;
  --panel2: #111c33;
  --line-d: rgba(148, 163, 184, 0.13);
  --line-strong: rgba(148, 163, 184, 0.28);
  --ink-d: #e2e8f0;
  --mut-d: #64748b;
  --cyan-d: #22d3ee;
  --green-d: #34d399;
  --amber-d: #fbbf24;
  --rose-d: #fb7185;
  --violet-d: #a78bfa;
  --font-head: "Space Grotesk", sans-serif;
  --radius: 16px;
}

body.branguard-body {
  background:
    radial-gradient(1100px 500px at 85% -5%, rgba(34, 211, 238, 0.05), transparent 60%),
    radial-gradient(900px 480px at -10% 30%, rgba(124, 58, 237, 0.05), transparent 55%),
    var(--bg0);
  color: #cbd5e1;
}

/* thin dark scrollbars */
.branguard-body * { scrollbar-width: thin; scrollbar-color: #1e293b transparent; }
.branguard-body *::-webkit-scrollbar { width: 9px; height: 9px; }
.branguard-body *::-webkit-scrollbar-thumb { background: #1e293b; border-radius: 99px; border: 2px solid var(--bg0); }
.branguard-body *::-webkit-scrollbar-thumb:hover { background: #334155; }
.branguard-body ::selection { background: rgba(34, 211, 238, 0.28); color: #f0fdff; }

/* visible focus rings for keyboard users */
.branguard-body button:focus-visible,
.branguard-body a:focus-visible,
.branguard-body input:focus-visible,
.branguard-body select:focus-visible {
  outline: 2px solid rgba(34, 211, 238, 0.65);
  outline-offset: 2px;
  border-radius: 8px;
}

/* ==========================================================================
   Navbar (dark variant) + auth slot
   ========================================================================== */

.nav-dark {
  background: rgba(6, 10, 19, 0.82);
  border-bottom: 1px solid var(--line-d);
  backdrop-filter: blur(14px);
}
.nav-dark .logo { color: #f1f5f9; }
.nav-dark .nav-links a { color: #94a3b8; }
.nav-dark .nav-links a:hover,
.nav-dark .nav-links a.active { color: var(--cyan-d); background: rgba(34, 211, 238, 0.08); }
.nav-dark .burger { border-color: rgba(148,163,184,0.3); }
.nav-dark .burger span { background: #e2e8f0; }

/* user chip rendered by auth-ui.js */
.js-auth-slot:not(.ready) { display: inline-flex; }
.nav-user { display: inline-flex; align-items: center; gap: 6px; }
.user-chip {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 4px 12px 4px 4px; border-radius: 999px;
  border: 1px solid var(--line-d); background: rgba(17, 28, 51, 0.7);
  text-decoration: none; transition: border-color .18s;
}
.user-chip:hover { border-color: rgba(34, 211, 238, 0.45); }
.u-av {
  width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 700; font-size: 11.5px;
  color: #06202a;
  background: linear-gradient(135deg, #67e8f9, #38bdf8);
  flex: 0 0 auto;
}
.u-name {
  font-size: 13px; font-weight: 600; color: #e2e8f0;
  max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.u-out {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
  background: transparent; border: 1px solid var(--line-d); color: #64748b;
  transition: .18s;
}
.u-out:hover { color: var(--rose-d); border-color: rgba(251, 113, 133, 0.45); background: rgba(251, 113, 133, 0.08); }
.signin-link {
  font-family: var(--font-head); font-weight: 600; font-size: 13.5px;
  color: var(--cyan-d); text-decoration: none;
  border: 1px solid rgba(34, 211, 238, 0.35); border-radius: 999px;
  padding: 8px 18px; transition: .18s;
}
.signin-link:hover { background: rgba(34, 211, 238, 0.1); }

/* compact variant inside the console bar */
.bar-user .u-name { display: none; }
.bar-user .user-chip { padding: 3px; gap: 0; cursor: default; }
.bar-user .u-out { margin-left: 6px; width: 28px; height: 28px; }

/* ==========================================================================
   Hero
   ========================================================================== */

.bg-hero {
  position: relative;
  padding: 52px 0 42px;
  overflow: hidden;
  border-bottom: 1px solid var(--line-d);
}
.bg-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 460px at 82% -10%, rgba(34, 211, 238, 0.16), transparent 60%),
    radial-gradient(800px 420px at 6% 10%, rgba(124, 58, 237, 0.14), transparent 55%),
    radial-gradient(700px 400px at 50% 120%, rgba(225, 29, 72, 0.10), transparent 60%);
  pointer-events: none;
}
.bg-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(34, 211, 238, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.05) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(700px 420px at 50% 0%, #000 15%, transparent 78%);
  pointer-events: none;
}
.bg-hero .container { position: relative; z-index: 1; }

.bg-hero h1 {
  font-size: clamp(30px, 3.8vw, 46px);
  color: #f8fafc;
  margin-bottom: 14px;
  letter-spacing: -0.03em;
}
.bg-hero h1 .grad { background: linear-gradient(135deg, #22d3ee, #a78bfa, #fb7185); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.bg-hero .lead { color: #94a3b8; font-size: 16.5px; max-width: 640px; margin-bottom: 22px; line-height: 1.65; }

.bg-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan-d);
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.25);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.bg-tag .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan-d); box-shadow: 0 0 10px var(--cyan-d); }

/* ==========================================================================
   Console shell
   ========================================================================== */

.console {
  background: linear-gradient(180deg, var(--panel), var(--bg1));
  border: 1px solid var(--line-d);
  border-radius: 22px;
  box-shadow:
    0 40px 100px -40px rgba(0, 0, 0, 0.9),
    inset 0 1px 0 rgba(148, 163, 184, 0.06);
  overflow: hidden;
}
.console-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 20px;
  background: rgba(17, 28, 51, 0.8);
  border-bottom: 1px solid var(--line-d);
}
.console-bar .cdot { width: 11px; height: 11px; border-radius: 50%; box-shadow: 0 0 8px rgba(0,0,0,.4); }
.console-bar .title { margin-left: 8px; font-family: var(--font-head); font-size: 13px; color: #94a3b8; }
.console-bar .status-chip {
  margin-left: auto;
  font-size: 11.5px;
  font-weight: 700;
  font-family: var(--font-head);
  letter-spacing: .06em;
  padding: 4px 12px;
  border-radius: 99px;
  background: rgba(52, 211, 153, 0.1);
  color: var(--green-d);
}
.status-chip.running { background: rgba(34, 211, 238, 0.12); color: var(--cyan-d); animation: pulseChip 1.6s infinite; }
.status-chip.done { background: rgba(52, 211, 153, 0.1); color: var(--green-d); }
.status-chip.queued { background: rgba(167, 139, 250, 0.12); color: var(--violet-d); }
.status-chip.error { background: rgba(251, 113, 133, 0.12); color: var(--rose-d); }
@keyframes pulseChip { 50% { opacity: .55; } }

/* Server status dot in the console bar */
.svr {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #475569;
  font-family: var(--font-head);
  letter-spacing: .05em;
  margin-left: 4px;
  border: 1px solid var(--line-d);
  padding: 3px 10px;
  border-radius: 99px;
}
.svr-dot { width: 7px; height: 7px; border-radius: 50%; background: #64748b; transition: background .3s, box-shadow .3s; }
.svr.online .svr-dot { background: var(--green-d); box-shadow: 0 0 8px rgba(52,211,153,.8); }
.svr.online { color: #94a3b8; }

.console-body { padding: 26px; display: flex; flex-direction: column; gap: 20px; }

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
  background: var(--panel);
  border: 1px solid var(--line-d);
  border-radius: var(--radius);
  padding: 20px 22px;
  transition: border-color .2s;
}
.card:hover { border-color: rgba(148, 163, 184, 0.2); }
.card-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.card-head h3 { margin: 0; font-family: var(--font-head); font-size: 16px; color: #f1f5f9; }
.card-sub { font-size: 12.5px; color: #475569; }

/* ==========================================================================
   Tag input
   ========================================================================== */

.tag-input {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  background: var(--bg2);
  border: 1px solid var(--line-d);
  border-radius: 14px;
  padding: 10px 12px;
  min-height: 54px;
  transition: border-color .2s, box-shadow .2s;
}
.tag-input:focus-within { border-color: rgba(34, 211, 238, .6); box-shadow: 0 0 0 4px rgba(34, 211, 238, .08); }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.28);
  color: #a5f3fc;
  font-size: 13px;
  font-weight: 500;
  padding: 5px 10px 5px 12px;
  border-radius: 999px;
  animation: pop .18s ease;
}
@keyframes pop { from { transform: scale(.85); opacity: 0; } }
.tag button {
  background: none; border: none; cursor: pointer;
  color: #67e8f9; font-size: 14px; line-height: 1; padding: 0 2px;
}
.tag button:hover { color: #fff; }
.tag-input .field {
  flex: 1; min-width: 220px;
  background: none; border: none; outline: none;
  color: #e2e8f0; font-size: 14.5px; font-family: var(--font-body, inherit);
  padding: 6px 4px;
}
.tag-input .field::placeholder { color: #475569; }

.input-hint { font-size: 12.5px; color: #475569; margin-top: 8px; }
.input-hint b { color: #64748b; }
.load-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.load-hint { font-size: 11.5px; color: #475569; }
.btn-cyber.small { padding: 6px 12px; font-size: 12px; gap: 6px; }

/* ==========================================================================
   Empty / onboarding state
   ========================================================================== */

.empty-state {
  background: linear-gradient(160deg, var(--panel), var(--bg2));
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 42px 32px;
  text-align: center;
  animation: fadeUp .4s ease;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } }
.es-icon {
  width: 64px; height: 64px; margin: 0 auto 16px;
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.28);
  color: var(--cyan-d);
  box-shadow: 0 0 40px -8px rgba(34, 211, 238, 0.35);
}
.empty-state h3 { font-family: var(--font-head); font-size: 21px; color: #f8fafc; margin: 0 0 8px; }
.empty-state p { color: #94a3b8; font-size: 14px; max-width: 560px; margin: 0 auto 20px; line-height: 1.65; }
.es-examples { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.es-ex {
  font-family: var(--font-head); font-size: 13px; font-weight: 600;
  padding: 8px 16px; border-radius: 999px; cursor: pointer;
  background: var(--bg2); border: 1px solid var(--line-d); color: #94a3b8;
  transition: .18s;
}
.es-ex:hover { border-color: rgba(34,211,238,.5); color: var(--cyan-d); transform: translateY(-1px); }
.empty-state .btn-cyber { margin: 0 auto; }

/* ==========================================================================
   Options row + segmented control
   ========================================================================== */

.opts { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 18px; align-items: center; }
.opt {
  display: flex; align-items: center; gap: 9px;
  font-size: 13.5px; color: #94a3b8; cursor: pointer; user-select: none;
}
.opt input[type=checkbox] {
  appearance: none; width: 38px; height: 21px; border-radius: 99px;
  background: #1e293b; border: 1px solid #334155; position: relative;
  cursor: pointer; transition: background .2s;
}
.opt input[type=checkbox]::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 15px; height: 15px; border-radius: 50%; background: #64748b;
  transition: transform .2s, background .2s;
}
.opt input[type=checkbox]:checked { background: rgba(34, 211, 238, .3); border-color: var(--cyan-d); }
.opt input[type=checkbox]:checked::after { transform: translateX(17px); background: var(--cyan-d); }

/* segmented radio control (candidates per site) */
.seg {
  display: inline-flex; gap: 3px;
  background: var(--bg2); border: 1px solid var(--line-d);
  border-radius: 11px; padding: 3px;
}
.seg label { position: relative; display: inline-flex; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span {
  font-family: var(--font-head); font-weight: 600; font-size: 12.5px;
  color: #64748b; padding: 6px 14px; border-radius: 8px;
  cursor: pointer; transition: .16s; user-select: none;
}
.seg label:hover span { color: #94a3b8; }
.seg input:checked + span {
  background: rgba(34, 211, 238, 0.15); color: var(--cyan-d);
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.4);
}
.seg input:focus-visible + span { outline: 2px solid rgba(34, 211, 238, 0.65); outline-offset: 1px; }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn-cyber {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-head); font-weight: 600; font-size: 14.5px;
  padding: 13px 26px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: .2s ease; white-space: nowrap;
}
.btn-cyber.primary {
  background: linear-gradient(135deg, #06b6d4, #0ea5e9);
  color: #04121c; box-shadow: 0 10px 30px -10px rgba(34, 211, 238, .6);
}
.btn-cyber.primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -12px rgba(34,211,238,.7); }
.btn-cyber.ghost {
  background: transparent; border-color: var(--line-d); color: #94a3b8;
}
.btn-cyber.ghost:hover { border-color: rgba(34,211,238,.5); color: var(--cyan-d); }
.btn-cyber:disabled { opacity: .55; cursor: not-allowed; transform: none !important; }
.btn-cyber.danger { background: linear-gradient(135deg, #e11d48, #fb7185); color: #fff; }
.btn-cyber.icon-btn { padding: 11px 18px; font-size: 13px; gap: 7px; }

/* ==========================================================================
   Modals
   ========================================================================== */

.paste-modal {
  position: fixed; inset: 0; background: rgba(2,6,23,.78); backdrop-filter: blur(5px);
  display: none; align-items: center; justify-content: center; z-index: 200; padding: 20px;
  animation: fadeIn .18s ease;
}
@keyframes fadeIn { from { opacity: 0; } }
.paste-box {
  background: var(--bg1); border: 1px solid var(--line-strong);
  border-radius: 18px; padding: 22px; width: 100%; max-width: 560px;
  box-shadow: 0 24px 80px rgba(0,0,0,.6);
  animation: modalIn .22s cubic-bezier(.2,.9,.3,1.2);
  max-height: calc(100vh - 60px); overflow-y: auto;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.97); } }
.paste-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line-d);
}
.paste-head h3 { margin: 0; font-family: var(--font-head); font-size: 16px; color: #f1f5f9; }
.paste-x {
  background: none; border: none; color: #64748b; font-size: 22px; cursor: pointer; line-height: 1;
  width: 30px; height: 30px; border-radius: 8px; transition: .15s;
}
.paste-x:hover { color: #f8fafc; background: rgba(148,163,184,.08); }
.paste-box textarea {
  width: 100%; background: var(--bg2); border: 1px solid var(--line-d);
  border-radius: 12px; color: #e2e8f0; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12.5px; padding: 12px; resize: vertical; box-sizing: border-box;
}
.paste-box textarea:focus { outline: none; border-color: rgba(34,211,238,.5); }
.paste-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; }

.wl-form { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.wl-field { flex: 1; min-width: 180px; }
.wl-list { max-height: 280px; overflow-y: auto; }
.wl-row {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border: 1px solid var(--line-d); border-radius: 10px; margin-bottom: 7px;
  background: var(--bg2); transition: border-color .15s;
}
.wl-row:hover { border-color: var(--line-strong); }
.wl-domain { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; color: #e2e8f0; flex: 1; }
.wl-site { font-size: 11px; color: #64748b; background: #1e293b; padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.wl-rm {
  background: none; border: none; color: #64748b; font-size: 16px; cursor: pointer;
  line-height: 1; padding: 2px 5px; border-radius: 6px; transition: .15s;
}
.wl-rm:hover { color: #fb7185; background: rgba(251,113,133,.1); }
.wl-row .wl-rm { font-size: 13px; }
.mon-last { font-size: 11px; color: #64748b; white-space: nowrap; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.settings-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: #94a3b8; }
.settings-grid .field { margin-top: 2px; }
.paste-box code { background: #1e293b; padding: 1px 5px; border-radius: 4px; font-size: 11.5px; }

.field {
  background: var(--bg2); border: 1px solid var(--line-d); border-radius: 10px;
  color: #e2e8f0; font-size: 13px; padding: 9px 12px; outline: none;
  transition: border-color .18s, box-shadow .18s; font-family: inherit;
}
.field:focus { border-color: rgba(34, 211, 238, .55); box-shadow: 0 0 0 3px rgba(34, 211, 238, .07); }

/* ==========================================================================
   Progress + phase stepper
   ========================================================================== */

.progress-card { position: relative; overflow: hidden; }
.progress-card::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(400px 140px at 0% 0%, rgba(34,211,238,.08), transparent 60%);
  pointer-events: none;
}
.progress-label {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; color: #94a3b8; margin-bottom: 9px;
}
.progress-label .phase { font-family: var(--font-head); font-weight: 600; }
.progress-label .pct { font-family: var(--font-head); font-weight: 700; color: var(--cyan-d); font-size: 15px; }
.progress-bar {
  height: 10px; border-radius: 99px; background: #0f1a30; border: 1px solid var(--line-d);
  overflow: hidden; position: relative;
}
.progress-bar .fill {
  height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, #06b6d4, #22d3ee);
  box-shadow: 0 0 18px rgba(34, 211, 238, .55);
  width: 0; transition: width .6s ease;
  position: relative;
}
.progress-bar .fill::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%);
  background-size: 200% 100%;
  animation: shimmer 1.6s linear infinite;
}
@keyframes shimmer { from { background-position: 180% 0; } to { background-position: -80% 0; } }

/* phase stepper */
.phases {
  display: flex; align-items: center; gap: 6px;
  margin-top: 14px; flex-wrap: wrap;
}
.ph {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-head); font-size: 11.5px; font-weight: 600;
  letter-spacing: .05em; text-transform: uppercase;
  color: #3b4a63; transition: color .3s;
}
.ph i {
  width: 8px; height: 8px; border-radius: 50%;
  background: #22304a; transition: background .3s, box-shadow .3s;
  flex: 0 0 auto;
}
.ph.on { color: #94a3b8; }
.ph.on i { background: var(--green-d); box-shadow: 0 0 8px rgba(52, 211, 153, .6); }
.ph.cur { color: var(--cyan-d); }
.ph.cur i { background: var(--cyan-d); box-shadow: 0 0 10px rgba(34, 211, 238, .8); animation: pulseChip 1.4s infinite; }
.ph-sep, .ph + .ph::before { content: none; }

.scan-metrics {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px; margin-top: 16px;
}
.metric {
  background: var(--bg2); border: 1px solid var(--line-d);
  border-radius: 12px; padding: 12px 14px;
  transition: border-color .18s, transform .18s;
}
.metric:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.metric .num { font-family: var(--font-head); font-weight: 700; font-size: 22px; color: #f1f5f9; }
.metric .num.cyan { color: var(--cyan-d); }
.metric .num.green { color: var(--green-d); }
.metric .num.amber { color: var(--amber-d); }
.metric .num.rose { color: var(--rose-d); }
.metric .lbl { font-size: 11.5px; color: #64748b; margin-top: 2px; letter-spacing: .04em; }

/* ==========================================================================
   Dashboard stat cards
   ========================================================================== */

.dash {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 6px;
}
.dash-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line-d);
  border-radius: var(--radius);
  padding: 16px 18px;
  overflow: hidden;
  transition: border-color .18s, transform .18s, box-shadow .18s;
}
.dash-card::before {
  content: ""; position: absolute; left: 0; top: 14%; bottom: 14%; width: 3px;
  border-radius: 99px; background: currentColor; opacity: .55;
}
.dash-card.cyan { color: var(--cyan-d); }
.dash-card.rose { color: var(--rose-d); }
.dash-card.amber { color: var(--amber-d); }
.dash-card.violet { color: var(--violet-d); }
.dash-card.green { color: var(--green-d); }
.dash-card:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: 0 14px 34px -18px rgba(0,0,0,.8); }
.dash-card .dc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.dash-card .dc-ic { width: 26px; height: 26px; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.dash-card .dc-value { font-family: var(--font-head); font-weight: 700; font-size: 30px; color: #f8fafc; line-height: 1; }
.dash-card .dc-value .dc-trend { font-size: 13px; font-weight: 600; margin-left: 4px; vertical-align: middle; }
.dash-card .dc-label { font-size: 12px; color: #64748b; margin-top: 6px; letter-spacing: .03em; }
.dash-card.rose .dc-ic { background: rgba(251,113,133,.12); color: var(--rose-d); }
.dash-card.amber .dc-ic { background: rgba(251,191,36,.12); color: var(--amber-d); }
.dash-card.violet .dc-ic { background: rgba(167,139,250,.12); color: var(--violet-d); }
.dash-card.green .dc-ic { background: rgba(52,211,153,.12); color: var(--green-d); }
.dash-card.cyan .dc-ic { background: rgba(34,211,238,.12); color: var(--cyan-d); }
.dc-new {
  display: inline-block; background: #dc2626; color: #fff; font-size: 10px; font-weight: 700;
  padding: 1px 6px; border-radius: 4px; letter-spacing: .04em; vertical-align: middle;
}

/* ==========================================================================
   Results
   ========================================================================== */

.results-head { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin: 6px 0 12px; }
.results-head h2 { font-family: var(--font-head); color: #f1f5f9; font-size: 20px; margin: 0; }
.results-head .spacer { flex: 1; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.fchip {
  font-family: var(--font-head); font-size: 12.5px; font-weight: 600;
  padding: 7px 14px; border-radius: 999px; cursor: pointer; user-select: none;
  background: var(--bg2); border: 1px solid var(--line-d); color: #94a3b8;
  transition: .18s;
}
.fchip:hover { border-color: rgba(34,211,238,.4); color: var(--cyan-d); }
.fchip.active { background: rgba(34,211,238,.14); border-color: var(--cyan-d); color: var(--cyan-d); }
.fchip .cnt { opacity: .7; margin-left: 3px; font-size: 11px; }

.search-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg2); border: 1px solid var(--line-d);
  border-radius: 999px; padding: 8px 14px; min-width: 200px;
  transition: border-color .18s, box-shadow .18s;
}
.search-box:focus-within { border-color: rgba(34,211,238,.5); box-shadow: 0 0 0 3px rgba(34,211,238,.07); }
.search-box input {
  background: none; border: none; outline: none; color: #e2e8f0;
  font-size: 13px; font-family: var(--font-body, inherit); width: 100%;
}
.search-box input::placeholder { color: #475569; }

/* Site groups + table */
.site-group { margin-bottom: 20px; }
.site-group .sg-head {
  display: flex; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap;
}
.site-group .sg-head .name { font-family: var(--font-head); font-weight: 700; color: #e2e8f0; font-size: 16px; }
.site-group .sg-head .meta { font-size: 12px; color: #475569; }
.site-group .sg-head .root-pill {
  font-size: 11px; padding: 3px 10px; border-radius: 99px;
  background: rgba(52,211,153,.1); color: var(--green-d); font-weight: 600;
}
.site-table {
  background: var(--panel); border: 1px solid var(--line-d);
  border-radius: var(--radius); overflow: hidden;
}
.result-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.result-table thead th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: #475569; font-family: var(--font-head); font-weight: 600;
  padding: 11px 14px; border-bottom: 1px solid var(--line-d); background: rgba(17,28,51,.5);
}
.result-table tbody td { padding: 11px 14px; border-bottom: 1px solid rgba(148,163,184,.06); vertical-align: middle; }
.result-table tbody tr { transition: background .12s, box-shadow .12s; }
.result-table tbody tr:hover { background: rgba(34,211,238,.045); box-shadow: inset 2px 0 0 var(--cyan-d); }
.result-table tbody tr:last-child td { border-bottom: none; }
.result-table .d {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-weight: 600; font-size: 12.5px; color: #e2e8f0; white-space: nowrap;
}
.result-table .method { font-size: 11.5px; color: #64748b; }
.result-table .title-cell { color: #94a3b8; font-size: 12.5px; max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-table .dim { color: #475569; }

.verdict {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-head); font-weight: 700; font-size: 11.5px;
  padding: 4px 11px 4px 9px; border-radius: 99px; white-space: nowrap;
}
.verdict::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; opacity: .9; flex: 0 0 auto;
}
.verdict.malicious { color: var(--rose-d); background: rgba(251,113,133,.12); }
.verdict.suspicious { color: var(--amber-d); background: rgba(251,191,36,.12); }
.verdict.lookalike { color: var(--violet-d); background: rgba(167,139,250,.12); }
.verdict.safe { color: var(--green-d); background: rgba(52,211,153,.1); }
.verdict.offline { color: #64748b; background: rgba(100,116,139,.12); }
.verdict.parked { color: #94a3b8; background: rgba(148,163,184,.12); }
.verdict.whitelisted { color: #22d3ee; background: rgba(34,211,238,.12); }
.verdict .score { opacity: .75; }
.redirect-note { font-size: 11.5px; color: #94a3b8; margin-top: 3px; }

.shot-thumb {
  width: 116px; height: 62px; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--line-d); background: #0b1220;
  cursor: zoom-in; transition: .18s; object-fit: cover; display: block;
}
.shot-thumb:hover { border-color: var(--cyan-d); transform: scale(1.03); box-shadow: 0 8px 24px -8px rgba(34,211,238,.35); }
.no-shot { font-size: 11px; color: #334155; }

.flag-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.flag-tag {
  font-size: 10px; color: #94a3b8; background: rgba(148,163,184,.08);
  border-radius: 99px; padding: 2px 7px;
}
.ev-link {
  display: inline-block; margin-top: 6px; font-size: 11px; color: #22d3ee;
  text-decoration: none; border: 1px solid rgba(34,211,238,.4); padding: 2px 8px; border-radius: 6px;
  transition: .15s;
}
.ev-link:hover { background: rgba(34,211,238,.12); }
.new-badge {
  display: inline-block; background: #dc2626; color: #fff; font-size: 9px; font-weight: 700;
  letter-spacing: .5px; padding: 1px 5px; border-radius: 4px; margin-right: 6px; vertical-align: middle;
}

/* Infrastructure correlation */
.corr-panel { margin: 0 0 14px; padding: 16px 18px; background: var(--bg2); border: 1px solid var(--line-d); border-radius: var(--radius); }
.corr-title { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #64748b; margin-bottom: 10px; font-family: var(--font-head); }
.corr-chip { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 9px 0; border-bottom: 1px solid var(--line-d); font-size: 12.5px; }
.corr-chip:last-child { border-bottom: none; }
.cc-kind { color: #22d3ee; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; min-width: 118px; font-family: var(--font-head); }
.cc-val { color: #e2e8f0; font-weight: 600; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.cc-members { color: #94a3b8; flex: 1; }
.cc-n { background: #1e293b; color: #e2e8f0; border-radius: 99px; padding: 1px 8px; font-size: 11px; }

/* ==========================================================================
   History
   ========================================================================== */

.hist-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--bg2); border: 1px solid var(--line-d);
  border-radius: 12px; padding: 12px 16px; margin-bottom: 8px; font-size: 12.5px;
  cursor: pointer; transition: border-color .15s, background .15s, transform .15s;
}
.hist-row:hover { border-color: var(--line-strong); background: var(--bg3); transform: translateX(2px); }
.hist-row .sites { color: #cbd5e1; font-family: var(--font-head); font-weight: 600; }
.hist-row .sites span { color: #64748b; font-weight: 400; }
.hist-row .st {
  margin-left: auto; font-family: var(--font-head); font-size: 11.5px;
  text-transform: uppercase; letter-spacing: .05em;
  display: inline-flex; align-items: center; gap: 6px;
}
.hist-row .st::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor;
}
.hist-row .st.done { color: var(--green-d); }
.hist-row .st.error { color: var(--rose-d); }
.hist-row .st.running { color: var(--cyan-d); }
.hist-row .when { font-size: 11.5px; color: #475569; }

/* ==========================================================================
   Lightbox
   ========================================================================== */

.lightbox {
  position: fixed; inset: 0; background: rgba(2,6,12,.92); z-index: 500;
  display: none; align-items: center; justify-content: center; padding: 30px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 95vw; max-height: 88vh; border-radius: 14px; border: 1px solid var(--line-strong); box-shadow: 0 40px 120px rgba(0,0,0,.8); }
.lightbox .close {
  position: absolute; top: 22px; right: 28px; background: none; border: none;
  color: #e2e8f0; font-size: 30px; cursor: pointer;
}
.lightbox .lb-meta { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); color: #94a3b8; font-size: 13px; text-align: center; max-width: 90vw; }

/* ==========================================================================
   Backend banner
   ========================================================================== */

.banner {
  display: flex; align-items: center; gap: 12px;
  background: rgba(251,113,133,.08); border: 1px solid rgba(251,113,133,.3);
  color: #fecdd3; border-radius: 12px; padding: 13px 16px; font-size: 13.5px; margin-bottom: 18px;
}
.banner code { background: rgba(0,0,0,.4); padding: 2px 8px; border-radius: 6px; color: #fda4af; }

/* Dark toast override (toast markup comes from main.js) */
.branguard-body .toast {
  background: rgba(12, 20, 36, 0.96);
  border: 1px solid var(--line-strong);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .6);
  backdrop-filter: blur(8px);
}
.branguard-body .toast .t-msg { color: #e2e8f0; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 720px) {
  .console-body { padding: 16px; }
  .result-table .method, .result-table .title-cell { display: none; }
  .settings-grid { grid-template-columns: 1fr; }
  .dash { grid-template-columns: repeat(2, 1fr); }
  .console-bar .title { display: none; }
  .bar-user .u-out { display: none; }
  .phases { gap: 10px; }
}

/* ==========================================================================
   V2 RE-SKIN LAYER (2026-08-23) — appends onto the base console theme.
   Keeps every selector/variable above; deepens the palette, adds aurora
   background, glass surfaces, glow states and motion. The per-product
   overlay stylesheets (sentrix/phishanna/secpulse) still override accents.
   ========================================================================== */

:root {
  --bg0: #04060c;
  --bg1: #080d19;
  --bg2: #0c1322;
  --bg3: #121b30;
  --panel: #0a1120;
  --panel2: #0e1729;
  --line-d: rgba(148, 163, 199, 0.13);
  --line-strong: rgba(148, 163, 199, 0.3);
  --ink-d: #e6ebf5;
  --mut-d: #6b7a99;
  --font-mono-c: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

/* richer aurora backdrop + drifting grid */
body.branguard-body {
  background:
    radial-gradient(1100px 540px at 88% -6%, rgba(34, 211, 238, 0.07), transparent 60%),
    radial-gradient(900px 500px at -12% 26%, rgba(124, 58, 237, 0.07), transparent 55%),
    radial-gradient(1000px 560px at 55% 115%, rgba(16, 185, 129, 0.05), transparent 60%),
    var(--bg0);
  background-attachment: fixed;
}
body.branguard-body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 199, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 199, 0.035) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse 95% 70% at 50% 0%, black 25%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 95% 70% at 50% 0%, black 25%, transparent 80%);
  animation: v2GridDrift 70s linear infinite;
}
@keyframes v2GridDrift { to { background-position: 52px 52px, 52px 52px; } }
body.branguard-body > * { position: relative; z-index: 1; }

/* glass navbar */
.nav-dark {
  background: rgba(6, 10, 19, 0.72);
  backdrop-filter: blur(16px) saturate(1.35);
  -webkit-backdrop-filter: blur(16px) saturate(1.35);
}
.nav-dark .logo { transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
.nav-dark .logo:hover { transform: translateY(-1px); }

/* hero heading shimmer */
.bg-hero h1 .grad {
  background: linear-gradient(110deg, #22d3ee, #a78bfa 45%, #fb7185 90%);
  background-size: 220% 100%;
  animation: v2GradShift 8s ease-in-out infinite alternate;
}
@keyframes v2GradShift { from { background-position: 0% 0; } to { background-position: 100% 0; } }

/* console shell — floating glass slab with gradient edge + soft glow */
.console {
  background: linear-gradient(180deg, rgba(14, 23, 41, 0.86), rgba(8, 13, 25, 0.94));
  backdrop-filter: blur(10px);
  box-shadow:
    0 30px 90px -20px rgba(0, 0, 0, 0.75),
    0 0 110px -40px rgba(34, 211, 238, 0.28);
  animation: v2ConsoleIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}
@keyframes v2ConsoleIn { from { opacity: 0; transform: translateY(28px) scale(0.985); } }

/* cards: glassier + hover lift/glow */
.console .card,
.card {
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.35s, box-shadow 0.45s;
}
.console .card:hover,
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 50px -18px rgba(0, 0, 0, 0.6), 0 0 46px -22px rgba(34, 211, 238, 0.35);
}

/* primary buttons: gradient, shine sweep, stronger glow */
.btn-cyber.primary {
  background: linear-gradient(120deg, #0891b2, #22d3ee 60%, #818cf8);
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px -10px rgba(34, 211, 238, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.btn-cyber.primary::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -70%; width: 44%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: skewX(-18deg);
  transition: left 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-cyber.primary:hover::after { left: 130%; }
.btn-cyber.primary:hover { box-shadow: 0 16px 44px -10px rgba(34, 211, 238, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.2); }

/* status chips: glow pulse while running */
.status-chip.running { box-shadow: 0 0 18px -4px rgba(34, 211, 238, 0.55); }

/* metrics + dash cards: entrance pop and count-glow */
.metric, .dash-card {
  animation: v2CardPop 0.65s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.metric:nth-child(2), .dash-card:nth-child(2) { animation-delay: 0.07s; }
.metric:nth-child(3), .dash-card:nth-child(3) { animation-delay: 0.14s; }
.metric:nth-child(4), .dash-card:nth-child(4) { animation-delay: 0.21s; }
.metric:nth-child(5), .dash-card:nth-child(5) { animation-delay: 0.28s; }
@keyframes v2CardPop { from { opacity: 0; transform: translateY(16px) scale(0.97); } }

/* progress fill: brighter shimmer + glow tail */
.progress-bar .fill {
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.55);
}

/* modals: blurred backdrop + springier entry */
.paste-modal { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.paste-box {
  animation: v2ModalIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  box-shadow: 0 40px 110px -20px rgba(0, 0, 0, 0.8);
}
@keyframes v2ModalIn { from { opacity: 0; transform: translateY(22px) scale(0.95); } }

/* empty state icon: slow orbit glow */
.es-icon { animation: v2EsFloat 5s ease-in-out infinite; }
@keyframes v2EsFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

/* monospace polish for the console chrome */
.console-bar .title,
.wl-domain,
.wl-site,
.field,
.tag {
  font-family: var(--font-mono-c);
}

/* scroll reveals for console sections (driven by assets/js/motion.js) */
.m-reveal {
  opacity: 0;
  transform: translateY(22px);
  filter: blur(5px);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.85s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--md, 0s);
}
.m-reveal.m-in { opacity: 1; transform: none; filter: none; }

@media (prefers-reduced-motion: reduce) {
  .m-reveal { opacity: 1; transform: none; filter: none; transition: none; }
  .console, .metric, .dash-card, .paste-box, .es-icon, body.branguard-body::before {
    animation: none !important;
  }
}

/* shared form utilities (used by SecPulse console markup) */
.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: #94a3b8;
  cursor: pointer;
  user-select: none;
}
.checkbox input { accent-color: #10b981; width: 15px; height: 15px; cursor: pointer; }
.txt { font-size: 13px; color: #94a3b8; }
