:root {
  --black: #080808;
  --ink: #151515;
  --muted: #747474;
  --line: #e4e4e4;
  --paper: #ffffff;
  --soft: #f5f5f5;
  --red: #c8102e;
  --red-dark: #960b21;
  --green: #138a43;
  --yellow: #d99a14;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

input,
select,
textarea,
button {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(16px, 4vw, 44px);
  background: rgba(8, 8, 8, .96);
  color: #fff;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 2px solid var(--red);
  color: #fff;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 16px;
  color: #ddd;
  font-size: 14px;
}

.site-header nav .nav-home-link {
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--yellow);
  color: #111;
  font-weight: 800;
}

.site-header nav .nav-home-link:hover {
  background: #efb333;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 46px;
}

.site-footer {
  padding: 24px;
  background: var(--black);
  color: #bbb;
  text-align: center;
  font-size: 14px;
}

.footer-commercial-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 16px;
  margin: 0 0 12px;
}

.footer-commercial-links a {
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.site-footer p {
  margin: 0;
}

.hero {
  min-height: 310px;
  display: flex;
  align-items: end;
  padding: clamp(28px, 7vw, 70px);
  margin-bottom: 28px;
  background:
    linear-gradient(90deg, rgba(0,0,0,.86), rgba(0,0,0,.34)),
    url("../img/promo-placeholder.svg") center/cover;
  color: #fff;
}

.hero h1,
.promo-detail h1 {
  max-width: 760px;
  margin: 0 0 12px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1;
  letter-spacing: 0;
}

.hero p {
  max-width: 620px;
  color: #ececec;
}

.eyebrow {
  color: var(--red);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.promo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.promo-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.promo-card img {
  width: 100%;
  height: 340px;
  object-fit: contain;
  object-position: center;
  background: #fff;
  display: block;
}

.promo-card-body {
  padding: 18px;
}

.promo-card h2 {
  margin: 10px 0 8px;
  font-size: 22px;
}

.status-row,
.promo-meta,
.summary-bar,
.section-heading,
.number-toolbar,
.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.promo-meta {
  margin: 16px 0;
  color: var(--muted);
  font-size: 14px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid var(--red);
  border-radius: 6px;
  background: var(--red);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.button:hover {
  background: var(--red-dark);
}

.button-home-main {
  border-color: var(--yellow);
  background: var(--yellow);
  color: #111;
}

.button-home-main:hover {
  background: #efb333;
}

.button-ghost {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}

.button-danger {
  background: #111;
  border-color: #111;
}

.button-small {
  min-height: 34px;
  padding: 6px 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #eee;
  color: #222;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.pill-published,
.pill-paid {
  background: #e4f6eb;
  color: var(--green);
}

.pill-draft,
.pill-pending {
  background: #fff3d7;
  color: #8a5c00;
}

.pill-closed,
.pill-finished,
.pill-cancelled {
  background: #ffe2e6;
  color: var(--red);
}

.promo-detail {
  display: grid;
  grid-template-columns: minmax(280px, 480px) 1fr;
  gap: clamp(22px, 5vw, 54px);
  align-items: center;
  margin-bottom: 30px;
}

.promo-image-wrap {
  border-radius: 8px;
  overflow: hidden;
  background: #111;
}

.promo-image-wrap img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  padding: 10px;
  background: #111;
}

.detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0 0;
}

.detail-list div,
.admin-card,
.login-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

dt {
  color: var(--muted);
  font-size: 13px;
}

dd {
  margin: 0;
  font-weight: 800;
}

.reservation-panel {
  display: grid;
  gap: 22px;
}

.toolbar-actions,
.actions,
.form-actions,
.inline-form,
.status-form {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.small-input {
  width: 72px;
}

.numbers-grid {
  display: grid;
  grid-template-columns: repeat(var(--columns), minmax(42px, 1fr));
  gap: 8px;
}

.number-cell {
  position: relative;
  aspect-ratio: 1 / 1;
  min-height: 42px;
  border-radius: 6px;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  user-select: none;
}

.number-cell input {
  position: absolute;
  opacity: 0;
  inset: 0;
}

.number-cell span {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
}

.number-free {
  background: var(--green);
}

.number-reserved {
  background: var(--yellow);
  cursor: not-allowed;
}

.number-sold {
  background: var(--red);
  cursor: not-allowed;
}

.number-picked {
  outline: 3px solid #111;
  outline-offset: 2px;
}

.participant-form,
.admin-form {
  display: grid;
  gap: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

label span {
  font-weight: 400;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cfcfcf;
  border-radius: 6px;
  padding: 11px 12px;
  background: #fff;
  color: var(--ink);
}

.summary-bar {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111;
  color: #fff;
  flex-wrap: wrap;
}

.payment-note,
.empty,
.flash {
  padding: 14px 16px;
  border-radius: 8px;
  background: var(--soft);
}

.promo-home-actions {
  display: flex;
  justify-content: center;
  margin: 22px 0 0;
}

.flash {
  margin-bottom: 18px;
  border: 1px solid var(--line);
}

.flash-error {
  border-color: #ffb7c1;
  background: #fff0f2;
}

.login-card {
  max-width: 420px;
  margin: 50px auto;
}

.admin-topbar {
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 22px;
}

.admin-nav {
  display: grid;
  align-content: start;
  gap: 8px;
}

.admin-nav a {
  padding: 12px;
  border-radius: 6px;
  background: #111;
  color: #fff;
  font-weight: 800;
}

.admin-content {
  min-width: 0;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: #111;
  color: #fff;
}

.winner-box {
  margin-bottom: 0;
  padding: 12px;
  background: #fff;
  border-radius: 6px;
}

@media (max-width: 780px) {
  .site-header,
  .promo-detail,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .site-header,
  .number-toolbar,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-list {
    grid-template-columns: 1fr;
  }

  .numbers-grid {
    grid-template-columns: repeat(5, minmax(44px, 1fr));
  }

  .summary-bar .button {
    width: 100%;
  }
}
