main.dash { max-width: 1200px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { padding: 14px 16px; }
.stat .label { font-size: 12.5px; color: var(--muted); font-weight: 550; }
.stat .value { font-size: 26px; font-weight: 650; letter-spacing: -0.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat .sub { font-size: 12px; color: var(--muted); }

.funnel-card { padding: 16px 18px; margin-bottom: 16px; }
.funnel { display: flex; height: 30px; margin-top: 12px; border-radius: 6px; overflow: hidden; background: var(--surface-2); gap: 2px; }
.funnel > div {
  display: flex; align-items: center; padding: 0 8px; min-width: 0;
  font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; cursor: pointer;
}
.funnel-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; font-size: 12.5px; }
.funnel-legend span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; background: var(--c); }

.toolbar { display: flex; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.toolbar input { flex: 1 1 260px; }
.toolbar select { width: auto; flex: 0 0 auto; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: transparent; color: var(--muted); padding: 0 14px; font: inherit; font-weight: 550; cursor: pointer; }
.seg button.active { background: var(--accent-soft); color: var(--accent); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; cursor: pointer; user-select: none; white-space: nowrap; }
th.sorted::after { content: " ↓"; }
th.sorted.asc::after { content: " ↑"; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: var(--surface-2); }
tbody tr:last-child td { border-bottom: 0; }
td .co { font-weight: 600; }
td .loc { font-size: 12px; color: var(--muted); }
td select.status { width: auto; padding: 3px 6px; font-size: 12.5px; }
td.date { white-space: nowrap; font-variant-numeric: tabular-nums; }
.due { color: var(--warn); font-weight: 600; }
.empty-state { padding: 48px 20px; text-align: center; }
.empty-state p { max-width: 460px; margin: 8px auto 0; }

.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.col { background: var(--surface-2); border-radius: var(--radius); padding: 10px; min-height: 160px; }
.col.drop { outline: 2px dashed var(--accent); }
.col h3 { font-size: 13px; display: flex; justify-content: space-between; margin: 2px 4px 10px; }
.jobcard { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; cursor: grab; }
.jobcard .co { font-weight: 600; }
.jobcard .t { font-size: 13px; }
.jobcard .m { font-size: 12px; color: var(--muted); margin-top: 4px; }

dialog { border: 1px solid var(--border); border-radius: 14px; padding: 22px; width: min(640px, calc(100vw - 32px)); background: var(--surface); color: var(--text); }
dialog::backdrop { background: rgba(10, 12, 16, .45); }
.dialog-actions { display: flex; gap: 8px; margin-top: 18px; }
#history { margin-top: 12px; }

@media (max-width: 760px) {
  .stat .value { font-size: 22px; }
  th:nth-child(5), td:nth-child(5), th:nth-child(6), td:nth-child(6) { display: none; }
}

.insights { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 12px; margin-bottom: 16px; }
.chart-card, .source-card { padding: 16px 18px; }
#weekChart { margin-top: 10px; }
#weekChart svg { display: block; width: 100%; height: auto; max-height: 170px; overflow: visible; }
#weekChart .bar { fill: var(--accent); }
#weekChart .bar.cur { fill: var(--accent); opacity: .55; }
#weekChart .goal { stroke: var(--warn); stroke-dasharray: 4 3; stroke-width: 1.5; }
#weekChart text { fill: var(--muted); font-size: 10.5px; }
#weekChart text.v { fill: var(--text); font-weight: 600; }
table.mini { margin-top: 8px; }
table.mini th, table.mini td { padding: 6px 4px; font-size: 13px; cursor: default; }
table.mini th { font-size: 11px; }
table.mini td:not(:first-child), table.mini th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
table.mini tr:hover { background: none; }
.stale { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; margin-bottom: 12px; background: var(--warn-soft); border-color: transparent; flex-wrap: wrap; }
@media (max-width: 860px) { .insights { grid-template-columns: minmax(0, 1fr); } }
.date .fu { display: block; margin-top: 2px; font-weight: 600; }
.mail-dialog { width: min(680px, calc(100vw - 32px)); }
.mail-dialog textarea { width: 100%; font: 13px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; }
.mail-dialog h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 14px 0 6px; }
.mail-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; max-height: 300px; overflow: auto; }
.mail-list li { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 13.5px; }
.mail-list label { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mail-list input { width: auto; }

/* vendor roles */
.dbl { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 4px; font-size: 11px; font-weight: 600; background: var(--bad-soft); color: var(--bad); white-space: nowrap; }
.mail-list .flags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.mail-list .flag { font-size: 11.5px; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.mail-list .flag.ok { background: var(--good-soft); color: var(--good); }
.mail-list .flag.warn { background: var(--warn-soft); color: var(--warn); }
.mail-list .flag.bad { background: var(--bad-soft); color: var(--bad); }
.mail-list label { display: flex; gap: 8px; align-items: flex-start; }

/* upcoming interviews & offers */
.upcoming, .offers { padding: 16px 18px; margin-bottom: 16px; }
.up-item { display: grid; grid-template-columns: 150px 1fr auto; gap: 12px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--border); color: inherit; text-decoration: none; font-size: 13.5px; }
.up-item:first-child { border-top: 0; }
.up-item:hover b { text-decoration: underline; }
.up-when { font-weight: 600; color: var(--accent); }
table.offer-table { width: auto; min-width: 100%; }
table.offer-table th, table.offer-table td { cursor: default; text-align: right; padding: 7px 0 7px 24px; vertical-align: top; font-size: 13.5px; text-transform: none; letter-spacing: 0; font-variant-numeric: tabular-nums; }
table.offer-table thead th { min-width: 160px; font-size: 13.5px; font-weight: 600; color: var(--text); }
table.offer-table thead th .muted { font-weight: 400; white-space: normal; }
table.offer-table th:first-child { text-align: left; padding-left: 0; }
table.offer-table tbody th { color: var(--muted); font-weight: 500; white-space: nowrap; font-size: 13px; }
table.offer-table tbody tr:nth-child(6) td, table.offer-table tbody tr:nth-child(7) td { border-top: 1px solid var(--border); }
@media (max-width: 640px) { .up-item { grid-template-columns: 1fr; gap: 2px; } }
.linkbtn { border: 0; background: none; padding: 0; font: inherit; color: var(--accent); cursor: pointer; }
.linkbtn:hover { text-decoration: underline; }
