/* Bug Bounty Watch — plain hand-written CSS. No framework, no build step. */

:root {
  /* Tell the browser this is a dark UI so native form controls (buttons,
     selects, inputs) render dark instead of white-on-white. */
  color-scheme: dark;
  --bg: #0a0e16;
  --bg-soft: #10141f;
  --card: #111624;
  --border: #1f2737;
  --border-strong: #2a3347;
  --text: #e8ecf4;
  --muted: #7d8597;
  --accent: #22d3ee;
  --green: #34d399;
  --red: #f87171;
  --amber: #fbbf24;
  --sky: #38bdf8;
  --fuchsia: #e879f9;
  --purple: #c084fc;
  --radius: 12px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  color: var(--text);
  background:
    radial-gradient(1100px 550px at 85% -10%, rgba(34, 211, 238, .06), transparent 60%),
    radial-gradient(900px 550px at -10% -10%, rgba(52, 211, 153, .05), transparent 60%),
    var(--bg);
  min-height: 100vh;
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.hidden { display: none !important; }
.flex { display: flex; }
.muted { color: var(--muted); }
.muted-sm { color: var(--muted); font-size: 12px; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 999px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.22); }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  padding: 0 20px 48px;
}
@media (max-width: 640px) { .container { padding: 0 12px 40px; } }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; padding: 20px 0; margin-bottom: 8px;
}
.brand { font-size: 22px; font-weight: 800; margin: 0; letter-spacing: -.02em; }
.brand .accent {
  background: linear-gradient(135deg, var(--green), var(--accent));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand-link {
  color: inherit; text-decoration: none; cursor: pointer;
  display: inline-block;
}
.brand-link:hover { text-decoration: none; opacity: .92; }
.nav { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  margin-bottom: 18px;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.card-head h2 { margin: 0; }
.card-title { font-size: 17px; font-weight: 700; margin: 0 0 6px; }
.subtitle { font-size: 13px; color: var(--muted); margin: 0 0 14px; }
.hint { font-size: 12px; color: var(--muted); margin: 0; }

.panel-center { margin: 0 auto; max-width: 520px; }

/* ---------- Buttons ---------- */
button { font: inherit; cursor: pointer; color: inherit; appearance: none; -webkit-appearance: none; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--border-strong); border-radius: 9px;
  background: #151b29; color: var(--text);
  padding: 9px 14px; font-size: 13px; font-weight: 600;
  transition: background .15s, border-color .15s, filter .15s, transform .05s;
}
.btn:hover { background: #1c2434; }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn:disabled { opacity: .4; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(135deg, #10b981, #06b6d4);
  color: #041316; border: none; font-weight: 700;
}
.btn-primary:hover { filter: brightness(1.08); }

.btn-danger  { color: var(--red);     border-color: rgba(248,113,113,.3); background: rgba(248,113,113,.08); }
.btn-emerald { color: var(--green);   border-color: rgba(52,211,153,.3);  background: rgba(52,211,153,.08); }
.btn-cyan    { color: var(--accent);  border-color: rgba(34,211,238,.3);  background: rgba(34,211,238,.08); }
.btn-sky     { color: var(--sky);     border-color: rgba(56,189,248,.3);  background: rgba(56,189,248,.08); }
.btn-fuchsia { color: var(--fuchsia); border-color: rgba(232,121,249,.3); background: rgba(232,121,249,.08); }
.btn-danger:hover  { background: rgba(248,113,113,.16); }
.btn-emerald:hover { background: rgba(52,211,153,.16); }
.btn-cyan:hover    { background: rgba(34,211,238,.16); }
.btn-sky:hover     { background: rgba(56,189,248,.16); }
.btn-fuchsia:hover { background: rgba(232,121,249,.16); }

.btn-solid-danger { background: var(--red); color: #fff; border: none; font-weight: 700; }
.btn-solid-danger:hover { filter: brightness(1.08); }

.btn-sm { padding: 4px 10px; font-size: 11px; border-radius: 7px; }
.btn-block { width: 100%; }

/* ---------- Badges ---------- */
.badge {
  display: inline-block; border-radius: 999px; padding: 3px 9px;
  font-size: 11px; font-weight: 700; letter-spacing: .02em; white-space: nowrap;
}
.badge-done     { color: var(--green);   background: rgba(52,211,153,.1); }
.badge-running  { color: var(--accent);  background: rgba(34,211,238,.1); }
.badge-error    { color: var(--red);     background: rgba(248,113,113,.1); }
.badge-queued   { color: var(--amber);   background: rgba(251,191,36,.1); }
.badge-rerun    { color: var(--purple);  background: rgba(192,132,252,.1); }
.badge-fast     { color: var(--amber);   background: rgba(251,191,36,.1); }
.badge-dns      { color: var(--sky);     background: rgba(56,189,248,.1); }
.badge-http     { color: var(--fuchsia); background: rgba(232,121,249,.1); }
.badge-role     { color: var(--amber);   background: rgba(251,191,36,.1); }
.badge-active   { color: var(--green);   background: rgba(52,211,153,.1); }
.badge-disabled { color: var(--red);     background: rgba(248,113,113,.1); }
.badge-muted    { color: var(--muted);   background: rgba(125,133,151,.14); }
.badge-new      { color: var(--green);   background: rgba(52,211,153,.12); }
.badge-chg      { color: var(--amber);   background: rgba(251,191,36,.12); }

.text-danger { color: var(--red); }
.text-success { color: var(--green); }

mark {
  background: rgba(34,211,238,.18);
  color: var(--accent);
  padding: 0 2px; border-radius: 3px;
}

/* ---------- Stats ---------- */
.stats { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
/* Status filter chips — click to show only that status */
.chip {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 999px; padding: 7px 16px;
  font-size: 13px; font-weight: 600;
  cursor: pointer; color: var(--text);
  transition: border-color .15s, color .15s, background .15s;
}
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip-active { border-color: var(--accent); color: var(--accent); background: rgba(34,211,238,.08); }

/* ---------- Forms ---------- */
.input, input[type=text], input[type=password], input[type=number], select {
  width: 100%; color: var(--text);
  background: rgba(0,0,0,.28); border: 1px solid var(--border-strong);
  border-radius: 9px; padding: 10px 12px; font-size: 14px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: #545d70; }
.input:focus, input[type=text]:focus, input[type=password]:focus,
input[type=number]:focus, select:focus {
  border-color: rgba(34,211,238,.6);
  box-shadow: 0 0 0 3px rgba(34,211,238,.12);
}

.form-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.form-row .grow { flex: 1 1 200px; }
.form-row .shrink { flex: 0 0 auto; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field-label { font-size: 12px; color: var(--muted); }
.field-grow { flex: 1 1 240px; }
.field-auto { flex: 0 0 auto; width: 130px; }

.mb-2 { margin-bottom: 10px; }
.mb-3 { margin-bottom: 14px; }
.mt-2 { margin-top: 10px; }
.mt-3 { margin-top: 14px; }
.text-center { text-align: center; }

/* ---------- Switch (daily toggle) ---------- */
.switch { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; color: var(--muted); cursor: pointer; user-select: none; position: relative; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track {
  position: relative; flex-shrink: 0; width: 38px; height: 20px;
  border-radius: 999px; background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.08); transition: background .25s;
}
.switch .track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px;
  border-radius: 999px; background: #8b91a4; transition: transform .25s, background .25s;
}
.switch input:checked + .track {
  background: linear-gradient(135deg, #10b981, #06b6d4);
  border-color: transparent; box-shadow: 0 0 12px rgba(52,211,153,.4);
}
.switch input:checked + .track::after { background: #04141d; transform: translateX(18px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px rgba(34,211,238,.35); }

/* ---------- Target & user & asset rows ---------- */
.row-item {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 10px; padding: 11px 14px; margin-bottom: 8px;
  transition: border-color .15s, background .15s;
}
.row-item:hover { border-color: var(--border-strong); background: #151b2a; }
.row-item.clickable { cursor: pointer; }
.row-highlight { animation: rowFlash 2.5s ease-out; }
@keyframes rowFlash {
  from { background: rgba(34,211,238,.22); border-color: rgba(34,211,238,.45); }
  to   { background: var(--bg-soft); }
}
.row-main { flex: 1 1 200px; font-weight: 600; word-break: break-all; }
.row-asset { flex: 1 1 200px; word-break: break-all; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.row-meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
/* Jump-to-page select (overrides the full-width select base style) */
.page-select { width: auto; padding: 6px 10px; font-size: 13px; }

/* ---------- Running pane ---------- */
.running-card { border-color: rgba(34,211,238,.35); background: linear-gradient(135deg, rgba(34,211,238,.07), rgba(34,211,238,.02) 60%), var(--card); }
.running-title { font-size: 13px; font-weight: 700; color: var(--accent); letter-spacing: .08em; text-transform: uppercase; margin: 0 0 10px; }
.running-pane { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.running-domain { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 22px; font-weight: 800; letter-spacing: -.3px; }
#runningBadges { display: flex; gap: 6px; }
.run-indicator { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); animation: pulse 1.4s ease-in-out infinite; flex-shrink: 0; }
@keyframes pulse { 50% { opacity: .3; } }

/* ---------- Target detail ---------- */
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; }
.detail-item { font-size: 13px; word-break: break-all; }
.detail-item .k { color: var(--muted); }
.logs {
  background: #0b101b; border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px;
  font: 12px/1.6 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: var(--red); white-space: pre-wrap; word-break: break-word; overflow-x: auto;
}
.success-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }

@media (max-width: 600px) {
  .grid2 { grid-template-columns: 1fr; }
}

/* ---------- Live recon progress (left panel) ---------- */
.app-layout { display: flex; gap: 16px; align-items: flex-start; }
.app-main { flex: 1; min-width: 0; }
.progress-side { width: 360px; flex-shrink: 0; position: sticky; top: 16px; }

.progress-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.progress-title { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0; }
.run-badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 700; color: var(--accent);
  border: 1px solid rgba(34,211,238,.35); border-radius: 999px; padding: 3px 10px;
  background: rgba(34,211,238,.07);
}
.run-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 1.3s ease-in-out infinite; }

.pg-domain-card { background: var(--card); border: 1px solid var(--border-strong); border-radius: 12px; padding: 14px 16px; }
.domain-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.pg-domain { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 17px; font-weight: 800; margin: 4px 0 0; word-break: break-all; }
.pg-meta { display: flex; gap: 16px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.pg-meta b { color: var(--text); font-weight: 700; }
.bar { height: 6px; border-radius: 999px; background: rgba(255,255,255,.06); overflow: hidden; margin-top: 12px; }
.bar-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #06b6d4, #22d3ee); box-shadow: 0 0 12px rgba(34,211,238,.5); border-radius: 999px; transition: width .4s ease; }

.progress-list { display: flex; flex-direction: column; gap: 2px; max-height: 62vh; overflow-y: auto; margin-top: 14px; padding-right: 4px; }

.pg-wave {
  display: flex; align-items: center; gap: 8px; cursor: pointer; user-select: none;
  margin-top: 10px; padding: 7px 8px; border-radius: 9px; transition: background .15s;
}
.pg-wave:hover { background: rgba(255,255,255,.03); }
.pg-wave .chev {
  width: 8px; height: 8px; flex-shrink: 0;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg); transition: transform .18s;
}
.pg-wave.open .chev { transform: rotate(45deg) translate(-1px, -1px); }
.pg-wave .w-label { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); flex: 1; }
.pg-wave.done .w-label { color: var(--green); }
.pg-wave.active .w-label { color: var(--accent); }
.pg-wave .w-status { font-size: 11px; font-weight: 700; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.pg-wave.done .w-status { color: var(--green); }
.pg-wave.active .w-status { color: var(--accent); }

.pg-wtasks { display: none; flex-direction: column; gap: 2px; }
.pg-wtasks.open { display: flex; }

.pg-task { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 9px; transition: background .2s; }
.pg-task.active { background: rgba(34,211,238,.07); border: 1px solid rgba(34,211,238,.22); }
.pg-task.done { opacity: .8; }
.pg-task .icon { width: 18px; height: 18px; flex-shrink: 0; display: grid; place-items: center; }
.pg-task .check { display: none; width: 15px; height: 15px; }
.pg-task .check circle { fill: rgba(52,211,153,.15); }
.pg-task .check path { stroke: var(--green); fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.pg-task .spin { display: none; width: 13px; height: 13px; border-radius: 50%; border: 2px solid rgba(34,211,238,.25); border-top-color: var(--accent); animation: rot .8s linear infinite; }
.pg-task .pending { display: block; width: 7px; height: 7px; border-radius: 50%; background: rgba(125,133,151,.4); }
.pg-task .name { flex: 1; font-size: 13px; font-weight: 600; }
.pg-task .detail { font-size: 11.5px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.pg-task.active .detail { color: var(--accent); }
.pg-task.done .detail { color: var(--green); }

.pg-idle {
  display: flex; flex-direction: column; gap: 4px; align-items: center; justify-content: center;
  text-align: center; padding: 26px 10px; color: var(--muted);
  border: 1px dashed var(--border-strong); border-radius: 10px; margin-top: 14px;
}
.pg-idle-title { font-size: 13px; font-weight: 700; color: var(--muted); }

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

@media (max-width: 860px) {
  .app-layout { flex-direction: column; }
  .progress-side { width: 100%; position: static; }
}

/* ---------- Login ---------- */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 18px; }
.login-card { width: 100%; max-width: 420px; }
.login-title { font-size: 26px; font-weight: 800; margin: 0 0 20px; }

/* ---------- Modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  background: rgba(3,6,12,.62);
}
.modal-card { width: 100%; max-width: 380px; margin: 0 16px; margin-bottom: 0; }
.modal-title { font-size: 17px; font-weight: 700; margin: 0 0 12px; }
.modal-actions { display: flex; gap: 8px; margin-top: 14px; }
.modal-actions .btn { flex: 1; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 22px; right: 22px; z-index: 100;
  max-width: 400px; padding: 12px 18px; border-radius: 10px;
  font-size: 14px; font-weight: 600; color: #fff;
  box-shadow: 0 18px 44px rgba(0,0,0,.5);
}
.toast-success { background: rgba(16,185,129,.95); }
.toast-error { background: rgba(239,68,68,.95); }
