@layer art{:root{--a-primary:#2563eb;--a-danger:#dc2626;--a-success:#16a34a;--a-bg:#fafafa;--a-fg:#1a1a1a;--a-surface:#fff;--a-border:#e5e5e5;--a-input:#d4d4d4;--a-muted:#737373;--a-radius:8px;--a-font:system-ui,sans-serif}@media(prefers-color-scheme:dark){:root:not([data-theme=light]){--a-bg:#111;--a-fg:#eee;--a-surface:#1a1a1a;--a-border:#333;--a-input:#444;--a-muted:#999;color-scheme:dark}}:root[data-theme=light]{color-scheme:light}:root[data-theme=dark]{--a-bg:#111;--a-fg:#eee;--a-surface:#1a1a1a;--a-border:#333;--a-input:#444;--a-muted:#999;color-scheme:dark}*{box-sizing:border-box}body{margin:0;font:16px/1.5 var(--a-font);color:var(--a-fg);background:var(--a-bg)}#app{padding:24px;max-width:960px;margin:0 auto}.a-row{display:flex;align-items:center}.a-column{display:flex;flex-direction:column}.a-grid{display:grid}.a-wrap{flex-wrap:wrap}.a-card{display:flex;flex-direction:column;padding:16px;border:1px solid var(--a-border);border-radius:calc(var(--a-radius) * 1.5);background:var(--a-surface)}button{font:inherit;padding:6px 14px;border-radius:var(--a-radius);border:1px solid var(--a-input);background:var(--a-surface);color:inherit;cursor:pointer}button.a-primary{background:var(--a-primary);border-color:var(--a-primary);color:#fff}button.a-danger{color:var(--a-danger);border-color:var(--a-danger)}button.a-small{padding:2px 8px;font-size:.875em}span.a-danger,h2.a-danger{color:var(--a-danger)}span.a-primary,h2.a-primary{color:var(--a-primary)}span.a-success,h2.a-success{color:var(--a-success)}input,textarea,select{font:inherit;color:inherit}input:not([type=checkbox]):not([type=radio]):not([type=file]),textarea,select{padding:6px 10px;border:1px solid var(--a-input);border-radius:var(--a-radius);background:inherit}.a-title{font-size:1.5em;font-weight:bold}.a-bold{font-weight:600}.a-muted{color:var(--a-muted)}.a-small{font-size:.875em}.a-large{font-size:1.25em}h1,h2,h3,h4,h5,h6,p{margin:0}a{color:var(--a-primary)}.a-field{display:flex;flex-direction:column;gap:4px}.a-check{display:flex;flex-direction:row;align-items:center;gap:8px}.a-radio{display:flex;flex-direction:column;gap:4px}.a-tabs{display:flex;gap:4px;border-bottom:1px solid var(--a-border)}.a-tabs button{border:0;border-radius:var(--a-radius) var(--a-radius) 0 0;background:none}.a-tabs .a-active{box-shadow:inset 0 -2px var(--a-primary);font-weight:600}.a-modal{border:0;border-radius:calc(var(--a-radius) * 1.5);padding:20px;min-width:min(420px,90vw);background:var(--a-surface);color:inherit}.a-modal::backdrop{background:#0006}.a-modal:not([open]){display:none}.a-badge{display:inline-block;padding:0 8px;border-radius:999px;font-size:.75em;background:var(--a-border)}.a-badge.a-primary{background:color-mix(in srgb,var(--a-primary) 15%,transparent);color:var(--a-primary)}.a-badge.a-success{background:color-mix(in srgb,var(--a-success) 15%,transparent);color:var(--a-success)}.a-badge.a-danger{background:color-mix(in srgb,var(--a-danger) 15%,transparent);color:var(--a-danger)}.a-spinner{display:inline-block;width:1em;height:1em;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:a-spin .7s linear infinite}@keyframes a-spin{to{transform:rotate(360deg)}}hr{border:0;border-top:1px solid var(--a-border);margin:8px 0;width:100%}.a-toasts{position:fixed;bottom:16px;left:50%;transform:translateX(-50%);display:flex;flex-direction:column;gap:8px;z-index:100}.a-toast{padding:10px 16px;border-radius:var(--a-radius);background:var(--a-fg);color:var(--a-bg);box-shadow:0 4px 12px #0003}.a-toast.a-success{background:var(--a-success);color:#fff}.a-toast.a-danger{background:var(--a-danger);color:#fff}.a-list{margin:0;padding-left:20px}.a-icon{display:inline-flex;vertical-align:middle;line-height:0}.a-scroll{overflow-x:auto}.a-table{border-collapse:collapse;width:100%}.a-table th,.a-table td{text-align:left;padding:8px;border-bottom:1px solid var(--a-border)}video,img{max-width:100%}}
/* src/styles.css */
/* Northwind Backoffice: theme tokens, layout and motion. */

:root {
  --a-primary: #2f6fe4;
  --a-danger: #d43c3c;
  --a-success: #15803d;
  --a-bg: #f5f6f8;
  --a-fg: #14171f;
  --a-surface: #ffffff;
  --a-border: #e4e7ec;
  --a-input: #cfd4dc;
  --a-muted: #5f6777;
  --a-radius: 8px;
  --a-font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --hover: #f1f3f7;
  --primary-soft: #e8f0fe;
  --shadow: 0 1px 2px rgb(16 24 40 / 0.05), 0 1px 3px rgb(16 24 40 / 0.06);
  --shadow-lg: 0 20px 48px rgb(16 24 40 / 0.22);
  --good: #0f7a4a;
  --good-soft: #e3f5ec;
  --bad: #c0362c;
  --bad-soft: #fdecea;

  /* Charts: series, grid, tooltip and one color per order status (same in badges and the doughnut). */
  --chart-1: #2a78d6;
  --chart-1-soft: rgb(42 120 214 / 0.1);
  --chart-grid: #e9ecf1;
  --tooltip-bg: #14171f;
  --tooltip-fg: #ffffff;
  --status-pending: #eda100;
  --status-paid: #2a78d6;
  --status-shipped: #eb6834;
  --status-delivered: #1baf7a;
  --status-cancelled: #4a3aa7;
  --status-ink: 38%;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --a-primary: #5b93f5;
    --a-danger: #f07070;
    --a-success: #3fb97a;
    --a-bg: #0f1218;
    --a-fg: #e8ebf1;
    --a-surface: #171a21;
    --a-border: #272c37;
    --a-input: #3a4150;
    --a-muted: #9aa3b2;
    --hover: #1e222b;
    --primary-soft: #1c2a47;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4);
    --shadow-lg: 0 20px 48px rgb(0 0 0 / 0.6);
    --good: #4ccb8f;
    --good-soft: #12301f;
    --bad: #f08a80;
    --bad-soft: #3a1a17;
    --chart-1: #3987e5;
    --chart-1-soft: rgb(57 135 229 / 0.14);
    --chart-grid: #262b35;
    --tooltip-bg: #e8ebf1;
    --tooltip-fg: #14171f;
    --status-pending: #c98500;
    --status-paid: #3987e5;
    --status-shipped: #d95926;
    --status-delivered: #199e70;
    --status-cancelled: #9085e9;
    --status-ink: 0%;
  }
}

:root[data-theme="dark"] {
  --a-primary: #5b93f5;
  --a-danger: #f07070;
  --a-success: #3fb97a;
  --a-bg: #0f1218;
  --a-fg: #e8ebf1;
  --a-surface: #171a21;
  --a-border: #272c37;
  --a-input: #3a4150;
  --a-muted: #9aa3b2;
  --hover: #1e222b;
  --primary-soft: #1c2a47;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.4);
  --shadow-lg: 0 20px 48px rgb(0 0 0 / 0.6);
  --good: #4ccb8f;
  --good-soft: #12301f;
  --bad: #f08a80;
  --bad-soft: #3a1a17;
  --chart-1: #3987e5;
  --chart-1-soft: rgb(57 135 229 / 0.14);
  --chart-grid: #262b35;
  --tooltip-bg: #e8ebf1;
  --tooltip-fg: #14171f;
  --status-pending: #c98500;
  --status-paid: #3987e5;
  --status-shipped: #d95926;
  --status-delivered: #199e70;
  --status-cancelled: #9085e9;
  --status-ink: 0%;
}

/* ---------- Base ---------- */

body {
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

#app {
  padding: 0;
  max-width: none;
}

h1,
h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

button {
  font-weight: 500;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}

button:hover:not(:disabled) {
  background: var(--hover);
}

button:active:not(:disabled) {
  transform: translateY(1px);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

button.a-primary:hover:not(:disabled) {
  background: color-mix(in srgb, var(--a-primary) 88%, #000);
}

button.a-danger:hover:not(:disabled) {
  background: var(--bad-soft);
}

:is(button, a, input, select, textarea):focus-visible {
  outline: 2px solid var(--a-primary);
  outline-offset: 2px;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
textarea,
select {
  background: var(--a-surface);
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus {
  border-color: var(--a-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--a-primary) 18%, transparent);
  outline: none;
}

.a-field {
  font-size: 0.875rem;
  font-weight: 500;
}

.a-field > :is(input, select, textarea) {
  font-size: 0.9375rem;
  font-weight: 400;
}

input.invalid:not([type="checkbox"]):not([type="radio"]):not([type="file"]) {
  border-color: var(--a-danger);
}

.a-card {
  box-shadow: var(--shadow);
  border-radius: 12px;
}

.a-badge {
  padding: 2px 9px;
  font-weight: 500;
  white-space: nowrap;
}

.a-toast {
  animation: rise 0.25s ease-out both;
}

/* ---------- Shell ---------- */

.shell {
  grid-template-columns: 240px minmax(0, 1fr);
  grid-template-rows: 64px 1fr;
  grid-template-areas: "brand topbar" "nav content";
  min-height: 100vh;
}

.brand {
  grid-area: brand;
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 0 20px;
  background: var(--a-surface);
  border-right: 1px solid var(--a-border);
}

.brand-mark {
  width: 30px;
  height: 30px;
  justify-content: center;
  border-radius: 8px;
  color: #fff;
  background: var(--a-primary);
}

.topbar {
  grid-area: topbar;
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 0 24px;
  background: color-mix(in srgb, var(--a-surface) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--a-border);
}

.nav {
  grid-area: nav;
  position: sticky;
  top: 64px;
  align-self: start;
  height: calc(100vh - 64px);
  padding: 12px;
  background: var(--a-surface);
  border-right: 1px solid var(--a-border);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--a-muted);
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}

.nav-link:hover {
  background: var(--hover);
  color: var(--a-fg);
}

.nav-link[aria-current="page"] {
  background: var(--primary-soft);
  color: var(--a-primary);
}

.content {
  grid-area: content;
  gap: 20px;
  padding: 28px 32px 48px;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  min-width: 0;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-color: transparent;
  background: transparent;
  color: var(--a-muted);
}

.icon-btn:hover:not(:disabled) {
  color: var(--a-fg);
}

.icon-btn.danger:hover:not(:disabled) {
  color: var(--a-danger);
  background: var(--bad-soft);
}

.menu-btn {
  display: none;
}

.avatar {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--a-primary);
  font-size: 0.75rem;
  font-weight: 600;
}

.user {
  padding: 0 8px;
}

.user-name {
  line-height: 1.25;
}

.page-head {
  align-items: flex-end;
}

/* ---------- Dashboard ---------- */

.segmented {
  flex-direction: row;
  gap: 2px;
  padding: 3px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--a-border) 70%, transparent);
}

/* The group keeps its accessible name (aria-label); the visible caption is redundant here. */
.a-field:has(> .segmented) > span {
  display: none;
}

.segmented label {
  position: relative;
  gap: 0;
  cursor: pointer;
}

.segmented input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.segmented span {
  padding: 5px 14px;
  border-radius: 8px;
  color: var(--a-muted);
  font-size: 0.875rem;
  font-weight: 500;
  transition: background-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.segmented input:checked + span {
  background: var(--a-surface);
  color: var(--a-fg);
  box-shadow: var(--shadow);
}

.segmented input:focus-visible + span {
  outline: 2px solid var(--a-primary);
  outline-offset: 1px;
}

.kpi {
  animation: rise 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: calc(var(--i, 0) * 70ms);
  transition: box-shadow 0.2s, transform 0.2s;
}

.kpi:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgb(16 24 40 / 0.1);
}

.kpi-value {
  font-size: 1.75rem;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.kpi-foot {
  flex-wrap: wrap;
  row-gap: 2px;
  min-height: 24px;
}

.delta {
  padding: 1px 7px 1px 5px;
  border-radius: 999px;
}

.delta.up {
  color: var(--good);
  background: var(--good-soft);
}

.delta.down {
  color: var(--bad);
  background: var(--bad-soft);
}

.chart-card {
  min-width: 0;
  animation: rise 0.5s 0.2s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.chart-box {
  position: relative;
  width: 100%;
  height: 100%;
  min-width: 0;
}

.chart-tall {
  height: 300px;
}

.chart-mid {
  height: 240px;
}

.donut {
  flex-wrap: wrap;
  justify-content: center;
  min-height: 240px;
}

.chart-donut {
  position: relative;
  flex: none;
  width: 200px;
  height: 200px;
}

.donut-total {
  position: absolute;
  inset: 0;
  justify-content: center;
  line-height: 1.2;
  pointer-events: none;
}

.legend {
  flex: 1 1 180px;
  max-width: 280px;
  font-variant-numeric: tabular-nums;
}

.dot {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--c);
}

.s-pending {
  --c: var(--status-pending);
}

.s-paid {
  --c: var(--status-paid);
}

.s-shipped {
  --c: var(--status-shipped);
}

.s-delivered {
  --c: var(--status-delivered);
}

.s-cancelled {
  --c: var(--status-cancelled);
}

.empty,
.notice {
  padding: 48px 24px;
  text-align: center;
  animation: rise 0.4s ease-out both;
}

.notice {
  align-items: center;
}

.empty > span {
  max-width: 460px;
}

.empty-icon {
  width: 56px;
  height: 56px;
  justify-content: center;
  border-radius: 16px;
  color: var(--a-primary);
  background: var(--primary-soft);
}

/* ---------- Tables ---------- */

.table-card {
  padding: 0;
  overflow: hidden;
  animation: rise 0.4s ease-out both;
}

.toolbar {
  padding: 14px 16px;
  border-bottom: 1px solid var(--a-border);
}

.search {
  flex: 1 1 240px;
  max-width: 360px;
  padding: 0 10px;
  border: 1px solid var(--a-input);
  border-radius: var(--a-radius);
  background: var(--a-surface);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.search:focus-within {
  border-color: var(--a-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--a-primary) 18%, transparent);
}

.search input:not([type="checkbox"]):not([type="radio"]):not([type="file"]) {
  flex: 1;
  min-width: 0;
  padding: 7px 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  outline: none;
}

.a-field:has(> .filter) {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  color: var(--a-muted);
}

.filter {
  color: var(--a-fg);
}

.data th {
  padding: 10px 16px;
  color: var(--a-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  background: color-mix(in srgb, var(--a-bg) 60%, var(--a-surface));
}

.data td {
  padding: 11px 16px;
  vertical-align: middle;
}

.data tr {
  transition: background-color 0.12s;
}

.data tr:hover td {
  background: var(--hover);
}

.data tr:last-child td {
  border-bottom: 0;
}

.data .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.data .actions {
  width: 1%;
  white-space: nowrap;
  text-align: right;
}

.sort {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
  margin: 0 -4px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}

.sort.active {
  color: var(--a-fg);
}

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--a-primary);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.link-btn:hover:not(:disabled) {
  background: none;
  text-decoration: underline;
}

/* A status: tinted with its own color, text kept readable in both themes. */
.status,
select.status-select {
  border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
  background: color-mix(in srgb, var(--c) 14%, var(--a-surface));
  color: color-mix(in srgb, var(--c), var(--a-fg) var(--status-ink));
  font-weight: 600;
}

select.status-select {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.8125rem;
  cursor: pointer;
  align-self: flex-start;
}

/* The inline select's caption is for screen readers only. */
.a-field:has(> .status-select) > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.low {
  color: var(--bad);
  background: var(--bad-soft);
}

.pager {
  padding: 12px 16px;
  border-top: 1px solid var(--a-border);
}

.empty-rows {
  padding: 56px 16px;
  text-align: center;
}

.table-skeleton {
  padding: 18px 16px;
}

/* ---------- Skeletons ---------- */

.skeleton {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--a-border) 25%, color-mix(in srgb, var(--a-border) 45%, var(--a-surface)) 50%, var(--a-border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.3s linear infinite;
}

.skeleton.tall {
  height: 26px;
}

.skeleton.block {
  height: 280px;
  border-radius: 10px;
}

.skeleton.row-line {
  height: 18px;
}

.w-40 {
  width: 40%;
}

.w-60 {
  width: 60%;
}

.w-80 {
  width: 80%;
}

.skeleton-card {
  animation: none;
}

/* ---------- Modals ---------- */

.a-modal {
  width: min(480px, calc(100vw - 32px));
  padding: 24px;
  border: 1px solid var(--a-border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
}

.a-modal.narrow {
  width: min(400px, calc(100vw - 32px));
}

.a-modal[open] {
  animation: pop 0.2s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.a-modal[open]::backdrop {
  background: rgb(10 13 20 / 0.5);
  backdrop-filter: blur(2px);
  animation: fade 0.2s ease-out both;
}

.facts {
  padding: 14px 16px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--a-bg) 70%, var(--a-surface));
}

.lines th,
.lines td {
  padding-left: 0;
  background: none !important;
}

.facts > * {
  min-width: 0;
  overflow-wrap: anywhere;
}

.sum {
  padding-top: 4px;
}

/* ---------- Login ---------- */

.plain {
  min-height: 100vh;
  padding: 24px 16px;
  background: radial-gradient(900px 480px at 50% -10%, var(--primary-soft), transparent 70%), var(--a-bg);
}

.login-card {
  width: min(400px, 100%);
  padding: 28px;
  box-shadow: 0 12px 32px rgb(16 24 40 / 0.1);
  animation: rise 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.login-card button.a-primary {
  padding: 9px 14px;
  margin-top: 4px;
}

.form-error {
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--bad-soft);
}

/* ---------- Motion ---------- */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
}

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

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Small screens: the sidebar becomes a top menu ---------- */

@media (max-width: 860px) {
  .shell {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: 56px auto 1fr;
    grid-template-areas: "brand topbar" "nav nav" "content content";
  }

  .brand {
    padding: 0 0 0 16px;
    border-right: 0;
    border-bottom: 1px solid var(--a-border);
  }

  .brand .a-badge {
    display: none;
  }

  .topbar {
    padding: 0 10px 0 8px;
    background: var(--a-surface);
    backdrop-filter: none;
  }

  .menu-btn {
    display: inline-flex;
  }

  .user-name {
    display: none;
  }

  .nav {
    display: none;
    position: sticky;
    top: 56px;
    z-index: 19;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--a-border);
    box-shadow: 0 12px 24px rgb(16 24 40 / 0.12);
  }

  .menu-open .nav {
    display: flex;
    animation: drop 0.2s ease-out both;
  }

  .content {
    padding: 20px 16px 40px;
  }

  .wide-only {
    display: none;
  }

  .data th,
  .data td {
    padding-left: 12px;
    padding-right: 12px;
  }

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

  .chart-tall {
    height: 240px;
  }
}

@keyframes drop {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
}

/* ---------- Phones: table rows become stacked cards ---------- */

@media (max-width: 640px) {
  .kpi {
    padding: 12px;
  }

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

  .data:not(.lines),
  .data:not(.lines) tr,
  .data:not(.lines) td {
    display: block;
  }

  .data:not(.lines) tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 4px 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--a-border);
  }

  .data:not(.lines) tr:last-child {
    border-bottom: 0;
  }

  .data:not(.lines) td,
  .data:not(.lines) th {
    padding: 0;
    border: 0;
    min-width: 0;
    background: none !important;
  }

  .data:not(.lines) td.wide-only,
  .data:not(.lines) th.wide-only {
    display: none;
  }

  /* The header row stays as a strip of sort buttons (or goes away when nothing sorts). */
  .data:not(.lines) tr:first-child {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    padding: 10px 16px;
    background: color-mix(in srgb, var(--a-bg) 60%, var(--a-surface));
  }

  .data:not(.orders):not(.lines) tr:first-child,
  .data:not(.lines) th:empty {
    display: none;
  }

  .orders td:nth-child(1) {
    grid-area: 1 / 1;
  }

  .orders td:nth-child(5) {
    grid-area: 1 / 2;
    font-weight: 600;
  }

  .orders td:nth-child(2) {
    grid-area: 2 / 1;
  }

  .orders td:nth-child(6) {
    grid-area: 2 / 2;
    justify-self: end;
  }

  .orders td:nth-child(4) {
    grid-area: 3 / 1;
    font-size: 0.875rem;
  }

  .orders td:nth-child(7) {
    display: none;
  }

  .customers td:nth-child(1) {
    grid-area: 1 / 1;
  }

  .customers td:nth-child(1) .a-column {
    min-width: 0;
  }

  .customers td:nth-child(1) .a-column span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .customers td:nth-child(5) {
    grid-area: 1 / 2;
    width: auto;
  }

  .customers td:nth-child(4) {
    grid-area: 2 / 1;
    padding-left: 46px;
    font-size: 0.8125rem;
  }

  .customers td:nth-child(4)::before {
    content: "Customer since ";
  }

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

  .products td:nth-child(1) {
    grid-area: 1 / 1;
  }

  .products td:nth-child(2) {
    grid-area: 2 / 1;
  }

  .products td:nth-child(3) {
    grid-area: 1 / 2;
  }

  .products td:nth-child(4) {
    grid-area: 2 / 2;
    color: var(--a-muted);
    font-size: 0.875rem;
  }

  .products td:nth-child(4)::after {
    content: " in stock";
  }

  .products td:nth-child(4):has(.a-danger)::after {
    content: "";
  }

  .products td:nth-child(5) {
    grid-area: 1 / 3 / 3 / 3;
    width: auto;
  }

  .pager {
    justify-content: center;
  }
}
