/* Neel Overseas panel — plain CSS, no build step */
:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #f9f9fb;
  --border: rgba(0, 0, 0, .1);
  --hairline: rgba(0, 0, 0, .07);
  --hairline-strong: rgba(0, 0, 0, .13);
  --fill: rgba(120, 120, 128, .1);
  --fill-strong: rgba(120, 120, 128, .16);
  --fill-faint: rgba(120, 120, 128, .05);
  --glass: rgba(245, 245, 247, .72);
  --glass-side: rgba(240, 240, 243, .74);
  --glass-raised: rgba(255, 255, 255, .8);
  --text: #1d1d1f;
  --text-2: #515154;
  --text-3: #6a6a70;
  --brand: #038eeb;
  --primary: #0272be;
  --primary-hover: #025f9f;
  --primary-soft: #e9f5fe;
  --tint: rgba(3, 142, 235, .12);
  --tint-strong: rgba(3, 142, 235, .2);
  --focus: rgba(3, 142, 235, .35);
  --side: #f0f0f3;
  --side-2: rgba(120, 120, 128, .1);
  --side-text: #515154;
  --green: #1a7f4b;
  --green-soft: #e3f4ea;
  --red: #c8352b;
  --red-soft: #fce8e6;
  --amber: #a56300;
  --amber-soft: #fdf1dc;
  --grey-soft: #ececf0;
  --radius: 18px;
  --shadow: 0 0 0 .5px rgba(0, 0, 0, .05), 0 1px 2px rgba(0, 0, 0, .03), 0 6px 20px rgba(0, 0, 0, .035);
  --ease: cubic-bezier(.32, .72, 0, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0 0 12px; line-height: 1.25; }
h2 { font-size: 16px; font-weight: 650; }
h3 { font-size: 14px; font-weight: 650; }
p { margin: 0 0 12px; }
code { background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Layout */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 248px; background: var(--side); color: var(--side-text); position: fixed; inset: 0 auto 0 0; overflow-y: auto; z-index: 30; padding: 16px 12px 24px; transition: transform .2s ease; }
.main { flex: 1; margin-left: 248px; min-width: 0; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 18px; color: #fff; text-decoration: none !important; }
.brand-mark { flex: none; width: 36px; height: 36px; padding: 3px; border-radius: 10px; background: #fff; display: grid; place-items: center; }
.brand-mark img { display: block; width: 100%; height: 100%; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 15px; }
.brand-text small { color: var(--side-text); font-size: 12px; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #6d7890; padding: 16px 10px 6px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--side-text); text-decoration: none !important; font-size: 13.5px; }
.nav-item:hover { background: var(--side-2); color: #fff; }
.nav-item.active { background: var(--primary); color: #fff; }
.nav-count { margin-left: auto; background: var(--red); color: #fff; border-radius: 10px; font-size: 11px; padding: 0 7px; line-height: 18px; }
.sidebar-backdrop { display: none; }

.topbar { height: 60px; background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; padding: 0 24px; position: sticky; top: 0; z-index: 20; }
.page-title { font-size: 18px; margin: 0; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-btn { display: none; }
.icon-btn { background: none; border: 0; padding: 6px; border-radius: 8px; cursor: pointer; color: var(--text); }
.icon-btn svg { width: 22px; height: 22px; }
.user-menu { position: relative; }
.user-btn { display: flex; align-items: center; gap: 10px; background: none; border: 0; cursor: pointer; padding: 4px 6px; border-radius: 10px; font: inherit; color: inherit; text-align: left; }
.user-btn:hover { background: var(--surface-2); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-weight: 700; }
.user-name { display: flex; flex-direction: column; line-height: 1.2; font-weight: 600; font-size: 13px; }
.user-name small { color: var(--text-3); font-weight: 400; font-size: 12px; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); min-width: 170px; padding: 6px; }
.menu a, .menu button { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 6px; color: var(--text); background: none; border: 0; font: inherit; cursor: pointer; }
.menu a:hover, .menu button:hover { background: var(--surface-2); text-decoration: none; }
.content { padding: 24px; max-width: 1480px; width: 100%; min-width: 0; }
.cards > *, .grid-2 > *, .grid-main > * { min-width: 0; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 18px; }
.card-flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.card-head h2 { margin: 0; }
.card-head.padded { padding: 16px 20px 6px; margin: 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; margin-bottom: 18px; }
.cards .card { margin: 0; }
.stat { display: flex; flex-direction: column; gap: 4px; color: inherit; text-decoration: none !important; }
.stat-label { color: var(--text-2); font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.stat-value { font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
.stat-value small { font-size: 13px; color: var(--text-3); font-weight: 500; }
.stat-foot { color: var(--text-3); font-size: 12.5px; }
.stat-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat-split strong { display: block; font-size: 18px; overflow-wrap: anywhere; }
.stat-mini { font-size: 12px; color: var(--text-3); }
.stat-accent { background: linear-gradient(135deg, #0272be, #0278c8); color: #fff; border: 0; }
.stat-accent .stat-label, .stat-accent .stat-foot { color: rgba(255, 255, 255, .8); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-2 > .card { margin-bottom: 18px; }
.grid-main { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 18px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid transparent; border-radius: 9px; padding: 8px 14px; font: 600 13.5px/1.2 var(--font); cursor: pointer; text-decoration: none !important; white-space: nowrap; }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--primary-soft); color: var(--primary); }
.btn-secondary:hover { background: #cfe9fb; }
.btn-light { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-light:hover { background: var(--surface-2); }
.btn-danger { background: var(--red); color: #fff; }
.btn-sm { padding: 6px 10px; font-size: 12.5px; }
.btn-block { width: 100%; justify-content: center; padding: 11px; }
.btn-link { background: none; border: 0; padding: 0; color: var(--primary); cursor: pointer; font: inherit; }
.btn-link.danger { color: var(--red); }
.btn-group { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.page-actions .export { margin-left: auto; }
.link { font-size: 13px; font-weight: 600; }

/* Forms */
.form { display: block; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px 18px; }
.field-wide { grid-column: 1 / -1; }
.form-row { display: flex; flex-wrap: wrap; gap: 12px 14px; align-items: flex-start; }
.form-row .field { flex: 1 1 160px; }
.form-row .field-wide { flex-basis: 100%; }
.field { display: flex; flex-direction: column; gap: 5px; margin: 0; }
.field > span { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.field-button { justify-content: flex-end; padding-top: 22px; flex: 0 0 auto !important; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], input[type=search], input[type=tel], input[type=file], select, textarea {
  width: 100%; border: 1px solid #d2d2d7; border-radius: 9px; padding: 8px 11px; font: 14px/1.4 var(--font); color: var(--text); background: #fff; min-height: 38px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(2, 114, 190, .25); border-color: var(--primary); }
textarea { resize: vertical; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.hint { color: var(--text-3); font-size: 12.5px; }
.field-error { color: var(--red); font-size: 12.5px; }
.form-actions { display: flex; gap: 10px; margin-top: 4px; }
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.filters .field { flex: 1 1 150px; min-width: 130px; }
.filter-buttons { display: flex; gap: 8px; }
.calc-box { display: flex; gap: 26px; flex-wrap: wrap; background: var(--surface-2); border: 1px dashed var(--border); border-radius: 10px; padding: 12px 16px; }
.calc-box span { display: block; font-size: 12px; color: var(--text-3); }
.calc-box strong { font-size: 17px; }
.inline-form { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.inline-form input { flex: 1 1 180px; min-height: 32px; padding: 5px 10px; }
.inline-edit { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-edit input[type=text] { width: auto; flex: 1 1 160px; min-height: 34px; }
.inline-edit .w-sm { flex: 0 0 70px; }
.inline-edit .w-md { flex: 0 0 110px; }
.add-line { border-top: 1px solid var(--border); padding: 16px 20px; background: var(--surface-2); }

/* Tables */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-tools { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.quick-search { max-width: 280px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data-table th { text-align: left; font-size: 12px; font-weight: 650; color: var(--text-2); background: var(--surface-2); padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; position: relative; }
.data-table.sortable th { cursor: pointer; user-select: none; }
.data-table.sortable th:hover { color: var(--text); }
.data-table th.sorted-asc::after { content: " ▲"; font-size: 9px; }
.data-table th.sorted-desc::after { content: " ▼"; font-size: 9px; }
.data-table td { padding: 9px 12px; border-bottom: 1px solid #f0f0f2; vertical-align: top; }
.data-table tbody tr:hover td { background: #fafafb; }
.data-table td > a:first-child { white-space: nowrap; }
.data-table tfoot td { font-weight: 700; background: var(--surface-2); border-top: 2px solid var(--border); border-bottom: 0; }
.data-table tr.group td { background: #f2f2f4; font-weight: 700; color: var(--text); padding-top: 12px; }
.data-table tr.subtotal td { font-weight: 650; background: #fafafb; border-bottom: 2px solid var(--border); }
.data-table tr.muted td, tr.muted td { color: var(--text-3); }
.data-table tr.muted td a { color: var(--text-3); }
.data-table tr.row-out td { background: #fffdf8; }
.empty-row td { text-align: center; color: var(--text-3); padding: 28px; }
.num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.neg { color: var(--red); }
.muted { color: var(--text-3); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.wrap { white-space: normal; word-break: break-word; }
.pre { white-space: pre-wrap; }
.mini-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.mini-table td { padding: 8px 4px; border-bottom: 1px solid #f0f0f2; vertical-align: top; }
.mini-table tr:last-child td { border-bottom: 0; }

/* Badges & alerts */
.badge { display: inline-block; font-size: 11.5px; font-weight: 650; padding: 2px 8px; border-radius: 20px; line-height: 1.5; white-space: nowrap; vertical-align: middle; }
.badge-blue { background: var(--primary-soft); color: var(--primary); }
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-grey { background: var(--grey-soft); color: #515154; }
.badge-amber { background: var(--amber-soft); color: var(--amber); }
.badge-red { background: var(--red-soft); color: var(--red); }
.alert { position: relative; padding: 11px 40px 11px 14px; border-radius: 10px; margin-bottom: 16px; font-size: 13.5px; border: 1px solid transparent; }
.alert-success { background: var(--green-soft); color: #145c37; border-color: #bfe5cf; }
.alert-error { background: var(--red-soft); color: #8f2119; border-color: #f4c7c2; }
.alert-warning { background: var(--amber-soft); color: #7a4a00; border-color: #f2dcb0; }
.alert-close { position: absolute; right: 8px; top: 6px; background: none; border: 0; font-size: 20px; cursor: pointer; color: inherit; opacity: .6; }

/* Order detail */
.details { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px 18px; margin: 0; }
.details dt { font-size: 12px; color: var(--text-3); font-weight: 600; }
.details dd { margin: 2px 0 0; font-weight: 500; }
.details .span-2 { grid-column: 1 / -1; }
.progress { height: 10px; background: var(--grey-soft); border-radius: 10px; overflow: hidden; margin: 6px 0 14px; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, #2e9d63, #1a7f4b); border-radius: 10px; }
.progress-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.progress-stats span { display: block; font-size: 12px; color: var(--text-3); }
.progress-stats strong { font-size: 16px; }
.status-actions { border-top: 1px solid var(--border); margin-top: 12px; padding-top: 4px; }
.plain-list { margin: 0; padding-left: 18px; }
.plain-list li { margin-bottom: 6px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 8px 0 8px 16px; border-left: 2px solid var(--border); position: relative; }
.timeline li::before { content: ""; position: absolute; left: -5px; top: 14px; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }

/* Dashboard */
.db { display: flex; flex-direction: column; gap: 22px; }
.db-hero { display: flex; justify-content: flex-end; align-items: flex-end; gap: 20px; flex-wrap: wrap; padding: 4px 2px 2px; }
.db-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.db-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.db-kpi { display: flex; flex-direction: column; gap: 4px; padding: 20px 22px; color: inherit; text-decoration: none !important; border-left: 1px solid var(--border); transition: background .15s ease; min-width: 0; }
.db-kpi:first-child { border-left: 0; }
.db-kpi:hover { background: var(--surface-2); }
.db-kpi-label { font-size: 12px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); }
.db-kpi-value { font-size: 30px; font-weight: 750; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.db-kpi-foot { font-size: 13px; color: var(--text-2); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.db-kpi-note { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.db-kpi-lead { background: linear-gradient(150deg, #0269b0 0%, #0278c8 100%); color: #fff; }
.db-kpi-lead:hover { background: linear-gradient(150deg, #025f9f 0%, #0272be 100%); }
.db-kpi-lead .db-kpi-label, .db-kpi-lead .db-kpi-note { color: rgba(255, 255, 255, .72); }
.db-kpi-lead .db-kpi-foot { color: rgba(255, 255, 255, .88); }
.db-kpi-lead + .db-kpi { border-left: 0; }

.db-section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.db-section-head h2 { margin: 0; font-size: 16px; }
.db-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); padding: 20px 22px; min-width: 0; }
.db-split { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 22px; }

.db-products { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 22px; }
.db-product { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); padding: 20px 22px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.db-product-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.db-product-head h3 { margin: 0; font-size: 17px; }
.db-figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.db-figures > div { padding: 12px 0 12px 14px; border-left: 1px solid var(--border); min-width: 0; }
.db-figures > div:first-child { border-left: 0; padding-left: 0; }
.db-figures dt { font-size: 12px; color: var(--text-3); font-weight: 600; }
.db-figures dd { margin: 2px 0 0; font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; overflow-wrap: anywhere; }
.db-figures dd small { font-size: 12px; font-weight: 500; color: var(--text-3); margin-left: 3px; }
.db-figures .is-short dd, .db-figures .is-short dt { color: var(--red); }
.db-flow { display: flex; flex-direction: column; gap: 6px; }
.db-track { height: 10px; background: var(--grey-soft); border-radius: 6px; overflow: hidden; display: flex; }
.db-track span { display: block; height: 100%; }
.seg-stock { background: #8fa3c7; }
.seg-in { background: #a9c1f5; }
.seg-out { background: var(--primary); }
.db-flow-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-3); margin-top: 2px; }
.db-flow-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.db-product-foot { display: flex; gap: 8px 20px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); padding-top: 2px; }
.db-product-foot strong { color: var(--text); font-variant-numeric: tabular-nums; }
.db-product-foot strong.pos { color: var(--green); }

.db-chase, .db-issues, .db-moves { list-style: none; margin: 0; padding: 0; }
.db-chase li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid #f0f0f2; }
.db-chase li:first-child { border-top: 0; }
.db-kind { flex: none; font-size: 11px; font-weight: 750; letter-spacing: .04em; width: 34px; text-align: center; padding: 3px 0; border-radius: 6px; }
.db-kind-so { background: var(--primary-soft); color: var(--primary); }
.db-kind-po { background: #f0f0f2; color: #515154; }
.db-chase-main { flex: 1; min-width: 0; display: flex; flex-direction: column; color: var(--text); text-decoration: none !important; }
.db-chase-main strong { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-chase-main span { font-size: 12.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-chase-main:hover strong { color: var(--primary); }
.db-age { flex: none; font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; padding: 3px 9px; border-radius: 20px; }
.age-ok { background: var(--green-soft); color: var(--green); }
.age-amber { background: var(--amber-soft); color: var(--amber); }
.age-red { background: var(--red-soft); color: var(--red); }
.db-more { display: flex; gap: 18px; margin: 12px 0 0; }

.db-issue-note { font-size: 13px; background: var(--red-soft); color: #8f2119; border-radius: 8px; padding: 8px 12px; margin-bottom: 8px; }
.db-issues li { padding: 9px 0 9px 14px; border-top: 1px solid #f0f0f2; position: relative; }
.db-issues li:first-child { border-top: 0; }
.db-issues li::before { content: ""; position: absolute; left: 0; top: 16px; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }
.db-issues li.sev-red::before { background: var(--red); }
.db-issues a, .db-issues span { font-size: 13.5px; }
.db-issues small { display: block; color: var(--text-3); font-size: 12px; }

/* Dashboard: layout additions */
.db-filter { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.db-filter .segmented { flex-wrap: wrap; }
.db-sub { margin: 2px 0 0; font-size: 12.5px; color: var(--text-3); }
.db-section-head h3 { margin: 0; font-size: 15px; }
.db-section-head-out { margin-bottom: 12px; padding: 0 2px; }
.db-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.db-grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.db-split > .span-all, .db-grid-2 > .span-all { grid-column: 1 / -1; }
.kpi-delta { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 650; margin-top: 4px; }
.kpi-delta svg { width: 14px; height: 14px; stroke-width: 2.4; }
.kpi-delta.up { color: #006300; }
.kpi-delta.down { color: var(--red); }
.kpi-delta.on-dark { color: #fff; }
.db-spread { font-size: 13px; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); border-radius: 20px; padding: 3px 10px; }
.db-spread strong { color: var(--text); }
.db-spread.neg strong { color: var(--red); }
.db-rate-avgs { display: flex; gap: 18px; font-size: 13px; color: var(--text-2); margin: -4px 0 6px; }
.db-rate-avgs strong { color: var(--text); }
.db-flow-row { display: grid; grid-template-columns: 74px minmax(0, 1fr); align-items: center; gap: 10px; }
.db-flow-name { font-size: 12px; color: var(--text-3); }

/* Charts (server-rendered SVG) */
.chart { position: relative; }
.chart-svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-svg * { stroke-linecap: round; }
.chart-svg text { stroke: none; font-family: var(--font); }
.c-grid { stroke: #f0f0f2; stroke-width: 1; }
.c-axis { stroke: #d2d2d7; stroke-width: 1; }
.c-ylabel { font-size: 12.5px; fill: #6a6a70; text-anchor: end; font-variant-numeric: tabular-nums; }
.c-xlabel { font-size: 13px; fill: #515154; text-anchor: middle; }
.c-endlabel { font-size: 12.5px; fill: #515154; font-weight: 600; }
.c-hit { fill: transparent; stroke: none; }
.c-group { outline: none; cursor: default; }
.c-group:hover .c-hit, .c-group:focus .c-hit { fill: rgba(2, 114, 190, .05); }
.c-guide { stroke: #c7c7cc; stroke-width: 1; opacity: 0; }
.c-group:hover .c-guide, .c-group:focus .c-guide { opacity: 1; }
.c-bar { stroke: none; }
.c-bar.s-sales, .c-bar.s-profit { fill: #038eeb; }
.c-bar.s-purchase { fill: #00a78e; }
.c-bar.is-neg { fill: #d03b3b; }
.c-line { fill: none; stroke-width: 2; stroke-linejoin: round; }
.c-line.s-sales { stroke: #038eeb; }
.c-line.s-purchase { stroke: #00a78e; }
.c-dot { stroke: #fff; stroke-width: 2; }
.c-dot.s-sales { fill: #038eeb; }
.c-dot.s-purchase { fill: #00a78e; }
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); margin: 0 0 8px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { display: inline-block; }
.lg-bar { width: 10px; height: 10px; border-radius: 3px; }
.lg-line { width: 16px; height: 3px; border-radius: 2px; }
.lg.s-sales, .lg.s-profit { background: #038eeb; }
.lg.s-purchase { background: #00a78e; }
.chart-table { margin-top: 8px; font-size: 12.5px; }
.chart-table summary { cursor: pointer; color: var(--text-3); width: max-content; }
.chart-table summary:hover { color: var(--primary); }
.chart-table table { margin-top: 8px; font-size: 12.5px; }
.chart-tip { position: fixed; z-index: 60; pointer-events: none; background: #1d1d1f; color: #fff; border-radius: 8px; padding: 8px 10px; font-size: 12.5px; line-height: 1.5; box-shadow: 0 8px 24px rgba(11, 34, 57, .25); max-width: 260px; white-space: pre-line; font-variant-numeric: tabular-nums; }
.chart-tip strong { display: block; font-weight: 700; margin-bottom: 2px; }
.hbars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.hbars li { outline: none; border-radius: 6px; }
.hbars li:hover .hbar-fill, .hbars li:focus .hbar-fill { filter: brightness(.92); }
.hbar-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; margin-bottom: 4px; }
.hbar-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.hbar-label a { color: var(--text); }
.hbar-value { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hbar-track { height: 8px; background: var(--grey-soft); border-radius: 4px; overflow: hidden; }
.hbar-fill { display: block; height: 100%; border-radius: 0 4px 4px 0; }
.hbar-fill.s-sales, .hbar-fill.s-profit { background: #038eeb; }
.hbar-fill.s-purchase { background: #00a78e; }
.hbar-fill.is-neg { background: #d03b3b; }
.hbar-sub { font-size: 12px; color: var(--text-3); margin-top: 3px; }

/* Issues */
.issue { display: flex; gap: 16px; justify-content: space-between; align-items: flex-start; border-left: 4px solid var(--amber); flex-wrap: wrap; }
.issue.issue-red { border-left-color: var(--red); }
.issue.resolved { border-left-color: var(--green); opacity: .8; }
.issue-main { flex: 1 1 380px; }
.issue-main h3 { margin: 8px 0 4px; font-size: 14.5px; }
.issue-main p { margin: 0 0 4px; }
.issue-form { display: flex; gap: 8px; flex: 0 1 380px; }
.issue-form input { min-height: 32px; padding: 5px 10px; }
.segmented { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 3px; }
.segmented a { padding: 6px 12px; border-radius: 7px; color: var(--text-2); font-weight: 600; font-size: 13px; text-decoration: none; }
.segmented a.active { background: var(--primary-soft); color: var(--primary); }

/* Import */
.callout { border: 1px solid #bfe0f7; background: linear-gradient(180deg, #f0f8fe, #fff); }
.template-list { list-style: none; margin: 0; padding: 0; }
.template-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f0f0f2; }
.template-list small { display: block; font-size: 12px; color: var(--text-2); word-break: break-word; }
.template-list small.muted { color: var(--text-3); }
.link-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.error-list { color: var(--red); font-size: 13px; padding-left: 18px; }
.explain summary { cursor: pointer; font-weight: 600; }
.explain ul { margin: 10px 0 0; padding-left: 18px; color: var(--text-2); }
.explain li { margin-bottom: 6px; }
.pager { display: flex; gap: 12px; align-items: center; justify-content: center; margin: 12px 0 24px; }

/* Auth */
.auth-body { display: grid; place-items: center; min-height: 100vh; padding: 16px; background: radial-gradient(circle at 20% 10%, #dcf0fd, var(--bg) 60%); }
.auth-wrap { width: 100%; max-width: 400px; }
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 30px; box-shadow: 0 10px 40px rgba(11, 34, 57, .08); }
.auth-logo { display: flex; flex-direction: column; align-items: center; gap: 8px; padding-bottom: 20px; }
.auth-logo img { display: block; width: 170px; max-width: 100%; height: auto; }
.auth-logo small { color: var(--text-3); font-size: 12px; }
.auth-title { font-size: 20px; margin-bottom: 4px; }
.auth-card .form { display: grid; gap: 14px; margin-top: 16px; }

/* Apple-style system: materials, type by size, instant press feedback, interruptible motion */
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
body { letter-spacing: -.006em; }
a, button, .btn, summary, label { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
a:hover { text-decoration: none; opacity: .82; }
.btn:hover, .nav-item:hover, .db-kpi:hover, .menu a:hover, .segmented a:hover, .brand:hover { opacity: 1; }
h1, h2, h3 { letter-spacing: -.018em; }
h2 { font-size: 17px; font-weight: 600; line-height: 1.24; }
h3 { font-size: 14px; font-weight: 600; letter-spacing: -.01em; }
small, .small, .hint { letter-spacing: 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
::selection { background: rgba(3, 142, 235, .22); }

/* Sidebar: a light vibrant material, the accent marks where you are */
.sidebar { background: var(--glass-side); -webkit-backdrop-filter: saturate(180%) blur(28px); backdrop-filter: saturate(180%) blur(28px); color: var(--text-2); border-right: .5px solid var(--hairline-strong); padding: 14px 10px 24px; transition: transform .42s var(--ease); touch-action: pan-y; }
.sidebar.dragging { transition: none; }
.brand { color: var(--text); padding: 6px 10px 14px; }
.brand-mark { width: 34px; height: 34px; padding: 0; background: none; border-radius: 0; }
.brand-text strong { font-size: 15px; font-weight: 600; letter-spacing: -.015em; }
.brand-text small { color: var(--text-3); }
.nav-label { font-size: 11.5px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--text-3); padding: 16px 10px 5px; }
.nav-item { padding: 7px 10px; border-radius: 10px; color: var(--text); font-size: 13.5px; letter-spacing: -.008em; transition: background-color .16s ease, transform .1s ease-out; }
.nav-item svg { width: 17px; height: 17px; stroke-width: 1.7; color: var(--primary); }
.nav-item:hover { background: var(--fill); color: var(--text); }
.nav-item:active { transform: scale(.98); background: var(--fill-strong); }
.nav-item.active { background: var(--tint); color: var(--primary-hover); font-weight: 600; }
.nav-count { font-weight: 600; font-variant-numeric: tabular-nums; }

/* Top bar: glass, the edge only appears once content scrolls under it */
.topbar { height: 56px; background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px); border-bottom: .5px solid transparent; padding: 0 32px; transition: border-color .2s ease; }
.topbar.scrolled { border-bottom-color: var(--hairline-strong); }
.page-title { font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
.icon-btn:active, .user-btn:active { transform: scale(.97); }
.user-btn { transition: background-color .16s ease, transform .1s ease-out; }
.user-btn:hover { background: var(--fill); }
.avatar { width: 30px; height: 30px; font-size: 13px; font-weight: 600; background: var(--tint); }
.user-name { font-weight: 500; }
.menu { background: var(--glass-raised); -webkit-backdrop-filter: saturate(180%) blur(30px); backdrop-filter: saturate(180%) blur(30px); border: .5px solid var(--hairline-strong); border-radius: 14px; box-shadow: 0 12px 40px rgba(0, 0, 0, .14), 0 2px 8px rgba(0, 0, 0, .06); padding: 5px; transform-origin: top right; animation: materialize .24s var(--ease); }
.menu a, .menu button { border-radius: 9px; padding: 7px 10px; font-size: 13.5px; }
.menu a:hover, .menu button:hover { background: var(--primary); color: #fff; }
.content { padding: 24px 32px 40px; }

/* Surfaces */
.card, .db-panel, .db-product { border: 0; border-radius: var(--radius); box-shadow: var(--shadow); }
.card { padding: 20px 22px; margin-bottom: 20px; }
.card-flush { padding: 0; }
.card-head.padded { padding: 18px 22px 8px; }
.cards, .grid-2, .grid-main { gap: 20px; }
.cards { margin-bottom: 20px; }
.grid-2 > .card { margin-bottom: 20px; }
.db { gap: 24px; }
.db-grid-2, .db-grid-3, .db-products, .db-split { gap: 20px; }
.db-panel, .db-product { padding: 22px 24px; }
.stat-label, .db-kpi-label { text-transform: none; letter-spacing: 0; font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.stat-value { font-size: 28px; font-weight: 600; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.stat-accent, .db-kpi-lead, .db-kpi-lead:hover { background: var(--primary); }
.stat-accent { box-shadow: 0 8px 24px rgba(2, 114, 190, .22); }
.db-kpi-lead:hover { background: var(--primary-hover); }
.stat-accent .stat-label, .stat-accent .stat-foot, .db-kpi-lead .db-kpi-label, .db-kpi-lead .db-kpi-note { color: rgba(255, 255, 255, .86); }
.db-kpis { border: 0; border-radius: var(--radius); box-shadow: var(--shadow); }
.db-kpi { border-left: .5px solid var(--hairline-strong); padding: 20px 22px; transition: background-color .16s ease; }
.db-kpi:hover { background: var(--surface-2); }
.db-kpi-value { font-size: 30px; font-weight: 600; letter-spacing: -.028em; }
.db-kpi-lead + .db-kpi { border-left: 0; }
.db-section-head h2 { font-size: 17px; }
.db-figures dd { font-weight: 600; letter-spacing: -.02em; }
.db-figures, .db-figures > div { border-color: var(--hairline); }
.db-chase li, .db-issues li, .template-list li { border-color: var(--hairline); }
.seg-stock { background: #8e8e93; }
.seg-in { background: #8fd0f7; }
.seg-out { background: var(--brand); }

/* Buttons: capsules, press feedback on pointer-down */
.btn { border-radius: 980px; border: 0; padding: 9px 16px; min-height: 36px; font-weight: 500; font-size: 13.5px; letter-spacing: -.008em; transition: background-color .16s ease, box-shadow .16s ease, transform .1s ease-out; }
.btn:active, .btn-link:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: default; }
.btn-primary { box-shadow: 0 1px 2px rgba(2, 114, 190, .3); }
.btn-secondary { background: var(--tint); color: var(--primary-hover); }
.btn-secondary:hover { background: var(--tint-strong); }
.btn-light { background: var(--surface); box-shadow: 0 0 0 .5px var(--hairline-strong), 0 1px 2px rgba(0, 0, 0, .05); }
.btn-light:hover { background: var(--surface-2); }
.btn-sm { padding: 6px 12px; min-height: 30px; font-size: 12.5px; }
.btn-block { padding: 12px; min-height: 44px; font-size: 15px; }
.btn-link { font-weight: 500; transition: transform .1s ease-out; }
.page-actions { margin-bottom: 18px; }

/* Forms: filled fields, a clear focus ring */
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], input[type=search], input[type=tel], input[type=file], select, textarea {
  background: var(--fill); border: 0; border-radius: 10px; padding: 9px 12px; min-height: 40px; font-size: 14px; letter-spacing: -.006em; color: var(--text); box-shadow: inset 0 0 0 .5px transparent; transition: background-color .16s ease, box-shadow .16s ease;
}
input:hover, select:hover, textarea:hover { background: var(--fill-strong); }
input:focus, select:focus, textarea:focus { outline: 0; background: var(--surface); box-shadow: 0 0 0 3px var(--focus), inset 0 0 0 1px var(--brand); }
input::placeholder, textarea::placeholder { color: var(--text-3); }
input[type=checkbox], input[type=radio] { accent-color: var(--primary); width: 16px; height: 16px; }
.field { gap: 6px; }
.field > span { font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.field-button { padding-top: 23px; }
.calc-box { background: var(--surface-2); border: 0; border-radius: 12px; }
.calc-box strong { font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.inline-form input { min-height: 34px; padding: 6px 10px; }
.add-line { background: var(--surface-2); border-top: .5px solid var(--hairline-strong); padding: 20px 22px; }
.filters { gap: 14px; }

/* Tables: hairlines only, no boxes */
.table-tools { padding: 14px 18px; border-bottom: .5px solid var(--hairline); }
.data-table { font-size: 13.5px; font-variant-numeric: tabular-nums; }
.data-table th { background: none; color: var(--text-3); font-size: 12px; font-weight: 500; letter-spacing: 0; padding: 11px 14px; border-bottom: .5px solid var(--hairline-strong); }
.data-table td { padding: 11px 14px; border-bottom: .5px solid var(--hairline); }
.data-table th:first-child, .data-table td:first-child { padding-left: 22px; }
.data-table th:last-child, .data-table td:last-child { padding-right: 22px; }
.data-table tbody tr:hover td { background: var(--fill-faint); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tfoot td { background: none; font-weight: 600; border-top: .5px solid var(--hairline-strong); }
.data-table tr.group td { background: var(--surface-2); font-weight: 600; }
.data-table tr.subtotal td { background: none; font-weight: 600; border-bottom: .5px solid var(--hairline-strong); }
.data-table tr.row-out td { background: #fffdf8; }
.mini-table td { border-bottom: .5px solid var(--hairline); font-variant-numeric: tabular-nums; }
.data-table td[data-label="Date"] { white-space: nowrap; }
.data-table .inline-form { flex-wrap: nowrap; align-items: center; margin: 0; }
.data-table .inline-form input[type=text] { flex: 1 1 110px; min-width: 96px; }
.data-table .inline-form input[type=file] { flex: 1 1 210px; min-width: 190px; font-size: 12.5px; }

/* Status and messages */
.badge { font-size: 11.5px; font-weight: 600; letter-spacing: 0; padding: 2px 9px; border-radius: 980px; }
.badge-blue { background: var(--tint); color: var(--primary-hover); }
.alert { border: 0; border-radius: 14px; padding: 12px 42px 12px 16px; box-shadow: var(--shadow); animation: materialize .28s var(--ease); transform-origin: top center; }
.alert-success, .alert-error, .alert-warning { border: 0; }
.alert-close { transition: transform .1s ease-out; }
.alert-close:active { transform: scale(.9); }
.details dt, .db-figures dt, .progress-stats span { font-weight: 500; color: var(--text-2); }
.details dd { font-weight: 500; }
.progress { height: 8px; background: var(--fill-strong); }
.progress span { background: var(--green); transition: width .42s var(--ease); }
.progress-stats strong { font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.status-actions { border-top: .5px solid var(--hairline-strong); }
.timeline li { border-left: 1px solid var(--hairline-strong); }
.db-track, .hbar-track { background: var(--fill-strong); }
.db-spread { background: var(--fill); border: 0; }
.db-kind-po { background: var(--fill-strong); color: var(--text-2); }
.chart-tip { background: rgba(29, 29, 31, .86); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border-radius: 10px; box-shadow: 0 8px 28px rgba(0, 0, 0, .2); }
.c-grid { stroke: rgba(0, 0, 0, .06); }
.c-axis { stroke: rgba(0, 0, 0, .14); }
.hbar-value, .db-age { font-variant-numeric: tabular-nums; font-weight: 600; }
.issue { border-left: 0; box-shadow: var(--shadow), inset 3px 0 0 var(--amber); }
.issue.issue-red { box-shadow: var(--shadow), inset 3px 0 0 var(--red); }
.issue.resolved { box-shadow: var(--shadow), inset 3px 0 0 var(--green); }

/* Segmented control */
.segmented { background: var(--fill-strong); border: 0; border-radius: 11px; padding: 2px; gap: 1px; }
.segmented a { border-radius: 9px; padding: 6px 13px; font-weight: 500; color: var(--text); transition: background-color .16s ease, transform .1s ease-out; }
.segmented a:active { transform: scale(.97); }
.segmented a.active { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: 0 0 0 .5px rgba(0, 0, 0, .04), 0 2px 6px rgba(0, 0, 0, .1); }

/* Sign in */
.callout { border: 0; background: var(--surface); box-shadow: var(--shadow), inset 0 0 0 1px var(--tint-strong); }
.auth-body { background: radial-gradient(70% 60% at 50% 0%, rgba(3, 142, 235, .13), transparent 70%), var(--bg); }
.auth-card { background: var(--glass-raised); -webkit-backdrop-filter: saturate(180%) blur(30px); backdrop-filter: saturate(180%) blur(30px); border: 0; border-radius: 24px; padding: 34px 32px; box-shadow: 0 0 0 .5px var(--hairline), 0 24px 60px rgba(0, 0, 0, .08); animation: materialize .36s var(--ease); }
.auth-logo { padding-bottom: 18px; }
.auth-title { font-size: 22px; font-weight: 600; letter-spacing: -.02em; }

@keyframes materialize {
  from { opacity: 0; transform: scale(.97) translateY(-4px); }
  to { opacity: 1; transform: none; }
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.topbar-actions { display: flex; align-items: center; gap: 12px; }

/* Refinements */
h1, h2, h3, .card-head h2 { text-wrap: balance; }
p, .hint { text-wrap: pretty; }
select { -webkit-appearance: none; appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5' fill='none' stroke='%236a6a70' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 12px; }
input[type=file] { padding: 5px 8px; font-size: 13px; color: var(--text-2); }
input[type=file]::file-selector-button { font: 500 12.5px/1.2 var(--font); color: var(--primary-hover); background: var(--tint); border: 0; border-radius: 980px; padding: 6px 12px; margin-right: 10px; cursor: pointer; transition: background-color .16s ease; }
input[type=file]::file-selector-button:hover { background: var(--tint-strong); }
.db-filter { align-items: center; }
.db-actions { margin-left: auto; }
.db-range { margin: -12px 0 0; padding: 0 2px; font-size: 12.5px; color: var(--text-3); }
.table-wrap.more-right { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 44px), transparent); }

/* Confirmation sheet */
.sheet { width: min(340px, calc(100vw - 32px)); border: 0; border-radius: 22px; padding: 22px 20px 16px; color: var(--text); background: var(--glass-raised); -webkit-backdrop-filter: saturate(180%) blur(30px); backdrop-filter: saturate(180%) blur(30px); box-shadow: 0 0 0 .5px var(--hairline), 0 24px 70px rgba(0, 0, 0, .24); text-align: center; animation: sheet-in .28s var(--ease); }
.sheet::backdrop { background: rgba(0, 0, 0, .26); animation: fade-in .2s ease; }
.sheet p { margin: 0 0 18px; font-size: 14.5px; line-height: 1.4; letter-spacing: -.01em; }
.sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sheet-actions .btn { justify-content: center; min-height: 40px; }
@keyframes sheet-in {
  from { opacity: 0; transform: scale(.95); }
  to { opacity: 1; transform: none; }
}

/* Dashboard overview */
.db-overview { display: grid; grid-template-columns: minmax(0, 7fr) minmax(280px, 4fr); gap: 20px; align-items: stretch; }
.db-hero-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px 26px 16px; min-width: 0; }
.db-hero-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 10px; }
.db-hero-label { margin: 0 0 2px; font-size: 13px; font-weight: 500; color: var(--text-2); }
.db-hero-value { margin: 0; font-size: 42px; font-weight: 700; letter-spacing: -.035em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.db-hero-head .link { white-space: nowrap; }
.db-hero-note { margin: 6px 0 0; font-size: 13px; color: var(--text-2); }
.db-tiles { display: grid; grid-template-rows: repeat(auto-fit, minmax(0, 1fr)); gap: 12px; min-width: 0; }
.db-tile { display: flex; flex-direction: column; justify-content: center; gap: 2px; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); padding: 13px 18px; color: inherit; transition: background-color .16s ease, transform .1s ease-out; }
.db-tile:hover { opacity: 1; background: var(--surface-2); }
.db-tile:active { transform: scale(.985); }
.db-tile-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 34px; }
.db-tile-value { font-size: 25px; font-weight: 600; letter-spacing: -.025em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.db-tile-foot { font-size: 12.5px; color: var(--text-2); }
.db-panel h2, .db-section-head h2 { text-wrap: balance; }
.db-section-head h3 { margin: 0; font-size: 15px; }

/* Chart marks */
.c-spark { flex: 0 1 96px; width: 96px; height: 34px; overflow: visible; }
.c-spark .c-line { stroke-width: 1.75; }
.c-spark .c-dot { stroke-width: 1.5; }
.c-grid { stroke: rgba(0, 0, 0, .055); }
.c-axis { stroke: rgba(0, 0, 0, .16); }
.c-area { stroke: none; }
.c-wash-top { stop-color: #038eeb; stop-opacity: .2; }
.c-wash-end { stop-color: #038eeb; stop-opacity: .01; }
.c-line { stroke-width: 2; }
.c-peak { font-size: 12.5px; font-weight: 600; fill: var(--text); font-variant-numeric: tabular-nums; }
.c-hover { opacity: 0; transition: opacity .12s ease; }
.c-group:hover .c-hover, .c-group:focus .c-hover { opacity: 1; }
.c-group:focus { outline: 0; }
.c-group:focus-visible .c-hit { stroke: var(--focus); stroke-width: 2; }
.c-band { fill: rgba(3, 142, 235, .1); stroke: none; }
.c-band.is-neg { fill: rgba(200, 53, 43, .13); }
.c-band.is-bridge { fill: rgba(3, 142, 235, .05); }
.c-band.is-bridge.is-neg { fill: rgba(200, 53, 43, .06); }
.c-bridge { stroke-dasharray: 2 6; stroke-width: 1.75; opacity: .75; }
.chart-note { margin: 6px 0 0; font-size: 12px; color: var(--text-3); }
.c-bar { transition: opacity .12s ease; }
.c-group:hover .c-bar { opacity: .8; }
.hbar-track { height: 6px; border-radius: 3px; }
.hbar-fill { border-radius: 3px; transition: width .42s var(--ease); }
.band-row { margin-top: 14px; }
.band-track { display: flex; gap: 2px; height: 14px; }
.band-track span { display: block; min-width: 3px; }
.band-track span:first-child { border-radius: 4px 0 0 4px; }
.band-track span:last-child { border-radius: 0 4px 4px 0; }
.band-track span:only-child { border-radius: 4px; }
.band-track span:hover, .band-track span:focus { filter: brightness(.92); outline: 0; }
.b-1 { background: #6cbff3; }
.b-2 { background: #2f9de6; }
.b-3 { background: #0a75c2; }
.b-4 { background: #044f85; }
.chart-table summary { font-size: 12px; }

/* Date field and calendar */
.date-field { position: relative; display: block; width: 100%; }
.date-field input[type=text] { padding-right: 40px; font-variant-numeric: tabular-nums; }
.date-btn { position: absolute; top: 50%; right: 4px; display: grid; place-items: center; width: 32px; height: 32px; margin-top: -16px; border: 0; border-radius: 8px; background: none; color: var(--primary); cursor: pointer; transition: background-color .16s ease, transform .1s ease-out; }
.date-btn:hover { background: var(--tint); }
.date-btn:active { transform: scale(.94); }
.date-btn svg { width: 17px; height: 17px; }
.dp { position: fixed; z-index: 70; width: 296px; padding: 12px; background: var(--glass-raised); -webkit-backdrop-filter: saturate(180%) blur(30px); backdrop-filter: saturate(180%) blur(30px); border-radius: 18px; box-shadow: 0 0 0 .5px var(--hairline-strong), 0 16px 48px rgba(0, 0, 0, .16), 0 2px 8px rgba(0, 0, 0, .06); animation: materialize .22s var(--ease); }
.dp button { font-family: var(--font); cursor: pointer; }
.dp-head { display: flex; align-items: center; gap: 2px; margin-bottom: 8px; }
.dp-title { flex: 1; min-height: 36px; padding: 0 8px; border: 0; border-radius: 9px; background: none; color: var(--text); font-size: 15px; font-weight: 600; letter-spacing: -.012em; text-align: left; transition: background-color .16s ease; }
.dp-title:hover { background: var(--fill); }
.dp-nav { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 9px; background: none; color: var(--primary); transition: background-color .16s ease, transform .1s ease-out; }
.dp-nav:hover { background: var(--tint); }
.dp-nav:active { transform: scale(.94); }
.dp-nav svg { width: 17px; height: 17px; stroke-width: 2.2; }
.dp-next svg { transform: rotate(180deg); }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; }
.dp-dow { display: grid; place-items: center; height: 26px; font-size: 11.5px; font-weight: 600; color: var(--text-3); }
.dp-day { display: grid; place-items: center; width: 100%; aspect-ratio: 1; border: 0; border-radius: 50%; background: none; color: var(--text); font-size: 14px; font-variant-numeric: tabular-nums; transition: background-color .12s ease, transform .1s ease-out; }
.dp-day:hover { background: var(--fill); }
.dp-day:active { transform: scale(.94); }
.dp-day.is-out { color: var(--text-3); opacity: .55; }
.dp-day.is-today { color: var(--primary); font-weight: 700; }
.dp-day.is-selected { background: var(--primary); color: #fff; font-weight: 600; opacity: 1; }
.dp-months { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.dp-month { min-height: 48px; border: 0; border-radius: 12px; background: var(--fill-faint); color: var(--text); font-size: 14px; font-weight: 500; transition: background-color .12s ease; }
.dp-month:hover { background: var(--fill-strong); }
.dp-month.is-selected { background: var(--primary); color: #fff; }
.dp-foot { display: flex; justify-content: space-between; margin-top: 6px; padding-top: 6px; border-top: .5px solid var(--hairline); }
.dp-link { min-height: 34px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--primary); font-size: 13.5px; font-weight: 500; transition: background-color .16s ease; }
.dp-link:hover { background: var(--tint); }

/* Purchase orders list */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.list-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.list-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.list-count { color: var(--text-3); font-weight: 500; font-variant-numeric: tabular-nums; }
.list-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 16px; }
.list-stats div { display: flex; flex-direction: column; gap: 2px; padding: 14px 20px; border-left: .5px solid var(--hairline-strong); min-width: 0; }
.list-stats div:first-child { border-left: 0; }
.list-stats small { font-size: 12px; color: var(--text-3); }
.list-stats .is-lead strong { color: var(--primary); }
.list-stats span { font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.list-stats strong { font-size: 22px; font-weight: 600; letter-spacing: -.022em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.list-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 14px 18px; border-bottom: .5px solid var(--hairline); }
.list-filters label { display: block; flex: 1 1 150px; min-width: 0; }
.list-filters .list-search { flex: 2 1 240px; }
.list-filters .list-date { flex: 1 1 170px; }
.list-filters .btn { flex: none; }
.list-date { position: relative; }
.list-date > span:not(.date-field) { position: absolute; z-index: 1; left: 12px; top: 50%; transform: translateY(-50%); font-size: 12.5px; color: var(--text-3); pointer-events: none; }
.list-date input[type=text] { padding-left: 46px; }
.list-date input[type=date] { padding-left: 46px; }
.list-table td { vertical-align: middle; padding-top: 12px; padding-bottom: 12px; }
.list-table tbody tr[data-href] { cursor: pointer; }
.list-table small { display: block; margin-top: 2px; font-size: 12px; color: var(--text-3); white-space: nowrap; }
.list-table small strong { font-weight: 600; color: var(--text-2); }
.list-table small strong.neg { color: var(--red); }
.list-id { display: flex; align-items: center; gap: 6px; }
.list-status { white-space: nowrap; }
.list-status .badge + .badge { margin-left: 4px; }
.list-no { font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; }
.list-name, .list-total { font-weight: 500; }
.list-th-received { min-width: 140px; }
.list-table .list-progress { white-space: normal; max-width: 210px; line-height: 1.35; margin-top: 5px; }
.list-table th, .list-table td { padding-left: 10px; padding-right: 10px; }
.list-table th:first-child, .list-table td:first-child { padding-left: 18px; }
.list-row-actions, .list-table th:last-child { position: sticky; right: 0; z-index: 1; background: var(--surface); }
.list-table tbody tr:hover .list-row-actions { background: #fafafb; }
.list-bar { height: 5px; border-radius: 3px; background: var(--fill-strong); overflow: hidden; }
.list-bar span { display: block; height: 100%; border-radius: 3px; background: var(--brand); }
.list-bar.is-full span { background: var(--green); }
.list-row-actions { width: 84px; white-space: nowrap; text-align: right; padding-left: 4px !important; padding-right: 12px !important; }
.list-actions { margin-left: auto; }
.icon-action { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: var(--text-2); transition: background-color .16s ease, color .16s ease, transform .1s ease-out; }
.icon-action:hover { opacity: 1; background: var(--tint); color: var(--primary); }
.icon-action:active { transform: scale(.94); }
.icon-action svg { width: 17px; height: 17px; }

/* Responsive */
@media (max-width: 1100px) {
  .grid-main { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .3); }
  .sidebar-backdrop.show { display: block; position: fixed; inset: 0; background: rgba(10, 15, 30, .4); z-index: 25; }
  .main { margin-left: 0; }
  .menu-btn { display: inline-flex; }
  .grid-2, .grid-main, .db-split, .db-grid-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .content { padding: 16px; }
  .topbar { padding: 0 12px; }
  .user-name { display: none; }
  .page-title { font-size: 16px; }
  .card { padding: 14px 16px; }
  .card.card-flush { padding: 0; }
  .card-head.padded { padding: 14px 16px 4px; }
  .page-actions .export { margin-left: 0; }
  .stat-value { font-size: 21px; }
  .progress-stats { grid-template-columns: 1fr 1fr; }
  .quick-search { max-width: none; }
  .issue-form { flex-basis: 100%; }
  .field-button { padding-top: 0; }
    .db-kpis { grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); }
  .db-kpi { padding: 16px; border-left: 0; background: var(--surface); }
  .db-kpi.db-kpi-lead { grid-column: 1 / -1; background: linear-gradient(150deg, #0269b0 0%, #0278c8 100%); }
  .db-kpis:not(:has(.db-kpi-lead)) .db-kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .db-kpi-value { font-size: 23px; }
  .db-products { grid-template-columns: minmax(0, 1fr); }
  .db-product, .db-panel { padding: 16px; }
  .db-figures { grid-template-columns: 1fr 1fr; }
  .db-figures > div:nth-child(3) { border-left: 0; padding-left: 0; border-top: 1px solid var(--border); }
  .db-figures > div:nth-child(4) { border-top: 1px solid var(--border); }
  .db-figures dd { font-size: 18px; }
  .db-grid-3 { grid-template-columns: minmax(0, 1fr); }
  .chart-svg .c-ylabel, .chart-svg .c-endlabel { font-size: 19px; }
  .chart-svg .c-xlabel { font-size: 20px; }
  .c-dot { r: 6; }
}
@media print {
  .sidebar, .topbar, .page-actions, .filters, .table-tools, .add-line, .status-actions { display: none !important; }
  .main { margin: 0; }
  .card { box-shadow: none; }
}

/* Preferences the person has set on their device */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation: fade-in .16s linear !important; }
  .btn:active, .nav-item:active, .segmented a:active, .icon-btn:active, .user-btn:active { transform: none; }
}
@media (prefers-reduced-transparency: reduce) {
  :root { --glass: #f5f5f7; --glass-side: #ececf0; --glass-raised: #ffffff; }
  .sidebar, .topbar, .menu, .auth-card, .chart-tip { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .chart-tip { background: #1d1d1f; }
}
@media (prefers-contrast: more) {
  :root { --glass: #f5f5f7; --glass-side: #ececf0; --glass-raised: #ffffff; --hairline: rgba(0, 0, 0, .3); --hairline-strong: rgba(0, 0, 0, .5); --text-2: #3a3a3c; --text-3: #48484a; }
  .sidebar, .topbar, .menu, .auth-card { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .card, .db-panel, .db-product, .db-kpis { box-shadow: 0 0 0 1px var(--hairline-strong); }
  input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], input[type=search], input[type=tel], input[type=file], select, textarea { box-shadow: inset 0 0 0 1px var(--hairline-strong); }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root { --glass: #f5f5f7; --glass-side: #ececf0; --glass-raised: #ffffff; }
}
@media (max-width: 1100px) {
  .db-overview { grid-template-columns: minmax(0, 1fr); }
  .db-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; }
}
@media (max-width: 640px) {
  .db-hero-card { padding: 18px 16px 12px; }
  .db-hero-value { font-size: 34px; }
  .db-tile { padding: 12px 14px; }
  .db-tile-value { font-size: 21px; }
  .db-tile-row .c-spark { display: none; }
  .chart-svg .c-peak { font-size: 19px; }
  .db-hero-card .c-ylabel, .db-hero-card .c-xlabel { font-size: 23px; }
  .db-hero-card .c-peak { font-size: 25px; }
}

@media (min-width: 761px) and (max-width: 1240px) {
  .list-table th, .list-table td { padding-left: 7px; padding-right: 7px; }
  .list-table th:first-child, .list-table td:first-child { padding-left: 16px; }
  .list-th-received { min-width: 112px; }
  .list-table .list-progress { max-width: 150px; }
  .list-table td:not(.num) small { white-space: normal; }
  .list-table td:first-child small { white-space: nowrap; }
  .list-table th, .list-table td { padding-left: 6px; padding-right: 6px; }
  .list-table th:first-child, .list-table td:first-child { padding-left: 14px; }
  .list-row-actions { width: 76px; }
  .list-row-actions .icon-action { width: 30px; height: 30px; }
  .list-th-received { min-width: 96px; }
}
@media (max-width: 760px) {
  .list-stats { grid-template-columns: 1fr 1fr; }
  .list-stats div:nth-child(odd) { border-left: 0; }
  .list-stats div { padding: 12px 16px; }
  .list-stats strong { font-size: 19px; }
  .list-head .segmented { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .list-head .segmented a { flex: 1 0 auto; text-align: center; }
  .list-filters { padding: 12px; }
  .list-filters .list-search, .list-filters .list-date { flex: 1 1 100%; }
  .list-filters .btn { flex: 1 1 auto; justify-content: center; }
  .list-actions { margin-left: 0; width: 100%; }
  .list-row-actions, .list-table tbody tr:hover .list-row-actions { position: static; background: none; }
  .list-table, .list-table tbody { display: block; }
  .list-table thead { display: none; }
  .list-table tbody tr { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 14px 16px; border-bottom: .5px solid var(--hairline); }
  .list-table tbody tr td, .list-table tbody tr td:first-child, .list-table tbody tr td:last-child { display: block; padding: 0; border: 0; text-align: left; }
  .list-table td[data-label="Qty"] { display: none; }
  .list-table td[data-label="Value"] { text-align: right; grid-column: 2; grid-row: 1; }
  .list-table td[data-label="PO"] { grid-column: 1; grid-row: 1; }
  .list-table td[data-label="Supplier"] { grid-column: 1 / -1; }
  .list-table td[data-label="Received"] { grid-column: 1 / -1; }
  .list-table td.list-status { grid-column: 1; align-self: center; }
  .list-table tbody tr td.list-row-actions { grid-column: 2; width: auto; text-align: right; }
  .list-table tbody tr.empty-row { display: block; text-align: center; }
}

@media (max-width: 960px) {
  .sidebar { box-shadow: none; --glass-side: rgba(246, 246, 248, .86); }
  .sidebar-backdrop.show { background: rgba(0, 0, 0, .28); animation: fade-in .24s ease; }
  .topbar { padding: 0 20px; }
  .content { padding: 20px; }
}
@media (max-width: 640px) {
  input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], input[type=search], input[type=tel], select, textarea { font-size: 16px; }
  .content { padding: 16px; }
  .topbar { padding: 0 12px; }
  .card { padding: 16px; }
  .card.card-flush { padding: 0; }
    .db-panel, .db-product { padding: 18px; }
  .db-kpi { border-left: 0; }
  .db-kpi.db-kpi-lead { background: var(--primary); }
  .data-table th:first-child, .data-table td:first-child { padding-left: 16px; }
  .data-table th:last-child, .data-table td:last-child { padding-right: 16px; }
  .add-line { padding: 16px; }
}
