@font-face { font-family: "Outfit"; font-weight: 500; font-display: swap; src: url(fonts/outfit-500.woff2) format("woff2"); }
@font-face { font-family: "Outfit"; font-weight: 600; font-display: swap; src: url(fonts/outfit-600.woff2) format("woff2"); }
@font-face { font-family: "Outfit"; font-weight: 700; font-display: swap; src: url(fonts/outfit-700.woff2) format("woff2"); }
@font-face { font-family: "Outfit"; font-weight: 800; font-display: swap; src: url(fonts/outfit-800.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url(fonts/inter-400.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url(fonts/inter-500.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url(fonts/inter-600.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url(fonts/inter-700.woff2) format("woff2"); }

:root {
  --bg: #0c0d0e;
  --panel: #16171a;
  --panel-2: #1e1f23;
  --line: #2c2d31;
  --text: #f3efe6;
  --muted: #9a968d;
  --gold: #a29061;
  --gold-hi: #d9bd73;
  --gold-soft: rgba(162, 144, 97, .14);
  --up: #3fd48a;
  --danger: #ef5a4c;
  --radius: 14px;
  --display: "Outfit", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg) url(img/bg.jpg) center / cover fixed;
  color: var(--text);
  font: 15px/1.5 var(--body);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--gold-hi); }
h1, h2, h3 { font-family: var(--display); font-weight: 700; margin: 0; letter-spacing: .01em; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.num { font-family: var(--display); font-variant-numeric: tabular-nums; }

/* top bar */
.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 20px; border-bottom: 1px solid var(--line);
  background: rgba(12, 13, 14, .85); backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 20;
}
.topbar .logo { height: 34px; }
.topbar .title { font-family: var(--display); font-weight: 600; color: var(--gold-hi); letter-spacing: .12em; font-size: 12px; text-transform: uppercase; }
.topbar .spacer { flex: 1; }
.topbar .who { color: var(--muted); font-size: 13px; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }

/* cards */
.card {
  background: rgba(22, 23, 26, .92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
/* space only after a visible card, so hidden panels never push the next one down */
.card:not(.hidden) ~ .card { margin-top: 16px; }
.card h2 { font-size: 18px; margin-bottom: 14px; }

/* buttons */
.btn {
  font: 600 14px/1 var(--body);
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
  border-radius: 10px; padding: 11px 16px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none; transition: background .15s, border-color .15s, transform .08s;
}
.btn:hover { border-color: var(--gold); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--gold); border-color: var(--gold); color: #111; }
.btn.primary:hover { background: var(--gold-hi); }
.btn.danger { color: var(--danger); border-color: rgba(239, 90, 76, .4); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 7px 11px; font-size: 13px; }
.btn.block { width: 100%; }

/* forms */
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
input, select {
  width: 100%; font: 500 16px var(--body); color: var(--text);
  background: #0f1012; border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px;
}
input:focus, select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.field { margin-bottom: 14px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > .field { flex: 1 1 160px; }
.error { color: var(--danger); font-size: 14px; min-height: 20px; margin: 6px 0; }

/* badges */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font: 700 11px/1 var(--body); letter-spacing: .08em; text-transform: uppercase;
  padding: 5px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted);
}
.badge.live { color: var(--up); border-color: rgba(63, 212, 138, .45); }
.badge.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--up); animation: blink 1.2s infinite; }
.badge.ready { color: var(--gold-hi); border-color: rgba(217, 189, 115, .45); }
@keyframes blink { 50% { opacity: .25; } }

/* tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }

/* milestone editor */
.tiers { display: grid; gap: 8px; margin-bottom: 10px; }
.tier-row { display: grid; grid-template-columns: 34px 1fr 1fr 40px; gap: 8px; align-items: center; }
.tier-row .n { color: var(--gold-hi); font-family: var(--display); font-weight: 700; text-align: center; }
.tier-row input:disabled { opacity: .55; }
.tier-head { display: grid; grid-template-columns: 34px 1fr 1fr 40px; gap: 8px; font-size: 12px; color: var(--muted); }
.icon-btn { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 8px; height: 42px; cursor: pointer; font-size: 18px; }
.icon-btn:hover { color: var(--danger); border-color: var(--danger); }

/* toast */
#toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px);
  background: #222; border: 1px solid var(--gold); color: var(--text);
  padding: 12px 18px; border-radius: 12px; font-weight: 600; opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; z-index: 100; max-width: calc(100% - 32px); text-align: center;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.bad { border-color: var(--danger); }

/* modal */
/* tall forms scroll inside the overlay instead of running off screen */
.modal { position: fixed; inset: 0; background: rgba(0, 0, 0, .88); display: grid; place-items: center; padding: 16px; z-index: 50; overflow-y: auto; }
.modal .card { width: 100%; max-width: 440px; margin: auto 0; background: var(--panel); border-color: #3a3b40; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }

@media (max-width: 600px) {
  .topbar { padding: 10px 16px; gap: 10px; }
  .topbar .title { display: none; }
  .topbar .who { display: none; }
  .topbar .logo { height: 28px; }
  .wrap { padding: 16px 16px 60px; }
  .card { padding: 16px; }
}

/* current price step: a pulse, a shine sweeping across, and a NOW tag, all in the product's colour (--pc) */
.step-now { position: relative; overflow: hidden; animation: now-glow 2s ease-in-out infinite; }
.step-now::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 35%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 236, 180, .28), transparent);
  animation: now-shine 2.8s ease-in-out infinite;
}
.now-tag {
  display: inline-block; margin-left: .6em; padding: .15em .55em; border-radius: 99px; vertical-align: middle;
  background: var(--pc, var(--gold-hi)); color: #111; font: 800 .62em/1.3 var(--body); letter-spacing: .12em;
  animation: now-tag 1.4s ease-in-out infinite;
}
@keyframes now-glow {
  0%, 100% { box-shadow: 0 0 0 0 transparent, 0 0 14px color-mix(in srgb, var(--pc, #d9bd73) 15%, transparent); }
  50% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--pc, #d9bd73) 25%, transparent), 0 0 28px color-mix(in srgb, var(--pc, #d9bd73) 45%, transparent); }
}
@keyframes now-shine { 0% { left: -40%; } 60%, 100% { left: 120%; } }
@keyframes now-tag { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) {
  .step-now, .step-now::after, .now-tag { animation: none; }
}

/* Last Minute Award editor */
.lm-box { margin-top: 16px; padding: 14px; border: 1px dashed rgba(217, 189, 115, .45); border-radius: 12px; background: rgba(162, 144, 97, .06); }
.lm-toggle { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--text); font-size: 15px; cursor: pointer; }
.lm-toggle input { width: auto; }
.lm-toggle b { color: var(--gold-hi); }
.lm-help { font-size: 13px; margin: 6px 0 10px; }
.lm-fields { margin-bottom: -14px; }
.lm-soon { font-size: .8em; color: var(--muted); margin-left: .5em; font-weight: 500; }

/* BA picker in the bar form */
.ba-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; min-height: 22px; align-items: center; }
.ba-chip { display: inline-flex; align-items: center; gap: 4px; padding: 5px 6px 5px 11px; border-radius: 99px; background: var(--gold-soft); border: 1px solid rgba(217, 189, 115, .45); color: var(--gold-hi); font-size: 13px; font-weight: 600; }
.ba-chip button { background: none; border: 0; color: var(--gold-hi); font-size: 16px; line-height: 1; cursor: pointer; padding: 0 4px; border-radius: 50%; }
.ba-chip button:hover { color: var(--danger); }

/* header menu */
.topnav { display: flex; gap: 6px; }
.topnav .btn.on { background: var(--gold-soft); border-color: var(--gold); color: var(--gold-hi); }

/* per-product sections in the bar settings form */
.prod-box { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 12px; background: #121316; }
.prod-box.off { opacity: .6; }
.prod-toggle { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--text); font-size: 15px; cursor: pointer; flex-wrap: wrap; }
.prod-toggle input { width: auto; }
.prod-toggle b { color: var(--gold-hi); }
.prod-toggle .muted { font-size: 12px; }
.prod-fields { margin-top: 12px; }

/* product identity: each product has its own colour (--pc) and icon */
.picon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.18em; }
.ptag { display: inline-flex; align-items: center; gap: .35em; color: var(--pc, var(--gold-hi)); font-weight: 700; }
.icon-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.icon-pick label { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 0; padding: 10px 4px; border: 1px solid var(--line);
  border-radius: 10px; cursor: pointer; color: var(--text); font-size: 12px; background: #0f1012; }
.icon-pick label .picon { width: 30px; height: 30px; color: var(--pc, var(--gold-hi)); }
.icon-pick input { position: absolute; opacity: 0; pointer-events: none; }
.icon-pick label:has(input:checked) { border-color: var(--pc, var(--gold)); background: rgba(217, 189, 115, .1); box-shadow: 0 0 0 2px var(--pc, var(--gold)); }

/* bar settings summary (Bars list): one compact card per product */
.plan { display: grid; gap: 8px; min-width: 300px; white-space: normal; }
.pl-meta { display: flex; gap: 6px; }
.pl-badge { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 99px; border: 1px solid var(--line); background: #0f1012; }
.pl-prod { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: #121316; }
.pl-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.pl-open { font: 700 18px var(--display); color: var(--pc, var(--gold-hi)); }
.pl-open small { font: 500 11px var(--body); color: var(--muted); }
.pl-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.pl-chip { font-size: 12px; padding: 2px 8px; border-radius: 99px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); color: var(--muted); white-space: nowrap; }
.pl-chip b { color: var(--text); font-weight: 700; }
.pl-chip.lm { border-style: dashed; border-color: color-mix(in srgb, var(--pc, #d9bd73) 60%, transparent); color: var(--pc, var(--gold-hi)); }

/* uploaded product images */
.pimg { object-fit: contain; }
.img-pick { display: flex; gap: 14px; align-items: center; }
.img-prev { width: 96px; height: 96px; border-radius: 12px; border: 1px dashed color-mix(in srgb, var(--pc, #d9bd73) 55%, transparent);
  background: #0f1012; display: grid; place-items: center; font-size: 12px; flex: none; }
.img-prev img { max-width: 84px; max-height: 84px; object-fit: contain; }
.img-actions { display: flex; flex-direction: column; gap: 8px; }

/* uploaded images are sized by height (bottles are tall and narrow), per place */
.pimg { width: auto !important; }
.ptag .pimg { height: 1.9em; vertical-align: middle; }

/* name-tab cards: an outline in the product (or brand) colour with the name in a pill set into the top edge */
.tab-card { position: relative; border: 1px solid color-mix(in srgb, var(--pc, #d9bd73) 50%, transparent) !important; border-radius: 16px; margin-top: 18px; }
.tab-pill { position: absolute; top: 0; left: 50%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: .4em;
  padding: .3em 1.1em; white-space: nowrap; max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis;
  border: 1px solid color-mix(in srgb, var(--pc, #d9bd73) 50%, transparent); border-radius: 99px; background: var(--tab-bg, #141518);
  color: var(--pc, var(--gold-hi)); font-weight: 700; z-index: 2; }
.tab-pill .picon { width: 1.1em; height: 1.1em; }
.tab-pill .pimg { height: 1.5em; }
