/* App screens: sign-in, dashboards, job board. Builds on site.css tokens. */
.auth-wrap { min-height: calc(100vh - 64px); display: flex; align-items: flex-start; justify-content: center; padding: clamp(32px, 8vw, 88px) max(20px, env(safe-area-inset-left, 0px)) 64px; background-color: #fffbfa; background-image: radial-gradient(rgba(109,89,116,.12) 1px, transparent 1.4px); background-size: 22px 22px; }
.auth-card { width: 100%; max-width: 440px; background: var(--surface); border-radius: 18px; padding: clamp(24px, 5vw, 36px); box-shadow: 0 0 0 1px var(--line), 0 18px 40px rgba(30,24,33,.08); }
.auth-card h1 { font-size: 28px; }
.auth-card .lead { font-size: 16px; margin-top: 8px; }
.auth-card form { margin-top: 22px; display: grid; gap: 14px; }
.code-input { font-size: 28px !important; letter-spacing: 10px; text-align: center; font-variant-numeric: tabular-nums; }
.role-pick { display: grid; gap: 10px; }
.role-opt { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line-strong); border-radius: 12px; padding: 14px; cursor: pointer; }
.role-opt:has(input:checked) { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); background: var(--tint); }
.role-opt input { margin-top: 4px; accent-color: var(--brand); }
.role-opt b { display: block; }
.role-opt span { font-size: 14px; color: var(--muted); }
.dev-note { font-size: 13px; background: var(--apricot-tint); color: var(--apricot-ink); padding: 8px 12px; border-radius: 8px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--brand-ink); font: inherit; font-size: 14px; text-decoration: underline; cursor: pointer; }

.app { min-height: calc(100vh - 64px); }
.app-loading { padding-block: 64px; }
.app-grid { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 24px; padding-block: 28px 64px; align-items: start; }
.side { position: sticky; top: calc(80px + env(safe-area-inset-top, 0px)); background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-card); padding: 16px; }
.side .who { padding: 4px 6px 14px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.side .who b { display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side .who span { font-size: 13px; color: var(--muted); }
.side nav { display: grid; gap: 2px; }
.side nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 15px; }
.side nav a:hover { background: var(--canvas); color: var(--ink); }
.side nav a[aria-current="page"] { background: var(--tint); color: var(--brand-ink); font-weight: 600; }
.side .side-foot { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); display: grid; gap: 2px; }
@media (max-width: 860px) {
  .app-grid { grid-template-columns: minmax(0, 1fr); padding-top: 16px; }
  .side { position: static; padding: 10px; }
  .side .who { display: none; }
  .side nav { display: flex; overflow-x: auto; gap: 4px; }
  .side nav a { white-space: nowrap; }
  .side .side-foot { display: none; }
}
.view-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.view-head h1 { font-size: clamp(24px, 3vw, 30px); }
.view-head p { color: var(--muted); margin-top: 4px; }
.panel { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-card); padding: clamp(18px, 3vw, 26px); }
.panel + .panel { margin-top: 18px; }
.panel h2 { font-size: 18px; margin-bottom: 4px; }
.panel .sub { color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.fgrid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .fgrid { grid-template-columns: minmax(0, 1fr); } }
.field label, .field .lbl { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field .hint { font-size: 13px; color: var(--muted); margin-top: 4px; }
.field input:not([type=checkbox]):not([type=radio]), .field select, .field textarea { width: 100%; font: inherit; font-size: 15px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); min-height: 44px; }
.field textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: var(--focus); }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.checks label { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; font-size: 14px; border: 1px solid var(--line-strong); border-radius: 999px; padding: 7px 12px; cursor: pointer; margin: 0; }
.checks label:has(input:checked) { background: var(--tint); border-color: var(--brand); color: var(--brand-ink); }
.checks input { accent-color: var(--brand); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 18px; }
.btn[disabled] { opacity: .6; cursor: progress; }
.msg { font-size: 14px; font-weight: 500; }
.msg.ok { color: var(--success); } .msg.err { color: var(--danger); } .msg.warn { color: var(--apricot-ink); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; border: 1px solid var(--line-strong); border-radius: 8px; padding: 6px; min-height: 44px; background: var(--surface); }
.tags:focus-within { outline: 2px solid var(--focus); border-color: var(--focus); }
.tags input { border: 0 !important; outline: 0 !important; min-height: 30px !important; padding: 4px 6px !important; flex: 1; min-width: 120px; }
.tagchip { display: inline-flex; align-items: center; gap: 4px; background: var(--tint); color: var(--brand-ink); border-radius: 999px; padding: 3px 4px 3px 10px; font-size: 13px; font-weight: 500; }
.tagchip button { border: 0; background: none; color: inherit; cursor: pointer; width: 22px; height: 22px; border-radius: 50%; font-size: 15px; line-height: 1; }
.tagchip button:hover { background: rgba(0,0,0,.06); }

.drop { display: block; position: relative; border: 2px dashed var(--line-strong); border-radius: 14px; padding: 26px; text-align: center; background: var(--canvas); transition: border-color .15s, background .15s; cursor: pointer; }
.drop.over, .drop:hover { border-color: var(--brand); background: var(--tint); }
.drop b { display: block; font-size: 16px; }
.drop span { font-size: 14px; color: var(--muted); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.cvline { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; font-size: 14px; color: var(--ink-2); }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--tint-strong); border-top-color: var(--brand); animation: spin .8s linear infinite; display: inline-block; vertical-align: -4px; margin-right: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }

.list { display: grid; gap: 12px; }
.item { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-card); padding: 18px 20px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; align-items: start; }
.item h3 { font-size: 17px; }
.item h3 a { color: var(--ink); text-decoration: none; }
.item h3 a:hover { color: var(--brand-ink); text-decoration: underline; }
.meta { font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 2px; }
.item .row-chips { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.item .row-actions { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.item .why { grid-column: 1 / -1; font-size: 14px; color: var(--ink-2); background: var(--canvas); border-radius: 10px; padding: 10px 12px; }
.c-met { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--sage-tint); color: var(--sage-ink); font-weight: 500; }
.c-miss { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--apricot-tint); color: var(--apricot-ink); font-weight: 500; }
.c-plain { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--canvas); border: 1px solid var(--line); color: var(--ink-2); }
.scorepill { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 62px; height: 62px; border-radius: 50%; font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; }
.scorepill small { font-size: 10px; font-weight: 600; opacity: .8; }
.s-high { background: var(--sage-tint); color: var(--sage-ink); box-shadow: inset 0 0 0 2px #9cc8b0; }
.s-mid { background: var(--tint); color: var(--brand-ink); box-shadow: inset 0 0 0 2px var(--tint-strong); }
.s-low { background: var(--apricot-tint); color: var(--apricot-ink); box-shadow: inset 0 0 0 2px #f6d6c2; }
.s-none { background: var(--canvas); color: var(--muted); box-shadow: inset 0 0 0 2px var(--line); }
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--canvas); color: var(--ink-2); border: 1px solid var(--line); text-transform: capitalize; }
.b-open, .b-hired, .b-offer { background: var(--sage-tint); color: var(--sage-ink); border-color: transparent; }
.b-shortlisted, .b-interview, .b-invited { background: var(--tint); color: var(--brand-ink); border-color: transparent; }
.b-rejected, .b-closed, .b-withdrawn { background: #f4f2f5; color: var(--muted); }
.b-draft, .b-applied { background: var(--apricot-tint); color: var(--apricot-ink); border-color: transparent; }
.empty { text-align: center; padding: 40px 20px; }
.empty h3 { font-size: 18px; margin-bottom: 6px; }
.empty p { color: var(--muted); margin-bottom: 16px; }
.tabs { display: inline-flex; gap: 4px; background: var(--surface); box-shadow: var(--shadow-card); border-radius: 999px; padding: 4px; margin-bottom: 16px; }
.tabs button { border: 0; background: none; font: inherit; font-size: 14px; font-weight: 600; padding: 7px 14px; border-radius: 999px; color: var(--ink-2); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--brand); color: #fff; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-card); padding: 16px; }
.stat span { font-size: 13px; color: var(--muted); }
.stat b { display: block; font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tablewrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data th { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.detail { white-space: pre-wrap; line-height: 1.65; color: var(--ink-2); }
.cand-x { font-size: 14px; color: var(--ink-2); grid-column: 1 / -1; }
.cand-x details summary { cursor: pointer; color: var(--brand-ink); font-weight: 600; }
.cand-x ul { margin: 8px 0 0; padding-left: 18px; }
.select-sm { font: inherit; font-size: 14px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); min-height: 36px; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--deep); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14px; font-weight: 500; z-index: 300; box-shadow: 0 10px 30px rgba(0,0,0,.2); max-width: calc(100vw - 32px); }
.board-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.board-filters input, .board-filters select { font: inherit; font-size: 15px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); min-height: 44px; }
.board-filters input { flex: 1; min-width: 200px; }
.job-detail { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
@media (max-width: 860px) { .job-detail { grid-template-columns: minmax(0, 1fr); } }
