/* Yavar tokens (from the design system's yavar-theme.css). The page is plain
   HTML with no build step, so the tokens are restated here as variables. */
:root {
  --yv-violet-100: #EDEBFF;
  --yv-violet-500: #584DFF;
  --yv-violet-600: #4438DB;
  --yv-violet-700: #3329AE;
  --yv-midnight-700: #100037;
  --yv-neutral-200: #EDF0F5;
  --yv-neutral-300: #DDE1E8;
  --yv-neutral-400: #C7C7C7;
  --yv-danger-bg: #FBE4E4;
  --yv-danger-fg: #A02222;
  --yv-success-bg: #E4F3EA;
  --yv-success-fg: #1D6F42;

  --page: #FFFFFF;
  --subtle: var(--yv-neutral-200);
  --heading: var(--yv-midnight-700);
  --body: #000000;
  --accent: var(--yv-violet-500);
  --accent-hover: var(--yv-violet-600);
  --accent-pressed: var(--yv-violet-700);
  --line: var(--yv-neutral-300);
  --line-strong: var(--yv-neutral-400);
  --halo: var(--yv-violet-100);
  --radius-sm: 6px;
  --radius-md: 10px;
  --shadow-sm: 0 1px 2px rgba(16, 0, 55, 0.06);
  --font: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--subtle);
  color: var(--body);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
}

.shell { max-width: 560px; margin: 0 auto; padding: 20px 16px 40px; }

.brand { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.brand img { height: 28px; width: auto; }
.brand .event { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }

.card {
  background: var(--page);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 24px 20px;
}

.rule { height: 3px; width: 40px; background: var(--accent); margin-bottom: 16px; }

h1 { font-size: 24px; line-height: 1.25; font-weight: 700; color: var(--heading); margin: 0 0 8px; }
.lede { margin: 0 0 24px; }

/* Left-aligned, as asked for this form: on a phone the eye starts at the left edge. */
form { display: flex; flex-direction: column; gap: 16px; text-align: left; }
.field { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
label { font-size: 14px; font-weight: 600; }
.req { color: var(--accent); }
.hint { font-size: 13px; margin: 0; }

input[type=text], input[type=tel], input[type=email], textarea {
  width: 100%;
  font: inherit;
  color: var(--body);
  background: var(--page);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  text-align: left;
  transition: background-color 120ms ease, border-color 120ms ease;
}
textarea { min-height: 104px; resize: vertical; }
input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--halo); }
input::placeholder, textarea::placeholder { color: var(--body); opacity: 1; }

.field.has-error input, .field.has-error textarea { border-color: var(--yv-danger-fg); }
.error { font-size: 13px; font-weight: 600; color: var(--yv-danger-fg); margin: 0; }

.consent { display: flex; flex-direction: row; align-items: flex-start; gap: 10px; text-align: left; font-size: 14px; font-weight: 400; }
.consent input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }

.actions { display: flex; justify-content: center; }
button {
  font: inherit;
  font-weight: 600;
  color: #FFFFFF;
  background: var(--accent);
  border: 0;
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  min-height: 48px;
  cursor: pointer;
  transition: background-color 120ms ease;
}
button:hover { background: var(--accent-hover); }
button:active { background: var(--accent-pressed); }
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.banner { border-radius: var(--radius-sm); padding: 10px 12px; font-size: 14px; font-weight: 600; text-align: left; }
.banner.error-banner { background: var(--yv-danger-bg); color: var(--yv-danger-fg); }
.banner.ok { background: var(--yv-success-bg); color: var(--yv-success-fg); }

.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.foot { font-size: 12px; margin-top: 16px; text-align: left; }

/* Admin */
.wide { max-width: none; padding: 28px 32px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { background: var(--page); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 14px 16px; }
.stat .n { font-size: 24px; font-weight: 700; color: var(--heading); font-variant-numeric: tabular-nums; }
.stat .l { font-size: 13px; }
.toolbar { display: flex; justify-content: flex-end; gap: 12px; margin-bottom: 12px; }
.toolbar a { color: var(--accent); font-weight: 600; text-decoration: none; }
.table-wrap { max-height: 65vh; overflow: auto; background: var(--page); border: 1px solid var(--line); border-radius: var(--radius-md); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th { position: sticky; top: 0; background: #000000; color: #FFFFFF; text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; padding: 10px 12px; white-space: nowrap; }
td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: top; }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.badge { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 600; background: var(--subtle); }
.badge.sent, .badge.duplicate { background: var(--yv-success-bg); color: var(--yv-success-fg); }
.badge.failed, .badge.rejected { background: var(--yv-danger-bg); color: var(--yv-danger-fg); }
