:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --text: #1c1e21;
  --muted: #5f6672;
  --accent: #2f6fed;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(16, 24, 40, .08);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  background: #182235;
  padding: 14px 16px;
}

.brand {
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
  letter-spacing: .3px;
}

.container {
  flex: 1;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 16px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
}

h1 { font-size: 22px; margin: 0 0 12px; }

p { margin: 0 0 12px; }

ul { margin: 0 0 12px; padding-left: 20px; }

a { color: var(--accent); }

.muted { color: var(--muted); }

.site-footer {
  padding: 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

button, .btn {
  display: inline-block;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  padding: 10px 18px;
  cursor: pointer;
  text-decoration: none;
}

input, select, textarea {
  width: 100%;
  border: 1px solid #d4d9e0;
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  background: #fff;
}

h2 { font-size: 18px; margin: 0 0 12px; }

.btn-secondary { background: #e8ecf3; color: var(--text); }

.btn-danger { background: #d64545; }

.btn-link {
  background: none;
  border: 0;
  color: #cfd8ea;
  font: inherit;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #cfd8ea;
}

.nav-callsign { font-weight: 600; color: #fff; }

.inline-form { display: inline; }

.field { margin: 0 0 14px; }

.field label {
  display: block;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 4px;
}

.field-inline { display: flex; gap: 12px; margin: 0 0 14px; }

.field-inline label {
  flex: 1;
  font-size: 14px;
  color: var(--muted);
}

.flash {
  border-radius: 10px;
  padding: 10px 14px;
  margin: 0 0 14px;
}

.flash-ok { background: #e4f5e9; color: #1e6b34; }

.flash-error { background: #fdecec; color: #a02929; }

.flash-warn { background: #fdf4e3; color: #8a5b10; }

.code-big {
  font: 700 30px/1.2 ui-monospace, Consolas, monospace;
  letter-spacing: 2px;
  word-break: break-all;
}

.qr-canvas, .card-canvas {
  max-width: 100%;
  height: auto;
  border: 1px solid #e2e6ec;
  border-radius: 10px;
}

.row-item {
  border-top: 1px solid #eef1f5;
  padding: 12px 0;
}

.row-item:first-of-type { border-top: 0; }

.row-item form { margin-top: 8px; }

.pill {
  display: inline-block;
  background: #e8ecf3;
  border-radius: 999px;
  font-size: 13px;
  padding: 2px 10px;
  margin: 0 4px;
}

details summary {
  cursor: pointer;
  color: var(--muted);
  margin-top: 6px;
}

.revoke-form { margin-top: 10px; }

.hidden { display: none; }

.spinner {
  font-size: 28px;
  color: var(--muted);
  letter-spacing: 6px;
}

.nav-link { color: #cfd8ea; text-decoration: none; }

.row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.row-head h1 { margin: 0; }

.pill-status { text-transform: capitalize; }

.pill-draft { background: #e8ecf3; }

.pill-published { background: #e4f5e9; color: #1e6b34; }

.pill-finished { background: #f3e4e4; color: #8a3232; }

fieldset {
  border: 1px solid #e2e6ec;
  border-radius: 10px;
  padding: 12px 14px;
  margin: 0 0 14px;
}

legend { color: var(--muted); font-size: 14px; padding: 0 6px; }

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.check-row input { width: auto; }

.event-descr { white-space: pre-line; }

.counter { font-size: 18px; }

.poster, .video {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
}

.poster-preview { max-width: 240px; height: auto; border-radius: 10px; }

.video, .video-preview { width: 100%; background: #000; border-radius: var(--radius); }

.progress {
  height: 8px;
  background: #e8ecf3;
  border-radius: 999px;
  overflow: hidden;
  margin: 6px 0;
}

.progress-bar {
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width .2s;
}
