:root {
  --ink: #17201f;
  --ink-2: #263230;
  --paper: #f4f3ee;
  --surface: #ffffff;
  --line: #d9dbd4;
  --muted: #6e7774;
  --orange: #f26a2e;
  --orange-soft: #fff0e7;
  --green: #1d7b58;
  --red: #b74134;
  --blue: #356a8f;
  --yellow: #b67a17;
  --radius: 10px;
  --shadow: 0 18px 50px rgba(23, 32, 31, .10);
  --display: "Bahnschrift", "Microsoft YaHei UI", sans-serif;
  --body: "Segoe UI Variable Text", "Microsoft YaHei UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--body); }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
[hidden] { display: none !important; }

.eyebrow { margin: 0 0 8px; color: var(--orange); font: 700 11px/1 var(--display); letter-spacing: .17em; text-transform: uppercase; }
.muted { color: var(--muted); }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1.25fr .75fr; background: var(--ink); }
.auth-brand { position: relative; overflow: hidden; padding: clamp(46px, 8vw, 120px); display: flex; flex-direction: column; justify-content: center; color: #fff; }
.auth-brand::before { content: ""; position: absolute; width: 60vw; height: 60vw; left: -30vw; bottom: -32vw; border: 1px solid rgba(255,255,255,.10); border-radius: 50%; box-shadow: 0 0 0 90px rgba(255,255,255,.025), 0 0 0 180px rgba(255,255,255,.018); }
.auth-brand > * { position: relative; z-index: 1; }
.company-name { display: block; font-family: var(--display); font-weight: 700; line-height: 1; white-space: nowrap; }
.auth-company-name { margin-bottom: 28px; color: #fff; font-size: clamp(30px, 2.5vw, 40px); letter-spacing: .08em; }
.system-version { display: inline-flex; align-items: center; min-height: 30px; padding: 0 11px; border: 1px solid #d4d6cf; border-radius: 99px; color: #6f7976; background: rgba(255,255,255,.45); font: 700 10px/1 var(--display); letter-spacing: .08em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.auth-version { position: absolute; top: 30px; right: 34px; }
.auth-brand h1 { max-width: 720px; margin: 28px 0 26px; font: 600 clamp(42px, 5.3vw, 82px)/1.04 var(--display); letter-spacing: -.04em; }
.auth-copy { max-width: 620px; margin: 0; color: #bfc9c6; font-size: 17px; line-height: 1.9; }
.auth-rail { display: flex; align-items: center; gap: 14px; margin-top: 64px; color: #8fa09b; font: 700 10px var(--display); letter-spacing: .12em; }
.auth-rail i { width: 42px; height: 1px; background: #52605d; }
.auth-panel { background: var(--paper); display: grid; place-items: center; padding: 40px; position: relative; }
.auth-card { width: min(420px, 100%); }
.auth-card h2 { margin: 0 0 10px; font: 600 32px/1.2 var(--display); }
.auth-card > .muted { margin: 0 0 30px; }
.auth-foot { position: absolute; bottom: 24px; color: #949c99; font: 600 10px var(--display); letter-spacing: .1em; }

.form-stack, .form-grid { display: grid; gap: 16px; }
.form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .span-2 { grid-column: 1 / -1; }
label { display: grid; gap: 7px; color: #45504d; font-size: 13px; font-weight: 600; }
input, select, textarea { width: 100%; border: 1px solid #ccd0ca; border-radius: 7px; background: #fff; padding: 11px 12px; color: var(--ink); outline: none; transition: border-color .18s, box-shadow .18s; }
textarea { min-height: 88px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(242,106,46,.12); }
.primary-button, .secondary-button, .danger-button { border: 0; border-radius: 7px; min-height: 42px; padding: 0 17px; font-weight: 700; cursor: pointer; white-space: nowrap; flex-shrink: 0; }
.button-link { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.primary-button { background: var(--orange); color: white; box-shadow: 0 8px 20px rgba(242,106,46,.20); }
.primary-button:hover { background: #dc5923; }
.secondary-button { background: #e7e9e4; color: var(--ink); }
.danger-button { background: #f7e8e5; color: var(--red); }
.text-button, .icon-button { border: 0; background: transparent; cursor: pointer; }
.form-error { min-height: 20px; color: var(--red); font-size: 13px; }
.form-note { margin: 0; padding: 11px 13px; border-left: 3px solid var(--orange); background: var(--orange-soft); color: #6b554b; font-size: 12px; line-height: 1.55; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--ink); color: #d8dfdd; padding: 25px 18px 18px; z-index: 30; }
.sidebar-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 4px 5px 21px; border-bottom: 1px solid rgba(255,255,255,.09); }
.sidebar-company-name { color: #fff; font-size: 25px; letter-spacing: .08em; }
.sidebar-brand small { display: block; color: #84928e; font: 600 8px var(--display); letter-spacing: .13em; }
nav { display: grid; gap: 4px; padding: 22px 0; }
nav button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 7px; background: transparent; color: #abb6b3; text-align: left; cursor: pointer; font-weight: 600; }
nav button:hover { color: white; background: rgba(255,255,255,.05); }
nav button.active { color: white; background: #2a3533; box-shadow: inset 3px 0 var(--orange); }
.nav-index { color: #66736f; font: 700 9px var(--display); letter-spacing: .08em; }
nav button.active .nav-index { color: var(--orange); }
.sidebar-footer { margin-top: auto; padding: 18px 9px 2px; border-top: 1px solid rgba(255,255,255,.09); }
.user-chip { display: flex; align-items: center; gap: 10px; }
.user-chip > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 7px; background: var(--orange); color: #fff; font: 700 11px var(--display); }
.user-chip b, .user-chip small { display: block; }
.user-chip b { font-size: 13px; color: #fff; }
.user-chip small { color: #82908c; font-size: 11px; margin-top: 2px; }
.sidebar-footer .text-button { margin: 15px 0 0 43px; padding: 0; color: #83918d; font-size: 11px; }

.workspace { min-width: 0; }
.topbar { min-height: 104px; padding: 24px clamp(24px,4vw,56px); display: flex; align-items: center; justify-content: flex-start; border-bottom: 1px solid var(--line); background: rgba(244,243,238,.94); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 20; }
.topbar h1 { margin: 0; font: 600 28px/1.2 var(--display); letter-spacing: -.02em; }
.topbar-meta { display: flex; align-items: center; gap: 8px; margin-left: auto; color: var(--muted); font-size: 12px; }
.topbar-meta time { margin-left: 12px; font-variant-numeric: tabular-nums; }
.app-version { flex: 0 0 auto; margin-left: 22px; }
.global-search-wrap { position: relative; width: min(390px, 30vw); margin-left: clamp(24px,4vw,70px); }
.global-search-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.global-search-wrap input { height: 42px; padding-left: 38px; border-color: #cfd3cc; background: rgba(255,255,255,.82); }
.global-search-wrap::before { content: "⌕"; position: absolute; left: 14px; top: 7px; z-index: 1; color: var(--orange); font: 700 22px var(--display); }
.global-search-results { position: absolute; top: 49px; left: 0; right: 0; z-index: 50; max-height: 420px; overflow: auto; padding: 8px; border: 1px solid var(--line); border-radius: 9px; background: #fff; box-shadow: var(--shadow); }
.search-group-title { padding: 9px 10px 5px; color: var(--muted); font: 700 10px var(--display); letter-spacing: .1em; }
.global-result { display: flex; justify-content: space-between; gap: 12px; width: 100%; padding: 10px; border: 0; border-radius: 6px; background: transparent; text-align: left; cursor: pointer; }
.global-result:hover, .global-result:focus { background: var(--orange-soft); outline: none; }
.global-result b, .global-result small { display: block; }
.global-result small { margin-top: 3px; color: var(--muted); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #28a66a; box-shadow: 0 0 0 4px rgba(40,166,106,.13); }
.page-content { padding: 30px clamp(24px,4vw,56px) 60px; max-width: 1680px; margin: 0 auto; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 19px; }
.section-head h2 { margin: 0; font: 600 20px var(--display); }
.section-head p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }

.kpi-grid { display: grid; grid-template-columns: repeat(6, minmax(140px, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.kpi { min-height: 132px; padding: 22px; border-right: 1px solid var(--line); position: relative; }
.kpi:last-child { border-right: 0; }
.kpi::after { content: ""; position: absolute; left: 22px; bottom: 18px; width: 30px; height: 3px; background: var(--orange); }
.kpi-label { color: var(--muted); font-size: 12px; }
.kpi-value { margin-top: 12px; font: 600 clamp(22px,2vw,30px) var(--display); font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.kpi small { display: block; color: #8b9390; margin-top: 4px; }
.dashboard-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 22px; margin-top: 22px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.panel-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.panel-title h3 { margin: 0; font: 600 16px var(--display); }
.stage-bars { display: grid; gap: 13px; }
.stage-row { display: grid; grid-template-columns: 92px 1fr 85px; gap: 12px; align-items: center; font-size: 12px; }
.bar-track { height: 8px; background: #eceee9; overflow: hidden; }
.bar-fill { height: 100%; background: var(--orange); }
.task-list { display: grid; gap: 0; }
.task-row { display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; padding: 13px 0; border-bottom: 1px solid #eceee9; align-items: start; }
.task-row:last-child { border: 0; }
.task-dot { width: 6px; height: 6px; margin-top: 6px; border-radius: 50%; background: var(--orange); }
.task-row b { display: block; font-size: 13px; }
.task-row small { color: var(--muted); }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.compact-filter { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.compact-filter select { width: auto; min-width: 104px; padding: 9px 30px 9px 10px; background-color: #fff; font-size: 12px; }
.document-rule { display: flex; align-items: center; gap: 13px; margin: -4px 0 18px; padding: 13px 16px; border-left: 3px solid var(--orange); background: #fff; color: #4f5a57; font-size: 12px; }
.document-rule b { color: var(--ink); }
.document-rule i { width: 1px; height: 20px; background: var(--line); }
.document-rule small { margin-left: auto; color: var(--muted); }
.document-kind { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border-left: 4px solid var(--orange); background: var(--orange-soft); }
.document-kind.foreign { border-left-color: var(--blue); background: #e8f0f5; }
.document-kind b { font: 600 15px var(--display); }
.document-kind span { color: var(--muted); font: 700 10px var(--display); letter-spacing: .1em; }
.commercial-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 14px; border: 1px solid #cfd4ce; border-left: 4px solid var(--blue); background: #edf3f6; border-radius: 8px; }
.commercial-control { padding: 12px; background: #fff; border: 1px solid #d9dfdc; border-radius: 7px; }
.commercial-control > span { color: var(--ink); font: 700 14px var(--display); }
.commercial-control select { min-height: 48px; border-width: 2px; font-size: 15px; font-weight: 700; }
.commercial-control small { color: var(--muted); font-size: 11px; line-height: 1.45; }
.currency-control { border-color: #efb292; box-shadow: inset 0 0 0 1px #fff0e7; }
.currency-control select { border-color: var(--orange); }
.draft-edit { border: 0; cursor: pointer; background: #fff0e7; color: #aa4b22; }
.draft-edit:hover { background: #ffe1cf; }
.document-child td:first-child { padding-left: 38px; position: relative; }
.document-child td:first-child::before { content: "↳"; position: absolute; left: 17px; color: var(--orange); }
.document-revision { background: #f7f8f4; }
.dual-money { display: block; margin-top: 4px; color: var(--blue); font-size: 11px; font-weight: 700; }
.permission-grid { grid-column: 1/-1; display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.permission-check { display: flex; align-items: flex-start; gap: 9px; padding: 12px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.permission-check input { width: auto; margin-top: 2px; }
.permission-check span { display: grid; gap: 3px; }
.permission-check small { color: var(--muted); font-weight: 400; }
.duplicate-panel { grid-column: 1/-1; padding: 14px; border: 1px dashed #d7a98d; border-radius: 8px; background: #fff8f4; }
.duplicate-panel header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.duplicate-results { display: grid; gap: 8px; margin-top: 10px; }
.duplicate-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px; border: 1px solid #eadcd4; background: white; }
.factory-list { display: grid; gap: 10px; }
.factory-card { padding: 14px 16px; border: 1px solid var(--line); border-left: 3px solid var(--orange); background: #fff; }
.factory-card b, .factory-card span { display: block; }
.factory-card span { margin-top: 5px; color: var(--muted); font-size: 12px; }
.payment-summary { grid-column: 1/-1; display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.payment-summary > div { padding: 12px; border: 1px solid var(--line); background: #fff; }
.payment-summary small, .payment-summary b { display: block; }
.payment-summary b { margin-top: 5px; font: 600 17px var(--display); }
.search-input { width: min(320px, 65vw); }
.data-shell { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: auto; }
table { border-collapse: collapse; width: 100%; min-width: 920px; }
th { padding: 12px 15px; background: #f0f1ed; color: #67716e; text-align: left; font: 700 11px var(--display); letter-spacing: .05em; white-space: nowrap; }
td { padding: 14px 15px; border-top: 1px solid #eceee9; font-size: 13px; vertical-align: middle; }
tbody tr:hover { background: #fafaf7; }
.code { font: 600 11px/1.3 var(--display); letter-spacing: .03em; color: #4d5b57; }
.amount { font-variant-numeric: tabular-nums; font-weight: 650; text-align: right; white-space: nowrap; }
.badge { display: inline-flex; align-items: center; min-height: 24px; padding: 0 9px; border-radius: 99px; background: #eef0ec; color: #52605c; font-size: 11px; font-weight: 700; white-space: nowrap; }
.badge.orange { color: #aa4b22; background: var(--orange-soft); }
.badge.green { color: var(--green); background: #e7f4ee; }
.badge.red { color: var(--red); background: #f8e9e6; }
.badge.blue { color: var(--blue); background: #e8f0f5; }
.progress { width: 120px; height: 6px; background: #e7eae5; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--green); }
.shipment-progress > i { background: #3278a8; }
.empty-state { min-height: 270px; display: grid; place-items: center; text-align: center; color: var(--muted); }
.empty-state b { display: block; color: var(--ink); font: 600 18px var(--display); margin-bottom: 7px; }

.kanban { display: grid; grid-template-columns: repeat(7, minmax(238px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 12px; }
.kanban-col { background: #ebede8; border-radius: var(--radius); min-height: 480px; padding: 12px; }
.kanban-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 3px 13px; }
.kanban-head b { font: 600 13px var(--display); }
.kanban-head span { color: var(--muted); font-size: 11px; }
.deal-card { background: #fff; border: 1px solid #dfe2dc; border-top: 3px solid var(--orange); border-radius: 7px; padding: 14px; margin-bottom: 10px; box-shadow: 0 4px 12px rgba(23,32,31,.04); }
.deal-card h3 { margin: 0 0 7px; font: 600 14px/1.35 var(--display); }
.deal-card p { margin: 0 0 12px; color: var(--muted); font-size: 12px; }
.deal-money { font: 600 18px var(--display); }
.deal-card footer { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; padding-top: 11px; border-top: 1px solid #eceee9; }
.deal-card select { width: auto; max-width: 125px; padding: 5px 7px; font-size: 11px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; background: rgba(13,18,17,.62); }
.modal { width: min(760px, 100%); max-height: calc(100vh - 48px); overflow: auto; background: var(--paper); border-radius: 12px; box-shadow: var(--shadow); }
.modal > header { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: 22px 26px; background: var(--ink); color: white; }
.modal header h2 { margin: 0; font: 600 22px var(--display); }
.modal header .icon-button { color: white; font-size: 28px; }
#modal-body { padding: 25px 26px 30px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.line-items { grid-column: 1 / -1; display: grid; gap: 10px; }
.line-item { display: grid; grid-template-columns: 2fr 1.2fr .65fr .8fr 1fr 38px; gap: 8px; align-items: end; padding: 12px; background: #ebece7; border-radius: 8px; }
.document-line { grid-template-columns: 1.85fr 1.15fr .9fr .75fr 1.05fr 34px; }
.line-item label { font-size: 11px; }
.unit-selector { display: grid; gap: 6px; }
.unit-custom { min-width: 0; }
.cbm-field { display: grid; align-content: end; gap: 7px; }
.cbm-toggle { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.cbm-toggle input { width: 17px; min-height: 17px; accent-color: var(--orange); }
.line-item .icon-button { height: 40px; color: var(--red); font-size: 20px; }
.order-detail { display: none; padding: 0 15px 18px; background: #fafaf7; }
tr.expanded + tr .order-detail { display: block; }
.order-detail-row > td { padding: 0; border-bottom-color: #d8dcd5; }
.mobile-order-list { display: none; }
.mobile-order-card { background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--orange); border-radius: var(--radius); padding: 16px; }
.mobile-order-card header, .mobile-order-card footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mobile-order-card h3 { margin: 16px 0 4px; font: 600 17px var(--display); }
.mobile-order-card p { margin: 0 0 16px; color: var(--muted); font-size: 12px; }
.mobile-order-amount { display: block; margin-bottom: 16px; font: 600 24px var(--display); }
.mobile-progress { display: grid; grid-template-columns: 68px 1fr; gap: 10px; align-items: center; margin: 9px 0; font-size: 12px; }
.mobile-progress .progress { width: 100%; }
.mobile-order-card footer { margin-top: 16px; padding-top: 13px; border-top: 1px solid #eceee9; }
.mobile-progress-block { display: grid; gap: 7px; margin: 13px 0; }
.mobile-progress-block .progress { width: 100%; }
.mobile-progress-copy { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 11px; }
.mobile-progress-copy span { color: var(--muted); }
.mobile-progress-copy b { font-size: 11px; text-align: right; }
.mobile-order-detail { margin: 14px -16px -16px; padding: 0 16px 16px; background: #f6f6f2; border-top: 1px solid var(--line); }
.detail-grid { display: grid; grid-template-columns: minmax(240px,.8fr) minmax(420px,2.2fr); gap: 12px; padding-top: 16px; }
.detail-card { padding: 14px; border: 1px solid var(--line); background: white; }
.detail-card b { display: block; font-size: 12px; margin-bottom: 5px; }
.detail-card > span { display: block; color: var(--muted); font-size: 12px; line-height: 1.6; }
.detail-note { margin-top: 9px; padding-top: 9px; border-top: 1px solid var(--line); }
.detail-progress-summary { display: grid; gap: 7px; margin-top: 13px; padding-top: 11px; border-top: 1px solid var(--line); }
.detail-progress-summary span { color: var(--ink); font-size: 11px; font-weight: 650; }
.order-timeline { position: relative; display: grid; gap: 0; margin: 12px 0 0; padding: 0; list-style: none; }
.order-timeline::before { content: ""; position: absolute; top: 8px; bottom: 8px; left: 15px; width: 1px; background: #d7dbd5; }
.timeline-entry { position: relative; display: grid; grid-template-columns: 31px 1fr; gap: 12px; padding: 0 0 17px; }
.timeline-entry:last-child { padding-bottom: 0; }
.timeline-marker { position: relative; z-index: 1; display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; background: var(--green); color: #fff; font: 700 11px var(--display); }
.timeline-entry.shipment .timeline-marker { background: #3278a8; }
.timeline-body { min-width: 0; padding-top: 1px; }
.timeline-body time { display: block; margin-bottom: 3px; color: var(--muted); font: 700 10px var(--display); letter-spacing: .05em; }
.timeline-body b { margin: 0; color: var(--ink); font-size: 12px; line-height: 1.5; }
.timeline-body p { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; overflow-wrap: anywhere; }
.timeline-empty { margin-top: 10px; padding: 18px; border: 1px dashed #d7dbd5; color: var(--muted); font-size: 12px; text-align: center; }
.row-actions { display: flex; gap: 6px; }
.mini-button { border: 1px solid #d5d8d2; border-radius: 5px; background: #fff; padding: 6px 9px; cursor: pointer; font-size: 11px; font-weight: 650; }
.row-actions .mini-button { white-space: nowrap; }
.order-desktop th:last-child, .order-desktop td:last-child { min-width: 132px; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 150; max-width: 380px; padding: 13px 17px; border-radius: 7px; background: var(--ink); color: white; box-shadow: var(--shadow); font-size: 13px; }
.toast.error { background: var(--red); }
.skeleton { min-height: 260px; background: linear-gradient(90deg,#eceee9 25%,#f6f6f2 50%,#eceee9 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: var(--radius); }
@keyframes shimmer { to { background-position: -200% 0; } }
.mobile-only { display: none; }

@media (max-width: 1180px) {
  .kpi-grid { grid-template-columns: repeat(3,1fr); }
  .kpi:nth-child(3) { border-right: 0; }
  .kpi:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand { min-height: 42vh; padding: 38px 28px; }
  .auth-company-name { margin-bottom: 20px; font-size: 30px; }
  .auth-brand h1 { margin: 18px 0 18px; font-size: 42px; }
  .auth-copy { font-size: 14px; }
  .auth-rail { display: none; }
  .auth-panel { min-height: 58vh; padding: 76px 24px 70px; }
  .auth-version { top: 20px; right: 20px; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; transform: translateX(-100%); transition: transform .22s ease; width: 248px; }
  .sidebar.open { transform: translateX(0); box-shadow: 20px 0 60px rgba(0,0,0,.28); }
  .mobile-only { display: inline-grid; }
  .topbar { min-height: 84px; padding: 14px 16px; justify-content: flex-start; gap: 12px; }
  .mobile-company-name.mobile-only { display: block; color: var(--ink); font-size: 18px; letter-spacing: .05em; }
  .topbar-heading { display: none; }
  .global-search-wrap { flex: 1; width: auto; margin-left: 0; }
  .topbar-meta { display: none; }
  .app-version { margin-left: 4px; padding: 0 8px; }
  .page-content { padding: 22px 16px 48px; }
  .section-head { flex-direction: column; align-items: stretch; gap: 12px; }
  .section-head .toolbar { width: 100%; }
  .order-toolbar .compact-filter { flex: 1 1 calc(50% - 5px); }
  .order-toolbar .compact-filter select { flex: 1; min-width: 0; }
  .section-head .search-input { flex: 1; min-width: 0; width: auto; }
  .document-rule { align-items: flex-start; flex-direction: column; }
  .document-rule i { display: none; }
  .document-rule small { margin-left: 0; }
  .commercial-controls { grid-template-columns: 1fr; }
  .permission-grid, .payment-summary { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2,1fr); }
  .kpi { min-height: 112px; padding: 17px; border-bottom: 1px solid var(--line); }
  .kpi:nth-child(odd) { border-right: 1px solid var(--line); }
  .kpi:nth-child(even) { border-right: 0; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .line-item { grid-template-columns: 1fr 1fr; }
  .line-item .icon-button { grid-column: 2; justify-self: end; }
  .detail-grid { grid-template-columns: 1fr; }
  .order-desktop { display: none; }
  .mobile-order-list { display: grid; gap: 12px; }
  .modal-backdrop { padding: 0; align-items: end; }
  .modal { max-height: 92vh; border-radius: 14px 14px 0 0; }
}
