/* ==========================================================================
   HireFlow — Intake Ledger (black & white)
   Company brand is strictly monochrome — near-black as the one
   interactive/brand accent, no hue anywhere in the UI chrome. Status color
   is a separate axis entirely (green/amber/red on the stamps + poll strip),
   kept desaturated/inked rather than bright, so it never reads as "the
   brand's color." The clerical metaphor the codebase already named
   (.stamp, .ledger, .strip) is drawn through as bordered ink-stamp marks —
   no dot, no tint fill — instead of the generic dot-in-a-pill chip. Space
   Grotesk carries headings, IBM Plex Sans carries body/UI, JetBrains Mono
   stays for anything columnar or data-like (candidate table, keyword
   lists). Every animation here moves transform/opacity only, gated on
   prefers-reduced-motion.
   ========================================================================== */

:root {
  --paper: #F5F5F3;
  --paper-raised: #FFFFFF;
  --ink: #161616;
  --ink-soft: #6B6B68;
  --rule: #E2E2DE;
  --rule-strong: #CACAC5;
  --on-accent: #FFFFFF;

  --brick: #8B3A2B;
  --brick-ink: #6E2C20;
  --brass: #96661C;
  --brass-ink: #74500F;
  --green: #3F6B44;
  --green-ink: #2E4F33;

  --focus: #000000;
  --focus-hover: #2A2A2A;

  --font-display: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-body: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", "Courier New", monospace;

  --radius: 6px;
  --shadow-card: 3px 3px 0 var(--rule-strong);

  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { box-sizing: border-box; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

html, body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
}

body { background: var(--paper); }

@media (prefers-reduced-motion: no-preference) {
  .stamp, .banner, .toast { transition: opacity 180ms ease, transform 180ms ease; }
}

/* ---------- entrance / scroll-triggered reveal ---------- */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 540ms ease-out, transform 540ms var(--ease-spring);
  }
  .reveal.is-visible { opacity: 1; transform: translateY(0); }
}

/* ---------- skeleton loading placeholder ---------- */

@keyframes skeleton-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeleton {
  display: inline-block;
  height: 13px;
  width: 100%;
  max-width: 150px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--rule) 25%, var(--rule-strong) 50%, var(--rule) 75%);
  background-size: 200% 100%;
  vertical-align: middle;
}
@media (prefers-reduced-motion: no-preference) {
  .skeleton { animation: skeleton-shimmer 1.6s ease-in-out infinite; }
}

a { color: var(--focus); }
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0;
  color: var(--ink);
}

label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: color-mix(in srgb, var(--ink-soft) 45%, var(--ink) 55%);
  margin-bottom: 6px;
}

input[type="text"],
input[type="number"],
input[type="password"],
input[type="date"],
input[type="url"],
input[type="search"],
select,
textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink);
  background: var(--paper-raised);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  padding: 9px 11px;
}

input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

textarea { font-family: var(--font-mono); font-size: 13px; resize: vertical; }

.field { margin-bottom: 18px; }
.field__hint { font-size: 12.5px; color: var(--ink-soft); margin-top: 5px; }

button, .btn {
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: var(--focus);
  color: var(--on-accent);
  padding: 9px 16px;
  cursor: pointer;
}
@media (prefers-reduced-motion: no-preference) {
  button, .btn { transition: background-color 200ms ease, transform 200ms var(--ease-spring), box-shadow 200ms ease; }
}
button:hover, .btn:hover {
  background-color: var(--focus-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px -4px color-mix(in srgb, var(--focus) 50%, transparent);
}
button:active, .btn:active { transform: translateY(0); background-color: var(--focus); }
button:disabled, .btn:disabled { opacity: 0.5; cursor: default; transform: none; box-shadow: none; }

.btn--outline {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--rule-strong);
}
.btn--outline:hover {
  background-color: var(--paper);
  border-color: var(--rule-strong);
  box-shadow: none;
}

.btn--danger {
  background: transparent;
  color: var(--brick-ink);
  border: 1px solid var(--brick-ink);
}
.btn--danger:hover {
  background-color: color-mix(in srgb, var(--brick-ink) 10%, transparent);
  box-shadow: none;
}

.link-button {
  background: none;
  border: none;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 0;
}
.link-button:hover {
  color: var(--ink);
  background: none;
  transform: none;
  box-shadow: none;
}

/* ---------- layout shell ---------- */

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--rule);
  background: var(--paper-raised);
}

.nav__brand {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.nav__links { display: flex; gap: 20px; flex: 1; }
.nav__link {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
.nav__link:hover { color: var(--ink); }
.nav__link.is-active { color: var(--ink); border-bottom-color: var(--focus); }

.nav__logout { margin: 0; }

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 28px 80px;
}

.page-header { margin-bottom: 24px; }
.page-header h1 { font-size: 26px; }
.page-header p { color: var(--ink-soft); margin: 6px 0 0; font-size: 14px; }

.auth-shell {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  overflow: hidden;
}

.login-bg-video {
  /* Overscanned past the viewport on all sides — a blurred element with
     no image data beyond its own edge shows a hard seam there instead of
     fading out, which is exactly the line that showed up flush against
     the viewport top. The extra margin gives the blur room to fall off. */
  position: fixed;
  top: -5%;
  left: -5%;
  width: 110%;
  height: 110%;
  object-fit: cover;
  z-index: 0;
  filter: blur(22px);
}
.login-bg-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  /* Opacity only, no hue — the video's own color stays as-is. */
  background: color-mix(in srgb, var(--ink) 35%, transparent);
}
@media (prefers-reduced-motion: reduce) {
  .login-bg-video { display: none; }
}

/* ---------- banner / status strip ---------- */

.banner {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--brick);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 14px 16px 14px 18px;
  font-size: 13.5px;
  color: var(--ink-soft);
  margin-bottom: 18px;
  display: none;
}
.banner.is-visible { display: block; }
.banner strong {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}

.strip {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--rule-strong);
  border-radius: var(--radius);
  padding: 9px 16px;
  margin-bottom: 20px;
  font-family: var(--font-mono);
  font-size: 12.5px;
}
.strip[data-state="running"] { border-left-color: var(--green); }
.strip[data-state="stopped"] { border-left-color: var(--brick); }

.strip__status {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.strip__status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
@media (prefers-reduced-motion: no-preference) {
  .strip[data-state="running"] .strip__status::before { animation: pulse 2s ease-in-out infinite; }
}
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 60%, transparent); }
  50% { opacity: 0.7; box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 0%, transparent); }
}
.strip[data-state="running"] .strip__status { color: var(--green-ink); }
.strip[data-state="stopped"] .strip__status { color: var(--brick-ink); }

.strip__meta { color: var(--ink-soft); }
.strip__spacer { flex: 1; }
.strip button { padding: 5px 12px; font-size: 12.5px; }

/* ---------- at-a-glance (Overview hero card header) ---------- */

.card--hero { border-color: var(--rule-strong); }

.glance {
  display: flex;
  align-items: baseline;
  gap: 36px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 6px;
}
.glance__stat { display: flex; flex-direction: column; gap: 2px; }
.glance__value {
  font-family: var(--font-mono);
  font-size: 30px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.glance__label {
  font-size: 12px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.glance__stat--attention .glance__value { color: var(--brass-ink); }

.glance__caption {
  font-size: 12.5px;
  color: var(--ink-soft);
  margin: 0 0 20px;
}
.glance__caption code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  background: var(--paper);
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid var(--rule);
}

/* ---------- cards / sections ---------- */

.card {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 24px 26px;
  margin-bottom: 22px;
}
.card h2 { font-size: 15px; margin-bottom: 14px; }
.card__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.card__header h2 { margin-bottom: 0; }
.card + .card { margin-top: 22px; }

.settings-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 24px; align-items: start; }
.settings-columns > .card { margin: 0; }
.settings-columns__side { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.settings-columns__side .card { margin: 0; }
@media (max-width: 900px) { .settings-columns { grid-template-columns: 1fr; } }

.settings-footer {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
}

.card__intro { font-size: 12.5px; color: var(--ink-soft); margin: 0 0 16px; }

.status-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.status-detail { font-size: 12.5px; color: var(--ink-soft); margin: 10px 0 0; }
.status-detail:empty { display: none; }

.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin: 36px 0 12px;
}

.filters {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.filters .field { margin-bottom: 0; min-width: 160px; }

/* ---------- ledger table ---------- */

.ledger { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ledger thead th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  font-weight: 600;
  padding: 8px 12px;
  border-bottom: 1px solid var(--rule-strong);
}
.ledger tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.ledger tbody tr:last-child td { border-bottom: none; }
.ledger tbody tr {
  background-color: transparent;
}
@media (prefers-reduced-motion: no-preference) {
  .ledger tbody tr { transition: background-color 150ms ease; }
}
.ledger tbody tr:hover { background-color: color-mix(in srgb, var(--focus) 5%, transparent); }
.ledger td[data-numeric], .ledger th[data-numeric] { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* Left unconstrained, Title/Budget wrap badly with real content ("Cybersecurity
   Engineer", "₹18–30 LPA") — fixed layout + explicit widths on the
   predictable columns. The job description isn't a column at all — it's a
   native title="" tooltip on the role name, hover to read it, which is what
   frees Title up to take the rest of the row. */
.ledger--roles { table-layout: fixed; }
.ledger--roles th:nth-child(1), .ledger--roles td:nth-child(1) { overflow: hidden; }
.ledger--roles td:nth-child(1) .link-button {
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 500;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: var(--rule-strong);
  text-underline-offset: 3px;
}
.ledger--roles td:nth-child(1) .link-button:hover { text-decoration-color: var(--ink); }
.ledger--roles th:nth-child(2), .ledger--roles td:nth-child(2) { width: 100px; }
.ledger--roles th:nth-child(3), .ledger--roles td:nth-child(3) { width: 90px; white-space: nowrap; }
.ledger--roles th:nth-child(4), .ledger--roles td:nth-child(4) { width: 90px; }
/* 200px, not 180 — a Draft row's "Activate" is noticeably wider than an
   Active row's "Draft", and the .ledger__actions td's own 12px+12px
   padding eats into the 3-button flex row before it ever gets to the
   buttons themselves. Too narrow and only Draft rows wrap Delete onto a
   second line, making rows inconsistent height depending on status. */
.ledger--roles th:nth-child(5), .ledger--roles td:nth-child(5) { width: 200px; }
.ledger__empty { padding: 28px 12px; text-align: center; color: var(--ink-soft); font-size: 13.5px; }
.ledger__actions { display: flex; flex-wrap: wrap; gap: 6px; }
.ledger__icon-link { color: var(--focus); text-decoration: none; font-size: 15px; }
.ledger__icon-link:hover { text-decoration: underline; }
.ledger__actions button { padding: 4px 8px; font-size: 11.5px; }

.table-wrap { overflow-x: auto; }

.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 14px;
}
.pagination__info {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
  white-space: nowrap;
}

/* ---------- the stamp (status badges) ---------- */

/* A rectangular ink-stamped tag, not a dot-in-a-pill chip — border and
   text carry the color, no tint fill, no bullet. */
.stamp {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1.5px solid currentColor;
  border-radius: 3px;
  padding: 3px 8px;
  white-space: nowrap;
  background: var(--paper-raised);
}
.stamp--green { color: var(--green-ink); }
.stamp--brass { color: var(--brass-ink); }
.stamp--brick { color: var(--brick-ink); }
.stamp--neutral { color: var(--ink-soft); }

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--ink);
  color: var(--paper-raised);
  padding: 11px 18px;
  border-radius: 3px;
  border-left: 3px solid var(--green);
  box-shadow: var(--shadow-card);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  z-index: 20;
}
.toast.is-visible { opacity: 1; transform: translateY(0); }
.toast[data-variant="error"] { border-left-color: var(--brick); }

/* ---------- settings form ---------- */

.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.settings-grid .field--full { grid-column: 1 / -1; }
/* A label that wraps to 2 lines next to one that doesn't (e.g. "Minimum
   match score" vs. "Rate limit per sender") otherwise pushes only its own
   input down — reserving 2 lines' worth of height for every paired label
   keeps both inputs in the row starting at the same height regardless of
   how long either label's text is. */
.settings-grid .field:not(.field--full) label { min-height: 3em; }
@media (max-width: 640px) { .settings-grid { grid-template-columns: 1fr; } }

/* ---------- settings page shell: content + section nav ---------- */

.settings-layout { display: grid; grid-template-columns: 1fr 190px; gap: 36px; align-items: start; }
.settings-main { min-width: 0; }

.settings-nav {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-left: 1px solid var(--rule);
  padding-left: 18px;
}
.settings-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 0;
}
.settings-nav a:hover { color: var(--ink); }
.settings-nav a.is-active { color: var(--ink); border-left: 2px solid var(--focus); padding-left: 10px; margin-left: -12px; }

.settings-nav__label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

@media (max-width: 860px) {
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { position: static; flex-direction: row; flex-wrap: wrap; gap: 14px; border-left: none; border-bottom: 1px solid var(--rule); padding: 0 0 14px; }
  .settings-nav__label { display: none; }
}

.field--checkbox { margin-bottom: 14px; }
.field--checkbox label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
  color: var(--ink);
  margin-bottom: 0;
  cursor: pointer;
  position: relative;
}
.field--checkbox .field__hint { margin-left: 46px; margin-top: -2px; }

/* Bare native checkboxes read as unstyled/default-browser; a small custom
   switch reads as a deliberate on/off control instead. */
.field--checkbox input[type="checkbox"] {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  width: 36px;
  height: 20px;
  margin: 0;
  cursor: pointer;
}
.switch {
  width: 36px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 999px;
  background: var(--rule-strong);
  position: relative;
  transition: background 150ms ease;
}
.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ink);
  transition: transform 150ms ease;
}
input[type="checkbox"]:checked + .switch { background: var(--focus-hover); }
input[type="checkbox"]:checked + .switch::after { background: var(--on-accent); transform: translateX(16px); }
input[type="checkbox"]:focus-visible + .switch { outline: 2px solid var(--focus); outline-offset: 2px; }


/* ---------- template/keyword rows — compact, opens a popup to edit ---------- */

.template-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--rule);
}
.template-row:first-of-type { border-top: none; padding-top: 0; }
.template-row__info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.template-row__name { font-size: 13.5px; font-weight: 600; }
.template-row__excerpt {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

dialog#template-editor-dialog, dialog#role-jd-dialog {
  width: min(560px, 90vw);
  max-height: 80vh;
  overflow-y: auto;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--paper-raised);
  color: var(--ink);
  padding: 24px 26px;
  box-shadow: var(--shadow-card);
}
dialog#template-editor-dialog::backdrop, dialog#role-jd-dialog::backdrop { background: rgba(0, 0, 0, 0.5); }
#template-editor-title, #role-jd-dialog-title { font-size: 16px; margin: 0 0 14px; }
#template-editor-hint { margin: 0 0 14px; }
#template-editor-textarea { width: 100%; margin-bottom: 16px; font-family: var(--font-body); font-size: 14px; }
#template-editor-textarea.is-monospace { font-family: var(--font-mono); font-size: 13px; }
.template-editor__actions { display: flex; justify-content: flex-end; gap: 10px; }

/* ---------- roles page ---------- */

.roles-layout {
  display: grid;
  grid-template-columns: 2.3fr 1fr;
  gap: 20px;
  align-items: start;
}
.roles-layout .card, .roles-layout .card + .card { margin: 0; }
@media (max-width: 860px) { .roles-layout { grid-template-columns: 1fr; } }

/* Collapsed by default — a form that's not in use shouldn't hold a whole
   column's worth of vertical space open. */
.role-panel summary {
  list-style: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  margin: 0;
  padding-left: 24px;
  position: relative;
}
.role-panel summary::-webkit-details-marker { display: none; }
.role-panel summary::before {
  content: "+";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--focus);
  color: var(--on-accent);
  font-size: 13px;
  line-height: 17px;
  text-align: center;
}
.role-panel[open] summary { margin-bottom: 18px; }
.role-panel[open] summary::before { content: "\2212"; }

.dropzone {
  border: 1.5px dashed var(--rule-strong);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 13px;
  margin-bottom: 18px;
  cursor: pointer;
}
.dropzone.is-dragover { border-color: var(--focus); color: var(--focus); background: color-mix(in srgb, var(--focus) 6%, var(--paper-raised)); }
.dropzone.is-loading { cursor: default; }
.dropzone input[type="file"] { display: none; }

.dropzone__spinner {
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-right: 8px;
  vertical-align: -2px;
  border: 2px solid var(--rule-strong);
  border-top-color: var(--focus);
  border-radius: 50%;
}
@media (prefers-reduced-motion: no-preference) {
  .dropzone__spinner { animation: dropzone-spin 700ms linear infinite; }
}
@keyframes dropzone-spin {
  to { transform: rotate(360deg); }
}
.dropzone__hint { display: block; font-size: 11.5px; margin-top: 4px; color: var(--ink-soft); }

/* The role-panel column is narrow because of the 1.6fr/1fr grid split, not
   because the viewport is narrow — a @media breakpoint on viewport width
   would never fire on a wide desktop screen where this panel is still
   narrow, which is exactly how the Budget field placeholder ended up
   clipped. A container query responds to this element's own rendered
   width instead. */
.role-panel { container-type: inline-size; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@container (max-width: 280px) {
  .form-row { grid-template-columns: 1fr; }
}

/* Mono is right for a list of short discrete phrases (keywords), wrong for
   flowing prose (a JD, an email template) — it reads noticeably bulkier. */
#role-jd { font-family: var(--font-body); font-size: 13.5px; }

/* ---------- login ---------- */

.login-card {
  position: relative;
  z-index: 2;
  width: 360px;
  background: var(--paper-raised);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  box-shadow: 4px 4px 0 var(--rule-strong);
  padding: 38px 32px;
}
.login-card h1 { font-size: 22px; margin-bottom: 4px; }
.login-card p { color: var(--ink-soft); font-size: 13px; margin: 0 0 24px; }
.login-card .field { margin-bottom: 20px; }
.login-card .banner { margin-bottom: 18px; }

.password-field { position: relative; }
.password-field input { padding-right: 40px; }
.password-field .password-toggle {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 40px;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: none;
  border-radius: 50%;
  box-shadow: none;
  color: var(--ink-soft);
  cursor: pointer;
  transition: color 0.15s ease;
}
.password-field .password-toggle:hover,
.password-field .password-toggle:active { background: none; box-shadow: none; transform: none; }
.password-field .password-toggle:hover { color: var(--ink); }
.password-field .password-toggle:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
}
.password-field .password-toggle[aria-pressed="true"] { color: var(--focus); }
