:root {
  --bg: #f5f7fa;
  --card: #ffffff;
  --ink: #1a2233;
  --muted: #667085;
  --line: #e3e8ef;
  --brand: #1b4965;
  --brand-2: #2a6f97;
  --accent: #f2f7fb;
  --pass: #1a7f4b;
  --pass-bg: #e6f4ec;
  --fail: #b42318;
  --fail-bg: #fdecea;
  --warn: #8a6d00;
  --warn-bg: #fdf6e3;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}
a { color: var(--brand-2); }

header.topbar {
  background: var(--brand);
  color: #fff;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
header.topbar .brand { font-weight: 700; font-size: 18px; letter-spacing: .2px; }
header.topbar .brand span { opacity: .7; font-weight: 400; font-size: 13px; display:block; }
header.topbar nav a { color: #dbe8f1; margin-left: 18px; text-decoration: none; font-size: 14px; }
header.topbar nav a:hover { color: #fff; }

.container { max-width: 1000px; margin: 0 auto; padding: 24px; }

.login-wrap { min-height: 90vh; display:flex; align-items:center; justify-content:center; padding: 24px; }
.login-card { max-width: 380px; width: 100%; }
.login-card code { background: var(--accent); padding: 1px 5px; border-radius: 4px; font-size: 12px; }

.badge { display:inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight:600; }
.badge.ai-on { background:#e6f4ec; color: var(--pass); }
.badge.ai-off { background:#eef1f5; color: var(--muted); }

.flash {
  background: #eaf3fb; border: 1px solid #cfe2f3; color: #1b4965;
  padding: 10px 14px; border-radius: 8px; margin-bottom: 18px; font-size: 14px;
}

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 20px; margin-bottom: 18px;
}
.card h2 { margin: 0 0 4px; font-size: 18px; }
.card h3 { margin: 18px 0 8px; font-size: 15px; color: var(--brand); }
.muted { color: var(--muted); font-size: 13px; }

label { display:block; font-size: 13px; font-weight: 600; margin: 12px 0 4px; }
input[type=text], input[type=number], input[type=password], select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line);
  border-radius: 8px; font-size: 14px; font-family: inherit; background:#fff;
}
textarea { min-height: 110px; resize: vertical; }
.row { display:flex; gap: 14px; flex-wrap: wrap; }
.row > div { flex: 1 1 180px; }

.btn {
  display:inline-block; background: var(--brand-2); color:#fff; border:none;
  padding: 10px 18px; border-radius: 8px; font-size: 14px; font-weight:600;
  cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--brand); }
.btn:disabled { opacity:.55; cursor:not-allowed; pointer-events:none; }
.btn.secondary { background:#eef2f6; color: var(--brand); }
.btn.small { padding: 5px 10px; font-size: 12px; }
.btn.danger { background:#fbe9e7; color: var(--fail); }

table { width:100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align:left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight:600; font-size: 12px; text-transform: uppercase; letter-spacing:.4px; }
tr.excluded { opacity: .45; }
tr.hl-new > td { animation: hlfade 3.5s ease-out; }
@keyframes hlfade { 0%, 15% { background: #fff3c4; } 100% { background: transparent; } }

.verdict {
  display:flex; align-items:center; gap: 14px; padding: 16px;
  border-radius: 10px; margin-bottom: 14px;
}
.verdict.pass { background: var(--pass-bg); }
.verdict.fail { background: var(--fail-bg); }
.verdict.warn { background: var(--warn-bg); }
.verdict .big { font-size: 26px; font-weight: 800; }
.verdict.pass .big { color: var(--pass); }
.verdict.fail .big { color: var(--fail); }
.verdict.warn .big { color: var(--warn); }

.stats { display:flex; gap: 14px; flex-wrap: wrap; margin: 8px 0 4px; }
.stat { flex:1 1 150px; background: var(--accent); border-radius:10px; padding:12px 14px; }
.stat .k { font-size:12px; color: var(--muted); }
.stat .v { font-size: 20px; font-weight:700; }

details.tool { border:1px solid var(--line); border-radius:10px; padding: 4px 14px; margin-bottom:10px; background:#fff; }
details.tool summary { cursor:pointer; font-weight:600; padding: 10px 0; font-size:14px; }
details.tool[open] summary { border-bottom:1px solid var(--line); margin-bottom: 12px; }

.report { background:#fff; border:1px solid var(--line); border-radius:12px; padding: 26px 30px; }
.report h2 { font-size: 20px; }
.report h3 { color: var(--brand); font-size: 15px; margin-top: 20px; }
.report h4 { color: var(--brand-2); font-size: 13px; margin-top: 16px; text-transform:uppercase; letter-spacing:.4px; }
.table-wrap { overflow-x:auto; margin: 10px 0; }
.report table { font-size: 13px; border:1px solid var(--line); }
.report th { background: var(--accent); color: var(--ink); text-transform:none; letter-spacing:0; font-size:12px; }
.report td, .report th { border-bottom:1px solid var(--line); padding:7px 10px; }

.pill { font-size: 11px; padding: 2px 8px; border-radius: 6px; background:#eef2f6; color: var(--muted); }

/* Status chip (header at-a-glance state) */
.status-chip { display:inline-block; padding: 3px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; vertical-align: middle; letter-spacing:.3px; }
.status-chip.pass { background: var(--pass-bg); color: var(--pass); }
.status-chip.fail { background: var(--fail-bg); color: var(--fail); }
.status-chip.warn { background: var(--warn-bg); color: var(--warn); }
.status-chip.muted { background:#eef2f6; color: var(--muted); }

/* Numbered step badge on section headings */
.step-num { display:inline-flex; align-items:center; justify-content:center; width:26px; height:26px; border-radius:50%; background: var(--brand); color:#fff; font-size:13px; font-weight:700; margin-right:10px; flex:0 0 auto; }
.card h2.step { display:flex; align-items:center; }

/* Evidence-method accordion: always-visible description under the title */
.tool summary .tool-title { font-weight:700; }
.tool-desc { display:block; font-weight:400; font-size:12.5px; color: var(--muted); margin-top:3px; }
.tool.recommended { border-color: var(--brand-2); box-shadow: 0 0 0 1px var(--brand-2) inset; }

/* Friendly empty / call-to-action states */
.empty-cta { background: var(--accent); border:1px dashed #c9d6e2; border-radius:10px; padding:18px 20px; color: var(--muted); font-size:14px; }
.empty-cta strong { color: var(--ink); }
.verdict .cta { margin-left:auto; }
.verdict { flex-wrap: wrap; }
.case-row { display:flex; align-items:center; justify-content:space-between; gap:12px; border-bottom:1px solid var(--line); }
.case-row a { display:block; flex:1 1 auto; padding: 12px 4px; text-decoration:none; color: var(--ink); }
.case-row a:hover { background: var(--accent); }
.case-row form { flex:0 0 auto; }
.disclaimer { font-size:12px; color: var(--warn); background: var(--warn-bg); padding:8px 12px; border-radius:8px; margin-top:8px;}

.autogather { background: linear-gradient(180deg,#eef6fb,#e7f0f8); border:1px solid #cfe2f3; border-radius:12px; padding:16px 18px; margin: 6px 0 16px; }
.autogather .btn { font-size:15px; }

/* Role-title occupation autocomplete */
.field-wrap { position: relative; }
.suggest { position:absolute; left:0; right:0; top:100%; z-index:30; background:#fff; border:1px solid var(--line); border-top:none; border-radius:0 0 10px 10px; box-shadow:0 10px 24px rgba(20,40,70,.12); max-height:300px; overflow-y:auto; display:none; }
.suggest .opt { padding:9px 12px; cursor:pointer; display:flex; align-items:center; gap:10px; border-bottom:1px solid #f0f3f7; }
.suggest .opt:last-child { border-bottom:none; }
.suggest .opt:hover, .suggest .opt.active { background: var(--accent); }
.suggest .opt-name { flex:1 1 auto; font-size:14px; }
.suggest .opt-code { font-size:12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.suggest .opt-csol { font-size:10px; font-weight:700; color: var(--pass); background: var(--pass-bg); padding:1px 6px; border-radius:6px; letter-spacing:.4px; }
.anzsco-confirm { font-size:13px; color: var(--muted); margin-top:6px; min-height:18px; }
.chip-csol { color: var(--pass); font-weight:600; }
.chip-nocsol { color: var(--warn); font-weight:600; }
.badge.csol { background: var(--pass-bg); color: var(--pass); }

/* Evidence row extras */
.ev-note { font-size:12px; color: var(--brand); }
.ev-url { font-size:12px; color: var(--brand-2); text-decoration:none; }
.ev-url:hover { text-decoration:underline; }
details.rawtext { margin-top:4px; }
details.rawtext summary { font-size:11px; color: var(--muted); cursor:pointer; }
details.rawtext div { max-height:130px; overflow:auto; font-size:11px; background: var(--accent); border-radius:6px; padding:6px 8px; margin-top:4px; white-space:pre-wrap; }
.evidence-edit { border:1px solid var(--brand-2); border-radius:10px; padding:14px 16px; margin-bottom:14px; background:#f4f9fd; }

/* Pre-filled job-site search links */
.joblinks { border:1px solid var(--line); border-radius:12px; padding:14px 16px; margin: 0 0 16px; background:#fff; }
.joblinks-head { font-weight:700; font-size:14px; margin-bottom:10px; }
.joblinks-list { display:flex; flex-wrap:wrap; gap:8px; }
.joblink { display:inline-flex; align-items:center; gap:6px; padding:8px 14px; border:1px solid var(--brand-2); color: var(--brand); border-radius:999px; text-decoration:none; font-size:13px; font-weight:600; background:#fff; }
.joblink:hover { background: var(--brand-2); color:#fff; }
.jl-login { font-size:10px; font-weight:700; background:var(--warn-bg); color:var(--warn); padding:1px 6px; border-radius:6px; }
.joblink:hover .jl-login { background:#fff; }
