/* scout.css — ElytraScout v2 UI Stylesheet
 * Dark professional theme for internal security engineer tooling.
 * No external framework. Designed for clarity under field conditions.
 * Author: Venkat Mangudi
 */

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

:root {
  --bg:          #0f172a;
  --surface:     #1e293b;
  --surface-2:   #334155;
  --border:      #475569;
  --border-dim:  #1e293b;
  --text:        #f1f5f9;
  --text-dim:    #94a3b8;
  --text-muted:  #64748b;
  --accent:      #0ea5e9;
  --accent-dim:  #0284c7;
  --success:     #22c55e;
  --warning:     #f59e0b;
  --danger:      #ef4444;
  --critical:    #dc2626;
  --radius:      6px;
  --radius-lg:   10px;
  --shadow:      0 4px 24px rgba(0,0,0,0.5);
  --transition:  140ms ease;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
               'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: #38bdf8; }

/* ── Layout ──────────────────────────────────────────────────────────────── */
.layout {
  display: grid;
  grid-template-columns: 210px 1fr;
  grid-template-rows: 52px 1fr;
  min-height: 100vh;
}

.topbar {
  grid-column: 1 / -1;
  background: var(--surface);
  border-bottom: 1px solid var(--border-dim);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-brand {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--text);
}

.topbar-brand .accent { color: var(--accent); }

.topbar-version {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 4px;
}

.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
}

.topbar-user { color: var(--text-dim); }

.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border-dim);
  padding: 20px 0;
  display: flex;
  flex-direction: column;
}

.sidebar-section { margin-bottom: 8px; }

.sidebar-label {
  padding: 6px 18px 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.sidebar a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  color: var(--text-dim);
  font-size: 13px;
  border-left: 3px solid transparent;
  transition: all var(--transition);
}

.sidebar a:hover, .sidebar a.active {
  color: var(--text);
  background: rgba(255,255,255,0.04);
  border-left-color: var(--accent);
}

.main {
  padding: 28px 32px;
  overflow-y: auto;
}

.main-inner { max-width: 1100px; }

/* ── Page Header ─────────────────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
}

.page-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.4px;
}

.page-subtitle {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 3px;
}

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 18px;
}

.card-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-dim);
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  font-family: inherit;
  line-height: 1.4;
}

.btn:disabled { opacity: 0.35; cursor: not-allowed; pointer-events: none; }

.btn-primary  { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-dim); border-color: var(--accent-dim); color: #fff; }

.btn-danger   { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: #dc2626; color: #fff; }

.btn-warning  { background: var(--warning); color: #000; border-color: var(--warning); }
.btn-warning:hover { background: #d97706; color: #000; }

.btn-ghost    { background: transparent; color: var(--text-dim); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }

.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-full { width: 100%; justify-content: center; }

/* ── Forms ───────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }

label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

input[type="text"], input[type="email"], input[type="password"],
input[type="number"], select, textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 8px 12px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(14,165,233,0.12);
}

input::placeholder, textarea::placeholder { color: var(--text-muted); }
textarea { resize: vertical; min-height: 80px; }

.form-hint { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-dim);
}

/* Toggle switch */
input[type="checkbox"].toggle {
  width: 38px; height: 21px;
  appearance: none;
  background: var(--border);
  border-radius: 12px;
  cursor: pointer;
  position: relative;
  transition: background var(--transition);
  border: none; padding: 0; flex-shrink: 0;
}
input[type="checkbox"].toggle::after {
  content: '';
  position: absolute;
  width: 15px; height: 15px;
  background: #fff;
  border-radius: 50%;
  top: 3px; left: 3px;
  transition: left var(--transition);
}
input[type="checkbox"].toggle:checked { background: var(--accent); }
input[type="checkbox"].toggle:checked::after { left: 20px; }

/* ── Tables ──────────────────────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border-dim);
}

table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead { background: var(--surface-2); }
th {
  padding: 9px 14px;
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-dim);
}
td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-dim);
  vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(255,255,255,0.02); }
.table-empty { text-align: center; color: var(--text-muted); padding: 32px; }

/* ── Badges ──────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
}

.badge-draft        { background: rgba(100,116,139,.15); color: #94a3b8; border: 1px solid #475569; }
.badge-awaiting     { background: rgba(245,158,11,.15);  color: #fbbf24; border: 1px solid #d97706; }
.badge-authorized   { background: rgba(14,165,233,.15);  color: #38bdf8; border: 1px solid #0284c7; }
.badge-onsite       { background: rgba(139,92,246,.15);  color: #a78bfa; border: 1px solid #7c3aed; }
.badge-scanning     { background: rgba(14,165,233,.15);  color: #38bdf8; border: 1px solid #0284c7; animation: pulse 1.5s infinite; }
.badge-complete     { background: rgba(34,197,94,.15);   color: #4ade80; border: 1px solid #16a34a; }
.badge-report       { background: rgba(16,185,129,.15);  color: #34d399; border: 1px solid #059669; }
.badge-archived     { background: rgba(100,116,139,.1);  color: #64748b; border: 1px solid #334155; }
.badge-cancelled    { background: rgba(239,68,68,.15);   color: #f87171; border: 1px solid #dc2626; }

.badge-critical { background: rgba(220,38,38,.2);   color: #fca5a5; }
.badge-high     { background: rgba(239,68,68,.15);  color: #f87171; }
.badge-medium   { background: rgba(245,158,11,.15); color: #fbbf24; }
.badge-low      { background: rgba(34,197,94,.12);  color: #86efac; }
.badge-info     { background: rgba(100,116,139,.15);color: #94a3b8; }

.badge-queued   { background: rgba(100,116,139,.2); color: #94a3b8; }
.badge-running  { background: rgba(14,165,233,.15); color: #38bdf8; animation: pulse 1.5s infinite; }
.badge-failed   { background: rgba(239,68,68,.15);  color: #f87171; }
.badge-completed { background: rgba(34,197,94,.15); color: #4ade80; }

@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.45} }

/* ── Scope type chips ─────────────────────────────────────────────────────── */
.scope-chip {
  display: inline-block; padding: 2px 7px;
  border-radius: 4px; font-size: 10px; font-weight: 700; text-transform: uppercase;
}
.scope-external-domain { background: rgba(14,165,233,.15);  color: #38bdf8; }
.scope-external-ip     { background: rgba(139,92,246,.15);  color: #a78bfa; }
.scope-internal-cidr   { background: rgba(34,197,94,.15);   color: #4ade80; }
.scope-exclusion       { background: rgba(239,68,68,.15);   color: #f87171; }

/* ── Alerts ──────────────────────────────────────────────────────────────── */
.alert {
  padding: 11px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 18px;
  border-left: 3px solid;
}
.alert-error   { background: rgba(239,68,68,.1);   border-color: var(--danger);  color: #fca5a5; }
.alert-success { background: rgba(34,197,94,.1);   border-color: var(--success); color: #86efac; }
.alert-warning { background: rgba(245,158,11,.1);  border-color: var(--warning); color: #fcd34d; }
.alert-info    { background: rgba(14,165,233,.1);  border-color: var(--accent);  color: #7dd3fc; }

/* ── Wizard step nav ─────────────────────────────────────────────────────── */
.wizard-nav {
  display: flex;
  gap: 2px;
  background: var(--surface);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-lg);
  padding: 5px;
  margin-bottom: 26px;
}
.wizard-nav-item {
  flex: 1; text-align: center; padding: 7px 4px;
  border-radius: var(--radius); font-size: 11px;
  color: var(--text-muted); cursor: default; user-select: none;
}
.wizard-nav-item .step-num {
  display: block; font-size: 10px; margin-bottom: 1px;
}
.wizard-nav-item.done { color: var(--accent); }
.wizard-nav-item.current { background: var(--surface-2); color: var(--text); font-weight: 600; }

.wizard-wrap { max-width: 740px; }

/* ── Modal ───────────────────────────────────────────────────────────────── */
.modal-backdrop {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.72); z-index: 200;
  align-items: center; justify-content: center;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px; max-width: 500px; width: 90%;
  box-shadow: var(--shadow);
}
.modal-title { font-size: 16px; font-weight: 700; margin-bottom: 14px; }
.modal-body  { font-size: 13px; color: var(--text-dim); margin-bottom: 22px; line-height: 1.7; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

.sop-notice {
  background: rgba(245,158,11,.1);
  border: 1px solid var(--warning);
  border-radius: var(--radius);
  padding: 12px 15px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #fcd34d;
  line-height: 1.6;
}

/* ── Login ───────────────────────────────────────────────────────────────── */
.login-wrap {
  min-height: 100vh; display: flex;
  align-items: center; justify-content: center;
}
.login-card {
  background: var(--surface);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-lg);
  padding: 40px; width: 100%; max-width: 400px;
  box-shadow: var(--shadow);
}
.login-brand { text-align: center; margin-bottom: 28px; }
.login-brand h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.5px; }
.login-brand p  { font-size: 12px; color: var(--text-muted); margin-top: 5px; }

/* ── Engagement detail ────────────────────────────────────────────────────── */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 18px;
  align-items: start;
}

.meta-row {
  display: flex; gap: 8px;
  font-size: 13px; margin-bottom: 9px;
}
.meta-key   { color: var(--text-muted); min-width: 150px; flex-shrink: 0; }
.meta-value { color: var(--text); font-weight: 500; }

.stat-grid {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 8px; margin-bottom: 18px;
}
.stat-box {
  background: var(--surface); border: 1px solid var(--border-dim);
  border-radius: var(--radius); padding: 12px; text-align: center;
}
.stat-number { font-size: 26px; font-weight: 700; line-height: 1; }
.stat-label  { font-size: 10px; color: var(--text-muted); text-transform: uppercase; margin-top: 3px; }
.stat-critical .stat-number { color: #dc2626; }
.stat-high .stat-number     { color: var(--danger); }
.stat-medium .stat-number   { color: var(--warning); }
.stat-low .stat-number      { color: var(--success); }
.stat-info .stat-number     { color: var(--text-muted); }

/* ── Toggle row (scanner toggles, wizard step 5) ─────────────────────────── */
.toggle-row {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px 0; border-bottom: 1px solid var(--border-dim);
}
.toggle-row:last-child { border-bottom: none; }
.toggle-content { flex: 1; }
.toggle-content strong { display: block; font-size: 13px; color: var(--text); }
.toggle-content span   { font-size: 12px; color: var(--text-muted); }

/* ── Utilities ───────────────────────────────────────────────────────────── */
.text-dim    { color: var(--text-dim); }
.text-muted  { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.text-danger { color: var(--danger); }
.text-success{ color: var(--success); }
.text-small  { font-size: 12px; }
.text-mono   { font-family: 'Courier New', Consolas, monospace; font-size: 12px; }
.divider     { height: 1px; background: var(--border-dim); margin: 18px 0; }
.flex        { display: flex; }
.items-center{ align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.w-full{ width: 100%; }

/* HTMX loading indicator */
.htmx-indicator   { display: none; }
.htmx-request .htmx-indicator { display: inline; }
.spinner {
  display: inline-block; width: 14px; height: 14px;
  border: 2px solid var(--border); border-top-color: var(--accent);
  border-radius: 50%; animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .detail-grid { grid-template-columns: 1fr; }
  .form-row,.form-row-3 { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(3,1fr); }
}


/* =========================================================================
   LAYOUT — consolidated (replaces all previous layout patches)
   ========================================================================= */

/* Full-page grid: sidebar | main, with topbar spanning both columns */
.layout {
  display: grid;
  grid-template-columns: 210px 1fr;
  grid-template-rows: 52px 1fr auto;
  min-height: 100vh;
  max-width: 1200px;
  margin: 0 auto;
}

/* Topbar spans full width of the layout grid */
.topbar {
  grid-column: 1 / -1;
  grid-row: 1;
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border-dim);
  display: flex;
  justify-content: center;
  padding: 0;
}

/* Topbar inner: three-column grid — brand | flags | user */
.topbar-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  padding: 0 32px;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-brand img {
  height: 46px;
  width: auto;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}

/* Sidebar */
.sidebar {
  grid-column: 1;
  grid-row: 2;
  background: transparent;
  border-right: 1px solid var(--border-dim);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-top: 8px;
}

.sidebar-section {
  width: 100%;
  padding: 16px 0 0 0;
}

.sidebar-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 16px;
  margin-bottom: 4px;
}

.sidebar a {
  display: block;
  padding: 7px 16px;
  font-size: 13px;
  color: var(--text-dim);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: color .15s, background .15s;
}

.sidebar a:hover {
  color: var(--text);
  background: var(--surface-2);
}

.sidebar a.active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: rgba(14,165,233,.06);
}

/* Main content area */
.main {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
}

.main-inner {
  padding: 32px;
  width: 100%;
  box-sizing: border-box;
}

/* Wizard pages are narrower */
.wizard-wrap {
  max-width: 720px;
}

/* Footer spans full grid width */
.scout-footer {
  grid-column: 1 / -1;
  grid-row: 3;
  border-top: 1px solid var(--border-dim);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.scout-footer-left {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.6;
}

.scout-footer-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.scout-footer-badge {
  font-size: 10px;
  color: var(--accent);
  background: rgba(14,165,233,.08);
  border: 1px solid rgba(14,165,233,.2);
  border-radius: 4px;
  padding: 2px 8px;
  white-space: nowrap;
}

/* ==========================================================================
   ADDITIONS: utility classes, component patterns, landing page styles
   Added: 2026-03-01 — security baseline hardening (no inline styles)
   Author: Venkat Mangudi
   ========================================================================== */

/* ── Spacing utilities ───────────────────────────────────────────────────── */
.mb-0  { margin-bottom: 0; }
.mb-12 { margin-bottom: 12px; }
.mb-14 { margin-bottom: 14px; }
.mb-18 { margin-bottom: 18px; }
.mb-20 { margin-bottom: 20px; }
.mt-4  { margin-top: 4px; }
.mt-14 { margin-top: 14px; }
.ml-10 { margin-left: 10px; }
.mr-4  { margin-right: 4px; }
.mr-8  { margin-right: 8px; }
.pt-22 { padding-top: 22px; }

/* ── Flex utilities ──────────────────────────────────────────────────────── */
.gap-4       { gap: 4px; }
.gap-6       { gap: 6px; }
.gap-10      { gap: 10px; }
.flex-wrap   { flex-wrap: wrap; }
.flex-col    { flex-direction: column; }
.flex-start  { align-items: flex-start; }
.justify-start { justify-content: flex-start; }

/* ── Text utilities ──────────────────────────────────────────────────────── */
.text-capitalize { text-transform: capitalize; }
.inline          { display: inline; }

/* ── Button: secondary ───────────────────────────────────────────────────── */
.btn-secondary       { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--surface); color: var(--text); border-color: var(--border); }

/* ── Button: hero (landing page CTA) ─────────────────────────────────────── */
.btn-hero { font-size: 15px; padding: 10px 28px; }

/* ── Topbar brand elements ───────────────────────────────────────────────── */
/* The topbar nav partial uses these instead of inline style= attributes.     */
.topbar-brand-logo {
  height: 36px;
  width: auto;
  vertical-align: middle;
}
.topbar-brand-name {
  vertical-align: middle;
  font-size: 16px;
  font-weight: 700;
  margin-left: 10px;
  color: var(--text);
}

/* ── Environment indicator badges ────────────────────────────────────────── */
.env-badge-warning {
  font-size: 11px;
  color: var(--warning);
  background: rgba(245,158,11,.1);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--warning);
  white-space: nowrap;
}
.env-badge-danger {
  font-size: 11px;
  color: var(--danger);
  background: rgba(239,68,68,.1);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--danger);
  white-space: nowrap;
}

/* ── Card variants ───────────────────────────────────────────────────────── */
/* card-inner: a nested card with background reversed to the page bg.        */
.card-inner {
  background: var(--bg);
  border-color: var(--border-dim);
}

/* card-title-sm: smaller section label within a card, no separator line.    */
.card-title-sm {
  font-size: 11px;
  margin-bottom: 10px;
  border-bottom: none;
  padding-bottom: 0;
}

/* ── Jobs panel (sticky sidebar column) ──────────────────────────────────── */
.jobs-panel { position: sticky; top: 70px; }

/* ── Form action row variants ────────────────────────────────────────────── */
.form-actions-start {
  justify-content: flex-start;
  border-top: none;
  padding-top: 8px;
}
.form-actions-sm {
  padding-top: 8px;
  border-top: none;
  margin-top: 0;
}
.form-actions-bare { border-top: none; }

/* ── Organisation name display (wizard step 2, review) ───────────────────── */
.org-name { font-size: 15px; font-weight: 600; color: var(--accent); }

/* ── Engagement page title row ───────────────────────────────────────────── */
.engagement-title { display: flex; align-items: center; gap: 12px; }

/* ── Scanner badge list (modal) ──────────────────────────────────────────── */
.scanner-badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 10px 0;
}

/* ── Scanner capability info box (modal, webcheck) ───────────────────────── */
.scanner-info-box {
  font-size: 12px;
  color: var(--text-muted);
  margin: 10px 0;
  background: var(--surface-2);
  border-radius: 6px;
  padding: 12px;
}
.scanner-info-box strong {
  color: var(--text-dim);
  display: block;
  margin-bottom: 6px;
}

/* ── SOP confirmation label and checkbox ─────────────────────────────────── */
.sop-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  font-weight: 400;
  text-transform: none;
  cursor: pointer;
  line-height: 1.5;
}
.sop-checkbox {
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: var(--accent);
}

/* ── Findings stat grid (findings_table partial) ─────────────────────────── */
.findings-stat-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 18px;
  text-align: center;
}
.findings-stat-count {
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}
.findings-stat-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-top: 4px;
}
.findings-stat-critical .findings-stat-count { color: var(--critical); }
.findings-stat-high     .findings-stat-count { color: var(--danger); }
.findings-stat-medium   .findings-stat-count { color: var(--warning); }
.findings-stat-low      .findings-stat-count { color: var(--success); }
.findings-stat-info     .findings-stat-count { color: var(--text-muted); }

/* ── Job item (jobs_table partial) ───────────────────────────────────────── */
.job-item {
  padding: 9px 0;
  border-bottom: 1px solid var(--border-dim);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.job-item:last-child { border-bottom: none; }
.job-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.job-item-type  { font-size: 12px; color: var(--text-dim); }
.job-item-badge { font-size: 9px; }
.job-item-meta  { font-size: 10px; color: var(--text-muted); }
.job-item-error {
  font-size: 10px;
  color: var(--danger);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.jobs-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 24px 0;
  font-size: 12px;
}

/* ── Login page supplementary ────────────────────────────────────────────── */
.login-note {
  text-align: center;
  margin-top: 20px;
  font-size: 11px;
  color: var(--text-muted);
}
.login-footer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  padding: 12px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-dim);
  background: var(--bg);
}
.login-footer-badges { display: flex; gap: 8px; }
.cert-badge {
  color: var(--accent);
  background: rgba(14,165,233,.08);
  border: 1px solid rgba(14,165,233,.2);
  border-radius: 4px;
  padding: 2px 8px;
}

/* ── Label with inline toggle checkbox (wizard step 4) ───────────────────── */
.label-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: none;
  font-weight: 400;
  cursor: pointer;
}

/* ==========================================================================
   LANDING PAGE STYLES
   Moved from inline <style> block in landing.html — 2026-03-01
   ========================================================================== */
.landing-root {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}
.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 48px;
  border-bottom: 1px solid var(--border-dim);
}
.landing-nav-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.landing-nav-brand img { height: 40px; width: auto; }
.landing-nav-brand-text {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}
.landing-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px 60px;
}
.landing-hero-logo { height: 80px; width: auto; margin-bottom: 32px; opacity: 0.95; }
.landing-hero-title {
  font-size: 42px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.8px;
  line-height: 1.15;
  margin-bottom: 10px;
}
.landing-hero-accent { color: var(--accent); }
.landing-hero-sub {
  font-size: 18px;
  color: var(--text-dim);
  margin-bottom: 40px;
  max-width: 520px;
  line-height: 1.6;
}
.landing-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-bottom: 72px;
}
.landing-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 860px;
  width: 100%;
  margin: 0 auto;
}
.landing-pillar {
  background: var(--surface);
  border: 1px solid var(--border-dim);
  border-radius: 10px;
  padding: 24px 22px;
  text-align: left;
}
.landing-pillar-icon    { font-size: 22px; margin-bottom: 12px; }
.landing-pillar-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.landing-pillar-body { font-size: 13px; color: var(--text-dim); line-height: 1.6; }
.landing-footer {
  text-align: center;
  padding: 28px 24px;
  font-size: 11px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-dim);
}
.landing-cert {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(14,165,233,.08);
  border: 1px solid rgba(14,165,233,.2);
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 11px;
  color: var(--accent);
  margin-bottom: 48px;
}
@media (max-width: 700px) {
  .landing-pillars    { grid-template-columns: 1fr; }
  .landing-hero-title { font-size: 28px; }
  .landing-nav        { padding: 16px 20px; }
}

/* ── Jobs panel scroll — prevents right column overflowing page height ── */
.jobs-panel {
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

/* ── Small button variant for inline job actions ────────────────────── */
.btn-xs {
  padding: 3px 10px;
  font-size: 11px;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  border: 1px solid transparent;
}
.btn-xs.btn-secondary {
  background: transparent;
  border-color: var(--border);
  color: var(--text-primary);
}
.btn-xs.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-xs.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-xs.btn-primary:hover { opacity: 0.88; }

/* ── Job item report action row ─────────────────────────────────────── */
.mt-8 { margin-top: 8px; }
.job-item-actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

/* ── Findings table — fixed layout prevents URL overflow ────────────── */
table.findings-table {
  table-layout: fixed;
  width: 100%;
}
table.findings-table td,
table.findings-table th {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
table.findings-table td:nth-child(2),
table.findings-table th:nth-child(2) {
  white-space: normal;
  word-break: break-word;
}
