/* NEOpromos — public + merchant + light admin */
:root {
  --bg: #0c0c0b;
  --bg-elev: #161614;
  --bg-card: #1c1c19;
  --text: #f3f2eb;
  --muted: #9a9a8e;
  --line: #2a2a26;
  --accent: #c8f06c;
  --accent-dim: #9bbf3a;
  --danger: #ff6b5a;
  --radius: 18px;
  --font: "DM Sans", system-ui, sans-serif;
  --display: "Syne", var(--font);
  --shadow: 0 20px 50px rgba(0,0,0,.45);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  position: relative;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: .04;
  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.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.top, main, .foot, .flashes { position: relative; z-index: 1; }

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  background: rgba(12,12,11,.85);
  z-index: 50;
}
.brand {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.brand-mark { color: var(--accent); }
.top-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.top-nav a { color: var(--muted); font-size: .92rem; text-decoration: none; }
.top-nav a:hover { color: var(--text); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  border: none;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  padding: .65rem 1.15rem;
  border-radius: 999px;
  background: var(--accent);
  color: #111;
  text-decoration: none !important;
  transition: transform .15s, background .15s;
}
.btn:hover { background: #d8ff7a; transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: var(--accent); background: transparent; color: var(--accent); }
.btn-lg { padding: .85rem 1.5rem; font-size: 1.05rem; }
.btn-sm { padding: .45rem .9rem; font-size: .85rem; }
.btn-danger { background: var(--danger); color: #fff; }

main { max-width: 1120px; margin: 0 auto; padding: 1.5rem 1.25rem 4rem; }

.flashes { max-width: 1120px; margin: .75rem auto 0; padding: 0 1.25rem; }
.flash {
  padding: .75rem 1rem;
  border-radius: 12px;
  margin-bottom: .5rem;
  font-size: .95rem;
}
.flash-ok { background: rgba(200,240,108,.12); border: 1px solid rgba(200,240,108,.35); }
.flash-error { background: rgba(255,107,90,.12); border: 1px solid rgba(255,107,90,.35); }

/* Hero */
.hero {
  padding: 2.5rem 0 2rem;
  max-width: 720px;
}
.hero-eyebrow, .eyebrow {
  font-size: .75rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-dim);
  margin-bottom: .75rem;
}
.hero h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
}
.accent { color: var(--accent); }
.hero-lead { color: var(--muted); font-size: 1.1rem; max-width: 36rem; }
.hero-stats {
  display: flex;
  gap: 2rem;
  margin-top: 1.75rem;
}
.stat-num {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--text);
}
.stat-label { color: var(--muted); font-size: .85rem; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin: 1.5rem 0 2rem;
  padding: 1rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.filters input, .filters select,
label input, label textarea, label select {
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .65rem .85rem;
  width: 100%;
}
.filters input[type="search"] { flex: 1; min-width: 160px; }
.filters select { width: auto; min-width: 140px; }
label { display: block; margin-bottom: 1rem; font-size: .9rem; color: var(--muted); }
label input, label textarea { margin-top: .35rem; }

/* Cards grid */
.grid-promos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.card-promo {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: border-color .2s, transform .2s;
  box-shadow: var(--shadow);
}
.card-promo:hover {
  border-color: rgba(200,240,108,.35);
  transform: translateY(-3px);
}
.card-promo.is-featured { border-color: rgba(200,240,108,.5); }
.ribbon {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  background: var(--accent);
  color: #111;
  font-size: .7rem;
  font-weight: 700;
  padding: .25rem .55rem;
  border-radius: 999px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #111;
  overflow: hidden;
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-media-placeholder {
  width: 100%;
  height: 100%;
  min-height: 160px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #1a2a12, #121210);
  font-family: var(--display);
  font-size: 3rem;
  font-weight: 800;
  color: var(--accent-dim);
}
.card-media-placeholder.large { min-height: 320px; }
.price-stack {
  position: absolute;
  bottom: 10px;
  right: 10px;
  text-align: right;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(8px);
  padding: .4rem .65rem;
  border-radius: 12px;
  line-height: 1.2;
}
.price-stack.large {
  position: static;
  display: inline-block;
  margin: 1rem 0;
  text-align: left;
  background: rgba(200,240,108,.08);
  border: 1px solid rgba(200,240,108,.25);
  padding: .75rem 1rem;
}
.price-stack.inline { position: static; display: inline-flex; gap: .5rem; align-items: baseline; background: transparent; padding: 0; }
.price-was {
  display: block;
  font-size: .75rem;
  color: var(--muted);
  text-decoration: line-through;
}
.price-now {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--accent);
}
.price-stack.large .price-now { font-size: 1.75rem; }
.card-body { padding: 1rem 1.1rem 1.2rem; flex: 1; display: flex; flex-direction: column; }
.card-meta { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .5rem; }
.tag {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: .2rem .5rem;
  border-radius: 999px;
  background: rgba(200,240,108,.1);
  color: var(--accent-dim);
}
.place { font-size: .8rem; color: var(--muted); }
.card-body h2 {
  font-family: var(--display);
  font-size: 1.15rem;
  margin: 0 0 .35rem;
  line-height: 1.25;
}
.card-body h2 a { color: var(--text); text-decoration: none; }
.commerce-name { color: var(--muted); font-size: .9rem; margin: 0 0 .5rem; }
.commerce-name.big { font-size: 1.05rem; color: var(--text); }
.card-desc { color: var(--muted); font-size: .9rem; flex: 1; }
.card-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; }

.empty, .empty-mini {
  text-align: center;
  padding: 3rem 1.5rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
}
.cta-band {
  margin-top: 3rem;
  padding: 2rem;
  border-radius: var(--radius);
  background: linear-gradient(120deg, rgba(200,240,108,.12), rgba(200,240,108,.03));
  border: 1px solid rgba(200,240,108,.25);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}
.cta-band h2 { font-family: var(--display); margin: 0 0 .35rem; }
.cta-band p { margin: 0; color: var(--muted); }

/* Detail */
.detail-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  margin-top: 1rem;
}
@media (min-width: 800px) {
  .detail-grid { grid-template-columns: 1.1fr 1fr; }
}
.detail-media {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #111;
}
.detail-media img { width: 100%; height: auto; object-fit: cover; max-height: 480px; }
.detail-desc { color: var(--muted); font-size: 1.05rem; }
.detail-facts { list-style: none; padding: 0; margin: 1.25rem 0; color: var(--muted); }
.detail-facts li { margin-bottom: .5rem; }
.detail-facts strong { color: var(--text); margin-right: .35rem; }
.back { color: var(--muted); font-size: .9rem; }

/* Auth / forms */
.page-auth main { max-width: 440px; }
.auth-card, .form-wrap, .panel {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-top: 1rem;
}
.stack label { margin-bottom: 1.1rem; }
.hint { font-size: .85rem; color: var(--muted); margin-top: 1rem; }
.row-2 { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .row-2 { grid-template-columns: 1fr; } }
.form-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.25rem; }
.thumb-preview { margin-top: .5rem; max-width: 180px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }

.merchant-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.merchant-head h1 { font-family: var(--display); margin: 0; }
.current-promo {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg);
  border-radius: 12px;
}

.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { text-align: left; padding: .65rem .4rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--muted); font-weight: 500; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.table-actions { display: flex; flex-wrap: wrap; gap: .35rem; }
.table-actions form { display: inline; }
.linkish {
  background: none; border: none; color: var(--accent); cursor: pointer; font: inherit; padding: 0; text-decoration: underline;
}
.linkish.danger { color: var(--danger); }
.badge {
  font-size: .75rem;
  padding: .15rem .45rem;
  border-radius: 999px;
  background: var(--line);
}
.badge-published { background: rgba(200,240,108,.15); color: var(--accent); }
.badge-hidden { background: rgba(255,107,90,.15); color: var(--danger); }
.badge-draft { background: #333; color: var(--muted); }

.admin-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.admin-bar nav { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: .75rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
}
.muted { color: var(--muted); }

.foot {
  border-top: 1px solid var(--line);
  padding: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: .85rem;
  max-width: 1120px;
  margin: 0 auto;
}
.foot-links { display: flex; gap: 1rem; }

@media (max-width: 640px) {
  .top-nav a:not(.btn) { display: none; }
  .hero { padding-top: 1.5rem; }
}
