:root{--ink:#253a3b;--muted:#768181;--canvas:#f5f6f3;--paper:#fff;--line:#e4e8e2;--teal:#1c6659;--amber:#956327;--sidebar:#203332}*{box-sizing:border-box}body{margin:0;font-family:Segoe UI,Arial,sans-serif;color:var(--ink);background:var(--canvas);font-size:14px;line-height:1.55}a{color:inherit;text-decoration:none}button,input,select,textarea{font:inherit}button,a,input,select,textarea,summary{outline-offset:4px}button{cursor:pointer}h1,h2,h3,p{margin-top:0}h1{font-size:32px;letter-spacing:-1.1px;line-height:1.25;margin-bottom:10px;font-weight:650}h2{font-size:18px;letter-spacing:-.25px;font-weight:650;margin-bottom:16px}h3{font-size:16px;margin-bottom:6px;font-weight:600}p{color:#6e7c7b}small{font-size:12px;color:var(--muted)}.sidebar{width:238px;background:var(--sidebar);position:fixed;inset:0 auto 0 0;color:#d0dcd7;padding:34px 22px;display:flex;flex-direction:column;z-index:10}.brand{display:flex;gap:12px;align-items:center;font-size:14px;font-weight:700;letter-spacing:1.7px;margin-bottom:58px}.brand-symbol{font-size:33px;letter-spacing:-5px;color:#eaf3d8;width:42px;line-height:1}.brand-symbol span{color:#e7b26c}.brand small{display:block;font-size:8px;letter-spacing:2px;margin-top:4px;color:#829c94}.nav-label{font-size:9px;letter-spacing:1.7px;color:#7e9690;margin-bottom:14px;padding-left:14px}.sidebar nav a{display:flex;align-items:center;gap:14px;padding:13px 15px;border-radius:7px;margin-bottom:7px;color:#b1c1bb}.sidebar nav a span{font-size:20px;line-height:1}.sidebar nav a:hover{background:#2d4641}.sidebar nav a.active{color:#e9f5e2;background:#35524a;box-shadow:inset 3px 0 #b5cb83}.sidebar-note{margin-top:auto;padding:24px 12px 26px;font-size:12px;border-bottom:1px solid #38504a}.sidebar-note i{display:inline-block;width:6px;height:6px;background:#bbcd87;border-radius:100%;margin-right:7px}.sidebar-note small{display:block;margin:10px 0 0 14px;color:#819a91;font-size:11px}.profile{display:flex;gap:10px;align-items:center;padding-top:22px;font-size:11px}.profile small{display:block;font-size:10px;margin-top:3px;color:#8aa097}.avatar{background:#3c554c;color:#d6e7c2;padding:9px;border-radius:50%;font-size:11px}.workspace{margin-left:238px}.topbar{height:76px;background:#fff;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;padding:0 42px;font-size:12px;color:#71817c}.topbar b{font-weight:400;margin:0 14px;color:#c7cfca}.topbar>div{display:flex;gap:20px;align-items:center}.topbar form{margin:0}.local-tag{color:#677a6a;font-size:9px;border:1px solid #d8e0d1;border-radius:4px;padding:3px 7px;letter-spacing:1px}.text-button{background:none;border:0;padding:0;color:#7b8985;font-size:11px}main{max-width:1660px;margin:0 auto;padding:36px 42px 60px;min-height:calc(100vh - 138px)}.eyebrow{font-size:10px;font-weight:600;letter-spacing:1.9px;color:#789381;margin-bottom:11px}.page-heading{display:flex;align-items:center;justify-content:space-between;gap:22px;margin-bottom:26px}.page-heading p{margin-bottom:0;font-size:13px}.button{display:inline-flex;align-items:center;justify-content:center;gap:8px;background:var(--teal);border:1px solid var(--teal);border-radius:6px;color:white;padding:11px 18px;font-size:12px;font-weight:600;white-space:nowrap;line-height:1.5}.button:hover{filter:brightness(.95)}.button.secondary{background:white;border-color:#dce2da;color:var(--ink)}.button.small{font-size:11px;padding:8px 12px}.scope{display:inline-flex;gap:5px;padding:4px;background:#e9ede5;border-radius:7px;margin-bottom:22px}.scope a{font-size:12px;padding:8px 17px;border-radius:5px;color:#74806f}.scope .selected{background:#fff;color:#334b3d;box-shadow:0 1px 5px #263a2510}.scope b{font-size:10px;font-weight:500;background:#eef1e8;padding:1px 5px;border-radius:4px;margin-left:7px}.notice{background:#f6efdf;border:1px solid #ebdfc4;border-radius:6px;padding:13px 17px;color:#846531;font-size:12px;margin-bottom:23px;line-height:1.7}.notice strong{font-weight:650}.notice.blue{color:#546f77;background:#edf3f3;border-color:#dde8e6}.metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:30px}.metric{background:white;border:1px solid var(--line);border-radius:8px;padding:23px 21px;min-height:133px}.metric>span{font-size:11px;color:#6b7c75;display:block;margin-bottom:13px}.metric strong{display:block;font-weight:600;letter-spacing:-.9px;font-size:25px;white-space:nowrap}.metric strong small{font-weight:400;letter-spacing:0;font-size:13px;color:#809086}.metric>small{font-size:10px;display:block;margin-top:9px}.metric.accent{background:#eef1e7;border-color:#dde4d4}.metric .unknown{font-size:24px;line-height:1.5}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:17px}.section-heading h2,.section-heading h3{margin:0}.section-heading h2 span{font-size:11px;padding:2px 7px;border:1px solid #dae1d7;border-radius:5px;margin-left:7px;color:#8b9586}.section-heading p{margin:5px 0 0}.project-card{background:white;border:1px solid var(--line);border-radius:8px;padding:25px;display:flex;align-items:center;gap:22px;margin-bottom:14px;transition:border-color .15s,transform .15s}.project-card:hover{border-color:#94ae8e;transform:translateY(-1px)}.project-mark{font-size:13px;font-weight:650;letter-spacing:1px;color:#677e63;background:#eff2e8;min-width:64px;padding:21px 9px;text-align:center;border-radius:7px}.project-main{flex:1;min-width:0}.card-title{display:flex;gap:13px;align-items:center;flex-wrap:wrap}.card-title h3{margin:0;font-size:17px}.badge{display:inline-block;font-size:10px;font-weight:500;padding:4px 8px;border-radius:4px;line-height:1.35;white-space:normal}.badge.amber{background:#faf0db;color:#966d28}.badge.green{background:#eaf2e3;color:#577b42}.badge.muted{background:#f0f2ed;color:#83907c}.badge.blue{background:#eaf1f4;color:#547580}.badge.red{background:#fbe9e3;color:#b26551}.project-main p{font-size:12px;margin:7px 0 12px}.project-meta{font-size:10px;color:#8e998b}.project-meta span{margin:0 8px;color:#b1b8aa}.project-amount{text-align:right}.project-amount small{display:block;font-size:10px;margin-bottom:6px}.project-amount strong{display:block;font-size:19px;letter-spacing:-.4px}.project-amount>span{font-size:10px;display:block;color:#6c8560;margin-top:12px}.panel{padding:25px;background:#fff;border:1px solid var(--line);border-radius:8px;margin-bottom:22px;min-width:0}.bottom-grid{display:grid;grid-template-columns:1.3fr 1fr;gap:22px;margin-top:30px}.quiet{background:#edf0e7}.quiet h2{font-size:25px;line-height:1.4;letter-spacing:-.6px;margin:10px 0}.quiet p{max-width:350px;font-size:12px;line-height:1.9}.inline-link{color:#46715e;font-size:12px;font-weight:500}.workflow{list-style:none;padding:0;margin:0}.workflow li{display:flex;align-items:center;gap:16px;padding:14px 0;border-bottom:1px solid #f0f2ed;font-size:13px}.workflow li:last-child{border-bottom:0}.workflow b{color:#9baf8e;font-size:10px;background:#f0f4ea;border-radius:50%;padding:9px}.workflow small{display:block;font-size:11px;margin-top:3px}.two-col{display:grid;grid-template-columns:1.2fr 1fr;gap:22px}.component-row{display:flex;align-items:center;gap:13px;padding:18px 0;border-bottom:1px solid #eef1e9}.component-row>div{flex:1;min-width:0}.component-row h3{font-size:13px;margin:0}.component-row small{font-size:10px;display:block;max-width:300px}.component-row strong{font-size:13px;white-space:nowrap}.component-icon{padding:7px 10px;background:#f0f3eb;border-radius:5px;color:#759165}.totals{margin:5px 0 20px}.totals>div{display:flex;justify-content:space-between;gap:15px;padding:12px 0;border-bottom:1px solid #edf0e9;font-size:12px}.totals dt{color:#7b8977}.totals dd{margin:0;text-align:right;font-weight:600}.totals .sum{margin-top:10px;border:0;font-size:14px}.hint{font-size:11px;color:#86917f;line-height:1.8;margin:13px 0 0}.result{display:flex;justify-content:space-between;background:#eff5e9;padding:12px;border-radius:4px;font-size:12px}.tabs{display:flex;gap:22px;border-bottom:1px solid #dde4d9;margin-bottom:28px;overflow-x:auto;white-space:nowrap}.tabs a{font-size:12px;padding:13px 0 15px;color:#83907d;border-bottom:2px solid transparent}.tabs a.selected{color:#2d6351;border-bottom-color:#3c7357;font-weight:600}.breadcrumb{font-size:11px;color:#84927b;display:block;margin-bottom:20px}.dot{padding:0 8px}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;font-size:12px}th{text-align:left;color:#86917c;font-size:10px;font-weight:500;background:#f8faf5;white-space:nowrap;padding:13px 15px;border-bottom:1px solid var(--line)}td{padding:16px 15px;border-bottom:1px solid #eef1e9;vertical-align:top}td small{display:block;font-size:10px;max-width:380px;margin-top:6px}td p{font-size:11px;line-height:1.8;margin:10px 0}.table-panel{padding:0;overflow:hidden}.table-panel tr:last-child td{border-bottom:0}.number{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}.mono{font:11px Consolas,monospace;color:#8a987d}.source-link{font-size:11px;color:#718567;cursor:pointer;max-width:280px;word-break:break-word}details{min-width:0}.issue{border-bottom:1px solid #edf0e8;padding:15px 0}.issue summary{list-style:none;cursor:pointer;font-size:12px;display:flex;gap:16px;align-items:center}.issue summary>span{font:10px Consolas,monospace;color:#9ca68e}.issue summary>b{margin-left:auto;color:#b4bea8;font-weight:400}.issue p,.issue>small{font-size:12px;margin:12px 0 0;padding-left:40px}.issue:last-child{border-bottom:0}.empty{padding:38px;text-align:center;color:#8c9881;font-size:12px}.empty h3{color:#5c7556}.upload-box{border:1px dashed #bccab0;padding:22px;background:#f0f4e9;border-radius:8px;margin-bottom:25px}.upload-box form{display:flex;gap:20px;align-items:center}.upload-box form>div{flex:1}.upload-box strong{font-size:13px;display:block}.upload-box small{font-size:10px}.upload-box input{max-width:300px;font-size:11px}.document-grid{display:grid;grid-template-columns:1.15fr 1fr;gap:24px}.original-panel iframe{width:100%;height:680px;border:1px solid #dce3d7;border-radius:4px;background:#f7f8f4}.file-heading{font-size:23px;max-width:800px;overflow-wrap:anywhere}.checksum{font-size:9px;color:#98a18d;margin-top:14px}.checksum code{display:block;font:9px Consolas,monospace;word-break:break-all;margin-top:5px}.office-preview{padding:70px 30px;text-align:center;background:#f5f7f0;border-radius:5px}.office-preview>span{font-size:45px;color:#a3b396}.office-preview h3{font-size:13px;margin:15px 0;overflow-wrap:anywhere}.office-preview p{font-size:12px}.record-form{display:grid;grid-template-columns:1fr 1fr;gap:16px 22px}.record-form.single-column,.stack-form{display:flex;flex-direction:column;gap:15px}.record-form label,.stack-form label{display:block;color:#65755d;font-size:11px;margin-bottom:6px}.record-form p{margin:0}.record-form input:not([type=checkbox]),.record-form select,.record-form textarea,.stack-form input{width:100%;padding:10px 12px;background:#fcfdf9;border:1px solid #dbe3d3;border-radius:5px;color:#354c32;font-size:12px;min-width:0}.record-form textarea{resize:vertical;min-height:72px}.record-form input[type=checkbox]{accent-color:var(--teal)}.record-form .errorlist{margin:4px 0;font-size:11px;color:#ab5e48;padding-left:16px}.record-form>.errorlist{grid-column:1/-1}.record-form .form-actions{grid-column:1/-1}.form-actions{display:flex;gap:10px;margin-top:10px}.form-panel{max-width:900px}.add-section{margin-top:18px}.add-section>summary{color:#547b45;font-size:12px;cursor:pointer;margin-bottom:15px}.messages{margin-bottom:20px}.message{font-size:12px;padding:13px 18px;border-radius:5px;background:#eaf2e1;color:#4f753c;margin-bottom:10px}.message.error{background:#f9e9e2;color:#a45b47}.audit-row{display:flex;gap:20px;padding:20px 0;border-bottom:1px solid #ecf1e5}.audit-dot{width:8px;height:8px;border-radius:50%;background:#96b481;flex:none;margin-top:7px}.audit-row h3{font-size:13px}.audit-row p{font-size:11px;margin:4px 0}.audit-row pre{font-size:10px;white-space:pre-wrap;overflow-wrap:anywhere;color:#859379;max-width:900px}.trip-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:15px;margin:22px 0}.trip-grid small{display:block;font-size:10px}.trip-grid strong{font-size:14px;display:block;margin-top:7px}.receipt-row{display:flex;align-items:baseline;gap:25px;padding:14px 0}.receipt-row p{font-size:11px;margin:0;flex:1}.receipt-row span{font-size:11px;color:#97a08e}.pagination{display:flex;justify-content:center;gap:30px;font-size:12px;padding:20px;border-top:1px solid var(--line)}.pagination a{color:#4f7852}footer{border-top:1px solid var(--line);padding:20px 42px;font-size:9px;letter-spacing:1.5px;color:#96a08c;display:flex;justify-content:space-between}footer span{letter-spacing:0}.login-page{min-height:100vh;display:grid;place-items:center;background:#203b34}.login-card{background:#f9fbf3;border-radius:12px;padding:55px;max-width:550px;margin:25px;box-shadow:0 15px 90px #12241d55}.login-card h1{font-size:32px}.login-card p{font-size:13px;line-height:1.8}.login-card .button{margin:15px 0 25px}.login-card>small{display:block;font-size:10px;line-height:1.8}
@media(min-width:1600px){.metrics .metric strong{font-size:29px}}@media(max-width:1250px){.sidebar{width:195px;padding:30px 16px}.workspace{margin-left:195px}main{padding:30px 26px}.topbar{padding:0 26px}.metrics{gap:10px}.metric{padding:18px 14px}.metric strong{font-size:20px}.card-title{gap:8px}.project-card{padding:20px;gap:15px}.two-col{grid-template-columns:1fr}.document-grid{grid-template-columns:1fr 1fr}.brand{letter-spacing:1px;font-size:12px}.brand small{font-size:7px}.tabs{gap:18px}.trip-grid{grid-template-columns:1fr 1fr}}@media(max-width:900px){.sidebar{width:72px;padding:26px 10px;align-items:center}.brand>span:last-child,.nav-label,.sidebar-note,.profile{display:none}.brand{margin-bottom:38px}.brand-symbol{font-size:28px;width:38px}.sidebar nav a{font-size:0;gap:0;padding:14px}.sidebar nav a span{font-size:22px}.workspace{margin-left:72px}.metrics{grid-template-columns:1fr 1fr}.bottom-grid,.document-grid{grid-template-columns:1fr}.upload-box form{flex-wrap:wrap}.upload-box form>div{flex-basis:100%}.page-heading{align-items:flex-start}.date{display:none}.project-mark{display:none}.project-amount strong{font-size:17px}.topbar{height:62px}.topbar>div{gap:10px}.record-form{grid-template-columns:1fr}}@media(max-width:560px){main{padding:24px 16px}.topbar{padding:0 16px;font-size:10px}.topbar b{margin:0 6px}.local-tag{display:none}.page-heading{flex-direction:column;gap:15px;margin-bottom:20px}h1{font-size:26px}.metrics{gap:9px}.metric{padding:16px 12px;min-height:118px}.metric strong{font-size:19px}.metric .unknown{font-size:19px}.metric strong small{font-size:10px}.metric>small{font-size:9px}.project-card{display:block;padding:20px}.project-amount{text-align:left;border-top:1px solid #edf0e6;margin-top:17px;padding-top:13px}.project-amount>span{display:none}.card-title h3{font-size:16px}.project-meta{font-size:9px}.section-heading{align-items:flex-start}.section-heading>small{display:none}.panel{padding:19px}.table-panel{padding:0}.component-row{flex-wrap:wrap}.component-row strong{margin-left:43px}.topbar .text-button{font-size:10px}.tabs{gap:20px}.badge{font-size:9px}.totals>div{font-size:11px}footer{padding:18px;font-size:8px}footer span{max-width:180px;text-align:right}.trip-grid{grid-template-columns:1fr}.receipt-row{flex-wrap:wrap;gap:8px 20px}.receipt-row p{flex-basis:100%}.form-actions{flex-wrap:wrap}.login-card{padding:32px}.original-panel iframe{height:440px}.scope a{font-size:11px;padding:7px 12px}}

.pdf-page{width:100%;height:auto;display:block;border:1px solid #dfe4db;background:#fff}.pdf-pagination{display:flex;gap:18px;justify-content:center;padding:12px;font-size:11px;color:#6c815f}

.execution-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:16px}.execution-grid small{display:block;font-size:10px}.execution-grid strong{font-size:12px;display:block;margin-top:8px}.search-form{display:flex;gap:10px;margin-bottom:18px}.search-form input{max-width:450px;flex:1;border:1px solid #dbe3d3;padding:10px 13px;border-radius:5px;background:white;font-size:12px;min-width:0}@media(max-width:750px){.execution-grid{grid-template-columns:1fr 1fr}}

@media(max-width:480px){.sidebar{width:56px;padding-left:5px;padding-right:5px}.workspace{margin-left:56px}.metrics{grid-template-columns:minmax(0,1fr)}.metric{min-height:116px;padding:18px}.metric strong{font-size:25px}.metric .unknown{font-size:22px}.metric>small{font-size:10px}.topbar>span{max-width:210px}.section-heading h2{font-size:16px}.section-heading .badge{max-width:90px}.scope{max-width:100%;gap:2px}.scope a{padding:7px 10px}.workflow{overflow-wrap:anywhere}}

.cancelled-row{opacity:.57}.cancelled-row td:first-child{text-decoration:line-through}
.reading-panel { margin-top: 24px; }
.search-form { flex-wrap: wrap; }
.search-form input { flex: 1 1 220px; }
.search-form .button { flex: 0 0 auto; }
.document-fields > div { align-items: flex-start; }
.document-fields dt { flex: 0 1 38%; }
.document-fields dd { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.reading-versions { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.reading-cell { max-width: 480px; white-space: pre-wrap; overflow-wrap: anywhere; }
.reading-text { white-space: pre-wrap; overflow-wrap: anywhere; font-family: inherit; line-height: 1.6; }
.reading-table-row { display: flex; overflow-x: auto; border-bottom: 1px solid #dde3eb; }
.reading-table-row > div { flex: 1 0 120px; padding: 8px; border-right: 1px solid #dde3eb; }

.read-only form[method="post"]:not(.account-safe){display:none}.read-only .add-section{display:none}.actions{display:flex;flex-wrap:wrap;gap:10px}.login-card details>summary{cursor:pointer;color:#546f77}.login-card .record-form input{max-width:100%}

.read-only a[href*="/new/"],.read-only a[href*="/edit/"],.read-only a[href*="/accounting/"],.read-only a[href*="/execution/"]{display:none}

/* Corporate palette from activcargo.ru and the selected design preview. */
:root {
  color-scheme: light;
  --ink: #1c2941;
  --muted: #56647b;
  --canvas: #f3f1e9;
  --paper: #fff;
  --line: #dbe2ed;
  --teal: #112764;
  --amber: #785322;
  --sidebar: #112764;
  --brand-blue: #074267;
  --sand: #ba9563;
  --soft: #f2f5fa;
  --sidebar-text: #f3f6ff;
  --sidebar-muted: #c7d3ee;
  --warning-bg: #faf2e5;
  --success-bg: #e8f3ee;
  --success-ink: #246148;
  --error-bg: #fbeeed;
  --error-ink: #9b3c35;
}

body { font: 14px/1.6 "Segoe UI", Arial, sans-serif; }
h1 { font-size: 32px; line-height: 1.25; letter-spacing: -.8px; font-weight: 650; }
h2 { font-size: 19px; line-height: 1.45; letter-spacing: -.25px; }
h3 { line-height: 1.5; }
p, small, .hint { color: var(--muted); }
small { font-size: 12px; }
a, button, input, select, textarea, summary { outline-offset: 4px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--brand-blue); }
.sidebar a:focus-visible { outline-color: var(--sand); }
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 30; padding: 10px 16px; background: var(--paper); color: var(--sidebar); border: 2px solid var(--sidebar); border-radius: 8px; }
.skip-link:focus { top: 12px; }
.sidebar { width: 228px; padding: 28px 16px 22px; color: var(--sidebar-text); overflow-y: auto; }
.brand { gap: 11px; font-size: 14px; letter-spacing: 1.05px; margin-bottom: 34px; }
.brand-symbol { display: grid; place-items: center; flex: 0 0 37px; width: 37px; height: 37px; font-size: 14px; letter-spacing: .5px; line-height: 1; color: var(--sand); border: 1px solid var(--sand); border-radius: 9px; }
.brand > span:last-child { display: block; }
.brand small { margin-top: 5px; color: var(--sidebar-muted); font-size: 10px; letter-spacing: 1.1px; }
.nav-label { font-size: 10px; letter-spacing: 1px; color: var(--sidebar-muted); padding-left: 12px; margin-bottom: 12px; }
.sidebar nav { display: grid; gap: 6px; }
.sidebar nav a { gap: 12px; padding: 12px; margin: 0; border-radius: 8px; color: var(--sidebar-text); font-size: 14px; min-height: 46px; }
.sidebar nav a .nav-text { font-size: 14px; line-height: 1.35; }
.nav-icon { width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sidebar nav a:hover { background: #ffffff10; }
.sidebar nav a.active { color: var(--sidebar-text); background: #ffffff17; box-shadow: inset 3px 0 var(--sand); }
.sidebar-note { padding: 24px 10px 20px; border-color: #ffffff26; font-size: 12px; }
.sidebar-note i { background: var(--sand); }
.sidebar-note small { margin: 9px 0 0 13px; font-size: 12px; color: var(--sidebar-muted); line-height: 1.65; }
.profile { padding: 20px 8px 0; gap: 10px; font-size: 13px; overflow-wrap: anywhere; }
.profile small { font-size: 12px; color: var(--sidebar-muted); }
.avatar { color: var(--sand); background: #ffffff12; border-radius: 9px; padding: 9px; font-size: 12px; }
.workspace { margin-left: 228px; min-width: 0; }
.topbar { height: 72px; padding: 0 32px; color: var(--muted); font-size: 12px; gap: 16px; }
.topbar > span { min-width: 0; overflow-wrap: anywhere; }
.topbar > div { gap: 18px; flex-shrink: 0; }
.topbar b { color: #a0adc3; margin: 0 12px; }
.local-tag { color: var(--brand-blue); font-size: 10px; letter-spacing: .65px; border-color: var(--line); border-radius: 5px; padding: 4px 8px; }
.text-button, .topbar .text-button { font-size: 12px; color: var(--muted); min-height: 36px; }
.text-button:hover { color: var(--sidebar); text-decoration: underline; }
main { max-width: 1580px; padding: 32px 32px 48px; min-height: calc(100vh - 142px); }
.eyebrow { color: var(--muted); font-size: 11px; letter-spacing: 1.3px; }
.page-heading { gap: 18px; flex-wrap: wrap; margin-bottom: 26px; }
.page-heading > div { flex: 1 1 340px; min-width: 0; }
.page-heading p { font-size: 14px; }
.button { background: var(--sidebar); border-color: var(--sidebar); border-radius: 8px; font-size: 13px; padding: 10px 16px; min-height: 42px; white-space: normal; text-align: center; }
.button:hover { filter: none; background: #1c3c80; border-color: #1c3c80; }
.button.secondary { background: var(--paper); color: var(--sidebar); border-color: var(--line); }
.button.secondary:hover { background: var(--soft); border-color: #aebed6; }
.button.small { min-height: 36px; font-size: 12px; padding: 7px 12px; }
.button:disabled { cursor: wait; opacity: .6; }
.actions, .form-actions { gap: 10px; flex-wrap: wrap; }
.scope { background: #e6eaf2; border-radius: 8px; gap: 4px; }
.scope a { color: var(--muted); font-size: 13px; padding: 8px 14px; }
.scope .selected { color: var(--sidebar); box-shadow: 0 1px 4px #1127640d; }
.scope b { color: var(--muted); background: var(--soft); font-size: 12px; }
.notice { background: var(--warning-bg); color: var(--amber); border-color: #e9d9bf; border-left: 3px solid var(--sand); border-radius: 8px; font-size: 13px; line-height: 1.75; padding: 13px 16px; }
.notice.blue { background: #edf4fa; color: var(--brand-blue); border-color: #d0e1ee; border-left-color: #7eb4d6; }
.notice a { text-decoration: underline; text-underline-offset: 3px; }
.metrics { gap: 14px; margin-bottom: 26px; }
.metric { border-radius: 11px; padding: 20px; min-height: 136px; }
.metric > span { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.metric strong, .metrics .metric strong { font-size: clamp(21px, 1.8vw, 28px); letter-spacing: -.65px; font-weight: 600; white-space: normal; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; line-height: 1.4; }
.metric strong small { font-size: 13px; color: var(--muted); }
.metric > small { font-size: 12px; margin-top: 8px; }
.metric.accent { background: var(--soft); border-color: var(--line); }
.metric .unknown { font-size: 23px; }
.section-heading { gap: 14px; flex-wrap: wrap; }
.section-heading h2 { font-size: 19px; }
.section-heading h2 span { color: var(--muted); border-color: var(--line); font-size: 12px; }
.panel { border-radius: 11px; padding: 24px; margin-bottom: 22px; }
.table-panel { padding: 0; overflow: hidden; }
.project-card { border-radius: 11px; padding: 23px; gap: 20px; }
.project-card:hover { border-color: #9daece; box-shadow: 0 3px 14px #11276408; }
.project-mark { background: var(--soft); color: var(--sidebar); font-size: 13px; border-radius: 9px; overflow-wrap: anywhere; }
.project-main p { color: var(--muted); font-size: 13px; }
.card-title h3 { font-size: 17px; }
.project-meta, .project-meta span { color: var(--muted); font-size: 12px; }
.project-amount small, .project-amount > span { color: var(--muted); font-size: 12px; }
.project-amount strong { color: var(--ink); font-size: 21px; font-variant-numeric: tabular-nums; }
.badge { padding: 4px 8px; font-size: 12px; border-radius: 5px; line-height: 1.5; }
.badge.amber { background: var(--warning-bg); color: var(--amber); }
.badge.green { background: var(--success-bg); color: var(--success-ink); }
.badge.muted { background: var(--soft); color: var(--muted); }
.badge.blue { background: #edf4fa; color: var(--brand-blue); }
.badge.red { background: var(--error-bg); color: var(--error-ink); }
.bottom-grid, .two-col { gap: 22px; }
.quiet { background: var(--soft); }
.quiet p { max-width: 460px; font-size: 13px; }
.inline-link { color: var(--brand-blue); font-size: 13px; }
.inline-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.workflow li { border-color: var(--line); font-size: 14px; padding: 15px 0; }
.workflow b { color: var(--sidebar); background: var(--soft); font-size: 12px; border-radius: 8px; }
.workflow small { font-size: 12px; }
.component-row, .totals > div, td, .issue, .audit-row { border-color: var(--line); }
.component-row h3, .component-row strong { font-size: 14px; }
.component-row small { font-size: 12px; }
.component-icon { background: var(--soft); color: var(--brand-blue); border-radius: 6px; }
.totals > div { font-size: 13px; padding: 13px 0; }
.totals dt { color: var(--muted); }
.totals dd { font-weight: 500; }
.totals .sum { font-size: 15px; }
.hint { font-size: 12px; line-height: 1.8; }
.result { background: var(--soft); color: var(--ink); border-radius: 6px; font-size: 13px; gap: 12px; }
.tabs { gap: 0 20px; flex-wrap: wrap; overflow: visible; white-space: normal; border-color: var(--line); margin-bottom: 26px; }
.tabs a { font-size: 13px; color: var(--muted); padding: 12px 0; min-height: 44px; }
.tabs a:hover { color: var(--sidebar); }
.tabs a.selected { color: var(--sidebar); border-bottom-color: var(--sidebar); }
.breadcrumb { color: var(--muted); font-size: 12px; }
.breadcrumb:hover { color: var(--sidebar); }
.table-wrap { max-width: 100%; min-width: 0; overscroll-behavior-x: contain; }
table { font-size: 13px; }
th { color: var(--muted); background: var(--soft); font-size: 12px; font-weight: 500; padding: 13px 14px; }
td { padding: 16px 14px; }
td small, td p { font-size: 12px; color: var(--muted); }
.mono, .source-link { font-size: 12px; color: var(--brand-blue); }
.issue summary { font-size: 13px; flex-wrap: wrap; gap: 12px; }
.issue summary > span, .issue summary > b { color: var(--muted); font-size: 12px; }
.issue p, .issue > small { font-size: 13px; padding-left: 0; }
.empty { font-size: 13px; color: var(--muted); padding: 32px 22px; }
.empty h3 { color: var(--ink); }
.upload-box { background: var(--soft); border-color: #aebed6; border-radius: 10px; }
.upload-box strong { font-size: 14px; }
.upload-box small, .upload-box input { font-size: 12px; }
.upload-box input { max-width: 100%; }
.document-grid { gap: 22px; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.file-heading { max-width: 100%; font-size: 28px; }
.original-panel iframe, .pdf-page { border-color: var(--line); border-radius: 6px; background: var(--paper); }
.pdf-pagination { color: var(--brand-blue); font-size: 13px; gap: 16px; flex-wrap: wrap; }
.checksum, .checksum code { color: var(--muted); font-size: 11px; }
.office-preview { background: var(--soft); border-radius: 8px; padding: 50px 24px; }
.office-preview > span { color: var(--brand-blue); }
.office-preview h3 { font-size: 14px; }
.office-preview p { font-size: 13px; }
.record-form label, .stack-form label { color: var(--ink); font-size: 13px; }
.record-form input:not([type=checkbox]), .record-form select, .record-form textarea,
.stack-form input, .search-form input { color: var(--ink); background: var(--paper); border-color: #becadd; border-radius: 7px; font-size: 14px; padding: 10px 12px; min-height: 42px; }
.record-form .errorlist, .errorlist { color: var(--error-ink); font-size: 13px; }
.add-section > summary { color: var(--brand-blue); font-size: 13px; }
.message { background: var(--success-bg); color: var(--success-ink); border-radius: 8px; font-size: 13px; }
.message.error { background: var(--error-bg); color: var(--error-ink); }
.audit-dot { background: var(--sand); }
.audit-row h3 { font-size: 14px; }
.audit-row p, .audit-row pre { color: var(--muted); font-size: 12px; }
.trip-grid small, .execution-grid small, .receipt-row p, .receipt-row span { color: var(--muted); font-size: 12px; }
.trip-grid strong, .execution-grid strong { font-size: 14px; }
.pagination { color: var(--muted); font-size: 13px; gap: 22px; flex-wrap: wrap; }
.pagination a { color: var(--brand-blue); }
.document-fields dd { font-weight: 500; }
footer { padding: 22px 32px; color: var(--muted); font-size: 11px; letter-spacing: 1px; background: var(--paper); gap: 16px; }
footer span { font-size: 12px; }
.login-page { background: var(--sidebar); padding: 24px; }
.login-card { background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--sand); border-radius: 14px; padding: 38px; margin: 0; width: min(100%, 500px); box-shadow: 0 18px 60px #0a163333; }
.login-brand { color: var(--sidebar); margin-bottom: 28px; }
.login-brand small { color: var(--muted); }
.login-card h1 { font-size: 30px; }
.login-card p { font-size: 14px; }
.login-card .button { margin: 8px 0 20px; }
.login-card details > summary { color: var(--brand-blue); font-size: 13px; }
.login-card > small, .login-card details small { font-size: 12px; }

@media (min-width: 1600px) { .metrics .metric strong { font-size: 28px; } }
@media (max-width: 1300px) {
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric { min-height: 122px; padding: 18px; }
  .two-col { grid-template-columns: minmax(0, 1fr); }
  .trip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .document-grid, .bottom-grid { grid-template-columns: minmax(0, 1fr); }
  main { padding: 26px; }
  .topbar { padding: 0 26px; }
}
@media (max-width: 900px) {
  .sidebar { position: static; width: auto; padding: 18px 20px 14px; align-items: stretch; overflow: visible; }
  .brand { margin: 0 0 14px; font-size: 14px; }
  .brand-symbol { font-size: 14px; width: 37px; }
  .brand > span:last-child { display: block; }
  .nav-label, .sidebar-note, .profile { display: none; }
  .sidebar nav { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
  .sidebar nav a { flex-direction: column; justify-content: center; gap: 6px; padding: 10px 5px; font-size: 13px; text-align: center; min-height: 62px; }
  .sidebar nav a .nav-text { font-size: 12px; }
  .sidebar nav a.active { box-shadow: inset 0 -3px 0 var(--sand); }
  .workspace { margin-left: 0; }
  .topbar { min-height: 58px; height: auto; padding: 10px 20px; }
  .topbar > div { gap: 12px; }
  .date { display: none; }
  main { padding: 26px 20px 36px; min-height: auto; }
  .record-form { grid-template-columns: minmax(0, 1fr); }
  .upload-box form { flex-wrap: wrap; }
  .upload-box form > div { flex-basis: 100%; }
  .project-mark { display: block; }
  .page-heading { align-items: flex-start; }
  .project-amount strong { font-size: 20px; }
}
@media (max-width: 560px) {
  .sidebar { padding: 16px; }
  .sidebar nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sidebar nav a { flex-direction: row; min-height: 44px; gap: 7px; padding: 10px 6px; }
  .sidebar nav a .nav-text { font-size: 12px; }
  .nav-icon { width: 16px; height: 16px; }
  .topbar { padding: 10px 16px; font-size: 12px; flex-wrap: wrap; gap: 4px 12px; }
  .topbar > span { max-width: none; }
  .topbar > div { gap: 12px; }
  .topbar b { margin: 0 6px; }
  .local-tag { display: inline-block; font-size: 10px; }
  .text-button, .topbar .text-button { min-height: 36px; font-size: 12px; }
  main { padding: 24px 16px 32px; }
  h1 { font-size: 27px; }
  .file-heading { font-size: 26px; }
  .page-heading { flex-direction: row; gap: 14px; margin-bottom: 22px; }
  .page-heading > div { flex-basis: 100%; }
  .page-heading p { font-size: 13px; }
  .metrics { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .metric { padding: 17px 18px; min-height: 110px; }
  .metrics .metric strong { font-size: 25px; }
  .metric strong small { font-size: 13px; }
  .metric > small { font-size: 12px; }
  .panel { padding: 18px; }
  .table-panel { padding: 0; }
  .section-heading h2 { font-size: 18px; }
  .section-heading > small { display: block; }
  .section-heading .badge { max-width: none; }
  .badge { font-size: 12px; }
  .project-card { display: block; padding: 20px; }
  .project-mark { display: none; }
  .project-amount { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 14px; text-align: left; }
  .project-amount > span { display: block; }
  .project-meta { font-size: 12px; line-height: 1.8; }
  .card-title h3 { font-size: 17px; }
  .tabs { gap: 0 16px; margin-bottom: 22px; }
  .tabs a { font-size: 12px; padding: 10px 0; }
  .totals > div { font-size: 13px; }
  .button { min-height: 44px; }
  .button.small { min-height: 40px; }
  .record-form input:not([type=checkbox]), .record-form select, .record-form textarea,
  .stack-form input, .search-form input { font-size: 16px; min-height: 44px; }
  .upload-box { padding: 18px; }
  .upload-box form { gap: 14px; }
  .upload-box input { width: 100%; }
  .scope { max-width: 100%; gap: 3px; }
  .scope a { font-size: 12px; padding: 8px 12px; }
  .trip-grid { grid-template-columns: minmax(0, 1fr); }
  .receipt-row { gap: 8px 16px; }
  footer { padding: 20px 16px; font-size: 11px; flex-wrap: wrap; }
  footer span { max-width: none; font-size: 12px; text-align: left; }
  .login-page { padding: 18px; }
  .login-card { padding: 28px 22px; }
  .login-card h1 { font-size: 27px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* Approved summary, history filters and document navigation. */
.history-filters, .document-route { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.history-filters a, .document-route a { padding: 10px 14px; border: 1px solid var(--line); border-radius: 7px; color: var(--brand-blue); background: var(--paper); font-size: 13px; min-height: 44px; }
.history-filters a.selected { color: #fff; background: var(--sidebar); border-color: var(--sidebar); }
.history-filters a span { margin-left: 6px; font-variant-numeric: tabular-nums; }
.dashboard-issues { margin-bottom: 22px; }
.dashboard-issue { padding: 18px 0; border-top: 1px solid var(--line); }
.dashboard-issue h3 { font-size: 17px; }
.dashboard-issue p { overflow-wrap: anywhere; }
.document-tools { margin-top: 22px; }
.document-tools > summary { cursor: pointer; color: var(--brand-blue); font-size: 18px; font-weight: 600; }
.document-tools-body { margin-top: 22px; }
.document-tools .reading-panel { border: 0; padding: 0; margin: 0; box-shadow: none; }
.document-checksum { margin-top: 16px; }
.document-checksum > summary { cursor: pointer; color: var(--muted); font-size: 12px; }
.audit-row pre { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .history-filters a, .document-route a { flex: 1 1 125px; padding: 10px; }
  .document-tools > summary { font-size: 16px; }
}

/* Saved conditions remain readable without exposing editing controls. */
.saved-fields > div { align-items: flex-start; gap: 14px; }
.saved-fields dt { flex: 0 1 42%; overflow-wrap: anywhere; }
.saved-fields dd { flex: 1; min-width: 0; margin: 0; text-align: left; overflow-wrap: anywhere; font-weight: 500; }
.component-row:target, .component-row span[id]:target { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 4px; scroll-margin-top: 100px; }
