:root {
  --background: #f8fafc;
  --surface: #ffffff;
  --surface-subtle: #f1f5f9;
  --text: #0f172a;
  --muted: #64748b;
  --faint: #94a3b8;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --primary: #0f172a;
  --teal: #0f766e;
  --teal-soft: #f0fdfa;
  --teal-border: #99f6e4;
  --amber: #b45309;
  --amber-soft: #fffbeb;
  --amber-border: #fde68a;
  --red: #b91c1c;
  --red-soft: #fef2f2;
  --red-border: #fecaca;
  --green: #15803d;
  --green-soft: #f0fdf4;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 12px 40px rgba(15, 23, 42, 0.06);
  --radius: 8px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--text); background: var(--background); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-feature-settings: "rlig" 1, "calt" 1; }
button, select, input { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
::selection { background: rgba(20, 184, 166, .22); }

.app-shell { min-height: 100vh; display: flex; }
.sidebar { position: sticky; top: 0; width: 244px; height: 100vh; flex: 0 0 244px; display: flex; flex-direction: column; padding: 20px 14px 16px; border-right: 1px solid rgba(226, 232, 240, .9); background: rgba(248, 250, 252, .96); }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 5px; min-width: 0; }
.brand-mark { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 7px; color: #fff; background: #020617; }
.brand-mark svg { width: 25px; height: 25px; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 14px; font-weight: 700; line-height: 1.4; }
.brand small { color: var(--muted); font-size: 12px; }
.release-pill { align-self: flex-start; margin: 22px 5px 12px; padding: 5px 8px; border: 1px solid var(--teal-border); border-radius: 6px; color: var(--teal); background: var(--teal-soft); font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
#sectionNav { display: grid; gap: 3px; }
.nav-item { position: relative; width: 100%; height: 42px; display: flex; align-items: center; gap: 11px; padding: 0 11px; border: 0; border-radius: 6px; color: #64748b; background: transparent; cursor: pointer; text-align: left; transition: color .16s ease, background .16s ease; }
.nav-item:hover { color: #1e293b; background: #f1f5f9; }
.nav-item.active { color: #0f172a; background: #eafaf7; font-weight: 600; }
.nav-item.active::before { content: ""; position: absolute; left: 0; width: 2px; height: 21px; border-radius: 999px; background: #0d9488; }
.nav-item .icon { width: 17px; height: 17px; flex: 0 0 17px; }
.nav-item span { min-width: 0; flex: 1; font-size: 13px; white-space: nowrap; }
.nav-item small { color: var(--faint); font-size: 9px; font-weight: 700; }
.sidebar-footer { margin-top: auto; display: flex; align-items: center; gap: 8px; padding: 12px 8px 0; border-top: 1px solid var(--border); color: var(--muted); font-size: 11px; }
.source-dot { width: 7px; height: 7px; border-radius: 50%; background: #14b8a6; box-shadow: 0 0 0 3px #ccfbf1; }

.workspace { min-width: 0; flex: 1; }
.mobile-header { display: none; }
.content { width: 100%; max-width: 1480px; margin: 0 auto; padding: 38px 42px 80px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.page-heading > div:first-child { max-width: 810px; }
.eyebrow, .section-kicker { color: var(--teal); font-size: 10px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.page-heading h1 { margin: 6px 0 8px; font-size: clamp(32px, 4vw, 46px); line-height: 1.06; letter-spacing: -.035em; }
.page-heading p { max-width: 720px; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.65; }
.button { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 13px; border: 1px solid transparent; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; transition: background .15s ease, border .15s ease, transform .15s ease; }
.button:active:not(:disabled) { transform: translateY(1px); }
.button:disabled { cursor: not-allowed; opacity: .45; }
.button-primary { color: #fff; background: var(--primary); }
.button-primary:hover { background: #1e293b; }
.button-secondary { border-color: var(--border); background: #fff; }
.button-secondary:hover:not(:disabled) { border-color: var(--border-strong); background: #f8fafc; }
.button-danger { border-color: var(--red-border); color: var(--red); background: var(--red-soft); }
.button-icon { width: 15px; height: 15px; }
.button-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.heading-actions { margin-top: 0; }
.number-input { width: 88px; height: 34px; padding: 0 9px; border: 1px solid var(--border-strong); border-radius: 6px; color: var(--text); background: #fff; }
.number-input:focus, .period-fields input:focus { outline: 2px solid rgba(15, 118, 110, .18); border-color: var(--teal); }
.production-import-panel { margin-bottom: 16px; }
.production-import-panel .panel-heading p { margin: 7px 0 0; color: var(--muted); font-size: 10px; }
.production-error { margin: 0 0 16px; }
.production-navigation { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -6px 0 16px; }
.scorecard-section-tabs { display: flex; gap: 6px; margin: -4px 0 20px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.scorecard-section-tabs button { height: 38px; padding: 0 14px; border: 1px solid var(--border); border-radius: 6px; color: var(--muted); background: #fff; font-size: 10px; font-weight: 700; cursor: pointer; }
.scorecard-section-tabs button.active { border-color: var(--primary); color: #fff; background: var(--primary); }
.report-source-status { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: -6px 0 18px; padding: 10px 14px; border: 1px solid #bbf7d0; border-radius: 8px; color: #166534; background: #f0fdf4; font-size: 12px; }
.report-source-status.warning { border-color: #fed7aa; color: #9a3412; background: #fff7ed; }
.report-source-status strong { flex: 0 0 auto; }
.lifecycle-filters { display: flex; align-items: center; gap: 8px; }
.lifecycle-filters select, .lifecycle-action-panel select, .inline-edit select, .attrition-review-actions select { height: 36px; padding: 0 9px; border: 1px solid var(--border-strong); border-radius: 6px; color: var(--text); background: #fff; font: inherit; }
.lifecycle-action-panel { margin-bottom: 12px; }
.inline-edit { display: flex; align-items: center; gap: 6px; min-width: 220px; }
.attrition-review-actions { display: grid; gap: 8px; min-width: 280px; }
.attrition-review-actions .button-row { margin-top: 0; }
.lifecycle-tabs { margin-top: 4px; }
.production-view-toggle { display: flex; }
.production-period-controls { display: flex; align-items: center; gap: 6px; }
.production-period-controls select { min-width: 170px; height: 38px; padding: 0 30px 0 10px; border: 1px solid var(--border); border-radius: 6px; color: var(--text); background: #fff; font-size: 11px; font-weight: 600; }
.production-period-controls .period-arrow { width: 38px; padding: 0; font-size: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.production-history { margin-top: 16px; }
.production-history .panel-heading p { margin: 7px 0 0; color: var(--muted); font-size: 10px; }
.production-summary-row td { border-top: 2px solid var(--border-strong); color: var(--text); background: #f8fafc; font-variant-numeric: tabular-nums; }
.production-summary-row + .production-summary-row td { border-top: 1px solid var(--border); }
.production-average-row td { color: var(--teal); background: var(--teal-soft); }
.vwb-tabs { display: flex; gap: 5px; margin-bottom: 12px; overflow-x: auto; padding-bottom: 2px; }
.vwb-tabs button { flex: 0 0 auto; height: 36px; padding: 0 11px; border: 1px solid var(--border); border-radius: 6px; color: var(--muted); background: #fff; font-size: 10px; font-weight: 650; cursor: pointer; }
.vwb-tabs button span { margin-left: 5px; color: var(--faint); }
.vwb-tabs button.active { border-color: var(--teal); color: #fff; background: var(--teal); }
.vwb-tabs button.active span { color: #ccfbf1; }
.vwb-panel .panel-heading { padding-bottom: 16px; }
.vwb-table-wrap { max-height: calc(100vh - 310px); overflow: auto; border-top: 1px solid var(--border); }
.vwb-table { min-width: 2050px; }
.vwb-table th { position: sticky; top: 0; z-index: 3; padding: 9px 10px; }
.vwb-table th button, .sortable-table th button { width: 100%; padding: 0; border: 0; color: inherit; background: transparent; font: inherit; letter-spacing: inherit; text-align: left; text-transform: inherit; cursor: pointer; }
.vwb-table .filter-row th { top: 33px; padding: 6px 7px; background: #f1f5f9; }
.vwb-table .filter-row input { width: 100%; min-width: 90px; height: 29px; padding: 0 7px; border: 1px solid var(--border-strong); border-radius: 4px; color: var(--text); background: #fff; font-size: 9px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.vwb-table td { padding: 10px; }
.vwb-table th:nth-child(1), .vwb-table td:nth-child(1) { width: 120px; min-width: 120px; }
.vwb-table th:nth-child(2), .vwb-table td:nth-child(2) { width: 160px; min-width: 160px; }
.vwb-table th:nth-child(3), .vwb-table td:nth-child(3) { width: 150px; min-width: 150px; }
.vwb-table th:nth-child(4), .vwb-table td:nth-child(4) { width: 190px; min-width: 190px; }
.vwb-table td:nth-child(n+7) { text-align: right; font-variant-numeric: tabular-nums; }
.vwb-table td:nth-child(8), .vwb-table td:nth-child(9) { text-align: left; }
.recruiter-match-panel { margin: -8px 0 24px; padding: 16px; border: 1px solid var(--amber-border); border-radius: 7px; background: var(--amber-soft); }
.recruiter-match-panel p { margin: -4px 0 13px; color: #92400e; font-size: 10px; }
.recruiter-match-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 14px; }
.recruiter-match-grid label { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(180px, 1.2fr); align-items: center; gap: 10px; color: var(--text); font-size: 10px; font-weight: 650; }
.recruiter-match-grid small { display: block; margin-top: 2px; color: var(--amber); font-size: 8px; font-weight: 500; }
.recruiter-match-grid select { height: 34px; padding: 0 28px 0 8px; border: 1px solid var(--amber-border); border-radius: 5px; color: var(--text); background: #fff; font-size: 10px; }
.period-fields { display: flex; gap: 10px; margin-bottom: 16px; }
.period-fields label { display: grid; gap: 5px; color: var(--muted); font-size: 9px; font-weight: 600; }
.period-fields input { height: 36px; padding: 0 9px; border: 1px solid var(--border-strong); border-radius: 6px; color: var(--text); background: #fff; }

.insight-banner { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border: 1px solid #bae6fd; border-radius: var(--radius); background: linear-gradient(135deg, #f0f9ff, #f8fafc 64%); box-shadow: 0 1px 2px rgba(15, 23, 42, .03); }
.insight-mark { width: 44px; height: 44px; flex: 0 0 44px; display: grid; place-items: center; border-radius: 7px; color: #fff; background: #0f172a; font-size: 12px; font-weight: 800; letter-spacing: -.02em; }
.insight-label { margin-bottom: 4px; color: #0369a1; font-size: 10px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.insight-banner p { margin: 0; color: #334155; font-size: 14px; font-weight: 500; line-height: 1.55; }
.scenario-row { display: flex; align-items: center; gap: 4px; margin: 16px 0; }
.scenario-row > span { margin-left: auto; color: var(--muted); font-size: 11px; }
.scenario-button { padding: 7px 11px; border: 1px solid var(--border); background: #fff; font-size: 11px; font-weight: 600; cursor: pointer; }
.scenario-button:first-child { border-radius: 6px 0 0 6px; }
.scenario-button:last-of-type { border-radius: 0 6px 6px 0; }
.scenario-button + .scenario-button { margin-left: -1px; }
.scenario-button.active { position: relative; z-index: 1; border-color: #0f766e; color: #fff; background: #0f766e; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.metric-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric-card, .panel, .recruiter-card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.metric-card { position: relative; overflow: hidden; min-height: 126px; padding: 18px; }
.metric-card::after { content: ""; position: absolute; inset: auto 0 0; height: 2px; background: #cbd5e1; }
.metric-card.risk::after { background: #f59e0b; }
.metric-card.positive::after { background: #14b8a6; }
.metric-label { margin-bottom: 12px; color: var(--muted); font-size: 11px; font-weight: 600; }
.metric-value { font-size: 29px; font-weight: 700; letter-spacing: -.035em; }
.metric-meta { margin-top: 7px; color: var(--faint); font-size: 10px; line-height: 1.4; }
.two-column { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr); gap: 16px; }
.panel { padding: 20px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.panel-heading h2, .panel h2, .recruiter-card h2 { margin: 5px 0 0; font-size: 16px; letter-spacing: -.015em; }
.audit-badge, .count-badge, .status-badge, .release-badge { display: inline-flex; align-items: center; justify-content: center; border-radius: 5px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.audit-badge { padding: 5px 7px; border: 1px solid var(--border); color: var(--muted); background: #f8fafc; }
.count-badge { min-width: 27px; height: 27px; padding: 0 7px; color: var(--amber); background: var(--amber-soft); }
.driver-list > div { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 10px 0; border-bottom: 1px solid #f1f5f9; font-size: 12px; }
.driver-list span { color: #475569; }
.driver-list strong { font-size: 13px; }
.driver-list .driver-total { margin-top: 4px; padding-top: 14px; border-bottom: 0; }
.driver-list .driver-total span, .driver-list .driver-total strong { color: var(--text); font-size: 14px; font-weight: 700; }
.positive-text { color: var(--green); }
.risk-text { color: var(--red); }
.formula-note { margin-top: 14px; padding: 11px 12px; border: 1px solid var(--teal-border); border-radius: 6px; color: #115e59; background: var(--teal-soft); font-size: 10px; line-height: 1.5; }
.action-list { display: grid; gap: 6px; }
.action-list button { width: 100%; display: grid; grid-template-columns: 8px minmax(0, 1fr) 16px; align-items: center; gap: 10px; padding: 9px 7px; border: 0; border-radius: 6px; background: transparent; cursor: pointer; text-align: left; }
.action-list button:hover { background: #f8fafc; }
.action-priority { width: 7px; height: 7px; border-radius: 50%; background: #f59e0b; }
.action-list strong, .action-list small { display: block; }
.action-list strong { margin-bottom: 3px; font-size: 11px; }
.action-list small { color: var(--muted); font-size: 9px; }
.action-list .icon { width: 14px; height: 14px; color: var(--faint); }
.production-strip { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 15px; padding-top: 15px; border-top: 1px solid var(--border); }
.production-strip div { padding: 0 10px; border-right: 1px solid var(--border); text-align: center; }
.production-strip div:first-child { padding-left: 0; }
.production-strip div:last-child { padding-right: 0; border-right: 0; }
.production-strip strong, .production-strip span { display: block; }
.production-strip strong { font-size: 16px; }
.production-strip span { margin-top: 3px; color: var(--muted); font-size: 9px; }

.release-callout { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 7px; background: rgba(255, 255, 255, .75); }
.release-callout p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.release-badge { padding: 5px 7px; border: 1px solid #bae6fd; color: #0369a1; background: #f0f9ff; }
.table-panel { padding: 0; overflow: hidden; }
.table-panel .panel-heading { padding: 20px 20px 0; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 15px; border-top: 1px solid var(--border); text-align: left; white-space: nowrap; }
th { color: var(--muted); background: #f8fafc; font-size: 9px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
td { color: #475569; font-size: 11px; }
td strong { color: var(--text); font-weight: 600; }
.status-badge { padding: 4px 6px; }
.status-badge.warning { border: 1px solid var(--amber-border); color: var(--amber); background: var(--amber-soft); }
.status-badge.success { border: 1px solid #bbf7d0; color: var(--green); background: var(--green-soft); }
.status-badge.neutral { border: 1px solid var(--border); color: var(--muted); background: #f8fafc; }
.empty-feature { min-height: 310px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 42px; text-align: center; }
.empty-feature-icon { width: 54px; height: 54px; display: grid; place-items: center; margin-bottom: 10px; border-radius: 10px; color: var(--teal); background: var(--teal-soft); }
.large-icon { width: 25px; height: 25px; }
.empty-feature h2 { font-size: 18px; }
.empty-feature p { max-width: 610px; margin: 10px auto 18px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.chip-row { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.chip-row span { padding: 6px 8px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); background: #f8fafc; font-size: 9px; }
.scorecard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.recruiter-card { display: grid; grid-template-columns: 42px 1fr auto; gap: 14px; align-items: center; padding: 18px; }
.avatar { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 8px; color: var(--teal); background: var(--teal-soft); font-size: 11px; font-weight: 700; }
.recruiter-title span { color: var(--muted); font-size: 10px; }
.mini-grid { display: grid; grid-template-columns: repeat(3, 82px); }
.mini-grid div { text-align: center; }
.mini-grid strong, .mini-grid span { display: block; }
.mini-grid strong { font-size: 12px; }
.mini-grid span { margin-top: 3px; color: var(--faint); font-size: 8px; text-transform: uppercase; }
.recruiter-card .button { grid-column: 2 / -1; justify-self: start; }
.recruiter-card.archived { box-shadow: none; background: var(--surface-subtle); }
.recruiter-card.archived .avatar { color: var(--muted); background: #e2e8f0; }
.archived-team { margin-top: 26px; }
.archived-team > .panel-heading { margin-bottom: 12px; }
.empty-team { grid-column: 1 / -1; padding: 24px; }
.empty-team p { margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.goal-panel, .goal-table-panel { margin-bottom: 16px; }
.goal-panel .panel-heading p, .goal-table-panel .panel-heading p { max-width: 720px; margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.forecast-assumption-panel, .forecast-table-panel { margin-bottom: 16px; }
.forecast-assumption-panel .panel-heading p, .forecast-table-panel .panel-heading p { max-width: 760px; margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.forecast-assumption-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.forecast-assumption-grid label > span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 10px; font-weight: 650; }
.forecast-assumption-grid input[readonly] { color: var(--muted); background: #f8fafc; }
.percent-input { display: flex; align-items: center; height: 38px; overflow: hidden; border: 1px solid var(--border-strong); border-radius: 6px; background: #fff; }
.percent-input .goal-input { height: 36px; border: 0; }
.percent-input > span { padding-right: 10px; color: var(--muted); font-size: 11px; }
.percent-input:focus-within { outline: 2px solid rgba(15, 118, 110, .18); border-color: var(--teal); }
.forecast-table-panel .panel-heading { align-items: center; }
.forecast-table th, .forecast-table td { padding: 10px 12px; }
.forecast-detail-grid { margin-bottom: 16px; }
.goal-field-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.goal-field-grid label > span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 10px; font-weight: 650; }
.goal-input { width: 100%; height: 38px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 6px; color: var(--text); background: #fff; font-size: 12px; }
.goal-input:focus { outline: 2px solid rgba(15, 118, 110, .18); border-color: var(--teal); }
.goal-input.compact { width: 92px; height: 34px; }
.money-input { display: flex; align-items: center; height: 38px; overflow: hidden; border: 1px solid var(--border-strong); border-radius: 6px; background: #fff; }
.money-input > span { padding-left: 10px; color: var(--muted); font-size: 11px; }
.money-input .goal-input { height: 36px; border: 0; padding-left: 4px; }
.money-input .goal-input:focus { outline: 0; }
.money-input:focus-within { outline: 2px solid rgba(15, 118, 110, .18); border-color: var(--teal); }
.money-input.compact { width: 142px; height: 34px; }
.money-input.compact .goal-input { height: 32px; }
.goal-actions { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.goal-actions > span { color: var(--muted); font-size: 10px; }
.goal-table-panel .panel-heading { align-items: center; }
.goal-table th, .goal-table td { padding: 10px 12px; }
.goal-table td:first-child small { display: block; }
.manual-goal { display: block; margin-top: 4px; color: var(--teal); font-size: 8px; font-weight: 700; text-transform: uppercase; }
.pipeline-total { font-size: 13px; font-weight: 760; color: var(--text); }
.pipeline-breakdown { display: block; margin-top: 3px; white-space: nowrap; color: var(--muted); font-size: 8px; font-weight: 650; }
.team-goal-row td { background: var(--teal-soft); }
.weekly-goal-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 0 20px 18px; overflow: hidden; border: 1px solid var(--border); border-radius: 6px; background: var(--border); }
.weekly-goal-summary > div { padding: 12px; background: #f8fafc; }
.weekly-goal-summary span, .weekly-goal-summary strong { display: block; }
.weekly-goal-summary span { color: var(--muted); font-size: 9px; }
.weekly-goal-summary strong { margin-top: 5px; font-size: 13px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; margin: 28px 0 12px; }
.section-heading h2 { margin: 4px 0 0; font-size: 18px; }
.capacity-chain { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.capacity-chain > div { position: relative; padding: 15px; border: 1px solid var(--border); border-radius: 6px; background: #f8fafc; }
.capacity-chain > div::after { content: "→"; position: absolute; right: -9px; top: calc(50% - 9px); z-index: 1; color: var(--faint); }
.capacity-chain > div:last-child::after { display: none; }
.capacity-chain strong, .capacity-chain span { display: block; }
.capacity-chain strong { font-size: 11px; }
.capacity-chain span { margin-top: 5px; color: var(--faint); font-size: 9px; }
.capacity-chain .ready { border-color: var(--teal-border); background: var(--teal-soft); }
.capacity-chain .ready span { color: var(--teal); }

.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.settings-wide { grid-column: 1 / -1; }
.import-intro { display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.import-intro h2, .import-review h2 { margin: 5px 0 0; }
.import-intro p, .import-review .panel-heading p { max-width: 720px; margin: 8px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.import-action { flex: 0 0 auto; display: grid; justify-items: stretch; gap: 7px; }
.import-action small { color: var(--faint); font-size: 9px; text-align: center; }
.import-loading { min-height: 88px; display: flex; align-items: center; gap: 16px; }
.import-loading > span { width: 26px; height: 26px; flex: 0 0 26px; border: 2px solid var(--border); border-top-color: var(--teal); border-radius: 50%; animation: spin .8s linear infinite; }
.import-loading h2 { margin: 5px 0 0; }
.import-loading p { margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.import-error { display: flex; gap: 10px; margin-top: 16px; padding: 11px 12px; border: 1px solid var(--red-border); border-radius: 6px; color: var(--red); background: var(--red-soft); font-size: 10px; }
.import-error span { color: #7f1d1d; }
.last-import { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); color: var(--muted); font-size: 10px; }
.last-import strong { color: var(--text); }
.import-review .panel-heading { align-items: center; }
.review-badges { display: flex; align-items: center; gap: 6px; }
.import-stat-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 4px 0 24px; border: 1px solid var(--border); border-radius: 7px; background: #f8fafc; }
.import-stat-grid > div { padding: 14px; border-right: 1px solid var(--border); }
.import-stat-grid > div:last-child { border-right: 0; }
.import-stat-grid span, .import-stat-grid strong { display: block; }
.import-stat-grid span { color: var(--muted); font-size: 9px; }
.import-stat-grid strong { margin-top: 5px; font-size: 17px; }
.timeline-preview { display: flex; align-items: center; gap: 18px; margin: -8px 0 24px; padding: 13px 14px; border: 1px solid var(--teal-border); border-radius: 7px; background: var(--teal-soft); }
.timeline-preview > div { min-width: 0; }
.timeline-preview span, .timeline-preview strong { display: block; }
.timeline-preview span { color: #0f766e; font-size: 9px; }
.timeline-preview strong { margin-top: 4px; color: #134e4a; font-size: 11px; }
.timeline-preview .timeline-arrow { color: #14b8a6; }
.timeline-preview .timeline-arrow .icon { width: 15px; height: 15px; }
.timeline-preview .timeline-alert { margin-left: auto; }
.timeline-preview .timeline-alert span, .timeline-preview .timeline-alert strong { color: var(--amber); }
.vwb-preview .vwb-financial-boundary { margin-left: auto; padding-left: 16px; border-left: 1px solid var(--teal-border); }
.import-review-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr); gap: 22px; }
.import-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.import-section-heading h3 { margin: 5px 0 0; font-size: 13px; }
.reconciliation-table th, .reconciliation-table td { padding: 10px 11px; }
.reconciliation-note { margin-top: 8px; color: var(--faint); font-size: 9px; }
.warning-list, .blocking-list { display: grid; gap: 7px; }
.warning-list > div { display: grid; grid-template-columns: 7px minmax(0, 1fr); align-items: start; gap: 9px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.warning-dot { width: 6px; height: 6px; margin-top: 4px; border-radius: 50%; background: #f59e0b; }
.warning-dot.correction-dot { background: var(--teal); }
.warning-list .warning-more { display: block; padding: 8px 10px; border-radius: 5px; color: var(--amber); background: var(--amber-soft); font-weight: 600; }
.blocking-list { margin-bottom: 10px; }
.blocking-list > div { padding: 9px 10px; border: 1px solid var(--red-border); border-radius: 5px; background: var(--red-soft); }
.blocking-list strong, .blocking-list span { display: block; color: var(--red); font-size: 10px; }
.blocking-list span { margin-top: 3px; color: #7f1d1d; }
.match-summary { display: grid; gap: 7px; margin-top: 11px; }
.match-summary > div { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 9px 10px; border-radius: 5px; background: #f8fafc; color: var(--muted); font-size: 10px; }
.match-summary strong { color: var(--text); font-size: 11px; }
.import-approval { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.import-approval strong, .import-approval span { display: block; }
.import-approval strong { font-size: 11px; }
.import-approval span { max-width: 690px; margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.import-approval .button-row { flex: 0 0 auto; margin-top: 0; }
.definition-list { margin: 0; }
.definition-list > div { display: grid; grid-template-columns: 145px minmax(0, 1fr); gap: 15px; padding: 10px 0; border-bottom: 1px solid #f1f5f9; font-size: 11px; }
.definition-list dt { color: var(--muted); }
.definition-list dd { margin: 0; color: var(--text); font-weight: 500; overflow-wrap: anywhere; }
.mono { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: .92em; }
.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-color: var(--red-border); box-shadow: none; }
.danger-zone p, .settings-grid .panel > div > p { max-width: 560px; margin: 8px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }

.loading-state, .recovery-state { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.loading-state span { width: 24px; height: 24px; border: 2px solid var(--border); border-top-color: var(--teal); border-radius: 50%; animation: spin .8s linear infinite; }
.loading-state p { color: var(--muted); font-size: 12px; }
.recovery-mark { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 50%; color: var(--red); background: var(--red-soft); font-weight: 800; }
.recovery-state h1 { margin: 18px 0 7px; font-size: 25px; }
.recovery-state p { max-width: 580px; margin: 4px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.recovery-state .button { margin-top: 18px; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 50; max-width: 370px; padding: 11px 14px; border: 1px solid var(--border); border-radius: 7px; color: #fff; background: #0f172a; box-shadow: var(--shadow); font-size: 11px; opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .18s ease, transform .18s ease; }
.toast.visible { opacity: 1; transform: translateY(0); }
.toast.error { background: #991b1b; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1100px) {
  .content { padding-inline: 28px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-column { grid-template-columns: 1fr; }
  .scorecard-grid, .settings-grid { grid-template-columns: 1fr; }
  .import-stat-grid { grid-template-columns: repeat(3, 1fr); }
  .import-stat-grid > div:nth-child(3) { border-right: 0; }
  .import-stat-grid > div:nth-child(-n+3) { border-bottom: 1px solid var(--border); }
  .import-review-grid { grid-template-columns: 1fr; }
  .recruiter-match-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .sidebar { display: none; }
  .workspace { width: 100%; }
  .mobile-header { position: sticky; top: 0; z-index: 20; min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 16px; border-bottom: 1px solid var(--border); background: rgba(248, 250, 252, .95); backdrop-filter: blur(12px); }
  .mobile-header .brand { padding: 0; }
  .mobile-header .brand-mark { width: 36px; height: 36px; flex-basis: 36px; }
  #mobileSectionNav { min-width: 150px; max-width: 48vw; height: 36px; padding: 0 30px 0 10px; border: 1px solid var(--border); border-radius: 6px; color: var(--text); background: #fff; font-size: 11px; }
  .content { padding: 27px 16px 60px; }
  .page-heading { align-items: flex-start; flex-direction: column; margin-bottom: 20px; }
  .page-heading h1 { font-size: 32px; }
  .page-heading .button { width: 100%; }
  .insight-banner { align-items: flex-start; }
  .scenario-row { align-items: stretch; flex-wrap: wrap; }
  .scenario-button { flex: 1; }
  .scenario-row > span { width: 100%; margin: 7px 0 0; }
  .production-navigation { align-items: stretch; flex-direction: column; }
  .lifecycle-filters { align-items: stretch; flex-direction: column; }
  .production-period-controls select { width: 100%; }
  .production-period-controls label { flex: 1; }
  .metric-grid, .metric-grid.three { grid-template-columns: 1fr 1fr; }
  .metric-card { min-height: 112px; }
  .metric-value { font-size: 25px; }
  .release-callout { align-items: flex-start; }
  .scorecard-grid { grid-template-columns: 1fr; }
  .goal-field-grid, .forecast-assumption-grid { grid-template-columns: 1fr 1fr; }
  .goal-actions, .goal-table-panel .panel-heading, .forecast-table-panel .panel-heading { align-items: stretch; flex-direction: column; }
  .goal-actions .button, .goal-table-panel .panel-heading .button, .forecast-table-panel .panel-heading .button { width: 100%; }
  .weekly-goal-summary { grid-template-columns: 1fr; }
  .recruiter-card { grid-template-columns: 42px 1fr; }
  .mini-grid { grid-column: 1 / -1; grid-template-columns: repeat(3, 1fr); }
  .recruiter-card .button { grid-column: 1 / -1; width: 100%; }
  .capacity-chain { grid-template-columns: 1fr 1fr; }
  .capacity-chain > div:nth-child(2)::after { display: none; }
  .definition-list > div { grid-template-columns: 110px minmax(0, 1fr); }
  .danger-zone { align-items: flex-start; flex-direction: column; }
  .import-intro, .import-approval { align-items: stretch; flex-direction: column; }
  .import-action, .import-approval .button-row { width: 100%; }
  .timeline-preview { align-items: stretch; flex-wrap: wrap; gap: 12px 18px; }
  .timeline-preview .timeline-arrow { display: none; }
  .timeline-preview > div { min-width: calc(50% - 9px); }
  .timeline-preview .timeline-alert { margin-left: 0; }
  .vwb-preview .vwb-financial-boundary { margin-left: 0; padding-left: 0; border-left: 0; }
  .import-action .button, .import-approval .button { flex: 1; }
  .vwb-table-wrap { max-height: none; }
}

@media (max-width: 460px) {
  .mobile-header .brand small { display: none; }
  #mobileSectionNav { min-width: 135px; }
  .metric-grid, .metric-grid.three { grid-template-columns: 1fr; }
  .insight-mark { display: none; }
  .panel { padding: 16px; }
  .empty-feature { padding: 30px 18px; }
  .capacity-chain { grid-template-columns: 1fr; }
  .import-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .import-stat-grid > div { border-bottom: 1px solid var(--border); }
  .import-stat-grid > div:nth-child(2n) { border-right: 0; }
  .import-stat-grid > div:nth-last-child(-n+2) { border-bottom: 0; }
  .capacity-chain > div::after { display: none; }
  .forecast-assumption-grid { grid-template-columns: 1fr; }
  .toast { right: 14px; bottom: 14px; left: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation-duration: .01ms !important; }
}
