/* Djinx Jobs — djinx.com.br layout/components (sites/me/style.css) with the
   djinx.live brand: DJINX wordmark logo, Fraunces display + IBM Plex Sans/Mono,
   navy #1d3557 on paper #FAF9F6, sage/gold accents, light only. Legacy aliases
   below keep older JS inline styles (var(--gold), var(--band-a)) working. */
:root {
  color-scheme: light;
  --brand: #1d3557;
  --brand-hover: #457b9d;
  --ink: #10192b;
  --ink-soft: #3a4558;
  --muted: #5b6475;
  --faint: #8a90a0;
  --line: #e7e3d8;
  --surface: #ffffff;
  --surface-alt: #faf9f6;
  --surface-green: #eef3f1;
  --surface-blue: #edf1f6;
  --green: #3f665a;
  --blue: #1d3557;
  --coral: #b4443a;
  --gold: #b8934a;
  --shadow: 0 20px 55px rgba(16, 25, 43, 0.08);
  --radius: 8px;
  --max: 1180px;
  --gutter: max(24px, calc((100vw - var(--max)) / 2));
  --display: "Fraunces", Georgia, serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  /* legacy aliases */
  --paper: var(--surface);
  --card: var(--surface);
  --signal: var(--green);
  --danger: #b4443a;
  --band-a: var(--green);
  --band-b: var(--gold);
  --band-c: #8a90a0;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--surface-alt); color: var(--ink); font: 16px/1.6 var(--sans); letter-spacing: 0; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--blue); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .chip:focus-visible {
  outline: 3px solid rgba(29, 53, 87, 0.35); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: var(--display); letter-spacing: -0.015em; }
h1 { font-size: clamp(32px, 4vw, 46px); line-height: 1.05; font-weight: 650; }
h2 { font-size: clamp(22px, 2.4vw, 28px); line-height: 1.12; font-weight: 620; }
h3 { font-size: 18px; line-height: 1.3; font-weight: 600; }
.wrap { max-width: calc(var(--max) + 48px); margin: 0 auto; padding: 0 24px; }
@media (max-width: 720px) { .wrap { padding: 0 16px; } }
.muted { color: var(--muted); } .faint { color: var(--faint); } .mono { font-family: var(--mono); }
.hidden { display: none !important; }
.eyebrow { color: var(--gold); font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }

/* header — djinx.com.br .site-header bar, djinx.live DJINX wordmark */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(217, 222, 229, 0.8); backdrop-filter: blur(18px); }
.topbar .wrap { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.logo { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); white-space: nowrap; }
.logo:hover { color: var(--ink); }
.logo img { height: 40px; width: auto; margin-left: -8px; }
.logo-sub { padding-left: 12px; border-left: 1px solid var(--line); font-family: var(--display); font-size: 19px; font-weight: 600; color: var(--brand); }
.nav { display: flex; gap: 22px; flex: 1; overflow-x: auto; justify-content: center; }
.nav a { color: var(--muted); font-size: 14px; font-weight: 600; white-space: nowrap; padding: 6px 0;
  border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--ink); }
.nav a.active { color: var(--brand); border-bottom-color: var(--brand); }
.who { font-size: 14px; color: var(--muted); display: flex; gap: 10px; align-items: center; white-space: nowrap; }
@media (max-width: 720px) {
  .topbar .wrap { flex-wrap: wrap; gap: 8px 16px; min-height: 0; padding-top: 12px; padding-bottom: 10px; }
  .nav { order: 3; flex-basis: 100%; justify-content: flex-start; gap: 18px; }
  .who { margin-left: auto; } .who > span { display: none; }
}

/* layout */
main.wrap { padding-top: 40px; padding-bottom: 96px; }
@media (max-width: 720px) { main.wrap { padding-top: 24px; padding-bottom: 64px; } }
.page-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.page-head .eyebrow + h1 { margin-top: 10px; }
.page-head .muted { margin-top: 10px; color: var(--muted); font-size: 17px; }
.grid-2 { display: grid; grid-template-columns: 300px 1fr; gap: 24px; align-items: start; }
@media (max-width: 860px) { .grid-2 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
@media (max-width: 720px) { .card { padding: 18px; } }
.stack > * + * { margin-top: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.action-col { display: grid; gap: 10px; } .action-col > * { display: grid; } .action-col .btn { width: 100%; }

/* stats — mirrors .metric-panel; .stat-lead is the dark "wide" panel */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.stat-lead { background: var(--brand); border-color: var(--brand); color: #fff; }
.stat.stat-lead small { color: rgba(255, 255, 255, 0.78); }
.stat b { display: block; margin-top: 10px; font-family: var(--mono); font-size: 32px; line-height: 1; font-weight: 600; }
.stat b.gold { color: var(--gold); } .stat b.blue { color: var(--blue); }
.stat b.text { font-family: var(--sans); font-size: 16px; font-weight: 600; margin-top: 14px; line-height: 1.3; }
@media (max-width: 720px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 12px; } .stat b { font-size: 24px; margin-top: 6px; } .stat b.text { font-size: 13px; }
  .stat small { font-size: 10px; letter-spacing: .06em; }
}
.stat small { display: block; line-height: 1.35; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }

/* controls — mirrors .button / .button-primary / .button-secondary */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: var(--radius);
  padding: 9px 14px; font: 600 14px/1.2 var(--sans); cursor: pointer; text-decoration: none; }
.btn:hover { color: var(--brand); border-color: var(--brand); }
.btn.primary { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: 0 4px 14px rgba(29, 53, 87, 0.22); }
.btn.primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); color: #fff; }
.btn.ghost { background: transparent; }
.btn.cta { background: var(--brand-hover); color: #fff; border-color: var(--brand-hover); }
.btn.cta:hover { background: #3c6d8c; border-color: #3c6d8c; color: #fff; }
.btn.danger { color: var(--danger); }
.btn.danger:hover { border-color: var(--danger); }
.btn[disabled] { opacity: .5; cursor: progress; }
.btn.sm { min-height: 32px; padding: 6px 11px; font-size: 13px; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=date], input[type=number], select, textarea {
  width: 100%; min-height: 42px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: var(--radius); padding: 9px 12px; font: 15px/1.4 var(--sans); }
textarea { min-height: 140px; font-family: var(--mono); font-size: 13px; line-height: 1.55; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(29, 53, 87, 0.14); }
label.f { display: block; font-size: 12px; font-weight: 600; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }

/* chips / tags — mirrors the pill style of .proof-strip span / .case-tag */
.chipset { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.78);
  border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; color: var(--ink-soft); cursor: pointer; user-select: none; }
.chip:hover { border-color: var(--brand); }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip button { all: unset; cursor: pointer; font-weight: 850; padding-left: 2px; }
.check { display: flex; gap: 8px; align-items: center; font-size: 15px; font-weight: 600; }

/* job cards */
.job { display: grid; grid-template-columns: 60px 1fr auto; gap: 18px; align-items: start; }
.job:hover { border-color: #cfc9b8; }
@media (max-width: 640px) { .job { grid-template-columns: 48px 1fr; gap: 14px; } .job .actions { grid-column: 1 / -1; } }
.band { width: 56px; height: 56px; border-radius: var(--radius); display: grid; place-items: center; align-content: center;
  color: #fff; line-height: 1.05; text-align: center; font-family: var(--mono); }
@media (max-width: 640px) { .band { width: 48px; height: 48px; } }
.band b { font-size: 20px; font-weight: 600; display: block; } .band small { font-size: 11px; font-weight: 500; opacity: .9; }
.band.A { background: var(--band-a); } .band.B { background: var(--band-b); } .band.C { background: var(--band-c); }
.job h3 { font-family: var(--display); font-size: 19px; font-weight: 600; }
.job h3 a { color: var(--ink); } .job h3 a:hover { color: var(--brand); }
.meta { color: var(--muted); font-size: 14px; margin-top: 4px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px;
  background: var(--surface); color: var(--ink-soft); font-size: 12px; font-weight: 600; line-height: 1.4; }
.tag.good { background: var(--surface-green); border-color: rgba(63, 102, 90, 0.25); color: var(--green); }
.tag.warn { background: #f8f1e3; border-color: rgba(184, 147, 74, 0.35); color: #85682f; }
.tag.bad { background: #f8ecea; border-color: rgba(180, 68, 58, 0.28); color: var(--coral); }
.tag.new { background: var(--gold); border-color: var(--gold); color: #fff; }
.reasons { font-size: 13px; color: var(--muted); margin-top: 10px; }
.actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; min-width: 130px; }
@media (max-width: 640px) { .actions { flex-direction: row; flex-wrap: wrap; min-width: 0; } }

/* pipeline board */
.board { display: grid; grid-template-columns: repeat(5, minmax(210px, 1fr)); gap: 16px; overflow-x: auto; padding-bottom: 8px; }
@media (max-width: 860px) { .board { grid-template-columns: repeat(5, 250px); } }
.col { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; min-height: 180px; }
.col h3 { font-family: var(--sans); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--brand); margin-bottom: 12px; }
.app-card { background: var(--surface-alt); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin-bottom: 10px; cursor: pointer; }
.app-card:hover { border-color: var(--brand); background: var(--surface); }
.app-card .t { font-weight: 600; font-size: 15px; line-height: 1.3; } .app-card .c { color: var(--muted); font-size: 13px; margin-top: 2px; }
table.list { width: 100%; border-collapse: collapse; font-size: 15px; }
table.list th { text-align: left; font-size: 12px; font-weight: 600; text-transform: uppercase; color: var(--muted); letter-spacing: .08em; padding: 10px; border-bottom: 1px solid var(--line); }
table.list td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }

/* drawer */
.drawer-bg { position: fixed; inset: 0; background: rgba(16, 25, 43, .35); z-index: 60; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(580px, 100%); background: var(--surface); z-index: 61;
  overflow-y: auto; padding: 28px 24px; border-left: 1px solid var(--line); box-shadow: var(--shadow); }

/* prose (job description, analysis) */
.prose { white-space: pre-wrap; font-size: 15px; line-height: 1.65; color: var(--ink-soft); }
.analysis ul { margin: 8px 0 0 0; padding: 0; display: grid; gap: 8px; }
.analysis li { list-style: none; position: relative; padding-left: 20px; color: var(--ink-soft); }
.analysis li::before { content: ""; position: absolute; left: 0; top: 0.65em; width: 7px; height: 7px; border-radius: 50%; background: var(--coral); }

/* sign-in gate — the hero gradient from djinx.com.br */
body:has(.gate) { background: radial-gradient(60% 50% at 50% 30%, rgba(184, 147, 74, 0.12), transparent 70%), var(--surface-alt); min-height: 100vh; }
.gate { max-width: 460px; margin: 10vh auto; text-align: left; }
.gate h1 { font-size: clamp(36px, 6vw, 56px); line-height: 0.98; }
.gate > .eyebrow + h1 { margin-top: 12px; }
.gate > p:not(.eyebrow) { margin: 14px 0 24px; font-size: 18px; color: var(--ink-soft); }
.gate .card { box-shadow: var(--shadow); }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--brand); color: #fff;
  padding: 12px 18px; border-radius: var(--radius); font-size: 14px; font-weight: 600; z-index: 70; box-shadow: var(--shadow); }
.empty { text-align: center; color: var(--muted); padding: 48px 12px; }
.loading { color: var(--faint); font-size: 15px; padding: 24px 0; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* feed tabs — one tab per role state; underline like .nav a.active */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.tab { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; margin-bottom: -1px;
  font-size: 14px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; border-radius: 4px; }
.tab.on { color: var(--brand); border-bottom-color: var(--brand); }
.tab .count { font-family: var(--mono); font-size: 12px; padding: 1px 7px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.tab.on .count { background: var(--brand); border-color: var(--brand); color: #fff; }
.filters { gap: 10px; margin-bottom: 16px; }
.filters input[type=search] { max-width: 320px; }
.actions .stage { justify-content: center; text-transform: capitalize; }
.toast-undo { all: unset; cursor: pointer; margin-left: 14px; padding-left: 14px; border-left: 1px solid rgba(255, 255, 255, 0.35);
  font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.job .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; min-width: 200px; align-content: start; }
.job .actions .btn { white-space: nowrap; }
.job .actions .wide, .job .actions .stage { grid-column: 1 / -1; }
.job .meta.clip { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 640px) {
  .job .actions { display: flex; flex-wrap: wrap; min-width: 0; }
  .job .actions .wide { flex-basis: 100%; }
}
@media (max-width: 640px) {
  .tabs { gap: 0; }
  .tab { padding: 10px 7px; gap: 5px; font-size: 13px; }
  .tab .count { padding: 0 5px; font-size: 11px; }
}
@media (max-width: 640px) {
  .tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; }
  .tabs.admin-tabs { display: flex; overflow-x: auto; }
  .admin-tabs .tab { flex-direction: row; padding: 10px 10px; font-size: 13px; white-space: nowrap; }
  .tab { flex-direction: column; gap: 4px; padding: 8px 2px; font-size: 12px; text-align: center; white-space: normal; line-height: 1.2; }
}
.role-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.role-bar .stage { text-transform: capitalize; }
.band.score b { font-family: var(--mono); font-size: 22px; }
.new-pill { position: fixed; top: 84px; left: 50%; transform: translateX(-50%); z-index: 60; border: 0; cursor: pointer;
  background: var(--brand); color: #fff; font: 600 14px/1 var(--sans); padding: 11px 18px; border-radius: 999px; box-shadow: var(--shadow); }
.new-pill:hover { background: var(--brand-hover); }
.stage-select { min-height: 32px; padding: 4px 28px 4px 10px; font-size: 13px; font-weight: 600; width: auto; }
.job .actions .stage-select { grid-column: 1 / -1; width: 100%; }

/* admin console */
.admin-tabs { margin-top: 4px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { all: unset; cursor: pointer; font-size: 13px; font-weight: 600; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
table.list tr.click { cursor: pointer; } table.list tr.click:hover td { background: var(--surface-alt); }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; font-size: 14px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.check-result { font-size: 13px; padding: 10px 12px; border-radius: var(--radius); background: var(--surface-alt); border: 1px solid var(--line); }
pre.detail { font-family: var(--mono); font-size: 12px; white-space: pre-wrap; word-break: break-word; margin: 0; color: var(--ink-soft); }
