:root {
  color-scheme: light;
  --ink: #17212b;
  --muted: #687582;
  --line: #e4e9ed;
  --paper: #ffffff;
  --canvas: #f4f6f7;
  --navy: #123d78;
  --navy-2: #092b61;
  --teal: #1266e8;
  --teal-soft: #eaf2ff;
  --amber: #d28a24;
  --red: #d84f4f;
  --green: #218a61;
  --shadow: 0 16px 42px rgba(20, 44, 62, .1);
  --radius: 14px;
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", sans-serif;
}
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; }
body { color: var(--ink); background: var(--canvas); font-size: 14px; overflow: hidden; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.eyebrow { color: var(--teal); font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }

.login-screen { min-height: 100%; display: grid; grid-template-columns: minmax(440px, .82fr) minmax(480px, 1.18fr); background: white; }
.login-aside { position: relative; overflow: hidden; padding: 54px 64px; color: white; background:
  radial-gradient(circle at 70% 16%, rgba(20, 113, 255, .35), transparent 30%),
  radial-gradient(circle at 15% 88%, rgba(43, 206, 255, .14), transparent 32%),
  linear-gradient(145deg, #0a2553 0%, #0b3474 56%, #071f48 100%); display: grid; grid-template-rows: auto auto; align-content: center; justify-items: center; gap: 38px; }
.login-aside::after { content: ""; position: absolute; width: 520px; height: 520px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; right: -180px; bottom: -180px; box-shadow: 0 0 0 70px rgba(255,255,255,.025), 0 0 0 140px rgba(255,255,255,.018); }
.login-copy { z-index: 1; width: 100%; max-width: 660px; text-align: center; }
.login-logo { display: block; width: clamp(150px, 15vw, 220px); height: clamp(150px, 15vw, 220px); object-fit: contain; margin: 0 auto 18px; }
.login-copy .eyebrow { color: #73cfff; }
.login-copy h1 { font-size: clamp(30px, 2.8vw, 42px); line-height: 1.19; letter-spacing: -.04em; margin: 14px 0 14px; font-weight: 780; white-space: nowrap; }
.login-copy p { color: rgba(255,255,255,.72); font-size: 15px; margin: 0; white-space: nowrap; }
.login-feature-grid { display: grid; grid-template-columns: repeat(3, auto); justify-content: center; gap: 34px; z-index: 1; width: 100%; }
.login-feature-grid div { display: grid; gap: 5px; min-width: 86px; text-align: center; }
.login-feature-grid strong { color: #73cfff; font-size: 12px; letter-spacing: .1em; }
.login-feature-grid span { color: rgba(255,255,255,.86); }
.login-card { width: min(390px, calc(100% - 64px)); align-self: center; justify-self: center; display: grid; gap: 18px; }
.login-card-head { margin-bottom: 12px; }
.login-card h2 { font-size: 34px; letter-spacing: -.03em; margin: 7px 0 8px; }
.login-card p { margin: 0; color: var(--muted); }
.login-card label, .field { display: grid; gap: 8px; color: #485563; font-size: 13px; font-weight: 700; }
input, select, textarea { width: 100%; min-height: 42px; border: 1px solid #dbe2e7; background: white; color: var(--ink); border-radius: 9px; padding: 9px 11px; outline: none; transition: border .15s, box-shadow .15s; }
textarea { min-height: 78px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(22,140,132,.1); }
.login-card input { min-height: 48px; }
.remember-password { display: flex !important; align-items: center; gap: 10px !important; font-weight: 600 !important; cursor: pointer; margin-top: -5px; }
.remember-password input { width: 18px; height: 18px; min-height: 0; accent-color: var(--teal); }
.remember-password span { display: grid; gap: 2px; }
.remember-password strong { color: #334250; font-size: 13px; }
.remember-password small { color: #929da6; font-size: 10px; font-weight: 400; }
.button { min-height: 38px; padding: 8px 15px; border-radius: 8px; border: 1px solid var(--line); background: white; color: var(--ink); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.button:hover { border-color: #bac6ce; background: #fafcfc; }
.button.primary { color: white; background: var(--teal); border-color: var(--teal); }
.button.primary:hover { background: #107d76; }
.button.danger { color: var(--red); border-color: #f0caca; background: #fffafa; }
.button.small { min-height: 30px; padding: 5px 9px; font-size: 12px; }
.button.ghost { border-color: transparent; background: transparent; }
.login-button { min-height: 50px; justify-content: space-between; padding-inline: 18px; margin-top: 5px; }
.form-error { min-height: 18px; color: var(--red); font-size: 13px; }
.login-tip { text-align: center; color: #8b969f; font-size: 12px; }
.login-version { text-align: center; color: #a1aab1; font-size: 11px; margin-top: -2px; }

.app-shell { width: 100%; height: 100%; display: grid; grid-template-columns: 238px 1fr; }
.sidebar { height: 100%; background: var(--navy-2); color: white; padding: 23px 14px 18px; display: grid; grid-template-rows: auto 1fr auto; overflow: hidden; }
.brand { display: flex; gap: 11px; align-items: center; padding: 0 10px 22px; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand-icon { width: 45px; height: 45px; object-fit: contain; flex: 0 0 auto; }
.brand-copy { display: grid; gap: 2px; }
.brand-copy strong { font-size: 16px; letter-spacing: .02em; }
.brand-copy small { font-size: 10px; color: rgba(255,255,255,.45); letter-spacing: .08em; }
.main-nav { overflow-y: auto; padding: 16px 0; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent; }
.nav-group { margin-bottom: 16px; }
.nav-group-title { color: rgba(255,255,255,.35); font-size: 10px; letter-spacing: .12em; font-weight: 800; padding: 5px 12px 7px; }
.nav-item { width: 100%; border: 0; background: transparent; color: rgba(255,255,255,.67); min-height: 39px; border-radius: 8px; padding: 8px 11px; display: flex; gap: 10px; align-items: center; text-align: left; font-size: 13px; }
.nav-item:hover { background: rgba(255,255,255,.06); color: white; }
.nav-item.active { background: rgba(42, 116, 235, .28); color: #dceaff; font-weight: 800; }
.nav-icon { width: 20px; height: 20px; display: grid; place-items: center; text-align: center; font-size: 15px; opacity: .9; flex: 0 0 20px; }
.nav-svg-icon { display: block; width: 18px; height: 18px; }
.nav-letter-icon { display: grid; place-items: center; width: 18px; height: 18px; font: 800 15px/1 Arial, sans-serif; }
.sidebar-foot { border-top: 1px solid rgba(255,255,255,.08); padding: 14px 9px 0; display: grid; gap: 10px; }
.connection-pill { color: rgba(255,255,255,.55); font-size: 11px; display: flex; gap: 7px; align-items: center; }
.connection-pill span { width: 7px; height: 7px; background: #4dd59d; border-radius: 50%; box-shadow: 0 0 0 4px rgba(77,213,157,.1); }
.connection-pill.offline span { background: var(--red); }
.text-button { color: rgba(255,255,255,.5); border: 0; background: transparent; padding: 0; text-align: left; font-size: 11px; }
.main { min-width: 0; height: 100%; display: grid; grid-template-rows: 83px 1fr; overflow: hidden; }
.topbar { background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 14px 28px; }
.breadcrumb { color: #8a959e; font-size: 11px; margin-bottom: 5px; }
.topbar h1 { font-size: 21px; margin: 0; letter-spacing: -.02em; }
.topbar-right { display: flex; gap: 11px; align-items: center; }
.clock { color: var(--muted); font-size: 11px; text-align: right; line-height: 1.5; }
.icon-button { width: 36px; height: 36px; border: 1px solid var(--line); background: white; border-radius: 9px; color: var(--muted); font-size: 18px; }
.user-chip { min-width: 132px; padding: 7px 10px; background: #f4f7f8; border: 1px solid var(--line); border-radius: 9px; display: grid; line-height: 1.3; }
.user-chip strong { font-size: 12px; }
.user-chip span { font-size: 10px; color: var(--muted); }
.view { overflow: auto; padding: 24px 28px 42px; }
.page-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.page-actions .left, .page-actions .right { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.search { width: 260px; position: relative; }
.search input { min-height: 38px; padding-left: 32px; }
.search::before { content: "⌕"; position: absolute; left: 11px; top: 8px; color: #8c979f; font-size: 17px; z-index: 1; }
.muted { color: var(--muted); }
.small-text { font-size: 11px; }

.metric-grid { display: grid; grid-template-columns: repeat(2, minmax(260px, 1fr)); gap: 16px; margin-bottom: 18px; }
.metric-card { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 18px 22px; min-height: 142px; box-shadow: 0 4px 15px rgba(20,44,62,.03); }
.metric-card::before { content: ""; position: absolute; left: 0; top: 18px; width: 3px; height: 32px; border-radius: 0 4px 4px 0; background: var(--teal); }
.metric-label { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 12px; }
.metric-label span:last-child { color: var(--teal); background: var(--teal-soft); min-width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; padding: 0 7px; }
.metric-value-row { display: flex; align-items: baseline; gap: 8px; min-width: 0; margin: 15px 0 5px; white-space: nowrap; }
.metric-value { min-width: 0; font-size: clamp(25px, 2.2vw, 34px); font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.metric-unit { flex: 0 0 auto; color: #354454; font-size: 13px; font-weight: 800; }
.metric-foot { color: #8e99a3; font-size: 11px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(310px, .55fr); gap: 16px; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 4px 15px rgba(20,44,62,.03); overflow: hidden; }
.panel-header { min-height: 56px; padding: 14px 17px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-header h3 { margin: 0; font-size: 14px; }
.panel-header p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.panel-body { padding: 17px; }
.chart { height: 235px; display: flex; align-items: end; gap: 11px; padding: 20px 6px 3px; border-bottom: 1px solid var(--line); }
.chart-column { flex: 1; min-width: 20px; height: 100%; display: flex; align-items: end; justify-content: center; gap: 3px; position: relative; }
.chart-bar { width: min(19px, 42%); min-height: 2px; border-radius: 5px 5px 0 0; background: var(--teal); opacity: .88; }
.chart-bar.cogs { background: #b9c8d2; }
.chart-label { position: absolute; bottom: -20px; font-size: 9px; color: #8d979f; white-space: nowrap; }
.quick-list { display: grid; gap: 9px; }
.quick-item { min-height: 54px; border: 1px solid var(--line); border-radius: 10px; display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; background: #fbfcfc; text-align: left; }
.quick-item > span { flex: 1; min-width: 0; text-align: left; }
.quick-item strong { font-size: 12px; }
.quick-item span { color: var(--muted); font-size: 10px; }
.quick-item b { color: var(--teal); font-size: 17px; }
.locked-account { color: var(--muted); font-size: 11px; white-space: nowrap; }

.table-card { background: white; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: 0 4px 15px rgba(20,44,62,.03); }
.table-wrap { overflow: auto; max-height: calc(100vh - 235px); }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th { position: sticky; top: 0; z-index: 2; background: #f7f9fa; color: #667480; font-size: 10px; letter-spacing: .04em; text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); font-weight: 800; }
td { padding: 11px 12px; border-bottom: 1px solid #edf0f2; font-size: 12px; vertical-align: middle; }
tbody tr:hover { background: #fbfdfd; }
tbody tr:last-child td { border-bottom: 0; }
.number { text-align: right; font-variant-numeric: tabular-nums; }
.mono { font-family: Consolas, "Microsoft YaHei UI", monospace; letter-spacing: .015em; }
.primary-cell { display: grid; gap: 3px; }
.primary-cell strong { font-size: 12px; }
.primary-cell span { color: var(--muted); font-size: 10px; }
.status { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 4px 8px; font-size: 10px; font-weight: 800; background: #eef2f4; color: #65727d; }
.status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status.approved, .status.settled, .status.received, .status.shipped, .status.completed, .status.open, .status.normal { color: var(--green); background: #eaf7f0; }
.status.pending, .status.partial, .status.low, .status.high { color: var(--amber); background: #fff5e5; }
.status.rejected, .status.out, .status.critical, .status.closed { color: var(--red); background: #fff0f0; }
.status.draft { color: #687582; }
.status.in_transit { color: var(--amber); background: #fff5e5; }
.status.in_progress { color: var(--primary); background: #eaf0ff; }
.status.paused { color: var(--amber); background: #fff5e5; }
.status.cancelled { color: var(--red); background: #fff0f0; }
.status.posted { color: var(--green); background: #eaf7f0; }
.compact-metrics { margin-top: 16px; }
.amazon-stock-panel { margin-top: 18px; }
.section-title { margin: 0 0 10px; font-size: 14px; }
.panel-body > .table-card { box-shadow: none; }
.actions { display: flex; gap: 5px; }
.empty { min-height: 280px; display: grid; place-items: center; color: var(--muted); text-align: center; }
.empty-icon { display: block; font-size: 35px; color: #c2cbd1; margin-bottom: 8px; }

.modal-layer { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(8, 27, 40, .56); backdrop-filter: blur(3px); }
.modal-card { position: relative; width: min(920px, 96vw); max-height: 92vh; background: white; border-radius: 16px; box-shadow: 0 30px 80px rgba(5,24,37,.32); overflow: hidden; display: grid; grid-template-rows: auto 1fr; }
.modal-card > header { min-height: 72px; border-bottom: 1px solid var(--line); padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; }
.modal-card h2 { margin: 4px 0 0; font-size: 19px; }
.modal-close { border: 0; background: #f2f5f6; width: 34px; height: 34px; border-radius: 9px; color: var(--muted); font-size: 22px; }
.modal-body { overflow: auto; padding: 20px; }
.form-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; }
.field { grid-column: span 4; }
.field.half { grid-column: span 6; }
.field.wide { grid-column: 1 / -1; }
.form-grid > .notice.wide { grid-column: 1 / -1; }
.field.quarter { grid-column: span 3; }
.field small { color: #95a0a8; font-weight: 400; }
.field-label-row { min-height: 18px; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.field-label-row small { color: #7e8b97; font-size: 10px; font-weight: 400; text-align: right; }
.password-fields { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.password-fields .field { grid-column: auto; }
.checkbox-field { display: flex; gap: 8px; align-items: center; min-height: 42px; }
.checkbox-field input { min-height: 0; width: auto; }
.form-section { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 4px; }
.form-section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.form-section-title h3 { font-size: 13px; margin: 0; }
.line-table { border: 1px solid var(--line); border-radius: 10px; overflow: auto; }
.line-table table { min-width: 780px; }
.line-table input, .line-table select { min-height: 34px; padding: 6px 8px; border-radius: 6px; min-width: 68px; }
.line-table .purchase-product-autocomplete { min-width: 360px; width: 360px; }
.line-table .purchase-product-input { min-width: 360px; width: 360px; }
.line-table input[readonly] { background: #f5f7f8; color: var(--muted); }
.line-table td { padding: 7px; }
.purchase-product-autocomplete { position: relative; z-index: 1; }
.purchase-product-autocomplete:focus-within { z-index: 20; }
.purchase-product-suggestions { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; width: 100%; max-height: 240px; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 12px 30px rgba(21, 37, 54, .18); padding: 4px; }
.purchase-product-suggestions[hidden] { display: none; }
.purchase-product-option { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 6px; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.purchase-product-option:hover, .purchase-product-option.active { background: #edf4ff; }
.purchase-product-option strong { min-width: 110px; }
.purchase-product-option span { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.purchase-product-empty { padding: 9px 10px; color: var(--muted); }
.purchase-order-compact-fields { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 12px; }
.purchase-order-compact-fields .field { grid-column: auto; min-width: 0; }
.purchase-order-compact-fields .field-label-row { min-height: 16px; }
.purchase-order-compact-fields input, .purchase-order-compact-fields select { min-height: 38px; padding: 8px 10px; }
.modal-card.purchase-order-dialog { width: min(1760px, 98vw) !important; }
.purchase-order-line-table { min-height: 286px; }
.purchase-order-line-table table { min-width: 1540px; width: 100%; }
.purchase-order-add-row td { padding: 10px 7px; border-top: 1px solid var(--line); text-align: left; }
.purchase-order-add-row .button { min-width: 112px; }
.line-remove { width: 28px; height: 28px; border: 0; border-radius: 6px; color: var(--red); background: #fff1f1; }
.form-footer { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 9px; padding-top: 16px; border-top: 1px solid var(--line); margin-top: 8px; }
.form-summary { grid-column: 1 / -1; background: #f2f8f7; border: 1px solid #d9eeeb; border-radius: 10px; padding: 11px 13px; color: #42645f; display: flex; gap: 24px; justify-content: flex-end; font-size: 12px; }
.form-summary strong { color: var(--ink); }
.detail-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.detail-cell { padding: 10px; background: #f7f9fa; border-radius: 8px; }
.detail-cell span { display: block; color: var(--muted); font-size: 10px; margin-bottom: 4px; }
.detail-cell strong { font-size: 12px; }
.confirm-copy { line-height: 1.7; color: #46545f; }

.tabs { display: flex; gap: 4px; padding: 4px; background: #eaf0f2; border-radius: 9px; }
.tab { border: 0; background: transparent; color: var(--muted); padding: 7px 12px; border-radius: 6px; font-size: 11px; }
.tab.active { color: var(--ink); background: white; box-shadow: 0 2px 6px rgba(20,44,62,.08); font-weight: 800; }
.notice { border: 1px solid #d9e9ef; background: #f1f8fb; color: #426376; border-radius: 10px; padding: 12px 14px; margin-bottom: 15px; font-size: 12px; line-height: 1.6; }
.notice.warning { border-color: #f0dfbf; background: #fff9ed; color: #795d2c; }

.freight-shipment-link { border: 0; padding: 0; background: transparent; color: #2f6bea; font-weight: 800; text-decoration: underline; text-decoration-color: #abc5fa; text-underline-offset: 3px; cursor: pointer; }
.freight-shipment-link:hover { color: #174ebd; text-decoration-color: currentColor; }
.freight-shipment-link:focus-visible { outline: 3px solid rgba(47,107,234,.2); outline-offset: 4px; border-radius: 3px; }
.freight-cost-field { display: inline-flex; align-items: center; width: min(190px, 100%); border: 1px solid #dce6f3; border-radius: 9px; background: #fff; overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.freight-cost-field:focus-within { border-color: #7fa9f2; box-shadow: 0 0 0 4px rgba(47,107,234,.1); }
.freight-cost-field > span { padding-left: 11px; color: #51617a; font-weight: 700; }
.freight-cost-field input { min-height: 38px; border: 0; border-radius: 0; padding-left: 5px; box-shadow: none; font-variant-numeric: tabular-nums; }
.freight-cost-field input:focus { box-shadow: none; }
.freight-cost-field input::placeholder { color: #738199; opacity: 1; }
.freight-empty-list { display: grid; min-height: 84px; place-items: center; color: var(--muted); font-size: 12px; }
.freight-lower-panel { width: 100%; margin-top: 18px; padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 10px 30px rgba(35,63,100,.06); }
.freight-panel-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 15px; }
.freight-panel-header h3 { margin: 0; color: #15213b; font-size: 17px; }
.freight-panel-header p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.freight-panel-header select { width: 160px; min-height: 38px; }
.freight-chart-filters { display: flex; align-items: center; gap: 10px; }
.freight-chart-filters [data-fba-freight-country] { width: 210px; }
.freight-close { width: 34px; height: 34px; border: 0; border-radius: 9px; background: #f0f4fa; color: #61708a; font-size: 21px; line-height: 1; cursor: pointer; }
.freight-close:hover { background: #e2eafb; color: #263859; }
.freight-detail-panel > .table-card { box-shadow: none; }
.freight-detail-panel .table-wrap { max-height: 430px; }
.freight-chart-legend { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 18px; margin: -2px 0 8px; color: #65758e; font-size: 11px; }
.freight-chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.freight-chart-legend i { width: 9px; height: 9px; border-radius: 3px; background: #2f6bea; }
.freight-chart-legend i.cost { background: #5dc5e8; }
.freight-chart-legend i.average { height: 3px; border-radius: 2px; background: #f29d49; }
.freight-chart { overflow-x: auto; }
.freight-chart svg { display: block; width: 100%; min-width: 720px; height: auto; }
.freight-grid line { stroke: #e4ebf5; stroke-width: 1; }
.freight-grid text, .freight-chart svg > text { fill: #71809a; font-size: 11px; font-variant-numeric: tabular-nums; }
.freight-bar { rx: 3px; }
.freight-bar.pieces { fill: #2f6bea; }
.freight-bar.cost { fill: #5dc5e8; }
.freight-average-line { fill: none; stroke: #f29d49; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.freight-average-points circle { fill: #fff; stroke: #f29d49; stroke-width: 3; }
.development-balanced-field > input, .development-balanced-field > textarea { min-height: 78px; }

.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 10px; background: #fff; color: var(--primary); font-size: 10px; font-weight: 800; }
.nav-badge[hidden] { display: none; }
.development-section { margin-bottom: 18px; }
.development-section > .section-heading { margin-bottom: 10px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.section-heading h3, .section-heading h4 { margin: 0; }
.section-heading p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.development-tasks { display: grid; gap: 8px; }
.development-task { display: grid; grid-template-columns: minmax(190px,1.2fr) minmax(220px,1fr) auto auto; align-items: center; gap: 16px; padding: 13px 15px; background: #fff; border: 1px solid var(--line); border-radius: 11px; }
.development-task > div { display: grid; gap: 3px; }
.development-task small, .muted { color: var(--muted); }
.development-progress { width: 110px; height: 6px; overflow: hidden; border-radius: 4px; background: #e7edf1; }
.development-progress i { display: block; height: 100%; border-radius: inherit; background: var(--primary); }
.development-detail { scroll-margin-top: 20px; }
.development-summary { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: 13px 13px 0 0; }
.development-summary h2 { margin: 0 0 8px; font-size: 18px; }
.development-summary p { margin: 0; color: var(--muted); }
.development-percent { display: grid; justify-items: end; gap: 7px; }
.development-percent > strong { font-size: 24px; font-variant-numeric: tabular-nums; }
.development-stepper { display: flex; align-items: center; gap: 5px; overflow-x: auto; padding: 16px 18px; background: #f8fafb; border-inline: 1px solid var(--line); }
.development-stepper > b { color: #b7c1c8; font-weight: 500; }
.development-step { min-width: 94px; border: 0; background: transparent; color: #8a969f; display: grid; justify-items: center; gap: 5px; padding: 7px 8px; border-radius: 8px; cursor: pointer; }
.development-step i { font-style: normal; font-size: 15px; }
.development-step.completed { color: var(--green); }
.development-step.pending, .development-step.in_progress { color: var(--primary); font-weight: 700; }
.development-step.viewing { background: #eaf0ff; box-shadow: inset 0 0 0 1px #cfdaff; }
.development-step small { color: var(--red); font-size: 9px; }
.development-step-card { padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: 0 0 13px 13px; }
.development-step-card > header, .development-step-card > footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.development-step-card > header span { color: var(--muted); font-size: 10px; }
.development-step-card > header h3 { margin: 3px 0 0; }
.development-step-card > .field { margin-top: 18px; }
.development-meta { display: grid; grid-template-columns: repeat(5,minmax(120px,1fr)); gap: 12px; margin-top: 18px; }
.development-meta span { display: grid; gap: 4px; color: var(--muted); font-size: 10px; }
.development-meta strong { color: var(--ink); font-size: 12px; font-weight: 600; }
.development-attachments { margin: 18px 0; padding-top: 16px; border-top: 1px solid var(--line); }
.development-attachments ul { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 7px; }
.development-attachments li { display: flex; align-items: center; gap: 8px; padding: 9px 10px; background: #f7f9fa; border-radius: 8px; }
.development-attachments li > div { display: grid; gap: 2px; margin-right: auto; }
.development-attachments small { color: var(--muted); }
.development-log { margin-top: 14px; background: #fff; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; }
.development-log h3 { margin: 0; padding: 16px 18px; border-bottom: 1px solid var(--line); }
@media (max-width: 900px) { .development-task { grid-template-columns: 1fr auto; } .development-meta { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 720px) { .freight-panel-header { align-items: flex-start; flex-direction: column; } .freight-panel-header .actions { width: 100%; } .freight-chart-filters { width: 100%; flex-direction: column; } .freight-panel-header select, .freight-chart-filters [data-fba-freight-country] { width: 100%; } .freight-chart-legend { justify-content: flex-start; } }
.excel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.excel-card { background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 17px; display: grid; gap: 11px; }
.excel-card .card-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--teal-soft); color: var(--teal); display: grid; place-items: center; font-size: 19px; }
.excel-business-icon { display: block; width: 24px; height: 24px; }
.excel-card .card-icon--products { background: #edf4ff; color: #2563eb; }
.excel-card .card-icon--suppliers { background: #e8f6f4; color: #0f766e; }
.excel-card .card-icon--customers { background: #f2edff; color: #7c3aed; }
.excel-card .card-icon--locations { background: #e9f6fc; color: #0369a1; }
.excel-card .card-icon--opening_inventory { background: #fff4dc; color: #b45309; }
.excel-card .card-icon--opening_ar { background: #eaf7ef; color: #15803d; }
.excel-card .card-icon--opening_ap { background: #ffedf2; color: #be123c; }
.excel-card h3 { margin: 0; font-size: 14px; }
.excel-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; min-height: 32px; }
.excel-actions { display: flex; gap: 7px; }
.toast-root { position: fixed; right: 22px; bottom: 22px; z-index: 100; display: grid; gap: 9px; }
.toast { width: 330px; color: white; background: #213746; border-radius: 10px; padding: 12px 14px; box-shadow: var(--shadow); animation: toast-in .22s ease-out; font-size: 12px; line-height: 1.5; }
.toast.error { background: #9f3838; }
.toast.success { background: #176f56; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
.loading { min-height: 250px; display: grid; place-items: center; color: var(--muted); }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid #dfe6e9; border-top-color: var(--teal); animation: spin .7s linear infinite; margin: auto auto 8px; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1100px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .excel-grid { grid-template-columns: repeat(2, 1fr); }
  .app-shell { grid-template-columns: 214px 1fr; }
  .sidebar { padding-inline: 10px; }
}
@media (max-width: 800px) {
  .login-screen { grid-template-columns: 1fr; }
  .login-aside { display: none; }
  .app-shell { grid-template-columns: 68px 1fr; }
  .brand-copy, .nav-item span:not(.nav-icon), .nav-group-title, .sidebar-foot { display: none; }
  .brand { padding-inline: 2px; justify-content: center; }
  .nav-item { justify-content: center; padding: 8px; }
  .view { padding: 18px; }
  .topbar { padding-inline: 18px; }
  .clock { display: none; }
  .field, .field.half, .field.quarter { grid-column: 1 / -1; }
  .password-fields { grid-template-columns: 1fr; }
  .excel-grid { grid-template-columns: 1fr; }
}
.desktop-server-panel { margin-top: 16px; }
.desktop-server-form { padding: 0 20px 20px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 16px; align-items: end; }
.desktop-server-address { display: grid; gap: 8px; min-width: 0; font-size: 13px; }
.desktop-server-address input { width: 100%; min-width: 0; }
.desktop-server-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.desktop-server-startup { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); }
.desktop-server-startup input { width: auto; min-height: 0; }
.desktop-server-note, .desktop-server-status { grid-column: 1 / -1; margin: 0; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.desktop-server-note { color: var(--muted); }
.desktop-server-status { color: var(--ink); }
.desktop-server-recovery { margin-top: 8px; justify-self: start; }
.modal-body .desktop-server-panel { margin-top: 0; }
.amazon-module-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin:16px 0; }
.amazon-module { min-height:112px; padding:16px; text-align:left; border:1px solid var(--line); border-radius:14px; background:#fff; color:var(--ink); display:grid; gap:5px; transition:.18s ease; }
.amazon-module:hover { transform:translateY(-2px); border-color:#9db8c4; }
.amazon-module.active { background:#173650; border-color:#173650; color:white; box-shadow:0 12px 24px rgba(23,54,80,.16); }
.amazon-module > span { color:var(--teal); font:700 10px/1 monospace; letter-spacing:.12em; }
.amazon-module strong { font-size:15px; }
.amazon-module small { color:var(--muted); font-size:10px; }
.amazon-module.active small { color:#b9ceda; }
.amazon-content > .panel-body { display:grid; gap:18px; }
.analytics-panel { border-top:1px solid var(--line); padding:20px 4px 2px; }
.analytics-chart-scroll { overflow-x:auto; padding-bottom:2px; }
.analytics-chart-scroll .analytics-chart { min-width:620px; }
.monthly-trend-panel { margin-top:18px; margin-bottom:18px; }
.monthly-trend-header { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px; margin-bottom:4px; }
.monthly-trend-panel > p { margin:0 0 18px; color:var(--muted); font-size:11px; }
.chart-legend { flex-wrap:wrap; }
.analytics-bar.negative { border-radius:1px 1px 5px 5px; }
.view:has(.cash-value-chart) { min-width:0; max-width:100%; }
.analytics-chart.cash-value-chart { padding-top:38px; gap:6px; }
.cash-value-chart .analytics-column { min-width:var(--cash-column-width,70px); gap:6px; cursor:default; }
.cash-bar-slot { position:relative; display:flex; align-items:flex-end; justify-content:center; height:100%; min-width:var(--cash-label-width,64px); flex:1; }
.cash-bar-slot .analytics-bar { position:relative; width:18px; }
.analytics-bar-value { position:absolute; inset-block-end:calc(100% + 6px); inset-inline-start:50%; transform:translateX(-50%); white-space:nowrap; color:var(--ink,#1c2541); font-size:11px; font-variant-numeric:tabular-nums; font-weight:600; }
.cash-approval-status { display:grid; gap:5px; min-width:190px; white-space:normal; overflow-wrap:anywhere; }
.workspace-replenishment .table-wrap { overflow:auto; }
.workspace-replenishment thead { position:sticky; top:0; background:var(--surface,#fff); z-index:1; }
[data-master-associated][hidden], [data-master-payee][hidden] { display:none !important; }
.freight-order-list .table-wrap { overflow:auto; }
.freight-order-list thead { position:sticky; top:0; z-index:1; background:var(--surface,#fff); }
.reimbursement-identity { display:flex; flex-wrap:wrap; gap:12px 24px; }
[data-advance-party][hidden], [data-advance-currency][hidden] { display:none !important; }
[data-advance-bank][hidden], [data-normal-payment-account][hidden] { display:none !important; }
[data-advance-receipt][hidden] { display:none !important; }
.analytics-panel h3 { margin:0 0 4px; font-size:14px; }.analytics-panel>p{margin:0 0 18px;color:var(--muted);font-size:11px}
.analytics-chart { height:220px; display:flex; gap:10px; align-items:flex-end; padding:18px 8px 28px; border-left:1px solid var(--line); border-bottom:1px solid var(--line); }
.analytics-column { position:relative; flex:1; height:100%; min-width:34px; border:0; background:transparent; display:flex; align-items:flex-end; justify-content:center; gap:3px; padding:0; }
.analytics-column small { position:absolute; top:calc(100% + 8px); white-space:nowrap; color:var(--muted);font-size:11px}.analytics-bar{width:min(18px,28%);background:#244862;border-radius:5px 5px 1px 1px;min-height:3px}.analytics-bar.cyan,.chart-legend i.cyan{background:#218e91}.analytics-bar.amber,.chart-legend i.amber{background:#c78a2d}
.chart-legend{display:flex;justify-content:center;gap:18px;margin-top:14px;color:var(--muted);font-size:10px}.chart-legend span{display:flex;align-items:center;gap:6px}.chart-legend i{width:9px;height:9px;border-radius:2px;background:#244862}
.filter-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0 0 14px}.filter-actions>span,.filter-actions label{font-size:12px;color:var(--muted)}.filter-actions label{display:flex;align-items:center;gap:8px}.filter-actions select{min-height:34px;padding:6px 28px 6px 10px}.filter-actions select[data-fba-inventory-export]{width:220px}
.warehouse-distribution{width:100%;padding-left:0;padding-right:0}.warehouse-map{position:relative;width:100%;max-width:none;margin:0;background:#edf5f6;border-radius:14px;overflow:hidden}.warehouse-map>img{display:block;width:100%;height:auto;border-radius:14px}.map-pin{position:absolute;transform:translate(-50%,-100%);border:0;background:transparent;display:grid;justify-items:center;color:#173650;z-index:2}.map-pin>span{width:13px;height:13px;border:3px solid white;border-radius:50% 50% 50% 0;background:#e05252;box-shadow:0 2px 7px #49616b;transform:rotate(-45deg)}.map-pin>b{margin-top:3px;padding:2px 5px;background:white;border-radius:4px;font-size:8px;box-shadow:0 2px 5px rgba(0,0,0,.12)}.map-pin em{display:none;position:absolute;left:50%;bottom:calc(100% + 10px);width:230px;transform:translateX(-50%);padding:10px 12px;border-radius:9px;background:#173650;color:#dbe8ee;text-align:left;font-style:normal;font-size:10px;line-height:1.55;box-shadow:0 10px 30px rgba(6,31,48,.24);z-index:5}.map-pin em strong{display:block;color:white;margin-bottom:3px}.map-pin:hover em,.map-pin:focus-visible em{display:block}.map-empty{position:absolute;left:50%;bottom:8%;transform:translateX(-50%);background:rgba(255,255,255,.9);padding:8px 12px;border-radius:8px;color:var(--muted);font-size:10px}
.multi-select{position:relative;border:1px solid var(--line);border-radius:9px;background:#fff}.multi-select summary{min-height:42px;padding:11px 12px;cursor:pointer;color:var(--muted);list-style:none}.multi-select summary::-webkit-details-marker{display:none}.multi-select>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;padding:8px;border-top:1px solid var(--line)}.multi-select label{display:flex;gap:8px;align-items:center;padding:8px;border-radius:7px;background:#f6f8f9;font-size:11px}.multi-select input{width:auto;min-height:0}.multi-select strong{color:var(--teal)}
.filter-chip{justify-self:start;background:#e9f5f4;color:#176f6b;border-radius:999px;padding:7px 10px;font-size:11px}.filter-chip button{border:0;background:transparent;color:inherit}.segmented{display:flex;background:#edf2f4;border-radius:8px;padding:3px}.segmented button{border:0;background:transparent;padding:6px 10px;border-radius:6px;font-size:10px}.segmented button.active{background:white;box-shadow:0 1px 4px rgba(0,0,0,.08)}
.approval-flow{display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap}.approval-flow span{padding:10px 12px;background:#f1f6f7;border-radius:9px;text-align:center;font-weight:700}.approval-flow small{color:var(--muted);font-weight:400}.approval-flow b{color:var(--teal)}.role-checks{display:flex;gap:10px;flex-wrap:wrap;margin-top:8px}.role-checks label{display:flex;gap:7px;align-items:center;padding:10px 12px;background:#f5f7f8;border:1px solid var(--line);border-radius:9px}.role-checks input{width:auto;min-height:0}
.organization-stack{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;margin-bottom:16px}.organization-stack .approval-flow{justify-content:flex-start}.organization-stack .panel-body{min-width:0}
.finance-visuals{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:18px}.finance-visuals .analytics-panel{border:1px solid var(--line);border-radius:14px;padding:20px;background:#fff}.donut-layout{display:grid;grid-template-columns:190px 1fr;gap:24px;align-items:center;min-height:230px}.donut{width:180px;aspect-ratio:1;border-radius:50%;display:grid;place-items:center;position:relative}.donut::after{content:"";position:absolute;inset:34px;border-radius:50%;background:#fff}.donut strong{position:relative;z-index:1;font-size:13px}.donut-legend{display:grid;gap:9px}.donut-legend span{display:grid;grid-template-columns:10px 1fr auto;gap:8px;align-items:center;color:var(--muted);font-size:11px}.donut-legend i{width:9px;height:9px;border-radius:3px}.donut-legend b{color:var(--ink);font-weight:650}
@media (max-width: 800px) {
  .desktop-server-form { grid-template-columns: minmax(0, 1fr); }
  .desktop-server-buttons { width: 100%; }
  .desktop-server-buttons .button { flex: 1; }
  .amazon-module-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .finance-visuals { grid-template-columns:1fr; }
  .donut-layout { grid-template-columns:1fr; justify-items:center; }
}

/* Previous visual system: presentation-only refresh for the shared shell, dashboard and enterprise page. */
:root {
  --ink: #14213d;
  --muted: #74839b;
  --line: #e4eaf4;
  --canvas: #f5f8fd;
  --navy-2: #102b67;
  --teal: #2f6bea;
  --teal-soft: #edf3ff;
  --shadow: 0 16px 40px rgba(38, 75, 137, .08);
  --radius: 16px;
}
body { background: radial-gradient(circle at 75% -10%, #eaf1ff 0, transparent 34%), var(--canvas); }
.app-shell { grid-template-columns: 244px 1fr; background: transparent; }
.sidebar { background: linear-gradient(180deg, #1d3978 0%, #102b67 54%, #0c2455 100%); padding: 22px 15px 18px; }
.brand { padding: 0 9px 21px; }
.brand-icon { width: 47px; height: 47px; }
.brand-copy strong { font-size: 17px; }
.brand-copy small { color: rgba(255,255,255,.52); }
.nav-group { margin-bottom: 17px; }
.nav-group-title { color: rgba(255,255,255,.4); font-size: 10px; padding-inline: 12px; }
.nav-item { min-height: 40px; border-radius: 11px; padding-inline: 12px; color: rgba(255,255,255,.72); }
.nav-item:hover { background: rgba(255,255,255,.08); }
.nav-item.active { background: linear-gradient(100deg, #326fe9 0%, #4c83f6 100%); color: #fff; box-shadow: 0 10px 24px rgba(28, 83, 202, .34); }
.main { grid-template-rows: 74px 1fr; }
.topbar { position:relative; z-index:30; overflow:visible; padding: 12px 32px; background: rgba(255,255,255,.83); border-bottom-color: rgba(218,226,240,.86); backdrop-filter: blur(14px); }
.topbar:has(.notification-panel:not(.hidden)) { z-index:100; }
.topbar-left { min-width: 0; display: flex; align-items: center; gap: 24px; }
.topbar-search { width: min(550px, 43vw); min-height: 42px; display: flex; align-items: center; gap: 10px; padding: 0 10px 0 13px; background: rgba(255,255,255,.82); border: 1px solid #e0e8f5; border-radius: 12px; color: #8897ac; box-shadow: 0 6px 18px rgba(55, 92, 153, .05); }
.topbar-search svg { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.topbar-search input { min-height: 30px; padding: 5px 0; border: 0; background: transparent; box-shadow: none; font-size: 12px; }
.topbar-search input:focus { box-shadow: none; }
.topbar-search input::placeholder { color: #8b99af; }
.search-shortcut { display: inline-flex; gap: 4px; margin-left: auto; }
.search-shortcut kbd { min-width: 25px; padding: 3px 5px; border: 1px solid #e0e7f1; border-radius: 6px; background: #f8faff; color: #8090aa; font: 10px/1.1 "Microsoft YaHei UI", sans-serif; text-align: center; }
.topbar-page-meta { min-width: 0; }
.topbar h1 { font-size: 18px; }
.breadcrumb { color: #8a98ad; }
.topbar-right { gap: 13px; }
.notification-center { position: relative; }
.notification-button { position: relative; width: 36px; height: 36px; border: 0; background: transparent; color: #627391; }
.notification-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.notification-button span { position:absolute; right:0; top:-2px; min-width:17px; height:17px; padding:0 4px; display:grid; place-items:center; border:2px solid #fff; border-radius:9px; background:#e85656; color:#fff; font-size:9px; font-weight:800; }
.notification-button span[hidden] { display:none; }
.notification-panel { position:absolute; z-index:120; right:0; top:44px; width:min(390px,calc(100vw - 36px)); max-height:min(520px,calc(100dvh - 100px)); overflow:auto; border:1px solid #dfe7f3; border-radius:16px; background:#fff; box-shadow:0 20px 50px rgba(31,55,96,.2); }
.notification-panel.hidden { display:none; }
.notification-head { position:sticky; top:0; z-index:1; display:flex; align-items:center; justify-content:space-between; padding:16px 18px; border-bottom:1px solid #edf1f7; background:rgba(255,255,255,.96); }
.notification-head h3 { margin:0; font-size:15px; }
.notification-head button { border:0; background:transparent; color:#2f6bea; font-size:11px; }
.notification-item { width:100%; display:block; padding:14px 18px; border:0; border-bottom:1px solid #edf1f7; background:#fff; text-align:left; }
.notification-item:hover { background:#f7faff; }
.notification-item.unread { background:#f1f6ff; }
.notification-item strong { display:block; color:#17233d; font-size:12px; }
.notification-item small { display:block; margin-top:5px; color:#74839b; line-height:1.5; }
.notification-empty { padding:34px 18px; color:#8996aa; text-align:center; }
.clock { color: #6f7d96; }
.icon-button { border-color: #e1e8f3; background: rgba(255,255,255,.7); color: #627391; }
.user-chip { min-width: 145px; border-color: #e0e8f3; border-radius: 12px; background: rgba(246,249,255,.9); padding: 7px 12px 7px 44px; position: relative; }
.user-chip::before { content: ""; position: absolute; left: 11px; top: 8px; width: 27px; height: 27px; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #fff 0 21%, transparent 23%), linear-gradient(145deg, #9bc0ff, #3f7bed); box-shadow: inset 0 0 0 1px rgba(255,255,255,.8); }
.view { padding: 24px 32px 42px; background: transparent; }
.panel, .table-card { border-color: #e4eaf4; box-shadow: var(--shadow); }
.panel-header { min-height: 64px; padding: 16px 20px; }
.panel-header h3 { color: #192746; font-size: 15px; }
.panel-header p { color: #8a98ad; font-size: 11px; }
.button { min-height: 40px; border-radius: 10px; border-color: #e1e8f2; }
.button.primary { background: #2f6bea; border-color: #2f6bea; }
.button.primary:hover { background: #245bd2; border-color: #245bd2; }

#app-shell[data-current-route="dashboard"] .topbar-page-meta,
#app-shell[data-current-route="system"] .topbar-page-meta { display: none; }

.dashboard-intro, .enterprise-intro { position: relative; min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 24px; overflow: hidden; margin-bottom: 18px; }
.dashboard-intro h2, .enterprise-intro h2 { position: relative; z-index: 1; margin: 0 0 7px; color: #111c37; font-size: clamp(27px, 3vw, 38px); line-height: 1.08; letter-spacing: -.035em; }
.dashboard-intro p, .enterprise-intro p { position: relative; z-index: 1; margin: 0; color: #8997ac; font-size: 12px; }
.dashboard-mountain { position: absolute; right: 0; bottom: 0; width: min(440px, 40%); height: 100%; opacity: .54; pointer-events: none; }
.dashboard-mountain span, .dashboard-mountain b, .dashboard-mountain i { position: absolute; display: block; bottom: -17px; width: 72%; height: 93%; clip-path: polygon(0 100%, 22% 61%, 35% 75%, 57% 21%, 70% 49%, 83% 5%, 100% 100%); background: linear-gradient(145deg, rgba(191,211,255,.18), rgba(105,145,234,.45)); }
.dashboard-mountain span { right: 0; opacity: .62; }
.dashboard-mountain b { right: 27%; bottom: -9px; width: 63%; height: 76%; background: linear-gradient(145deg, rgba(217,228,255,.72), rgba(129,164,239,.34)); }
.dashboard-mountain i { right: 13%; bottom: -23px; width: 55%; height: 63%; background: rgba(90,128,215,.17); }
.dashboard-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.dashboard-metric { position: relative; min-width: 0; min-height: 162px; padding: 20px 20px 17px; overflow: hidden; background: rgba(255,255,255,.88); border: 1px solid #e4eaf4; border-radius: 16px; box-shadow: var(--shadow); }
.dashboard-metric::after { content: ""; position: absolute; right: -36px; bottom: -40px; width: 120px; height: 120px; border-radius: 50%; background: currentColor; opacity: .045; }
.dashboard-metric.blue { color: #326fe9; }
.dashboard-metric.green { color: #2eae87; }
.dashboard-metric.purple { color: #7c5be8; }
.dashboard-metric.orange { color: #e99b53; }
.dashboard-metric-top { display: flex; align-items: center; gap: 10px; }
.dashboard-metric-icon, .dashboard-focus-icon { display: grid; place-items: center; flex: 0 0 auto; width: 42px; height: 42px; border-radius: 12px; }
.dashboard-metric-icon svg, .dashboard-focus-icon svg { width: 21px; height: 21px; }
.dashboard-metric.blue .dashboard-metric-icon, .dashboard-focus-icon.blue { background: #ebf2ff; color: #2f6bea; }
.dashboard-metric.green .dashboard-metric-icon, .dashboard-focus-icon.green { background: #e7f8f1; color: #2eae87; }
.dashboard-metric.purple .dashboard-metric-icon, .dashboard-focus-icon.purple { background: #f0ebff; color: #7c5be8; }
.dashboard-metric.orange .dashboard-metric-icon, .dashboard-focus-icon.orange { background: #fff1e6; color: #e99b53; }
.dashboard-metric-label { color: #53627a; font-size: 12px; font-weight: 750; }
.dashboard-metric-label small { display: inline-grid; place-items: center; width: 13px; height: 13px; margin-left: 3px; border: 1px solid #aebbd0; border-radius: 50%; color: #94a2b7; font-size: 9px; font-weight: 700; }
.dashboard-metric-arrow { margin-left: auto; color: #8796ad; font-size: 23px; line-height: 1; }
.dashboard-metric-value { margin: 17px 0 7px; color: #13203e; font-size: clamp(24px, 2.1vw, 31px); font-weight: 820; letter-spacing: -.035em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dashboard-metric-foot { color: #8997ad; font-size: 11px; }
.dashboard-content-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(330px, .7fr); gap: 16px; }
.dashboard-chart-panel, .dashboard-focus-panel { min-width: 0; }
.dashboard-chart-panel .panel-body { padding: 8px 20px 20px; }
.dashboard-chart-tools { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: flex-end; }
.dashboard-range { padding: 7px 11px; border: 1px solid #e0e8f3; border-radius: 9px; color: #4e5d76; background: #fbfcff; font-size: 11px; }
.chart-legend-inline { display: inline-flex; align-items: center; gap: 7px; color: #65758e; font-size: 11px; white-space: nowrap; }
.chart-legend-inline i { width: 8px; height: 8px; border-radius: 50%; background: #2f6bea; }
.chart-legend-inline i.cost { margin-left: 8px; background: #8d5bed; }
.dashboard-trend { width: 100%; min-height: 300px; display: flex; align-items: center; }
.dashboard-trend svg { width: 100%; height: auto; overflow: visible; }
.trend-grid line { stroke: #eaf0f8; stroke-width: 1; }
.trend-grid text, .trend-labels text { fill: #8997ad; font: 11px "Microsoft YaHei UI", sans-serif; }
.trend-area { stroke: none; }
.trend-area.sales { fill: url(#sales-fill); }
.trend-area.cost { fill: url(#cost-fill); }
.trend-line { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.trend-line.sales { stroke: #2f6bea; }
.trend-line.cost { stroke: #8d5bed; }
.trend-point { stroke: #fff; stroke-width: 2; }
.trend-point.sales { fill: #2f6bea; }
.trend-point.cogs { fill: #8d5bed; }
.dashboard-focus-panel .panel-body { padding: 14px 16px 16px; }
.panel-more { color: #8b99ae; font-size: 18px; letter-spacing: 2px; }
.dashboard-focus-list { display: grid; gap: 10px; }
.dashboard-focus-item { width: 100%; min-width: 0; display: flex; align-items: center; gap: 11px; padding: 11px 12px; border: 1px solid #e4eaf4; border-radius: 12px; background: #fff; color: var(--ink); text-align: left; transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.dashboard-focus-item:hover { border-color: #bfd1f1; transform: translateY(-1px); box-shadow: 0 8px 18px rgba(44, 84, 151, .08); }
.dashboard-focus-icon { width: 36px; height: 36px; border-radius: 10px; }
.dashboard-focus-icon svg { width: 18px; height: 18px; }
.dashboard-focus-copy { min-width: 0; display: grid; gap: 4px; flex: 1; }
.dashboard-focus-copy strong { color: #283650; font-size: 12px; }
.dashboard-focus-copy small { overflow: hidden; color: #92a0b3; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-focus-item b { color: #2f6bea; font-size: 17px; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dashboard-focus-arrow { color: #93a0b4; font-size: 21px; line-height: 1; }
.dashboard-bottom-note { position: relative; min-height: 78px; display: flex; align-items: center; gap: 14px; margin-top: 18px; padding: 15px 28px; overflow: hidden; border: 1px solid #e3ebfa; border-radius: 14px; background: linear-gradient(100deg, #f0f5ff 0%, #f8fbff 55%, #edf3ff 100%); }
.quote-mark { color: #a9c2fa; font: 800 42px/1 Georgia, serif; }
.dashboard-bottom-note div:not(.dashboard-bottom-art) { display: grid; gap: 5px; }
.dashboard-bottom-note strong { color: #46618d; font-size: 13px; }
.dashboard-bottom-note small { color: #8a9ab4; font-size: 10px; }
.dashboard-bottom-art { position: absolute; right: 0; bottom: -13px; width: 38%; height: 94px; opacity: .38; }
.dashboard-bottom-art span, .dashboard-bottom-art b { position: absolute; right: 0; bottom: 0; width: 100%; height: 100%; clip-path: polygon(0 100%, 22% 70%, 37% 80%, 55% 32%, 66% 54%, 82% 7%, 100% 100%); background: #b4cafa; }
.dashboard-bottom-art b { right: 18%; width: 66%; height: 78%; background: #86a7f1; opacity: .7; }

.enterprise-intro { min-height: 82px; }
.enterprise-intro-mark { display: grid; place-items: center; width: 74px; height: 74px; margin-right: 8%; border-radius: 23px; background: linear-gradient(145deg, #edf3ff, #dbe7ff); color: #7298e5; font-size: 37px; font-weight: 850; opacity: .8; }
.enterprise-summary { margin-bottom: 16px; }
.enterprise-summary .panel-body { display: flex; align-items: center; gap: 15px; padding: 17px 21px; }
.enterprise-summary-icon { display: grid; place-items: center; flex: 0 0 auto; width: 51px; height: 51px; border-radius: 14px; background: #ebf2ff; color: #2f6bea; }
.enterprise-summary-icon svg { width: 25px; height: 25px; }
.enterprise-summary-copy { min-width: 0; flex: 1; }
.enterprise-summary-copy > div { display: flex; align-items: center; gap: 10px; }
.enterprise-summary-copy strong { color: #1c2b49; font-size: 15px; }
.enterprise-summary-copy p { margin: 6px 0 0; color: #8a98ad; font-size: 11px; }
.enterprise-summary .status { padding: 4px 8px; }
.enterprise-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); gap: 16px; }
.enterprise-info-panel, .enterprise-side-stack { min-width: 0; }
.enterprise-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 30px; row-gap: 0; padding: 7px 21px 15px; }
.enterprise-info-row { min-width: 0; display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid #edf1f7; }
.enterprise-info-row.wide { grid-column: 1 / -1; }
.enterprise-info-row span, .enterprise-detail-list span { color: #8997ac; font-size: 11px; }
.enterprise-info-row strong, .enterprise-detail-list strong { color: #2a3956; font-size: 12px; text-align: right; overflow-wrap: anywhere; }
.enterprise-side-stack { display: grid; align-content: start; gap: 16px; }
.enterprise-detail-panel .panel-body { padding: 13px 16px 16px; }
.enterprise-detail-panel .quick-list { gap: 8px; }
.enterprise-detail-panel .quick-item { min-height: 52px; background: #fcfdff; }
.enterprise-detail-panel .quick-item span { display: grid; gap: 4px; }
.enterprise-detail-panel .quick-item span span, .enterprise-detail-panel .quick-item span small { color: #93a0b3; font-size: 10px; }
.enterprise-detail-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.enterprise-detail-list > div { display: grid; gap: 5px; padding: 10px; border-radius: 10px; background: #f7f9fd; }
.enterprise-detail-list strong { text-align: left; }
.enterprise-section { margin-top: 16px; overflow: hidden; }
.enterprise-section > .table-card { border: 0; border-radius: 0; box-shadow: none; }
.enterprise-section > .notice { margin: 0 20px 18px; }

@media (max-width: 1250px) {
  .dashboard-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-content-grid, .enterprise-layout { grid-template-columns: 1fr; }
  .enterprise-side-stack { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .app-shell { grid-template-columns: 68px 1fr; }
  .topbar { padding-inline: 18px; }
  .topbar-left { gap: 0; flex: 1; }
  .topbar-search { width: 100%; }
  .topbar-page-meta { display: none; }
  .topbar-right { gap: 5px; }
  .notification-button, .clock { display: none; }
  .user-chip { min-width: 44px; width: 44px; padding: 0; color: transparent; overflow: hidden; }
  .user-chip strong, .user-chip span { visibility: hidden; }
  .view { padding: 20px 18px 34px; }
  .dashboard-intro, .enterprise-intro { min-height: 74px; }
  .dashboard-intro h2, .enterprise-intro h2 { font-size: 27px; }
  .dashboard-metrics { grid-template-columns: 1fr; }
  .dashboard-chart-tools { justify-content: flex-start; }
  .dashboard-trend { min-height: 240px; }
  .dashboard-bottom-note { padding-inline: 17px; }
  .dashboard-bottom-art { width: 50%; }
  .enterprise-summary .panel-body { align-items: flex-start; flex-wrap: wrap; }
  .enterprise-summary .button { margin-left: 66px; }
  .enterprise-info-grid { grid-template-columns: 1fr; }
  .enterprise-info-row.wide { grid-column: auto; }
  .enterprise-side-stack { grid-template-columns: 1fr; }
  .enterprise-intro-mark { display: none; }
}

/* Contrast refinements for the refreshed surfaces and shared login metadata. */
.remember-password small { color: #69778c; }
.login-tip { color: #68778d; }
.login-version { color: #65748a; }
.search-shortcut kbd { color: #60718d; }
.dashboard-intro p, .enterprise-intro p, .dashboard-metric-foot { color: #6d7d96; }
.trend-grid text, .trend-labels text { fill: #63738c; }
.dashboard-focus-copy small { color: #6d7d96; }
.dashboard-bottom-note small { color: #627591; }
.enterprise-summary-copy p, .enterprise-info-row span, .enterprise-detail-list span { color: #63728b; }
.enterprise-detail-panel .quick-item span span, .enterprise-detail-panel .quick-item span small { color: #6d7d96; }

/* 1.6.8 visual system: a light, calm operations workspace across every module. */
:root {
  --ink: #14213d;
  --muted: #6f7f9c;
  --line: #e3eaf5;
  --paper: #ffffff;
  --canvas: #f5f8ff;
  --navy-2: #ffffff;
  --teal: #2f6bea;
  --teal-soft: #eaf1ff;
  --shadow: 0 14px 34px rgba(53, 91, 154, .08);
  --radius: 16px;
}

body {
  color: var(--ink);
  background: radial-gradient(circle at 82% -12%, #eaf2ff 0, transparent 36%), var(--canvas);
  caret-color: #2f6bea;
}

::selection { color: #12366e; background: #cfe0ff; }
* { scrollbar-color: #c8d6ed transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-thumb { background: #c8d6ed; border: 2px solid transparent; border-radius: 999px; background-clip: padding-box; }
*::-webkit-scrollbar-track { background: transparent; }

.app-shell { grid-template-columns: 246px minmax(0, 1fr); background: transparent; }
.sidebar {
  color: #4f607e;
  background: rgba(255, 255, 255, .97);
  border-right: 1px solid #e4ebf6;
  box-shadow: 10px 0 28px rgba(66, 104, 164, .04);
  padding: 23px 16px 18px;
}
.brand { padding: 0 10px 22px; border-bottom-color: #edf1f8; }
.brand-icon { width: 47px; height: 47px; }
.brand-copy strong { color: #14213d; font-size: 17px; }
.brand-copy small { color: #5b6e8d; }
.main-nav { padding: 18px 0; scrollbar-color: #c9d6eb transparent; }
.nav-group { margin-bottom: 7px; }
.nav-group-toggle { width: 100%; min-height: 46px; display: grid; grid-template-columns: 22px minmax(0,1fr) 16px; align-items: center; gap: 10px; padding: 9px 12px; border: 0; border-radius: 12px; background: transparent; color: #435574; font-size: 13px; font-weight: 800; text-align: left; cursor: pointer; }
.nav-group-toggle:hover, .nav-group.open > .nav-group-toggle { color: #2462d8; background: #eef4ff; }
.nav-group-toggle:focus-visible { outline: 3px solid rgba(47,107,234,.2); outline-offset: 2px; }
.nav-group-icon { display: grid; place-items: center; color: currentColor; }
.nav-group-chevron { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; transition: transform .18s ease-out; }
.nav-group.open .nav-group-chevron { transform: rotate(180deg); }
.nav-group-items { display: none; }
.nav-group.open .nav-group-items { display: grid; }
.nav-group-items > .nav-item { margin-top: 3px; padding-left: 34px; }
.nav-item { color: #5d6d89; min-height: 39px; border-radius: 10px; padding-inline: 12px; }
.nav-item:hover { color: #2f6bea; background: #f2f6fd; }
.nav-item.active {
  color: #2462d8;
  background: linear-gradient(100deg, #e8f1ff 0%, #f5f8ff 100%);
  box-shadow: inset 3px 0 #2f6bea, 0 7px 18px rgba(53, 103, 210, .08);
}
.nav-icon { color: currentColor; }
.sidebar-foot { border-top-color: #edf1f8; padding-inline: 10px; }
.connection-pill { color: #5e708d; }
.text-button { color: #5d6f8d; }
.text-button:hover { color: #2f6bea; }

.main { grid-template-rows: 78px minmax(0, 1fr); }
.topbar {
  padding: 13px 34px;
  background: rgba(255, 255, 255, .82);
  border-bottom-color: rgba(222, 231, 244, .9);
  backdrop-filter: blur(16px);
}
.topbar-left { gap: 26px; }
.topbar-search {
  width: min(570px, 46vw);
  min-height: 44px;
  background: rgba(255, 255, 255, .94);
  border-color: #e1e9f5;
  border-radius: 14px;
  box-shadow: 0 7px 20px rgba(49, 91, 158, .06);
}
.topbar-search:focus-within { border-color: #9dbcf4; box-shadow: 0 0 0 4px rgba(47, 107, 234, .1); }
.topbar-page-meta { min-width: 142px; }
.topbar h1 { color: #14213d; font-size: 18px; }
.breadcrumb { color: #60718e; }
.notification-button, .icon-button { color: #607292; }
.icon-button { background: rgba(255, 255, 255, .85); border-color: #e0e8f4; border-radius: 11px; }
.icon-button:hover { color: #2f6bea; border-color: #b8cdf1; background: #f6f9ff; }
.clock { color: #60718e; }
.user-chip { border-color: #e1e9f4; background: rgba(248, 251, 255, .92); border-radius: 13px; }

.view { padding: 28px 34px 48px; }
.page-actions { margin-bottom: 18px; }
input, select, textarea { border-color: #dce6f3; border-radius: 10px; }
input:focus, select:focus, textarea:focus { border-color: #7fa9f2; box-shadow: 0 0 0 4px rgba(47, 107, 234, .1); }
.button { min-height: 41px; border-color: #dfe7f3; border-radius: 11px; color: #314361; background: #fff; }
.button:hover { color: #245dcf; border-color: #b9cdef; background: #f7faff; }
.button.primary { color: #fff; background: #2f6bea; border-color: #2f6bea; box-shadow: 0 7px 17px rgba(47, 107, 234, .2); }
.button.primary:hover { color: #fff; background: #245bd2; border-color: #245bd2; box-shadow: 0 9px 21px rgba(47, 107, 234, .28); }
.button.danger { background: #fff7f8; }

.panel, .table-card {
  border-color: #e2eaf5;
  box-shadow: var(--shadow);
}
.panel-header { min-height: 66px; padding: 17px 21px; border-bottom-color: #edf1f7; }
.panel-header h3 { color: #192746; font-size: 15px; }
.panel-header p { color: #647591; }
.panel-body { padding: 20px 21px; }
th { background: #f7f9fd; color: #6e7e99; border-bottom-color: #e5ebf5; padding: 12px 13px; }
td { border-bottom-color: #edf1f7; color: #344361; padding: 12px 13px; }
tbody tr:hover { background: #f7faff; }
.primary-cell strong { color: #203252; }
.primary-cell span, .muted { color: #71809b; }
.tabs { background: #edf3ff; border-radius: 11px; }
.tab { color: #7385a3; padding: 8px 13px; border-radius: 8px; }
.tab:hover { color: #2f6bea; }
.tab.active { color: #234c96; background: #fff; box-shadow: 0 4px 12px rgba(53, 91, 154, .1); }
.notice { color: #4f6686; background: #f0f6ff; border-color: #dce9fb; border-radius: 12px; }
.notice.warning { color: #80602d; background: #fff9ec; border-color: #f1dfbb; }
.status { padding: 5px 9px; }
.empty-icon { color: #9bb6e8; }

.modal-backdrop { background: rgba(31, 52, 88, .4); backdrop-filter: blur(5px); }
.modal-card { border: 1px solid #e2eaf5; border-radius: 20px; box-shadow: 0 32px 86px rgba(31, 57, 101, .24); }
.modal-card > header { min-height: 78px; border-bottom-color: #e8eef7; padding: 18px 23px; }
.modal-card h2 { color: #172746; }
.modal-close { background: #f1f5fb; color: #5d6f8d; border-radius: 10px; }
.modal-close:hover { color: #2f6bea; background: #e9f1ff; }
.modal-body { padding: 22px 23px; }
.form-section { border-top-color: #e8eef7; }
.line-table, .purchase-product-suggestions { border-color: #e1e9f5; }
.line-table input[readonly] { background: #f5f8fd; color: #7585a0; }
.purchase-product-option:hover, .purchase-product-option.active { background: #edf4ff; }
.detail-cell, .enterprise-detail-list > div { background: #f6f9fe; }

.dashboard-intro, .enterprise-intro { min-height: 100px; margin-bottom: 20px; }
.dashboard-intro h2, .enterprise-intro h2 { color: #111e3a; font-size: clamp(29px, 3.1vw, 40px); }
.dashboard-intro p, .enterprise-intro p { color: #637591; }
.dashboard-metrics { gap: 18px; margin-bottom: 22px; }
.dashboard-metric { min-height: 166px; padding: 21px 21px 18px; border-color: #e3eaf5; border-radius: 18px; box-shadow: var(--shadow); }
.dashboard-metric:hover { transform: translateY(-2px); box-shadow: 0 18px 40px rgba(53, 91, 154, .12); }
.dashboard-metric-value { color: #13203e; }
.dashboard-chart-panel .panel-body { padding: 9px 21px 21px; }
.dashboard-focus-panel .panel-body { padding: 15px 17px 17px; }
.dashboard-focus-item { border-color: #e4ebf5; background: #fff; }
.dashboard-focus-item:hover { border-color: #b9cef2; background: #fbfdff; }
.dashboard-bottom-note { margin-top: 20px; border-color: #dfeafb; background: linear-gradient(100deg, #eff5ff 0%, #fafdff 55%, #eef4ff 100%); }
.enterprise-summary, .enterprise-layout, .enterprise-section { box-shadow: var(--shadow); }
.enterprise-summary-copy strong, .enterprise-info-row strong, .enterprise-detail-list strong { color: #273958; }

.login-screen { background: radial-gradient(circle at 70% 0, #eef4ff, transparent 38%), #f8faff; }
.login-card { padding: 29px; border: 1px solid #e2eaf5; border-radius: 20px; background: rgba(255,255,255,.88); box-shadow: 0 18px 46px rgba(49, 88, 151, .1); }
.login-card h2 { color: #14213d; }
.login-card input { background: #fbfdff; }

@media (max-width: 1250px) {
  .view { padding-inline: 26px; }
  .topbar { padding-inline: 26px; }
}
@media (max-width: 800px) {
  .purchase-order-compact-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app-shell { grid-template-columns: 68px minmax(0, 1fr); }
  .sidebar { padding-inline: 10px; }
  .brand { justify-content: center; padding-inline: 0; }
  .brand-copy, .nav-group-toggle > span:nth-child(2), .nav-group-chevron, .nav-item > span:nth-child(2) { display: none; }
  .nav-group-toggle { display: flex; justify-content: center; padding-inline: 0; }
  .nav-group-items > .nav-item { padding-left: 0; }
  .nav-item { justify-content: center; padding-inline: 0; }
  .sidebar-foot { padding-inline: 0; justify-items: center; }
  .connection-pill { font-size: 0; }
  .connection-pill span { margin: 0; }
  .view { padding: 22px 18px 36px; }
  .topbar { padding-inline: 18px; }
}
.link-button { appearance:none; border:0; background:transparent; color:inherit; padding:0; cursor:pointer; font:inherit; }
.link-button:hover { color:var(--primary); text-decoration:underline; }
/* Finance controls retain the existing ERP surfaces and table rhythm. */
.nav-item.nav-direct { width:100%; margin:0 0 7px; }
.global-shipping-chart { background:#fff; }
#enterprise-banks { margin:24px 0 0; border:0; box-shadow:none; }
#enterprise-banks .panel-header { padding-inline:24px; }
[data-finance-action]:focus-visible { outline:2px solid #5065ed; outline-offset:3px; }
[data-finance-voucher] { accent-color:#5065ed; width:18px; height:18px; }
.finance-report-coverage { margin-bottom:16px; }
.opening-mapping-scroll { max-height:55vh; overflow:auto; border:1px solid var(--line); border-radius:12px; }
.modal-card:has(#opening-mapping-form) { width:min(1360px,calc(100vw - 48px)) !important; min-width:0; }
.opening-mapping-table { min-width:1150px; }
.opening-mapping-table th { position:sticky; top:0; background:var(--surface,#fff); z-index:1; }
.opening-mapping-table td { vertical-align:top; white-space:normal; }
.opening-mapping-table td:first-child { min-width:160px; max-width:220px; }
.opening-mapping-table small { display:block; color:var(--muted); margin-top:4px; }
.opening-mapping-table select { min-width:150px; max-width:250px; }
.opening-mapping-table input { width:130px; }
.opening-mapping-table .opening-issues { min-width:160px; color:var(--muted); }
.analytics-bar.unavailable { height:0; min-height:0; background:transparent; }

/* Shared navigation rails: direct and grouped modules use identical icon/text columns. */
.main-nav > .nav-direct, .main-nav .nav-group-toggle {
  display:grid; grid-template-columns:22px minmax(0,1fr) 16px; gap:10px;
  min-height:46px; padding:9px 12px; border:0; border-radius:12px;
  color:#435574; font-size:13px; font-weight:800; text-align:left;
}
.main-nav .nav-icon, .main-nav .nav-group-icon { width:22px; height:22px; display:grid; place-items:center; flex:none; }
.main-nav .nav-group-items > .nav-item { display:grid; grid-template-columns:22px minmax(0,1fr); gap:10px; padding:8px 12px 8px 34px; }
.main-nav .nav-item.active, .main-nav .nav-group.open > .nav-group-toggle {
  color:#2462d8; background:#eef4ff; box-shadow:none;
}
.module-access-options { display:flex; flex-wrap:wrap; gap:8px 16px; min-width:240px; }
.module-access-options label { display:inline-flex; align-items:center; gap:6px; white-space:nowrap; }
.module-access-options input { width:16px; height:16px; margin:0; accent-color:var(--primary); }
.balance-sheet-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:20px; align-items:start; }
.balance-sheet-side { display:grid; gap:28px; min-width:0; }
.balance-sheet-grid > section { min-width:0; }
.balance-sheet-grid .section-title { margin:0 0 12px; }
.balance-sheet-grid .table-card { margin-bottom:0; }
.freight-monthly-chart .analytics-chart { gap:24px; padding-top:65px; }
.freight-monthly-chart .analytics-column { min-width:90px; gap:4px; flex:1 0 90px; }
.freight-monthly-chart .cash-bar-slot { flex:0 0 22px; min-width:22px; width:22px; }
.freight-monthly-chart .analytics-bar-value { font-size:10px; white-space:nowrap; }
.freight-monthly-chart .cash-bar-slot:nth-child(2) .analytics-bar-value { inset-block-end:calc(100% + 20px); }
.freight-monthly-chart .cash-bar-slot:nth-child(3) .analytics-bar-value { inset-block-end:calc(100% + 34px); }
@media(max-width:800px) {
  .main-nav > .nav-direct, .main-nav .nav-group-toggle, .main-nav .nav-group-items > .nav-item { grid-template-columns:22px; justify-content:center; padding-inline:0; }
  .balance-sheet-grid { grid-template-columns:minmax(0,1fr); }
}
