
:root {
  --font-system: -apple-system, BlinkMacSystemFont, "SF Pro Display",
                 "SF Pro Text", system-ui, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Menlo", "Cascadia Mono",
                 "Roboto Mono", monospace;
  --font-rounded: ui-rounded, "SF Pro Rounded", -apple-system,
                  BlinkMacSystemFont, system-ui, sans-serif;
  --blue-light: #007AFF;
  --blue-dark: #0A84FF;
  --green-light: #34C759;
  --green-dark: #30D158;
  --red-light: #FF3B30;
  --red-dark: #FF453A;
  --orange-light: #FF9500;
  --orange-dark: #FF9F0A;
  --purple-light: #AF52DE;
  --purple-dark: #BF5AF2;
  --ease-out: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.4, 1.4, 0.4, 1);
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 24px;
  --r-pill: 999px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 72px;
}

:root,
:root[data-theme=light] {
  --bg-base: #f2f2f7;
  --bg-deep: #e9e9ee;
  --bg-aurora-1: 0, 122, 255;
  --bg-aurora-2: 175, 82, 222;
  --bg-aurora-3: 64, 200, 224;
  --surface-1: rgba(255, 255, 255, 0.55);
  --surface-2: rgba(255, 255, 255, 0.72);
  --surface-3: rgba(255, 255, 255, 0.88);
  --edge-soft: rgba(255, 255, 255, 0.85);
  --edge-hard: rgba(0, 0, 0, 0.08);
  --specular: rgba(255, 255, 255, 0.55);
  --rim-glow: 0 0 0 0.5px rgba(255, 255, 255, 0.8) inset,
                0 0 0 0.5px rgba(0, 0, 0, 0.05);
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.04),
                 0 8px 24px rgba(0, 0, 0, 0.06);
  --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.06),
                 0 16px 48px rgba(0, 0, 0, 0.10);
  --ink-1: rgba(0, 0, 0, 0.88);
  --ink-2: rgba(0, 0, 0, 0.60);
  --ink-3: rgba(0, 0, 0, 0.42);
  --ink-mute: rgba(0, 0, 0, 0.28);
  --accent: var(--blue-light);
  --accent-hover: #0064d6;
  --on-accent: #ffffff;
  --ok: var(--green-light);
  --warn: var(--orange-light);
  --err: var(--red-light);
  --grain-opacity: 0.04;
}

@media (prefers-color-scheme: dark) {
  :root[data-theme=auto] {
    --bg-base: #000000;
    --bg-deep: #1c1c1e;
    --bg-aurora-1: 10, 132, 255;
    --bg-aurora-2: 191, 90, 242;
    --bg-aurora-3: 64, 200, 224;
    --surface-1: rgba(255, 255, 255, 0.06);
    --surface-2: rgba(255, 255, 255, 0.10);
    --surface-3: rgba(255, 255, 255, 0.14);
    --edge-soft: rgba(255, 255, 255, 0.16);
    --edge-hard: rgba(255, 255, 255, 0.05);
    --specular: rgba(255, 255, 255, 0.20);
    --rim-glow: 0 0 0 0.5px rgba(255, 255, 255, 0.16) inset,
                  0 0 0 0.5px rgba(0, 0, 0, 0.40);
    --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.40),
                   0 8px 24px rgba(0, 0, 0, 0.50);
    --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.50),
                   0 16px 48px rgba(0, 0, 0, 0.60);
    --ink-1: rgba(255, 255, 255, 0.92);
    --ink-2: rgba(255, 255, 255, 0.62);
    --ink-3: rgba(255, 255, 255, 0.44);
    --ink-mute: rgba(255, 255, 255, 0.28);
    --accent: var(--blue-dark);
    --accent-hover: #2c8fff;
    --on-accent: #ffffff;
    --ok: var(--green-dark);
    --warn: var(--orange-dark);
    --err: var(--red-dark);
    --grain-opacity: 0.05;
  }
}
:root[data-theme=dark] {
  --bg-base: #000000;
  --bg-deep: #1c1c1e;
  --bg-aurora-1: 10, 132, 255;
  --bg-aurora-2: 191, 90, 242;
  --bg-aurora-3: 64, 200, 224;
  --surface-1: rgba(255, 255, 255, 0.06);
  --surface-2: rgba(255, 255, 255, 0.10);
  --surface-3: rgba(255, 255, 255, 0.14);
  --edge-soft: rgba(255, 255, 255, 0.16);
  --edge-hard: rgba(255, 255, 255, 0.05);
  --specular: rgba(255, 255, 255, 0.20);
  --rim-glow: 0 0 0 0.5px rgba(255, 255, 255, 0.16) inset,
                0 0 0 0.5px rgba(0, 0, 0, 0.40);
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.40),
                 0 8px 24px rgba(0, 0, 0, 0.50);
  --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.50),
                 0 16px 48px rgba(0, 0, 0, 0.60);
  --ink-1: rgba(255, 255, 255, 0.92);
  --ink-2: rgba(255, 255, 255, 0.62);
  --ink-3: rgba(255, 255, 255, 0.44);
  --ink-mute: rgba(255, 255, 255, 0.28);
  --accent: var(--blue-dark);
  --accent-hover: #2c8fff;
  --on-accent: #ffffff;
  --ok: var(--green-dark);
  --warn: var(--orange-dark);
  --err: var(--red-dark);
  --grain-opacity: 0.05;
}

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg-base);
  color: var(--ink-1);
  font-family: var(--font-body);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  background: radial-gradient(at 100% 0%, var(--bg-deep) 0%, transparent 60%), radial-gradient(at 0% 100%, var(--bg-deep) 0%, transparent 55%), var(--bg-base);
  background-attachment: fixed;
}

.aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  contain: strict;
}

.aurora__blob {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(72px) saturate(140%);
  opacity: 0.55;
  mix-blend-mode: screen;
  will-change: transform;
}
@media (prefers-reduced-motion: no-preference) {
  .aurora__blob {
    animation: aurora-drift 38s var(--ease-in-out) infinite alternate;
  }
}

.aurora__blob--1 {
  width: 38vw;
  height: 38vw;
  top: -8vw;
  left: -6vw;
  background: radial-gradient(circle at 30% 30%, rgba(var(--bg-aurora-1), 0.85), rgba(var(--bg-aurora-1), 0) 65%);
  animation-duration: 32s;
}

.aurora__blob--2 {
  width: 44vw;
  height: 44vw;
  bottom: -14vw;
  right: -10vw;
  background: radial-gradient(circle at 60% 60%, rgba(var(--bg-aurora-2), 0.75), rgba(var(--bg-aurora-2), 0) 65%);
  animation-duration: 44s;
  animation-delay: -8s;
}

.aurora__blob--3 {
  width: 32vw;
  height: 32vw;
  top: 35%;
  left: 38%;
  background: radial-gradient(circle at 50% 50%, rgba(var(--bg-aurora-3), 0.55), rgba(var(--bg-aurora-3), 0) 60%);
  animation-duration: 50s;
  animation-delay: -16s;
}

@keyframes aurora-drift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(4vw, 6vh, 0) scale(1.1);
  }
  100% {
    transform: translate3d(-3vw, 3vh, 0) scale(0.95);
  }
}
.aurora__grain {
  position: absolute;
  inset: -50%;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.85 0'/></filter><rect width='100%' height='100%' filter='url(/%23n)'/></svg>");
  opacity: var(--grain-opacity);
  mix-blend-mode: overlay;
  pointer-events: none;
}

html {
  font-size: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-system);
  font-size: 15px;
  line-height: 1.47;
  letter-spacing: -0.01em;
  color: var(--ink-1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern", "ss01";
}

h1, h2, h3, h4 {
  font-family: var(--font-system);
  margin: 0 0 var(--space-4);
  color: var(--ink-1);
  letter-spacing: -0.022em;
  font-weight: 600;
  line-height: 1.1;
}

h1 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.005em;
  text-transform: uppercase;
}

h2 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  margin-top: var(--space-7);
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
}
h2 a {
  font-family: var(--font-system);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: -0.005em;
  text-transform: none;
  color: var(--accent);
  text-decoration: none;
  transition: color 150ms var(--ease-out);
}
h2 a:hover {
  color: var(--accent-hover);
}

h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.018em;
}

h4 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.014em;
}

p {
  margin: 0 0 var(--space-4);
  color: var(--ink-2);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 150ms var(--ease-out);
}
a:hover {
  color: var(--accent-hover);
}

strong, b {
  font-weight: 600;
  color: var(--ink-1);
}

em {
  font-style: italic;
  color: var(--ink-2);
}

code, pre, .mono {
  font-family: var(--font-mono);
  font-feature-settings: "calt", "ss01";
  letter-spacing: 0;
}

code {
  font-size: 12.5px;
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--surface-2);
  border: 0.5px solid var(--edge-hard);
  color: var(--ink-1);
}

pre {
  font-size: 12px;
  line-height: 1.5;
  margin: 0;
  padding: var(--space-3);
  background: var(--surface-2);
  border-radius: var(--r-sm);
  color: var(--ink-2);
  overflow-x: auto;
}

hr {
  border: 0;
  height: 0.5px;
  background: var(--edge-soft);
  margin: var(--space-5) 0;
}

.metric {
  display: block;
  font-family: var(--font-rounded);
  font-weight: 600;
  font-size: clamp(34px, 4vw, 44px);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink-1);
  font-variant-numeric: tabular-nums;
}

.metric__label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-3);
  margin-bottom: var(--space-3);
}

.eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.muted {
  color: var(--ink-3);
}

.tabular {
  font-variant-numeric: tabular-nums;
}

.glass-1 {
  position: relative;
  background: var(--surface-1);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  box-shadow: var(--rim-glow), var(--shadow-soft);
  border-radius: var(--r-lg);
  isolation: isolate;
  overflow: hidden;
  transition: transform 280ms var(--ease-spring), box-shadow 280ms var(--ease-out), background 200ms var(--ease-out);
}
.glass-1::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--specular) 0%, transparent 28%, transparent 72%, var(--specular) 100%);
  opacity: 0.35;
  pointer-events: none;
  mix-blend-mode: overlay;
  z-index: 0;
}
.glass-1 > * {
  position: relative;
  z-index: 1;
}

.glass-2 {
  position: relative;
  background: var(--surface-2);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  box-shadow: var(--rim-glow), var(--shadow-soft);
  border-radius: var(--r-lg);
  isolation: isolate;
  overflow: hidden;
  transition: transform 280ms var(--ease-spring), box-shadow 280ms var(--ease-out), background 200ms var(--ease-out);
}
.glass-2::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--specular) 0%, transparent 28%, transparent 72%, var(--specular) 100%);
  opacity: 0.35;
  pointer-events: none;
  mix-blend-mode: overlay;
  z-index: 0;
}
.glass-2 > * {
  position: relative;
  z-index: 1;
}

.glass-3 {
  position: relative;
  background: var(--surface-3);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  box-shadow: var(--rim-glow), var(--shadow-soft);
  border-radius: var(--r-lg);
  isolation: isolate;
  overflow: hidden;
  transition: transform 280ms var(--ease-spring), box-shadow 280ms var(--ease-out), background 200ms var(--ease-out);
}
.glass-3::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--specular) 0%, transparent 28%, transparent 72%, var(--specular) 100%);
  opacity: 0.35;
  pointer-events: none;
  mix-blend-mode: overlay;
  z-index: 0;
}
.glass-3 > * {
  position: relative;
  z-index: 1;
}
.glass-3 {
  box-shadow: var(--rim-glow), var(--shadow-lift);
}

.glass-hover {
  cursor: pointer;
}
.glass-hover:hover {
  transform: translateY(-2px);
  box-shadow: var(--rim-glow), var(--shadow-lift);
}

.glass-island {
  position: relative;
  background: var(--surface-3);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  box-shadow: var(--rim-glow), var(--shadow-soft);
  border-radius: var(--r-lg);
  isolation: isolate;
  overflow: hidden;
  transition: transform 280ms var(--ease-spring), box-shadow 280ms var(--ease-out), background 200ms var(--ease-out);
}
.glass-island::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--specular) 0%, transparent 28%, transparent 72%, var(--specular) 100%);
  opacity: 0.35;
  pointer-events: none;
  mix-blend-mode: overlay;
  z-index: 0;
}
.glass-island > * {
  position: relative;
  z-index: 1;
}
.glass-island {
  border-radius: var(--r-pill);
  box-shadow: var(--rim-glow), var(--shadow-soft);
}

.card-glass {
  position: relative;
  background: var(--surface-2);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  box-shadow: var(--rim-glow), var(--shadow-soft);
  border-radius: var(--r-lg);
  isolation: isolate;
  overflow: hidden;
  transition: transform 280ms var(--ease-spring), box-shadow 280ms var(--ease-out), background 200ms var(--ease-out);
}
.card-glass::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--specular) 0%, transparent 28%, transparent 72%, var(--specular) 100%);
  opacity: 0.35;
  pointer-events: none;
  mix-blend-mode: overlay;
  z-index: 0;
}
.card-glass > * {
  position: relative;
  z-index: 1;
}
.card-glass {
  padding: var(--space-5);
}

@media (prefers-reduced-motion: reduce) {
  .glass-1, .glass-2, .glass-3, .glass-hover, .glass-island, .card-glass {
    transition: none;
  }
}
.btn-primary,
input[type=submit],
button[type=submit] {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: 36px;
  padding: 0 var(--space-5);
  border: 0;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-system);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  box-shadow: 0 0.5px 0 rgba(255, 255, 255, 0.4) inset, 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: background 150ms var(--ease-out), transform 150ms var(--ease-out), box-shadow 150ms var(--ease-out);
}
.btn-primary:hover,
input[type=submit]:hover,
button[type=submit]:hover {
  background: var(--accent-hover);
  box-shadow: 0 0.5px 0 rgba(255, 255, 255, 0.4) inset, 0 6px 16px rgba(0, 0, 0, 0.14);
}
.btn-primary:active,
input[type=submit]:active,
button[type=submit]:active {
  transform: scale(0.97);
}
.btn-primary:focus-visible,
input[type=submit]:focus-visible,
button[type=submit]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.btn-ghost {
  appearance: none;
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 var(--space-4);
  border: 0.5px solid var(--edge-hard);
  border-radius: var(--r-pill);
  background: var(--surface-1);
  color: var(--ink-1);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: background 150ms var(--ease-out), border-color 150ms var(--ease-out);
}
.btn-ghost:hover {
  background: var(--surface-2);
  border-color: var(--edge-soft);
}

.form-control,
input[type=text],
input[type=password],
input[type=email],
textarea {
  width: 100%;
  height: 40px;
  padding: 0 var(--space-4);
  background: var(--surface-2);
  border: 0.5px solid var(--edge-hard);
  border-radius: var(--r-md);
  color: var(--ink-1);
  font-family: var(--font-system);
  font-size: 15px;
  letter-spacing: -0.005em;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: border-color 150ms var(--ease-out), box-shadow 150ms var(--ease-out);
}
.form-control::placeholder,
input[type=text]::placeholder,
input[type=password]::placeholder,
input[type=email]::placeholder,
textarea::placeholder {
  color: var(--ink-mute);
}
.form-control:focus,
input[type=text]:focus,
input[type=password]:focus,
input[type=email]:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.18);
}

textarea {
  height: auto;
  padding-top: var(--space-3);
}

label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.005em;
  color: var(--ink-3);
  margin-bottom: var(--space-2);
}

.mb-3 {
  margin-bottom: var(--space-4);
}

.form-group {
  margin-bottom: var(--space-4);
}

input[type=checkbox] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 1px solid var(--edge-soft);
  border-radius: 5px;
  background: var(--surface-2);
  cursor: pointer;
  position: relative;
  transition: background 150ms, border-color 150ms;
}
input[type=checkbox]:checked {
  background: var(--accent);
  border-color: var(--accent);
}
input[type=checkbox]:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid var(--on-accent);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
input[type=checkbox]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  height: 22px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.005em;
  background: var(--surface-2);
  color: var(--ink-2);
  border: 0.5px solid var(--edge-hard);
}

.badge--ok {
  background: rgba(52, 199, 89, 0.18);
  color: var(--ok);
  border-color: rgba(52, 199, 89, 0.3);
}

.badge--warn {
  background: rgba(255, 149, 0, 0.18);
  color: var(--warn);
  border-color: rgba(255, 149, 0, 0.3);
}

.badge--err {
  background: rgba(255, 59, 48, 0.18);
  color: var(--err);
  border-color: rgba(255, 59, 48, 0.3);
}

.badge--info {
  background: rgba(0, 122, 255, 0.18);
  color: var(--accent);
  border-color: rgba(0, 122, 255, 0.3);
}

.badge--mute {
  background: var(--surface-2);
  color: var(--ink-3);
}

.flash-stack {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  width: min(560px, 100vw - 32px);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.flash {
  position: relative;
  background: var(--surface-2);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  box-shadow: var(--rim-glow), var(--shadow-soft);
  border-radius: var(--r-lg);
  isolation: isolate;
  overflow: hidden;
  transition: transform 280ms var(--ease-spring), box-shadow 280ms var(--ease-out), background 200ms var(--ease-out);
}
.flash::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--specular) 0%, transparent 28%, transparent 72%, var(--specular) 100%);
  opacity: 0.35;
  pointer-events: none;
  mix-blend-mode: overlay;
  z-index: 0;
}
.flash > * {
  position: relative;
  z-index: 1;
}
.flash {
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 14px;
  color: var(--ink-1);
  animation: flash-in 320ms var(--ease-spring) both;
  border-radius: var(--r-md);
}

.flash--notice {
  box-shadow: var(--rim-glow), 0 0 0 2px rgba(52, 199, 89, 0.35), var(--shadow-soft);
}

.flash--alert {
  box-shadow: var(--rim-glow), 0 0 0 2px rgba(255, 59, 48, 0.35), var(--shadow-soft);
}

.flash--success {
  box-shadow: var(--rim-glow), 0 0 0 2px rgba(0, 122, 255, 0.3), var(--shadow-soft);
}

@keyframes flash-in {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.flash__close {
  margin-left: auto;
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--ink-3);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
}
.flash__close:hover {
  color: var(--ink-1);
}

.banner {
  position: relative;
  background: var(--surface-2);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  box-shadow: var(--rim-glow), var(--shadow-soft);
  border-radius: var(--r-lg);
  isolation: isolate;
  overflow: hidden;
  transition: transform 280ms var(--ease-spring), box-shadow 280ms var(--ease-out), background 200ms var(--ease-out);
}
.banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--specular) 0%, transparent 28%, transparent 72%, var(--specular) 100%);
  opacity: 0.35;
  pointer-events: none;
  mix-blend-mode: overlay;
  z-index: 0;
}
.banner > * {
  position: relative;
  z-index: 1;
}
.banner {
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: 14px;
  color: var(--ink-1);
  border-radius: var(--r-md);
  margin-bottom: var(--space-4);
}

.banner--info {
  box-shadow: var(--rim-glow), 0 0 0 2px rgba(0, 122, 255, 0.3), var(--shadow-soft);
}

.table {
  width: auto;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  margin-top: var(--space-3);
}
.table th,
.table td {
  padding: 6px 10px;
  border-bottom: 0.5px solid var(--edge-hard);
  text-align: left;
  font-variant-numeric: tabular-nums;
}
.table th {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.table td code {
  background: transparent;
  border: 0;
  padding: 0;
  font-size: 12.5px;
  color: var(--ink-1);
}

.pagination {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: var(--space-5) 0 0;
}
.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  background: var(--surface-1);
  border: 0.5px solid var(--edge-hard);
  text-decoration: none;
  transition: background 120ms, color 120ms, border-color 120ms;
}
.pagination a:hover {
  background: var(--surface-2);
  color: var(--ink-1);
}
.pagination .current {
  background: var(--accent);
  color: var(--on-accent);
  border-color: transparent;
}
.pagination .disabled,
.pagination .gap {
  color: var(--ink-mute);
  background: transparent;
  border-color: transparent;
}

details {
  margin-top: var(--space-3);
}
details summary {
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  user-select: none;
  list-style: none;
}
details summary::-webkit-details-marker {
  display: none;
}
details summary::before {
  content: "›";
  display: inline-block;
  transform: rotate(0deg);
  transition: transform 200ms var(--ease-out);
  font-size: 14px;
  color: var(--ink-3);
}
details[open] summary::before {
  transform: rotate(90deg);
}

.shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 95px var(--space-5) var(--space-7);
}
.shell > *:first-child {
  animation: rise-in 420ms var(--ease-out) both;
}
.shell > * + * {
  animation: rise-in 420ms var(--ease-out) both;
  animation-delay: 60ms;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.navbar {
  position: fixed;
  top: var(--space-3);
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 1px 8px 1px 16px;
  width: min(1040px, 100vw - 32px);
  background: var(--surface-3);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border-radius: var(--r-pill);
  box-shadow: var(--rim-glow), var(--shadow-soft);
}
.navbar::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--specular), transparent 40%);
  opacity: 0.4;
  pointer-events: none;
  mix-blend-mode: overlay;
}

.navbar__brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: -0.005em;
  color: var(--ink-1);
  text-decoration: none;
  padding: 1px 10px;
  border-radius: var(--r-pill);
}
.navbar__brand .navbar__brand-short {
  display: none;
}
.navbar__brand::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--purple-light) 100%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.1);
}

.navbar__nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  list-style: none;
  padding: 0;
}

.navbar__link {
  display: inline-flex;
  align-items: center;
  height: 14px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--ink-2);
  text-decoration: none;
  border-radius: var(--r-pill);
  transition: background 150ms var(--ease-out), color 150ms var(--ease-out);
}
.navbar__link:hover {
  background: var(--surface-1);
  color: var(--ink-1);
}
.navbar__link.is-active {
  background: var(--surface-2);
  color: var(--ink-1);
}

.navbar__link--cta {
  background: var(--accent);
  color: var(--on-accent);
  padding: 0 14px;
  margin-left: 4px;
}
.navbar__link--cta:hover {
  background: var(--accent-hover);
  color: var(--on-accent);
}

.theme-switch {
  display: inline-flex;
  background: var(--surface-1);
  border-radius: var(--r-pill);
  padding: 2px;
  border: 0.5px solid var(--edge-hard);
  margin-left: 4px;
}
.theme-switch button {
  appearance: none;
  background: transparent;
  border: 0;
  width: 26px;
  height: 26px;
  border-radius: var(--r-pill);
  color: var(--ink-3);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: background 150ms, color 150ms;
}
.theme-switch button.is-active {
  background: var(--surface-3);
  color: var(--ink-1);
  box-shadow: var(--rim-glow);
}
.theme-switch button:hover:not(.is-active) {
  color: var(--ink-1);
}
.theme-switch button svg {
  width: 14px;
  height: 14px;
}

.footer {
  max-width: 1080px;
  margin: var(--space-7) auto var(--space-5);
  padding: 0 var(--space-5);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--ink-3);
}

.row {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.col-1 {
  grid-column: span 1;
}

.col-2 {
  grid-column: span 2;
}

.col-3 {
  grid-column: span 3;
}

.col-4 {
  grid-column: span 4;
}

.col-5 {
  grid-column: span 5;
}

.col-6 {
  grid-column: span 6;
}

.col-7 {
  grid-column: span 7;
}

.col-8 {
  grid-column: span 8;
}

.col-9 {
  grid-column: span 9;
}

.col-10 {
  grid-column: span 10;
}

.col-11 {
  grid-column: span 11;
}

.col-12 {
  grid-column: span 12;
}

@media (min-width: 768px) {
  .col-md-1 {
    grid-column: span 1;
  }
  .col-md-2 {
    grid-column: span 2;
  }
  .col-md-3 {
    grid-column: span 3;
  }
  .col-md-4 {
    grid-column: span 4;
  }
  .col-md-5 {
    grid-column: span 5;
  }
  .col-md-6 {
    grid-column: span 6;
  }
  .col-md-7 {
    grid-column: span 7;
  }
  .col-md-8 {
    grid-column: span 8;
  }
  .col-md-9 {
    grid-column: span 9;
  }
  .col-md-10 {
    grid-column: span 10;
  }
  .col-md-11 {
    grid-column: span 11;
  }
  .col-md-12 {
    grid-column: span 12;
  }
}
@media (max-width: 767.98px) {
  .row {
    grid-template-columns: 1fr;
  }
  [class*=col-] {
    grid-column: auto;
  }
}
.d-flex {
  display: flex;
}

.align-items-center {
  align-items: center;
}

.ml-auto, .ms-auto {
  margin-left: auto;
}

.me-2 {
  margin-right: var(--space-2);
}

.mt-2 {
  margin-top: var(--space-2);
}

.mb-0 {
  margin-bottom: 0;
}

.mb-3 {
  margin-bottom: var(--space-4);
}

.container, .container.main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0;
}

.my-5 {
  margin: var(--space-7) 0;
}

html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

body.is-auth .shell {
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
}

@media (max-width: 700px), (max-height: 500px) {
  .navbar {
    transition: transform 0.3s var(--ease-out), opacity 0.3s var(--ease-out);
  }
  .navbar.is-hidden {
    transform: translate(-50%, -130%);
    opacity: 0;
    pointer-events: none;
  }
  .navbar__brand-full {
    display: none;
  }
  .navbar__brand-short {
    display: inline;
  }
}
@media (max-width: 700px) {
  .shell {
    padding: 88px var(--space-3) var(--space-5);
  }
  .navbar {
    gap: var(--space-2);
    padding: 1px 6px 1px 12px;
    width: calc(100vw - 16px);
  }
  .navbar__brand {
    font-size: 12.5px;
    padding: 1px 8px;
  }
  .navbar__brand::before {
    display: none;
  }
  .navbar__nav {
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .navbar__nav::-webkit-scrollbar {
    display: none;
  }
  .navbar__nav {
    flex-wrap: nowrap;
  }
  .navbar__nav > li {
    flex: 0 0 auto;
  }
  .navbar__link {
    height: 12px;
    padding: 0 10px;
    font-size: 11.5px;
  }
  .theme-switch {
    display: none;
  }
}
@media (max-width: 480px) {
  .navbar {
    padding: 1px;
  }
  .navbar__brand {
    font-size: 12px;
    padding: 1px 6px;
  }
  .navbar__link {
    padding: 0 8px;
    font-size: 11px;
  }
  .shell {
    padding: 85px var(--space-2) var(--space-4);
  }
}
@media (prefers-reduced-motion: reduce) {
  .shell > * {
    animation: none;
  }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
  }
}
.auth-stage {
  min-height: calc(100vh - 96px);
  display: grid;
  place-items: center;
  padding: var(--space-3) 0;
}

.auth-stage .mule {
  margin: 0;
}

.auth-stage__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  width: min(340px, 100vw - 32px);
}

.auth-card {
  position: relative;
  background: var(--surface-2);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  box-shadow: var(--rim-glow), var(--shadow-soft);
  border-radius: var(--r-lg);
  isolation: isolate;
  overflow: hidden;
  transition: transform 280ms var(--ease-spring), box-shadow 280ms var(--ease-out), background 200ms var(--ease-out);
}
.auth-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--specular) 0%, transparent 28%, transparent 72%, var(--specular) 100%);
  opacity: 0.35;
  pointer-events: none;
  mix-blend-mode: overlay;
  z-index: 0;
}
.auth-card > * {
  position: relative;
  z-index: 1;
}
.auth-card {
  padding: var(--space-5) var(--space-5) var(--space-4);
  width: 100%;
  text-align: left;
}
.auth-card h1 {
  font-size: 22px;
  margin-bottom: var(--space-1);
}
.auth-card .auth-sub {
  color: var(--ink-3);
  font-size: 13px;
  margin-bottom: var(--space-4);
}
.auth-card label {
  font-size: 12px;
  display: block;
  margin-bottom: 4px;
  color: var(--ink-3);
}
.auth-card .form-control {
  font-size: 14px;
  padding: 8px 10px;
  width: 100%;
}
.auth-card .btn-primary {
  width: 100%;
  padding: 10px 16px;
  font-size: 14px;
}

@media (max-width: 480px) {
  .auth-stage__inner {
    width: min(300px, 100vw - 24px);
  }
  .auth-card h1 {
    font-size: 20px;
  }
}
.mule {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  align-items: end;
  column-gap: var(--space-3);
  width: 100%;
  max-width: 720px;
  margin: var(--space-4) auto var(--space-6);
  cursor: pointer;
}

.mule__stage {
  flex: 0 0 auto;
  animation: mule-trot-in 0.7s cubic-bezier(0.25, 1.4, 0.5, 1) both;
}

.mule__svg {
  width: 96px;
  height: 84px;
  color: #6b4423;
  filter: drop-shadow(0 4px 8px rgba(60, 30, 0, 0.18));
  animation: mule-bob 3s ease-in-out infinite;
  transform-origin: 50% 80%;
}

.mule__shake {
  display: inline-block;
}

.mule--laughing .mule__shake {
  animation: mule-laugh 0.6s ease-in-out 0.2s 3;
}

.mule__ear--left {
  transform: rotate(-18deg);
  transform-origin: 58px 64px;
}

.mule__ear--right {
  transform: rotate(18deg);
  transform-origin: 92px 64px;
}

.mule__ear--left .mule__ear-flopper {
  animation: ear-flop-amb-left 4.6s ease-in-out infinite;
}

.mule__ear--right .mule__ear-flopper {
  animation: ear-flop-amb-right 4.6s ease-in-out infinite;
  animation-delay: 0.8s;
}

.mule__ear--left .mule__ear-flopper {
  transform-origin: 58px 64px;
}

.mule__ear--right .mule__ear-flopper {
  transform-origin: 92px 64px;
}

.mule__ear--left .mule__ear-tip {
  transform-origin: 58px 32px;
}

.mule__ear--right .mule__ear-tip {
  transform-origin: 92px 32px;
}

.mule__ear--left.mule__ear--flop .mule__ear-flopper {
  animation: ear-flop-big-left 1.4s cubic-bezier(0.34, 1.2, 0.5, 1);
}

.mule__ear--right.mule__ear--flop .mule__ear-flopper {
  animation: ear-flop-big-right 1.4s cubic-bezier(0.34, 1.2, 0.5, 1);
}

.mule__ear--left.mule__ear--kink-side .mule__ear-tip {
  animation: ear-kink-left 1.4s ease-in-out;
}

.mule__ear--right.mule__ear--kink-side .mule__ear-tip {
  animation: ear-kink-right 1.4s ease-in-out;
}

.mule__ear--left.mule__ear--kink-fold .mule__ear-tip {
  animation: ear-fold-left 1.4s ease-in-out;
}

.mule__ear--right.mule__ear--kink-fold .mule__ear-tip {
  animation: ear-fold-right 1.4s ease-in-out;
}

.mule__eyes--blink, .mule__eyes--laugh, .mule__mouth--laugh, .mule__glasses {
  display: none;
}

.mule--blinking:not(.mule--laughing) .mule__eyes--open {
  display: none;
}
.mule--blinking:not(.mule--laughing) .mule__eyes--blink {
  display: inline;
}

.mule--laughing .mule__eyes--open {
  display: none;
}
.mule--laughing .mule__eyes--laugh {
  display: inline;
}
.mule--laughing .mule__mouth--calm {
  display: none;
}
.mule--laughing .mule__mouth--laugh {
  display: inline;
}

.mule--glasses .mule__glasses {
  display: inline;
}

.mule__bubble {
  position: relative;
  width: 100%;
  padding: var(--space-3) var(--space-5);
  background: var(--surface-1, rgba(255, 255, 255, 0.85));
  border: 0.5px solid var(--edge-hard, rgba(0, 0, 0, 0.12));
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(20px);
  animation: bubble-pop 0.5s cubic-bezier(0.25, 1.4, 0.5, 1) 0.45s both;
  transform-origin: 0% 70%;
  overflow: hidden;
  transition: none;
}
.mule__bubble::before {
  content: "";
  position: absolute;
  left: -10px;
  bottom: 18px;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 12px solid var(--surface-1, rgba(255, 255, 255, 0.85));
  filter: drop-shadow(-1px 0 0 var(--edge-hard, rgba(0, 0, 0, 0.12)));
}

.mule__joke {
  margin: 0;
  font-family: var(--font-rounded);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--ink-1);
  font-style: italic;
  transition: opacity 0.55s ease;
}
.mule__joke.mule__joke--fading {
  opacity: 0;
}

.mule__greeting {
  font-weight: 700;
  font-style: normal;
  color: var(--ink-1);
}

.mule__byline {
  display: block;
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}

@keyframes mule-trot-in {
  0% {
    transform: translateX(-140%) translateY(8px) rotate(-6deg);
    opacity: 0;
  }
  60% {
    transform: translateX(8%) translateY(0) rotate(2deg);
    opacity: 1;
  }
  100% {
    transform: translateX(0) translateY(0) rotate(0);
    opacity: 1;
  }
}
@keyframes mule-bob {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}
@keyframes mule-laugh {
  0%, 100% {
    transform: translateY(0) rotate(0);
  }
  25% {
    transform: translateY(-2px) rotate(-3deg);
  }
  50% {
    transform: translateY(0) rotate(0);
  }
  75% {
    transform: translateY(-2px) rotate(3deg);
  }
}
@keyframes ear-flop-amb-left {
  0%, 100% {
    transform: rotate(0);
  }
  50% {
    transform: rotate(-5deg);
  }
}
@keyframes ear-flop-amb-right {
  0%, 100% {
    transform: rotate(0);
  }
  50% {
    transform: rotate(5deg);
  }
}
@keyframes ear-flop-big-left {
  0% {
    transform: rotate(0);
  }
  40% {
    transform: rotate(-38deg);
  }
  65% {
    transform: rotate(-6deg);
  }
  85% {
    transform: rotate(-22deg);
  }
  100% {
    transform: rotate(0);
  }
}
@keyframes ear-flop-big-right {
  0% {
    transform: rotate(0);
  }
  40% {
    transform: rotate(38deg);
  }
  65% {
    transform: rotate(6deg);
  }
  85% {
    transform: rotate(22deg);
  }
  100% {
    transform: rotate(0);
  }
}
@keyframes ear-kink-left {
  0%, 100% {
    transform: rotate(0);
  }
  45% {
    transform: rotate(-48deg);
  }
  70% {
    transform: rotate(-15deg);
  }
}
@keyframes ear-kink-right {
  0%, 100% {
    transform: rotate(0);
  }
  45% {
    transform: rotate(48deg);
  }
  70% {
    transform: rotate(15deg);
  }
}
@keyframes ear-fold-left {
  0%, 100% {
    transform: rotate(0) scaleY(1);
  }
  45% {
    transform: rotate(-130deg) scaleY(0.7);
  }
  70% {
    transform: rotate(-70deg) scaleY(0.85);
  }
}
@keyframes ear-fold-right {
  0%, 100% {
    transform: rotate(0) scaleY(1);
  }
  45% {
    transform: rotate(130deg) scaleY(0.7);
  }
  70% {
    transform: rotate(70deg) scaleY(0.85);
  }
}
@keyframes bubble-pop {
  0% {
    transform: scale(0.6);
    opacity: 0;
  }
  60% {
    transform: scale(1.04);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
@media (max-width: 640px) {
  .mule {
    grid-template-columns: 1fr;
    justify-items: center;
    row-gap: var(--space-2);
  }
  .mule__bubble::before {
    left: 22px;
    bottom: auto;
    top: -10px;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 12px solid var(--surface-1, rgba(255, 255, 255, 0.85));
    border-top: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .mule__stage, .mule__svg, .mule__ear, .mule__bubble {
    animation: none;
  }
}
.dash-section {
  margin-bottom: var(--space-5);
}
.dash-section .dash-section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.dash-section .dash-section__head h1, .dash-section .dash-section__head h2 {
  margin: 0;
}
.dash-section .dash-section__head .muted {
  font-size: 11px;
  text-transform: none;
  letter-spacing: 0;
}
.dash-section .dash-section__metrics {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-3);
  text-transform: none;
  letter-spacing: 0;
  margin-left: var(--space-2);
}
.dash-section .dash-section__metrics b {
  color: var(--ink-1);
  font-weight: 600;
}

.inventory-card {
  position: relative;
  background: var(--surface-2);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  box-shadow: var(--rim-glow), var(--shadow-soft);
  border-radius: var(--r-lg);
  isolation: isolate;
  overflow: hidden;
  transition: transform 280ms var(--ease-spring), box-shadow 280ms var(--ease-out), background 200ms var(--ease-out);
}
.inventory-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--specular) 0%, transparent 28%, transparent 72%, var(--specular) 100%);
  opacity: 0.35;
  pointer-events: none;
  mix-blend-mode: overlay;
  z-index: 0;
}
.inventory-card > * {
  position: relative;
  z-index: 1;
}
.inventory-card {
  padding: var(--space-5) var(--space-6);
}
.inventory-card .inventory-card__totals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-5);
  padding-bottom: var(--space-4);
  border-bottom: 0.5px solid var(--edge-soft, rgba(0, 0, 0, 0.06));
  margin-bottom: var(--space-4);
}
.inventory-card .inventory-card__label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  margin-bottom: 4px;
}
.inventory-card .inventory-card__big {
  font-family: var(--font-rounded);
  font-weight: 600;
  font-size: 30px;
  letter-spacing: -0.02em;
  color: var(--ink-1);
  font-variant-numeric: tabular-nums;
}
.inventory-card .inventory-card__footer {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 0.5px solid var(--edge-soft, rgba(0, 0, 0, 0.06));
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-3);
  font-size: 12.5px;
  color: var(--ink-3);
}
.inventory-card .inventory-card__footer b {
  font-weight: 600;
  color: var(--ink-1);
}
.inventory-card .inventory-card__footer .sep {
  color: var(--ink-3);
  opacity: 0.5;
  padding: 0 2px;
}
.inventory-card .inventory-card__totals-line,
.inventory-card .inventory-card__temps {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2);
}
.inventory-card .inventory-card__temps {
  text-align: right;
}
.inventory-card .inventory-card__table-wrap {
  overflow-x: auto;
  max-height: 380px;
  overflow-y: auto;
}
.inventory-card .inventory-card__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.inventory-card .inventory-card__table th, .inventory-card .inventory-card__table td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 0.5px solid var(--edge-soft, rgba(0, 0, 0, 0.06));
  white-space: nowrap;
}
.inventory-card .inventory-card__table th {
  font-weight: 600;
  color: var(--ink-3);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  position: sticky;
  top: 0;
  background: var(--surface-1, rgba(255, 255, 255, 0.7));
  backdrop-filter: blur(20px);
}
.inventory-card .inventory-card__table td.num, .inventory-card .inventory-card__table th.num {
  text-align: right;
}
.inventory-card .inventory-card__table tbody tr:hover {
  background: var(--surface-2, rgba(0, 0, 0, 0.02));
}
.inventory-card .inventory-card__table tbody tr[data-href] {
  cursor: pointer;
}
.inventory-card .inventory-card__table tbody tr[data-href] a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--edge-hard, rgba(0, 0, 0, 0.2));
}
.inventory-card .inventory-card__table tbody tr[data-href]:hover a {
  text-decoration-color: currentColor;
}
.inventory-card .inventory-card__table th.sortable {
  cursor: pointer;
  user-select: none;
}
.inventory-card .inventory-card__table th.sortable:hover {
  color: var(--ink-1);
}
.inventory-card .inventory-card__table th.sort-asc::after {
  content: " ▲";
  font-size: 9px;
  opacity: 0.7;
}
.inventory-card .inventory-card__table th.sort-desc::after {
  content: " ▼";
  font-size: 9px;
  opacity: 0.7;
}

.rotate-hint {
  display: none;
}

@media (max-width: 700px) and (orientation: portrait) {
  .rotate-hint {
    display: block;
    font-size: 11px;
    color: var(--ink-3);
    text-align: center;
    margin-top: var(--space-2);
    margin-bottom: var(--space-2);
    font-style: italic;
    letter-spacing: 0.02em;
  }
}
.sync-ribbon {
  position: relative;
  background: var(--surface-2);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  box-shadow: var(--rim-glow), var(--shadow-soft);
  border-radius: var(--r-lg);
  isolation: isolate;
  overflow: hidden;
  transition: transform 280ms var(--ease-spring), box-shadow 280ms var(--ease-out), background 200ms var(--ease-out);
}
.sync-ribbon::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--specular) 0%, transparent 28%, transparent 72%, var(--specular) 100%);
  opacity: 0.35;
  pointer-events: none;
  mix-blend-mode: overlay;
  z-index: 0;
}
.sync-ribbon > * {
  position: relative;
  z-index: 1;
}
.sync-ribbon {
  padding: 4px 6px 4px var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.sync-ribbon__details {
  flex: 1 1 auto;
  min-width: 0;
}

.sync-ribbon__summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  list-style: none;
  cursor: pointer;
  user-select: none;
  padding: 4px 0;
  font-size: 13px;
}
.sync-ribbon__summary::-webkit-details-marker {
  display: none;
}

.sync-ribbon__label {
  font-weight: 600;
  color: var(--ink-1);
}

.sync-ribbon__chevron {
  margin-left: auto;
  color: var(--ink-3);
  font-size: 11px;
  transition: transform 150ms var(--ease-out);
}

.sync-ribbon__details[open] .sync-ribbon__chevron {
  transform: rotate(180deg);
}

.sync-ribbon__body {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 0.5px solid var(--edge-soft, rgba(0, 0, 0, 0.06));
}

.sync-ribbon__refresh {
  flex: 0 0 auto;
}

.sync-ribbon__refresh button,
.sync-ribbon__refresh input[type=submit] {
  padding: 5px 12px;
  font-size: 12.5px;
}

.sync-status__line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2);
  font-size: 13px;
  color: var(--ink-2);
}
.sync-status__line b {
  font-weight: 600;
  color: var(--ink-1);
}
.sync-status__line .sep {
  color: var(--ink-3);
  opacity: 0.5;
  padding: 0 2px;
}

.map-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  padding: var(--space-2) var(--space-3);
  background: var(--surface-1, rgba(255, 255, 255, 0.7));
  border: 0.5px solid var(--edge-soft, rgba(0, 0, 0, 0.08));
  border-radius: 10px;
  font-size: 12.5px;
}
.map-controls .map-controls__group {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding-right: var(--space-3);
  border-right: 0.5px solid var(--edge-soft, rgba(0, 0, 0, 0.06));
}
.map-controls .map-controls__group:last-child {
  border-right: none;
  padding-right: 0;
}
.map-controls .map-controls__btn {
  appearance: none;
  border: 0.5px solid var(--edge-hard, rgba(0, 0, 0, 0.12));
  background: var(--surface-2, #fff);
  color: var(--ink-1);
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.map-controls .map-controls__btn:hover {
  background: var(--surface-3, #f3f3f3);
}
.map-controls .map-controls__switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}
.map-controls .map-controls__field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-3);
}
.map-controls select {
  padding: 3px 6px;
  font-size: 12px;
}

.inbound-map {
  width: 100%;
  height: 480px;
  border-radius: 12px;
  overflow: hidden;
  border: 0.5px solid var(--edge-soft, rgba(0, 0, 0, 0.06));
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.mapboxgl-popup-content {
  font-family: var(--font-system);
  font-size: 12.5px;
  border-radius: 8px;
  padding: 8px 12px;
}
.mapboxgl-popup-content b {
  font-weight: 600;
}

.shed-marker {
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
  transform: translateY(-2px);
}

.me-marker {
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.device-marker {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  pointer-events: auto;
}
.device-marker__pin {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #1e88e5;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}
.device-marker__label {
  font-family: var(--font-system);
  font-size: 11px;
  font-weight: 600;
  color: #1e88e5;
  background: rgba(255, 255, 255, 0.92);
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
  text-shadow: 0 0 2px #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 120ms var(--ease-out), transform 120ms var(--ease-out);
  pointer-events: none;
}
.device-marker:hover .device-marker__label {
  opacity: 1;
  transform: none;
}

.pallets-table tr.row-link {
  cursor: pointer;
  transition: background 120ms var(--ease-out);
}
.pallets-table tr.row-link:hover {
  background: var(--surface-1);
}

@media (max-width: 700px) {
  .inbound-map {
    height: 320px;
  }
}
.pallets-search {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}
.pallets-search .form-control {
  width: 240px;
}

.pallets-table-wrap {
  position: relative;
  background: var(--surface-2);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  box-shadow: var(--rim-glow), var(--shadow-soft);
  border-radius: var(--r-lg);
  isolation: isolate;
  overflow: hidden;
  transition: transform 280ms var(--ease-spring), box-shadow 280ms var(--ease-out), background 200ms var(--ease-out);
}
.pallets-table-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--specular) 0%, transparent 28%, transparent 72%, var(--specular) 100%);
  opacity: 0.35;
  pointer-events: none;
  mix-blend-mode: overlay;
  z-index: 0;
}
.pallets-table-wrap > * {
  position: relative;
  z-index: 1;
}
.pallets-table-wrap {
  padding: 0;
  overflow-x: auto;
}

.pallets-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.pallets-table th, .pallets-table td {
  padding: 8px 14px;
  text-align: left;
  border-bottom: 0.5px solid var(--edge-soft, rgba(0, 0, 0, 0.06));
  white-space: nowrap;
}
.pallets-table th {
  font-weight: 600;
  color: var(--ink-3);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--surface-1, rgba(255, 255, 255, 0.7));
}
.pallets-table td.num, .pallets-table th.num {
  text-align: right;
}
.pallets-table td.mono {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
}
.pallets-table tbody tr:hover {
  background: var(--surface-2, rgba(0, 0, 0, 0.02));
}
.pallets-table a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--edge-hard, rgba(0, 0, 0, 0.2));
}
.pallets-table a:hover {
  text-decoration-color: currentColor;
}

.pallets-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.pallet-show__latest {
  position: relative;
  background: var(--surface-2);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  box-shadow: var(--rim-glow), var(--shadow-soft);
  border-radius: var(--r-lg);
  isolation: isolate;
  overflow: hidden;
  transition: transform 280ms var(--ease-spring), box-shadow 280ms var(--ease-out), background 200ms var(--ease-out);
}
.pallet-show__latest::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--specular) 0%, transparent 28%, transparent 72%, var(--specular) 100%);
  opacity: 0.35;
  pointer-events: none;
  mix-blend-mode: overlay;
  z-index: 0;
}
.pallet-show__latest > * {
  position: relative;
  z-index: 1;
}
.pallet-show__latest {
  padding: var(--space-3) var(--space-5);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2);
  font-size: 13.5px;
  color: var(--ink-1);
}
.pallet-show__latest b {
  font-weight: 600;
}
.pallet-show__latest .sep {
  color: var(--ink-3);
  opacity: 0.5;
  padding: 0 2px;
}
.pallet-show__latest .muted {
  color: var(--ink-3);
  font-size: 12.5px;
}

.pallet-show__latest-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  margin-right: var(--space-2);
}

.pallet-show__delta-pos {
  color: var(--ink-1);
  font-weight: 600;
}

.pallet-show__delta-neg {
  color: var(--danger, #c63a3a);
  font-weight: 600;
}

.today-card {
  position: relative;
  background: var(--surface-2);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  box-shadow: var(--rim-glow), var(--shadow-soft);
  border-radius: var(--r-lg);
  isolation: isolate;
  overflow: hidden;
  transition: transform 280ms var(--ease-spring), box-shadow 280ms var(--ease-out), background 200ms var(--ease-out);
}
.today-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--specular) 0%, transparent 28%, transparent 72%, var(--specular) 100%);
  opacity: 0.35;
  pointer-events: none;
  mix-blend-mode: overlay;
  z-index: 0;
}
.today-card > * {
  position: relative;
  z-index: 1;
}
.today-card {
  padding: var(--space-3) var(--space-5);
}
.today-card .today-card__line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2);
  font-size: 13.5px;
  color: var(--ink-1);
  line-height: 1.6;
}
.today-card .today-card__line.muted {
  color: var(--ink-3);
  font-size: 12.5px;
}
.today-card .today-card__line b {
  font-weight: 600;
}
.today-card .today-card__line .sep {
  color: var(--ink-3);
  opacity: 0.5;
  padding: 0 2px;
}
.today-card .today-card__link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dashed var(--edge-hard, rgba(0, 0, 0, 0.18));
  transition: border-color 150ms var(--ease-out), color 150ms var(--ease-out);
}
.today-card .today-card__link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-7);
}

.metric-card {
  position: relative;
  background: var(--surface-2);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  box-shadow: var(--rim-glow), var(--shadow-soft);
  border-radius: var(--r-lg);
  isolation: isolate;
  overflow: hidden;
  transition: transform 280ms var(--ease-spring), box-shadow 280ms var(--ease-out), background 200ms var(--ease-out);
}
.metric-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--specular) 0%, transparent 28%, transparent 72%, var(--specular) 100%);
  opacity: 0.35;
  pointer-events: none;
  mix-blend-mode: overlay;
  z-index: 0;
}
.metric-card > * {
  position: relative;
  z-index: 1;
}
.metric-card {
  padding: var(--space-5);
}
.metric-card .metric-card__tail {
  margin-top: var(--space-3);
  display: flex;
  gap: var(--space-3);
  align-items: baseline;
  font-size: 12px;
  color: var(--ink-3);
}
.metric-card .metric-card__hint {
  display: block;
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  margin-top: var(--space-2);
}

.packet-card {
  position: relative;
  background: var(--surface-2);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  box-shadow: var(--rim-glow), var(--shadow-soft);
  border-radius: var(--r-lg);
  isolation: isolate;
  overflow: hidden;
  transition: transform 280ms var(--ease-spring), box-shadow 280ms var(--ease-out), background 200ms var(--ease-out);
}
.packet-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--specular) 0%, transparent 28%, transparent 72%, var(--specular) 100%);
  opacity: 0.35;
  pointer-events: none;
  mix-blend-mode: overlay;
  z-index: 0;
}
.packet-card > * {
  position: relative;
  z-index: 1;
}
.packet-card {
  padding: var(--space-3) var(--space-4);
}
.packet-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--rim-glow), var(--shadow-lift);
}
.packet-card {
  margin-bottom: var(--space-3);
}
.packet-card .packet-card__line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2);
  font-size: 12.5px;
  color: var(--ink-2);
  margin-bottom: var(--space-2);
}
.packet-card .packet-card__line b {
  font-weight: 600;
  color: var(--ink-1);
}
.packet-card .packet-card__line .sep {
  color: var(--ink-3);
  opacity: 0.5;
  padding: 0 2px;
}
.packet-card .packet-card__line a {
  color: var(--ink-2);
  text-decoration: underline;
}
.packet-card .packet-card__timing {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  margin-top: var(--space-1);
  margin-bottom: var(--space-2);
  font-size: 11.5px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.packet-card .packet-card__timing .muted {
  color: var(--ink-3);
}
.packet-card .packet-card__raw {
  margin-top: var(--space-2);
}
.packet-card .packet-card__raw > summary {
  font-size: 11.5px;
  color: var(--ink-3);
  cursor: pointer;
  user-select: none;
}
.packet-card .packet-card__raw > summary:hover {
  color: var(--ink-1);
}
.packet-card .packet-card__raw pre {
  font-size: 11px;
  margin-top: var(--space-2);
}
.packet-card .packet-card__details {
  grid-column: 1/-1;
  margin-top: var(--space-3);
}
.packet-card .packet-card__details > summary {
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
  user-select: none;
  padding: var(--space-1) 0;
}
.packet-card .packet-card__details > summary:hover {
  color: var(--ink-1);
}
.packet-card .packet-card__table-wrap {
  overflow-x: auto;
  margin-top: var(--space-2);
}
.packet-card .packet-card__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
.packet-card .packet-card__table th, .packet-card .packet-card__table td {
  padding: 6px 10px;
  text-align: left;
  border-bottom: 0.5px solid var(--edge-soft, rgba(0, 0, 0, 0.06));
  white-space: nowrap;
}
.packet-card .packet-card__table th {
  font-weight: 600;
  color: var(--ink-3);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.packet-card .packet-card__table td.num, .packet-card .packet-card__table th.num {
  text-align: right;
}
.packet-card .packet-card__table td.mono {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
}
.packet-card .packet-card__table tbody tr:hover {
  background: var(--surface-2, rgba(0, 0, 0, 0.02));
}

.error-packet {
  position: relative;
  background: var(--surface-2);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  box-shadow: var(--rim-glow), var(--shadow-soft);
  border-radius: var(--r-lg);
  isolation: isolate;
  overflow: hidden;
  transition: transform 280ms var(--ease-spring), box-shadow 280ms var(--ease-out), background 200ms var(--ease-out);
}
.error-packet::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--specular) 0%, transparent 28%, transparent 72%, var(--specular) 100%);
  opacity: 0.35;
  pointer-events: none;
  mix-blend-mode: overlay;
  z-index: 0;
}
.error-packet > * {
  position: relative;
  z-index: 1;
}
.error-packet {
  padding: 0;
  margin-bottom: var(--space-4);
}
.error-packet .error-packet__head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 0.5px solid var(--edge-hard);
  font-size: 13px;
}
.error-packet .error-packet__head .id {
  font-family: var(--font-mono);
  color: var(--ink-3);
}
.error-packet .error-packet__head .date {
  color: var(--ink-2);
}
.error-packet .error-packet__head .filename {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
}
.error-packet .error-packet__body {
  padding: var(--space-3) var(--space-4);
}

.page-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin-bottom: var(--space-5);
}
.page-header h1 {
  margin-bottom: 0;
}
.page-header p {
  margin: 0;
}

.catalog-filters {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
}
.catalog-filters .form-control {
  width: auto;
  min-width: 320px;
}
.catalog-filters select.form-control {
  min-width: 180px;
}

.table--catalog {
  width: 100%;
}
.table--catalog td, .table--catalog th {
  vertical-align: top;
}
.table--catalog .badge {
  white-space: nowrap;
}

.catalog-tabs {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
  border-bottom: 0.5px solid var(--edge-hard);
}

.catalog-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 var(--space-3);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-3);
  text-decoration: none;
  transition: color 150ms var(--ease-out);
}
.catalog-tab:hover {
  color: var(--ink-1);
}
.catalog-tab.is-active {
  color: var(--accent);
}
.catalog-tab.is-active::after {
  content: "";
  position: absolute;
  left: var(--space-3);
  right: var(--space-3);
  bottom: -1px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

.order-detail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.order-section {
  position: relative;
  background: var(--surface-2);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  box-shadow: var(--rim-glow), var(--shadow-soft);
  border-radius: var(--r-lg);
  isolation: isolate;
  overflow: hidden;
  transition: transform 280ms var(--ease-spring), box-shadow 280ms var(--ease-out), background 200ms var(--ease-out);
}
.order-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--specular) 0%, transparent 28%, transparent 72%, var(--specular) 100%);
  opacity: 0.35;
  pointer-events: none;
  mix-blend-mode: overlay;
  z-index: 0;
}
.order-section > * {
  position: relative;
  z-index: 1;
}
.order-section {
  padding: var(--space-4) var(--space-5);
}
.order-section h2 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: var(--space-3);
}

.order-facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: var(--space-2) var(--space-4);
  margin: 0;
  font-size: 13.5px;
}
.order-facts dt {
  color: var(--ink-3);
}
.order-facts dd {
  margin: 0;
  color: var(--ink-1);
}

.order-notes {
  position: relative;
  background: var(--surface-2);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  box-shadow: var(--rim-glow), var(--shadow-soft);
  border-radius: var(--r-lg);
  isolation: isolate;
  overflow: hidden;
  transition: transform 280ms var(--ease-spring), box-shadow 280ms var(--ease-out), background 200ms var(--ease-out);
}
.order-notes::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--specular) 0%, transparent 28%, transparent 72%, var(--specular) 100%);
  opacity: 0.35;
  pointer-events: none;
  mix-blend-mode: overlay;
  z-index: 0;
}
.order-notes > * {
  position: relative;
  z-index: 1;
}
.order-notes {
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-5);
}
.order-notes h2 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: var(--space-3);
}

.order-notes__codes {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0 0 var(--space-3);
}
.order-notes__codes .badge {
  font-family: var(--font-mono);
  letter-spacing: 0;
}

.order-notes__list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 14px;
}
.order-notes__list li {
  padding: var(--space-2) 0;
  border-top: 0.5px solid var(--edge-hard);
}
.order-notes__list li:first-child {
  border-top: 0;
}

.assessments-intro {
  font-size: 12.5px;
  margin: calc(var(--space-3) * -1) 0 var(--space-3);
  max-width: 56ch;
}

.assessment-lines {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.assessment-line {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 12.5px;
}
.assessment-line .badge {
  font-family: var(--font-mono);
  letter-spacing: 0;
}

.assessments-table th,
.assessments-table td {
  vertical-align: top;
}

.orders-map {
  position: relative;
  width: 100%;
  height: 70vh;
  min-height: 480px;
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: var(--space-5);
  border: 0.5px solid var(--edge-hard);
}

.orders-map__empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
  font-size: 13px;
  pointer-events: none;
}

.orders-marker {
  cursor: pointer;
  transform: translate(-50%, -100%);
}

.orders-marker__dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 14px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-system);
  letter-spacing: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2), 0 0 0 2px rgba(255, 255, 255, 0.9);
  transition: transform 120ms var(--ease-out);
}

.orders-marker:hover .orders-marker__dot {
  transform: scale(1.12);
}

.orders-map__popup .mapboxgl-popup-content {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--r-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  font-family: var(--font-system);
  font-size: 13px;
  max-width: 320px;
  color: rgba(0, 0, 0, 0.88);
}

.orders-map__popup .mapboxgl-popup-tip {
  border-top-color: #fff;
  border-bottom-color: #fff;
}

.orders-map__popup .muted {
  color: rgba(0, 0, 0, 0.5);
}

.orders-map__popup code {
  color: rgba(0, 0, 0, 0.88);
}

.orders-map__popup strong {
  color: rgba(0, 0, 0, 0.92);
}

.orders-popup__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-2);
  margin-bottom: 2px;
}

.orders-popup__head .muted {
  font-family: var(--font-mono);
  font-size: 11px;
}

.orders-popup__city {
  font-size: 12px;
  margin-bottom: var(--space-2);
  color: rgba(0, 0, 0, 0.6);
}

.orders-popup__orders {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 0.5px solid rgba(0, 0, 0, 0.12);
}
.orders-popup__orders li {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: baseline;
  padding: 4px 0;
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.08);
}
.orders-popup__orders li:last-child {
  border-bottom: 0;
}
.orders-popup__orders li code {
  font-size: 12px;
}
.orders-popup__orders li .muted {
  font-size: 11px;
}

.error-record {
  padding: var(--space-3) 0;
}
.error-record + .error-record {
  border-top: 0.5px solid var(--edge-hard);
}
.error-record .error-record__head {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: baseline;
  margin-bottom: var(--space-2);
}
.error-record .error-record__head strong {
  font-size: 14px;
  color: var(--err);
  font-family: var(--font-mono);
  letter-spacing: 0;
}
.error-record .error-record__head .error-record__code {
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 12px;
}
.error-record .error-record__head .error-record__msg {
  color: var(--ink-2);
  font-size: 13px;
}
.error-record .error-record__action {
  margin: var(--space-2) 0;
  padding: var(--space-3);
  background: rgba(0, 122, 255, 0.08);
  border: 0.5px solid rgba(0, 122, 255, 0.18);
  border-radius: var(--r-sm);
  color: var(--ink-1);
  font-size: 13px;
  line-height: 1.5;
}
.error-record .error-record__action strong {
  color: var(--accent);
  font-weight: 600;
}

* {
  box-sizing: border-box;
}

img, svg {
  display: block;
  max-width: 100%;
}

button {
  font-family: inherit;
}

::selection {
  background: var(--accent);
  color: var(--on-accent);
}

:focus-visible {
  outline-offset: 3px;
  outline-color: var(--accent);
}
