:root {
  color-scheme: light;
  --ink: #17313d;
  --ink-2: #25424f;
  --muted: #75848b;
  --line: #e5ebed;
  --surface: #fff;
  --canvas: #f6f8f8;
  --teal: #087e80;
  --teal-dark: #076668;
  --teal-soft: #e2f3f1;
  --sand: #f6eee2;
  --orange: #d58533;
  --red: #b54941;
  --shadow: 0 14px 40px rgba(19, 48, 59, .06);
  font-family: 'DM Sans', 'Segoe UI', sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; min-height: 100dvh; color: var(--ink); background: var(--canvas); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(380px, .94fr) 1.06fr; background: #fff; }
.auth-story { position: relative; overflow: hidden; min-height: 100vh; padding: 42px 8.5%; display: flex; flex-direction: column; justify-content: space-between; color: #fff; background: #123543; }
.auth-story::before { position: absolute; inset: 0; content: ''; opacity: .34; background: radial-gradient(ellipse at 15% 95%, #0c827d 0, transparent 46%), radial-gradient(ellipse at 100% 12%, #285766 0, transparent 48%); }
.auth-story > * { position: relative; z-index: 1; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 800 21px Manrope, sans-serif; letter-spacing: -.7px; }
.brand-mark { width: 34px; height: 34px; display: inline-grid; place-items: center; color: #fff; background: var(--teal); border-radius: 11px 11px 11px 3px; font: 800 18px Manrope, sans-serif; letter-spacing: -1px; }
.brand-light .brand-mark { color: #113944; background: #75d2c1; }
.story-copy { max-width: 520px; margin: 20px auto 12px; }
.eyebrow { margin: 0 0 9px; color: #819299; font: 500 10px 'DM Mono', monospace; letter-spacing: 1.5px; }
.eyebrow.light { color: #8fc8c2; }
.story-copy h1 { margin: 0; font: 600 clamp(45px, 5.2vw, 73px)/1.08 Manrope, sans-serif; letter-spacing: -3px; }
.story-copy h1 em { color: #78d2c2; font-style: normal; }
.story-lede { max-width: 390px; margin-top: 21px; color: #c5d2d5; font-size: 16px; line-height: 1.72; }
.story-foot { display: flex; align-items: center; gap: 9px; color: #b7c9cd; font-size: 12px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #80d4bc; box-shadow: 0 0 0 4px rgba(128, 212, 188, .13); }
.story-orbit { position: absolute; z-index: 0; border: 1px solid rgba(197, 228, 226, .07); border-radius: 50%; pointer-events: none; }
.orbit-one { width: 560px; height: 560px; right: -260px; bottom: -240px; }
.orbit-two { width: 760px; height: 760px; right: -360px; bottom: -340px; }
.auth-side { display: grid; place-items: center; padding: 36px; }
.auth-card { width: min(100%, 425px); padding: 28px 5px; }
.auth-card h2 { margin: 0 0 7px; font: 700 30px Manrope, sans-serif; letter-spacing: -1.1px; }
.muted { color: var(--muted); line-height: 1.6; }
.auth-card > .muted { margin: 0 0 27px; font-size: 14px; }
.auth-mobile-brand { display: none; margin-bottom: 40px; }
.form-stack { display: grid; gap: 16px; }
label { display: grid; gap: 7px; color: #334c57; font-size: 12px; font-weight: 600; }
input, select, textarea { width: 100%; min-width: 0; color: var(--ink); background: #fff; border: 1px solid #dce4e6; border-radius: 8px; outline: none; transition: border-color .16s, box-shadow .16s; }
input, select { height: 43px; padding: 0 12px; }
textarea { padding: 11px 12px; line-height: 1.5; resize: vertical; }
input::placeholder, textarea::placeholder { color: #a4afb3; font-weight: 400; }
input:focus, select:focus, textarea:focus { border-color: #48a6a0; box-shadow: 0 0 0 3px rgba(8, 126, 128, .1); }
.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 13px; padding: 0 17px; border: 1px solid transparent; border-radius: 8px; font-size: 12px; font-weight: 700; transition: transform .15s, background .15s, border-color .15s; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: #fff; background: var(--teal); box-shadow: 0 5px 12px rgba(8, 126, 128, .15); }
.button-primary:hover { background: var(--teal-dark); }
.button-wide { width: 100%; margin-top: 7px; }
.button-small { min-height: 35px; padding: 0 12px; gap: 8px; font-size: 11px; }
.button-outline { color: var(--teal-dark); background: white; border-color: #bfdedd; }
.button-outline:hover { background: #f2f9f8; }
.button-quiet { color: #50646c; background: #f0f4f4; }
.text-button { padding: 0; color: var(--teal-dark); background: none; border: 0; font-size: 12px; font-weight: 700; }
.text-button:hover { text-decoration: underline; }
#forgot-button { margin-top: 17px; }
.resend-verification { margin-top: 10px; }
.auth-switch { margin-top: 28px; padding-top: 20px; color: #849197; border-top: 1px solid #edf0f1; font-size: 12px; }
.auth-switch .text-button { margin-left: 5px; }
.pilot-note { display: flex; align-items: flex-start; gap: 9px; margin: 26px 0 0; padding: 12px 13px; color: #78878d; background: #f5f8f8; border-radius: 7px; font-size: 10px; line-height: 1.5; }
.pilot-note span { color: #b57835; font-size: 12px; }
.inline-result { margin-top: 14px; padding: 12px; color: #275c57; background: #e9f6f2; border: 1px solid #cce9df; border-radius: 7px; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.inline-result a { color: #056e6a; font-weight: 700; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 3; width: 248px; display: flex; flex-direction: column; padding: 27px 17px 18px; background: #fff; border-right: 1px solid #e9eeee; }
.brand-dark { margin: 0 0 30px 8px; color: var(--ink); font-size: 19px; text-decoration: none; }
.brand-dark .brand-mark { width: 31px; height: 31px; font-size: 16px; }
.workspace-pill { height: 43px; display: flex; align-items: center; gap: 10px; margin: 0 2px 29px; padding: 0 10px; overflow: hidden; background: #f4f7f7; border: 1px solid #edf0f0; border-radius: 8px; color: #304953; font-size: 11px; font-weight: 700; }
.workspace-pill > span:nth-child(2) { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-icon { display: grid; place-items: center; width: 24px; height: 24px; color: #087e80; background: #dcefed; border-radius: 6px; font-size: 12px; }
.chevron { color: #8c9ba0; }
.nav-caption { margin: 0 0 8px 11px; color: #99a5a9; font: 500 9px 'DM Mono', monospace; letter-spacing: 1.4px; }
.main-nav { display: grid; gap: 4px; }
.nav-link { width: 100%; height: 41px; display: flex; align-items: center; gap: 11px; padding: 0 11px; color: #66777d; background: transparent; border: 0; border-radius: 7px; text-align: left; font-size: 12px; font-weight: 600; }
.nav-link:hover { color: var(--ink); background: #f5f8f8; }
.nav-link.active { color: #087777; background: #e8f4f2; }
.nav-icon { width: 18px; text-align: center; font-size: 17px; font-weight: 400; }
.sidebar-bottom { margin-top: auto; }
.pilot-card { display: flex; align-items: center; gap: 10px; margin: 0 2px 12px; padding: 11px 10px; background: #f5f7f5; border: 1px solid #edf0ed; border-radius: 8px; }
.pilot-card-icon { display: grid; place-items: center; width: 27px; height: 27px; color: #926225; background: #f5ead5; border-radius: 7px; }
.pilot-card strong, .pilot-card small { display: block; }
.pilot-card strong { font-size: 10px; }
.pilot-card small { margin-top: 3px; color: #869197; font-size: 9px; }
.logout-link { color: #79868a; }
.sidebar-version { padding: 12px 9px 0; color: #9aa5a8; font: 10px 'DM Mono', monospace; }
.sidebar-version span { float: right; }
.main-area { min-height: 100vh; margin-left: 248px; }
.topbar { position: sticky; top: 0; z-index: 2; height: 68px; display: flex; align-items: center; justify-content: space-between; padding: 0 40px; background: rgba(255,255,255,.93); border-bottom: 1px solid #e9eeee; backdrop-filter: blur(10px); }
.breadcrumb { display: flex; align-items: center; gap: 11px; color: #89969b; font-size: 11px; }
.breadcrumb strong { color: #304953; font-weight: 700; }
.crumb-slash { color: #c7d0d2; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.local-chip { display: flex; align-items: center; gap: 6px; color: #738188; font-size: 10px; }
.local-chip i { width: 6px; height: 6px; display: inline-block; background: #62b893; border-radius: 50%; }
.account-menu { position: relative; }
.account-menu .avatar { cursor: pointer; }
.account-dropdown { position: absolute; top: calc(100% + 10px); right: 0; z-index: 5; min-width: 154px; padding: 5px; background: #fff; border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 10px 28px rgba(20,45,55,.14); }
.account-dropdown button { width: 100%; min-height: 38px; display: flex; align-items: center; gap: 9px; padding: 0 10px; color: #425960; background: transparent; border: 0; border-radius: 6px; text-align: left; font-size: 12px; }
.account-dropdown button:hover, .account-dropdown button:focus-visible { color: #087e80; background: #edf7f5; outline: none; }
.avatar { width: 30px; height: 30px; display: grid; place-items: center; color: #087474; background: #e3f1ef; border: 0; border-radius: 50%; font-size: 11px; font-weight: 700; }
.page-view { max-width: 1440px; margin: 0 auto; padding: 37px 40px 54px; }
.welcome-row, .page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.welcome-row h1, .page-heading h1 { margin: 0 0 5px; color: #1e3944; font: 700 clamp(27px, 3vw, 35px)/1.2 Manrope, sans-serif; letter-spacing: -1.3px; }
.welcome-row .muted, .page-heading .muted { margin: 0; font-size: 12px; }
.welcome-dot { color: #0c8b83; }
.today-card { display: flex; align-items: center; gap: 10px; min-width: 124px; margin-bottom: 4px; padding: 10px 13px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.today-icon { color: #087e80; font-size: 21px; }
.today-card small, .today-card strong { display: block; }
.today-card small { color: #8b979b; font: 9px 'DM Mono', monospace; letter-spacing: 1px; }
.today-card strong { margin-top: 3px; font-size: 11px; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.stat-card { min-height: 110px; display: flex; align-items: flex-start; gap: 13px; padding: 18px 19px; background: white; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 3px 12px rgba(20,45,55,.018); }
.stat-icon { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 9px; font-size: 17px; }
.stat-icon.teal { color: #08817d; background: #e3f4f1; }
.stat-icon.green { color: #498667; background: #eaf3eb; }
.stat-icon.sand { color: #a47336; background: #f6f0e7; }
.stat-card span:not(.stat-icon) { display: block; color: #738187; font-size: 10px; }
.stat-card strong { display: block; margin-top: 2px; font: 700 25px Manrope, sans-serif; letter-spacing: -.8px; }
.stat-card small { display: block; margin-top: 1px; color: #a0abad; font-size: 9px; }
.stat-card .stat-next { font-size: 16px; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(220px, .8fr); gap: 15px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 3px 16px rgba(20,45,55,.025); }
.recent-panel { min-height: 260px; padding: 20px 21px 10px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-heading .eyebrow { margin-bottom: 5px; font-size: 9px; }
.panel h2 { margin: 0; font: 700 17px Manrope, sans-serif; letter-spacing: -.4px; }
.panel-heading .text-button { font-size: 10px; }
.document-list { margin-top: 14px; }
.document-row { min-height: 56px; display: flex; align-items: center; gap: 11px; border-top: 1px solid #eff2f2; }
.doc-mark { width: 31px; height: 35px; display: grid; place-items: center; flex: 0 0 auto; color: #0c7d78; background: #e8f4f2; border-radius: 6px; font-size: 13px; }
.doc-main { flex: 1; min-width: 0; }
.doc-main strong, .doc-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-main strong { color: #334d57; font-size: 10px; }
.doc-main small { margin-top: 3px; color: #89969a; font-size: 9px; }
.doc-date { color: #89969a; font: 9px 'DM Mono', monospace; white-space: nowrap; }
.quick-panel { padding: 21px; }
.quick-panel .eyebrow { font-size: 9px; }
.quick-panel h2 { max-width: 210px; margin: 15px 0 7px; font-size: 20px; line-height: 1.3; }
.quick-panel > .muted { margin: 0 0 16px; font-size: 11px; }
.quick-panel .button { min-height: 38px; font-size: 10px; }
.quick-divider { margin: 20px 0 14px; border-top: 1px solid #edf0f0; }
.quick-foot { display: flex; align-items: center; gap: 9px; color: #7b898e; font-size: 9px; line-height: 1.5; }
.quick-shield { width: 24px; height: 24px; display: grid; place-items: center; color: #328264; background: #e8f4eb; border-radius: 50%; font-size: 12px; }
.legal-banner { display: flex; align-items: center; gap: 11px; margin-top: 16px; padding: 12px 14px; color: #856539; background: #fbf6ec; border: 1px solid #f0e6d0; border-radius: 8px; }
.legal-symbol { width: 18px; height: 18px; display: grid; place-items: center; flex: 0 0 auto; color: #fff; background: #c4954e; border-radius: 50%; font: 700 10px Georgia, serif; }
.legal-banner p { flex: 1; margin: 0; font-size: 9px; line-height: 1.55; }
.legal-banner strong { color: #6e512d; }
.banner-close { color: #a38962; background: transparent; border: 0; font-size: 17px; }

.page-heading { align-items: center; margin-bottom: 24px; }
.page-heading .eyebrow { margin-bottom: 6px; }
.page-heading .step-chip { display: flex; align-items: center; gap: 8px; padding: 8px 11px; color: #718086; background: #fff; border: 1px solid var(--line); border-radius: 7px; font-size: 10px; }
.step-chip b { color: #087e80; font: 500 10px 'DM Mono', monospace; }
.service-form { padding: 24px 26px 0; }
.form-section-title { display: flex; gap: 12px; align-items: center; margin-bottom: 17px; }
.section-number { width: 27px; height: 27px; display: grid; place-items: center; color: #087e80; background: #e4f3f1; border-radius: 7px; font: 500 10px 'DM Mono', monospace; }
.form-section-title h2 { margin: 0; font: 700 15px Manrope, sans-serif; }
.form-section-title p { margin: 3px 0 0; color: #96a1a4; font-size: 10px; }
.form-section-title.separated { margin-top: 25px; padding-top: 22px; border-top: 1px solid #eef1f1; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 17px; row-gap: 14px; }
.service-form .form-grid { padding-left: 39px; }
.form-grid label { gap: 6px; font-size: 10px; }
.form-grid input, .form-grid select { height: 39px; font-size: 11px; font-weight: 400; }
.form-grid textarea { font-size: 11px; font-weight: 400; }
.form-grid small { color: #9aa5a9; font-size: 9px; font-weight: 400; }
.required { color: #c87540; }
.span-two { grid-column: span 2; }
.input-unit { display: flex; }
.input-unit input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-unit select { width: 72px; border-left: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.form-footer { min-height: 67px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 22px; padding: 12px 0 12px 39px; border-top: 1px solid #eef1f1; }
.form-footer > span { color: #8a979a; font-size: 9px; }
.form-footer > span b { margin-right: 4px; color: #3c956e; }
.form-footer .button { min-height: 39px; }
.issued-result { margin: 0 0 20px 39px; padding: 15px; color: #265b55; background: #e9f6f2; border: 1px solid #cde9e0; border-radius: 8px; font-size: 11px; }
.issued-result a { color: #076c69; font-weight: 700; }
.issued-result .result-links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 7px; }

.archive-panel { overflow: hidden; }
.archive-toolbar { min-height: 61px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 17px; border-bottom: 1px solid #edf0f0; }
.search-box { width: min(470px, 74%); height: 36px; display: flex; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid #e2e8e9; border-radius: 7px; }
.search-box > span { color: #8c9b9f; font-size: 20px; }
.search-box input { height: 30px; padding: 0; border: 0; box-shadow: none; font-size: 10px; }
.search-box input:focus { box-shadow: none; }
.result-count { color: #879499; font-size: 10px; white-space: nowrap; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { height: 38px; padding: 0 12px; color: #96a1a5; background: #fbfcfc; font: 500 8px 'DM Mono', monospace; letter-spacing: .6px; white-space: nowrap; }
th:first-child, td:first-child { padding-left: 18px; }
td { height: 57px; padding: 8px 12px; border-top: 1px solid #f0f2f2; color: #63747a; font-size: 10px; white-space: nowrap; }
td strong { display: block; color: #304a54; font-size: 10px; }
td small { display: block; margin-top: 3px; color: #9aa5a8; font-size: 8px; }
.status-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 12px; color: #488264; background: #edf6ef; font-size: 8px; }
.status-pill::before { width: 5px; height: 5px; display: inline-block; content: ''; background: currentColor; border-radius: 50%; }
.status-pill.complete { color: #8c969a; background: #f0f2f2; }
.row-actions { display: flex; justify-content: flex-end; gap: 6px; }
.icon-action { min-width: 27px; height: 27px; padding: 0 7px; color: #4e6972; background: white; border: 1px solid #e1e8e9; border-radius: 6px; font-size: 10px; text-decoration: none; }
.icon-action:hover { color: #067c79; border-color: #add4d0; }
.icon-action.danger { color: #9b6258; }
.archive-table { table-layout: fixed; }
.archive-table th:nth-child(1) { width: 17%; }
.archive-table th:nth-child(2) { width: 25%; }
.archive-table th:nth-child(3) { width: 24%; }
.archive-table th:nth-child(4) { width: 14%; }
.archive-table th:nth-child(5) { width: 5%; }
.archive-table td { overflow: hidden; text-overflow: ellipsis; }
.archive-table .archive-shipper-cell { white-space: normal; }
.archive-table .archive-details-cell { overflow: visible; text-align: right; }
.archive-table .archive-actions-cell { overflow: visible; text-align: center; }
.actions-menu { position: relative; display: inline-block; }
.actions-menu summary { width: 30px; height: 30px; display: grid; place-items: center; color: #4e6972; background: #fff; border: 1px solid #e1e8e9; border-radius: 7px; cursor: pointer; font-size: 20px; line-height: 1; list-style: none; }
.actions-menu summary::-webkit-details-marker { display: none; }
.actions-menu[open] summary, .actions-menu summary:hover { color: #087e80; border-color: #add4d0; }
.actions-dropdown { position: fixed; top: 0; right: auto; z-index: 20; min-width: 180px; max-width: calc(100vw - 16px); max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); overflow-y: auto; overscroll-behavior: contain; padding: 5px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 28px rgba(20,45,55,.14); text-align: left; }
.actions-dropdown button, .actions-dropdown a { width: 100%; min-height: 36px; display: flex; align-items: center; padding: 0 10px; color: #425960; background: transparent; border: 0; border-radius: 5px; font-size: 11px; text-decoration: none; white-space: nowrap; }
.actions-dropdown button:hover, .actions-dropdown a:hover { color: #087e80; background: #edf7f5; }
.details-content { margin-top: 20px; }
.details-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 18px; margin: 0; }
.details-grid > div { min-width: 0; padding: 12px 0; border-top: 1px solid #edf0f0; }
.details-grid dt { color: #879499; font-size: 10px; }
.details-grid dd { margin: 5px 0 0; color: #304a54; font-size: 13px; overflow-wrap: anywhere; }
.details-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 17px; }
.empty-state { display: grid; justify-items: center; padding: 56px 16px; color: #7c8b90; text-align: center; }
.empty-state > span { margin-bottom: 10px; color: #8bbebb; font-size: 28px; }
.empty-state strong { color: #3e5862; font-size: 13px; }
.empty-state p { margin: 6px 0 15px; font-size: 10px; }

.agenda-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .8fr); align-items: start; gap: 16px; }
.agenda-card { padding: 20px; }
.agenda-count { min-width: 24px; height: 24px; display: grid; place-items: center; color: #087d7b; background: #e7f4f2; border-radius: 7px; font: 10px 'DM Mono', monospace; }
.compact-form { margin-top: 18px; padding: 15px; background: #f8fafa; border: 1px solid #edf1f1; border-radius: 8px; }
.compact-form .form-grid { gap: 10px; }
.compact-form label { font-size: 9px; }
.compact-form input, .compact-form select { height: 35px; font-size: 10px; }
.compact-form .button { margin-top: 13px; }
.agenda-list { margin-top: 14px; }
.agenda-item { min-height: 54px; display: flex; align-items: center; gap: 8px; padding: 8px 2px; border-top: 1px solid #eff2f2; }
.agenda-item > span { width: 28px; height: 28px; display: grid; place-items: center; flex: 0 0 auto; color: #087c79; background: #eaf5f3; border-radius: 7px; }
.agenda-item div { flex: 1; min-width: 0; }
.agenda-item strong, .agenda-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agenda-item strong { color: #3b545d; font-size: 10px; }
.agenda-item small { margin-top: 3px; color: #929da0; font-size: 9px; }
.agenda-remove { color: #a47b72; background: transparent; border: 0; font-size: 15px; }

.profile-panel { padding: 24px 27px 0; }
.profile-intro { display: flex; align-items: center; gap: 13px; margin-bottom: 22px; padding-bottom: 19px; border-bottom: 1px solid #edf0f0; }
.profile-avatar { width: 40px; height: 40px; display: grid; place-items: center; color: #087b79; background: #e5f3f1; border-radius: 10px; font-size: 19px; }
.profile-intro h2 { font-size: 15px; }
.profile-intro p { margin: 4px 0 0; color: #919da0; font-size: 10px; }
.profile-panel .form-grid { padding: 0 1px 23px; }
.profile-panel .form-grid label { font-size: 10px; }
.profile-panel .form-grid input { height: 40px; }
.profile-panel .form-footer { padding-left: 0; }

.global-message { margin: 16px 40px 0; padding: 11px 13px; color: #854f1f; background: #fff7e9; border: 1px solid #f0dfc5; border-radius: 7px; font-size: 11px; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 10; max-width: min(390px, calc(100vw - 36px)); padding: 12px 16px; color: #fff; background: #163e49; border-radius: 8px; box-shadow: var(--shadow); font-size: 11px; opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: #9c3d36; }
.amend-dialog { width: min(760px, calc(100vw - 24px)); max-height: min(90vh, 900px); padding: 0; border: 0; border-radius: 13px; box-shadow: 0 28px 100px rgba(12, 36, 45, .24); }
.amend-dialog::backdrop { background: rgba(13, 37, 46, .47); backdrop-filter: blur(3px); }
.amend-dialog form { padding: 24px; }
.versions-dialog { width: min(620px, calc(100vw - 24px)); padding: 0; border: 0; border-radius: 13px; box-shadow: 0 28px 100px rgba(12, 36, 45, .24); }
.versions-dialog::backdrop { background: rgba(13, 37, 46, .47); backdrop-filter: blur(3px); }
.versions-dialog-content { padding: 24px; }
.version-list { margin-top: 18px; }
.version-item { min-height: 66px; display: flex; align-items: center; gap: 11px; border-top: 1px solid #edf0f0; }
.version-badge { width: 31px; height: 31px; display: grid; place-items: center; flex: 0 0 auto; color: #087b79; background: #e7f4f2; border-radius: 8px; font: 10px 'DM Mono', monospace; }
.version-meta { flex: 1; min-width: 0; }
.version-meta strong, .version-meta small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.version-meta strong { color: #405b64; font-size: 10px; }
.version-meta small { margin-top: 3px; color: #89979b; font-size: 9px; }
.dialog-top { display: flex; align-items: center; justify-content: space-between; }
.dialog-top h2 { margin: 0; font: 700 22px Manrope, sans-serif; }
.dialog-close { width: 32px; height: 32px; color: #77858a; background: #f2f5f5; border: 0; border-radius: 7px; font-size: 20px; }
.amend-dialog .muted { margin: 10px 0 18px; font-size: 10px; }
.reason-label { margin-top: 16px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; padding-top: 15px; border-top: 1px solid #edf0f0; }

@media (max-width: 1100px) {
  .sidebar { width: 215px; }
  .main-area { margin-left: 215px; }
  .topbar { padding: 0 26px; }
  .page-view { padding-right: 26px; padding-left: 26px; }
  .content-grid { grid-template-columns: minmax(0, 1.3fr) minmax(200px, .8fr); }
  .stat-card { padding: 15px 13px; }
  .stat-card strong { font-size: 22px; }
}
@media (max-width: 820px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-story { display: none; }
  .auth-side { min-height: 100vh; min-height: 100dvh; padding: 27px 22px; }
  .auth-mobile-brand { display: inline-flex; }
  .auth-card { max-width: 430px; }
  .sidebar { width: 69px; padding: 20px 8px 12px; }
  .brand-dark { justify-content: center; margin: 0 0 27px; }
  .brand-dark > span:last-child, .workspace-pill, .nav-caption, .nav-link:not(.active) { font-size: 0; }
  .workspace-pill { display: none; }
  .main-nav { gap: 7px; }
  .nav-link { height: 43px; justify-content: center; padding: 0; font-size: 0 !important; }
  .nav-link .nav-icon { font-size: 18px; }
  .pilot-card { justify-content: center; padding: 8px 0; }
  .pilot-card > div, .sidebar-version { display: none; }
  .logout-link { font-size: 0 !important; }
  .main-area { margin-left: 69px; }
  .topbar { height: 60px; padding: 0 18px; }
  .topbar-right { gap: 10px; }
  .local-chip { display: none; }
  .page-view { padding: 28px 18px 42px; }
  .content-grid { grid-template-columns: 1fr; }
  .quick-panel { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0 15px; }
  .quick-panel > .eyebrow, .quick-panel h2, .quick-panel > .muted { grid-column: 1; }
  .quick-panel h2 { margin-top: 4px; }
  .quick-panel .button { grid-column: 2; grid-row: 1 / span 3; min-width: 160px; }
  .quick-divider, .quick-foot { display: none; }
}
@media (max-width: 580px) {
  .sidebar { inset: auto 0 0; width: 100%; height: calc(61px + env(safe-area-inset-bottom)); flex-direction: row; padding: 5px 7px calc(5px + env(safe-area-inset-bottom)); border-top: 1px solid #e7eded; border-right: 0; }
  .brand-dark, .sidebar-bottom, .nav-caption { display: none; }
  .main-nav { width: 100%; display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; }
  .nav-link { height: 48px; flex-direction: column; justify-content: center; gap: 1px; font-size: 9px !important; }
  .nav-link .nav-icon { height: 21px; font-size: 16px; }
  .main-area { min-height: 100vh; min-height: 100dvh; margin-left: 0; padding-bottom: calc(61px + env(safe-area-inset-bottom)); }
  .topbar { padding: 0 14px; }
  .breadcrumb > span:first-child, .crumb-slash { display: none; }
  .topbar-right { gap: 8px; }
  .topbar-right .button { min-height: 33px; padding: 0 9px; font-size: 9px; }
  body[data-current-page="new"] #top-new-button { display: none; }
  .avatar { width: 27px; height: 27px; }
  .page-view { padding: 24px 13px 30px; }
  .welcome-row, .page-heading { align-items: flex-start; }
  .welcome-row { flex-wrap: wrap; }
  .welcome-row > div:first-child { min-width: 0; flex: 1; }
  .page-heading { flex-direction: column; align-items: stretch; gap: 12px; }
  .page-heading > div { min-width: 0; }
  .welcome-row h1, .page-heading h1 { font-size: 27px; }
  .today-card { min-width: 0; padding: 7px 8px; }
  .today-card strong { font-size: 11px; }
  .today-icon { font-size: 18px; }
  .stat-grid { grid-template-columns: 1fr; gap: 8px; }
  .stat-card { min-height: 76px; align-items: center; padding: 12px 14px; }
  .stat-card strong { margin-top: 0; font-size: 21px; }
  .stat-card small { display: inline; margin-left: 7px; }
  .content-grid { gap: 10px; }
  .recent-panel, .quick-panel { padding: 16px; }
  .quick-panel { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .quick-panel .button { grid-column: 1; grid-row: auto; min-width: 0; width: 100%; margin-top: 9px; }
  .doc-date { display: none; }
  .legal-banner { align-items: flex-start; padding: 10px; }
  .legal-banner p { font-size: 11px; }
  .banner-close { width: 40px; height: 40px; flex: 0 0 auto; }
  .page-heading > .button { align-self: stretch; width: 100%; min-height: 44px; padding: 0 12px; font-size: 12px; }
  .step-chip { display: none !important; }
  .service-form { padding: 17px 13px 0; }
  .service-form .form-grid { padding-left: 0; }
  .form-grid { grid-template-columns: minmax(0, 1fr); column-gap: 0; row-gap: 14px; }
  .form-grid .span-two { grid-column: 1; }
  .form-grid label { font-size: 12px; }
  .form-grid input, .form-grid select { height: 44px; font-size: 16px; }
  .form-grid textarea { min-height: 88px; font-size: 16px; }
  .form-grid small { font-size: 11px; line-height: 1.4; }
  .form-section-title h2 { font-size: 16px; }
  .form-section-title p { font-size: 12px; line-height: 1.35; }
  .form-section-title.separated { margin-top: 19px; padding-top: 17px; }
  .form-footer { align-items: stretch; flex-direction: column; gap: 10px; padding: 13px 0; }
  .form-footer > span { font-size: 11px; line-height: 1.4; }
  .form-footer .button { width: 100%; min-height: 44px; }
  .issued-result { margin-left: 0; }
  .archive-toolbar { align-items: flex-start; flex-direction: column; }
  .search-box { width: 100%; height: 44px; }
  .search-box input { height: 42px; font-size: 16px; }
  .archive-table { table-layout: auto; }
  .archive-table thead { display: none; }
  .archive-table, .archive-table tbody, .archive-table tr { width: 100%; display: block; }
  .archive-table tr { position: relative; display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 4px 8px; padding: 12px 10px; border-top: 1px solid #edf0f0; }
  .archive-table td { height: auto; min-width: 0; display: block; padding: 0; border: 0; overflow: visible; white-space: normal; text-overflow: clip; }
  .archive-table td:first-child { padding-left: 0; }
  .archive-table .archive-date-cell { grid-column: 1; grid-row: 1; color: #304a54; font-size: 12px; font-weight: 700; }
  .archive-table .archive-date-cell strong { font-size: 12px; }
  .archive-table .archive-date-cell small { font-size: 9px; }
  .archive-table .archive-shipper-cell { grid-column: 1; grid-row: 2; padding-right: 58px; color: #52676e; font-size: 12px; line-height: 1.35; }
  .archive-table .archive-route-cell, .archive-table .archive-status-cell { display: none; }
  .archive-table .archive-actions-cell { position: absolute; top: 12px; right: 10px; }
  .actions-menu summary { width: 36px; height: 36px; }
  .actions-dropdown button, .actions-dropdown a { min-height: 42px; }
  .details-grid { grid-template-columns: minmax(0,1fr); }
  .agenda-grid { grid-template-columns: 1fr; }
  .agenda-card { padding: 15px; }
  .compact-form .button { min-height: 44px; }
  .agenda-item { min-height: 58px; }
  .agenda-item strong { font-size: 13px; }
  .agenda-item small { font-size: 11px; }
  .agenda-remove { min-width: 40px; min-height: 40px; }
  .profile-panel { padding: 18px 14px 0; }
  .profile-intro p { font-size: 12px; line-height: 1.4; }
  .profile-panel .form-footer { align-items: stretch; }
  .profile-panel .form-footer .button { width: 100%; }
  .global-message { margin: 12px 13px 0; }
  .amend-dialog, .versions-dialog { width: calc(100vw - 20px); max-height: calc(100vh - 20px); max-height: calc(100dvh - 20px); overflow-y: auto; overscroll-behavior: contain; }
  .amend-dialog form, .versions-dialog-content { padding: 18px 16px; }
  .dialog-top h2 { font-size: 18px; }
  .dialog-close { width: 40px; height: 40px; }
  .amend-dialog .muted { font-size: 12px; line-height: 1.5; }
  .dialog-actions { flex-direction: column; }
  .dialog-actions .button { width: 100%; min-height: 44px; }
  .version-item { display: grid; grid-template-columns: 31px minmax(0, 1fr); gap: 8px; padding: 12px 0; }
  .version-item > .button { grid-column: 2; justify-self: start; min-height: 44px; }
  .toast { right: 12px; bottom: calc(61px + env(safe-area-inset-bottom) + 12px); max-width: calc(100vw - 24px); }
}
