:root {
  --ink: #100e0c;
  --ink-soft: #1a1510;
  --paper: #f3ebe1;
  --paper-dim: #cfc3b4;
  --amber: #e8a23a;
  --amber-deep: #d4841f;
  --mist: rgba(243, 235, 225, 0.72);
  --line: rgba(243, 235, 225, 0.12);
  --surface: rgba(243, 235, 225, 0.04);
  --surface-2: rgba(243, 235, 225, 0.07);
  --font-display: "Bricolage Grotesque", Georgia, serif;
  --font-body: "Literata", Georgia, serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --x: max(1.15rem, env(safe-area-inset-left));
  --xr: max(1.15rem, env(safe-area-inset-right));
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-body);
  color: var(--paper);
  background: var(--ink);
  min-height: 100svh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
img { max-width: 100%; display: block; }

/* Atmosphere */
.atm {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 45% at 20% -5%, rgba(232, 162, 58, 0.2), transparent 55%),
    radial-gradient(ellipse 50% 35% at 95% 20%, rgba(180, 110, 40, 0.1), transparent 50%),
    linear-gradient(180deg, #17120e 0%, var(--ink) 50%, #0b0908 100%);
}

.atm-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
  animation: drift 16s var(--ease) infinite alternate;
}

.atm-glow--a {
  width: min(50vw, 380px);
  height: min(50vw, 380px);
  top: -6%;
  left: 12%;
  background: rgba(232, 162, 58, 0.3);
}

.atm-glow--b {
  width: min(36vw, 280px);
  height: min(36vw, 280px);
  top: 40%;
  right: -4%;
  background: rgba(160, 95, 35, 0.18);
  animation-delay: -6s;
}

.atm-grain {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px;
}

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(3%, 5%) scale(1.06); }
}

/* Header — brand only, no menu */
.top {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.6rem;
  padding: 0.75rem var(--xr) 0.75rem var(--x);
}

.brand {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.22em;
  font-size: 0.95rem;
}

.top-right {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.top-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--paper-dim);
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-link,
.top-staff {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--amber);
}

.top-right .top-link[data-go="referrals"] {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(232, 162, 58, 0.14);
  box-shadow: inset 0 0 0 1px rgba(232, 162, 58, 0.35);
}

.top-staff[hidden],
.top-right[hidden] { display: none !important; }

/* Stage */
.stage {
  position: relative;
  z-index: 1;
  width: min(100% - 2 * 1.15rem, 1080px);
  margin: 0 auto;
  padding: 0.5rem 0 3.5rem;
}

.panel[hidden] { display: none !important; }

.panel:not([hidden]) {
  animation: rise 0.45s var(--ease) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* Type */
.eyebrow,
.brand-mark {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.65rem;
}

.brand-mark {
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.24em;
}

h1, h2 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

h1 { font-size: clamp(2rem, 6vw, 3.2rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.7rem); margin-bottom: 0.35rem; }

.lede, .lead { color: var(--mist); max-width: 28rem; margin-top: 0.55rem; }
.muted { color: var(--mist); }

.page-head {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  justify-content: space-between;
  margin: 0.5rem 0 1.5rem;
}

.back {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--amber);
  margin-bottom: 0.75rem;
  transition: opacity 0.2s ease;
}

.back:hover { opacity: 0.8; }

.text-link {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--amber);
  justify-self: start;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700;
  background: linear-gradient(135deg, #f0b04a, var(--amber-deep));
  color: var(--ink);
  transition: transform 0.3s var(--ease), filter 0.25s ease;
  box-shadow: 0 12px 32px rgba(212, 132, 31, 0.22);
}

.btn:hover { transform: translateY(-1px); filter: brightness(1.04); }

.btn-ghost {
  background: transparent;
  color: var(--paper);
  box-shadow: none;
  border: 1px solid var(--line);
}

.btn-ghost:hover { background: var(--surface); filter: none; }

.btn-sm {
  min-height: 2.3rem;
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  box-shadow: none;
}

.btn-block { width: 100%; }

.btn-danger {
  background: transparent;
  border: 1px solid rgba(220, 120, 100, 0.5);
  color: #f0b8a8;
  box-shadow: none;
}

.btn-tg {
  width: 100%;
  background: #2aabee;
  color: #fff;
  margin-bottom: 0.75rem;
  box-shadow: 0 10px 28px rgba(42, 171, 238, 0.22);
}

.btn-tg:disabled { opacity: 0.65; cursor: wait; }

/* Forms */
.stack { display: grid; gap: 0.95rem; }
.form-narrow { max-width: 34rem; }

.stack label,
.stack fieldset { display: grid; gap: 0.4rem; }

.stack label span,
.stack legend {
  font-family: var(--font-display);
  font-size: 0.74rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--paper-dim);
}

.stack input,
.stack select,
.stack textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.75rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.stack textarea { min-height: 5.5rem; resize: vertical; }

.stack input:focus,
.stack select:focus,
.stack textarea:focus {
  border-color: rgba(232, 162, 58, 0.7);
  background: var(--surface-2);
}

.file-field { position: relative; }
.file-field input[type="file"] {
  position: absolute;
  inset: 1.55rem 0 0;
  opacity: 0;
  cursor: pointer;
}

.file-field em {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 4.25rem;
  padding: 0.9rem 1.1rem;
  border-radius: 16px;
  border: 1px dashed rgba(232, 162, 58, 0.4);
  font-style: normal;
  color: var(--mist);
  background: rgba(232, 162, 58, 0.04);
}

.file-field em i {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 10px;
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(240, 176, 74, 0.35), rgba(212, 132, 31, 0.15));
  position: relative;
}

.file-field em i::before,
.file-field em i::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: var(--amber);
  border-radius: 1px;
  transform: translate(-50%, -50%);
}

.file-field em i::before { width: 1rem; height: 2px; }
.file-field em i::after { width: 2px; height: 1rem; }

.pay-methods {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem;
  gap: 0.55rem;
  background: var(--surface);
}

.radio {
  display: flex !important;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  cursor: pointer;
}

.radio:has(input:checked) {
  background: rgba(232, 162, 58, 0.14);
  box-shadow: inset 0 0 0 1px rgba(232, 162, 58, 0.35);
}

.radio input { width: auto; min-height: auto; margin-top: 0.25rem; accent-color: var(--amber); }

.radio span {
  display: grid !important;
  gap: 0.15rem;
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-size: 1rem !important;
  color: var(--paper) !important;
}

.radio small {
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--mist);
  font-weight: 400;
}

/* Auth */
.panel-auth { width: min(100%, 1100px); margin: 0 auto; }

.auth {
  display: grid;
  gap: 1.75rem;
}

.auth-story { min-width: 0; }

.auth-title {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  margin-bottom: 0.75rem;
}

.auth-shot {
  margin-top: 1.5rem;
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
}

.auth-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-side {
  padding: 1.5rem 1.35rem;
  border-radius: 22px;
  background: rgba(16, 14, 12, 0.55);
  box-shadow: inset 0 0 0 1px var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.auth-side .lead { margin-bottom: 1.1rem; }

.divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
  margin: 0.35rem 0 1rem;
  color: var(--paper-dim);
  font-size: 0.78rem;
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  background: var(--line);
}

.tg-status { margin: -0.25rem 0 0.85rem; font-size: 0.9rem; }

.switch { margin-top: 1.1rem; color: var(--mist); font-size: 0.95rem; }
.switch button {
  color: var(--amber);
  font-family: var(--font-display);
  font-weight: 700;
}

.demo { margin-top: 1.15rem; font-size: 0.86rem; text-align: center; }

/* Home */
.home-hero {
  display: grid;
  gap: 1.5rem;
  align-items: end;
  padding-bottom: 1.75rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.home-copy h1 { margin-top: 0.15rem; }

.home-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.35rem;
}

.home-visual {
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 16 / 11;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

.home-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 8s var(--ease);
}

.home-visual:hover img { transform: scale(1.06); }

.home-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.ref-entry {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding: 1.4rem 1.35rem;
  border-radius: 22px;
  background:
    radial-gradient(ellipse at 100% 0%, rgba(232, 162, 58, 0.22), transparent 55%),
    var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

.ref-entry-copy {
  min-width: min(100%, 18rem);
  flex: 1;
}

.ref-entry h2 {
  margin-bottom: 0.4rem;
}

.ref-entry .muted {
  max-width: 28rem;
}

.ref-entry .btn {
  flex-shrink: 0;
}

.strip-item {
  display: grid;
  gap: 0.25rem;
  padding: 1.1rem 1.15rem;
  border-radius: 18px;
  background:
    radial-gradient(ellipse at 0% 0%, rgba(232, 162, 58, 0.16), transparent 55%),
    var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

.strip-item span {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper-dim);
}

.strip-item strong {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 4vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--amber);
  line-height: 1.1;
}

.home-block { margin-top: 0.25rem; }

.block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

/* New order flow */
.order-head {
  align-items: flex-end;
}

.order-total {
  font-family: var(--font-display);
  font-size: 1rem;
}

.order-total strong {
  color: var(--amber);
  font-size: 1.25rem;
}

.order-flow {
  display: grid;
  gap: 1.5rem;
  max-width: 44rem;
}

.order-step {
  display: grid;
  gap: 0.85rem;
}

.ship-note {
  padding: 1rem 1.1rem 1.05rem;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(232, 162, 58, 0.1), transparent 55%),
    rgba(255, 244, 220, 0.035);
  box-shadow: inset 0 0 0 1px rgba(240, 176, 74, 0.28);
}

.ship-note-lead {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
  color: #f6e7c8;
}

.ship-note-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.4rem;
  color: var(--mist);
  font-size: 0.92rem;
  line-height: 1.45;
}

.ship-note-list li {
  position: relative;
  padding-left: 0.95rem;
}

.ship-note-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 8px rgba(232, 162, 58, 0.45);
}

.ship-note-list strong {
  color: var(--paper);
  font-weight: 600;
}

.field-caption {
  display: block;
  margin-bottom: 0.4rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--mist);
}

.ship-pay-hint {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.4;
}

.step-label {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.step-label span {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  color: var(--ink);
  background: linear-gradient(135deg, #f0b04a, var(--amber-deep));
}

.size-builder {
  display: grid;
  gap: 0.9rem;
}

.size-builder-stage {
  border-radius: 18px;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(232, 162, 58, 0.14), transparent 55%),
    linear-gradient(160deg, #1a1510, #0e0c0a 70%);
  box-shadow: inset 0 0 0 1px var(--line);
  min-height: 220px;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  overflow: hidden;
}

.size-builder-plaque {
  --cm: 4;
  position: relative;
  width: calc(64px + (var(--cm) - 3) * 12px);
  max-width: min(100%, 220px);
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  background: #0c0a08;
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 230, 180, 0.18),
    0 0 20px rgba(232, 162, 58, 0.22);
  transition: width 0.18s var(--ease);
}

.size-builder-plaque img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.size-builder-tag {
  position: absolute;
  left: 50%;
  bottom: 8%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  color: #14110e;
  background: rgba(240, 176, 74, 0.92);
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  white-space: nowrap;
  pointer-events: none;
}

.size-builder-controls {
  display: grid;
  gap: 0.75rem;
}

.size-builder-readout {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.size-builder-readout strong {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
}

.size-builder-controls input[type="range"] {
  width: 100%;
  accent-color: var(--amber);
}

.size-builder-controls input[type="number"] {
  width: 100%;
  min-height: 2.75rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--paper);
  padding: 0.55rem 0.8rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
}

.size-builder-hint {
  font-size: 0.85rem;
}

.photo-drop {
  position: relative;
  display: block;
  cursor: pointer;
}

.photo-drop input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.photo-drop-ui {
  min-height: 11rem;
  border-radius: 18px;
  border: 1px dashed rgba(232, 162, 58, 0.45);
  background: rgba(232, 162, 58, 0.04);
  display: grid;
  place-items: center;
  padding: 1.25rem;
  overflow: hidden;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.photo-drop:hover .photo-drop-ui {
  border-color: rgba(232, 162, 58, 0.7);
  background: rgba(232, 162, 58, 0.07);
}

.photo-drop-idle {
  display: grid;
  justify-items: center;
  gap: 0.4rem;
  text-align: center;
}

.photo-drop-idle i {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 12px;
  margin-bottom: 0.25rem;
  background: linear-gradient(135deg, rgba(240, 176, 74, 0.35), rgba(212, 132, 31, 0.15));
  position: relative;
}

.photo-drop-idle i::before,
.photo-drop-idle i::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: var(--amber);
  border-radius: 1px;
  transform: translate(-50%, -50%);
}

.photo-drop-idle i::before { width: 1.05rem; height: 2px; }
.photo-drop-idle i::after { width: 2px; height: 1.05rem; }

.photo-drop-idle strong {
  font-family: var(--font-display);
  font-weight: 700;
}

.photo-drop-idle em {
  font-style: normal;
  color: var(--mist);
  font-size: 0.9rem;
}

.photo-preview {
  width: min(100%, 220px);
  max-height: 220px;
  object-fit: cover;
  border-radius: 12px;
}

.photo-name {
  margin-top: 0.65rem;
  font-size: 0.88rem;
  text-align: center;
}

.pay-pick {
  display: grid;
  gap: 0.65rem;
}

.pay-pick-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.pay-pick-item:has(input:checked) {
  background: rgba(232, 162, 58, 0.12);
  box-shadow: inset 0 0 0 1.5px rgba(232, 162, 58, 0.55);
}

.pay-pick-item input {
  margin-top: 0.2rem;
  accent-color: var(--amber);
}

.pay-pick-item span {
  display: grid;
  gap: 0.15rem;
}

.pay-pick-item strong {
  font-family: var(--font-display);
  font-weight: 700;
}

.pay-pick-item small {
  color: var(--mist);
  font-size: 0.9rem;
}

.ship-fields {
  display: grid;
  gap: 0.85rem;
}

.stack-solo input[type="text"],
.stack-solo input[type="tel"],
.stack-solo textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--paper);
  outline: none;
  font: inherit;
}

.stack-solo input[type="text"],
.stack-solo input[type="tel"] {
  min-height: 2.85rem;
}

.stack-solo textarea {
  min-height: 5.5rem;
  resize: vertical;
}

.stack-solo input[type="text"]:focus,
.stack-solo input[type="tel"]:focus,
.stack-solo textarea:focus {
  border-color: rgba(232, 162, 58, 0.7);
  background: var(--surface-2);
}

/* Orders */
.order-list,
.list { display: grid; gap: 0.65rem; }

.card {
  position: relative;
  padding: 1.05rem 1.1rem 1.05rem 1.25rem;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  display: grid;
  gap: 0.5rem;
  overflow: hidden;
  transition: background 0.25s ease;
}

.card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85rem;
  bottom: 0.85rem;
  width: 3px;
  border-radius: 3px;
  background: rgba(243, 235, 225, 0.18);
}

.card:hover { background: var(--surface-2); }

.card.paid::before,
.card.done::before,
.card.approved::before,
.card.in_production::before,
.card.shipped::before { background: #8fcf7a; }

.card.payment_review::before,
.card.pending::before,
.card.pending_payment::before { background: var(--amber); }

.card.cancelled::before,
.card.rejected::before { background: #e09a88; }

.card-top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: baseline;
}

.card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.badge {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  background: rgba(243, 235, 225, 0.06);
  color: var(--paper-dim);
  white-space: nowrap;
}

.badge.paid, .badge.done, .badge.approved, .badge.in_production, .badge.shipped {
  color: #b8e0a8;
  background: rgba(184, 224, 168, 0.1);
}

.badge.payment_review, .badge.pending, .badge.pending_payment {
  color: #f0c06a;
  background: rgba(232, 162, 58, 0.12);
}

.badge.cancelled, .badge.rejected {
  color: #f0b8a8;
  background: rgba(240, 184, 168, 0.1);
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.2rem;
}

.empty {
  color: var(--mist);
  padding: 1.4rem 1.1rem;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  text-align: center;
}

/* Pay / ref / withdraw */
.pay-box { display: grid; gap: 1rem; }

.pay-card,
.ref-hero {
  border-radius: 20px;
  padding: 1.35rem 1.25rem;
  background:
    radial-gradient(ellipse at 100% 0%, rgba(232, 162, 58, 0.18), transparent 55%),
    var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  display: grid;
  gap: 0.85rem;
}

.pay-card img.qr {
  width: min(100%, 240px);
  border-radius: 14px;
  background: var(--paper);
  padding: 0.65rem;
  justify-self: start;
}

.copy-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.copy-row code {
  flex: 1;
  min-width: 0;
  word-break: break-all;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  font-size: 0.85rem;
}

.ref-code {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  letter-spacing: 0.14em;
  color: var(--amber);
  font-weight: 800;
}

.ref-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.ref-stat {
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.ref-stat span {
  display: block;
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--paper-dim);
}

.ref-stat strong {
  font-family: var(--font-display);
  font-size: 1.25rem;
  display: block;
  margin-top: 0.2rem;
}

.withdraw-amount {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  font-weight: 800;
  color: var(--amber);
  letter-spacing: -0.02em;
  line-height: 1;
}

.block-gap { margin-top: 1.35rem; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1.1rem;
  padding: 0.3rem;
  border-radius: 14px;
  background: var(--surface);
  width: fit-content;
  max-width: 100%;
  box-shadow: inset 0 0 0 1px var(--line);
}

.tabs-sub {
  margin-top: -0.45rem;
}

.tab {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.55rem 1rem;
  border-radius: 10px;
  color: var(--paper-dim);
}

.tab.is-active {
  background: linear-gradient(135deg, #f0b04a, var(--amber-deep));
  color: var(--ink);
}

.staff-overview {
  display: grid;
  gap: 1.25rem;
}

.kpi-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr 1fr;
}

.kpi-card {
  padding: 1rem 1.05rem;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  display: grid;
  gap: 0.28rem;
}

.kpi-card span,
.kpi-card em {
  font-size: 0.82rem;
  color: var(--mist);
  font-style: normal;
}

.kpi-card strong {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.pipeline h2 {
  margin-bottom: 0.75rem;
}

.pipeline-list {
  display: grid;
  gap: 0.55rem;
}

.pipeline-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.75rem;
  align-items: baseline;
  width: 100%;
  text-align: left;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  color: inherit;
  font: inherit;
}

.pipeline-item span {
  font-family: var(--font-display);
  font-weight: 700;
}

.pipeline-item strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.pipeline-item em {
  font-style: normal;
  color: var(--mist);
  font-size: 0.9rem;
}

@media (min-width: 900px) {
  .kpi-grid,
  .kpi-grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

.staff-filters {
  display: grid;
  gap: 0.75rem;
  margin: 0 0 1.1rem;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

.staff-filters[hidden] {
  display: none !important;
}

.staff-filter-field {
  display: grid;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: var(--paper-dim);
}

.staff-filter-field select {
  width: 100%;
  min-height: 2.6rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.22);
  color: var(--paper);
  padding: 0.45rem 0.75rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
}

.staff-filter-count {
  font-size: 0.85rem;
  margin: 0;
}

@media (min-width: 720px) {
  .staff-filters {
    grid-template-columns: 1fr 1fr auto;
    align-items: end;
  }

  .staff-filter-count {
    justify-self: end;
    padding-bottom: 0.55rem;
  }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(1.25rem + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 50;
  max-width: min(92vw, 420px);
  padding: 0.9rem 1.15rem;
  border-radius: 14px;
  background: #2a241f;
  box-shadow:
    inset 0 0 0 1px rgba(232, 162, 58, 0.4),
    0 16px 48px rgba(0, 0, 0, 0.45);
  font-size: 0.95rem;
  animation: toast-in 0.35s var(--ease);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@media (min-width: 880px) {
  .stage { padding-top: 1rem; }

  .auth {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 2.25rem;
    align-items: stretch;
    min-height: calc(100svh - 6rem);
  }

  .auth-side {
    padding: 2rem 1.85rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .auth-story {
    display: flex;
    flex-direction: column;
  }

  .auth-shot { margin-top: auto; }

  .home-hero {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 2rem;
    padding-bottom: 2rem;
  }

  .home-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
  }

  .home-visual { aspect-ratio: 5 / 4; }

  .size-builder {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: stretch;
    gap: 1rem;
  }

  .size-builder-stage {
    min-height: 260px;
  }

  .size-builder-plaque {
    width: calc(80px + (var(--cm) - 3) * 14px);
  }

  .pay-pick {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  .top-name { display: none; }
}

.product-admin-list {
  display: grid;
  gap: 1.1rem;
}

.product-admin-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1rem;
  padding: 1rem;
  border-radius: 18px;
  background: rgba(255, 248, 238, 0.04);
  box-shadow: inset 0 0 0 1px rgba(255, 232, 204, 0.12);
}

.product-admin-media {
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 1;
  background: #1c1814;
}

.product-admin-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-admin-form {
  display: grid;
  gap: 0.65rem;
}

.product-admin-form label {
  display: grid;
  gap: 0.28rem;
  font-size: 0.82rem;
  color: var(--paper-dim);
}

.product-admin-form input[type="text"],
.product-admin-form input[type="number"] {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
  background: rgba(255, 248, 238, 0.06);
  color: var(--paper);
  box-shadow: inset 0 0 0 1px rgba(255, 232, 204, 0.14);
}

.product-admin-form .check-field {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  grid-template-columns: none;
}

.product-admin-form .file-field input {
  font-size: 0.8rem;
}

@media (max-width: 720px) {
  .product-admin-card {
    grid-template-columns: 1fr;
  }
}

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