:root {
  --red: #c71d24;
  --red-dark: #9f171d;
  --red-tint: #fdeeee;
  --link: #ed1b24;
  --text: #374151;
  --heading: #111827;
  --muted: #6b7280;
  --line: #e2e2e2;
  --border: #e6e8eb;
  --border-soft: #f0f1f3;
  --border-strong: #d5d9de;
  --surface: #fff;
  --surface-2: #f7f8fa;
  --shadow-sm: 0 1px 2px rgb(16 24 40 / 5%);
  --shadow: 0 10px 28px rgb(16 24 40 / 8%);
  --focus: 0 0 0 3px rgb(199 29 36 / 16%);
  --heading-font: "Inter", Arial, sans-serif;
  --body-font: "Roboto", Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: var(--body-font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: #ececec url("/static/vbk-bg.gif");
}
body.demo {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='180'%3E%3Ctext x='130' y='90' text-anchor='middle' dominant-baseline='middle' transform='rotate(-30 130 90)' font-family='Arial, sans-serif' font-size='44' font-weight='700' fill='rgba(197, 30, 38, 0.12)'%3EDEMO%3C/text%3E%3C/svg%3E"),
    url("/static/vbk-bg.gif");
}

.site {
  max-width: 1000px;
  margin: 30px auto 0;
  padding: 10px;
  background: var(--surface);
  border-radius: 5px 5px 0 0;
  box-shadow: 0 0 25px 5px rgb(0 0 0 / 8%);
}
.site-banner { display: block; width: 100%; height: auto; }
.site-nav { display: flex; flex-wrap: wrap; align-items: stretch; margin-top: 6px; background: var(--red); border-radius: 4px 4px 0 0; font-size: 14px; }
.site-nav a, .site-nav button {
  padding: 10px 14px;
  color: #fff;
  font: inherit;
  font-weight: 500;
  text-decoration: none;
  background: none;
  border: 0;
  cursor: pointer;
}
.site-nav a:hover, .site-nav button:hover, .site-nav a[aria-current="page"] { background: var(--red-dark); }
.site-nav .nav-right { margin-left: auto; }
.site-nav form { margin: 0; display: flex; }
.site-main { padding: 28px 20px 40px; }
.site-footer { padding: 14px 10px 4px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }

h1, h2, h3 { font-family: var(--heading-font); font-weight: 700; line-height: 1.2; color: var(--heading); margin: 0 0 12px; }
h1 { font-size: 28px; letter-spacing: -0.6px; }
h2 { font-size: 19px; letter-spacing: -0.3px; margin-top: 28px; }
h3 { font-size: 16px; margin-top: 20px; }
a { color: var(--link); }
a:hover { text-decoration: none; }

.lead { margin: 0 0 24px; font-size: 16px; color: var(--muted); }
.muted { font-size: 14px; color: var(--muted); }
.empty { padding: 28px; text-align: center; color: var(--muted); background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: 14px; }
.back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 16px; font-size: 14px; font-weight: 500; color: var(--muted); text-decoration: none; }
.back:hover { color: var(--red); }
.description { white-space: pre-line; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  text-align: center;
  text-decoration: none;
  background: var(--red);
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.button:hover { background: var(--red-dark); }
.button:focus-visible { outline: none; box-shadow: var(--focus); }
.button-secondary { color: var(--heading); background: var(--surface); border-color: var(--border-strong); }
.button-secondary:hover { background: var(--surface-2); }
.button-danger { color: var(--red-dark); background: var(--surface); border-color: #f1c3c5; }
.button-danger:hover { background: var(--red-tint); }
.button-small { padding: 6px 14px; font-size: 13px; }
.button-swish { padding: 13px 34px; margin: 8px 0 16px; font-size: 17px; }
.button-block { display: flex; width: 100%; padding: 12px; }
.link-button { padding: 0; color: var(--link); font: inherit; text-decoration: underline; background: none; border: 0; cursor: pointer; }

fieldset { margin: 0 0 22px; padding: 0; border: 0; }
legend { float: left; width: 100%; margin-bottom: 14px; padding: 0; font-family: var(--heading-font); font-size: 15px; font-weight: 700; color: var(--heading); }
legend + * { clear: both; }
.card fieldset + fieldset { padding-top: 22px; border-top: 1px solid var(--border-soft); }
.field { display: block; margin-bottom: 16px; }
.field span { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 500; color: var(--text); }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 10px 13px;
  font: inherit;
  font-size: 16px;
  color: var(--heading);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--red); box-shadow: var(--focus); }
.field input:-webkit-autofill { box-shadow: inset 0 0 0 1000px #fff; -webkit-text-fill-color: var(--heading); }
.field-row { display: grid; gap: 0 14px; }
.participant { grid-template-columns: 2fr 1fr; }
.participant[hidden] { display: none; }
.checkbox { display: flex; gap: 8px; align-items: center; margin-bottom: 18px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.actions form { margin: 0; }

.alert { margin-bottom: 18px; padding: 12px 16px; font-size: 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; }
.alert ul { margin: 0; padding-left: 18px; }
.alert-error { color: #b42318; background: #fef3f2; border-color: #fecdca; }
.alert-success { color: #05603a; background: #ecfdf3; border-color: #abefc6; }

.tag { display: inline-block; padding: 2px 9px; font-size: 12px; font-weight: 600; color: #92400e; white-space: nowrap; vertical-align: middle; background: #fef3c7; border-radius: 999px; }
.tag-closed { color: #374151; background: #e5e7eb; }
.badge { display: inline-block; padding: 3px 10px; font-size: 12px; font-weight: 600; color: var(--text); white-space: nowrap; background: #f2f4f7; border-radius: 999px; }
.badge-admin { color: var(--red-dark); background: var(--red-tint); }

.qr { display: block; max-width: 100%; height: auto; margin: 0 auto 16px; padding: 10px; background: #fff; border: 1px solid var(--border); border-radius: 14px; }

.demo-banner { padding: 10px 16px; font-size: 14px; color: #5c4400; text-align: center; background: #fff3cd; }
.demo-banner a { color: #5c4400; font-weight: 700; }
.demo-account { white-space: nowrap; }
.demo-login { display: grid; gap: 8px; margin-bottom: 4px; }
.mail-text { margin: 0; font-family: inherit; white-space: pre-wrap; overflow-wrap: anywhere; }

@media (min-width: 600px) {
  .field-row { grid-template-columns: 1fr 1fr; }
  .participant { grid-template-columns: 2fr 1fr; }
}

@media (max-width: 599px) {
  .demo-banner { font-size: 13px; }
  .demo-account-list { display: none; }
}

@media (max-width: 699px) {
  .site { margin-top: 0; padding: 0; border-radius: 0; }
  .site-banner { height: 90px; object-fit: cover; object-position: left center; }
  .site-nav { margin-top: 0; border-radius: 0; }
  .site-main { padding: 20px 16px 28px; }
  .site-footer { padding: 14px 16px; }
}
