:root {
    --deep-slate: #1b3a4b;
    --pine: #2f6b4f;
    --sunrise-orange: #e2712b;
    --snow: #f7faf9;
    --mist: #e9eef0;
    --ink: #22303a;
    --muted: #607080;
    --radius: 12px;
    --shadow: 0 4px 20px rgba(20, 40, 50, 0.08);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--ink);
    background: var(--snow);
    line-height: 1.5;
}
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---------- Header ---------- */
.site-header {
    background: var(--deep-slate);
    position: sticky; top: 0; z-index: 50;
    box-shadow: var(--shadow);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 17px; }
.brand-flag { font-size: 22px; }
.main-nav { display: flex; align-items: center; gap: 20px; }
.main-nav a { color: #cfe4ee; font-size: 14px; }
.nav-muted { opacity: .75; }
.main-nav a:hover { color: #fff; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 24px; border-radius: 999px; font-weight: 600; font-size: 15px;
    border: none; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease;
}
.btn-primary { background: var(--sunrise-orange); color: #fff; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(226,113,43,.35); }
.btn-outline { background: transparent; border: 2px solid #fff; color: #fff; }
.btn-google {
    background: #fff; color: #222; border: 1px solid #dadce0;
    padding: 12px 20px; width: 100%; font-size: 15px;
}
.btn-google img { width: 20px; height: 20px; }
.btn-small { padding: 8px 16px; font-size: 13px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Hero ---------- */
.hero {
    background: linear-gradient(160deg, var(--deep-slate) 0%, #12222c 100%);
    color: #fff; padding: 90px 0 70px; text-align: center;
    position: relative; overflow: hidden;
}
.hero::after {
    content: ""; position: absolute; inset: auto 0 0 0; height: 60px;
    background: var(--snow);
    clip-path: polygon(0 100%, 8% 40%, 18% 70%, 30% 20%, 42% 60%, 55% 10%, 68% 55%, 80% 25%, 92% 65%, 100% 30%, 100% 100%);
}
.hero-eyebrow { color: var(--sunrise-orange); letter-spacing: 2px; font-weight: 700; font-size: 13px; text-transform: uppercase; }
.hero h1 { font-size: 42px; margin: 14px 0 8px; }
.hero p.tagline { font-size: 19px; color: #cfe4ee; margin-bottom: 30px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-meta { display: flex; gap: 26px; justify-content: center; margin-top: 34px; flex-wrap: wrap; color: #b8ccd6; font-size: 14px; }

/* ---------- Sections ---------- */
section { padding: 60px 0; }
.section-title { text-align: center; margin-bottom: 8px; font-size: 30px; color: var(--deep-slate); }
.section-subtitle { text-align: center; color: var(--muted); max-width: 620px; margin: 0 auto 40px; }

/* Category cards */
.categories-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.category-card {
    background: #fff; border-radius: var(--radius); padding: 30px; text-align: center;
    box-shadow: var(--shadow); border-top: 5px solid var(--sunrise-orange);
}
.category-card:nth-child(2) { border-top-color: var(--pine); }
.category-card:nth-child(3) { border-top-color: var(--deep-slate); }
.category-card .emoji { font-size: 40px; }
.category-card h3 { font-size: 22px; margin: 10px 0 4px; }
.category-card p { color: var(--muted); font-size: 14px; }

/* Why participate */
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.why-item { background: #fff; padding: 20px; border-radius: var(--radius); box-shadow: var(--shadow); font-size: 15px; }

/* ---------- Forms ---------- */
.form-card {
    background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 36px; max-width: 720px; margin: 0 auto;
}
.form-card h2 { margin-top: 0; color: var(--deep-slate); }
.google-profile-chip {
    display: flex; align-items: center; gap: 12px; background: var(--mist);
    padding: 12px 16px; border-radius: var(--radius); margin-bottom: 24px;
}
.google-profile-chip img { width: 40px; height: 40px; border-radius: 50%; }
.google-profile-chip .name { font-weight: 600; }
.google-profile-chip .email { font-size: 13px; color: var(--muted); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 4px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink); }
.field small { color: var(--muted); font-size: 12px; }
input, select, textarea {
    padding: 11px 14px; border-radius: 8px; border: 1px solid #d4dde0;
    font-size: 15px; font-family: inherit; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--sunrise-orange); }
textarea { resize: vertical; min-height: 70px; }
.checkbox-row { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; }
.checkbox-row input { width: 18px; height: 18px; margin-top: 3px; }

.alert { padding: 14px 18px; border-radius: 8px; margin-bottom: 20px; font-size: 14px; }
.alert-error { background: #fdecea; color: #a12a1f; border: 1px solid #f5c2bc; }
.alert-success { background: #e9f7ef; color: #1c6b3d; border: 1px solid #bfe6cd; }

/* Login page */
.login-box {
    max-width: 420px; margin: 80px auto; background: #fff; padding: 40px;
    border-radius: var(--radius); box-shadow: var(--shadow); text-align: center;
}
.login-box h2 { color: var(--deep-slate); }

/* Confirmation */
.confirm-box { max-width: 560px; margin: 0 auto; text-align: center; }
.confirm-box .check { font-size: 60px; }
.bib-badge {
    display: inline-block; background: var(--deep-slate); color: #fff;
    padding: 10px 26px; border-radius: 999px; font-size: 20px; font-weight: 700;
    letter-spacing: 1px; margin: 16px 0;
}

/* ---------- Admin ---------- */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar { width: 230px; background: var(--deep-slate); color: #fff; padding: 24px 0; flex-shrink: 0; }
.admin-sidebar a { display: block; padding: 12px 24px; color: #cfe4ee; font-size: 14px; }
.admin-sidebar a.active, .admin-sidebar a:hover { background: rgba(255,255,255,.08); color: #fff; }
.admin-sidebar .brand { padding: 0 24px 20px; color: #fff; font-weight: 700; }
.admin-main { flex: 1; padding: 30px; background: var(--mist); }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 30px; }
.stat-card { background: #fff; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.stat-card .num { font-size: 30px; font-weight: 700; color: var(--deep-slate); }
.stat-card .label { color: var(--muted); font-size: 13px; }
.table-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--mist); white-space: nowrap; }
th { background: var(--mist); position: sticky; top: 0; }
.badge { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-registered { background: #e6f0ff; color: #1a4fa0; }
.badge-confirmed { background: #e9f7ef; color: #1c6b3d; }
.badge-cancelled { background: #fdecea; color: #a12a1f; }
.badge-yes { background: #e9f7ef; color: #1c6b3d; }
.badge-no { background: #fdecea; color: #a12a1f; }
.toolbar { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar input, .toolbar select { padding: 9px 12px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--deep-slate); color: #cfe4ee; margin-top: 60px; }
.footer-inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 30px; padding: 50px 0 30px; }
.site-footer h3, .site-footer h4 { color: #fff; margin-top: 0; }
.site-footer a { color: #a9c8d6; }
.footer-bottom { text-align: center; padding: 16px; font-size: 12px; border-top: 1px solid rgba(255,255,255,.1); color: #9ab5c2; }
