:root {
    color-scheme: light;
    --ink: #16243b;
    --muted: #526174;
    --edge: #dbe2e9;
    --wash: #f3f6fa;
    --nav: #16243b;
    --blue: #214fba;
    --blue-dark: #11378c;
    --blue-pale: #e8efff;
    --negative: #a32936;
    --white: #fff;
    font-family: "Segoe UI", system-ui, sans-serif;
    color: var(--ink);
    background: var(--wash);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: grid; grid-template-columns: 224px minmax(0, 1fr); }
a { color: var(--blue-dark); text-underline-offset: .18em; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(2.1rem, 4vw, 3.15rem); letter-spacing: -.055em; line-height: 1.08; }
h2 { font-size: 1.26rem; letter-spacing: -.025em; }
button, input, select { font: inherit; }
:focus-visible { outline: 3px solid #ed9b26; outline-offset: 3px; }
.visually-hidden, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link:focus { position: absolute; top: 1rem; left: 1rem; z-index: 4; background: white; padding: .55rem .9rem; }
.rail { background: var(--nav); color: white; padding: 31px 17px; }
.brand { display: flex; align-items: center; gap: .65rem; padding-inline: 10px; margin-bottom: 46px; font-size: 1.16rem; color: white; text-decoration: none; white-space: nowrap; letter-spacing: -.03em; }
.brand strong { font-weight: 500; color: #a8c2ff; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: #a9c5ff; color: #132b59; font-weight: 750; }
.rail nav { display: grid; gap: .35rem; }
.rail nav a { border-radius: 7px; text-decoration: none; font-size: .92rem; font-weight: 560; color: #d5e0f2; padding: .8rem .85rem; }
.rail nav a:hover { background: #233a58; color: white; }
.rail nav a.active { background: #304a72; color: white; box-shadow: inset 3px 0 #a9c5ff; }
.workspace { width: 100%; max-width: 1450px; margin-inline: auto; padding: 43px clamp(23px, 4vw, 59px) 60px; min-width: 0; }
.page-heading, .panel-heading, .paging { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.page-heading { margin-bottom: 28px; align-items: end; flex-wrap: wrap; }
.subtitle, .panel-heading p, .panel-note, .subtle, small { color: var(--muted); }
.subtitle { margin-top: 8px; }
.filter-bar { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
label { font-size: .86rem; font-weight: 650; }
select, input[type="search"], input[type="file"] { color: var(--ink); background: white; border: 1px solid #bcc9d8; padding: .56rem .62rem; border-radius: 6px; min-width: 0; }
input[type="file"] { max-width: 100%; }
.button { display: inline-flex; align-items: center; justify-content: center; padding: .56rem .9rem; font-weight: 650; font-size: .85rem; border: 1px solid transparent; border-radius: 6px; text-decoration: none; cursor: pointer; white-space: nowrap; }
.primary { background: var(--blue); color: white; }
.primary:hover { background: var(--blue-dark); }
.secondary { background: white; border-color: #bdcce0; color: var(--blue-dark); }
.secondary:hover { background: var(--blue-pale); }
.summary-grid { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 14px; margin-bottom: 17px; }
.summary-card, .panel { background: white; border: 1px solid var(--edge); border-radius: 12px; box-shadow: 0 2px 6px #1b34570a; min-width: 0; }
.summary-card { display: grid; gap: .4rem; align-content: start; padding: clamp(15px, 2.3vw, 26px); }
.summary-card strong { font-size: clamp(1.38rem, 3vw, 2.6rem); font-weight: 730; letter-spacing: -.052em; line-height: 1.08; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.summary-card > span { font-size: .91rem; font-weight: 650; }
.summary-card small { font-size: .79rem; }
.featured { background: #1843a1; color: white; border-color: #1843a1; }
.featured small { color: #d9e5ff; }
.notice { display: flex; flex-wrap: wrap; gap: .45rem 1rem; align-items: center; border: 1px solid #ebd1a1; background: #fff7e7; color: #6f4710; font-size: .88rem; border-radius: 8px; padding: .78rem 1rem; margin: 0 0 17px; }
.success { color: #1c603a; background: #ecf8f0; border-color: #b9ddc6; }
.error { color: #85202a; background: #fcecef; border-color: #ebc2c6; }
.panel { margin-bottom: 18px; }
.panel-heading { padding: 20px 23px; flex-wrap: wrap; }
.panel-heading p, .panel-note { font-size: .88rem; line-height: 1.45; }
.panel-heading p { margin-top: .35rem; }
.panel-note { padding: 15px 23px; }
.table-area { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { text-align: left; padding: .9rem 1.15rem; border-bottom: 1px solid var(--edge); vertical-align: top; }
thead th { font-size: .76rem; font-weight: 650; background: #f5f7fb; color: #3f4f67; white-space: nowrap; }
tbody th, tfoot th { font-weight: 640; }
tfoot td, tfoot th { background: #fafbfd; }
.number { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.result { font-weight: 750; }
.negative { color: var(--negative); }
.trend { display: grid; list-style: none; padding: 0 23px 20px; margin: 0; gap: .8rem; }
.trend li { display: grid; grid-template-columns: minmax(116px, 1fr) minmax(60px, 3fr) minmax(92px, .9fr); align-items: center; gap: .9rem; font-size: .88rem; }
.trend a { font-weight: 600; }
.trend meter { display: block; width: 100%; height: .7rem; border: 0; }
.trend meter::-webkit-meter-bar { border: none; border-radius: 2px; background: #e6edf7; }
.trend .gain::-webkit-meter-optimum-value { border-radius: 2px; background: #3a65c9; }
.trend .loss::-webkit-meter-optimum-value { border-radius: 2px; background: #a94a58; }
.trend .gain::-moz-meter-bar { background: #3a65c9; }
.trend .loss::-moz-meter-bar { background: #a94a58; }
.empty { padding: 25px; }
.empty p { margin-block: .55rem 1.1rem; line-height: 1.45; color: var(--muted); }
.review-filters { padding: 20px 23px; display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.review-filters > div { display: grid; gap: .33rem; }
.review-filters .button { min-height: 39px; }
.review-table th span, .review-table th small { display: block; font-weight: 400; }
.review-table th span { margin-top: .28rem; }
.review-table th small { margin-top: .38rem; }
.review-table .date-cell { white-space: nowrap; }
.assignment { display: flex; gap: .4rem; margin-bottom: .23rem; }
.assignment select { width: min(100%, 260px); }
.sign-out { margin: 1.5rem .8rem 0; }
.job-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 1rem; }
.job-card { padding: 1.1rem; display: grid; align-content: start; gap: .55rem; }
.job-card p { line-height: 1.4; }
.job-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; }
.job-reference { font-size: .83rem; font-weight: 700; }
.job-time { font-weight: 650; }
.job-action { display: flex; flex-wrap: wrap; align-items: end; gap: .55rem; margin-top: .36rem; }
.job-action label { display: grid; gap: .25rem; }
.job-proposal { border-top: 1px solid var(--edge); padding-top: .62rem; }
.job-proposal p { margin-bottom: .5rem; }
.job-form-panel { max-width: 720px; padding: clamp(16px, 4vw, 26px); }
.job-form { display: grid; gap: .8rem; }
.job-form label { display: grid; gap: .28rem; }
.job-form input:not([type="checkbox"]), .job-form textarea, .job-action input {
    font: inherit; color: inherit; background: white; border: 1px solid #bcc9d8; border-radius: 6px; padding: .52rem .64rem; min-width: 0;
}
.job-form-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: .7rem; }
.job-form label.job-check { display: flex; align-items: center; gap: .4rem; }
.job-form button { justify-self: start; }
.split-options { margin-top: .45rem; }
.split-options summary { color: var(--blue-dark); cursor: pointer; font-size: .8rem; }
.split-form { display: grid; gap: .55rem; justify-items: start; margin: .65rem 0; }
.split-form label { display: grid; gap: .2rem; width: 100%; }
.split-form input { width: 100%; min-width: 0; padding: .4rem .6rem; border: 1px solid #bcc9d8; border-radius: 6px; }
.split-form input[type="number"] { width: 5rem; }
.job-match { display: block; margin-top: .45rem; line-height: 1.35; }
.paging { color: var(--muted); padding: 16px 23px; font-size: .85rem; }
.history-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.import-form { padding: 0 23px; display: grid; gap: 1rem; justify-items: start; }
.import-form > div { width: 100%; display: grid; gap: .32rem; }
.import-form .subtle { font-size: .8rem; font-weight: 400; padding-left: .2rem; }
.sources { padding: 0 23px 0 40px; color: var(--muted); font-size: .8rem; line-height: 1.5; }
@media (max-width: 970px) {
    body { grid-template-columns: 167px minmax(0, 1fr); }
    .rail { padding-inline: 9px; }
    .brand { font-size: 1rem; }
    .history-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
    body { display: block; }
    .rail { padding: 12px; }
    .brand { margin-bottom: .65rem; }
    .rail nav { display: flex; flex-wrap: wrap; }
    .rail nav a { font-size: .82rem; padding: .54rem .65rem; }
    .workspace { padding: 24px 12px 32px; }
    .summary-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .featured { grid-column: 1 / -1; }
    .panel-heading, .panel-note, .paging, .review-filters, .trend { padding-left: 12px; padding-right: 12px; }
    th, td { padding: .72rem .66rem; }
    .review-table th { min-width: 180px; }
    .assignment select { min-width: 140px; }
    .trend li { grid-template-columns: minmax(90px, 1fr) minmax(50px, 1.1fr) minmax(72px, 1fr); gap: .5rem; }
}
.section-status { background: #f5f7fb; color: #34445b; border-top: 1px solid var(--edge); }
