:root {
  --ink: #17233d;
  --ink-soft: #41506e;
  --muted: #8490a8;
  --line: #e6eaf1;
  --canvas: #f6f8fc;
  --panel: #ffffff;
  --navy: #1d2d50;
  --navy-dark: #15213b;
  --blue: #3867d6;
  --blue-soft: #eef3ff;
  --mint: #168878;
  --mint-soft: #e7f7f1;
  --amber: #bd7819;
  --amber-soft: #fff3df;
  --rose: #c25762;
  --rose-soft: #fff0f1;
  --shadow: 0 16px 46px rgba(30, 51, 88, 0.07);
  --shadow-small: 0 6px 18px rgba(30, 51, 88, 0.07);
  --radius: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body { min-width: 320px; min-height: 100vh; margin: 0; background: var(--canvas); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(56, 103, 214, 0.24); outline-offset: 2px; }
.hidden { display: none !important; }

.app-shell { min-height: 100vh; display: flex; align-items: stretch; }
.sidebar { position: sticky; top: 0; z-index: 20; flex: 0 0 278px; width: 278px; height: 100vh; display: flex; flex-direction: column; padding: 30px 18px 22px; background: var(--navy-dark); color: #fff; overflow-y: auto; }
.sidebar-scrim { display: none; }
.brand-lockup { display: flex; gap: 12px; align-items: center; padding: 0 12px 30px; }
.brand-mark { width: 34px; height: 34px; display: flex; align-items: flex-end; justify-content: center; gap: 3px; padding: 7px 6px; border: 1px solid rgba(255,255,255,.2); border-radius: 11px; background: rgba(255,255,255,.11); }
.brand-mark span { display: block; width: 5px; border-radius: 5px 5px 2px 2px; background: #9ee9d3; }
.brand-mark span:first-child { height: 9px; opacity: .65; }
.brand-mark span:nth-child(2) { height: 15px; }
.brand-mark span:last-child { height: 20px; background: #d7ffed; }
.brand-name { font-size: 17px; line-height: 1; letter-spacing: .13em; font-weight: 800; }
.brand-name span { color: #a6e9d7; }
.brand-caption { margin-top: 6px; color: #92a0bd; font-size: 10px; letter-spacing: .04em; }
.sidebar-section { padding: 0 6px; }
.nav-section { padding-bottom: 26px; border-bottom: 1px solid rgba(255,255,255,.09); }
.section-label { margin: 0 8px 10px; color: #8391ae; font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 11px; padding: 11px 12px; border: 0; border-radius: 11px; background: transparent; color: #b1bdd3; text-align: left; font-size: 13px; font-weight: 650; transition: .18s ease; }
.nav-item + .nav-item { margin-top: 4px; }
.nav-item:hover { background: rgba(255,255,255,.07); color: white; }
.nav-item.active { background: rgba(139, 229, 204, .12); color: #e3fff6; box-shadow: inset 3px 0 0 #9ee9d3; }
.nav-icon, [data-icon] { width: 17px; height: 17px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.nav-icon svg, [data-icon] svg { width: 100%; height: 100%; display: block; }
.customer-section { flex: 1; padding-top: 24px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; padding-right: 4px; }
.section-heading .section-label { margin-bottom: 10px; }
.icon-button { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink-soft); font-size: 20px; line-height: 1; transition: .18s ease; }
.icon-button:hover { border-color: #bdc8de; background: #f7f9fd; color: var(--ink); }
.icon-button.subtle { width: 25px; height: 25px; margin-bottom: 10px; border-color: rgba(255,255,255,.13); background: rgba(255,255,255,.08); color: #bed0e7; font-size: 18px; }
.icon-button.subtle:hover { border-color: rgba(255,255,255,.28); background: rgba(255,255,255,.15); color: #fff; }
.search-box { display: flex; align-items: center; gap: 8px; margin: 0 2px 12px; padding: 9px 10px; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; background: rgba(255,255,255,.07); color: #8491ad; }
.search-box:focus-within { border-color: rgba(158,233,211,.7); background: rgba(255,255,255,.1); }
.search-icon { width: 15px; height: 15px; flex: 0 0 auto; }
.search-box input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: white; font-size: 12px; }
.search-box input::placeholder { color: #7e8da9; }
.customer-list { display: grid; gap: 4px; }
.customer-item { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 8px 10px; border: 0; border-radius: 11px; background: transparent; color: #b2bfd4; text-align: left; transition: .18s ease; }
.customer-item:hover { background: rgba(255,255,255,.07); color: white; }
.customer-item.active { background: #fff; color: var(--navy); box-shadow: 0 7px 18px rgba(0,0,0,.12); }
.customer-main { min-width: 0; display: flex; align-items: center; gap: 9px; }
.customer-avatar { width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; border-radius: 8px; background: rgba(166,233,215,.13); color: #a9ead8; font-size: 10px; font-weight: 800; }
.customer-item.active .customer-avatar { background: var(--blue-soft); color: var(--blue); }
.customer-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 650; }
.customer-count { flex: 0 0 auto; color: #8996af; font-size: 10px; font-weight: 650; }
.customer-item.active .customer-count { color: var(--blue); }
.empty-search { padding: 16px 8px; color: #8592ab; font-size: 12px; text-align: center; }
.sidebar-footnote { margin: 22px 4px 0; padding: 15px 12px; border: 1px solid rgba(255,255,255,.09); border-radius: 12px; background: rgba(255,255,255,.045); }
.local-status { display: flex; align-items: center; gap: 7px; color: #c6d1e4; font-size: 10px; font-weight: 650; }
.status-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: #75dbbc; box-shadow: 0 0 0 4px rgba(117,219,188,.12); }
.sidebar-footnote-text { margin-top: 7px; color: #8190ab; font-size: 10px; line-height: 1.5; }

.main-content { width: auto; min-width: 0; flex: 1; }
.topbar { height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 clamp(24px, 4vw, 62px); border-bottom: 1px solid var(--line); background: rgba(246,248,252,.83); }
.breadcrumbs { display: flex; align-items: center; gap: 11px; color: #8b96aa; font-size: 12px; }
.breadcrumbs strong { color: var(--ink-soft); font-weight: 700; }
.crumb-separator { color: #c0c8d6; }
.topbar-actions, .heading-actions { display: flex; align-items: center; gap: 11px; }
.sync-chip { display: flex; align-items: center; gap: 8px; color: #8a96aa; font-size: 11px; font-weight: 650; }
.button { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 15px; border: 1px solid transparent; border-radius: 10px; font-size: 12px; font-weight: 750; transition: .18s ease; white-space: nowrap; }
.button [data-icon] { width: 15px; height: 15px; }
.button-primary { border-color: var(--navy); background: var(--navy); color: white; box-shadow: 0 7px 16px rgba(29,45,80,.15); }
.button-primary:hover { border-color: #253b69; background: #253b69; transform: translateY(-1px); }
.button-secondary { border-color: #dbe2ef; background: #fff; color: var(--ink-soft); }
.button-secondary:hover { border-color: #bfcbe0; background: #f9fbfe; }
.button-ghost { border-color: transparent; background: transparent; color: #7d899e; }
.button-ghost:hover { background: #f1f4f9; color: var(--ink-soft); }
.button-sm { min-height: 36px; padding: 0 12px; font-size: 11px; }
.mobile-menu { display: none; border: 0; background: transparent; color: var(--ink); font-size: 22px; }
.mobile-nav { display: none; }
.page-content { max-width: 1420px; margin: 0 auto; padding: 42px clamp(24px, 4vw, 62px) 64px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 25px; margin-bottom: 29px; }
.eyebrow { color: #8692a7; font-size: 10px; font-weight: 800; letter-spacing: .14em; line-height: 1.4; }
h1, h2, p { margin: 0; }
h1 { margin-top: 7px; color: var(--ink); font-size: clamp(28px, 3.2vw, 41px); letter-spacing: -.045em; line-height: 1.1; }
h2 { margin-top: 5px; color: var(--ink); font-size: 17px; letter-spacing: -.025em; }
.page-subtitle { margin-top: 10px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.rate-control { display: flex; align-items: center; gap: 8px; padding: 0 11px; min-height: 40px; border: 1px solid #e0e6f0; border-radius: 10px; background: white; color: #8a95a9; font-size: 11px; font-weight: 650; }
.rate-control select { border: 0; outline: 0; background: transparent; color: var(--ink-soft); font-size: 11px; font-weight: 800; cursor: pointer; }
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; margin-bottom: 23px; }
.metric-card { min-height: 143px; padding: 20px 21px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow-small); }
.metric-card.metric-cod { border-color: #dfe8ff; background: var(--blue-soft); }
.metric-card.metric-orders { border-color: #f3e4c8; background: var(--amber-soft); }
.metric-card.metric-ship { border-color: #d4eee6; background: var(--mint-soft); }
.metric-card.dashboard-grand { border-color: var(--navy); background: var(--navy); color: white; box-shadow: 0 13px 30px rgba(29,45,80,.16); }
.metric-card.metric-light { background: white; }
.metric-topline { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.metric-label { font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.metric-cod .metric-label { color: #5573c6; }.metric-orders .metric-label { color: var(--amber); }.metric-ship .metric-label { color: var(--mint); }.dashboard-grand .metric-label { color: #a9b9dd; }.metric-light .metric-label { color: #8a95a9; }
.metric-symbol { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; }
.metric-cod .metric-symbol { color: var(--blue); background: rgba(56,103,214,.11); }.metric-orders .metric-symbol { color: var(--amber); background: rgba(189,120,25,.12); }.metric-ship .metric-symbol { color: var(--mint); background: rgba(22,136,120,.11); }.dashboard-grand .metric-symbol { color: #b6c9f4; background: rgba(255,255,255,.1); }.metric-light .metric-symbol { color: #78869e; background: #f1f4f9; }
.metric-value { margin-top: 19px; color: var(--ink); font-size: clamp(22px, 2.5vw, 29px); font-weight: 800; letter-spacing: -.045em; line-height: 1; }.dashboard-grand .metric-value { color: white; }.metric-hint { margin-top: 9px; color: #95a0b2; font-size: 11px; }.dashboard-grand .metric-hint { color: #96a9d1; }
.content-card { border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: var(--shadow); overflow: hidden; }
.entry-card { margin-bottom: 23px; padding: 23px 24px; background: linear-gradient(135deg, #ffffff 0%, #fbfcff 100%); }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.card-badge, .record-count { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border: 1px solid #e5eaf2; border-radius: 8px; color: #8a95a7; background: #fafbfe; font-size: 10px; font-weight: 700; }
.entry-form { display: grid; grid-template-columns: 1fr 1fr 1fr 1.45fr auto; gap: 13px; align-items: end; margin-top: 23px; }
.form-field { min-width: 0; }.form-field label { display: block; margin-bottom: 7px; color: #69758b; font-size: 10px; font-weight: 750; }.form-field label span { color: #a8b0be; font-weight: 500; }
.form-field input { width: 100%; height: 42px; padding: 0 12px; border: 1px solid #dde4ef; border-radius: 9px; outline: 0; background: #fff; color: var(--ink); font-size: 12px; transition: .18s ease; }.form-field input:hover { border-color: #c4cfdf; }.form-field input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(56,103,214,.09); }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 4px; min-height: 42px; }
.table-card { margin-top: 0; }.table-heading { padding: 23px 24px; border-bottom: 1px solid var(--line); }.table-scroll { width: 100%; overflow-x: auto; }table { width: 100%; min-width: 680px; border-collapse: collapse; }th { padding: 13px 24px; background: #fbfcfe; color: #8a95a9; font-size: 10px; font-weight: 800; letter-spacing: .09em; text-align: left; text-transform: uppercase; white-space: nowrap; }td { padding: 16px 24px; border-top: 1px solid #edf0f5; color: #55627a; font-size: 12px; vertical-align: middle; }tbody tr { transition: background .15s ease; }tbody tr:hover { background: #fbfcff; }.align-right { text-align: right; }.align-center { text-align: center; }
.date-cell { color: var(--ink); font-weight: 750; }.entry-cell { color: #4261a1; font-weight: 650; }.entry-note { display: inline-block; margin-left: 5px; color: #9aa4b5; font-weight: 500; }.cod-cell { color: #4f6ebc; font-weight: 700; }.ship-cell { color: var(--mint); font-weight: 750; }.orders-cell { color: var(--ink); font-weight: 800; }.row-actions { display: inline-flex; align-items: center; gap: 4px; }.row-action { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 7px; background: transparent; color: #a3adbd; }.row-action:hover { background: #f0f4fb; color: var(--blue); }.row-action.delete:hover { background: var(--rose-soft); color: var(--rose); }.row-action [data-icon] { width: 15px; height: 15px; }
.empty-state { padding: 45px 24px !important; color: #a0a9b8; font-size: 12px; text-align: center; }.empty-state strong { display: block; margin-bottom: 6px; color: #6e7b92; font-size: 13px; }
.dashboard-heading { align-items: center; }.heading-stamp { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border: 1px solid #dfebea; border-radius: 10px; background: #f5fbf9; color: var(--mint); font-size: 11px; font-weight: 700; }.dashboard-metrics { margin-bottom: 28px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(17, 29, 52, .52); backdrop-filter: blur(4px); }.modal { width: min(100%, 620px); padding: 24px; border: 1px solid rgba(255,255,255,.8); border-radius: 20px; background: #fff; box-shadow: 0 25px 70px rgba(12,22,43,.25); }.compact-modal { width: min(100%, 450px); }.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }.modal-header h2 { margin-top: 7px; }.modal-description { margin: 15px 0 12px; color: #8792a5; font-size: 12px; line-height: 1.5; }.modal textarea { width: 100%; resize: vertical; padding: 13px; border: 1px solid #dde4ef; border-radius: 11px; outline: 0; background: #f8faff; color: #41506e; font: 11px/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }.modal textarea:focus { border-color: var(--blue); }.modal-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }.modal-actions { display: flex; align-items: center; gap: 5px; }.copy-status { color: var(--mint); font-size: 11px; font-weight: 700; }.compact-modal .form-field { margin-top: 22px; }.compact-modal .modal-footer { margin-top: 23px; }
.toast-region { position: fixed; right: 22px; bottom: 22px; z-index: 200; display: grid; gap: 9px; }.toast { min-width: 240px; max-width: 360px; padding: 12px 15px; border: 1px solid #d9efe7; border-radius: 11px; background: #f5fffb; color: #256a5c; box-shadow: var(--shadow-small); font-size: 12px; font-weight: 700; animation: toast-in .22s ease both; }.toast.error { border-color: #f1d4d7; background: #fff7f7; color: #a9444f; }.toast.out { animation: toast-out .2s ease both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }@keyframes toast-out { from { opacity: 1; } to { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1120px) { .entry-form { grid-template-columns: repeat(4, minmax(0, 1fr)); }.form-field-wide { grid-column: span 2; }.form-actions { grid-column: span 2; }.page-heading { align-items: flex-start; flex-direction: column; }.heading-actions { width: 100%; justify-content: space-between; } }
@media (max-width: 820px) { .sidebar { position: fixed; width: 246px; flex-basis: 246px; transform: translateX(-100%); transition: transform .22s ease; box-shadow: 12px 0 30px rgba(0,0,0,.1); }.sidebar.open { transform: translateX(0); }.sidebar-scrim { position: fixed; inset: 0; z-index: 19; display: block; visibility: hidden; opacity: 0; background: rgba(13, 24, 46, .42); transition: opacity .22s ease, visibility .22s ease; }.sidebar-scrim.visible { visibility: visible; opacity: 1; }.main-content { width: 100%; margin-left: 0; }.mobile-menu { display: inline-flex; }.topbar { height: 67px; padding: 0 20px; }.topbar .breadcrumbs { flex: 1; }.topbar-actions .sync-chip { display: none; }.page-content { padding: 34px 20px 50px; }.page-heading { margin-bottom: 24px; }.metric-grid { gap: 11px; }.metric-card { padding: 17px; }.metric-value { font-size: 22px; }.entry-card, .table-heading { padding-left: 18px; padding-right: 18px; }th, td { padding-left: 18px; padding-right: 18px; } body.menu-open { overflow: hidden; } }
@media (max-width: 600px) { body { padding-bottom: 76px; }.topbar-actions #topExportBtn { display: none; }.heading-actions { flex-wrap: wrap; gap: 8px; }.heading-actions .rate-control { flex: 1 1 100%; justify-content: space-between; }.heading-actions .button { flex: 1; }.metric-grid { grid-template-columns: 1fr; }.metric-card { min-height: 119px; }.entry-form { grid-template-columns: 1fr 1fr; }.form-field-wide { grid-column: span 2; }.form-actions { grid-column: span 2; }.form-actions .button { flex: 1; }.card-heading { align-items: flex-start; }.card-badge { display: none; }.dashboard-heading .heading-stamp { align-self: stretch; }.modal-backdrop { padding: 14px; }.modal { padding: 19px; }.modal-footer { align-items: flex-end; }.modal-actions { flex-wrap: wrap; justify-content: flex-end; }.toast-region { right: 14px; bottom: 84px; left: 14px; }.toast { max-width: none; }
  .mobile-nav { position: fixed; right: 0; bottom: 0; left: 0; z-index: 18; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 9px 14px calc(9px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(222, 228, 239, .92); background: rgba(255, 255, 255, .94); box-shadow: 0 -10px 28px rgba(30, 51, 88, .08); backdrop-filter: blur(16px); }
  .mobile-nav-item { min-height: 49px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; border-radius: 11px; background: transparent; color: #8b96aa; font-size: 10px; font-weight: 750; }
  .mobile-nav-item [data-icon] { width: 18px; height: 18px; }.mobile-nav-item.active { background: var(--blue-soft); color: var(--blue); }
  .table-scroll { overflow: visible; }.table-scroll table { display: block; min-width: 0; }.table-scroll thead { display: none; }.table-scroll tbody { display: grid; gap: 10px; padding: 12px; }.table-scroll tbody tr { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; padding: 14px 15px; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: 0 5px 16px rgba(30, 51, 88, .045); }.table-scroll tbody td { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; padding: 7px 0; border: 0; font-size: 11px; text-align: right; }.table-scroll tbody td::before { content: attr(data-label); color: #9aa4b5; font-size: 9px; font-weight: 800; letter-spacing: .05em; text-align: left; text-transform: uppercase; }.table-scroll tbody td:first-child, .table-scroll tbody td:nth-child(2) { grid-column: 1 / -1; }.table-scroll tbody td:first-child { padding-top: 0; }.table-scroll tbody td:nth-child(2) { padding-bottom: 10px; border-bottom: 1px dashed #e5eaf2; }.table-scroll tbody td:last-child { grid-column: 1 / -1; justify-content: flex-end; padding-top: 10px; border-top: 1px solid #edf0f5; }.table-scroll tbody td:last-child::before { margin-right: auto; }.table-scroll tbody td.empty-state { display: block; grid-column: 1 / -1; padding: 35px 8px !important; text-align: center; }.table-scroll tbody td.empty-state::before { display: none; }.table-scroll tbody tr:has(.empty-state) { display: block; box-shadow: none; }
 }
@media (max-width: 390px) { .breadcrumbs span:first-child, .crumb-separator { display: none; }.page-content { padding-left: 14px; padding-right: 14px; }.entry-form { display: block; }.form-field { margin-top: 13px; }.form-field:first-child { margin-top: 0; }.form-actions { margin-top: 15px; }.form-actions .button { width: 100%; } }
