/* Order Reel — blank-slate order history (no lv-beads / a74-orders patterns) */
:root {
  --fo-ink: #0b1220;
  --fo-mute: #64748b;
  --fo-paper: #eef1f6;
  --fo-sheet: #fbfcfe;
  --fo-line: rgba(11, 18, 32, 0.12);
  --fo-blue: #2563eb;
  --fo-orange: #ea580c;
  --fo-green: #16a34a;
  --fo-red: #dc2626;
  --fo-display: "Sora", "Segoe UI", sans-serif;
  --fo-mono: "IBM Plex Mono", ui-monospace, monospace;
  --fo-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --fo-max: 1100px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body.fo-orders {
  margin: 0;
  min-height: 100vh;
  color: var(--fo-ink);
  font-family: var(--fo-display);
  background:
    radial-gradient(80% 45% at 100% 0%, rgba(37, 99, 235, 0.12), transparent 55%),
    radial-gradient(60% 40% at 0% 100%, rgba(234, 88, 12, 0.1), transparent 50%),
    linear-gradient(180deg, #e4e9f2 0%, var(--fo-paper) 45%, #e8edf5 100%);
  -webkit-font-smoothing: antialiased;
}

.a74-bare-main { min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }

.fo-shell {
  position: relative;
  z-index: 1;
  width: min(var(--fo-max), calc(100% - 1.5rem));
  margin: 0 auto;
  padding: 1rem 0 2.75rem;
}

.fo-grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.45;
  background-image:
    radial-gradient(rgba(11, 18, 32, 0.04) 0.6px, transparent 0.7px);
  background-size: 3px 3px;
  mask-image: radial-gradient(ellipse at 50% 20%, #000 10%, transparent 70%);
}

.fo-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.35rem;
  padding: 0.5rem 0.55rem 0.5rem 0.7rem;
  background: rgba(251, 252, 254, 0.9);
  border: 1px solid var(--fo-line);
  border-radius: 1rem;
  backdrop-filter: blur(10px);
}
.fo-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}
.fo-brand-mark {
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  border-radius: 0.55rem;
  background: var(--fo-ink);
  color: #fff;
  font-family: var(--fo-mono);
  font-size: 0.68rem;
  font-weight: 700;
}
.fo-brand-text strong {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.1;
}
.fo-brand-text em {
  display: block;
  font-style: normal;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fo-mute);
  font-weight: 700;
}
.fo-top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
}
.fo-top-nav a {
  padding: 0.45rem 0.75rem;
  border-radius: 0.65rem;
  font-size: 0.86rem;
  font-weight: 650;
  color: var(--fo-mute);
  transition: color 0.2s, background 0.2s, transform 0.2s var(--fo-ease);
}
.fo-top-nav a:hover {
  color: var(--fo-ink);
  background: rgba(11, 18, 32, 0.05);
  transform: translateY(-1px);
}
.fo-top-here {
  background: var(--fo-blue) !important;
  color: #fff !important;
}

.fo-mast {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1.35rem;
  animation: fo-rise 0.55s var(--fo-ease) both;
}
.fo-kicker {
  margin: 0 0 0.3rem;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 750;
  color: var(--fo-orange);
}
.fo-mast h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1;
}
.fo-lede {
  margin: 0.55rem 0 0;
  max-width: 36rem;
  color: var(--fo-mute);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.45;
}
.fo-meter {
  min-width: 7rem;
  padding: 0.9rem 1.05rem;
  text-align: center;
  background: var(--fo-sheet);
  border: 1px solid var(--fo-line);
  border-radius: 1.1rem;
  box-shadow: 0 14px 30px rgba(11, 18, 32, 0.06);
}
.fo-meter-label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--fo-mute);
}
.fo-meter strong {
  display: block;
  margin-top: 0.15rem;
  font-family: var(--fo-mono);
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--fo-blue);
  line-height: 1;
}

.fo-stage { animation: fo-rise 0.55s var(--fo-ease) 0.06s both; }

.fo-loading {
  margin: 0;
  padding: 1.25rem 1.1rem;
  background: var(--fo-sheet);
  border: 1px solid var(--fo-line);
  border-radius: 1rem;
  font-weight: 600;
  color: var(--fo-mute);
}

.fo-guest,
.fo-empty {
  padding: 2.4rem 1.4rem;
  text-align: center;
  background: var(--fo-sheet);
  border: 1px dashed var(--fo-line);
  border-radius: 1.25rem;
}
.fo-guest h2,
.fo-empty h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.fo-guest p,
.fo-empty p {
  margin: 0.5rem auto 1.15rem;
  max-width: 30rem;
  color: var(--fo-mute);
  font-weight: 500;
}
.fo-guest-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.fo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.65rem;
  padding: 0.5rem 1rem;
  border-radius: 0.7rem;
  font-size: 0.88rem;
  font-weight: 700;
  transition: transform 0.22s var(--fo-ease), background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.fo-btn:hover { transform: translateY(-2px); }
.fo-btn-hot {
  background: var(--fo-orange);
  color: #fff;
}
.fo-btn-ink {
  background: var(--fo-ink);
  color: #fff;
}
.fo-btn-ghost {
  border: 1.5px solid var(--fo-line);
  background: transparent;
  color: var(--fo-ink);
}
.fo-btn-ghost:hover { border-color: var(--fo-ink); }

.fo-reel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}
.fo-reel-head h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.fo-reel-head p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--fo-mute);
  font-weight: 500;
}

.fo-reel {
  display: grid;
  gap: 0.85rem;
}

/* Film frame — date + body + invoice stub */
.fo-frame {
  display: grid;
  grid-template-columns: 1.1rem minmax(4.8rem, 5.6rem) minmax(0, 1fr) minmax(9.5rem, 11.5rem);
  gap: 0;
  background: var(--fo-sheet);
  border: 1px solid var(--fo-line);
  border-radius: 1.15rem;
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(11, 18, 32, 0.05);
  animation: fo-rise 0.5s var(--fo-ease) both;
  animation-delay: calc(var(--fo-i, 0) * 0.05s);
  transition: transform 0.28s var(--fo-ease), box-shadow 0.28s;
}
.fo-frame:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 44px rgba(11, 18, 32, 0.1);
}

.fo-sprocket {
  display: grid;
  align-content: space-evenly;
  justify-items: center;
  padding: 0.55rem 0;
  background: var(--fo-ink);
}
.fo-sprocket i {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.15);
}

.fo-date {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0.1rem;
  padding: 1rem 0.55rem;
  background: linear-gradient(180deg, #f1f5fb, #e8eef8);
  border-right: 1px solid var(--fo-line);
  text-align: center;
}
.fo-date-day {
  font-family: var(--fo-mono);
  font-size: clamp(1.8rem, 3.5vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--fo-ink);
}
.fo-date-mon {
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fo-blue);
}
.fo-date-yr {
  font-family: var(--fo-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--fo-mute);
}

.fo-frame-body {
  padding: 1rem 1.1rem 1.1rem;
  min-width: 0;
}
.fo-frame-head {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  margin-bottom: 0.55rem;
}
.fo-frame-idx {
  font-family: var(--fo-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--fo-mute);
}
.fo-frame-id {
  margin: 0;
  font-family: var(--fo-mono);
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  word-break: break-word;
}

.fo-signal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.85rem;
  margin-bottom: 0.75rem;
}
.fo-signal-label {
  display: inline-flex;
  align-items: center;
  min-height: 1.7rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--fo-blue);
  font-size: 0.78rem;
  font-weight: 750;
}
.fo-frame.tone-delivered .fo-signal-label {
  background: rgba(22, 163, 74, 0.12);
  color: var(--fo-green);
}
.fo-frame.tone-shipped .fo-signal-label {
  background: rgba(37, 99, 235, 0.12);
  color: var(--fo-blue);
}
.fo-frame.tone-packed .fo-signal-label {
  background: rgba(234, 88, 12, 0.12);
  color: var(--fo-orange);
}
.fo-frame.tone-cancelled .fo-signal-label {
  background: rgba(220, 38, 38, 0.12);
  color: var(--fo-red);
}
.fo-signal-pips {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
}
.fo-pip {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: rgba(11, 18, 32, 0.12);
  transition: background 0.25s, box-shadow 0.25s, transform 0.25s;
}
.fo-pip.is-done { background: var(--fo-green); }
.fo-pip.is-live {
  background: var(--fo-orange);
  box-shadow: 0 0 0 4px rgba(234, 88, 12, 0.2);
  animation: fo-ping 1.6s ease-out infinite;
}
.fo-pip.is-off { background: rgba(220, 38, 38, 0.35); }

.fo-frame-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  margin: 0 0 0.55rem;
}
.fo-frame-meta > div {
  padding: 0.5rem 0.6rem;
  border-radius: 0.65rem;
  background: rgba(37, 99, 235, 0.05);
  border: 1px solid rgba(37, 99, 235, 0.1);
}
.fo-frame-meta dt {
  margin: 0;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 750;
  color: var(--fo-mute);
}
.fo-frame-meta dd {
  margin: 0.15rem 0 0;
  font-family: var(--fo-mono);
  font-size: 0.95rem;
  font-weight: 700;
}
.fo-frame-items {
  margin: 0;
  font-size: 0.86rem;
  color: var(--fo-mute);
  font-weight: 500;
  line-height: 1.4;
}

/* Tear-off invoice stub */
.fo-stub {
  position: relative;
  display: grid;
  align-content: center;
  gap: 0.4rem;
  padding: 1rem 0.9rem 1.05rem 1.1rem;
  background: linear-gradient(160deg, #111827, #1e293b);
  color: #fff;
}
.fo-stub-cut {
  position: absolute;
  left: 0;
  top: 0.55rem;
  bottom: 0.55rem;
  width: 0;
  border-left: 2px dashed rgba(255, 255, 255, 0.28);
}
.fo-stub-kicker {
  margin: 0;
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 750;
  color: rgba(255, 255, 255, 0.5);
}
.fo-stub-total {
  font-family: var(--fo-mono);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fbbf24;
}
.fo-stub .fo-btn {
  width: 100%;
  min-height: 2.35rem;
  font-size: 0.8rem;
}
.fo-stub .fo-btn-ghost {
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}
.fo-stub .fo-btn-ghost:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.fo-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.1rem;
  justify-content: center;
  margin-top: 1.85rem;
  padding-top: 1rem;
  font-size: 0.88rem;
  font-weight: 650;
  color: var(--fo-mute);
}
.fo-foot a:hover { color: var(--fo-orange); }

@keyframes fo-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes fo-ping {
  0% { box-shadow: 0 0 0 0 rgba(234, 88, 12, 0.35); }
  100% { box-shadow: 0 0 0 10px rgba(234, 88, 12, 0); }
}

@media (max-width: 860px) {
  .fo-frame {
    grid-template-columns: 1rem minmax(4.5rem, 5.2rem) minmax(0, 1fr);
  }
  .fo-stub {
    grid-column: 1 / -1;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 0.55rem 0.75rem;
    padding-left: 1.25rem;
  }
  .fo-stub-cut {
    top: 0;
    bottom: 0;
    left: 0.55rem;
    width: auto;
    height: 0;
    border-left: 0;
    border-top: 2px dashed rgba(255, 255, 255, 0.28);
    right: 0.55rem;
  }
  .fo-stub-kicker { grid-column: 1 / -1; }
  .fo-stub-total { justify-self: start; }
  .fo-stub .fo-btn { width: auto; }
}

@media (max-width: 560px) {
  .fo-shell { width: calc(100% - 1rem); }
  .fo-mast { grid-template-columns: 1fr; }
  .fo-meter { justify-self: start; }
  .fo-frame {
    grid-template-columns: 0.9rem minmax(0, 1fr);
  }
  .fo-date {
    grid-column: 2;
    grid-template-columns: auto auto auto;
    justify-content: start;
    gap: 0.45rem;
    padding: 0.75rem 0.9rem;
    border-right: 0;
    border-bottom: 1px solid var(--fo-line);
    text-align: left;
  }
  .fo-date-day { font-size: 1.6rem; }
  .fo-frame-body { grid-column: 2; }
  .fo-frame-meta { grid-template-columns: 1fr; }
  .fo-stub {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .fo-stub .fo-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
