/* Job Alert — design system. One file, no build step. Light + dark (prefers-color-scheme). */

@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("/static/fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("/static/fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg: #f6f7f9; --surface: #ffffff; --surface-2: #f2f4f7; --surface-3: #e9edf2;
  --ink: #0f172a; --ink-2: #334155; --muted: #64748b; --faint: #94a3b8;
  --line: #e4e8ee; --line-strong: #cfd6df;
  --accent: #4f46e5; --accent-hover: #4338ca; --accent-soft: #eef0ff; --accent-line: #c7cbfb; --accent-ink: #ffffff;
  --ok: #047857; --ok-soft: #e7f7ef; --ok-line: #a7e3c4;
  --warn: #b45309; --warn-soft: #fff6e5; --warn-line: #f6d38f;
  --bad: #c62828; --bad-soft: #fdeeee; --bad-line: #f3b9b9;
  --ai: #7c3aed; --ai-soft: #f4effe;
  --radius: 12px; --radius-sm: 8px; --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 16px rgba(15, 23, 42, .06);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, .14), 0 2px 6px rgba(15, 23, 42, .06);
  --ring: 0 0 0 3px rgba(79, 70, 229, .22);
  --font: "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0d12; --surface: #12151c; --surface-2: #171b24; --surface-3: #1e2330;
    --ink: #e8eaf0; --ink-2: #c3c8d4; --muted: #8b93a7; --faint: #5d6579;
    --line: #232937; --line-strong: #323a4c;
    --accent: #8b93ff; --accent-hover: #a3a9ff; --accent-soft: rgba(139, 147, 255, .13); --accent-line: rgba(139, 147, 255, .4); --accent-ink: #0b0d12;
    --ok: #4ade80; --ok-soft: rgba(74, 222, 128, .1); --ok-line: rgba(74, 222, 128, .35);
    --warn: #fbbf24; --warn-soft: rgba(251, 191, 36, .1); --warn-line: rgba(251, 191, 36, .35);
    --bad: #f87171; --bad-soft: rgba(248, 113, 113, .1); --bad-line: rgba(248, 113, 113, .35);
    --ai: #c4a5ff; --ai-soft: rgba(196, 165, 255, .12);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, .5);
    --ring: 0 0 0 3px rgba(139, 147, 255, .3);
    color-scheme: dark;
  }
}

/* --- base --------------------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--font);
  font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; line-height: 1.25; }
h1 { font-size: 26px; font-weight: 700; }
h2 { font-size: 17px; font-weight: 650; }
h3 { font-size: 15px; font-weight: 650; }
p { margin: 0; }
small, .small { font-size: 13px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }
::selection { background: var(--accent-soft); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

.i { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
.i-sm { width: 15px; height: 15px; vertical-align: -2px; }
.i-lg { width: 22px; height: 22px; }
.spin { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }

/* --- shell -------------------------------------------------------------------------------------- */
.topbar { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(12px); -webkit-backdrop-filter: saturate(1.6) blur(12px); border-bottom: 1px solid var(--line); }
.topbar .in { max-width: 1160px; margin: 0 auto; height: 60px; padding: 0 24px; display: flex; align-items: center; gap: 8px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; letter-spacing: -0.02em; font-size: 16px; margin-right: 20px; }
.brand:hover { color: var(--ink); }
.logo { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 55%, #ec4899 120%); box-shadow: 0 2px 8px rgba(99, 102, 241, .35); }
.logo .i { width: 17px; height: 17px; }
.nav { display: flex; align-items: center; gap: 2px; }
.nav a { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border-radius: 8px; color: var(--muted); font-size: 14px; font-weight: 500; }
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--surface-2); }
.topbar .spacer { flex: 1; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 650;
  color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-line); }
.container { max-width: 1160px; margin: 0 auto; padding: 32px 24px 96px; }
.container.narrow { max-width: 720px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head p { color: var(--muted); margin-top: 6px; max-width: 640px; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; font-weight: 500; margin-bottom: 14px; }
.back:hover { color: var(--ink); }

/* --- buttons ------------------------------------------------------------------------------------ */
.btn { --b: var(--line-strong); display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 15px;
  border-radius: 10px; border: 1px solid var(--b); background: var(--surface); color: var(--ink); font: 600 14px/1 var(--font);
  cursor: pointer; white-space: nowrap; text-decoration: none; transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .05s;
  box-shadow: var(--shadow-sm); }
.btn:hover { background: var(--surface-2); color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn.primary { --b: var(--accent); background: var(--accent); color: var(--accent-ink); box-shadow: 0 1px 2px rgba(79, 70, 229, .3), inset 0 1px 0 rgba(255, 255, 255, .12); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
.btn.ghost { --b: transparent; background: transparent; box-shadow: none; color: var(--ink-2); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.soft { --b: var(--accent-line); background: var(--accent-soft); color: var(--accent); box-shadow: none; }
.btn.soft:hover { background: var(--accent-soft); border-color: var(--accent); }
.btn.success { --b: var(--ok-line); background: var(--ok-soft); color: var(--ok); box-shadow: none; }
.btn.danger { color: var(--bad); }
.btn.danger:hover { background: var(--bad-soft); border-color: var(--bad-line); color: var(--bad); }
.btn.danger.solid { --b: var(--bad); background: var(--bad); color: #fff; }
.btn.sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 8px; gap: 6px; }
.btn.lg { height: 46px; padding: 0 20px; font-size: 15px; border-radius: 12px; }
.btn.block { width: 100%; }
.btn.icon { width: 38px; padding: 0; }
.btn.sm.icon { width: 32px; }
.linkbtn { border: 0; background: none; padding: 0; font: inherit; color: var(--accent); cursor: pointer; }

/* --- forms -------------------------------------------------------------------------------------- */
.field { display: grid; gap: 6px; margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }
.label { font-size: 14px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.label .opt { font-weight: 400; color: var(--faint); font-size: 13px; }
.hint { font-size: 13px; color: var(--muted); }
.input, .textarea, .select { width: 100%; font: 15px/1.4 var(--font); color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 12px; transition: border-color .15s, box-shadow .15s; }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:hover, .textarea:hover, .select:hover { border-color: var(--faint); }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.textarea { min-height: 92px; resize: vertical; line-height: 1.5; }
.select { appearance: none; padding-right: 34px; cursor: pointer;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center; }
.select.sm { padding: 6px 30px 6px 10px; font-size: 13.5px; border-radius: 8px; background-position: right 8px center; }
.input-wrap { position: relative; }
.input-wrap > .i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.input-wrap > .input { padding-left: 38px; }
.input-wrap > .reveal { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }
.form-error { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; background: var(--bad-soft);
  border: 1px solid var(--bad-line); color: var(--bad); font-size: 14px; margin-bottom: 18px; }
.form-error ul { margin: 0; padding-left: 18px; }

/* checkbox / radio pills */
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-check { position: relative; }
.pill-check input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.pill-check span { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px; border-radius: 999px; font-size: 14px; font-weight: 500;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); transition: all .15s; user-select: none; }
.pill-check input:hover + span { border-color: var(--faint); }
.pill-check input:checked + span { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.pill-check input:focus-visible + span { box-shadow: var(--ring); }
.pill-check .i { display: none; }
.pill-check input:checked + span .i { display: inline; }

/* switch */
.switch { position: relative; display: inline-flex; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { width: 40px; height: 24px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--line-strong); transition: all .2s; position: relative; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
.switch input:checked + span { background: var(--accent); border-color: var(--accent); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { box-shadow: var(--ring); }

/* segmented control */
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.seg button, .seg label { border: 0; background: transparent; color: var(--muted); font: 500 13.5px/1 var(--font); height: 30px; padding: 0 12px;
  border-radius: 7px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; position: relative; }
.seg button:hover, .seg label:hover { color: var(--ink); }
.seg button[aria-pressed="true"], .seg label:has(input:checked) { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.seg label input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg .count { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }

/* tag input */
.tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 46px; padding: 6px 8px; border: 1px solid var(--line-strong);
  border-radius: 10px; background: var(--surface); cursor: text; transition: border-color .15s, box-shadow .15s; }
.tags:focus-within { border-color: var(--accent); box-shadow: var(--ring); }
.tag { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 6px 0 11px; border-radius: 8px; background: var(--accent-soft);
  color: var(--accent); font-size: 14px; font-weight: 550; border: 1px solid var(--accent-line); }
.tag button { border: 0; background: transparent; color: inherit; width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; cursor: pointer; opacity: .7; }
.tag button:hover { opacity: 1; background: rgba(79, 70, 229, .12); }
.tags input { flex: 1; min-width: 160px; border: 0; outline: 0; background: transparent; font: 15px var(--font); color: var(--ink); padding: 6px 4px; }
.tags input::placeholder { color: var(--faint); }

/* --- cards & surfaces --------------------------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.card-pad { padding: 22px; }
.card-head { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.card-head .ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.card-head p { color: var(--muted); font-size: 13.5px; margin-top: 1px; }
.card-body { padding: 22px; }
.divider { height: 1px; background: var(--line); margin: 18px 0; border: 0; }

/* badges */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12.5px; font-weight: 550;
  background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.badge .i { width: 13px; height: 13px; }
.badge.accent { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-line); }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }
.badge.bad { background: var(--bad-soft); color: var(--bad); border-color: var(--bad-line); }
.badge.ai { background: var(--ai-soft); color: var(--ai); border-color: transparent; }
.badge.plain { background: transparent; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 8px; font-size: 13px; color: var(--ink-2);
  background: var(--surface-2); border: 1px solid var(--line); white-space: nowrap; }
.chip .i { width: 14px; height: 14px; color: var(--faint); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* --- toasts, dialogs, menus --------------------------------------------------------------------- */
.toasts { position: fixed; z-index: 100; bottom: 24px; left: 50%; transform: translateX(-50%); display: grid; gap: 10px; width: min(560px, calc(100vw - 32px)); }
.toast { display: flex; align-items: center; gap: 12px; padding: 13px 14px 13px 16px; border-radius: 12px; background: var(--ink); color: var(--bg);
  box-shadow: var(--shadow-lg); font-size: 14px; font-weight: 500; animation: toast-in .25s ease-out; }
.toast .i { color: #a5b4fc; }
.toast.ok .i { color: #6ee7b7; }
.toast.bad .i { color: #fca5a5; }
.toast .msg { flex: 1; }
.toast button { border: 0; background: rgba(255, 255, 255, .1); color: inherit; font: 600 13px var(--font); padding: 6px 10px; border-radius: 8px; cursor: pointer; }
@media (prefers-color-scheme: dark) { .toast button { background: rgba(0, 0, 0, .08); } .toast .i { color: var(--accent); } }
.toast.out { animation: toast-out .2s ease-in forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }

dialog.modal { border: 1px solid var(--line); border-radius: 18px; padding: 0; width: min(440px, calc(100vw - 32px)); background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow-lg); }
dialog.modal::backdrop { background: rgba(15, 23, 42, .45); backdrop-filter: blur(2px); }
dialog.modal[open] { animation: pop .18s ease-out; }
@keyframes pop { from { opacity: 0; transform: scale(.97); } }
.modal-body { padding: 24px 24px 8px; display: grid; gap: 10px; }
.modal-body .ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--bad-soft); color: var(--bad); }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 18px 24px 22px; }

.dropdown { position: relative; display: inline-flex; }
.menu { position: absolute; z-index: 50; top: calc(100% + 6px); right: 0; min-width: 260px; padding: 6px; border-radius: 14px; background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow-lg); animation: pop .14s ease-out; transform-origin: top right; }
.menu.left { right: auto; left: 0; transform-origin: top left; }
.menu-title { padding: 8px 10px 6px; font-size: 12px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: .04em; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 9px; background: transparent;
  color: var(--ink); font: 500 14px/1.3 var(--font); text-align: left; cursor: pointer; }
.menu-item:hover, .menu-item:focus-visible { background: var(--surface-2); color: var(--ink); }
.menu-item .sub { display: block; font-size: 12.5px; color: var(--muted); font-weight: 400; margin-top: 1px; }
.menu-item .check { margin-left: auto; color: var(--accent); }
.menu-item.danger { color: var(--bad); }
.menu-item.danger:hover { background: var(--bad-soft); }
.menu-sep { height: 1px; background: var(--line); margin: 6px 4px; }
.menu form { margin: 0; }

/* --- empty states, progress -------------------------------------------------------------------- */
.empty { text-align: center; padding: 56px 24px; }
.empty .art { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 18px; display: grid; place-items: center; color: var(--accent);
  background: var(--accent-soft); border: 1px solid var(--accent-line); }
.empty .art .i { width: 28px; height: 28px; }
.empty h2 { font-size: 19px; }
.empty p { color: var(--muted); max-width: 460px; margin: 8px auto 22px; }
.progress { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #6366f1, #8b5cf6); transition: width .6s ease; }
.progress.indeterminate > span { width: 35% !important; animation: indet 1.4s ease-in-out infinite; }
@keyframes indet { from { transform: translateX(-100%); } to { transform: translateX(300%); } }

/* --- auth (split) ------------------------------------------------------------------------------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-side { position: relative; overflow: hidden; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; color: #fff;
  background: radial-gradient(1200px 600px at -10% -20%, #818cf8 0%, transparent 55%), radial-gradient(900px 600px at 120% 120%, #ec4899 0%, transparent 50%),
  linear-gradient(160deg, #312e81 0%, #4c1d95 60%, #581c87 100%); }
.auth-side::after { content: ""; position: absolute; inset: 0; opacity: .14;
  background-image: radial-gradient(rgba(255, 255, 255, .7) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(180deg, #000, transparent 70%); }
.auth-side > * { position: relative; z-index: 1; }
.auth-side .brand { color: #fff; }
.auth-side .logo { background: rgba(255, 255, 255, .16); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.auth-side h2 { font-size: 34px; line-height: 1.15; font-weight: 700; letter-spacing: -0.03em; max-width: 460px; }
.auth-side .lead { color: rgba(255, 255, 255, .78); font-size: 16px; margin-top: 14px; max-width: 440px; }
.props { display: grid; gap: 16px; margin-top: 36px; max-width: 440px; }
.prop { display: flex; gap: 14px; align-items: flex-start; }
.prop .ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, .12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); flex: none; }
.prop b { display: block; font-weight: 600; }
.prop span { color: rgba(255, 255, 255, .72); font-size: 14px; }
.auth-side .foot { color: rgba(255, 255, 255, .6); font-size: 13px; }
.auth-main { display: grid; place-items: center; padding: 48px 24px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { font-size: 28px; }
.auth-card .sub { color: var(--muted); margin: 8px 0 28px; }
.auth-card .alt { margin-top: 22px; font-size: 14px; color: var(--muted); text-align: center; }
.auth-mobile-brand { display: none; margin-bottom: 28px; }

/* --- dashboard ---------------------------------------------------------------------------------- */
.quota { display: flex; flex-wrap: wrap; gap: 10px; margin: -6px 0 22px; }
.quota .chip { background: var(--surface); }
.grid-searches { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr)); gap: 16px; }
.scard { display: flex; flex-direction: column; transition: box-shadow .2s, border-color .2s; }
.scard:hover { box-shadow: var(--shadow); border-color: var(--line-strong); }
.scard .top { padding: 20px 20px 0; display: flex; gap: 12px; align-items: flex-start; }
.scard .title { flex: 1; min-width: 0; }
.scard .title a { color: var(--ink); font-size: 16.5px; font-weight: 650; letter-spacing: -0.015em; line-height: 1.35; display: block; }
.scard .title a:hover { color: var(--accent); }
.scard .meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 13px; margin-top: 6px; }
.scard .meta span { display: inline-flex; align-items: center; gap: 5px; }
.scard .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 16px 20px 0; border-radius: 12px; overflow: hidden;
  background: var(--line); border: 1px solid var(--line); }
.scard .stats div { background: var(--surface-2); padding: 10px 12px; }
.scard .stats b { display: block; font-size: 19px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.scard .stats span { font-size: 12px; color: var(--muted); }
.scard .chips { padding: 14px 20px 0; }
.scard .bottom { margin-top: auto; padding: 16px 20px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.scard .bottom .grow { flex: 1; }
.running-line { margin: 16px 20px 0; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); border: 1px solid var(--accent-line); }
.running-line .row { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--accent); font-weight: 550; margin-bottom: 8px; }

/* --- search form -------------------------------------------------------------------------------- */
.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.form-layout .stack { display: grid; gap: 16px; }
.summary { position: sticky; top: 84px; }
.summary .rows { display: grid; gap: 12px; font-size: 14px; }
.summary .row { display: flex; gap: 10px; align-items: flex-start; }
.summary .row .i { color: var(--faint); margin-top: 2px; }
.summary .row b { display: block; font-weight: 600; }
.summary .row span { color: var(--muted); font-size: 13px; }
.summary .big { display: flex; align-items: baseline; gap: 6px; }
.summary .big b { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.note { display: flex; gap: 10px; padding: 11px 12px; border-radius: 10px; font-size: 13px; line-height: 1.45; }
.note .i { margin-top: 1px; }
.note.ai { background: var(--ai-soft); color: var(--ink-2); }
.note.ai .i { color: var(--ai); }
.note.warn { background: var(--warn-soft); color: var(--ink-2); }
.note.warn .i { color: var(--warn); }
.note.info { background: var(--surface-2); color: var(--ink-2); }
.option-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
  transition: border-color .15s, background .15s; }
.option-row:has(input:checked) { border-color: var(--accent-line); background: color-mix(in srgb, var(--accent-soft) 55%, var(--surface)); }
.option-row .ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); flex: none; }
.option-row:has(input:checked) .ico { background: var(--accent-soft); color: var(--accent); }
.option-row .txt { flex: 1; min-width: 0; }
.option-row .txt b { display: block; font-weight: 600; font-size: 14.5px; }
.option-row .txt span { color: var(--muted); font-size: 13px; }
.zones { display: grid; gap: 10px; }
.city { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--surface); }
.city .grid { display: grid; grid-template-columns: minmax(0, 1fr) 130px auto; gap: 12px 12px; align-items: end; }
.city .tt { grid-column: 1 / -1; }
.city .remove { grid-column: 3; grid-row: 1; }
.city .field { margin: 0; }
.ac { position: relative; }
.ac-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); max-height: 300px; overflow: auto; }
.ac-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.ac-list li span { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.ac-list li[aria-selected="true"], .ac-list li:hover { background: var(--accent-soft); }
.sites { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 10px; }
.site { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s; }
.site input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.site .box { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--line-strong); display: grid; place-items: center; flex: none; margin-top: 1px;
  color: transparent; transition: all .15s; }
.site .box .i { width: 14px; height: 14px; stroke-width: 3; }
.site b { display: flex; align-items: center; gap: 6px; font-size: 14.5px; font-weight: 600; }
.site span.d { display: block; font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.site:has(input:checked) { border-color: var(--accent-line); background: color-mix(in srgb, var(--accent-soft) 55%, var(--surface)); }
.site:has(input:checked) .box { background: var(--accent); border-color: var(--accent); color: #fff; }
.site:has(input:focus-visible) { box-shadow: var(--ring); }
.site.off { opacity: .55; cursor: not-allowed; }
details.more summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-size: 14px; font-weight: 550; }
details.more summary::-webkit-details-marker { display: none; }
details.more[open] summary .i { transform: rotate(90deg); }
details.more summary .i { transition: transform .15s; }
details.more .inner { margin-top: 16px; }

/* --- running page ------------------------------------------------------------------------------- */
.run-card { max-width: 560px; margin: 32px auto 0; }
.run-card .card-body { padding: 32px; }
.pulse { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; color: #fff; margin-bottom: 18px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6); box-shadow: 0 0 0 0 rgba(99, 102, 241, .45); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 16px rgba(99, 102, 241, 0); } 100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); } }
.steps { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 12px; }
.steps li { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--faint); }
.steps .dot { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--line-strong); flex: none; }
.steps .dot .i { width: 13px; height: 13px; }
.steps li.done { color: var(--ink-2); }
.steps li.done .dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.steps li.now { color: var(--ink); font-weight: 600; }
.steps li.now .dot { border-color: var(--accent); color: var(--accent); }

/* --- results ------------------------------------------------------------------------------------ */
.res-head { display: flex; gap: 20px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-bottom: 20px; }
.res-head h1 { font-size: 26px; }
.res-head .meta { color: var(--muted); font-size: 13.5px; margin-top: 6px; display: flex; gap: 14px; flex-wrap: wrap; }
.res-head .meta span { display: inline-flex; align-items: center; gap: 5px; }
.res-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 18px 0 22px; }
.kpi { padding: 16px 18px; }
.kpi .v { font-size: 26px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi .l { font-size: 13px; color: var(--muted); margin-top: 4px; display: flex; align-items: center; gap: 6px; }
.kpi .l .i { width: 14px; height: 14px; }
.toolbar { position: sticky; top: 60px; z-index: 20; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 12px 0;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.toolbar .search { flex: 1 1 240px; }
.toolbar .select { width: auto; }
.filters { display: contents; }
.toolbar .filters-btn { display: none; }
.toolbar .search .input { height: 38px; padding-top: 0; padding-bottom: 0; }
.toggle-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink-2); font: 500 13.5px var(--font); cursor: pointer; white-space: nowrap; }
.toggle-btn:hover { border-color: var(--faint); }
.toggle-btn[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 0 12px; color: var(--muted); font-size: 13.5px; }
.offers { display: grid; gap: 10px; }
.offer { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 16px; padding: 16px 18px; align-items: start;
  transition: box-shadow .2s, border-color .2s, opacity .2s, transform .2s; }
.offer:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.offer.applied { border-color: var(--ok-line); background: color-mix(in srgb, var(--ok-soft) 40%, var(--surface)); }
.offer.leaving { opacity: 0; transform: translateX(12px); }
.score { --p: 0; --c: var(--faint); width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; position: relative;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--surface-3) 0); }
.score::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--surface); }
.score b { position: relative; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); }
.score.hi { --c: var(--ok); } .score.mid { --c: var(--warn); } .score.lo { --c: var(--faint); }
.score.none { background: var(--surface-2); }
.score.none::before { display: none; }
.score.none .i { position: relative; color: var(--faint); }
.offer .t { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.offer .t a { color: var(--ink); font-size: 16px; font-weight: 650; letter-spacing: -0.012em; line-height: 1.35; }
.offer .t a:hover { color: var(--accent); }
.offer .t .new { font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--accent); background: var(--accent-soft); border-radius: 6px; padding: 2px 6px; }
.offer .co { color: var(--ink-2); font-size: 14px; margin-top: 3px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.offer .co span { display: inline-flex; align-items: center; gap: 5px; }
.offer .co .i { width: 14px; height: 14px; color: var(--faint); }
.offer .badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.offer .why { display: flex; gap: 7px; align-items: flex-start; margin-top: 10px; font-size: 13.5px; color: var(--ink-2); }
.offer .why .i { color: var(--ai); width: 15px; height: 15px; margin-top: 2px; }
.offer .src { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.offer .src a { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 550; color: var(--muted); padding: 3px 8px; border-radius: 7px;
  background: var(--surface-2); border: 1px solid var(--line); }
.offer .src a:hover { color: var(--accent); border-color: var(--accent-line); }
.offer .side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.offer .when { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.offer .acts { display: flex; gap: 6px; }
.more-wrap { display: flex; justify-content: center; margin-top: 18px; }
.sources-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.sources-table th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12.5px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.sources-table td { padding: 10px; border-bottom: 1px solid var(--line); }
.sources-table tr:last-child td { border-bottom: 0; }

/* --- tables (admin) ----------------------------------------------------------------------------- */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12.5px; padding: 12px 22px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.table td { padding: 14px 22px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table form { display: inline; margin: 0; }
.who { display: flex; align-items: center; gap: 12px; }
.who b { display: block; font-weight: 600; }
.who span { color: var(--muted); font-size: 13px; }

/* --- responsive --------------------------------------------------------------------------------- */
@media (max-width: 960px) {
  .form-layout { grid-template-columns: 1fr; }
  .summary { position: static; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .auth-mobile-brand { display: flex; }
}
@media (max-width: 640px) {
  .container { padding: 22px 16px 80px; }
  .topbar .in { padding: 0 16px; }
  .nav a span { display: none; }
  .brand { margin-right: 4px; }
  .brand .name, .topbar .btn.primary span { display: none; }
  .topbar .btn.primary { width: 32px; padding: 0; }
  .kpi { padding: 12px 14px; }
  .kpi .v { font-size: 22px; }
  .kpi .l { font-size: 12px; }
  .toolbar { position: static; }
  .toolbar .filters-btn { display: inline-flex; }
  .filters { display: none; }
  .toolbar.open .filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
  .toolbar.open .filters .select, .toolbar.open .filters .toggle-btn { width: 100%; }
  .res-head .actions { width: 100%; }
  .res-head .actions > * { flex: 1; }
  .res-head .actions .btn { width: 100%; }
  h1, .res-head h1 { font-size: 22px; }
  .city .grid { grid-template-columns: minmax(0, 1fr) 110px auto; }
  .city .seg { width: 100%; overflow-x: auto; }
  .offer { grid-template-columns: 44px minmax(0, 1fr); gap: 12px; padding: 14px; }
  .offer .side { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
  .score { width: 42px; height: 42px; }
  .toolbar { top: 60px; }
  .table th:nth-child(3), .table td:nth-child(3) { display: none; }
}
