:root {
    --green-900: #0a2218;
    --green-800: #0f3326;
    --green-700: #144d38;
    --green-600: #1a6649;
    --green-400: #2d9e72;
    --green-200: #8dd4b5;
    --green-100: #c6edde;
    --green-50:  #eaf7f1;
    --gold-600:  #b8860b;
    --gold-500:  #c8971a;
    --gold-400:  #d4a929;
    --gold-200:  #ead88a;
    --gold-100:  #f5ecc0;
    --gold-50:   #fdf8e6;
    --red-600:   #c0392b;
    --red-100:   #fde8e5;
    --neutral-900: #1a1a1a;
    --neutral-700: #3d3d3d;
    --neutral-500: #6b6b6b;
    --neutral-300: #c0bfba;
    --neutral-200: #e0dfdb;
    --neutral-100: #f4f3f0;
    --neutral-50:  #fafaf8;
    --white: #ffffff;
    --font-display: 'Inter', Arial, serif;
    --font-body: 'Inter', 'Segoe UI', sans-serif;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --shadow-card: 0 4px 32px rgba(10,34,24,0.12), 0 1px 4px rgba(10,34,24,0.06);
    --shadow-focus: 0 0 0 3px rgba(45,158,114,0.28);
    --transition: 180ms cubic-bezier(0.4, 0, 0.2, 1);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    background-color: var(--neutral-100);
    background-image:
    linear-gradient(var(--neutral-200) 1px, transparent 1px),
    linear-gradient(90deg, var(--neutral-200) 1px, transparent 1px);
    background-size: 48px 48px;
    color: var(--neutral-900);
    min-height: 100vh;
    line-height: 1.6;
}
.page-header {
    position: relative;
    background: var(--green-900);
    overflow: hidden;
    border-bottom: none;
}
.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(200,151,26,0.18) 0%, transparent 70%),
    repeating-linear-gradient(-45deg,
        transparent, transparent 38px,
        rgba(255,255,255,0.018) 38px, rgba(255,255,255,0.018) 39px);
    pointer-events: none;
}
.page-header::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, var(--gold-500) 20%, var(--gold-200) 50%, var(--gold-500) 80%, transparent 100%);
}
.page-header__inner {
    position: relative;
    z-index: 1;
    max-width: 780px;
    margin: 0 auto;
    padding: 2.75rem 1.5rem 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    text-align: center;
}
.page-header__flag {
    display: flex;
    width: 120px;
    height: 7px;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 1.6rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
.page-header__flag span { flex: 1; }
.flag-red   { background: #ce1126; }
.flag-gold  { background: #fcd116; }
.flag-green { background: #006b3f; }
.page-header__crest {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.1rem;
    margin-bottom: 1.4rem;
}
.page-header__seal {
    width: 110px;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.page-header__seal svg {
    width: 38px;
    height: 38px;
}
.page-header__org {
    text-align: left;
}
.page-header__org-name {
    font-family: var(--font-display);
    font-size: clamp(0.8rem, 2.2vw, 1rem);
    font-weight: 600;
    color: var(--gold-200);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1.3;
}
.page-header__org-sub {
    font-size: 0.72rem;
    color: rgba(141, 212, 181, 0.7);
    font-weight: 300;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-top: 2px;
}
.page-header__divider {
    width: 48px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold-400), transparent);
    margin: 0 auto 1.25rem;
}
.page-header__title {
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 4.5vw, 2.1rem);
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.5px;
    line-height: 1.25;
    margin-bottom: 0.6rem;
    max-width: 560px;
}
.page-header__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: linear-gradient(135deg, rgba(200,151,26,0.25), rgba(200,151,26,0.1));
    border: 1px solid rgba(212,169,41,0.4);
    color: var(--gold-200);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.35rem 0.85rem;
    border-radius: 99px;
    margin-bottom: 0.85rem;
}
.page-header__badge::before {
    content: '';
    width: 6px; height: 6px;
    background: var(--gold-400);
    border-radius: 50%;
    flex-shrink: 0;
}
.page-header__sub {
    font-size: 0.875rem;
    color: rgba(141,212,181,0.85);
    font-weight: 300;
    max-width: 440px;
    line-height: 1.6;
}
.page-header__stats {
    display: flex;
    gap: 0;
    margin-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 1.5rem;
    width: 100%;
    max-width: 480px;
    justify-content: center;
}
.page-header__stat {
    flex: 1;
    text-align: center;
    padding: 0 1rem;
    border-right: 1px solid rgba(255,255,255,0.08);
}
.page-header__stat:last-child { border-right: none; }
.page-header__stat-val {
    display: block;
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--gold-200);
    line-height: 1;
    margin-bottom: 0.25rem;
}
.page-header__stat-label {
    font-size: 0.65rem;
    color: rgba(141,212,181,0.65);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
}
@media (max-width: 480px) {
    .page-header__crest { flex-direction: column; gap: 0.6rem; }
    .page-header__org   { text-align: center; }
    .page-header__stats { gap: 0; }
    .page-header__stat  { padding: 0 0.6rem; }
    .page-header__stat-val { font-size: 1.1rem; }
}
.container {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 1rem;
}
.form-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    margin: 2.5rem auto;
    overflow: hidden;
}
.form-card__header {
    background: var(--green-50);
    border-bottom: 1px solid var(--green-100);
    padding: 1.25rem 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.form-card__header-icon {
    width: 36px;
    height: 36px;
    background: var(--green-700);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.form-card__header-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: var(--green-100);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.form-card__header-text h2 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--green-800);
}
.form-card__header-text p {
    font-size: 0.78rem;
    color: var(--green-600);
}
.form-card__body {
    padding: 2rem;
}
.field-group {
    margin-bottom: 1.35rem;
    position: relative;
}
.field-group label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--neutral-700);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 0.45rem;
}
.field-group label .req {
    color: var(--red-600);
    margin-left: 3px;
}
.field-group input[type="text"],
.field-group input[type="date"],
.field-group select {
    display: block;
    width: 100%;
    padding: 0.7rem 0.95rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--neutral-900);
    background: var(--neutral-50);
    border: 1.5px solid var(--neutral-300);
    border-radius: var(--radius-md);
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
    appearance: none;
    -webkit-appearance: none;
}
.field-group input[type="text"]:hover,
.field-group input[type="date"]:hover,
.field-group select:hover {
    border-color: var(--green-400);
    background: var(--white);
}
.field-group input[type="text"]:focus,
.field-group input[type="date"]:focus,
.field-group select:focus {
    border-color: var(--green-600);
    background: var(--white);
    box-shadow: var(--shadow-focus);
}
.field-group.has-error input,
.field-group.has-error select {
    border-color: var(--red-600);
    background: var(--red-100);
}
.field-group.has-error input:focus,
.field-group.has-error select:focus {
    box-shadow: 0 0 0 3px rgba(192,57,43,0.2);
}
.select-wrapper {
    position: relative;
}
.select-wrapper::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--neutral-500);
    pointer-events: none;
}
.field-hint {
    font-size: 0.75rem;
    margin-top: 0.35rem;
    color: var(--neutral-500);
    display: flex;
    align-items: flex-start;
    gap: 4px;
}
.field-error {
    font-size: 0.75rem;
    margin-top: 0.35rem;
    color: var(--red-600);
    display: none;
    align-items: flex-start;
    gap: 4px;
    font-weight: 500;
}
.field-group.has-error .field-error { display: flex; }
.field-group.has-error .field-hint  { display: none; }
.radio-group {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.radio-option {
    flex: 1;
    min-width: 90px;
}
.radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.radio-option label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.65rem 0.5rem;
    background: var(--neutral-50);
    border: 1.5px solid var(--neutral-300);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--neutral-700);
    letter-spacing: 0;
    text-transform: none;
    text-align: center;
    transition: all var(--transition);
    user-select: none;
}
.radio-option label::before {
    content: '';
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 2px solid var(--neutral-300);
    background: var(--white);
    flex-shrink: 0;
    transition: all var(--transition);
}
.radio-option input[type="radio"]:checked + label {
    background: var(--gold-50);
    border-color: var(--gold-500);
    color: var(--gold-600);
    font-weight: 600;
}
.radio-option input[type="radio"]:checked + label::before {
    border-color: var(--gold-500);
    background: var(--gold-500);
    box-shadow: inset 0 0 0 3px var(--white);
}
.radio-option label:hover {
    border-color: var(--gold-400);
    background: var(--gold-50);
}
.radio-option input[type="radio"]:focus-visible + label {
    box-shadow: var(--shadow-focus);
}
.pin-input-wrapper {
    position: relative;
}
.pin-input-wrapper input {
    padding-left: 0.95rem;
    font-family: 'Courier New', 'Consolas', monospace;
    font-size: 1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.pin-progress {
    margin-top: 0.5rem;
    height: 3px;
    background: var(--neutral-200);
    border-radius: 99px;
    overflow: hidden;
}
.pin-progress-fill {
    height: 100%;
    border-radius: 99px;
    width: 0%;
    background: var(--neutral-300);
    transition: width 0.3s ease, background 0.3s ease;
}
.btn-submit {
    width: 100%;
    padding: 0.85rem 1.5rem;
    margin-top: 0.5rem;
    background: var(--green-700);
    color: var(--white);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.02em;
}
.btn-submit:hover:not(:disabled) {
    background: var(--green-600);
    box-shadow: 0 4px 16px rgba(15,51,38,0.3);
}
.btn-submit:active:not(:disabled) {
    transform: scale(0.985);
}
.btn-submit:disabled {
    background: var(--neutral-300);
    cursor: not-allowed;
}
.btn-submit:focus-visible {
    outline: none;
    box-shadow: var(--shadow-focus);
}
.btn-submit .spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin-right: 8px;
    vertical-align: -3px;
}
.btn-submit.loading .spinner { display: inline-block; }
.btn-submit.loading .btn-text { opacity: 0.7; }
@keyframes spin {
    to { transform: rotate(360deg); }
}
.alert {
    display: none;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.1rem;
    border-radius: var(--radius-md);
    margin-top: 1rem;
    font-size: 0.875rem;
    line-height: 1.5;
}
.alert.visible { display: flex; }
.alert-success {
    background: var(--green-50);
    border: 1px solid var(--green-200);
    color: var(--green-800);
}
.alert-error {
    background: var(--red-100);
    border: 1px solid #f0a8a0;
    color: var(--red-600);
}
.alert-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 1px;
}
.section-divider {
    text-align: center;
    padding: 1rem 0;
    color: var(--neutral-500);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    position: relative;
}
.section-divider::before,
.section-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: var(--neutral-200);
}
.section-divider::before { left: 0; }
.section-divider::after  { right: 0; }
.no-js-banner {
    background: var(--gold-100);
    border: 1px solid var(--gold-200);
    color: var(--gold-600);
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    text-align: center;
}
.js-hidden { display: none !important; }
.reports-section {
    margin: 0 auto 3.5rem;
}
.reports-section__heading {
    text-align: center;
    margin-bottom: 2rem;
}
.reports-section__heading h2 {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 4vw, 1.9rem);
    font-weight: 700;
    color: var(--green-800);
    letter-spacing: -0.4px;
    margin-bottom: 0.4rem;
}
.reports-section__heading p {
    font-size: 0.875rem;
    color: var(--neutral-500);
    max-width: 420px;
    margin: 0 auto;
}
.reports-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}
@media (min-width: 600px) {
    .reports-grid { grid-template-columns: 1fr 1fr; }
    .report-card--wide { grid-column: span 2; }
}
.report-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}
.report-card__meta {
    padding: 1.25rem 1.5rem 0.75rem;
}
.report-card__badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--green-50);
    border: 1px solid var(--green-100);
    color: var(--green-700);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 99px;
    margin-bottom: 0.6rem;
}
.report-card__badge svg {
    width: 12px;
    height: 12px;
    stroke: currentColor;
    stroke-width: 2.5;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.report-card__title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--neutral-900);
    margin-bottom: 0.35rem;
}
.report-card__desc {
    font-size: 0.825rem;
    color: var(--neutral-500);
    line-height: 1.55;
}
.report-card__insights {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0.75rem 1.5rem 1.25rem;
}
.insight-chip {
    background: var(--gold-50);
    border: 1px solid var(--gold-100);
    color: var(--gold-600);
    font-size: 0.72rem;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 99px;
}
.chart-container {
    padding: 0 1.25rem 1.25rem;
    position: relative;
}
footer {
    background: var(--green-900);
    color: var(--green-200);
    text-align: center;
    padding: 1.5rem;
    font-size: 0.78rem;
}
footer strong { color: var(--gold-200); }
.tab-nav {
    display: flex;
    gap: 0;
    background: var(--white);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    border: 1px solid var(--neutral-200);
    border-bottom: none;
    overflow: hidden;
    margin: 2.5rem auto 0;
    box-shadow: 0 -2px 12px rgba(10,34,24,0.06);
}
.tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.9rem 1rem;
    background: var(--neutral-100);
    border: none;
    border-bottom: 3px solid transparent;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--neutral-500);
    cursor: pointer;
    transition: all var(--transition);
    letter-spacing: 0.01em;
}
.tab-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}
.tab-btn:hover {
    background: var(--green-50);
    color: var(--green-700);
}
.tab-btn.active {
    background: var(--white);
    color: var(--green-800);
    border-bottom-color: var(--gold-500);
}
.tab-btn .tab-badge {
    background: var(--gold-100);
    color: var(--gold-600);
    font-size: 0.68rem;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 99px;
}
.tab-panel {
    display: none;
}
.tab-panel.active {
    display: block;
}
.tab-shell {
    background: var(--white);
    border: 1px solid var(--neutral-200);
    border-top: none;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    box-shadow: var(--shadow-card);
    margin-bottom: 3.5rem;
    overflow: hidden;
}
.tab-shell .form-card {
    margin: 0;
    border-radius: 0;
    box-shadow: none;
}
.tab-shell .reports-section { content-visibility: auto; contain-intrinsic-size: 0 600px;
    margin: 0;
    padding: 2rem 1.5rem 2.5rem;
}
.tab-shell .reports-section__heading {
    margin-bottom: 1.5rem;
}
.autocomplete-wrapper { position: relative; }
.autocomplete-wrapper input { padding-right: 2.5rem; }
.autocomplete-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    padding: 2px 4px;
    display: none;
    color: var(--neutral-500);
}
.autocomplete-clear:hover { color: var(--red-600); }
.autocomplete-dropdown {
    position: fixed;
    background: var(--white);
    border: 1.5px solid var(--green-400);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 32px rgba(10,34,24,0.18);
    max-height: 240px;
    overflow-y: auto;
    z-index: 9999;
    display: none;
}
.autocomplete-dropdown.open { display: block; }
.autocomplete-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1rem;
    font-size: 0.875rem;
    color: var(--neutral-900);
    cursor: pointer;
    border-bottom: 1px solid var(--neutral-100);
    transition: background var(--transition);
    gap: 0.5rem;
}
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover,
.autocomplete-item.highlighted {
    background: var(--green-50);
    color: var(--green-800);
}
.autocomplete-item mark {
    background: var(--gold-100);
    color: var(--gold-600);
    font-weight: 700;
    border-radius: 2px;
    padding: 0 1px;
}
.autocomplete-item__type {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--neutral-400);
    flex-shrink: 0;
    background: var(--neutral-100);
    padding: 2px 6px;
    border-radius: 99px;
}
.autocomplete-item.highlighted .autocomplete-item__type,
.autocomplete-item:hover .autocomplete-item__type {
    background: var(--green-100);
    color: var(--green-700);
}
.autocomplete-empty {
    padding: 1rem;
    font-size: 0.825rem;
    color: var(--neutral-500);
    text-align: center;
}
.autocomplete-add {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    font-size: 0.825rem;
    color: var(--green-700);
    font-weight: 600;
    cursor: pointer;
    border-top: 1.5px dashed var(--green-100);
    background: var(--green-50);
    transition: background var(--transition);
}
.autocomplete-add:hover { background: var(--green-100); }
.autocomplete-add svg {
    width: 14px; height: 14px;
    stroke: currentColor; fill: none;
    stroke-width: 2.5; stroke-linecap: round;
    flex-shrink: 0;
}
.autocomplete-add em {
    font-style: normal;
    color: var(--gold-600);
}
.participant-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    margin-top: 1.25rem;
}
.participant-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1.1rem 1.4rem;
    background: var(--green-50);
    border-bottom: 1px solid var(--green-100);
}
.participant-card__title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--green-800);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.participant-count-badge {
    background: var(--green-700);
    color: var(--white);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 99px;
    font-family: var(--font-body);
}
.export-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.btn-export {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.85rem;
    font-family: var(--font-body);
    font-size: 0.775rem;
    font-weight: 600;
    border: 1.5px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    letter-spacing: 0.02em;
}
.btn-export svg {
    width: 13px; height: 13px;
    stroke: currentColor; fill: none;
    stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
}
.btn-export--csv {
    background: var(--green-700);
    color: var(--white);
}
.btn-export--csv:hover { background: var(--green-600); }
.btn-export--json {
    background: transparent;
    border-color: var(--green-600);
    color: var(--green-700);
}
.btn-export--json:hover { background: var(--green-50); }
.btn-export--print {
    background: transparent;
    border-color: var(--gold-500);
    color: var(--gold-600);
}
.btn-export--print:hover { background: var(--gold-50); }
.participant-search {
    padding: 0.65rem 1.4rem;
    border-bottom: 1px solid var(--neutral-100);
}
.participant-search input {
    width: 100%;
    padding: 0.55rem 0.85rem;
    font-family: var(--font-body);
    font-size: 0.85rem;
    border: 1.5px solid var(--neutral-200);
    border-radius: var(--radius-sm);
    outline: none;
    background: var(--neutral-50);
    color: var(--neutral-900);
    transition: border-color var(--transition);
}
.participant-search input:focus {
    border-color: var(--green-400);
    background: var(--white);
}
.participant-table-wrap {
    overflow-x: auto;
}
.participant-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}
.participant-table th {
    background: var(--green-900);
    color: var(--gold-200);
    padding: 0.6rem 0.85rem;
    text-align: left;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
}
.participant-table td {
    padding: 0.6rem 0.85rem;
    border-bottom: 1px solid var(--neutral-100);
    color: var(--neutral-700);
    vertical-align: middle;
    white-space: nowrap;
}
.participant-table tr:hover td { background: var(--green-50); }
.participant-table td:first-child {
    color: var(--neutral-400);
    font-size: 0.72rem;
    width: 32px;
}
.participant-table code {
    font-size: 0.72rem;
    background: var(--neutral-100);
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.06em;
}
.reg-badge {
    font-size: 0.68rem;
    font-weight: 700;
    background: var(--gold-50);
    color: var(--gold-600);
    border: 1px solid var(--gold-100);
    padding: 2px 7px;
    border-radius: 99px;
    letter-spacing: 0.04em;
}
.participant-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    color: var(--neutral-400);
    text-align: center;
    gap: 0.5rem;
}
.participant-empty svg {
    width: 36px; height: 36px;
    stroke: var(--neutral-300); fill: none;
    stroke-width: 1.5; stroke-linecap: round;
}
.participant-empty p {
    font-size: 0.85rem;
    max-width: 260px;
    line-height: 1.5;
}
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10,34,24,0.65);
    backdrop-filter: blur(3px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.modal-overlay.open { display: flex; }
.modal {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: 0 24px 80px rgba(0,0,0,0.35);
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalIn 0.2s ease;
}
@keyframes modalIn {
    from { opacity:0; transform: scale(0.95) translateY(12px); }
    to   { opacity:1; transform: scale(1)    translateY(0);    }
}
.modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    background: var(--green-50);
    border-bottom: 1px solid var(--green-100);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    position: sticky;
    top: 0;
}
.modal__title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--green-800);
}
.modal__ref {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--gold-600);
    background: var(--gold-50);
    border: 1px solid var(--gold-100);
    padding: 2px 8px;
    border-radius: 99px;
}
.modal__close {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: var(--neutral-500);
    line-height: 1;
    padding: 4px 6px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}
.modal__close:hover { background: var(--neutral-100); color: var(--neutral-900); }
.modal__body { padding: 1.5rem; }
.modal__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
    margin-bottom: 0.85rem;
}
.modal__field { display: flex; flex-direction: column; gap: 0.3rem; }
.modal__field label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--neutral-600);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.modal__field input,
.modal__field select {
    padding: 0.6rem 0.85rem;
    font-family: var(--font-body);
    font-size: 0.88rem;
    color: var(--neutral-900);
    background: var(--neutral-50);
    border: 1.5px solid var(--neutral-300);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
    appearance: none;
}
.modal__field input:focus,
.modal__field select:focus {
    border-color: var(--green-600);
    background: var(--white);
    box-shadow: var(--shadow-focus);
}
.modal__footer {
    display: flex;
    gap: 0.6rem;
    justify-content: flex-end;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--neutral-100);
    background: var(--neutral-50);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}
.btn-modal {
    padding: 0.6rem 1.2rem;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
}
.btn-modal--save {
    background: var(--green-700);
    color: var(--white);
}
.btn-modal--save:hover { background: var(--green-600); }
.btn-modal--cancel {
    background: transparent;
    border-color: var(--neutral-300);
    color: var(--neutral-600);
}
.btn-modal--cancel:hover { background: var(--neutral-100); }
.row-actions { display: flex; gap: 0.35rem; align-items: center; }
.btn-row {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px;
    border: 1.5px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    background: none;
    transition: all var(--transition);
}
.btn-row svg { width:13px; height:13px; stroke:currentColor; fill:none; stroke-width:2.2; stroke-linecap:round; stroke-linejoin:round; }
.btn-row--edit  { border-color: var(--green-200); color: var(--green-700); }
.btn-row--edit:hover  { background: var(--green-50);  border-color: var(--green-500); }
.btn-row--delete { border-color: #f0a8a0; color: var(--red-600); }
.btn-row--delete:hover { background: var(--red-100); border-color: var(--red-600); }
.lookup-bar {
    display: flex;
    gap: 0.6rem;
    padding: 0.75rem 1.4rem;
    background: var(--gold-50);
    border-bottom: 1px solid var(--gold-100);
    align-items: center;
}
.lookup-bar input {
    flex: 1;
    padding: 0.5rem 0.85rem;
    font-family: var(--font-body);
    font-size: 0.85rem;
    border: 1.5px solid var(--gold-200);
    border-radius: var(--radius-sm);
    outline: none;
    background: var(--white);
    transition: border-color var(--transition);
}
.lookup-bar input:focus { border-color: var(--gold-500); }
.lookup-bar span {
    font-size: 0.75rem;
    color: var(--gold-600);
    font-weight: 500;
    white-space: nowrap;
}

/* ─── Admin PIN Gate ────────────────────────────────────────────── */
.pin-gate {
    display:flex;flex-direction:column;align-items:center;justify-content:center;
    padding:3.5rem 1.5rem;text-align:center;min-height:420px;background:var(--white);
}
.pin-gate__icon {
    width:72px;height:72px;background:var(--green-900);border-radius:50%;
    display:flex;align-items:center;justify-content:center;margin-bottom:1.25rem;
    box-shadow:0 0 0 8px rgba(20,77,56,0.1);
}
.pin-gate__icon svg { width:32px;height:32px;stroke:var(--gold-200);fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round; }
.pin-gate__title { font-family:var(--font-display);font-size:1.25rem;font-weight:700;color:var(--green-800);margin-bottom:0.35rem; }
.pin-gate__sub { font-size:0.83rem;color:var(--neutral-500);margin-bottom:1.75rem;max-width:300px;line-height:1.55; }
.pin-gate__input-row { display:flex;gap:0.5rem;margin-bottom:0.75rem;justify-content:center; }
.pin-gate__input {
    width:200px;padding:0.75rem 1rem;font-family:'Courier New',monospace;
    font-size:1.1rem;letter-spacing:0.2em;text-align:center;
    border:2px solid var(--neutral-300);border-radius:var(--radius-md);outline:none;
    transition:border-color var(--transition),box-shadow var(--transition);background:var(--neutral-50);
}
.pin-gate__input:focus { border-color:var(--green-600);box-shadow:var(--shadow-focus);background:var(--white); }
.pin-gate__input.shake { animation:shake 0.4s ease;border-color:var(--red-600);background:var(--red-100); }
@keyframes shake { 0%,100%{transform:translateX(0)} 20%{transform:translateX(-8px)} 40%{transform:translateX(8px)} 60%{transform:translateX(-5px)} 80%{transform:translateX(5px)} }
.pin-gate__btn {
    padding:0.75rem 1.5rem;background:var(--green-700);color:var(--white);
    font-family:var(--font-body);font-size:0.9rem;font-weight:600;
    border:none;border-radius:var(--radius-md);cursor:pointer;transition:background var(--transition);
}
.pin-gate__btn:hover { background:var(--green-600); }
.pin-gate__btn:disabled { background:var(--neutral-300);cursor:not-allowed; }
.pin-gate__error { font-size:0.8rem;color:var(--red-600);font-weight:500;min-height:20px;margin-bottom:0.5rem; }
.pin-gate__attempts { font-size:0.72rem;color:var(--neutral-400);margin-top:0.5rem; }
.analytics-lock-btn {
    display:inline-flex;align-items:center;gap:0.4rem;padding:0.35rem 0.8rem;
    background:transparent;border:1.5px solid rgba(255,255,255,0.2);
    color:rgba(255,255,255,0.7);border-radius:99px;
    font-family:var(--font-body);font-size:0.72rem;font-weight:600;
    cursor:pointer;transition:all var(--transition);letter-spacing:0.04em;
}
.analytics-lock-btn svg { width:11px;height:11px;stroke:currentColor;fill:none;stroke-width:2.5;stroke-linecap:round; }
.analytics-lock-btn:hover { background:rgba(255,255,255,0.1);color:var(--white); }
/* ─── Headcount Counter Bar ─────────────────────────────────────── */
.headcount-bar {
    display:grid;grid-template-columns:repeat(4,1fr);gap:0;
    background:var(--green-900);border-radius:var(--radius-lg) var(--radius-lg) 0 0;
    overflow:hidden;margin-bottom:0;box-shadow:var(--shadow-card);
}
.hc-stat { padding:1.1rem 0.75rem;text-align:center;border-right:1px solid rgba(255,255,255,0.07);position:relative; }
.hc-stat:last-child { border-right:none; }
.hc-stat__val {
    display:block;font-family:var(--font-display);font-size:2rem;font-weight:700;
    color:var(--gold-200);line-height:1;margin-bottom:0.25rem;transition:transform 0.3s ease;
}
.hc-stat__val.bump { animation:bump 0.3s ease; }
@keyframes bump { 0%{transform:scale(1)} 50%{transform:scale(1.18)} 100%{transform:scale(1)} }
.hc-stat__label { font-size:0.65rem;font-weight:600;color:rgba(141,212,181,0.7);text-transform:uppercase;letter-spacing:0.08em; }
.hc-stat__icon { position:absolute;top:10px;right:10px;opacity:0.2;font-size:1rem; }
.capacity-row {
    background:var(--green-900);padding:0 1rem 1rem;
    border-radius:0 0 var(--radius-lg) var(--radius-lg);margin-bottom:1.25rem;box-shadow:var(--shadow-card);
}
.capacity-row__label {
    display:flex;justify-content:space-between;
    font-size:0.72rem;color:rgba(141,212,181,0.7);font-weight:500;margin-bottom:0.4rem;letter-spacing:0.04em;
}
.capacity-row__label strong { color:var(--gold-200);font-size:0.8rem; }
.capacity-track { height:8px;background:rgba(255,255,255,0.1);border-radius:99px;overflow:hidden; }
.capacity-fill {
    height:100%;border-radius:99px;
    background:linear-gradient(90deg,var(--green-400),var(--gold-400));
    transition:width 0.6s cubic-bezier(0.4,0,0.2,1);width:0%;
}
@media(max-width:480px) { .headcount-bar{grid-template-columns:1fr 1fr;} .hc-stat__val{font-size:1.5rem;} }

/* ── Registration Mode Switcher ───────────────────────────────────────── */
.reg-mode-switcher {
    display:flex;gap:0;margin-bottom:1.5rem;
    border:1.5px solid var(--neutral-200);border-radius:var(--radius-md);overflow:hidden;
}
.reg-mode-btn {
    flex:1;padding:0.65rem 1rem;font-size:0.85rem;font-weight:600;cursor:pointer;
    background:var(--neutral-50);color:var(--neutral-500);border:none;
    transition:background 0.18s,color 0.18s;line-height:1.3;text-align:center;
}
.reg-mode-btn + .reg-mode-btn { border-left:1.5px solid var(--neutral-200); }
.reg-mode-btn.active {
    background:var(--green-700);color:#fff;
}
.reg-mode-btn .mode-icon { display:block;font-size:1.1rem;margin-bottom:0.15rem; }
.reg-mode-walkin-note {
    display:none;margin-bottom:1.2rem;padding:0.6rem 0.85rem;
    background:#fffbeb;border:1px solid #fde68a;border-radius:var(--radius-md);
    font-size:0.8rem;color:#92400e;line-height:1.5;
}
.reg-mode-walkin-note.visible { display:block; }
