:root {
  --cloud: #f0ede8;
  --teal: #0a6b6e;
  --lava: #c73e3a;
  --brass: #d4a84b;
  --ink: #0a0a0a;
  --stone: #f5f7f6;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Outfit", system-ui, sans-serif;
  background: linear-gradient(180deg, #101616, #0a0a0a 40%, #122223);
  color: var(--cloud);
  min-height: 100vh;
}
h1 { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 600; color: var(--brass); }
header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 4vw; border-bottom: 1px solid rgba(212,168,75,.25);
  background: rgba(0,0,0,.35); backdrop-filter: blur(10px); position: sticky; top: 0;
}
header img { height: 48px; }
header div { display: flex; gap: 1rem; align-items: center; }
button {
  background: var(--lava); color: white; border: 0; border-radius: 999px;
  padding: .55rem 1rem; font: 500 .9rem "Outfit", sans-serif; cursor: pointer;
}
main { padding: 2rem 4vw 4rem; display: grid; gap: 2rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; }
.stat {
  background: rgba(10,107,110,.18); border: 1px solid rgba(10,107,110,.35);
  padding: 1.1rem; border-radius: 4px;
}
.stat span { display: block; color: #9bb; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.stat strong { font-size: 1.8rem; font-family: "Cormorant Garamond", serif; color: var(--cloud); }
.table-wrap { overflow: auto; border: 1px solid rgba(240,237,232,.12); border-radius: 4px; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: .75rem .9rem; text-align: left; border-bottom: 1px solid rgba(240,237,232,.08); }
th { color: var(--brass); font-weight: 500; background: rgba(255,255,255,.03); }
select {
  background: #1b2424; color: var(--cloud); border: 1px solid rgba(212,168,75,.35);
  border-radius: 4px; padding: .35rem .5rem; font: inherit;
}
.gate {
  min-height: 70vh; display: grid; place-items: center; text-align: center; gap: 1rem;
}
.section-lead {
  color: #9bb;
  margin: -0.5rem 0 1.2rem;
  font-size: 0.92rem;
}
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}
.product-card {
  display: grid;
  grid-template-rows: auto 1fr;
  border: 1px solid rgba(212, 168, 75, 0.22);
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}
.product-preview {
  aspect-ratio: 4 / 3;
  background: #151a1a;
  overflow: hidden;
}
.product-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.no-img {
  height: 100%;
  display: grid;
  place-items: center;
  color: #778;
  font-size: 0.85rem;
}
.product-form {
  display: grid;
  gap: 0.65rem;
  padding: 0.9rem;
}
.product-form label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.78rem;
  color: #9bb;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.product-form input,
.product-form textarea,
.product-form select {
  font: 500 0.92rem "Syne", system-ui, sans-serif;
  color: var(--cloud);
  background: #1b2424;
  border: 1px solid rgba(212, 168, 75, 0.28);
  border-radius: 2px;
  padding: 0.45rem 0.55rem;
  width: 100%;
  text-transform: none;
  letter-spacing: 0;
}
.product-form textarea { resize: vertical; }
.product-form .row.head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--brass);
  font-size: 0.85rem;
}
.active-toggle {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 0.4rem;
  text-transform: none;
  color: var(--cloud) !important;
  font-size: 0.85rem !important;
}
.active-toggle input { width: auto; }
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}
.actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.25rem;
}
.actions .hint { font-size: 0.8rem; color: #8aa; }
.toast {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  padding: 0.75rem 1rem;
  background: var(--teal);
  color: white;
  font: 600 0.88rem "Syne", sans-serif;
  z-index: 50;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}
.toast.err { background: var(--lava); }
.btn-seed {
  margin-left: 0.75rem;
  background: var(--teal);
  border-radius: 2px;
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
}
.product-preview { position: relative; }
.source-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background: rgba(10, 107, 110, 0.9);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.45rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.img-source {
  border: 1px solid rgba(212, 168, 75, 0.25);
  padding: 0.65rem;
  margin: 0;
  display: grid;
  gap: 0.45rem;
}
.img-source legend {
  color: var(--brass);
  font-size: 0.78rem;
  padding: 0 0.35rem;
}
.img-source .radio {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 0.45rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--cloud) !important;
  font-size: 0.88rem !important;
}
.img-source .radio input { width: auto; }
.tiny {
  margin: 0.2rem 0 0;
  font-size: 0.72rem;
  color: #7a8;
  text-transform: none;
  letter-spacing: 0;
}
.tiny code { color: var(--brass); }
.btn-mini {
  background: rgba(10, 107, 110, 0.35);
  border: 1px solid rgba(212, 168, 75, 0.35);
  color: #f0ede8;
  padding: 0.35rem 0.55rem;
  font: 600 0.72rem "Syne", sans-serif;
  cursor: pointer;
}
.sent-tag {
  display: inline-block;
  margin-left: 0.35rem;
  font-size: 0.7rem;
  color: var(--brass);
}
.mono { font-family: ui-monospace, monospace; font-size: 0.78rem; }
.order-detail {
  margin-top: 1.25rem;
  padding: 1.1rem;
  border: 1px solid rgba(212, 168, 75, 0.28);
  background: rgba(0, 0, 0, 0.25);
}
.od-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.od-head h2 { margin: 0; color: var(--brass); font-size: 1.3rem; }
.muted { color: #9bb; font-size: 0.88rem; }
.print-card {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1rem;
  margin: 1rem 0;
  align-items: start;
}
.print-photo {
  aspect-ratio: 4/5;
  background: #111;
  overflow: hidden;
}
.print-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.print-meta ul {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}
.print-meta li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px dashed rgba(255,255,255,0.08);
  padding-bottom: 0.25rem;
  font-size: 0.88rem;
}
.print-meta li span { color: #9bb; }
.print-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: 1rem 0 0.5rem;
}
@media (max-width: 700px) {
  .print-card { grid-template-columns: 1fr; }
}
