/*
  ECE Stockroom
  Layout: a frosted top bar over a soft gray page with one 1080px column of white panels.
  On phones the main nav moves to a bottom tab bar. The sign-in screen is always dark.
  Palette: Texas Tech scarlet and black, with light and dark themes.
*/
:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #f5f5f7;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --faint: #86868b;
  --line: #d2d2d7;
  --line-2: #e8e8ed;
  --chip: rgba(0, 0, 0, 0.05);
  --chip-2: rgba(0, 0, 0, 0.09);
  --thumb: #ffffff;
  --accent: #cc0000;
  --accent-2: #a80000;
  --accent-soft: #fdeaea;
  --on-accent: #ffffff;
  --hold: #1d1d1f;
  --ok: #1f8a3b;
  --ok-soft: #e4f4e8;
  --warn: #b85600;
  --warn-soft: #fff0df;
  --info: #1d1d1f;
  --info-soft: rgba(0, 0, 0, 0.06);
  --track: #e8e8ed;
  --nav: rgba(250, 250, 252, 0.78);
  --nav-line: rgba(0, 0, 0, 0.08);
  --scrim: rgba(0, 0, 0, 0.32);
  --hud: rgba(255, 255, 255, 0.86);
  --toast-bg: rgba(29, 29, 31, 0.94);
  --toast-ink: #f5f5f7;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  --lift: 0 4px 10px rgba(0, 0, 0, 0.04), 0 18px 40px rgba(0, 0, 0, 0.08);
  --sans: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Geist', 'Segoe UI', Roboto, Helvetica, Arial,
    sans-serif;
  --mono: 'SF Mono', 'Geist Mono', ui-monospace, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.25, 1, 0.3, 1);
  --spring: cubic-bezier(0.32, 0.72, 0, 1);
  /* Pages use the full window width, with the gutter growing on bigger screens. */
  --page-max: 2200px;
  --gutter: clamp(22px, 4vw, 72px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #000000;
    --surface: #1c1c1e;
    --surface-2: #2c2c2e;
    --ink: #f5f5f7;
    --muted: #a1a1a6;
    --faint: #8e8e93;
    --line: #3a3a3c;
    --line-2: #2c2c2e;
    --chip: rgba(255, 255, 255, 0.08);
    --chip-2: rgba(255, 255, 255, 0.14);
    --thumb: #636366;
    --accent: #ff3b3b;
    --accent-2: #ff6262;
    --accent-soft: #3b1212;
    --on-accent: #ffffff;
    --hold: #f5f5f7;
    --ok: #30d158;
    --ok-soft: #0f2e19;
    --warn: #ff9f0a;
    --warn-soft: #332000;
    --info: #f5f5f7;
    --info-soft: rgba(255, 255, 255, 0.1);
    --track: #3a3a3c;
    --nav: rgba(22, 22, 23, 0.78);
    --nav-line: rgba(255, 255, 255, 0.08);
    --scrim: rgba(0, 0, 0, 0.55);
    --hud: rgba(44, 44, 46, 0.88);
    --toast-bg: rgba(242, 242, 247, 0.94);
    --toast-ink: #1d1d1f;
    --shadow: none;
    --lift: 0 18px 40px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #000000;
  --surface: #1c1c1e;
  --surface-2: #2c2c2e;
  --ink: #f5f5f7;
  --muted: #a1a1a6;
  --faint: #8e8e93;
  --line: #3a3a3c;
  --line-2: #2c2c2e;
  --chip: rgba(255, 255, 255, 0.08);
  --chip-2: rgba(255, 255, 255, 0.14);
  --thumb: #636366;
  --accent: #ff3b3b;
  --accent-2: #ff6262;
  --accent-soft: #3b1212;
  --on-accent: #ffffff;
  --hold: #f5f5f7;
  --ok: #30d158;
  --ok-soft: #0f2e19;
  --warn: #ff9f0a;
  --warn-soft: #332000;
  --info: #f5f5f7;
  --info-soft: rgba(255, 255, 255, 0.1);
  --track: #3a3a3c;
  --nav: rgba(22, 22, 23, 0.78);
  --nav-line: rgba(255, 255, 255, 0.08);
  --scrim: rgba(0, 0, 0, 0.55);
  --hud: rgba(44, 44, 46, 0.88);
  --toast-bg: rgba(242, 242, 247, 0.94);
  --toast-ink: #1d1d1f;
  --shadow: none;
  --lift: 0 18px 40px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

/* Base */
:root {
  color-scheme: light;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
}
img {
  max-width: 100%;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.47 var(--sans);
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: '';
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 31;
  background: var(--bg);
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  letter-spacing: inherit;
}
input,
textarea {
  font: inherit;
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
h1,
h2,
h3 {
  margin: 0;
  text-wrap: balance;
}
p {
  margin: 0;
}
.i {
  width: 18px;
  height: 18px;
  flex: none;
}
.eyebrow {
  font: 600 13px/1.3 var(--sans);
  color: var(--muted);
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 13.5px;
}
.num {
  font-variant-numeric: tabular-nums;
}
.r {
  text-align: right;
}
.b {
  font-weight: 600;
}

/* ---------- sign-in: live scope background (dark in both themes) ---------- */
.gate {
  position: fixed;
  inset: 0;
  z-index: 50;
  overflow: auto;
  background: #050506;
  color: #f5f5f7;
  color-scheme: dark;
  display: flex;
  flex-direction: column;
  padding: max(24px, env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px))
    max(16px, env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px));
}
.g-scope {
  position: fixed;
  inset: 0;
  pointer-events: none;
  animation: gatein 1.2s ease both;
}
.g-scope canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.g-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 85% 80% at 50% 50%, transparent 50%, rgba(0, 0, 0, 0.7));
}
.g-hud {
  position: fixed;
  display: grid;
  gap: 3px;
  font: 500 11px/1.4 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  pointer-events: none;
  animation: gatein 1s ease 0.6s both;
}
.g-hud b {
  color: #ff5a5a;
  font-weight: 500;
}
.g-hud.tl {
  top: max(22px, env(safe-area-inset-top, 0px));
  left: max(24px, env(safe-area-inset-left, 0px));
}
.g-hud.br {
  bottom: max(22px, env(safe-area-inset-bottom, 0px));
  right: max(24px, env(safe-area-inset-right, 0px));
  text-align: right;
}
.g-in {
  position: relative;
  z-index: 1;
  flex: 1 0 auto;
  width: min(560px, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-block: 24px;
}
.g-in::before {
  content: '';
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 50%;
  width: min(760px, 135vw);
  height: 118%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  background: radial-gradient(
    closest-side,
    rgba(5, 5, 6, 0.92) 0%,
    rgba(5, 5, 6, 0.78) 55%,
    transparent 100%
  );
}
.g-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  margin-bottom: 30px;
}
.g-logo svg {
  width: 40px;
  height: 40px;
  flex: none;
}
.g-logo b {
  display: block;
  font: 600 15px/1.25 var(--sans);
  color: #f5f5f7;
}
.g-logo small {
  display: block;
  font-size: 12.5px;
  color: #86868b;
}
.logo-img {
  max-height: 56px;
  width: auto;
}
.g-title {
  margin: 0;
  font: 700 clamp(40px, 7.4vw, 68px) / 1.02 var(--sans);
  letter-spacing: -0.045em;
  color: #f5f5f7;
}
.g-title span {
  background: linear-gradient(180deg, #ff5a5a 10%, #cc0000 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.g-sub {
  margin-top: 14px;
  font-size: clamp(17px, 2.1vw, 20px);
  line-height: 1.38;
  color: #a1a1a6;
}
.g-form {
  width: min(420px, 100%);
  margin-top: 32px;
  display: grid;
  gap: 10px;
  text-align: left;
}
.g-field {
  display: flex;
  align-items: center;
  height: 58px;
  border-radius: 14px;
  background: rgba(18, 18, 20, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.16);
  transition:
    border-color 0.25s,
    box-shadow 0.25s,
    background 0.25s;
}
.g-field:focus-within {
  border-color: #ff4d4d;
  box-shadow:
    0 0 0 4px rgba(255, 59, 59, 0.18),
    0 0 32px rgba(255, 59, 59, 0.25);
}
.g-field input {
  flex: 1;
  min-width: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: none;
  padding: 0 0 0 18px;
  font: 500 16px var(--mono);
  color: #f5f5f7;
}
.g-field input::placeholder {
  color: #6e6e73;
}
.g-field input:focus {
  outline: none;
}
.g-suffix {
  color: #86868b;
  font: 500 14px var(--mono);
  padding: 0 10px 0 4px;
  white-space: nowrap;
}
.g-go {
  width: 40px;
  height: 40px;
  margin-right: 9px;
  border-radius: 11px;
  border: 0;
  background: #cc0000;
  color: #ffffff;
  display: grid;
  place-items: center;
  flex: none;
  transition:
    background 0.25s,
    transform 0.25s;
}
.g-go:hover {
  background: #e01616;
  transform: translateX(2px);
}
.g-go.ok {
  background: #30d158;
  color: #000000;
}
.g-err {
  color: #ff7070;
  font-size: 14px;
}
.g-fine {
  font-size: 12.5px;
  line-height: 1.5;
  color: #6e6e73;
}
.g-accts {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.g-accts > span {
  width: 100%;
  margin-bottom: 4px;
  font: 500 11px var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8e8e93;
}
.g-acct {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(18, 18, 20, 0.8);
  color: #f5f5f7;
  border-radius: 980px;
  padding: 5px 15px 5px 5px;
  font: 500 13.5px var(--mono);
  transition:
    background 0.25s,
    border-color 0.25s;
}
.g-acct:hover {
  background: rgba(255, 59, 59, 0.12);
  border-color: rgba(255, 59, 59, 0.55);
}
.g-acct small {
  font: 400 12px var(--sans);
  color: #86868b;
}
.g-av {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #cc0000;
  color: #ffffff;
  font: 600 10.5px var(--sans);
}
.g-foot {
  position: relative;
  z-index: 1;
  flex: none;
  display: flex;
  justify-content: center;
  gap: 10px 18px;
  flex-wrap: wrap;
  padding-top: 12px;
  font: 500 10.5px var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6e6e73;
}
.g-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.g-live::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #30d158;
  box-shadow: 0 0 8px #30d158;
  animation: pulse 1.8s ease-in-out infinite;
}
.g-rise {
  animation: grise 1s var(--ease) backwards;
  animation-delay: calc(var(--i, 0) * 0.1s + 0.15s);
}
@keyframes grise {
  from {
    opacity: 0;
    transform: translateY(22px);
    filter: blur(8px);
  }
}
.gate.entering {
  animation: gatein 0.5s ease both;
}
@keyframes gatein {
  from {
    opacity: 0;
  }
}
.gate.leaving {
  pointer-events: none;
  animation: gateout 0.7s var(--ease) forwards;
}
@keyframes gateout {
  to {
    opacity: 0;
    transform: scale(1.04);
  }
}
@media (max-width: 720px) {
  .g-hud {
    display: none;
  }
  .g-logo {
    margin-bottom: 24px;
  }
  .g-form {
    margin-top: 26px;
  }
}

/* ---------- top nav ---------- */
.top {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 30;
}
.top::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--nav);
  border-bottom: 1px solid var(--nav-line);
  -webkit-backdrop-filter: saturate(1.8) blur(20px);
  backdrop-filter: saturate(1.8) blur(20px);
}
.top-in {
  max-width: var(--page-max);
  margin: 0 auto;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 0;
  background: none;
  padding: 0;
  font: 600 16px var(--sans);
  letter-spacing: -0.022em;
  color: var(--ink);
  border-radius: 8px;
  white-space: nowrap;
}
.brand svg {
  width: 26px;
  height: 26px;
  flex: none;
  transition: transform 0.5s var(--ease);
}
.brand:hover svg {
  transform: rotate(-8deg) scale(1.06);
}
.nav {
  position: relative;
  display: flex;
  gap: 2px;
  margin: 0 auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar {
  display: none;
}
.nav-btn {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  border: 0;
  background: none;
  padding: 7px 14px;
  border-radius: 980px;
  font: 500 14px var(--sans);
  color: var(--muted);
  transition:
    color 0.2s,
    background 0.2s;
}
.nav-btn .i {
  display: none;
}
.nav-btn:hover {
  color: var(--ink);
}
.nav-btn[aria-current='page'] {
  color: var(--ink);
  background: var(--chip);
}
.nav-pill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  border-radius: 980px;
  background: var(--chip);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.5s var(--spring),
    width 0.5s var(--spring),
    opacity 0.2s;
}
.nav-pill.on {
  opacity: 1;
}
.nav:has(.nav-pill.on) .nav-btn[aria-current='page'] {
  background: none;
}
.badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--accent);
  color: var(--on-accent);
  font: 600 11px/18px var(--sans);
  text-align: center;
  display: inline-block;
  letter-spacing: 0;
}
.top-right {
  display: flex;
  align-items: center;
  gap: 4px;
}
.icon-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 0;
  background: none;
  display: grid;
  place-items: center;
  color: var(--ink);
  transition: background 0.2s;
}
.icon-btn:hover {
  background: var(--chip);
}
.icon-btn .i {
  width: 20px;
  height: 20px;
}
.icon-btn .badge {
  position: absolute;
  top: 1px;
  right: -1px;
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  font-size: 10px;
  padding: 0 4px;
}
.me-btn {
  width: 32px;
  height: 32px;
  margin-left: 4px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  overflow: hidden;
  background: var(--ink);
  color: var(--bg);
  font: 600 12px var(--sans);
  display: grid;
  place-items: center;
  flex: none;
  transition: transform 0.2s;
}
.me-btn:hover:not(:disabled) {
  transform: scale(1.06);
}
.me-btn:disabled {
  cursor: default;
}
.me-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cart-bump {
  animation: bump 0.55s var(--ease);
}
@keyframes bump {
  35% {
    transform: scale(1.25);
  }
  70% {
    transform: scale(0.94);
  }
}

/* ---------- page ---------- */
.wrap {
  max-width: var(--page-max);
  margin: 0 auto;
  padding-block: 52px 80px;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 32px;
  margin-bottom: 34px;
}
.page-head .eyebrow {
  color: var(--accent);
  font-size: 15px;
}
.page-head h1 {
  font: 700 clamp(40px, 6vw, 64px) / 1.04 var(--sans);
  letter-spacing: -0.04em;
  margin-top: 8px;
}
.page-head p {
  margin-top: 12px;
  font-size: clamp(17px, 1.8vw, 21px);
  line-height: 1.38;
  color: var(--muted);
  max-width: 40ch;
  letter-spacing: -0.016em;
}
.head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.rise {
  animation: rise 0.8s var(--ease) backwards;
  animation-delay: calc(var(--i, 0) * 60ms);
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
}
.calm .rise {
  animation: none;
}
.panel {
  background: var(--surface);
  border-radius: 22px;
  padding: 24px;
  min-width: 0;
  box-shadow: var(--shadow);
}
.panel h2 {
  font: 700 24px/1.15 var(--sans);
  letter-spacing: -0.028em;
}
.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.panel-head .eyebrow {
  margin-bottom: 4px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 44px;
  padding: 0 22px;
  border-radius: 980px;
  border: 0;
  font: 500 16px var(--sans);
  letter-spacing: -0.012em;
  white-space: nowrap;
  transition:
    background 0.2s,
    transform 0.15s,
    opacity 0.2s;
}
.btn:active:not(:disabled) {
  transform: scale(0.97);
}
.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}
.btn-primary:hover:not(:disabled) {
  background: var(--accent-2);
}
.btn-ghost {
  background: var(--chip);
  color: var(--ink);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--chip-2);
}
.btn-ok {
  background: var(--ink);
  color: var(--bg);
}
.btn-ok:hover:not(:disabled) {
  opacity: 0.85;
}
.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.btn-sm {
  height: 34px;
  padding: 0 15px;
  font-size: 14px;
}
.linkbtn {
  border: 0;
  background: none;
  padding: 0;
  color: var(--accent);
  font-weight: 500;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 980px;
  font: 600 12px/1.25 var(--sans);
  white-space: nowrap;
  letter-spacing: 0;
}
.chip.requested {
  background: var(--info-soft);
  color: var(--info);
}
.chip.purchased,
.chip.verified,
.chip.returned {
  background: var(--ok-soft);
  color: var(--ok);
}
.chip.cancelled,
.chip.none {
  background: var(--chip);
  color: var(--muted);
}
.chip.pending,
.chip.out {
  background: var(--warn-soft);
  color: var(--warn);
}
.chip.rejected {
  background: var(--accent-soft);
  color: var(--accent);
}
.chip.requested::before,
.chip.pending::before,
.chip.out::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  50% {
    opacity: 0.25;
  }
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 10px;
}
.tag {
  font: 600 12.5px/1.4 var(--sans);
  color: var(--muted);
  white-space: nowrap;
  letter-spacing: 0;
}
.tag.rent,
.tag.both {
  color: var(--accent);
}
.tag.lim {
  color: var(--warn);
}
.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: none;
  display: inline-block;
}

/* ---------- dashboard ---------- */
.dash {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.budget {
  grid-row: span 2;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.avail b {
  display: block;
  font: 700 clamp(50px, 6vw, 72px) / 1 var(--sans);
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
  margin-top: 6px;
}
.avail > span {
  display: block;
  font-size: 15px;
  color: var(--muted);
  margin-top: 8px;
}
.capsule {
  display: flex;
  gap: 3px;
  height: 12px;
  border-radius: 12px;
  background: var(--track);
  overflow: hidden;
}
.capsule i {
  height: 100%;
  animation: grow 1.3s var(--ease) backwards 0.25s;
}
.capsule i.s {
  background: var(--accent);
}
.capsule i.h {
  background: var(--hold);
  animation-delay: 0.45s;
}
@keyframes grow {
  from {
    width: 0;
  }
}
.legend {
  display: grid;
  gap: 10px;
}
.legend-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
}
.legend-row span:last-child {
  margin-left: auto;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tile b.big {
  font: 700 54px/1 var(--sans);
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
  margin-top: 10px;
}
.tile.link {
  cursor: pointer;
  border: 0;
  text-align: left;
  font: inherit;
  color: inherit;
  transition:
    transform 0.5s var(--ease),
    box-shadow 0.5s var(--ease);
}
.tile.link:hover {
  transform: translateY(-3px);
  box-shadow: var(--lift);
}
.lab-state {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
}
.lab-state strong {
  font: 700 22px/1.1 var(--sans);
  letter-spacing: -0.025em;
}
.lockbox {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--muted);
  flex: none;
}
.lockbox .i {
  width: 22px;
  height: 22px;
}
.granted .lockbox {
  background: var(--ok-soft);
  color: var(--ok);
}
.granted .shackle {
  transform-box: fill-box;
  transform-origin: 100% 100%;
  animation: unlock 0.9s 0.35s cubic-bezier(0.3, 1.6, 0.5, 1) both;
}
@keyframes unlock {
  to {
    transform: translateY(-2px) rotate(-28deg);
  }
}
.avatars {
  display: flex;
  align-items: center;
}
.av {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 600 12px var(--sans);
  overflow: hidden;
  flex: none;
  margin-left: -8px;
  border: 2px solid var(--surface);
  background: var(--surface-2);
  color: var(--ink);
}
.av:first-child {
  margin-left: 0;
}
.av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.av.c0 {
  background: var(--accent);
  color: var(--on-accent);
}
.av.c1 {
  background: var(--ink);
  color: var(--surface);
}
.av.c2 {
  background: var(--accent-soft);
  color: var(--accent);
}
.av.c3 {
  background: var(--surface-2);
  color: var(--ink);
}
.stack-gap {
  margin-top: 18px;
}
.rentrow {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--line-2);
}
.rentrow:first-of-type {
  border-top: 0;
  padding-top: 0;
}
.rentrow b {
  display: block;
  font-size: 15px;
  font-weight: 600;
}
.rentrow span.small {
  color: var(--muted);
}
.orders {
  display: grid;
  gap: 8px;
}
details.order {
  border-radius: 16px;
  background: var(--surface-2);
  transition: background 0.2s;
}
details.order.cancelled {
  opacity: 0.55;
}
details.order.flash {
  animation:
    rise 0.8s var(--ease) backwards,
    flash 2.4s 0.3s ease;
}
@keyframes flash {
  0%,
  50% {
    box-shadow: 0 0 0 2px var(--accent);
  }
}
details.order summary {
  list-style: none;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 14px 16px;
  cursor: pointer;
  border-radius: 16px;
}
details.order summary::-webkit-details-marker {
  display: none;
}
.order-left {
  display: grid;
  flex: 1 1 170px;
  min-width: 0;
}
.order-id {
  font: 600 14px var(--sans);
}
.order-meta {
  font-size: 13px;
  color: var(--muted);
}
.thumbs {
  display: flex;
}
.thumb {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--surface);
  border: 2px solid var(--surface-2);
  margin-left: -8px;
  overflow: hidden;
  display: grid;
  place-items: center;
  font: 600 11px var(--sans);
  color: var(--muted);
}
.thumb:first-child {
  margin-left: 0;
}
.thumb svg {
  width: 120%;
  height: 120%;
}
.order-total {
  font: 600 17px var(--sans);
  font-variant-numeric: tabular-nums;
  min-width: 70px;
  text-align: right;
  margin-left: auto;
}
.chev {
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: transform 0.4s var(--ease);
}
details[open] .chev {
  transform: rotate(180deg);
}
.order-body {
  padding: 0 16px 16px;
  animation: fade 0.45s ease both;
}
@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}
.lines-wrap {
  overflow-x: auto;
}
table.lines {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
table.lines td {
  padding: 9px 0;
  border-top: 1px solid var(--line);
  vertical-align: middle;
}
table.lines td + td {
  padding-left: 14px;
  white-space: nowrap;
}
table.lines .tag {
  margin-left: 6px;
}
.order-note {
  font-size: 13.5px;
  color: var(--muted);
  margin-top: 10px;
}
.empty {
  display: grid;
  place-items: center;
  text-align: center;
  gap: 10px;
  padding: 36px 16px;
  color: var(--muted);
}
.empty .i {
  width: 28px;
  height: 28px;
}

/* ---------- stock ---------- */
.search {
  position: relative;
  display: block;
}
.search input {
  width: 100%;
  height: 46px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 0 14px 0 42px;
  font-size: 16px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.search .i {
  position: absolute;
  left: 14px;
  top: 14px;
  color: var(--muted);
}
.bal {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 14px;
  font-size: 13.5px;
  color: var(--muted);
  margin-top: 10px;
}
.bal b {
  color: var(--ink);
  font-weight: 600;
}
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr));
  gap: 18px;
}
.tile-cat {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 360px;
  padding: 30px;
  border: 0;
  border-radius: 26px;
  background: var(--surface);
  text-align: left;
  overflow: hidden;
  color: var(--ink);
  box-shadow: var(--shadow);
  transition:
    transform 0.6s var(--ease),
    box-shadow 0.6s var(--ease);
}
.tile-cat:hover {
  transform: scale(1.012);
  box-shadow: var(--lift);
}
.tile-kicker {
  font: 600 13px var(--sans);
  color: var(--accent);
}
.tile-cat b {
  display: block;
  font: 700 34px/1.06 var(--sans);
  letter-spacing: -0.035em;
  margin-top: 6px;
}
.tile-sub {
  display: block;
  font-size: 16px;
  line-height: 1.4;
  color: var(--muted);
  margin-top: 8px;
  max-width: 32ch;
}
.tile-link {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-top: 12px;
  font: 500 15px var(--sans);
  color: var(--accent);
}
.tile-link .i {
  width: 15px;
  height: 15px;
  transition: transform 0.3s var(--ease);
}
.tile-cat:hover .tile-link .i {
  transform: translateX(3px);
}
.tile-art {
  flex: 1;
  align-self: center;
  display: grid;
  place-items: center;
  width: 70%;
  max-width: 340px;
  padding-top: 18px;
  transition: transform 0.8s var(--ease);
}
.tile-art svg {
  width: 100%;
  display: block;
}
.tile-cat:hover .tile-art {
  transform: scale(1.05);
}
.crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  color: var(--muted);
  margin-bottom: 14px;
}
.crumbs button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.chiprow {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  margin-bottom: 26px;
  scrollbar-width: none;
}
.chiprow::-webkit-scrollbar {
  display: none;
}
.fchip {
  flex: none;
  border: 0;
  background: var(--chip);
  border-radius: 980px;
  padding: 8px 16px;
  font: 500 14px var(--sans);
  color: var(--ink);
  transition:
    background 0.25s,
    color 0.25s;
}
.fchip:hover {
  background: var(--chip-2);
}
.fchip[aria-pressed='true'] {
  background: var(--ink);
  color: var(--bg);
}
.cat-head {
  margin-bottom: 22px;
}
.cat-head h2 {
  font: 700 clamp(34px, 4.6vw, 48px) / 1.05 var(--sans);
  letter-spacing: -0.04em;
}
.cat-head p {
  color: var(--muted);
  margin-top: 6px;
  font-size: 18px;
}
.items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 18px;
}
.item {
  position: relative;
  border-radius: 22px;
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition:
    transform 0.55s var(--ease),
    box-shadow 0.55s var(--ease);
}
.item:hover {
  transform: translateY(-4px);
  box-shadow: var(--lift);
}
.item-open {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  border: 0;
  background: none;
  padding: 0;
  text-align: left;
  color: inherit;
}
.item-art {
  aspect-ratio: 1/1;
  max-width: 100%;
  display: grid;
  place-items: center;
  padding: 20px;
}
.item-art svg {
  width: 96%;
  transition: transform 0.7s var(--ease);
}
.item:hover .item-art svg {
  transform: scale(1.07);
}
.item-body {
  padding: 0 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 3px;
}
.item-name {
  font: 600 17px/1.25 var(--sans);
  letter-spacing: -0.022em;
}
.item-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  padding-right: 48px;
}
.pricebox {
  display: grid;
  line-height: 1.25;
}
.price {
  font: 600 17px var(--sans);
  font-variant-numeric: tabular-nums;
}
.per {
  font-size: 13px;
  color: var(--muted);
}
.stock {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}
.stock.low {
  color: var(--warn);
}
.stock.out {
  color: var(--accent);
}
.quick {
  position: absolute;
  right: 16px;
  bottom: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: var(--accent);
  color: var(--on-accent);
  display: grid;
  place-items: center;
  transition:
    transform 0.35s var(--ease),
    background 0.2s;
}
.quick:hover:not(:disabled) {
  transform: scale(1.12);
  background: var(--accent-2);
}
.quick:active:not(:disabled) {
  transform: scale(0.92);
}
.quick:disabled {
  background: var(--chip-2);
  color: var(--muted);
  cursor: not-allowed;
}

/* ---------- overlays ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
}
.scrim {
  position: absolute;
  inset: 0;
  background: var(--scrim);
  opacity: 0;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: opacity 0.35s;
}
.open .scrim {
  opacity: 1;
}
.sheet {
  position: relative;
  width: min(980px, 100%);
  max-height: calc(100% - 20px);
  overflow: auto;
  background: var(--surface);
  border-radius: 28px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.28);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  transform: translateY(24px) scale(0.96);
  opacity: 0;
  transition:
    transform 0.38s var(--spring),
    opacity 0.25s;
}
.open .sheet {
  transform: none;
  opacity: 1;
  transition-duration: 0.56s, 0.3s;
}
.sheet-art {
  background: var(--surface-2);
  display: grid;
  place-items: center;
  min-height: 440px;
  padding: 36px;
}
.sheet-window {
  width: 100%;
  max-width: 100%;
}
.sheet-window svg {
  width: 100%;
  display: block;
}
.open .sheet-window svg {
  animation: float 6s ease-in-out 0.6s infinite;
}
@keyframes float {
  50% {
    transform: translateY(-8px);
  }
}
.sheet-info {
  padding: 40px 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.sheet-info > .eyebrow {
  color: var(--accent);
}
.sheet-info h2 {
  font: 700 36px/1.06 var(--sans);
  letter-spacing: -0.04em;
}
.sheet-price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 12px;
}
.sheet-price .price {
  font-size: 24px;
}
.segctl {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 3px;
  border-radius: 11px;
  background: var(--chip);
}
.segctl button {
  position: relative;
  z-index: 1;
  border: 0;
  background: none;
  padding: 9px 10px;
  border-radius: 9px;
  font: 600 14px var(--sans);
  color: var(--ink);
}
.segctl-thumb {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc(50% - 3px);
  border-radius: 9px;
  background: var(--thumb);
  box-shadow:
    0 3px 8px rgba(0, 0, 0, 0.12),
    0 0 0 0.5px rgba(0, 0, 0, 0.05);
  transition: transform 0.5s var(--ease);
}
.segctl[data-on='rent'] .segctl-thumb {
  transform: translateX(100%);
}
.mode-note {
  font-size: 14px;
  color: var(--muted);
}
.desc {
  color: var(--muted);
  font-size: 15.5px;
  max-width: 60ch;
}
.specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 18px;
  margin: 0;
}
.specs div {
  padding: 10px 0;
  border-top: 1px solid var(--line-2);
}
.specs dt {
  font-size: 12.5px;
  color: var(--muted);
}
.specs dd {
  margin: 1px 0 0;
  font-weight: 600;
  font-size: 15px;
}
.limit {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--surface-2);
}
.limit-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
}
.limit-top b {
  color: var(--accent);
  font-weight: 600;
}
.segbar {
  display: flex;
  gap: 4px;
}
.segbar i {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--track);
}
.segbar i.used {
  background: var(--ink);
}
.segbar i.cart {
  background: var(--accent);
}
.buy {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.buy .btn {
  flex: 1 1 180px;
  height: 48px;
}
.qty {
  display: inline-flex;
  align-items: center;
  border-radius: 980px;
  background: var(--chip);
  flex: none;
}
.qty button {
  width: 42px;
  height: 46px;
  border: 0;
  background: none;
  display: grid;
  place-items: center;
  color: var(--ink);
  border-radius: 980px;
}
.qty button:hover:not(:disabled) {
  color: var(--accent);
}
.qty button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.qty output {
  min-width: 28px;
  text-align: center;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.qty.sm button {
  width: 32px;
  height: 32px;
}
.qty.sm output {
  min-width: 22px;
  font-size: 14px;
}
.fine {
  font-size: 13px;
  color: var(--muted);
}
.close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: var(--chip);
  color: var(--ink);
  display: grid;
  place-items: center;
  transition:
    background 0.2s,
    transform 0.3s var(--ease);
}
.close:hover {
  background: var(--chip-2);
  transform: rotate(90deg);
}
.close.inline {
  position: static;
}
.viewer {
  display: block;
  width: min(720px, 100%);
}
.viewer-img {
  background: var(--surface-2);
  display: grid;
  place-items: center;
  padding: 28px;
  min-height: 300px;
}
.viewer-img img,
.viewer-img svg {
  max-width: 100%;
  max-height: 60vh;
  border-radius: 10px;
}
.viewer-foot {
  padding: 18px 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
}
@media (max-width: 760px) {
  .overlay {
    place-items: end stretch;
    padding: 0;
  }
  .sheet {
    grid-template-columns: 1fr;
    border-radius: 26px 26px 0 0;
    max-height: 92%;
    transform: translateY(100%);
    opacity: 1;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .sheet-art {
    min-height: 0;
    padding: 28px 40px;
  }
  .sheet-info {
    padding: 24px 22px;
  }
  .sheet-info h2 {
    font-size: 30px;
  }
}
.drawer-root {
  position: fixed;
  inset: 0;
  z-index: 60;
}
.drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(440px, 100%);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.18);
  transform: translateX(105%);
  transition: transform 0.38s var(--spring);
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}
.open .drawer {
  transform: none;
  transition-duration: 0.56s;
}
/* Cards give a little under the finger, like on iOS. */
.tile-cat:active,
.item:active:not(:has(button:active)) {
  transform: scale(0.98);
  transition-duration: 0.15s;
}

/* ---------- motion: page push and pop, sheets ---------- */
.in-motion {
  overflow-x: clip;
}
.page-ghost {
  position: fixed;
  z-index: 20;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  pointer-events: none;
}
.page-ghost.over {
  z-index: 22;
}
#view.moving,
#view.under {
  position: relative;
  background: var(--bg);
}
#view.moving {
  z-index: 21;
}
#view.moving,
.page-ghost.moving {
  box-shadow: -14px 0 40px rgba(0, 0, 0, 0.12);
}
/* The page behind an open sheet settles back and can't be scrolled. */
html.locked {
  overflow: hidden;
}
.sheet,
.drawer-body,
#form-body {
  overscroll-behavior: contain;
}
#view {
  transition: transform 0.56s var(--spring);
}
.behind #view {
  transform: scale(0.975);
}
@media (max-width: 760px) {
  .behind #view {
    transform: scale(0.93) translateY(6px);
  }
  .sheet:not(.form-sheet)::before,
  .drawer::before {
    content: '';
    position: absolute;
    z-index: 3;
    top: 7px;
    left: 50%;
    width: 36px;
    height: 5px;
    margin-left: -18px;
    border-radius: 3px;
    background: var(--muted);
    opacity: 0.4;
  }
  .drawer {
    top: auto;
    left: 0;
    width: 100%;
    height: auto;
    max-height: calc(100% - 44px - env(safe-area-inset-top, 0px));
    border-radius: 26px 26px 0 0;
    box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.18);
    transform: translateY(100%);
    padding-right: 0;
  }
  .drawer-body {
    min-height: 0;
  }
}
.drawer-head {
  padding: 26px 24px 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.drawer-head h2 {
  font: 700 30px/1.05 var(--sans);
  letter-spacing: -0.04em;
  margin-top: 2px;
}
.drawer-body {
  flex: 1;
  overflow: auto;
  padding: 0 24px;
}
.drawer-foot {
  padding: 18px 24px 24px;
  border-top: 1px solid var(--line-2);
  display: grid;
  gap: 12px;
}
.line {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-2);
}
.line-art {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: none;
}
.line-art svg {
  width: 115%;
}
.line-name {
  font-weight: 600;
  font-size: 15px;
  line-height: 1.3;
  letter-spacing: -0.015em;
}
.line-meta {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}
.line-meta .tag {
  display: inline;
  font-size: 13px;
}
.line-ctl {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.line-price {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.rm {
  border: 0;
  background: none;
  color: var(--muted);
  padding: 6px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.rm:hover {
  color: var(--accent);
  background: var(--chip);
}
.sum {
  display: grid;
  gap: 6px;
  font-size: 15px;
}
.sum div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.sum b {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.sum .after {
  padding-top: 8px;
  border-top: 1px solid var(--line-2);
  margin-top: 4px;
}
.sum .after b {
  font: 700 26px/1 var(--sans);
  letter-spacing: -0.03em;
}
.sum .over b {
  color: var(--accent);
}
.warnbox {
  font-size: 13.5px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 11px 14px;
  border-radius: 12px;
}
textarea.note {
  width: 100%;
  min-height: 62px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  padding: 11px 13px;
  font-size: 15px;
}
textarea.note:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

/* ---------- profile ---------- */
.profile {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr);
  gap: 18px;
  align-items: start;
}
.me-card {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}
.avatar-big {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  border: 0;
  padding: 0;
  background: var(--ink);
  color: var(--bg);
  font: 600 38px var(--sans);
  letter-spacing: -0.02em;
  display: grid;
  place-items: center;
  flex: none;
}
.avatar-big img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar-big .cam {
  position: absolute;
  inset: auto 0 0;
  height: 36%;
  background: rgba(0, 0, 0, 0.55);
  color: #ffffff;
  display: grid;
  place-items: center;
  font: 600 11.5px var(--sans);
  transform: translateY(100%);
  transition: transform 0.35s var(--ease);
}
.avatar-big:hover .cam,
.avatar-big:focus-visible .cam,
.avatar-big.over .cam {
  transform: none;
}
.field {
  display: grid;
  gap: 6px;
  flex: 1 1 180px;
}
.field label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}
.field input {
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  padding: 0 14px;
  font-size: 16px;
  font-weight: 500;
}
.field input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px 20px;
  margin: 24px 0 0;
  font-size: 15px;
}
.facts dt {
  color: var(--muted);
}
.facts dd {
  margin: 0;
  font-weight: 500;
}
.mates {
  display: grid;
  gap: 12px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line-2);
}
.mate {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
}
.mate .av {
  margin-left: 0;
}
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 20px 0;
}
.step {
  display: grid;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
}
.step .bar {
  height: 6px;
  border-radius: 3px;
  background: var(--track);
  overflow: hidden;
  position: relative;
}
.step .bar::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--ink);
}
.step.done {
  color: var(--ink);
}
.step.done .bar::after {
  transform: scaleX(1);
  animation: fillbar 0.8s var(--ease) backwards;
  animation-delay: calc(var(--i) * 160ms + 0.2s);
}
.step.current .bar::after {
  background: var(--accent);
  transform: scaleX(0.45);
  animation: scan 1.5s ease-in-out infinite;
}
.step.bad .bar::after {
  background: var(--accent);
  transform: scaleX(1);
}
.step.current,
.step.bad {
  color: var(--ink);
}
@keyframes fillbar {
  from {
    transform: scaleX(0);
  }
}
@keyframes scan {
  0% {
    transform: translateX(-100%) scaleX(0.45);
  }
  100% {
    transform: translateX(220%) scaleX(0.45);
  }
}
.lab {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 16px;
  background: var(--surface-2);
  margin-bottom: 16px;
}
.lab.granted {
  background: var(--ok-soft);
}
.lab.granted .lockbox {
  background: var(--surface);
}
.lab b {
  display: block;
  font: 600 17px/1.2 var(--sans);
  letter-spacing: -0.02em;
}
.lab span {
  font-size: 13.5px;
  color: var(--muted);
}
.drop {
  border: 1.5px dashed var(--line);
  border-radius: 18px;
  padding: 28px 18px;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 6px;
  background: var(--surface-2);
  transition:
    border-color 0.25s,
    background 0.25s,
    transform 0.3s var(--ease);
  width: 100%;
  color: var(--ink);
}
.drop:hover {
  border-color: var(--accent);
}
.drop.over {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: scale(1.01);
}
.drop .up {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--on-accent);
  margin-bottom: 6px;
  transition: transform 0.4s var(--ease);
}
.drop:hover .up {
  transform: translateY(-3px);
}
.drop b {
  font-size: 16px;
  font-weight: 600;
}
.drop span {
  font-size: 13.5px;
  color: var(--muted);
}
.filecard {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 14px;
  background: var(--surface-2);
  flex-wrap: wrap;
}
.filecard .ft {
  width: 72px;
  height: 54px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
  display: grid;
  place-items: center;
  flex: none;
  color: var(--muted);
}
.filecard .ft img,
.filecard .ft svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.filecard .fi {
  flex: 1 1 160px;
  min-width: 0;
}
.filecard .fi b {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.filecard .fi span {
  font-size: 13px;
  color: var(--muted);
}
.notebox {
  font-size: 14px;
  background: var(--accent-soft);
  color: var(--ink);
  padding: 12px 14px;
  border-radius: 12px;
  margin-top: 12px;
}
.notebox b {
  color: var(--accent);
}

/* ---------- admin: inventory ---------- */
.ph {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.7s var(--ease);
}
.item-art .ph {
  border-radius: 14px;
}
.item:hover .item-art .ph {
  transform: scale(1.05);
}
.tile-art .ph {
  height: auto;
  max-height: 230px;
  border-radius: 18px;
}
.tile-cat:hover .tile-art .ph {
  transform: none;
}
.sheet-window .ph {
  height: auto;
  max-height: 420px;
  border-radius: 18px;
}
.thumb .ph,
.line-art .ph {
  object-fit: cover;
}
.inv-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}
.inv-tools .search {
  flex: 1 1 260px;
  max-width: 440px;
}
.inv-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto 104px 108px 16px;
  gap: 14px;
  align-items: center;
  width: calc(100% + 20px);
  margin: 0 -10px;
  border: 0;
  background: none;
  padding: 12px 10px;
  border-radius: 14px;
  text-align: left;
  color: inherit;
  transition: background 0.2s;
}
.inv-row:hover {
  background: var(--surface-2);
}
.inv-row + .inv-row {
  box-shadow: inset 0 1px 0 var(--line-2);
}
.inv-row:hover,
.inv-row:hover + .inv-row {
  box-shadow: none;
}
.inv-row .line-art {
  width: 52px;
  height: 52px;
  border-radius: 12px;
}
.inv-main {
  min-width: 0;
  display: grid;
}
.inv-main b {
  font-weight: 600;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.inv-main span {
  font-size: 13px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.inv-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  align-items: center;
}
.inv-tags .tags {
  justify-content: flex-end;
}
.inv-price {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}
.inv-price small {
  display: block;
  font-weight: 400;
  font-size: 12px;
  color: var(--muted);
}
.inv-stock {
  font-size: 13.5px;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.inv-stock.low {
  color: var(--warn);
  font-weight: 600;
}
.inv-stock.out {
  color: var(--accent);
  font-weight: 600;
}
.inv-chev {
  color: var(--faint);
  display: grid;
  place-items: center;
}
.inv-chev .i {
  width: 16px;
  height: 16px;
}
.hid {
  font: 600 12px var(--sans);
  color: var(--muted);
  background: var(--chip);
  border-radius: 980px;
  padding: 3px 9px;
  white-space: nowrap;
}
.sheet.form-sheet {
  display: block;
  width: min(700px, 100%);
}
.ed {
  display: grid;
  gap: 18px;
  padding: 34px 32px 28px;
  min-width: 0;
}
.ed h2 {
  font: 700 30px/1.08 var(--sans);
  letter-spacing: -0.035em;
  margin-top: 2px;
  padding-right: 44px;
}
.ed .field {
  flex: none;
  min-width: 0;
  align-content: start;
}
.ed .fine {
  display: block;
  margin-top: 2px;
}
.ed-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.ed-grid .span2 {
  grid-column: 1/-1;
}
.ed-block {
  display: grid;
  gap: 12px;
}
.ed-photo-row {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}
.ed-photo {
  width: 132px;
  height: 132px;
  border-radius: 22px;
  border: 1.5px dashed var(--line);
  background: var(--surface-2);
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 0;
  flex: none;
  transition:
    border-color 0.2s,
    background 0.2s,
    transform 0.3s var(--ease);
}
.ed-photo:hover {
  border-color: var(--accent);
}
.ed-photo.over {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: scale(1.03);
}
.ed-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ed-photo svg:not(.i) {
  width: 110%;
}
.ed-ph {
  display: grid;
  justify-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
}
.ed-ph .i {
  width: 24px;
  height: 24px;
  color: var(--accent);
}
.ed-photo-txt {
  flex: 1 1 220px;
  display: grid;
  gap: 4px;
  min-width: 0;
}
.ed-photo-txt b {
  font-weight: 600;
}
.ed-photo-txt > span {
  font-size: 13.5px;
  color: var(--muted);
}
.ed-photo-acts {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.ed .money-in.sm {
  height: 46px;
  background: var(--surface-2);
}
.ed .money-in.sm:focus-within {
  background: var(--surface);
}
.ed .money-in.sm input {
  font-size: 17px;
  font-weight: 600;
}
.ed .money-in.sm span {
  font-size: 17px;
}
.stock-in {
  display: flex;
  align-items: center;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  overflow: hidden;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.stock-in:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  background: var(--surface);
}
.field .stock-in input {
  flex: 1;
  min-width: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  text-align: center;
  font-size: 17px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  padding: 0 4px;
}
.stock-in button {
  width: 40px;
  height: 100%;
  border: 0;
  background: none;
  color: var(--ink);
  display: grid;
  place-items: center;
  flex: none;
}
.stock-in button:hover {
  color: var(--accent);
}
.stock-in .plus10 {
  width: auto;
  padding: 0 12px;
  font: 600 14px var(--sans);
  border-left: 1px solid var(--line);
}
.seg3 {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 3px;
  border-radius: 11px;
  background: var(--chip);
}
.seg3 button {
  position: relative;
  z-index: 1;
  border: 0;
  background: none;
  padding: 9px 6px;
  border-radius: 9px;
  font: 600 14px var(--sans);
  color: var(--ink);
  white-space: nowrap;
}
.seg3-thumb {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc((100% - 6px) / 3);
  border-radius: 9px;
  background: var(--thumb);
  box-shadow:
    0 3px 8px rgba(0, 0, 0, 0.12),
    0 0 0 0.5px rgba(0, 0, 0, 0.05);
  transition: transform 0.5s var(--ease);
}
.seg3[data-on='rent'] .seg3-thumb {
  transform: translateX(100%);
}
.seg3[data-on='both'] .seg3-thumb {
  transform: translateX(200%);
}
.switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--surface-2);
  cursor: pointer;
}
.switch > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.switch b {
  font-weight: 600;
  font-size: 15px;
}
.switch > span > span {
  font-size: 13px;
  color: var(--muted);
}
.switch input {
  -webkit-appearance: none;
  appearance: none;
  width: 51px;
  height: 31px;
  border-radius: 31px;
  background: var(--track);
  position: relative;
  flex: none;
  margin: 0;
  cursor: pointer;
  transition: background 0.25s;
}
.switch input::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
  transition: transform 0.35s var(--ease);
}
.switch input:checked {
  background: var(--ok);
}
.switch input:checked::after {
  transform: translateX(20px);
}
textarea.note.mono {
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.55;
}
.ed-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 4px;
}
.cat-edit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) 36px;
  gap: 10px;
  align-items: end;
  padding: 12px 0;
  border-top: 1px solid var(--line-2);
}
.cat-list .cat-edit:first-child {
  border-top: 0;
  padding-top: 0;
}
.cat-edit .rm {
  height: 46px;
  width: 36px;
}
.cat-edit.new {
  border-top: 1px solid var(--line);
}
.cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  margin: 0;
}
.cols div {
  display: grid;
  gap: 1px;
  min-width: 0;
}
.cols dt {
  font: 600 13px var(--mono);
  color: var(--ink);
}
.cols dd {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
.tpl {
  border-radius: 14px;
  background: var(--surface-2);
  overflow: hidden;
  min-width: 0;
}
.tpl-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.tpl pre {
  margin: 0;
  padding: 10px 14px 14px;
  font: 500 12.5px/1.6 var(--mono);
  overflow-x: auto;
  white-space: pre;
  color: var(--ink);
}
.imp-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.imp-stats div {
  background: var(--surface-2);
  border-radius: 14px;
  padding: 12px 14px;
}
.imp-stats b {
  display: block;
  font: 700 30px/1 var(--sans);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.imp-stats span {
  font-size: 13px;
  color: var(--muted);
}
.imp-table-wrap {
  overflow-x: auto;
  min-width: 0;
}
table.imp {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
table.imp th {
  text-align: left;
  font-weight: 600;
  color: var(--muted);
  font-size: 12.5px;
  padding: 6px 12px 6px 0;
  white-space: nowrap;
}
table.imp td {
  padding: 8px 12px 8px 0;
  border-top: 1px solid var(--line-2);
  white-space: nowrap;
}
.mono-s {
  font: 500 12.5px var(--mono);
}
.skips {
  display: grid;
  gap: 6px;
  font-size: 13.5px;
  color: var(--muted);
}
.skips b {
  color: var(--ink);
  font-weight: 600;
}
button.lowrow {
  width: 100%;
  border: 0;
  background: none;
  text-align: left;
  color: inherit;
  border-radius: 12px;
  padding: 8px;
  margin: 0 -8px;
  width: calc(100% + 16px);
  transition: background 0.2s;
}
button.lowrow:hover {
  background: var(--surface-2);
}
.panel-head .linkbtn {
  font-size: 14px;
}
@media (max-width: 1000px) {
  .brand span {
    display: none;
  }
}
@media (max-width: 760px) {
  .inv-row {
    grid-template-columns: 52px minmax(0, 1fr) auto;
  }
  .inv-row .inv-tags,
  .inv-row .inv-price,
  .inv-row .inv-chev {
    display: none;
  }
  .ed {
    padding: 26px 20px 22px;
  }
  .ed-grid,
  .cols {
    grid-template-columns: 1fr;
  }
  .cat-edit {
    grid-template-columns: minmax(0, 1fr) 36px;
  }
  .cat-edit .field:nth-child(2) {
    grid-column: 1;
  }
  .cat-edit > :last-child {
    grid-row: 1;
    grid-column: 2;
  }
  .nav-btn > span:not(.badge) {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* ---------- admin ---------- */
.desk-search {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.desk-search .search {
  flex: 1 1 320px;
}
.desk-search .search input {
  height: 54px;
  font-size: 17px;
  border-radius: 14px;
  padding-left: 46px;
  background: var(--surface);
}
.desk-search .search .i {
  top: 18px;
  left: 16px;
}
.desk-hint {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}
kbd {
  display: inline-block;
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 6px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  background: var(--surface);
  font: 600 12px/1.4 var(--mono);
  color: var(--ink);
  text-align: center;
}
@media (pointer: coarse) {
  .desk-hint {
    display: none;
  }
}
mark {
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 3px;
  padding: 0 1px;
}
.via {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ok);
}
@media (max-width: 640px) {
  .rentrow {
    grid-template-columns: auto minmax(0, 1fr);
    row-gap: 8px;
  }
  .rentrow > .btn {
    grid-column: 1 / -1;
    justify-self: start;
  }
  .rentrow > .chip {
    grid-column: 2;
    justify-self: start;
  }
}
.via .i {
  width: 14px;
  height: 14px;
}

.jlist {
  display: grid;
}
.jrow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px 14px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--line-2);
}
.jrow:first-child {
  border-top: 0;
  padding-top: 2px;
}
.jrow b {
  display: block;
  font-weight: 600;
  font-size: 15px;
  overflow-wrap: anywhere;
}
.jrow .small {
  display: block;
  color: var(--muted);
}
.ready-form {
  grid-column: 1/-1;
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 14px;
  background: var(--surface-2);
  animation: fade 0.4s ease both;
}
.ready-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.money-in.sm {
  height: 42px;
  flex: 1 1 140px;
  background: var(--surface);
}
.money-in.sm span {
  font-size: 18px;
  padding-left: 12px;
}
.money-in.sm input {
  font-size: 19px;
}
.chip.queued,
.chip.collected {
  background: var(--chip);
  color: var(--muted);
}
.chip.printing {
  background: var(--accent-soft);
  color: var(--accent);
}
.chip.ready {
  background: var(--ok-soft);
  color: var(--ok);
}
.chip.printing::before,
.chip.ready::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 1.6s ease-in-out infinite;
}
.pthumb {
  background: var(--ink) !important;
  color: var(--bg);
}
.pthumb .i {
  width: 18px;
  height: 18px;
}
.print-alert {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-radius: 18px;
  background: var(--ok-soft);
  color: var(--ink);
  margin-bottom: 18px;
}
.print-alert .i {
  color: var(--ok);
  width: 22px;
  height: 22px;
}
.print-alert b {
  font-weight: 600;
}
.jsteps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 4px;
}
.jsteps div {
  font-size: 12.5px;
  color: var(--muted);
  display: grid;
  gap: 6px;
}
.jsteps i {
  display: block;
  height: 4px;
  border-radius: 2px;
  background: var(--track);
}
.jsteps .on {
  color: var(--ink);
}
.jsteps .on i {
  background: var(--ink);
}
body.board-mode {
  background: #000000;
}
body.board-mode::before {
  background: #000000;
}
body.board-mode .top {
  display: none !important;
}
body.board-mode .wrap {
  max-width: none;
  padding: 0;
}
.board {
  min-height: 100vh;
  min-height: 100dvh;
  background: #000000;
  color: #f5f5f7;
  color-scheme: dark;
  display: flex;
  flex-direction: column;
  gap: clamp(18px, 2.4vw, 30px);
  padding-block: clamp(20px, 3vw, 44px);
  padding-left: max(clamp(20px, 3vw, 44px), env(safe-area-inset-left, 0px));
  padding-right: max(clamp(20px, 3vw, 44px), env(safe-area-inset-right, 0px));
}
.bd-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.bd-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.bd-brand svg {
  width: clamp(40px, 3.6vw, 56px);
  height: auto;
}
.bd-brand b {
  display: block;
  font: 700 clamp(20px, 2vw, 28px) / 1.1 var(--sans);
  letter-spacing: -0.03em;
}
.bd-brand small {
  display: block;
  font-size: clamp(13px, 1.2vw, 17px);
  color: #8e8e93;
}
.bd-clock {
  text-align: right;
}
.bd-clock b {
  display: block;
  font: 700 clamp(30px, 3.6vw, 54px) / 1 var(--sans);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.bd-clock small {
  font-size: clamp(13px, 1.2vw, 17px);
  color: #8e8e93;
}
.bd-cols {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(14px, 1.6vw, 22px);
  align-items: start;
}
.bd-col {
  background: #111113;
  border-radius: 28px;
  padding: clamp(18px, 1.8vw, 26px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.bd-col h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 600 clamp(17px, 1.6vw, 23px) var(--sans);
  color: #a1a1a6;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.bd-col.ready h2 {
  color: #f5f5f7;
}
.bd-col h2 em {
  font-style: normal;
  margin-left: auto;
  background: #2c2c2e;
  color: #f5f5f7;
  border-radius: 980px;
  padding: 2px 12px;
  font-size: 0.85em;
}
.bd-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #30d158;
  box-shadow: 0 0 0 6px rgba(48, 209, 88, 0.2);
  animation: pulse 1.8s ease-in-out infinite;
}
.bd-card {
  border-radius: 20px;
  background: #1c1c1e;
  padding: clamp(16px, 1.6vw, 22px);
  display: grid;
  gap: 6px;
  animation: bdin 0.8s var(--ease) backwards;
  animation-delay: calc(var(--i) * 90ms);
}
.bd-card.ready {
  background: linear-gradient(140deg, #0d2715, #163a20);
  box-shadow: inset 0 0 0 1px rgba(48, 209, 88, 0.35);
}
.bd-card.fresh {
  animation:
    bdin 0.8s var(--ease) backwards,
    bdglow 2.6s ease-in-out infinite;
}
.bd-team {
  font: 700 clamp(30px, 3.4vw, 54px) / 1 var(--sans);
  letter-spacing: -0.045em;
  color: #ffffff;
}
.bd-card b {
  font: 500 clamp(15px, 1.35vw, 20px) / 1.3 var(--sans);
  color: #d1d1d6;
  overflow-wrap: anywhere;
}
.bd-meta {
  font-size: clamp(13px, 1.05vw, 15px);
  color: #8e8e93;
}
.bd-bar {
  position: relative;
  height: 6px;
  border-radius: 3px;
  background: #2c2c2e;
  overflow: hidden;
  margin: 4px 0;
}
.bd-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  width: 40%;
  background: linear-gradient(90deg, transparent, #ff3b3b, transparent);
  animation: sweep 1.9s ease-in-out infinite;
}
.bd-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.bd-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 14px;
  align-items: center;
  background: #1c1c1e;
  border-radius: 16px;
  padding: 14px 16px;
  animation: bdin 0.8s var(--ease) backwards;
  animation-delay: calc(var(--i) * 70ms);
}
.bd-pos {
  grid-row: span 2;
  width: clamp(34px, 2.8vw, 44px);
  height: clamp(34px, 2.8vw, 44px);
  border-radius: 50%;
  background: #2c2c2e;
  display: grid;
  place-items: center;
  font: 700 clamp(15px, 1.4vw, 20px) var(--sans);
}
.bd-list b {
  font: 700 clamp(18px, 1.7vw, 26px) / 1.1 var(--sans);
  letter-spacing: -0.03em;
}
.bd-list span:not(.bd-pos) {
  color: #a1a1a6;
  font-size: clamp(13px, 1.1vw, 16px);
  overflow-wrap: anywhere;
}
.bd-empty {
  color: #6e6e73;
  font-size: clamp(14px, 1.2vw, 17px);
  padding: 10px 4px;
}
.bd-foot {
  text-align: center;
  color: #8e8e93;
  font-size: clamp(14px, 1.3vw, 19px);
}
.bd-exit {
  position: fixed;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: max(16px, env(safe-area-inset-bottom, 0px));
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 980px;
  padding: 9px 16px;
  background: rgba(255, 255, 255, 0.12);
  color: #f5f5f7;
  font: 500 14px var(--sans);
  opacity: 0.3;
  transition: opacity 0.3s;
}
.bd-exit:hover,
.bd-exit:focus-visible {
  opacity: 1;
}
.board.calm .bd-card,
.board.calm .bd-list li {
  animation: none;
}
.board.calm .bd-card.fresh {
  animation: bdglow 2.6s ease-in-out infinite;
}
@keyframes bdin {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}
@keyframes bdglow {
  50% {
    box-shadow:
      inset 0 0 0 1px rgba(48, 209, 88, 0.6),
      0 0 40px rgba(48, 209, 88, 0.28);
  }
}
@keyframes sweep {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(260%);
  }
}
@media (max-width: 900px) {
  .bd-cols {
    grid-template-columns: 1fr;
  }
  .bd-clock {
    text-align: left;
  }
}

.pform {
  display: grid;
  gap: 16px;
}
.pform .field {
  flex: none;
}
.field select {
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  padding: 0 12px;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  width: 100%;
}
.field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.money-in {
  display: flex;
  align-items: center;
  height: 56px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.money-in:focus-within {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.money-in span {
  padding-left: 16px;
  font: 600 24px var(--sans);
  color: var(--muted);
}
.money-in input {
  flex: 1;
  min-width: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: none;
  padding: 0 14px 0 4px;
  font: 700 26px var(--sans);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.money-in input:focus {
  outline: none;
}
.field .money-in input,
.field .money-in input:focus {
  height: 100%;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.fine.over {
  color: var(--warn);
  font-weight: 500;
}
.form-err {
  font-size: 14px;
  color: var(--accent);
}
.prow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 13px 0;
  border-top: 1px solid var(--line-2);
}
.prow:first-of-type {
  border-top: 0;
  padding-top: 2px;
}
.prow b {
  display: block;
  font-weight: 600;
  font-size: 15px;
  overflow-wrap: anywhere;
}
.prow .small {
  display: block;
  color: var(--muted);
}
.rm.armed {
  color: var(--on-accent);
  background: var(--accent);
  border-radius: 980px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
}
.staff-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13.5px;
  color: var(--muted);
  background: var(--surface-2);
  border-radius: 12px;
  padding: 12px 14px;
}
.staff-note .i {
  color: var(--ink);
  margin-top: 1px;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}
.kpi b {
  display: block;
  font: 700 46px/1 var(--sans);
  letter-spacing: -0.045em;
  margin-top: 12px;
  font-variant-numeric: tabular-nums;
}
.kpi > span {
  font-size: 13.5px;
  color: var(--muted);
}
.kpi.hot {
  background: var(--accent);
  color: var(--on-accent);
}
.kpi.hot .eyebrow,
.kpi.hot > span {
  color: inherit;
  opacity: 0.85;
}
.desk {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.side,
.main-col {
  display: grid;
  gap: 18px;
  min-width: 0;
}
.qrow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px 0;
  border-top: 1px solid var(--line-2);
}
.qlist .qrow:first-child {
  border-top: 0;
  padding-top: 2px;
}
.q-team {
  display: grid;
  gap: 1px;
  min-width: 0;
}
.q-team b {
  font-weight: 600;
}
.q-team span {
  font-size: 13px;
  color: var(--muted);
}
.q-team .order-id {
  font-size: 12.5px;
  color: var(--accent);
}
.q-items {
  font-size: 14px;
  color: var(--muted);
  min-width: 0;
}
.q-items b {
  color: var(--ink);
  font-weight: 600;
}
.q-items .tag {
  margin-left: 2px;
}
.q-note {
  display: block;
  margin-top: 4px;
  font-style: normal;
  color: var(--ink);
}
.q-act {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.q-total {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  margin-right: 4px;
}
.lowrow {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
}
.lowrow .line-art,
.rentrow .line-art {
  width: 46px;
  height: 46px;
  border-radius: 12px;
}
.rentrow .line-art {
  width: 52px;
  height: 52px;
}
.lowrow b {
  font-size: 14px;
  font-weight: 600;
  display: block;
  line-height: 1.3;
}
.meter {
  height: 6px;
  border-radius: 3px;
  background: var(--track);
  overflow: hidden;
  margin-top: 7px;
}
.meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  animation: grow 1.1s var(--ease) backwards;
}
.lowqty {
  font-size: 13px;
  font-weight: 600;
  color: var(--warn);
}
.recent {
  display: grid;
  gap: 10px;
}
.recent div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}
.recent span {
  color: var(--muted);
}
.teams {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
  gap: 18px;
}
.team {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.team .panel-head {
  margin-bottom: 0;
  flex-wrap: nowrap;
}
.team .panel-head > div:first-child {
  min-width: 0;
}
.left-big {
  text-align: right;
  font: 700 28px/1 var(--sans);
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.left-big small {
  display: block;
  font: 500 12px var(--sans);
  letter-spacing: 0;
  color: var(--muted);
  margin-top: 4px;
}
.stackbar {
  display: flex;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--track);
  gap: 2px;
}
.stackbar i {
  display: block;
  height: 100%;
  animation: grow 1.1s var(--ease) backwards;
}
.stack-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 13px;
  color: var(--muted);
}
.stack-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.team-foot {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid var(--line-2);
  font-size: 13.5px;
  color: var(--muted);
}
.insts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}
.inst-top {
  display: flex;
  align-items: center;
  gap: 14px;
}
.inst-av {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 600 18px var(--sans);
  background: var(--ink);
  color: var(--bg);
  flex: none;
}
.inst-top h2 {
  font-size: 21px;
}
.inst-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 18px 0;
}
.inst-stats div {
  background: var(--surface-2);
  border-radius: 14px;
  padding: 12px 14px;
}
.inst-stats b {
  display: block;
  font: 700 24px/1 var(--sans);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.inst-stats span {
  font-size: 12.5px;
  color: var(--muted);
}
.inst-teams {
  display: grid;
  gap: 6px;
}
.inst-team {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px auto;
  gap: 12px;
  align-items: center;
  font-size: 14.5px;
  border: 0;
  background: none;
  padding: 6px 0;
  text-align: left;
  color: inherit;
}
.inst-team:hover b {
  color: var(--accent);
}
.inst-team b {
  font-weight: 600;
  transition: color 0.2s;
}
.inst-team span {
  font-size: 13px;
  color: var(--muted);
  display: block;
}
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}
.crow {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--line-2);
}
.clist .crow:first-child {
  border-top: 0;
  padding-top: 2px;
}
.c-thumb {
  width: 84px;
  height: 62px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-2);
  border: 0;
  padding: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: transform 0.35s var(--ease);
}
.c-thumb:hover {
  transform: scale(1.05);
}
.c-thumb img,
.c-thumb svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.c-info {
  min-width: 0;
}
.c-info b {
  display: block;
  font-weight: 600;
}
.c-info span {
  font-size: 13px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.c-act {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.sw {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
  display: inline-block;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  color: var(--faint);
  border-top: 1px solid var(--line);
  margin-top: 56px;
  padding-top: 18px;
}
.toasts {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  z-index: 80;
  display: grid;
  gap: 8px;
  justify-items: center;
  pointer-events: none;
  width: max-content;
  max-width: calc(100vw - 32px);
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--toast-bg);
  color: var(--toast-ink);
  padding: 11px 18px;
  border-radius: 980px;
  font-size: 14.5px;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  animation: tin 0.5s var(--ease) both;
}
.toast .i {
  color: var(--ok);
}
.toast.err .i {
  color: var(--accent);
}
.toast.out {
  animation: tout 0.3s ease forwards;
}
@keyframes tin {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.96);
  }
}
@keyframes tout {
  to {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
}
.hud {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 90;
  width: 190px;
  height: 190px;
  margin: -95px 0 0 -95px;
  border-radius: 30px;
  background: var(--hud);
  -webkit-backdrop-filter: blur(24px) saturate(1.8);
  backdrop-filter: blur(24px) saturate(1.8);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  color: var(--ink);
  font: 600 16px var(--sans);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  animation: hudin 0.4s var(--ease) both;
  pointer-events: none;
}
.hud svg {
  width: 70px;
  height: 70px;
  fill: none;
  stroke: var(--ok);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.hud circle {
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
  animation: draw 0.55s ease 0.1s forwards;
}
.hud path {
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: draw 0.35s ease 0.55s forwards;
}
.hud.out {
  animation: hudout 0.35s ease forwards;
}
@keyframes hudin {
  from {
    opacity: 0;
    transform: scale(0.85);
  }
}
@keyframes hudout {
  to {
    opacity: 0;
    transform: scale(0.92);
  }
}
@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}
.ghost {
  position: fixed;
  z-index: 95;
  pointer-events: none;
  border-radius: 20px;
  overflow: hidden;
  background: var(--surface);
  display: grid;
  place-items: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}
.ghost svg {
  width: 90%;
}

@media (max-width: 1000px) {
  .dash {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .budget {
    grid-column: 1/-1;
    grid-row: auto;
  }
  .desk {
    grid-template-columns: 1fr;
  }
  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .profile {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 2px;
    z-index: 35;
    background: var(--nav);
    border-top: 1px solid var(--nav-line);
    -webkit-backdrop-filter: saturate(1.8) blur(20px);
    backdrop-filter: saturate(1.8) blur(20px);
    padding: 6px max(8px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px))
      max(8px, env(safe-area-inset-left, 0px));
  }
  .nav-btn {
    flex-direction: column;
    gap: 3px;
    font-size: 10.5px;
    padding: 4px 2px;
    justify-content: center;
    background: none !important;
  }
  .nav-btn .i {
    display: block;
    width: 24px;
    height: 24px;
  }
  .nav-btn[aria-current='page'] {
    color: var(--accent);
  }
  .nav-pill {
    display: none;
  }
  .nav-btn .i {
    transition: transform 0.35s var(--spring);
  }
  .nav-btn:active .i {
    transform: scale(0.84);
  }
  .nav-btn .badge {
    position: absolute;
    top: 0;
    left: calc(50% + 6px);
  }
  .top-right {
    margin-left: auto;
  }
  .wrap {
    padding-block: 34px 120px;
  }
  .tiles {
    grid-template-columns: 1fr;
  }
  .tile-cat {
    min-height: 300px;
  }
  .toasts {
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  }
}
@media (max-width: 640px) {
  .qrow {
    grid-template-columns: 1fr;
  }
  .q-act {
    justify-content: flex-start;
  }
  .crow {
    grid-template-columns: 64px minmax(0, 1fr);
  }
  .c-thumb {
    width: 64px;
    height: 48px;
  }
  .c-act {
    grid-column: 1/-1;
    justify-content: flex-start;
  }
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .inst-team {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .inst-team .meter {
    display: none;
  }
  .items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .item-art {
    padding: 12px;
  }
  .item-body {
    padding: 0 14px 16px;
  }
  .item-name {
    font-size: 15px;
  }
  .quick {
    right: 12px;
    bottom: 14px;
    width: 32px;
    height: 32px;
  }
}
@media (max-width: 440px) {
  .dash {
    grid-template-columns: 1fr;
  }
  .kpi b {
    font-size: 36px;
  }
  .brand span {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
.noscript {
  max-width: 480px;
  margin: 80px auto;
  padding: 0 22px;
  font-size: 17px;
  text-align: center;
}
