@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* Shared design tokens and primitives for the participant page and the admin console. */

:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --sunken: #f1f3f6;
  --ink: #101828;
  --ink-body: #3d4757;
  --muted: #667085;
  --faint: #98a2b3;
  --line: #e4e7ec;
  --line-strong: #d0d5dd;
  --brand: #1a6fe8;
  --brand-hover: #155fc8;
  --brand-press: #124fa6;
  --brand-tint: #ebf3fe;
  --brand-tint-strong: #d6e6fd;
  --brand-ink: #ffffff;
  --ok: #15803d;
  --ok-tint: #ecfdf3;
  --ok-line: #abefc6;
  --warn: #b45309;
  --warn-tint: #fffaeb;
  --warn-line: #fedf89;
  --bad: #c81e1e;
  --bad-tint: #fef3f2;
  --bad-line: #fecdca;
  --violet: #6d4ae0;
  --violet-tint: #f1edfd;
  --radius-lg: 20px;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 8px;
  --shadow-1: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-2: 0 1px 3px rgba(16, 24, 40, .08), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-pop: 0 18px 40px -16px rgba(16, 24, 40, .28), 0 2px 6px rgba(16, 24, 40, .06);
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { line-height: 1.55; font-size: 15px; }
a { color: var(--brand); text-underline-offset: 2px; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5rem; font-weight: 800; letter-spacing: -.015em; color: var(--ink); }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
h4 { font-size: .9rem; }
p { margin: 0 0 .75rem; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: .85rem; }
.tiny-text { font-size: .78rem; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: .75rem; }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: .85em; }

/* Buttons */
button, .btn {
  font: inherit; font-weight: 700; font-size: .9rem; border: 1px solid var(--line-strong); background: var(--panel); color: var(--ink);
  min-height: 38px; padding: .45rem .95rem; border-radius: var(--radius-sm); cursor: pointer; text-decoration: none; display: inline-flex;
  align-items: center; justify-content: center; gap: .45rem; box-shadow: var(--shadow-1); user-select: none; touch-action: manipulation;
  transition: transform 140ms var(--ease-out), background-color 140ms var(--ease-out), border-color 140ms var(--ease-out), box-shadow 140ms var(--ease-out), color 140ms var(--ease-out);
}
@media (hover: hover) { button:hover:not(:disabled), .btn:hover { background: var(--sunken); } }
button:active:not(:disabled), .btn:active { transform: scale(.97); }
button.primary, .btn.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); box-shadow: 0 1px 2px rgba(26, 111, 232, .3), inset 0 -2px 0 rgba(10, 13, 18, .08); }
button.primary:hover:not(:disabled), .btn.primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
button.primary:active:not(:disabled) { background: var(--brand-press); }
button.ghost, .btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--ink-body); }
button.ghost:hover:not(:disabled) { background: var(--sunken); }
button.danger { color: var(--bad); }
button.danger.solid { background: var(--bad); color: #fff; border-color: var(--bad); }
button.sm, .btn.sm { min-height: 30px; padding: .25rem .65rem; font-size: .8rem; border-radius: var(--radius-xs); }
button.icon { width: 38px; padding: 0; }
button.icon.sm { width: 30px; }
button:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.ic { width: 1.1em; height: 1.1em; flex-shrink: 0; }

/* Form controls */
input, select, textarea {
  font: inherit; font-size: .95rem; padding: .55rem .7rem; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff; color: var(--ink); width: 100%;
  transition: border-color 140ms var(--ease-out), box-shadow 140ms var(--ease-out);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint-strong); }
input[aria-invalid='true'], select[aria-invalid='true'], textarea[aria-invalid='true'] { border-color: var(--bad); box-shadow: 0 0 0 3px var(--bad-tint); }
textarea { resize: vertical; line-height: 1.5; }
input[type='checkbox'], input[type='radio'] { width: auto; accent-color: var(--brand); }
label { display: block; font-size: .85rem; font-weight: 600; color: var(--ink-body); margin-bottom: .3rem; }
.field { margin-bottom: .85rem; }
.field .hint { font-size: .8rem; color: var(--muted); margin-top: .3rem; }
.field-error { font-size: .82rem; color: var(--bad); margin-top: .3rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
@media (max-width: 720px) { .grid2 { grid-template-columns: 1fr; } }

/* Badges */
.tag { display: inline-flex; align-items: center; gap: .3rem; padding: .1rem .5rem; border-radius: 999px; font-size: .75rem; font-weight: 600; border: 1px solid var(--line); background: var(--sunken); color: var(--ink-body); white-space: nowrap; line-height: 1.5; }
.tag.ok { background: var(--ok-tint); color: var(--ok); border-color: var(--ok-line); }
.tag.warn { background: var(--warn-tint); color: var(--warn); border-color: var(--warn-line); }
.tag.bad { background: var(--bad-tint); color: var(--bad); border-color: var(--bad-line); }
.tag.info { background: var(--brand-tint); color: var(--brand); border-color: var(--brand-tint-strong); }
.tag.violet { background: var(--violet-tint); color: var(--violet); border-color: #ddd3fb; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--faint); flex-shrink: 0; }
.dot.ok { background: var(--ok); } .dot.warn { background: #f59e0b; } .dot.bad { background: var(--bad); } .dot.info { background: var(--brand); }

.notice { background: var(--brand-tint); border: 1px solid var(--brand-tint-strong); border-radius: var(--radius-sm); padding: .7rem .85rem; font-size: .9rem; color: var(--ink); }
.notice.warn { background: var(--warn-tint); border-color: var(--warn-line); }
.notice.bad { background: var(--bad-tint); border-color: var(--bad-line); }
.error { color: var(--bad); }
code { background: var(--sunken); padding: .05rem .35rem; border-radius: 6px; font-size: .86em; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 1.25rem; transform: translateX(-50%) translateY(12px); background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 999px; font-size: .88rem; font-weight: 600; box-shadow: var(--shadow-pop); opacity: 0; pointer-events: none; transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out); z-index: 100; max-width: calc(100% - 2rem); }
.toast.show { opacity: 1; transform: translateX(-50%); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
}
