/* JobRadar: quiet, premium. Ivory + ink with champagne accents (light), ink + champagne (dark).
   Display: Instrument Serif. Text: Inter. Icons: Lucide (ISC), self-hosted sprite. */

@font-face { font-family: "Inter"; src: url("/fonts/inter-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("/fonts/instrument-serif.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("/fonts/instrument-serif-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --bg: #f6f4ef;
  --bg-2: #efece4;
  --surface: #ffffff;
  --surface-2: #faf9f6;
  --ink: #15171c;
  --ink-2: #3a3e46;
  --muted: #6e727a;
  --faint: #9a9da3;
  --line: #e6e2d8;
  --line-2: #d9d4c7;
  --accent: #8a6a35;          /* champagne, deep enough for text on ivory */
  --accent-soft: #f3ecdf;
  --accent-ink: #ffffff;
  --brand: #15171c;           /* primary buttons */
  --brand-ink: #f6f4ef;
  --good: #2f6b4f;  --good-soft: #e5f0ea;
  --warn: #9a6512;  --warn-soft: #f8eedb;
  --bad: #a3382f;   --bad-soft: #f7e4e1;
  --info: #2f5577;  --info-soft: #e3ecf4;
  --shadow: 0 1px 2px rgba(21, 23, 28, .04), 0 8px 24px -12px rgba(21, 23, 28, .12);
  --shadow-lg: 0 24px 60px -20px rgba(21, 23, 28, .28);
  --radius: 14px;
  --radius-sm: 10px;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --nav-w: 248px;
  --tabbar-h: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0f12;
    --bg-2: #121418;
    --surface: #16181d;
    --surface-2: #1b1e24;
    --ink: #ece8df;
    --ink-2: #c9c5bc;
    --muted: #8f9198;
    --faint: #686b72;
    --line: #25282f;
    --line-2: #30343c;
    --accent: #c9a66b;
    --accent-soft: #2a241a;
    --accent-ink: #14161b;
    --brand: #c9a66b;
    --brand-ink: #14161b;
    --good: #7cc29f;  --good-soft: #17271f;
    --warn: #e0b061;  --warn-soft: #2a2213;
    --bad: #e58b80;   --bad-soft: #2c1917;
    --info: #8db6dc;  --info-soft: #172330;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .5);
    --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.5 var(--sans);
  font-feature-settings: "cv11", "ss01", "ss03";
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  min-height: 100dvh;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75;
      stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.ic.sm { width: 15px; height: 15px; }
.ic.lg { width: 22px; height: 22px; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -.005em; }
h1, h2, h3 { margin: 0; font-weight: 400; }
h1 { font: 400 34px/1.1 var(--serif); letter-spacing: -.01em; }
h2 { font: 400 24px/1.2 var(--serif); }
h3 { font: 600 13px/1.4 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.eyebrow { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 600; }

/* ---------- buttons & inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink); font-weight: 500; font-size: 14px;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { background: var(--surface-2); border-color: var(--faint); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--bg-2); }
.btn.icon { width: 40px; padding: 0; }
.btn.block { width: 100%; height: 46px; }

.field { display: grid; gap: 6px; }
.field label { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.input {
  height: 46px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-2);
  background: var(--surface); outline: none; width: 100%; transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

/* ---------- login ---------- */
.login {
  min-height: 100dvh; display: grid; place-items: center; padding: 24px;
  background:
    radial-gradient(1200px 600px at 85% -10%, var(--accent-soft), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, var(--bg-2), transparent 60%),
    var(--bg);
}
.login-card {
  width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line);
  border-radius: 22px; padding: 40px 32px 32px; box-shadow: var(--shadow-lg);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 40px; height: 40px; border-radius: 11px; }
.brand .name { font: 400 28px/1 var(--serif); letter-spacing: -.01em; }
.login-card .lede { margin: 18px 0 26px; color: var(--muted); }
.login-card form { display: grid; gap: 16px; }
.form-error { color: var(--bad); font-size: 13px; min-height: 18px; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--nav-w) 1fr; min-height: 100dvh; }
.nav {
  position: sticky; top: 0; height: 100dvh; padding: 24px 16px; display: flex; flex-direction: column; gap: 4px;
  border-right: 1px solid var(--line); background: var(--surface-2);
}
.nav .brand { padding: 4px 10px 22px; }
.nav .brand img { width: 32px; height: 32px; border-radius: 9px; }
.nav .brand .name { font-size: 24px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: 14px;
}
.nav a:hover { background: var(--bg-2); color: var(--ink); }
.nav a.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.nav a.active .ic { color: var(--accent); }
.nav a .count { margin-left: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.nav .spacer { flex: 1; }
.nav .who { display: flex; align-items: center; gap: 10px; padding: 12px; border-top: 1px solid var(--line); margin-top: 8px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font: 400 16px/1 var(--serif);
}
.who .meta { min-width: 0; flex: 1; }
.who .meta div { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who .meta span { font-size: 12px; color: var(--muted); }

.main { min-width: 0; padding: 36px 44px 64px; max-width: 1120px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.page-head p { margin: 6px 0 0; color: var(--muted); }

.tabbar { display: none; }

/* ---------- cards & panels ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel { padding: 22px; }
.grid { display: grid; gap: 16px; }
.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { padding: 18px 20px; }
.stat .label { font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.stat .value { font: 400 34px/1.1 var(--serif); margin-top: 6px; font-variant-numeric: tabular-nums; }

.empty { text-align: center; padding: 56px 24px; }
.empty .halo {
  width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
}
.empty h2 { margin-bottom: 8px; }
.empty p { color: var(--muted); max-width: 420px; margin: 0 auto; }

.list { display: grid; gap: 0; }
.row { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row .grow { flex: 1; min-width: 0; }
.row .title { font-weight: 500; }
.row .sub { font-size: 13px; color: var(--muted); }

.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px;
  font-size: 12px; font-weight: 500; background: var(--bg-2); color: var(--ink-2); white-space: nowrap;
}
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.accent { background: var(--accent-soft); color: var(--accent); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.section { margin-top: 32px; }
.section > h3 { margin-bottom: 12px; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0;
  background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 12px; font-size: 14px;
  box-shadow: var(--shadow-lg); transition: opacity .2s, transform .2s; z-index: 50; max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.splash { min-height: 100dvh; display: grid; place-items: center; color: var(--muted); }
.splash.inline { min-height: 40vh; }

/* ---------- mobile ---------- */
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .nav { display: none; }
  .main { padding: calc(20px + env(safe-area-inset-top)) 16px calc(var(--tabbar-h) + 28px + env(safe-area-inset-bottom)); }
  h1 { font-size: 30px; }
  .page-head { margin-bottom: 20px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat .value { font-size: 28px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(1.4) blur(18px);
    -webkit-backdrop-filter: saturate(1.4) blur(18px); border-top: 1px solid var(--line);
  }
  .tabbar a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    text-decoration: none; color: var(--muted); font-size: 11px; font-weight: 500;
  }
  .tabbar a.active { color: var(--ink); }
  .tabbar a.active .ic { color: var(--accent); }
  .tabbar .ic { width: 22px; height: 22px; }
  .row { padding: 14px 16px; }
  .panel { padding: 18px; }
  .login-card { padding: 32px 22px 24px; }
}
