@font-face {
  font-family: "Helvetica Neue";
  src: url("/fonts/HelveticaNeueUltraLight.otf") format("opentype");
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Helvetica Neue";
  src: url("/fonts/HelveticaNeueUltraLightItalic.otf") format("opentype");
  font-weight: 100;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Helvetica Neue";
  src: url("/fonts/HelveticaNeueThin.otf") format("opentype");
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Helvetica Neue";
  src: url("/fonts/HelveticaNeueThinItalic.otf") format("opentype");
  font-weight: 200;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Helvetica Neue";
  src: url("/fonts/HelveticaNeueLight.otf") format("opentype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Helvetica Neue";
  src: url("/fonts/HelveticaNeueLightItalic.otf") format("opentype");
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Helvetica Neue";
  src: url("/fonts/HelveticaNeueRoman.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Helvetica Neue";
  src: url("/fonts/HelveticaNeueItalic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Helvetica Neue";
  src: url("/fonts/HelveticaNeueMedium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Helvetica Neue";
  src: url("/fonts/HelveticaNeueMediumItalic.otf") format("opentype");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Helvetica Neue";
  src: url("/fonts/HelveticaNeueBold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Helvetica Neue";
  src: url("/fonts/HelveticaNeueBoldItalic.otf") format("opentype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Helvetica Neue";
  src: url("/fonts/HelveticaNeueHeavy.otf") format("opentype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Helvetica Neue";
  src: url("/fonts/HelveticaNeueHeavyItalic.otf") format("opentype");
  font-weight: 800;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Helvetica Neue";
  src: url("/fonts/HelveticaNeueBlack.otf") format("opentype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Helvetica Neue";
  src: url("/fonts/HelveticaNeueBlackItalic.otf") format("opentype");
  font-weight: 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --black: #000;
  --white: #fff;
  --gray-bg: #f2f2f2;
  --gray-border: #d9d9d9;
  --gray-text: #8a8a8a;
  --gray-subtle: #444;
  --radius: 6px;
  --maxw: 390px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--white);
  color: var(--black);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-weight: 400;
  line-height: 1.4;
}

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: safe center;
}

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

/* ---------- Public pages (mobile-first column) ---------- */
.page {
  width: 100%;
  max-width: var(--maxw);
  min-height: 100vh;
  padding: 40px 24px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: safe center;
  gap: 24px;
}

.logo { width: 64px; height: auto; display: block; }
.hero { width: 100%; height: auto; display: block; border-radius: 4px; }

.title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.2px;
  text-align: center;
  line-height: 1.2;
}

.subtitle {
  font-size: 15px;
  color: var(--gray-subtle);
  text-align: center;
  line-height: 1.5;
}

.spacer-sm { height: 4px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 52px;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease, opacity .15s ease;
  user-select: none;
}

.btn-primary {
  background: var(--black);
  color: var(--white);
  border: 0;
}

.btn-primary:disabled,
.btn-primary[disabled] {
  background: transparent;
  color: var(--gray-text);
  border: 1px solid var(--gray-border);
  cursor: not-allowed;
}

.btn-outline {
  background: var(--white);
  color: var(--black);
  border: 1px solid var(--black);
}

/* ---------- Form field with optional valid-check badge ---------- */
.form { width: 100%; display: flex; flex-direction: column; gap: 14px; }

.field { position: relative; width: 100%; }

.field input {
  width: 100%;
  height: 52px;
  background: var(--gray-bg);
  border: 0;
  border-radius: var(--radius);
  padding: 0 44px 0 16px;
  font-family: inherit;
  font-size: 15px;
  color: var(--black);
  outline: none;
}
.field input::placeholder { color: var(--gray-text); }
.field input:focus { box-shadow: inset 0 0 0 1px var(--gray-border); }

.field .check {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--black);
  display: none;
  align-items: center;
  justify-content: center;
}
.field .check svg {
  width: 12px; height: 12px;
  stroke: #fff; stroke-width: 3; fill: none;
  stroke-linecap: round; stroke-linejoin: round;
}
.field.valid .check { display: flex; }

.error-text { color: #c00; font-size: 13px; text-align: center; }

/* ---------- Success page ---------- */
.success-title {
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  line-height: 1.3;
  margin-top: 8px;
}
.success-body {
  font-size: 15px;
  color: var(--gray-subtle);
  text-align: center;
  line-height: 1.6;
}
.success-body strong { color: var(--black); }

/* ---------- Splash specifics ---------- */
.splash .title { margin-top: 8px; }
.splash .subtitle { margin-top: -16px; }
.splash .hero {
  width: 100vw;
  border-radius: 0;
}

/* ---------- Tablet/desktop tweak ---------- */
@media (min-width: 768px) {
  :root { --maxw: 440px; }
  .page { padding-top: 56px; }
}

/* ---------- Admin pages ---------- */
.admin {
  width: 100%;
  max-width: 1000px;
  padding: 24px 24px 64px;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--gray-border);
  margin-bottom: 24px;
}
.admin-header h1 {
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
}
.admin-header h1 img { width: 28px; height: 28px; }
.admin-header .logout-btn {
  width: auto;
  height: 38px;
  padding: 0 16px;
  font-size: 12px;
  letter-spacing: 1px;
}

.admin-section { margin-bottom: 40px; }
.admin-section h2 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 16px;
  color: var(--gray-subtle);
}

.brand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 16px;
}
.brand-card {
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.brand-card label { font-weight: 700; font-size: 14px; }
.brand-card .preview {
  width: 100%;
  height: 160px;
  background: var(--gray-bg);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.brand-card .preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.brand-card input[type="file"] {
  font-family: inherit;
  font-size: 13px;
}
.brand-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}
.brand-actions .save-btn {
  width: auto;
  height: 44px;
  padding: 0 24px;
  font-size: 13px;
}
.brand-actions .hint {
  font-size: 12px;
  color: var(--gray-text);
}

.reg-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 12px;
  flex-wrap: wrap;
}
.reg-count { font-size: 14px; color: var(--gray-subtle); }
.reg-header .csv-btn {
  width: auto;
  height: 38px;
  padding: 0 16px;
  font-size: 12px;
  letter-spacing: 1px;
}

.table-wrap {
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  overflow-x: auto;
}
table.regs {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 720px;
}
table.regs th, table.regs td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-border);
}
table.regs th {
  background: var(--gray-bg);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gray-subtle);
  position: sticky; top: 0;
}
table.regs tr:last-child td { border-bottom: 0; }
table.regs td.empty {
  text-align: center;
  color: var(--gray-text);
  padding: 28px;
}
