/* Orders dashboard (example 03). Everything below comes from a small token set: surfaces and text,
   one accent, three status colors (always paired with an icon and a word), a spacing scale and one
   radius. Dark is the default; the light theme swaps only the color tokens. */
:root {
  /* space */
  --db-s1: 4px;
  --db-s2: 8px;
  --db-s3: 12px;
  --db-s4: 16px;
  --db-s5: 24px;
  --db-s6: 32px;
  /* shape and motion */
  --db-radius: 2px;
  --db-row-y: 13px;
  --db-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --db-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* color: dark (default) */
:root,
html[data-theme="dark"] {
  --db-bg: #101318;
  --db-side: #0e1115;
  --db-panel: #161a21;
  --db-panel-2: #1b2029;
  --db-hover: #1a1f28;
  --db-press: #222834;
  --db-line: #242a33;
  --db-line-2: #313845;
  --db-line-3: #424a59;
  --db-text: #e6e9ee;
  --db-soft: #b9c0cb;
  --db-muted: #8a93a1;
  --db-subtle: #5f6876;
  --db-accent: #6b8cff;
  --db-accent-2: #8ea8ff;
  --db-accent-wash: #1b2236;
  --db-accent-wash-2: #2a3558;
  --db-on-accent: #0c1222;
  --db-ok: #6dbb8f;
  --db-warn: #d9a650;
  --db-bad: #e07070;
  --db-warn-wash: #241f17;
  --db-warn-line: #4d4026;
  --db-bad-wash: #261a1c;
  --db-bad-line: #5a3135;
  --db-bad-text: #f0b4b4;
  --db-tip: #0c0f13;
  --db-toast: #222834;
  --db-toast-text: #e6e9ee;
  --db-toast-link: #8ea8ff;
  --db-toast-hover: #2b3242;
  --db-flash: #24305a;
  --db-scrim: rgba(8, 10, 13, 0.55);
  color-scheme: dark;
}

/* color: light */
html[data-theme="light"] {
  --db-bg: #f4f6f9;
  --db-side: #eceff4;
  --db-panel: #ffffff;
  --db-panel-2: #f1f3f7;
  --db-hover: #f3f5f8;
  --db-press: #e6e9ef;
  --db-line: #e0e4ea;
  --db-line-2: #cdd3dc;
  --db-line-3: #aeb6c2;
  --db-text: #161a21;
  --db-soft: #3c4451;
  --db-muted: #5d6675;
  --db-subtle: #8a92a0;
  --db-accent: #3b5fdb;
  --db-accent-2: #2c4cc0;
  --db-accent-wash: #eaeffd;
  --db-accent-wash-2: #d5defa;
  --db-on-accent: #ffffff;
  --db-ok: #2b7d52;
  --db-warn: #9a6210;
  --db-bad: #bf3b39;
  --db-warn-wash: #fbf4e6;
  --db-warn-line: #e8cf9f;
  --db-bad-wash: #fcefef;
  --db-bad-line: #efc4c3;
  --db-bad-text: #9e2d2b;
  --db-tip: #ffffff;
  --db-toast: #1d222b;
  --db-toast-text: #f2f4f7;
  --db-toast-link: #a9bcff;
  --db-toast-hover: #2b313c;
  --db-flash: #d5defa;
  --db-scrim: rgba(22, 26, 33, 0.3);
  color-scheme: light;
}

html {
  background: var(--db-bg);
}

body {
  background: var(--db-bg);
}

.db {
  min-height: calc(100vh - var(--ex-bar));
  background: var(--db-bg);
  color: var(--db-text);
  font-size: 0.875rem;
  line-height: 1.45;
}

.db *,
.db *::before,
.db *::after {
  box-sizing: border-box;
}

/* line icons: one stroke style everywhere */
.db svg {
  flex: none;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.db h1,
.db h2,
.db p {
  margin: 0;
}

.db button,
.db input,
.db select {
  font: inherit;
  color: inherit;
}

.db :focus-visible {
  outline: 1px solid var(--db-accent-2);
  outline-offset: 2px;
}

.num,
.db table,
.kpi-value {
  font-variant-numeric: tabular-nums;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border: 1px solid var(--db-line-2);
  border-radius: var(--db-radius);
  background: var(--db-bg);
  color: var(--db-muted);
  font: 500 0.6875rem/1 "Inter", sans-serif;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--db-s2);
  padding: 7px 12px;
  border: 1px solid var(--db-line-2);
  border-radius: var(--db-radius);
  background: var(--db-panel-2);
  color: var(--db-text);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s var(--db-ease), border-color 0.2s var(--db-ease), color 0.2s var(--db-ease);
}

.btn:hover {
  border-color: var(--db-line-3);
  background: var(--db-press);
}

.btn svg {
  width: 14px;
  height: 14px;
}

.btn-sm {
  padding: 5px 10px;
}

.btn-ghost {
  background: transparent;
  border-color: var(--db-line);
  color: var(--db-soft);
}

.btn-ghost:hover {
  background: var(--db-hover);
  color: var(--db-text);
}

.btn-ghost kbd {
  min-width: 16px;
  height: 16px;
}

.btn-primary {
  border-color: var(--db-accent);
  background: var(--db-accent);
  color: var(--db-on-accent);
}

.btn-primary:hover {
  border-color: var(--db-accent-2);
  background: var(--db-accent-2);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--db-radius);
  background: none;
  color: var(--db-muted);
  cursor: pointer;
  transition: color 0.2s var(--db-ease), background-color 0.2s var(--db-ease);
}

.icon-btn:hover {
  background: var(--db-hover);
  color: var(--db-text);
}

/* ---------- App layout ---------- */
.app {
  display: grid;
  grid-template-columns: 212px minmax(0, 1fr);
  min-height: calc(100vh - var(--ex-bar));
}

.side {
  position: sticky;
  top: var(--ex-bar);
  display: flex;
  flex-direction: column;
  gap: var(--db-s5);
  height: calc(100vh - var(--ex-bar));
  padding: 20px 12px;
  border-right: 1px solid var(--db-line);
  background: var(--db-side);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 8px;
  color: var(--db-text);
}

.brand .brand-mark {
  width: 26px;
  height: 26px;
  color: var(--db-accent);
  stroke-width: 1.5;
}

.brand-name {
  display: grid;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.brand-name small {
  color: var(--db-muted);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.nav {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 8px;
  border: 0;
  border-radius: var(--db-radius);
  background: none;
  color: var(--db-muted);
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s var(--db-ease), background-color 0.2s var(--db-ease);
}

.nav-item:hover {
  background: var(--db-hover);
  color: var(--db-text);
}

.nav-item[aria-current="page"] {
  background: var(--db-panel-2);
  color: var(--db-text);
}

.nav-item[aria-current="page"] svg {
  color: var(--db-accent);
}

.nav-item:focus-visible {
  outline-offset: -1px;
}

.nav-count {
  margin-left: auto;
  color: var(--db-muted);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.team {
  margin-top: auto;
  padding: 0 8px;
}

.team-label,
.section-label {
  color: var(--db-muted);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.team-list {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  color: var(--db-soft);
  font-size: 0.8125rem;
}

.team-list li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.avatar {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--db-line-2);
  border-radius: var(--db-radius);
  background: var(--db-panel-2);
  color: var(--db-soft);
  font-size: 0.6875rem;
  font-weight: 600;
}

.main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: var(--db-s5);
  min-width: 0;
  max-width: 1240px;
  padding: 28px 32px 72px;
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--db-s4);
}

.page-head h1 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.page-head h1:focus {
  outline: none;
}

.page-date {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 4px !important;
  color: var(--db-muted);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

.page-date .dot {
  width: 3px;
  height: 3px;
  background: var(--db-subtle);
}

.head-actions {
  display: flex;
  gap: var(--db-s2);
}

.is-spinning svg {
  animation: db-spin 0.8s linear infinite;
}

@keyframes db-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Needs attention ---------- */
.attention {
  display: grid;
  gap: 10px;
}

.attn-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--db-s3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.attn {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 2px 12px;
  width: 100%;
  height: 100%;
  padding: 14px 14px 14px 16px;
  border: 1px solid var(--db-line);
  border-radius: var(--db-radius);
  background: var(--db-panel);
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s var(--db-ease), border-color 0.2s var(--db-ease);
}

/* a 2px edge in the item's tone, next to its icon and words */
.attn::before {
  content: "";
  position: absolute;
  inset: -1px auto -1px -1px;
  width: 2px;
  background: var(--tone, var(--db-line-2));
}

.attn:hover {
  border-color: var(--db-line-2);
  background: var(--db-hover);
}

.attn[aria-pressed="true"] {
  border-color: var(--db-accent);
  background: var(--db-accent-wash);
}

.attn-icon {
  grid-row: span 2;
  margin-top: 1px;
  color: var(--tone, var(--db-muted));
}

.attn-title {
  color: var(--db-text);
  font-weight: 500;
}

.attn-title b {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.attn-text {
  grid-column: 2;
  color: var(--db-muted);
  font-size: 0.8125rem;
}

.attn-go {
  grid-row: span 2;
  align-self: center;
  color: var(--db-subtle);
  font-size: 0.75rem;
  white-space: nowrap;
  transition: color 0.2s var(--db-ease), transform 0.3s var(--db-ease-out);
}

.attn:hover .attn-go {
  color: var(--db-soft);
  transform: translateX(2px);
}

.attn[aria-pressed="true"] .attn-go {
  color: var(--db-accent-2);
}

.tone-bad {
  --tone: var(--db-bad);
}

.tone-warn {
  --tone: var(--db-warn);
}

.tone-info {
  --tone: var(--db-accent);
}

.tone-ok {
  --tone: var(--db-ok);
}

.attn-clear {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  grid-column: 1 / -1;
  padding: 12px 16px;
  border: 1px dashed var(--db-line-2);
  border-radius: var(--db-radius);
  color: var(--db-muted);
}

.attn-clear > svg {
  color: var(--db-ok);
}

.attn-clear .btn {
  margin-left: auto;
}

/* ---------- KPI tiles ---------- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--db-s3);
}

.kpi {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 84px;
  grid-template-areas:
    "label label"
    "value spark"
    "change change";
  align-items: end;
  align-content: start;
  gap: 6px 12px;
  padding: 16px;
  border: 1px solid var(--db-line);
  border-radius: var(--db-radius);
  background: var(--db-panel);
}

.kpi-label {
  grid-area: label;
  color: var(--db-muted);
  font-size: 0.8125rem;
  font-weight: 500;
}

.kpi-value {
  grid-area: value;
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.kpi-value small {
  margin-left: 3px;
  color: var(--db-muted);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0;
}

.db .spark {
  grid-area: spark;
  width: 84px;
  height: 30px;
  overflow: visible;
}

.spark .spark-line {
  stroke: var(--db-accent);
  stroke-width: 1.5;
}

.spark .spark-area {
  fill: var(--db-accent);
  fill-opacity: 0.1;
  stroke: none;
}

.spark .spark-dot {
  fill: var(--db-accent);
  stroke: var(--db-panel);
  stroke-width: 1.5;
}

.kpi-change {
  grid-area: change;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  color: var(--db-muted);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

.kpi-change svg {
  width: 12px;
  height: 12px;
  margin-top: 3px;
  color: var(--db-soft);
}

/* ---------- Cards ---------- */
.card {
  border: 1px solid var(--db-line);
  border-radius: var(--db-radius);
  background: var(--db-panel);
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--db-s4);
  padding: 16px 20px 12px;
}

.card-title {
  font-size: 0.9375rem;
  font-weight: 600;
}

.card-sub {
  margin-top: 2px !important;
  color: var(--db-muted);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

/* ---------- Chart ---------- */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 2px 0 0 auto;
  padding: 0;
  list-style: none;
  color: var(--db-muted);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.legend li {
  display: flex;
  white-space: nowrap;
  align-items: center;
  gap: 6px;
}

.key {
  display: inline-block;
}

.key-today {
  width: 10px;
  height: 10px;
  border: 1px dashed var(--db-accent);
  background: var(--db-accent-wash);
}

.key-avg {
  width: 14px;
  border-top: 1px dashed var(--db-soft);
}

.chart-wrap {
  padding: 0 20px 12px;
}

.chart-box {
  position: relative;
}

.db .chart {
  display: block;
  width: 100%;
  height: 210px;
  overflow: visible;
  stroke: none;
}

.chart .grid {
  stroke: var(--db-line);
  stroke-width: 1;
}

.chart .axis {
  fill: var(--db-muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.chart .axis-y {
  text-anchor: end;
}

.chart .axis-x {
  text-anchor: middle;
}

.chart .axis-x.is-today {
  fill: var(--db-text);
  font-weight: 600;
}

.chart .bar {
  fill: var(--db-accent);
  transform-box: fill-box;
  transform-origin: 50% 100%;
  transform: scaleY(0);
  transition: transform 0.7s var(--db-ease-out), fill 0.2s var(--db-ease);
}

.chart.is-drawn .bar {
  transform: none;
}

/* today is still filling up: drawn as an outline with a light fill, and its label says "so far" */
.chart .bar.is-today {
  fill: var(--db-accent-wash);
  stroke: var(--db-accent);
  stroke-width: 1;
  stroke-dasharray: 3 2;
}

.chart .bar.is-active {
  fill: var(--db-accent-2);
}

.chart .bar.is-today.is-active {
  fill: var(--db-accent-wash-2);
}

.chart .avg {
  stroke: var(--db-soft);
  stroke-width: 1;
  stroke-dasharray: 2 3;
}

.chart .avg-label {
  fill: var(--db-soft);
  font-size: 11px;
  text-anchor: end;
  font-variant-numeric: tabular-nums;
}

.chart .hit {
  fill: transparent;
  cursor: pointer;
}

.chart .hit:focus {
  outline: none;
}

.chart .hit:focus-visible {
  stroke: var(--db-accent-2);
  stroke-width: 1;
}

.tip {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  min-width: 132px;
  padding: 8px 10px;
  border: 1px solid var(--db-line-2);
  border-radius: var(--db-radius);
  background: var(--db-tip);
  color: var(--db-text);
  font-size: 0.8125rem;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  white-space: nowrap;
}

.tip strong {
  display: block;
  font-weight: 600;
}

.tip span {
  color: var(--db-muted);
}

.chart-table {
  padding: 0 20px 16px;
}

.mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.mini-table th,
.mini-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--db-line);
  text-align: left;
}

.mini-table th {
  color: var(--db-muted);
  font-weight: 500;
}

.mini-table .num {
  text-align: right;
}

/* ---------- Orders: toolbar, bulk bar, filters ---------- */
.orders {
  scroll-margin-top: calc(var(--ex-bar) + 12px);
}

.toolbar-wrap {
  position: sticky;
  top: var(--ex-bar);
  z-index: 6;
  overflow: hidden;
  border-top: 1px solid var(--db-line);
  border-bottom: 1px solid var(--db-line);
  background: var(--db-panel);
}

.toolbar {
  display: flex;
  align-items: center;
  gap: var(--db-s3);
  padding: 10px 20px;
}

.search {
  display: flex;
  flex: 1;
  min-width: 0;
  align-items: center;
  gap: 8px;
  max-width: 420px;
  height: 34px;
  padding: 0 8px 0 10px;
  border: 1px solid var(--db-line-2);
  border-radius: var(--db-radius);
  background: var(--db-bg);
  color: var(--db-muted);
  transition: border-color 0.2s var(--db-ease);
}

.search:hover {
  border-color: var(--db-line-3);
}

.search:focus-within {
  border-color: var(--db-accent);
}

.search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: var(--db-text);
  outline: none;
}

.db .search input:focus-visible,
.db .sort-mobile select:focus-visible {
  outline: none;
}

.search input::placeholder {
  color: var(--db-subtle);
}

.search input::-webkit-search-cancel-button {
  opacity: 0.5;
  cursor: pointer;
}

.search:focus-within kbd {
  visibility: hidden;
}

.sort-mobile {
  display: none;
}

.density {
  margin-left: auto;
}

.density,
.seg-group {
  display: inline-flex;
  flex: none;
  border: 1px solid var(--db-line-2);
  border-radius: var(--db-radius);
}

.seg {
  padding: 6px 10px;
  border: 0;
  background: none;
  color: var(--db-muted);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s var(--db-ease), background-color 0.2s var(--db-ease);
}

.seg + .seg {
  border-left: 1px solid var(--db-line-2);
}

.seg:hover {
  color: var(--db-text);
}

.seg[aria-pressed="true"] {
  background: var(--db-panel-2);
  color: var(--db-text);
}

.seg:focus-visible {
  outline-offset: -2px;
}

.bulkbar {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--db-s3);
  padding: 0 20px;
  background: var(--db-accent-wash);
  transform: translateY(-100%);
  transition: transform 0.35s var(--db-ease-out);
}

.bulkbar.is-on {
  transform: none;
}

.bulk-count {
  color: var(--db-text);
  font-weight: 500;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.bulk-actions {
  display: flex;
  gap: var(--db-s2);
}

.filters {
  display: flex;
  align-items: center;
  gap: var(--db-s3);
  min-width: 0;
  padding: 12px 20px;
}

.chips {
  display: flex;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.chips::-webkit-scrollbar {
  display: none;
}

.chip {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--db-line);
  border-radius: var(--db-radius);
  background: transparent;
  color: var(--db-soft);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s var(--db-ease), background-color 0.2s var(--db-ease), color 0.2s var(--db-ease);
}

.chip:hover {
  border-color: var(--db-line-2);
  color: var(--db-text);
}

.chip[aria-pressed="true"] {
  border-color: var(--db-accent);
  background: var(--db-accent-wash);
  color: var(--db-text);
}

.chip:focus-visible {
  outline-offset: -2px;
}

.chip-count {
  color: var(--db-muted);
  font-variant-numeric: tabular-nums;
}

.chip svg {
  width: 12px;
  height: 12px;
}

.active-filter {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  padding: 3px 4px 3px 10px;
  border: 1px solid var(--db-line-2);
  border-radius: var(--db-radius);
  background: var(--db-panel-2);
  color: var(--db-soft);
  font-size: 0.8125rem;
}

.active-filter b {
  color: var(--db-text);
  font-weight: 500;
}

.chip-x {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: var(--db-radius);
  background: none;
  color: var(--db-muted);
  cursor: pointer;
}

.chip-x:hover {
  background: var(--db-hover);
  color: var(--db-text);
}

.chip-x svg {
  width: 12px;
  height: 12px;
}

.notice {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 20px 12px;
  padding: 10px 12px 10px 14px;
  border: 1px solid var(--db-line-2);
  border-radius: var(--db-radius);
  font-size: 0.8125rem;
  animation: db-fade 0.4s var(--db-ease);
}

@keyframes db-fade {
  from {
    opacity: 0;
  }
}

.notice p {
  flex: 1;
  color: var(--db-soft);
}

.notice strong {
  color: var(--db-text);
  font-weight: 600;
}

.notice-error {
  border-color: var(--db-bad-line);
  background: var(--db-bad-wash);
}

.notice-error > svg {
  color: var(--db-bad);
}

@keyframes db-rise {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}

/* ---------- Orders table ---------- */
.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  padding: 8px 12px;
  border-bottom: 1px solid var(--db-line);
  color: var(--db-muted);
  font-size: 0.75rem;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
}

.data-table th:first-child,
.data-table td:first-child {
  padding-left: 20px;
}

.data-table th:last-child,
.data-table td:last-child {
  padding-right: 20px;
}

.data-table .num {
  text-align: right;
}

.col-check {
  width: 48px;
}

.sort {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: -4px -6px;
  padding: 4px 6px;
  border: 0;
  border-radius: var(--db-radius);
  background: none;
  color: inherit;
  font-weight: inherit;
  cursor: pointer;
  transition: color 0.2s var(--db-ease), background-color 0.2s var(--db-ease);
}

.sort:hover {
  background: var(--db-hover);
  color: var(--db-text);
}

.num .sort {
  flex-direction: row-reverse;
}

/* sort indicator: a small chevron, faint until the column is sorted */
.sort-ind {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  opacity: 0;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.25s var(--db-ease), opacity 0.2s var(--db-ease);
}

.sort:hover .sort-ind {
  opacity: 0.4;
}

[aria-sort="ascending"] .sort,
[aria-sort="descending"] .sort {
  color: var(--db-text);
}

[aria-sort="descending"] .sort-ind {
  opacity: 1;
}

[aria-sort="ascending"] .sort-ind {
  opacity: 1;
  transform: translateY(2px) rotate(-135deg);
}

.data-table td {
  padding: var(--db-row-y) 12px;
  border-bottom: 1px solid var(--db-line);
  vertical-align: middle;
  white-space: nowrap;
}

/* Orders text may wrap, so the columns share the width and the table never scrolls sideways */
.orders-table td {
  white-space: normal;
}

.orders-table tbody tr {
  cursor: pointer;
  transition: background-color 0.15s var(--db-ease);
  scroll-margin-top: calc(var(--ex-bar) + 72px);
  scroll-margin-bottom: 72px;
}

.orders-table tbody tr:hover,
.cust-table tbody tr:hover {
  background: var(--db-hover);
}

.cust-table tbody tr {
  cursor: pointer;
  transition: background-color 0.15s var(--db-ease);
}

.orders-table tbody tr.is-selected {
  background: var(--db-accent-wash);
}

.orders-table tbody tr:focus {
  outline: none;
}

.orders-table tbody tr:focus-visible,
.orders-table tbody tr.is-cursor {
  outline: 1px solid var(--db-accent);
  outline-offset: -1px;
}

.orders-table tbody tr.is-flash {
  animation: db-flash 1.2s var(--db-ease);
}

@keyframes db-flash {
  from {
    background-color: var(--db-flash);
  }
}

.check {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--db-accent);
  cursor: pointer;
  vertical-align: middle;
}

.cell-main {
  display: block;
  color: var(--db-text);
  font-weight: 500;
}

.cell-sub {
  display: block;
  margin-top: 1px;
  color: var(--db-muted);
  font-size: 0.8125rem;
}

.order-id {
  padding: 0;
  border: 0;
  background: none;
  font-weight: 500;
  cursor: pointer;
}

.order-id:hover {
  color: var(--db-accent-2);
}

.col-items {
  max-width: 260px;
}

.items-cell {
  display: block;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.more {
  color: var(--db-muted);
}

.compact {
  --db-row-y: 6px;
}

.compact .cell-sub {
  display: none;
}

/* ---------- Status badges ---------- */
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--db-text);
  font-size: 0.8125rem;
  white-space: nowrap;
}

.db .status svg,
.db .late svg {
  width: 12px;
  height: 12px;
  stroke-width: 1.6;
}

.st-new svg {
  color: var(--db-accent);
}

.st-packing svg {
  color: var(--db-soft);
}

.st-ready svg {
  color: var(--db-accent);
}

.st-shipped svg {
  color: var(--db-ok);
}

.st-hold svg {
  color: var(--db-warn);
}

.status .fill {
  fill: currentColor;
}

.late {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  padding: 1px 6px;
  border: 1px solid var(--db-bad-line);
  border-radius: var(--db-radius);
  background: var(--db-bad-wash);
  color: var(--db-bad-text);
  font-size: 0.75rem;
  font-weight: 500;
}

.late svg {
  color: var(--db-bad);
}

.ship-cell {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
}

.ship-cell .late {
  margin-left: 0;
}

/* ---------- Loading, empty, footer ---------- */
.sk {
  display: block;
  height: 10px;
  border-radius: var(--db-radius);
  background: var(--db-line);
  animation: db-pulse 1s var(--db-ease) infinite alternate;
}

.sk + .sk {
  margin-top: 7px;
  height: 8px;
  opacity: 0.6;
}

.sk-row td {
  cursor: default;
}

@keyframes db-pulse {
  from {
    opacity: 0.45;
  }
}

.empty {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 56px 20px 60px;
  text-align: center;
  animation: db-rise 0.4s var(--db-ease-out);
}

.empty svg {
  width: 32px;
  height: 32px;
  margin-bottom: 6px;
  color: var(--db-subtle);
  stroke-width: 1.2;
}

.empty-title {
  font-weight: 600;
}

.empty-text {
  max-width: 340px;
  margin-bottom: 10px !important;
  color: var(--db-muted);
  font-size: 0.8125rem;
}

.table-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--db-s3);
  padding: 12px 20px;
}

.foot-count {
  color: var(--db-muted);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

/* ---------- Order details panel ---------- */
.panel-scrim {
  position: fixed;
  inset: var(--ex-bar) 0 0;
  z-index: 70; /* above the custom scrollbar (example.css) */
  background: var(--db-scrim);
  opacity: 0;
  transition: opacity 0.3s var(--db-ease);
}

.panel {
  position: fixed;
  inset: var(--ex-bar) 0 0 auto;
  z-index: 71;
  display: flex;
  flex-direction: column;
  width: min(440px, 100%);
  border-left: 1px solid var(--db-line-2);
  background: var(--db-panel);
  transform: translateX(100%);
  transition: transform 0.4s var(--db-ease-out);
}

.is-panel-open .panel {
  transform: none;
}

.is-panel-open .panel-scrim {
  opacity: 1;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--db-s3);
  padding: 18px 20px 16px;
  border-bottom: 1px solid var(--db-line);
}

.panel-eyebrow {
  color: var(--db-muted);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

.panel-title {
  margin-top: 2px !important;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.panel-title:focus {
  outline: none;
}

.panel-head .icon-btn {
  margin: -4px -8px 0 0;
}

.panel-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px 20px 24px;
}

.panel-section {
  padding: 16px 0;
  border-bottom: 1px solid var(--db-line);
}

.panel-section:last-child {
  border-bottom: 0;
}

.panel-section h3 {
  margin: 0 0 10px;
  color: var(--db-muted);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.panel-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.panel-status .late {
  margin-left: 0;
}

.panel-notice {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--db-warn-line);
  border-radius: var(--db-radius);
  background: var(--db-warn-wash);
  color: var(--db-soft);
  font-size: 0.8125rem;
}

.panel-notice svg {
  margin-top: 1px;
  color: var(--db-warn);
}

.panel-notice strong {
  display: block;
  color: var(--db-text);
  font-weight: 600;
}

.line-items {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.line-items li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 12px;
}

.line-items .li-meta {
  color: var(--db-muted);
  font-size: 0.8125rem;
}

.line-items .li-price {
  grid-row: span 2;
  font-variant-numeric: tabular-nums;
}

.totals {
  display: grid;
  gap: 4px;
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px dashed var(--db-line-2);
  font-variant-numeric: tabular-nums;
}

.totals div {
  display: flex;
  justify-content: space-between;
  color: var(--db-muted);
}

.totals dt,
.totals dd {
  margin: 0;
}

.totals .grand {
  color: var(--db-text);
  font-weight: 600;
}

.addr {
  font-style: normal;
  color: var(--db-soft);
  line-height: 1.6;
}

.addr strong {
  color: var(--db-text);
  font-weight: 500;
}

.kv {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 16px;
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.kv dt {
  color: var(--db-muted);
}

.kv dd {
  margin: 0;
}

.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  position: relative;
  padding: 0 0 14px 20px;
}

.timeline li:last-child {
  padding-bottom: 0;
}

/* the line between steps and a small square for each */
.timeline li::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 3px;
  width: 7px;
  height: 7px;
  border: 1px solid var(--db-line-2);
  background: var(--db-panel);
}

.timeline li::after {
  content: "";
  position: absolute;
  top: 15px;
  bottom: 0;
  left: 6px;
  width: 1px;
  background: var(--db-line);
}

.timeline li:last-child::after {
  display: none;
}

.timeline li.is-latest::before {
  border-color: var(--db-accent);
  background: var(--db-accent);
}

.timeline li.is-new {
  animation: db-rise 0.4s var(--db-ease-out);
}

.tl-label {
  display: block;
  color: var(--db-text);
}

.tl-meta {
  color: var(--db-muted);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--db-s2);
  padding: 14px 20px;
  border-top: 1px solid var(--db-line);
}

/* ---------- Toasts ---------- */
.toasts {
  position: fixed;
  bottom: 20px;
  left: 50%;
  z-index: 60;
  display: grid;
  justify-items: center;
  gap: 8px;
  width: max-content;
  max-width: calc(100% - 32px);
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 10px 10px 14px;
  border: 1px solid var(--db-toast);
  border-radius: var(--db-radius);
  background: var(--db-toast);
  color: var(--db-toast-text);
  font-size: 0.8125rem;
  pointer-events: auto;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s var(--db-ease), transform 0.4s var(--db-ease-out);
}

.toast.is-on {
  opacity: 1;
  transform: none;
}

.toast > svg {
  width: 14px;
  height: 14px;
  color: var(--db-toast-link);
}

.toast-undo {
  padding: 4px 8px;
  border: 0;
  border-radius: var(--db-radius);
  background: none;
  color: var(--db-toast-link);
  font-weight: 600;
  cursor: pointer;
}

.toast-undo:hover {
  background: var(--db-toast-hover);
}

/* ---------- Shortcuts dialog ---------- */
.dialog {
  width: min(400px, calc(100% - 32px));
  padding: 0;
  border: 1px solid var(--db-line-2);
  border-radius: var(--db-radius);
  background: var(--db-panel);
  color: var(--db-text);
}

.dialog[open] {
  animation: db-pop 0.3s var(--db-ease-out);
}

.dialog::backdrop {
  background: var(--db-scrim);
}

@keyframes db-pop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
}

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 12px 12px 20px;
  border-bottom: 1px solid var(--db-line);
}

.dialog-head h2 {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
}

.keys {
  display: grid;
  margin: 0;
  padding: 8px 20px;
}

.keys div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--db-line);
}

.keys div:last-child {
  border-bottom: 0;
}

.keys dt {
  display: flex;
  gap: 4px;
  order: 2;
}

.keys dd {
  margin: 0;
  color: var(--db-soft);
}

.dialog-note {
  margin: 0;
  padding: 0 20px 18px;
  color: var(--db-muted);
  font-size: 0.8125rem;
}

/* ---------- Other views: shared bits ---------- */
.view {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--db-s5);
  min-width: 0;
}

.card-foot {
  margin: 0;
  padding: 12px 20px 14px;
  color: var(--db-muted);
  font-size: 0.8125rem;
}

.toolbar-plain {
  border-top: 1px solid var(--db-line);
  border-bottom: 1px solid var(--db-line);
}

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: color 0.2s var(--db-ease);
}

.link-btn:hover {
  color: var(--db-accent-2);
}

.team-none {
  color: var(--db-muted);
}

.row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.row-actions [data-restock] {
  justify-content: center;
  min-width: 96px;
}

.row-empty td {
  padding: 28px 20px !important;
  color: var(--db-muted);
  text-align: center;
  white-space: normal !important;
}

/* stock status: icon and words, the color only repeats them */
.stock-short svg {
  color: var(--db-bad);
}

.stock-low svg {
  color: var(--db-warn);
}

.stock-ok svg {
  color: var(--db-ok);
}

.kpi-plain {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "label"
    "value"
    "change";
}

/* ---------- Reports ---------- */
.report-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--db-s3);
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--db-s3);
}

.rank {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 4px 20px 20px;
  list-style: none;
}

.rank-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.rank-head .num {
  color: var(--db-muted);
  font-size: 0.8125rem;
  white-space: nowrap;
}

.rank-track {
  display: block;
  height: 6px;
  background: var(--db-panel-2);
  border-radius: var(--db-radius);
  overflow: hidden;
}

.rank-track span {
  display: block;
  height: 100%;
  background: var(--db-accent);
  transform-origin: 0 50%;
  transition: transform 0.6s var(--db-ease-out);
}

/* ---------- Settings ---------- */
.settings {
  margin: 0;
}

/* Full width like the other views' cards; the description column keeps a readable width */
.set-row {
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  align-items: start;
  gap: 8px 24px;
  margin: 0;
  padding: 16px 20px;
  border: 0;
  border-top: 1px solid var(--db-line);
  min-width: 0;
}

fieldset.set-row > legend {
  float: left;
  padding: 0;
}

.set-label {
  display: grid;
  gap: 2px;
  color: var(--db-text);
  font-weight: 500;
}

.set-label span {
  color: var(--db-muted);
  font-size: 0.8125rem;
  font-weight: 400;
}

.select {
  justify-self: start;
  min-width: 200px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--db-line-2);
  border-radius: var(--db-radius);
  background: var(--db-bg);
  color: var(--db-text);
  cursor: pointer;
}

.select:hover {
  border-color: var(--db-line-3);
}

.radio-group {
  display: inline-flex;
  justify-self: start;
  border: 1px solid var(--db-line-2);
  border-radius: var(--db-radius);
}

.radio {
  position: relative;
  cursor: pointer;
}

.radio + .radio {
  border-left: 1px solid var(--db-line-2);
}

.radio input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.radio span {
  display: block;
  padding: 6px 12px;
  color: var(--db-muted);
  font-size: 0.8125rem;
  font-weight: 500;
  transition: color 0.2s var(--db-ease), background-color 0.2s var(--db-ease);
}

.radio:hover span {
  color: var(--db-text);
}

.radio input:checked + span {
  background: var(--db-panel-2);
  color: var(--db-text);
}

.radio input:focus-visible + span {
  outline: 1px solid var(--db-accent-2);
  outline-offset: -2px;
}

.check-group {
  display: grid;
  gap: 8px;
}

.check-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-self: start;
  color: var(--db-soft);
  cursor: pointer;
}

.check-row:hover {
  color: var(--db-text);
}

/* ---------- Medium screens ---------- */
@media (max-width: 1100px) {
  .attn-list,
  .kpi-grid,
  .report-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* The sidebar shrinks to icons before the orders table runs out of room */
@media (max-width: 1180px) {
  .app {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .side {
    padding: 16px 10px;
  }

  .brand {
    padding: 2px;
    justify-content: center;
  }

  .brand-name,
  .team {
    display: none;
  }

  .db .nav-item {
    justify-content: center;
    padding: 9px 0;
    font-size: 0;
  }

  .nav-count {
    display: none;
  }

  .main {
    padding: 24px 24px 64px;
  }
}

/* ---------- Phones: the sidebar becomes a top bar, the table becomes cards ---------- */
@media (max-width: 760px) {
  .app {
    display: block;
  }

  .side {
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    height: auto;
    padding: 10px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--db-line);
  }

  .brand {
    padding: 0;
  }

  .brand-name {
    display: grid;
  }

  .brand .brand-mark {
    width: 24px;
    height: 24px;
  }

  .nav {
    display: flex;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .db .nav-item {
    padding: 7px 10px;
    font-size: 0.8125rem;
  }

  .nav-item svg {
    display: none;
  }

  .main {
    gap: 20px;
    padding: 20px 16px 56px;
  }

  .page-head {
    flex-wrap: nowrap;
    align-items: flex-start;
  }

  .page-head h1 {
    font-size: 1.375rem;
  }

  .head-actions .btn {
    padding: 7px 9px;
  }

  .head-actions .btn-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .chart-card .card-head {
    flex-wrap: wrap;
  }

  .legend {
    order: 3;
    width: 100%;
    margin: 0;
  }

  .bulk-actions .btn-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .is-panel-open .toasts {
    bottom: 76px;
  }

  .attn-list {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .attn {
    padding: 12px 12px 12px 14px;
  }

  .kpi-grid {
    gap: 8px;
  }

  .kpi {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "label"
      "value"
      "spark"
      "change";
    padding: 14px;
  }

  .db .spark {
    width: 100%;
    height: 24px;
  }

  .kpi-value {
    font-size: 1.5rem;
  }

  .card-head {
    flex-wrap: wrap;
    padding: 14px 16px 10px;
  }

  .chart-wrap {
    padding: 0 12px 8px;
  }

  .db .chart {
    height: 180px;
  }

  .chart-table {
    padding: 0 16px 14px;
  }

  .toolbar {
    gap: 8px;
    padding: 10px 16px;
  }

  .search {
    max-width: none;
  }

  .search kbd {
    display: none;
  }

  .density {
    display: none;
  }

  .sort-mobile {
    position: relative;
    display: flex;
    align-items: center;
    height: 34px;
    border: 1px solid var(--db-line-2);
    border-radius: var(--db-radius);
    color: var(--db-muted);
    font-size: 0.8125rem;
  }

  .sort-mobile span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .sort-mobile select {
    max-width: 128px;
    height: 100%;
    padding: 0 8px 0 6px;
    border: 0;
    background: none;
    color: var(--db-text);
    outline: none;
  }

  .sort-mobile:focus-within {
    border-color: var(--db-accent);
  }

  .bulkbar {
    gap: 8px;
    padding: 0 12px;
  }

  .bulk-count {
    font-size: 0.8125rem;
  }

  .bulk-actions {
    gap: 6px;
  }

  .bulk-actions .btn {
    padding: 5px 8px;
  }

  .page-date {
    display: grid;
    gap: 0;
  }

  .page-date .dot {
    display: none;
  }

  .bulk-actions .btn:not(#bulk-clear) svg {
    display: none;
  }

  .filters {
    flex-wrap: wrap;
    padding: 12px 16px;
  }

  .chips {
    flex: 1 1 100%;
    margin: 0 -16px;
    padding: 0 16px;
  }

  .active-filter {
    margin-left: 0;
  }

  .notice {
    flex-wrap: wrap;
    margin: 0 16px 12px;
  }

  .notice p {
    flex: 1 1 200px;
  }

  /* each order as a card */
  .table-wrap {
    overflow: visible;
  }

  /* inventory and customers as cards too */
  .inv-table thead,
  .cust-table thead {
    display: none;
  }

  .inv-table,
  .inv-table tbody,
  .cust-table,
  .cust-table tbody {
    display: block;
  }

  .inv-table tbody tr,
  .cust-table tbody tr {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--db-line);
  }

  .inv-table td,
  .cust-table td,
  .inv-table td:first-child,
  .inv-table td:last-child,
  .cust-table td:first-child,
  .cust-table td:last-child {
    display: block;
    min-width: 0;
    padding: 0;
    border: 0;
    white-space: normal;
  }

  .inv-table .c-item,
  .cust-table .c-name {
    grid-column: 1 / 3;
  }

  .inv-table .c-state,
  .cust-table .c-spent {
    grid-row: 1;
    grid-column: 3;
    justify-self: end;
    text-align: right;
  }

  .inv-table .c-actions {
    grid-column: 1 / -1;
  }

  .row-actions {
    justify-content: flex-start;
  }

  .cust-table .c-loc {
    grid-column: 1 / -1;
    color: var(--db-muted);
    font-size: 0.8125rem;
  }

  .inv-table .num,
  .cust-table .c-count,
  .cust-table .c-last {
    text-align: left;
    font-size: 0.8125rem;
  }

  .inv-table td[data-label]::before,
  .cust-table td.c-count::before,
  .cust-table td.c-last::before {
    content: attr(data-label);
    display: block;
    color: var(--db-muted);
    font-size: 0.75rem;
  }

  .cust-table .c-spent {
    font-weight: 600;
  }

  .cust-table td.c-spent::before {
    content: none;
  }

  .row-empty {
    display: block !important;
  }

  .row-empty td {
    display: block;
  }

  .card-foot {
    padding: 12px 16px 14px;
  }

  .set-row {
    grid-template-columns: minmax(0, 1fr);
    padding: 14px 16px;
  }

  fieldset.set-row > legend {
    width: 100%;
    margin-bottom: 8px;
  }

  .select {
    min-width: 0;
    width: 100%;
  }

  .settings .card-head {
    flex-wrap: wrap;
  }

  .rank {
    padding: 4px 16px 16px;
  }

  .report-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .orders-table thead {
    display: none;
  }

  .orders-table,
  .orders-table tbody {
    display: block;
  }

  .orders-table tbody tr {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    grid-template-areas:
      "check order total"
      ". customer status"
      ". items ship";
    align-items: center;
    gap: 6px 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--db-line);
  }

  .orders-table td,
  .orders-table td:first-child,
  .orders-table td:last-child {
    display: block;
    padding: 0;
    border: 0;
    min-width: 0;
  }

  .orders-table td.c-check {
    grid-area: check;
  }

  .orders-table td.c-order {
    grid-area: order;
  }

  .orders-table td.c-customer {
    grid-area: customer;
  }

  .orders-table td.c-items {
    grid-area: items;
  }

  .orders-table td.c-total {
    grid-area: total;
    justify-self: end;
    font-weight: 600;
  }

  .orders-table td.c-status {
    grid-area: status;
    justify-self: end;
  }

  .orders-table td.c-ship {
    grid-area: ship;
    justify-self: end;
    color: var(--db-muted);
    font-size: 0.8125rem;
  }

  .orders-table .c-order {
    display: flex;
    align-items: baseline;
    gap: 8px;
  }

  .orders-table .c-order .cell-sub {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .orders-table .c-customer .cell-sub {
    display: none;
  }

  .orders-table .c-customer .cell-main {
    font-weight: 400;
    color: var(--db-soft);
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .items-cell {
    max-width: none;
    color: var(--db-muted);
    font-size: 0.8125rem;
  }

  .orders-table .c-items .cell-sub {
    display: none;
  }

  .compact tbody tr {
    padding-top: 10px;
    padding-bottom: 10px;
    gap: 3px 10px;
  }

  .sk-row td:nth-child(n + 4) {
    display: none;
  }

  .table-foot {
    padding: 12px 16px;
  }

  .panel {
    width: 100%;
    border-left: 0;
  }

  .toasts {
    bottom: 16px;
  }
}
