/* OpenCareer — feuille de style unique, sans framework ni CDN. */
:root {
  --sidebar-w: 250px;
  --bg: #0a0f13;
  --bg-soft: #0d151b;
  --panel: #111a21;
  --panel-2: #162129;
  --panel-3: #1b2831;
  --line: #22313b;
  --line-soft: #1a262e;
  --text: #e8f0f3;
  --muted: #8fa4ae;
  --faint: #6b808a;
  --accent: #4fd1c5;
  --accent-2: #60a5fa;
  --accent-ink: #06201f;
  --good: #4ade80;
  --warn: #fbbf24;
  --bad: #fb7185;
  --violet: #a78bfa;
  --sidebar-bg: #0a1115;
  --sidebar-text: #dce8eb;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --radius: 14px;
  --radius-sm: 9px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Code", "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

:root[data-theme="light"] {
  --bg: #f2f6f7;
  --bg-soft: #e9eff1;
  --panel: #ffffff;
  --panel-2: #f6fafb;
  --panel-3: #eef4f5;
  --line: #d9e5e8;
  --line-soft: #e6eef0;
  --text: #13232b;
  --muted: #5c727d;
  --faint: #7b9099;
  --accent: #0f766e;
  --accent-2: #2563eb;
  --accent-ink: #ffffff;
  --good: #15803d;
  --warn: #b45309;
  --bad: #be123c;
  --violet: #6d28d9;
  --sidebar-bg: #0a1115;
  --sidebar-text: #dce8eb;
  --shadow: 0 18px 50px rgba(18, 44, 54, 0.12);
}

* { box-sizing: border-box; }
[hidden], .hidden { display: none !important; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { display: block; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -0.02em; }
p { margin: 0; }
::selection { background: color-mix(in srgb, var(--accent) 35%, transparent); }

.skip-link {
  position: fixed; left: 12px; top: -60px; z-index: 200;
  background: var(--accent); color: var(--accent-ink);
  padding: 10px 16px; border-radius: 8px; font-weight: 700;
}
.skip-link:focus { top: 12px; }

/* ---------------------------------------------------------------- sidebar */
.app { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 60;
  display: flex; flex-direction: column; gap: 22px;
  padding: 22px 16px 18px;
  background:
    radial-gradient(700px 300px at 10% -5%, rgba(79, 209, 197, 0.14), transparent 65%),
    var(--sidebar-bg);
  color: var(--sidebar-text);
  border-right: 1px solid rgba(255, 255, 255, 0.055);
}
.brand { display: flex; align-items: center; gap: 11px; color: var(--sidebar-text); padding: 2px 8px; }
.brand:hover { text-decoration: none; }
.brand-mark { display: inline-flex; filter: drop-shadow(0 6px 14px rgba(79, 209, 197, 0.25)); }
.brand-text { font-size: 18px; letter-spacing: -0.03em; }
.brand-text strong { font-weight: 800; }
.brand-text { font-weight: 400; opacity: 0.95; }

.nav { display: flex; flex-direction: column; gap: 3px; overflow-y: auto; padding-right: 2px; }
.nav::-webkit-scrollbar { width: 4px; }
.nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 4px; }
.nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px;
  color: #a9bcc3; font-weight: 500; font-size: 13.6px;
  border: 1px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.nav a svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav a:hover { background: rgba(255, 255, 255, 0.05); color: #eaf4f6; text-decoration: none; }
.nav a.active {
  background: linear-gradient(90deg, rgba(79, 209, 197, 0.16), rgba(79, 209, 197, 0.04));
  border-color: rgba(79, 209, 197, 0.22);
  color: #ecfffc;
  box-shadow: inset 2px 0 0 var(--accent);
}
.nav a.active svg { color: var(--accent); }

.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.user-card {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 9px 9px 10px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.08);
  min-width: 0;
}
.user-card .avatar {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  display: grid; place-items: center; font-size: 12px; font-weight: 750;
  background: linear-gradient(135deg, #4fd1c5, #3b82f6); color: #071316;
}
.user-card .uinfo { min-width: 0; display: flex; flex-direction: column; flex: 1; }
.user-card .uinfo strong { font-size: 12.5px; color: #e6f1f3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-card .uinfo span { font-size: 10.5px; color: #8ba0a8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-card .icon-btn { flex: none; }
.account-avatar {
  width: 56px; height: 56px; border-radius: 16px; flex: none;
  display: grid; place-items: center; font-size: 19px; font-weight: 780;
  background: linear-gradient(135deg, #4fd1c5, #3b82f6); color: #071316;
  letter-spacing: -0.03em;
}
.sidebar .privacy-note a { color: #7f949c; }
.sidebar .privacy-note a:hover { color: #dce8eb; }
.provider-card {
  display: flex; gap: 10px; align-items: center;
  padding: 11px 12px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.07);
  min-width: 0;
}
.provider-card .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.12); flex: none; }
.provider-card .dot.warn { background: var(--warn); box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.12); }
.provider-card .dot.bad { background: var(--bad); box-shadow: 0 0 0 4px rgba(251, 113, 133, 0.12); }
.provider-card div { min-width: 0; display: flex; flex-direction: column; }
.provider-card strong { font-size: 12.5px; color: #e6f1f3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.provider-card span:last-child { font-size: 11px; color: #8ba0a8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-actions { display: flex; gap: 8px; }
.sidebar .icon-btn { color: #9fb2b9; border-color: rgba(255, 255, 255, 0.08); background: rgba(255, 255, 255, 0.04); }
.sidebar .icon-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.09); }
.privacy-note { font-size: 10.5px; color: #63777f; text-align: center; letter-spacing: 0.02em; }
.icon-sun { display: none; }
[data-theme="light"] .icon-sun { display: block; }
[data-theme="light"] .icon-moon { display: none; }

/* ---------------------------------------------------------------- layout */
.main { margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 14px;
  height: 64px; padding: 0 30px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.crumb { font-size: 12.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.live-dot {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11.5px; color: var(--muted);
  padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--panel);
}
.live-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--good); }
.live-dot.warn::before { background: var(--warn); }
.live-dot.bad::before { background: var(--bad); }
.menu-btn { display: none; }

#view { width: 100%; max-width: 1280px; margin: 0 auto; padding: 30px 30px 72px; flex: 1; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 15px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text); font-weight: 600; font-size: 13px;
  transition: transform 0.08s, background 0.15s, border-color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn:hover { background: var(--panel-3); border-color: color-mix(in srgb, var(--line) 60%, var(--text)); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #38bdf8);
  border-color: transparent; color: var(--accent-ink);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 22%, transparent);
}
.btn-primary:hover { background: linear-gradient(135deg, #5eead4, #7dd3fc); color: var(--accent-ink); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--panel-2); }
.btn-danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); background: color-mix(in srgb, var(--bad) 8%, var(--panel)); }
.btn-sm { padding: 6px 11px; font-size: 12px; border-radius: 8px; }
.btn-lg { padding: 12px 20px; font-size: 14px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--panel); color: var(--muted);
  transition: background 0.15s, color 0.15s;
}
.icon-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:hover { background: var(--panel-2); color: var(--text); }
.icon-btn.sm { width: 28px; height: 28px; border-radius: 7px; }
.icon-btn.sm svg { width: 14px; height: 14px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; font-size: inherit; }
.link-btn:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- typography */
.page-head { display: flex; align-items: flex-end; gap: 18px; margin-bottom: 24px; }
.page-head h1 { font-size: 27px; font-weight: 750; }
.page-head .sub { color: var(--muted); margin-top: 5px; font-size: 13.5px; max-width: 760px; }
.page-head .spacer { flex: 1; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 7px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12.5px; }
.tiny { font-size: 11px; }
.strong { font-weight: 650; }
.mono { font-family: var(--mono); font-size: 12.2px; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.right { text-align: right; }
.mt-1 { margin-top: 6px; } .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 18px; } .mt-4 { margin-top: 26px; }
.mb-2 { margin-bottom: 12px; } .mb-3 { margin-bottom: 18px; }
.flex { display: flex; } .items-center { align-items: center; } .gap-1 { gap: 6px; } .gap-2 { gap: 12px; } .gap-3 { gap: 18px; }
.wrap { flex-wrap: wrap; } .between { justify-content: space-between; }

/* ---------------------------------------------------------------- cards */
.card {
  background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 92%, white 8%), var(--panel));
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.02) inset;
}
.card-pad { padding: 20px 22px; }
.card-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line-soft); }
.card-head h2 { font-size: 14.5px; font-weight: 700; }
.card-head .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.card-head .spacer { flex: 1; }
.card-body { padding: 18px 20px; }
.card-foot { padding: 13px 20px; border-top: 1px solid var(--line-soft); display: flex; align-items: center; gap: 10px; }
.card.accent { border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 7%, var(--panel)), var(--panel)); }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpi { padding: 18px 20px; position: relative; overflow: hidden; }
.kpi .label { font-size: 11.5px; color: var(--muted); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.kpi .value { font-size: 30px; font-weight: 760; letter-spacing: -0.04em; margin-top: 6px; line-height: 1; }
.kpi .meta { font-size: 11.5px; color: var(--faint); margin-top: 8px; }
.kpi .glyph { position: absolute; right: 16px; top: 16px; width: 30px; height: 30px; color: var(--accent); opacity: 0.55; }
.kpi .glyph svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.5; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid-12 { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(290px, 0.85fr); gap: 18px; align-items: start; }
.grid-21 { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.5fr); gap: 18px; align-items: start; }

/* ---------------------------------------------------------------- lists */
.list { display: flex; flex-direction: column; }
.list-row { display: flex; align-items: center; gap: 14px; padding: 13px 20px; border-top: 1px solid var(--line-soft); }
.list-row:first-child { border-top: 0; }
.list-row:hover { background: color-mix(in srgb, var(--panel-2) 65%, transparent); }
.list-main { min-width: 0; flex: 1; }
.list-title { font-weight: 640; font-size: 13.6px; }
.list-sub { color: var(--muted); font-size: 12px; margin-top: 2px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.list-end { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; }
.list-row.clickable { cursor: pointer; }

.empty { padding: 34px 20px; text-align: center; color: var(--muted); }
.empty svg { width: 34px; height: 34px; margin: 0 auto 10px; color: var(--faint); fill: none; stroke: currentColor; stroke-width: 1.4; }
.empty h3 { font-size: 14px; color: var(--text); margin-bottom: 5px; }
.empty p { font-size: 12.5px; max-width: 420px; margin: 0 auto; }

/* ---------------------------------------------------------------- badges */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2.5px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 650; letter-spacing: 0.01em;
  border: 1px solid transparent; white-space: nowrap;
}
.badge.good { background: color-mix(in srgb, var(--good) 12%, transparent); color: var(--good); border-color: color-mix(in srgb, var(--good) 25%, transparent); }
.badge.warn { background: color-mix(in srgb, var(--warn) 12%, transparent); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.badge.bad { background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 25%, transparent); }
.badge.info { background: color-mix(in srgb, var(--accent-2) 12%, transparent); color: var(--accent-2); border-color: color-mix(in srgb, var(--accent-2) 25%, transparent); }
.badge.violet { background: color-mix(in srgb, var(--violet) 12%, transparent); color: var(--violet); border-color: color-mix(in srgb, var(--violet) 25%, transparent); }
.badge.neutral { background: var(--panel-3); color: var(--muted); border-color: var(--line); }
.badge.solid { background: var(--accent); color: var(--accent-ink); }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px; border-radius: 7px; font-size: 11.5px;
  background: var(--panel-3); border: 1px solid var(--line); color: var(--muted);
}
.chip strong { color: var(--text); font-weight: 600; }
.chip.active { background: color-mix(in srgb, var(--accent) 13%, var(--panel)); border-color: color-mix(in srgb, var(--accent) 38%, var(--line)); color: var(--text); }
.chip.active strong { color: var(--accent); }

.score-pill { display: inline-flex; align-items: baseline; gap: 2px; font-weight: 780; letter-spacing: -0.03em; }
.score-pill .n { font-size: 17px; }
.score-pill .d { font-size: 10.5px; color: var(--faint); font-weight: 600; }
.score-pill.good .n { color: var(--good); } .score-pill.mid .n { color: var(--warn); } .score-pill.bad .n { color: var(--bad); }

/* ---------------------------------------------------------------- forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 12px; font-weight: 600; color: var(--muted); }
.field .hint { font-size: 11px; color: var(--faint); }
input[type="text"], input[type="email"], input[type="url"], input[type="password"],
input[type="number"], input[type="search"], select, textarea {
  width: 100%; padding: 9px 11px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--bg-soft); color: var(--text);
  outline: none; transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
textarea { resize: vertical; min-height: 110px; line-height: 1.55; }
input:focus, select:focus, textarea:focus {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent);
}
input::placeholder, textarea::placeholder { color: var(--faint); }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 78px; }
.password-toggle {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  border: 0; background: transparent; color: var(--accent);
  font-size: 11px; font-weight: 700; padding: 6px 7px; border-radius: 6px;
}
.password-toggle:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238fa4ae' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-row { display: flex; gap: 10px; align-items: flex-end; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-size: 13px; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { width: 38px; height: 22px; border-radius: 999px; background: var(--panel-3); border: 1px solid var(--line); position: relative; transition: background 0.15s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: transform 0.15s, background 0.15s; }
.switch input:checked + .track { background: color-mix(in srgb, var(--accent) 25%, var(--panel)); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.switch input:checked + .track::after { transform: translateX(16px); background: var(--accent); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }

.segmented { display: inline-flex; padding: 3px; gap: 2px; background: var(--panel-3); border: 1px solid var(--line); border-radius: 10px; }
.segmented button { border: 0; background: transparent; color: var(--muted); padding: 6px 12px; border-radius: 7px; font-size: 12.5px; font-weight: 600; }
.segmented button.active { background: var(--panel); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.toggle-row:last-child { border-bottom: 0; }
.toggle-row .t { font-size: 13px; font-weight: 600; }
.toggle-row .d { font-size: 11.5px; color: var(--muted); margin-top: 1px; }

/* ---------------------------------------------------------------- tables */
.table-wrap { width: 100%; overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 12.8px; }
table.tbl th {
  text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--faint); font-weight: 700; padding: 10px 12px;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.tbl tr:last-child td { border-bottom: 0; }
table.tbl tbody tr:hover { background: color-mix(in srgb, var(--panel-2) 70%, transparent); }
table.tbl td .sub { font-size: 11px; color: var(--muted); margin-top: 1px; }
table.tbl .actions { display: flex; gap: 4px; justify-content: flex-end; }
.cell-title { font-weight: 620; }
.status-select { padding: 4px 24px 4px 8px; font-size: 11.5px; border-radius: 7px; background-color: var(--panel-2); width: auto; }

/* ---------------------------------------------------------------- report */
.report-head { display: flex; gap: 22px; align-items: flex-start; }
.score-ring { flex: none; width: 112px; height: 112px; position: relative; }
.score-ring svg { transform: rotate(-90deg); width: 112px; height: 112px; }
.score-ring .bgc { fill: none; stroke: var(--line); stroke-width: 9; }
.score-ring .fgc { fill: none; stroke: var(--accent); stroke-width: 9; stroke-linecap: round; transition: stroke-dashoffset 0.8s ease; }
.score-ring.good .fgc { stroke: var(--good); } .score-ring.mid .fgc { stroke: var(--warn); } .score-ring.bad .fgc { stroke: var(--bad); }
.score-ring .label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.score-ring .label b { font-size: 28px; letter-spacing: -0.05em; line-height: 1; }
.score-ring .label span { font-size: 10px; color: var(--faint); margin-top: 3px; }
.report-title { min-width: 0; flex: 1; }
.report-title h1 { font-size: 25px; }
.report-title .company { color: var(--accent); font-weight: 650; margin-bottom: 3px; }
.report-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.verdict {
  margin-top: 16px; padding: 13px 16px; border-left: 3px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, var(--panel-2));
  border-radius: 0 9px 9px 0; font-size: 13.5px;
}
.report-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 22px 0 18px; overflow-x: auto; }
.tabs button {
  border: 0; background: transparent; color: var(--muted); padding: 10px 14px;
  font-size: 13px; font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap;
}
.tabs button.active { color: var(--text); border-bottom-color: var(--accent); }
.tabs button:hover { color: var(--text); }

.req-table td:first-child { min-width: 200px; }
.match-strong { color: var(--good); font-weight: 650; }
.match-partial { color: var(--warn); font-weight: 650; }
.match-missing { color: var(--bad); font-weight: 650; }
.importance { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 750; }
.importance.critical { color: var(--bad); } .importance.high { color: var(--warn); }
.importance.meaningful { color: var(--accent-2); } .importance.preferred, .importance.low_signal { color: var(--faint); }

.stat-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--line-soft); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.stat-strip > div { background: var(--panel); padding: 13px 14px; }
.stat-strip .k { font-size: 10px; color: var(--faint); text-transform: uppercase; letter-spacing: 0.07em; font-weight: 700; }
.stat-strip .v { font-size: 18px; font-weight: 750; margin-top: 3px; letter-spacing: -0.02em; }

.markdown-body { font-size: 14px; line-height: 1.68; color: var(--text); }
.markdown-body h1, .markdown-body h2, .markdown-body h3 { margin: 24px 0 10px; }
.markdown-body h1 { font-size: 23px; } .markdown-body h2 { font-size: 18px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.markdown-body h3 { font-size: 15px; }
.markdown-body p { margin: 0 0 10px; }
.markdown-body ul, .markdown-body ol { margin: 0 0 12px; padding-left: 22px; }
.markdown-body li { margin: 3px 0; }
.markdown-body blockquote { margin: 12px 0; padding: 8px 14px; border-left: 3px solid var(--accent); background: var(--panel-2); color: var(--muted); }
.markdown-body code { font-family: var(--mono); font-size: 12px; background: var(--panel-3); padding: 1px 5px; border-radius: 5px; }
.markdown-body pre { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; padding: 14px; overflow-x: auto; }
.markdown-body pre code { background: none; padding: 0; font-size: 11.8px; line-height: 1.55; }
.markdown-body table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 12.5px; }
.markdown-body th, .markdown-body td { border: 1px solid var(--line); padding: 7px 9px; text-align: left; vertical-align: top; }
.markdown-body th { background: var(--panel-2); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.markdown-body a { color: var(--accent-2); }
.markdown-body hr { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }

/* ---------------------------------------------------------------- evaluate */
.evaluate-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.8fr); gap: 18px; align-items: start; }
.paste-area { min-height: 260px; font-size: 13px; }
.side-note { font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.side-note ul { margin: 8px 0 0; padding-left: 18px; }
.side-note li { margin: 4px 0; }
.stepper { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.step { display: flex; gap: 10px; align-items: flex-start; color: var(--faint); font-size: 12px; }
.step .num { width: 21px; height: 21px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; font-size: 10px; flex: none; }
.step.active { color: var(--text); }
.step.active .num { border-color: var(--accent); color: var(--accent); }

/* ---------------------------------------------------------------- scanner */
.portal-row { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-top: 1px solid var(--line-soft); }
.portal-row:first-child { border-top: 0; }
.portal-name { font-weight: 640; font-size: 13px; }
.portal-token { font-family: var(--mono); font-size: 11px; color: var(--faint); }
.portal-meta { font-size: 11px; color: var(--muted); }
.scan-badge { font-size: 10px; padding: 2px 6px; border-radius: 5px; background: var(--panel-3); color: var(--muted); border: 1px solid var(--line); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; }

/* ---------------------------------------------------------------- analytics */
.funnel { display: flex; flex-direction: column; gap: 11px; }
.funnel-row { display: grid; grid-template-columns: 116px 1fr 52px; gap: 12px; align-items: center; font-size: 12.5px; }
.funnel-bar { height: 26px; background: var(--panel-3); border-radius: 7px; overflow: hidden; }
.funnel-bar span { display: block; height: 100%; border-radius: 7px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); min-width: 2px; transition: width 0.6s ease; }
.funnel-row .n { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 150px; padding-top: 10px; }
.bars .bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; height: 100%; justify-content: flex-end; }
.bars .bar { width: 100%; max-width: 44px; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 35%, var(--panel))); min-height: 3px; transition: height 0.6s; }
.bars .bar.alt { background: linear-gradient(180deg, var(--violet), color-mix(in srgb, var(--violet) 30%, var(--panel))); }
.bars .bl { font-size: 10px; color: var(--faint); white-space: nowrap; }
.bars .bv { font-size: 10.5px; font-weight: 700; color: var(--muted); }
.legend { display: flex; gap: 16px; font-size: 11px; color: var(--muted); margin-top: 8px; }
.legend i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; margin-right: 5px; }
.insight { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.insight:first-child { border-top: 0; }
.insight .ico { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); flex: none; }
.insight .ico svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.insight p { font-size: 12.7px; color: var(--text); }
.gap-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line-soft); }
.gap-row:first-child { border-top: 0; }
.gap-row .grow { flex: 1; min-width: 0; font-size: 12.5px; }
.gap-row .count { font-weight: 750; font-size: 13px; color: var(--warn); }

/* ---------------------------------------------------------------- settings */
.provider-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.provider-option {
  display: flex; gap: 11px; align-items: flex-start; padding: 13px 14px;
  border: 1px solid var(--line); border-radius: 11px; background: var(--panel-2);
  cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.provider-option:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.provider-option.selected { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--panel)); box-shadow: 0 0 0 1px var(--accent) inset; }
.provider-option input { margin-top: 2px; accent-color: var(--accent); }
.provider-option .po-name { font-weight: 680; font-size: 13px; }
.provider-option .po-desc { font-size: 11.3px; color: var(--muted); margin-top: 2px; line-height: 1.45; }
.key-status { font-size: 11px; color: var(--good); display: inline-flex; align-items: center; gap: 5px; }
.key-status.missing { color: var(--warn); }
.notice {
  display: flex; gap: 11px; padding: 12px 14px; border-radius: 10px;
  font-size: 12.5px; line-height: 1.55;
  background: color-mix(in srgb, var(--accent-2) 8%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--accent-2) 22%, var(--line));
}
.notice.warn { background: color-mix(in srgb, var(--warn) 8%, var(--panel)); border-color: color-mix(in srgb, var(--warn) 22%, var(--line)); }
.notice.bad { background: color-mix(in srgb, var(--bad) 8%, var(--panel)); border-color: color-mix(in srgb, var(--bad) 22%, var(--line)); }
.notice .ico { flex: none; margin-top: 1px; }
.notice svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }

/* ---------------------------------------------------------------- cv */
.cv-preview {
  background: #fff; color: #17242b; border-radius: 10px; padding: 26px 30px;
  font-size: 11.2px; line-height: 1.5; max-height: 620px; overflow: auto;
  box-shadow: inset 0 0 0 1px #dbe5e8;
}
.cv-preview h1 { color: #10242c; font-size: 24px; margin-bottom: 2px; }
.cv-preview .headline { color: #0d5c63; font-weight: 700; font-size: 12px; margin-bottom: 4px; }
.cv-preview .contact { color: #5a6b72; font-size: 9px; margin-bottom: 14px; }
.cv-preview h2 { color: #0d5c63; font-size: 10px; text-transform: uppercase; letter-spacing: 1.2px; border-bottom: 1px solid #cddbde; padding-bottom: 3px; margin: 15px 0 7px; }
.cv-preview h3 { font-size: 11.5px; }
.cv-preview p { margin: 3px 0; }
.cv-preview ul { margin: 3px 0 8px; padding-left: 17px; }
.cv-preview li { margin: 2px 0; }
.cv-preview .job { margin-bottom: 10px; }
.cv-preview .dates { color: #5a6b72; font-size: 9px; }
.cv-editor { min-height: 520px; font-family: var(--mono); font-size: 12.3px; line-height: 1.6; }
.upload-zone { border: 1px dashed var(--line); border-radius: 10px; padding: 14px; text-align: center; color: var(--muted); font-size: 12px; }
.upload-zone.drag { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, transparent); }
.letter-body { white-space: pre-wrap; font-size: 13.2px; line-height: 1.7; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; max-height: 420px; overflow: auto; }
.cv-frame { width: 100%; height: 72vh; border: 0; background: #fff; border-radius: 8px; }

/* ---------------------------------------------------------------- modal */
.overlay {
  position: fixed; inset: 0; z-index: 120; display: grid; place-items: center;
  background: rgba(4, 9, 12, 0.68); backdrop-filter: blur(6px); padding: 20px;
}
.overlay[hidden] { display: none; }
.overlay-card {
  width: min(440px, 100%); background: var(--panel); border: 1px solid var(--line);
  border-radius: 16px; padding: 28px; text-align: center; box-shadow: var(--shadow);
}
.overlay-card h2 { font-size: 18px; margin: 14px 0 5px; }
.overlay-card p { color: var(--muted); font-size: 12.8px; }
.overlay-hint { font-size: 11px !important; color: var(--faint) !important; margin-top: 12px; }
.spinner { width: 34px; height: 34px; margin: 0 auto; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.overlay-progress { height: 3px; background: var(--panel-3); border-radius: 99px; overflow: hidden; margin-top: 18px; }
.overlay-progress span { display: block; width: 40%; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 99px; animation: slide 1.6s ease-in-out infinite; }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(350%); } }

.modal-backdrop {
  position: fixed; inset: 0; z-index: 130; background: rgba(4, 9, 12, 0.66);
  backdrop-filter: blur(4px); display: grid; place-items: center; padding: 22px;
  animation: fade 0.15s ease;
}
.modal {
  width: min(760px, 100%); max-height: min(86vh, 900px); overflow: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); animation: pop 0.18s ease;
}
.modal.wide { width: min(980px, 100%); }
.modal.narrow { width: min(520px, 100%); }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 17px 20px; border-bottom: 1px solid var(--line-soft); position: sticky; top: 0; background: var(--panel); z-index: 2; }
.modal-head h2 { font-size: 15.5px; }
.modal-head .sub { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.modal-body { padding: 20px; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--line-soft); display: flex; gap: 8px; justify-content: flex-end; position: sticky; bottom: 0; background: var(--panel); }
.modal-close { margin-left: auto; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(0.99); } }

/* ---------------------------------------------------------------- toast */
.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translate(-50%, 20px);
  z-index: 200; background: var(--panel); border: 1px solid var(--line);
  color: var(--text); padding: 11px 16px; border-radius: 10px; font-size: 13px;
  box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s;
  max-width: min(560px, calc(100vw - 40px));
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }
.toast.success { border-color: color-mix(in srgb, var(--good) 40%, var(--line)); }

/* ---------------------------------------------------------------- skeleton */
.skeleton-page { max-width: 1100px; }
.skeleton { height: 18px; border-radius: 6px; margin-bottom: 12px; background: linear-gradient(90deg, var(--panel) 25%, var(--panel-3) 50%, var(--panel) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
.skeleton.w40 { width: 40%; } .skeleton.w55 { width: 55%; } .skeleton.w70 { width: 70%; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-12, .evaluate-grid { grid-template-columns: 1fr; }
  .stat-strip { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 980px) {
  :root { --sidebar-w: 0px; }
  .sidebar { transform: translateX(-100%); transition: transform 0.22s ease; width: 250px; }
  .sidebar.open { transform: translateX(0); box-shadow: 20px 0 60px rgba(0, 0, 0, 0.45); }
  .main { margin-left: 0; }
  .menu-btn { display: inline-flex; }
  .topbar { padding: 0 16px; }
  #view { padding: 22px 16px 64px; }
  .grid-2, .grid-3, .grid-21 { grid-template-columns: 1fr; }
  .provider-options { grid-template-columns: 1fr; }
  .report-head { flex-direction: column; gap: 14px; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi .value { font-size: 25px; }
  .page-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .form-grid { grid-template-columns: 1fr; }
  .funnel-row { grid-template-columns: 92px 1fr 40px; }
  .top-actions .live-dot { display: none; }
  .report-actions .btn span { display: none; }
  .list-row { padding: 12px 14px; }
  .card-pad { padding: 16px; }
  .card-head, .card-body { padding: 14px 16px; }
  .table-wrap { margin: 0 -4px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
