:root {
  --navy-950: #082b2e;
  --navy-900: #123d3d;
  --navy-800: #173b38;
  --ink: #102a2d;
  --muted: #456166;
  --line: #d9e1de;
  --line-strong: #aebebb;
  --paper: #fffefb;
  --canvas: #f3f0e9;
  --blue: #123d3d;
  --blue-dark: #082b2e;
  --cyan: #65d1b0;
  --mint-soft: #ddf6ed;
  --green: #2e7166;
  --amber: #9a6120;
  --amber-bg: #fff8eb;
  --red: #9b4234;
  --red-bg: #f6deda;
  --shadow: 0 18px 60px rgba(15, 45, 48, .09);
  --radius: 7px;
  font-family: Arial, "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Helvetica, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--canvas); color: var(--ink); font-size: 14px; }
body::selection { color: white; background: var(--blue); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { border: 0; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 7px; font-size: clamp(30px, 2.1vw, 34px); font-weight: 600; line-height: 1.12; letter-spacing: -.025em; }
h2 { margin-bottom: 4px; font-size: 19px; letter-spacing: -.015em; }
p { color: var(--muted); line-height: 1.65; }
small { color: var(--muted); }

.app-shell { min-height: 100vh; }
.command-rail {
  position: fixed; inset: 0 auto 0 0; z-index: 40; display: flex; width: 224px; flex-direction: column;
  padding: 34px 22px 20px; color: #d8e7e2; background: var(--navy-950);
  border-right: 1px solid rgba(255,255,255,.08);
}
.brand { display: flex; min-height: 48px; align-items: center; gap: 11px; margin-bottom: 42px; padding: 0 8px; }
.brand img { display: block; width: 38px; height: 38px; object-fit: contain; }
.brand-copy { display: block; min-width: 0; }
.brand .brand-copy strong { display: block; color: white; font-size: 17px; letter-spacing: .12em; }
.brand .brand-copy span { display: block; margin-top: 4px; color: #91aaa4; font-size: 9px; font-weight: 700; letter-spacing: .12em; }
.primary-nav { padding: 0; }
.primary-nav a, .utility-nav a { position: relative; display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 12px; border-radius: 5px; color: #adc1bc; font-size: 14px; font-weight: 600; transition: background .18s ease, color .18s ease; }
.primary-nav a:hover, .utility-nav a:hover { color: white; background: rgba(255,255,255,.06); }
.primary-nav a.active, .utility-nav a.active { color: white; background: rgba(101,209,176,.14); }
.primary-nav a.active::before, .utility-nav a.active::before { content: ""; position: absolute; left: 0; width: 2px; height: 18px; border-radius: 0 2px 2px 0; background: var(--cyan); }
.primary-nav i, .utility-nav i { width: 7px; height: 7px; border: 1px solid currentColor; border-radius: 50%; opacity: .8; }
.primary-nav a.active i { border-color: var(--cyan); background: var(--cyan); box-shadow: 0 0 0 4px rgba(101,209,176,.12); }
.utility-nav { margin-top: auto; padding: 14px 0 12px; border-top: 1px solid rgba(255,255,255,.08); }
.utility-nav a { min-height: 36px; font-size: 12px; }
.rail-foot { display: grid; grid-template-columns: auto 1fr; gap: 7px 14px; padding: 15px 9px 0; color: #78938d; font-size: 10px; border-top: 1px solid rgba(255,255,255,.07); }
.live-mark { grid-column: 1 / -1; color: #91aaa4; }
.live-mark i, .system-state i, .save-state i, .workload-message i { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 4px rgba(101,209,176,.12); }

.workspace { min-height: 100vh; padding-left: 224px; }
.context-bar { position: sticky; top: 0; z-index: 30; display: flex; min-height: 62px; align-items: center; justify-content: space-between; padding: 0 36px; background: rgba(255,254,251,.88); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
.context-path { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .035em; }
.context-path span { margin: 0 8px; color: var(--line-strong); }
.account-cluster { display: flex; align-items: center; gap: 11px; }
.account-copy { display: flex; flex-direction: column; align-items: flex-end; font-size: 12px; }
.account-copy span { color: var(--muted); font-size: 10px; }
.account-mark { display: grid; width: 34px; height: 34px; place-items: center; color: white; background: var(--navy-800); border-radius: 5px; font-size: 11px; font-weight: 800; }
.role-switcher { display: flex; margin-right: 13px; padding-right: 13px; gap: 4px; border-right: 1px solid var(--line); }
.role-switcher form { margin: 0; }
.role-chip { padding: 6px 9px; color: var(--muted); background: transparent; border-radius: 4px; cursor: pointer; font-size: 10px; font-weight: 700; }
.role-chip.selected { color: var(--navy-950); background: var(--cyan); }
.quiet-button, .rail-toggle { padding: 7px 9px; color: var(--muted); background: transparent; cursor: pointer; font-size: 11px; font-weight: 700; }
.rail-toggle { display: none; }
.page { width: min(1420px, 100%); margin: 0 auto; padding: 38px 42px 58px; }

.page-head, .record-headline { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 27px; }
.page-head p, .record-headline p { max-width: 760px; margin-bottom: 0; font-size: 13px; }
.page-head > .primary-button, .page-head > .secondary-button, .page-head > .status-pill, .record-headline > .status-pill { flex: 0 0 auto; }
.primary-button, .secondary-button, .dark-button, .voice-button, .file-control { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; padding: 0 18px; border-radius: 5px; cursor: pointer; font-size: 12px; font-weight: 700; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.primary-button:hover, .secondary-button:hover, .dark-button:hover, .voice-button:hover, .file-control:hover { transform: translateY(-1px); }
.primary-button, .dark-button { min-height: 44px; }
.primary-button { color: white; background: var(--blue); box-shadow: 0 8px 20px rgba(18,61,61,.15); }
.primary-button:hover { background: var(--blue-dark); }
.secondary-button { color: var(--blue); background: var(--paper); border: 1px solid var(--line-strong); }
.dark-button { color: white; background: var(--navy-800); }
.voice-button { color: var(--blue); background: var(--mint-soft, #ddf6ed); }
.voice-button.listening { color: #082b2e; background: #c8efe3; }
.file-control { position: relative; overflow: hidden; color: var(--blue); background: var(--paper); border: 1px solid var(--line-strong); }
.file-control input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.full { width: 100%; }
.text-link { color: var(--blue); font-size: 12px; font-weight: 750; }
.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.flash-stack, .auth-flashes { display: grid; gap: 8px; margin-bottom: 20px; }
.flash { padding: 11px 14px; color: var(--ink); background: #edf5f2; border: 1px solid #c7dad4; border-radius: 5px; box-shadow: 0 6px 20px rgba(15,45,48,.05); font-size: 12px; }
.flash.error { border-color: #d9aaa2; background: var(--red-bg); }
.flash.success { border-color: #b9dfd2; background: var(--mint-soft); }
.auth-flashes { position: fixed; z-index: 20; top: 18px; left: 50%; width: min(520px, calc(100% - 32px)); transform: translateX(-50%); }

.workload-strip { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)) minmax(240px, 1.35fr); margin-bottom: 24px; overflow: hidden; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.workload-strip > div { position: relative; min-height: 94px; padding: 20px 22px; border-right: 1px solid var(--line); }
.workload-strip > div:last-child { border-right: 0; }
.workload-strip strong { display: block; margin-bottom: 2px; color: var(--navy-900); font-size: 28px; letter-spacing: -.04em; }
.workload-strip span { color: var(--muted); font-size: 11px; font-weight: 650; }
.workload-strip .warn strong { color: var(--amber); }
.workload-message { display: flex; align-items: center; gap: 4px; background: #edf5f2; }
.workload-message small { font-weight: 400; }

.dashboard-grid, .detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; }
.work-panel, .flow-rail, .timeline-panel, .data-surface, .form-surface, .module-roadmap, .rule-column, .knowledge-body, .knowledge-index, .release-timeline { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.work-panel, .data-surface { overflow: hidden; }
.panel-heading, .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.panel-heading h2, .section-heading h2 { margin: 0; }
.panel-heading p, .section-heading p { margin: 2px 0 0; font-size: 11px; }
.record-list { display: block; }
.record-row { display: grid; grid-template-columns: minmax(180px, 1.15fr) minmax(140px, 1fr) minmax(120px, .8fr) auto; align-items: center; gap: 18px; min-height: 74px; padding: 14px 22px; border-bottom: 1px solid var(--line); transition: background .15s ease; }
.record-row:last-child { border-bottom: 0; }
.record-row:hover { background: #f8faf8; }
.record-row div { display: flex; flex-direction: column; }
.record-row strong { font-size: 12px; }
.record-row div > span { color: var(--muted); font-size: 10px; }
.record-code strong { color: var(--blue); }
.status-pill, .type-mark { display: inline-flex; width: fit-content; min-height: 25px; align-items: center; justify-content: center; padding: 0 9px; color: #355f5a; background: #edf5f2; border-radius: 4px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.status-pill.amber { color: var(--amber); background: var(--amber-bg); }
.status-pill.green { color: var(--green); background: #e7f7f2; }
.flow-rail, .timeline-panel { overflow: hidden; }
.flow-title { padding: 20px 22px 15px; background: var(--navy-900); color: white; }
.flow-title span { display: block; margin-bottom: 3px; color: #9ab8af; font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.flow-title strong { font-size: 16px; }
.flow-rail ol, .timeline-panel ol { position: relative; margin: 0; padding: 18px 22px 7px; list-style: none; }
.flow-rail ol::before, .timeline-panel ol::before { content: ""; position: absolute; top: 26px; bottom: 21px; left: 28px; width: 1px; background: var(--line); }
.flow-rail li, .timeline-panel li { position: relative; display: flex; min-height: 63px; gap: 14px; }
.flow-rail li > i, .timeline-panel li > i { z-index: 1; width: 13px; height: 13px; flex: 0 0 auto; margin-top: 2px; background: white; border: 2px solid var(--line-strong); border-radius: 50%; }
.flow-rail li.done > i, .timeline-panel li.done > i { border-color: var(--green); background: var(--green); box-shadow: inset 0 0 0 3px white; }
.flow-rail li.current > i, .timeline-panel li.current > i { border-color: var(--blue); background: var(--blue); box-shadow: 0 0 0 4px rgba(18,61,61,.12); }
.flow-rail li strong, .timeline-panel li strong { display: block; font-size: 11px; }
.flow-rail li span, .timeline-panel li span { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.flow-rail > .secondary-button { width: calc(100% - 44px); margin: 8px 22px 22px; }
.next-action { margin: 8px 16px 16px; padding: 16px; background: #edf5f2; border: 1px solid #c7dad4; border-radius: 5px; }
.next-action span { color: var(--blue); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.next-action strong { display: block; margin-top: 3px; }
.next-action p { margin: 4px 0 0; font-size: 11px; }

.empty-state { display: flex; min-height: 230px; flex-direction: column; align-items: center; justify-content: center; padding: 30px; text-align: center; }
.empty-state::before { content: ""; width: 34px; height: 34px; margin-bottom: 13px; border: 1px solid #adc0d2; border-radius: 50%; background: radial-gradient(circle, var(--cyan) 0 3px, transparent 4px); }
.empty-state span { font-weight: 750; }
.empty-state p { max-width: 470px; margin: 6px 0 18px; font-size: 12px; }
.empty-state.compact { min-height: 145px; }

.filter-bar, .search-command { display: flex; align-items: flex-end; gap: 10px; margin-bottom: 14px; padding: 11px; background: #e5e9e5; border-radius: 5px; }
.filter-input { min-width: 280px; flex: 1; padding: 11px 13px; color: var(--muted); background: var(--paper); border: 1px solid var(--line-strong); border-radius: 5px; font-size: 12px; }
.filter-bar > span { margin-left: auto; padding: 0 8px 10px; color: var(--muted); font-size: 10px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.data-table th { height: 44px; padding: 0 16px; color: var(--muted); background: #f8faf8; border-bottom: 1px solid var(--line); text-align: left; font-size: 12px; font-weight: 700; }
.data-table td { min-height: 48px; padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #f8faf8; }
.data-table td > strong { font-size: 12px; }
.data-table small { font-size: 10px; }

.arrival-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.form-surface { overflow: hidden; }
.form-grid { display: grid; gap: 16px; padding: 20px 22px; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
label { display: flex; flex-direction: column; gap: 7px; color: #355357; font-size: 12px; font-weight: 700; }
label small { margin-left: 4px; font-weight: 400; }
input, select, textarea { width: 100%; min-height: 44px; padding: 10px 12px; color: var(--ink); background: var(--paper); border: 1px solid var(--line-strong); border-radius: 5px; outline: none; font-size: 14px; transition: border .15s ease, box-shadow .15s ease; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(18,61,61,.1); }
input[readonly] { color: var(--muted); background: #edf0ed; }
.entry-methods { display: flex; gap: 3px; margin: 0 22px; padding: 3px; background: #e5e9e5; border-radius: 5px; }
.entry-methods button { min-height: 33px; flex: 1; color: var(--muted); background: transparent; border-radius: 5px; cursor: default; font-size: 10px; font-weight: 750; }
.entry-methods button.active { color: var(--blue); background: var(--paper); box-shadow: 0 2px 7px rgba(15,45,48,.08); }
.section-heading.item-heading { margin-top: 17px; }
.editable-table { overflow-x: auto; padding: 0 22px 18px; }
.edit-row { display: grid; grid-template-columns: 112px minmax(130px,1fr) minmax(165px,1.2fr) 128px 64px minmax(130px,1fr) 48px; gap: 7px; align-items: center; min-width: 900px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.edit-row.header { color: var(--muted); font-size: 10px; font-weight: 700; }
.edit-row input, .edit-row select { min-height: 36px; font-size: 10px; }
.split-input { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.remove-row { color: var(--red); background: transparent; cursor: pointer; font-size: 10px; }
.notes-field { margin: 0 22px 22px; }
.arrival-side { display: grid; gap: 13px; }
.upload-zone, .decision-panel, .submit-panel { padding: 20px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.upload-zone { min-height: 204px; border: 1px dashed var(--line-strong); background: #f8faf8; }
.upload-zone::before { content: "DOC / PHOTO"; display: block; margin-bottom: 28px; color: var(--blue); font-size: 9px; font-weight: 800; letter-spacing: .13em; }
.upload-zone strong, .decision-panel strong { display: block; font-size: 13px; }
.upload-zone p, .decision-panel p, .submit-panel p { font-size: 11px; }
.upload-zone .file-control { margin-top: 7px; }
.decision-panel { color: white; background: var(--navy-900); border-color: var(--navy-900); }
.decision-panel p { color: #b8ccc6; }
.submit-panel p { margin-bottom: 14px; }
.save-state { color: var(--muted); font-size: 10px; }
.record-headline { padding: 23px 25px; color: white; background: var(--navy-950); border-radius: var(--radius); box-shadow: var(--shadow); }
.record-headline h1 { margin: 4px 0; font-size: 34px; }
.record-headline p, .record-headline > div > span { color: #a9beb8; font-size: 11px; }
.detail-layout .data-surface { align-self: start; }
.attachment-strip { display: flex; gap: 10px; padding: 15px 18px; background: #f8faf8; border-top: 1px solid var(--line); font-size: 10px; }

.search-command { align-items: flex-end; }
.search-command label:first-child { min-width: 250px; flex: 1; }
.search-command label:nth-child(2) { width: 180px; }
.search-command label span { padding-left: 2px; }
.search-command input, .search-command select { background: white; }
.event-stream { position: relative; padding: 6px 24px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.event-stream article { position: relative; display: grid; grid-template-columns: 14px 150px minmax(0,1fr) auto; gap: 18px; align-items: start; min-height: 86px; padding: 23px 0; border-bottom: 1px solid var(--line); }
.event-stream article:last-child { border-bottom: 0; }
.event-stream article > i { z-index: 1; width: 10px; height: 10px; margin-top: 3px; background: var(--blue); border: 2px solid white; border-radius: 50%; box-shadow: 0 0 0 2px var(--blue); }
.event-stream time { color: var(--muted); font-family: Consolas, monospace; font-size: 10px; }
.event-stream p { margin: 3px 0 0; font-size: 11px; }
.event-rail { position: absolute; top: 30px; bottom: 30px; left: 30px; width: 1px; background: var(--line-strong); }

.module-roadmap { display: grid; grid-template-columns: 1fr 310px; min-height: 410px; overflow: hidden; }
.roadmap-copy { display: flex; flex-direction: column; justify-content: center; padding: 58px; background: linear-gradient(135deg, var(--paper) 0 65%, #edf5f2); }
.roadmap-copy > span { color: var(--blue); font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.roadmap-copy h2 { max-width: 570px; margin: 12px 0; font-size: 30px; }
.roadmap-copy p { max-width: 620px; }
.module-roadmap ol { position: relative; margin: 0; padding: 58px 35px; color: white; background: var(--navy-900); list-style: none; }
.module-roadmap ol::before { content: ""; position: absolute; top: 69px; bottom: 70px; left: 41px; width: 1px; background: #426460; }
.module-roadmap li { position: relative; display: flex; min-height: 59px; gap: 15px; align-items: flex-start; color: #9ab8af; font-size: 11px; font-weight: 650; }
.module-roadmap li i { z-index: 1; width: 13px; height: 13px; flex: 0 0 auto; background: var(--navy-900); border: 2px solid #628079; border-radius: 50%; }
.module-roadmap li.done i { border-color: var(--green); background: var(--green); }
.module-roadmap li.current { color: white; }
.module-roadmap li.current i { border-color: var(--cyan); background: var(--cyan); box-shadow: 0 0 0 4px rgba(101,209,176,.12); }

.integration-strip { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 20px; background: var(--navy-900); border-radius: var(--radius); box-shadow: var(--shadow); color: white; }
.integration-strip > div { display: grid; gap: 2px; padding: 20px 23px; border-right: 1px solid #315653; }
.integration-strip > div:last-child { border-right: 0; }
.integration-strip span { color: #9ab8af; font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.integration-strip strong { font-size: 17px; }
.integration-strip small { color: #9ab8af; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.admin-grid .primary-button { margin: 0 22px 20px; }

.knowledge-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 22px; align-items: start; }
.knowledge-index { position: sticky; top: 92px; display: grid; padding: 20px; }
.knowledge-index strong { margin-bottom: 12px; font-size: 11px; }
.knowledge-index a { padding: 10px 0; color: var(--muted); border-bottom: 1px solid var(--line); font-size: 11px; }
.knowledge-index a:hover { color: var(--blue); }
.knowledge-body { padding: 4px 34px; }
.knowledge-body article { display: grid; grid-template-columns: 72px 1fr; gap: 14px; padding: 30px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 92px; }
.knowledge-body article:last-child { border-bottom: 0; }
.section-number { color: #b4c8c2; font-size: 34px; font-weight: 300; letter-spacing: -.05em; }
.knowledge-body p, .knowledge-body li { font-size: 12px; line-height: 1.7; }
.knowledge-body ul, .release-timeline ul { padding-left: 18px; color: var(--muted); }
.rule-band { display: grid; grid-template-columns: 110px 190px 1fr; align-items: center; gap: 22px; margin-bottom: 18px; padding: 22px 26px; color: white; background: var(--navy-950); border-radius: var(--radius); box-shadow: var(--shadow); }
.rule-band span { color: var(--cyan); font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.rule-band strong { font-size: 18px; }
.rule-band p { margin: 0; color: #bdd0ca; font-size: 11px; }
.rules-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.rule-column { min-height: 320px; padding: 25px; }
.rule-column > span { color: var(--blue); font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.rule-column h2 { margin: 9px 0 21px; font-size: 22px; }
.rule-column dl { margin: 0; }
.rule-column dt { margin-top: 17px; font-size: 11px; font-weight: 800; }
.rule-column dd { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.rule-column.planned { color: white; background: var(--navy-800); border-color: var(--navy-800); }
.rule-column.planned > span { color: var(--cyan); }
.rule-column.planned p { color: #b8ccc6; font-size: 12px; }
.release-mark { min-width: 108px; padding: 15px 18px; color: white; background: var(--blue); border-radius: 5px; text-align: center; font-size: 18px; font-weight: 800; box-shadow: 0 12px 26px rgba(18,61,61,.16); }
.release-timeline { padding: 4px 34px; }
.release-timeline article { display: grid; grid-template-columns: 160px 1fr; gap: 30px; padding: 34px 0; border-bottom: 1px solid var(--line); }
.release-timeline article:last-child { border-bottom: 0; }
.release-timeline time { color: var(--blue); font-family: Consolas, monospace; font-size: 11px; font-weight: 800; }
.release-timeline article span { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.release-timeline h2 { margin: 7px 0 13px; font-size: 22px; }
.release-timeline li, .release-timeline p { color: var(--muted); font-size: 12px; line-height: 1.7; }
.release-timeline .muted { opacity: .68; }

.auth-surface { min-height: 100vh; background: var(--canvas); }
.auth-layout { display: grid; min-height: 100vh; grid-template-columns: minmax(420px, .9fr) minmax(520px, 1.1fr); }
.auth-brand-panel { position: relative; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 58px clamp(40px, 6vw, 90px); color: white; background: var(--navy-950); }
.auth-brand-panel::after { content: ""; position: absolute; right: -130px; bottom: -160px; width: 430px; height: 430px; border: 1px solid rgba(101,209,176,.24); border-radius: 50%; box-shadow: 0 0 0 70px rgba(101,209,176,.025), 0 0 0 140px rgba(101,209,176,.018); }
.auth-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 13px; }
.auth-brand img { width: 46px; height: 46px; object-fit: contain; }
.auth-brand span { display: flex; flex-direction: column; }
.auth-brand strong { font-size: 20px; letter-spacing: .15em; }
.auth-brand small { margin-top: 4px; color: #9ab8af; font-size: 9px; font-weight: 700; letter-spacing: .13em; }
.auth-story { position: relative; z-index: 1; max-width: 530px; }
.auth-story > span { color: var(--cyan); font-size: 10px; font-weight: 800; letter-spacing: .17em; }
.auth-story h1 { margin: 15px 0 19px; font-size: clamp(42px, 5vw, 72px); line-height: .98; }
.auth-story p { color: #bbcec9; }
.auth-metrics { display: flex; gap: 35px; margin-top: 35px; }
.auth-metrics div { padding-left: 13px; border-left: 2px solid rgba(101,209,176,.65); }
.auth-metrics strong { display: block; }
.auth-metrics span { color: #9ab8af; font-size: 10px; }
.auth-meta { position: relative; z-index: 1; color: #78938d; font-size: 10px; letter-spacing: .04em; }
.auth-form-panel { display: grid; place-items: center; padding: 38px; }
.auth-card, .verify-card { width: min(445px, 100%); }
.system-state { color: var(--blue); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.auth-card h2, .verify-card h1 { margin: 18px 0 8px; font-size: 34px; letter-spacing: -.035em; }
.auth-card > p, .verify-card > p { margin-bottom: 29px; font-size: 12px; }
.stacked-form { display: grid; gap: 16px; }
.stacked-form button { margin-top: 4px; }
.security-note { display: flex; gap: 11px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.security-note i { display: block; width: 9px; height: 9px; flex: 0 0 auto; margin-top: 4px; background: var(--green); border-radius: 50%; }
.security-note strong { display: block; font-size: 11px; }
.security-note span { color: var(--muted); font-size: 10px; }
.verify-stage { display: grid; min-height: 100vh; place-items: center; padding: 30px; background: radial-gradient(circle at 50% 0, var(--paper), var(--canvas) 70%); }
.verify-card { padding: 37px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.otp-input { font-family: Consolas, monospace; font-size: 24px; letter-spacing: .33em; text-align: center; }

@media (max-width: 1400px) and (min-width: 821px) {
  .arrival-layout { grid-template-columns: 1fr; }
  .arrival-side { grid-template-columns: 1.2fr 1fr 1fr; }
  .upload-zone, .decision-panel, .submit-panel { min-height: 190px; }
  .submit-panel { display: flex; flex-direction: column; justify-content: space-between; }
}

@media (max-width: 1120px) {
  .command-rail { width: 208px; padding-right: 16px; padding-left: 16px; }
  .workspace { padding-left: 208px; }
  .page { padding: 31px 25px 52px; }
  .workload-strip { grid-template-columns: repeat(4, 1fr); }
  .workload-message { grid-column: 1 / -1; min-height: 63px !important; border-top: 1px solid var(--line); }
  .dashboard-grid, .detail-layout { grid-template-columns: minmax(0,1fr) 270px; gap: 17px; }
  .role-switcher { display: none; }
  .auth-layout { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .command-rail { transform: translateX(-100%); width: 224px; padding: 28px 18px 18px; box-shadow: 18px 0 50px rgba(0,0,0,.25); transition: transform .2s ease; }
  .command-rail.open { transform: translateX(0); }
  body.rail-open::after { content: ""; position: fixed; z-index: 35; inset: 0; background: rgba(8,43,46,.5); }
  .workspace { padding-left: 0; }
  .rail-toggle { display: block; }
  .context-bar { padding: 0 17px; }
  .context-path, .account-copy, .quiet-button { display: none; }
  .page { padding: 25px 16px 50px; }
  .workload-strip { grid-template-columns: 1fr 1fr; }
  .workload-strip > div { min-height: 78px; padding: 15px 17px; border-bottom: 1px solid var(--line); }
  .workload-message { grid-column: 1 / -1; }
  .dashboard-grid, .detail-layout, .arrival-layout, .module-roadmap, .knowledge-layout { grid-template-columns: 1fr; }
  .flow-rail, .timeline-panel, .arrival-side { order: -1; }
  .flow-rail ol { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .flow-rail ol::before { display: none; }
  .flow-rail li { min-height: 54px; }
  .form-grid.three, .form-grid.two, .admin-grid, .rules-grid, .integration-strip { grid-template-columns: 1fr; }
  .integration-strip > div { border-right: 0; border-bottom: 1px solid #315653; }
  .integration-strip > div:last-child { border-bottom: 0; }
  .knowledge-index { position: static; display: flex; overflow-x: auto; gap: 18px; }
  .knowledge-index strong { display: none; }
  .knowledge-index a { flex: 0 0 auto; border: 0; }
  .rule-band { grid-template-columns: 1fr; gap: 7px; }
  .auth-layout { display: block; }
  .auth-brand-panel { min-height: 330px; padding: 40px 30px; }
  .auth-story h1 { font-size: 42px; }
  .auth-meta { display: none; }
  .auth-form-panel { padding: 40px 25px 60px; }
}

@media (max-width: 560px) {
  h1 { font-size: 29px; }
  .page-head, .record-headline { flex-direction: column; }
  .page-head > .primary-button, .page-head > .secondary-button { width: 100%; }
  .workload-strip strong { font-size: 24px; }
  .record-row { grid-template-columns: 1fr auto; gap: 7px 14px; }
  .record-owner, .record-quantity { grid-column: 1; }
  .record-row > .status-pill { grid-column: 2; grid-row: 1; }
  .filter-bar, .search-command { align-items: stretch; flex-direction: column; }
  .filter-input, .search-command label:first-child, .search-command label:nth-child(2) { width: 100%; min-width: 0; }
  .data-surface { overflow-x: auto; }
  .data-table { min-width: 760px; }
  .event-stream article { grid-template-columns: 12px 1fr auto; gap: 10px; }
  .event-stream time { grid-column: 2 / -1; grid-row: 1; }
  .event-stream article > div { grid-column: 2; }
  .event-stream article > .type-mark { grid-column: 3; grid-row: 2; }
  .event-rail { left: 29px; }
  .module-roadmap { min-height: 0; }
  .roadmap-copy { padding: 35px 25px; }
  .roadmap-copy h2 { font-size: 25px; }
  .module-roadmap ol { padding: 32px 27px; }
  .module-roadmap ol::before { top: 43px; bottom: 45px; left: 33px; }
  .knowledge-body { padding: 0 22px; }
  .knowledge-body article, .release-timeline article { grid-template-columns: 1fr; gap: 8px; }
  .section-number { font-size: 25px; }
  .release-timeline { padding: 0 22px; }
  .auth-metrics { gap: 15px; }
}

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