:root {
  --ink: #17151a;
  --muted: #68616d;
  --line: #e7e2ea;
  --paper: #fbfafc;
  --panel: #ffffff;
  --pink: #e4007d;
  --green: #0abf6b;
  --black: #050505;
  --blue: #2448ff;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
a { color: inherit; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 232px;
  background: #08070a;
  color: white;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.brand {
  font-weight: 900;
  font-size: 28px;
  line-height: .9;
  letter-spacing: 0;
}
.brand span { color: var(--pink); font-size: 18px; }
nav { display: grid; gap: 6px; }
nav a, .logout {
  text-decoration: none;
  padding: 11px 12px;
  border-radius: 6px;
  color: #f4eef7;
}
nav a:hover, .logout:hover { background: #1f1a24; }
.logout { margin-top: auto; }
.shell { margin-left: 232px; padding: 30px; }
.public-shell { min-height: 100vh; }
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
}
.page-head p { margin: 0 0 4px; color: var(--pink); font-weight: 700; }
h1, h2, h3 { margin: 0; letter-spacing: 0; }
.page-head h1 { font-size: 34px; }
.button, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
}
.primary { background: var(--pink); color: white; border-color: var(--pink); }
.danger { background: #c1121f; border-color: #c1121f; }
.panel, .login-card, .claim-card, .success-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(30, 20, 40, .06);
}
.panel { padding: 18px; margin-bottom: 18px; overflow-x: auto; }
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.metric-grid div, .detail-grid div {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}
.metric-grid span, .detail-grid span { display: block; color: var(--muted); font-size: 13px; }
.metric-grid strong { font-size: 34px; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { text-align: left; padding: 13px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: 13px; }
small { color: var(--muted); }
.status {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
  background: #ece8ef;
}
.status.active, .status.downloaded { background: #dff7ea; color: #006d3c; }
.status.used { background: #e3ecff; color: #143fb8; }
.status.cancelled, .status.expired, .status.inactive { background: #ffe2e2; color: #a30d19; }
.status.available { background: #fff2c7; color: #7a5200; }
.form { max-width: 920px; display: grid; gap: 14px; }
label { display: grid; gap: 7px; font-weight: 700; color: #302a34; }
label span { color: var(--pink); font-size: 13px; font-weight: 900; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 12px;
  font: inherit;
  background: white;
}
textarea { min-height: 110px; resize: vertical; }
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.image-preview {
  display: grid;
  gap: 8px;
  max-width: 420px;
}
.image-preview img {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #111;
}
.image-preview.vertical img {
  max-width: 180px;
  max-height: 320px;
}
.image-preview p {
  margin: 0;
  padding: 10px 12px;
  border-radius: 6px;
  background: #fff2c7;
  color: #7a5200;
  font-weight: 700;
}
.inline { display: flex; gap: 8px; margin-top: 8px; }
.inline input { width: 96px; }
.filters { display: flex; gap: 10px; align-items: end; }
.filters input { max-width: 360px; }
.flash {
  padding: 12px 14px;
  border-radius: 6px;
  margin-bottom: 14px;
  background: #eaf7ef;
  color: #075b32;
  font-weight: 700;
}
.flash.error { background: #ffe8e8; color: #9d101b; }
.login-page, .success-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #09080b;
}
.login-card, .success-card {
  width: min(460px, 100%);
  padding: 26px;
  display: grid;
  gap: 16px;
}
.login-card img, .success-card img { width: 100%; border-radius: 6px; }
.login-card h1 { font-size: 28px; }
.public-hero {
  min-height: 50vh;
  background-image: var(--desktop-image);
  background-size: cover;
  background-position: center;
  position: relative;
}
.public-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.10));
}
.public-title {
  background: #070609;
  color: white;
  padding: 28px 24px 34px;
}
.public-title div {
  max-width: 1120px;
  margin: 0 auto;
}
.public-title p {
  margin: 0 0 6px;
  color: var(--pink);
  font-weight: 900;
  font-size: 18px;
}
.public-title h1 {
  font-size: clamp(36px, 6vw, 74px);
  line-height: 1;
  max-width: 980px;
}
.public-title h2 {
  margin-top: 8px;
  font-size: clamp(22px, 4vw, 42px);
  color: var(--green);
}
.claim-wrap {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 30px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 30px 24px 44px;
  position: relative;
}
.claim-copy, .claim-card { padding: 24px; }
.claim-copy { background: white; border-radius: 8px; border: 1px solid var(--line); }
.claim-copy h3 { font-size: 26px; }
.event-description {
  white-space: pre-line;
  font-size: 24px;
  line-height: 1.35;
  margin: 0 0 12px;
}
.claim-card { display: grid; gap: 13px; }
.check-row {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: start;
  gap: 10px;
  font-weight: 700;
}
.check-row input { width: 18px; height: 18px; margin-top: 2px; }
.check-row span { color: var(--ink); font-size: 14px; line-height: 1.35; }
.check-row a { color: var(--pink); }
.success-card { text-align: center; background: white; }
.success-card h1 { font-size: clamp(28px, 7vw, 52px); word-break: break-word; color: var(--pink); }
.detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.alert {
  padding: 15px;
  background: #fff2c7;
  border-radius: 6px;
  font-weight: 800;
}
.privacy-page {
  max-width: 980px;
  margin: 0 auto;
  padding: 34px 20px;
}
.privacy-doc h1 { font-size: 42px; margin-bottom: 18px; }
.privacy-doc h2 { color: var(--pink); margin-bottom: 18px; }
.privacy-doc p {
  line-height: 1.58;
  color: #2f2934;
  margin: 0 0 14px;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.section-head p { margin: 0 0 4px; color: var(--pink); font-weight: 800; }
.poll-option-form, .poll-option-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.2fr 1fr 90px 110px auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}
.poll-option-list { display: grid; gap: 10px; }
.poll-option-row { grid-template-columns: 70px 1.2fr 1fr 1.2fr 1fr 90px 110px auto; }
.poll-thumb, .result-thumb {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #f3eef5;
  overflow: hidden;
}
.poll-thumb img, .result-thumb img, .poll-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.empty-note { color: var(--muted); font-weight: 700; }
.poll-page, .poll-results-page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 30px 24px 48px;
}
.poll-intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}
.poll-intro .event-description { max-width: 720px; margin: 0; }
.results-cta {
  white-space: nowrap;
  min-width: max-content;
}
.poll-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.poll-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.poll-image {
  aspect-ratio: 1 / 1;
  background: #09080b;
}
.poll-card-body {
  display: grid;
  gap: 10px;
  padding: 14px;
}
.poll-card h3 { font-size: 18px; line-height: 1.2; }
.poll-card p { margin: 0; color: var(--muted); }
.poll-card-stats { color: var(--muted); font-weight: 800; }
.poll-button-list {
  display: grid;
  gap: 14px;
  max-width: 680px;
  margin: 0 auto;
}
.poll-button-option {
  display: grid;
  gap: 7px;
  text-align: center;
}
.poll-choice-button {
  width: 100%;
  min-height: 58px;
  padding: 14px 18px;
  font-size: 20px;
  line-height: 1.2;
}
.poll-choice-percentage {
  color: var(--pink);
  font-size: 22px;
  font-weight: 900;
}
.poll-button-mobile-actions { display: none; }
.poll-mini-bar, .result-bar-wrap {
  height: 10px;
  border-radius: 999px;
  background: #ece8ef;
  overflow: hidden;
}
.poll-mini-bar span, .result-bar-wrap span {
  display: block;
  height: 100%;
  min-width: 3px;
  background: var(--pink);
}
.poll-vote:disabled { opacity: .55; cursor: not-allowed; }
.poll-thanks {
  margin-top: 22px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  text-align: center;
}
.poll-thanks .results-cta { margin-top: 6px; }
.share-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
}
.results-title { padding-top: 42px; }
.results-summary {
  display: inline-grid;
  gap: 2px;
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}
.results-summary strong { font-size: 34px; color: var(--pink); }
.results-summary span { color: var(--muted); font-weight: 800; }
.results-list { display: grid; gap: 12px; margin-bottom: 20px; }
.result-row {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) minmax(180px, 2fr) 130px;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}
.result-name {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.result-name strong, .result-name small { display: block; }
.result-name strong { overflow-wrap: anywhere; }
.result-numbers { text-align: right; }
.result-numbers strong, .result-numbers small { display: block; }

@media (max-width: 800px) {
  .sidebar { position: static; width: auto; }
  .shell { margin-left: 0; padding: 18px; }
  .page-head, .filters { align-items: stretch; flex-direction: column; }
  .metric-grid, .cols, .claim-wrap, .detail-grid, .poll-grid, .result-row, .poll-option-form, .poll-option-row { grid-template-columns: 1fr; }
  .poll-intro, .section-head { align-items: stretch; flex-direction: column; }
  .poll-choice-percentage { font-size: 11px; text-align: right; }
  .poll-mode-buttons .poll-intro .poll-voted-alert,
  .poll-mode-buttons .poll-intro .poll-results-link { display: none; }
  .poll-mode-buttons .poll-button-mobile-actions {
    display: grid;
    gap: 12px;
    margin-top: 20px;
  }
  .result-numbers { text-align: left; }
  .public-hero {
    min-height: 62vh;
    background-image: var(--mobile-image);
    background-position: center top;
  }
  .public-title { padding: 22px 18px 26px; }
  .claim-wrap { margin-top: 0; }
}
