/* ═══════════════════════════════════════════════════════════════════════════
   IMSA 2026 Registration System - Style Sheet  v1.0.6
   Premium dark-mode glassmorphism theme
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Google Fonts ───────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* ── CSS Custom Properties (Design Tokens) ─────────────────────────────── */
:root {
    /* Backgrounds */
    --bg-primary:       #070b14;
    --bg-secondary:     #0d1321;
    --bg-card:          rgba(255, 255, 255, 0.04);
    --bg-card-hover:    rgba(255, 255, 255, 0.07);
    --bg-input:         rgba(255, 255, 255, 0.06);
    --bg-input-focus:   rgba(255, 255, 255, 0.09);
    --bg-nav:           rgba(7, 11, 20, 0.85);
    --bg-detail:        rgba(0, 0, 0, 0.2);
    --bg-table-head:    rgba(0, 180, 216, 0.08);
    --bg-row-hover:     rgba(255, 255, 255, 0.04);

    /* Accents */
    --accent-primary:   #00b4d8;
    --accent-secondary: #7c3aed;
    --accent-gold:      #f59e0b;
    --gradient-primary: linear-gradient(135deg, #00b4d8, #7c3aed);
    --gradient-warm:    linear-gradient(135deg, #f59e0b, #ef4444);
    --gradient-hero:    linear-gradient(160deg, #00b4d8 0%, #7c3aed 50%, #ec4899 100%);

    /* Text */
    --text-primary:     #f1f5f9;
    --text-secondary:   #94a3b8;
    --text-muted:       #64748b;
    --text-link:        #38bdf8;

    /* Borders */
    --border-color:     rgba(255, 255, 255, 0.08);
    --border-focus:     rgba(0, 180, 216, 0.5);
    --border-subtle:    rgba(255, 255, 255, 0.04);

    /* Semantic */
    --color-success:    #10b981;
    --color-warning:    #f59e0b;
    --color-error:      #ef4444;
    --color-info:       #3b82f6;

    /* Shadows */
    --shadow-sm:        0 1px 3px rgba(0,0,0,0.4);
    --shadow-md:        0 4px 16px rgba(0,0,0,0.4);
    --shadow-lg:        0 8px 32px rgba(0,0,0,0.5);
    --shadow-glow:      0 0 20px rgba(0, 180, 216, 0.15);

    /* Radius */
    --radius-sm:  6px;
    --radius-md:  12px;
    --radius-lg:  20px;
    --radius-xl:  28px;

    /* Typography */
    --font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Outfit', 'Inter', sans-serif;

    /* Transitions */
    --ease-out: cubic-bezier(0.33, 1, 0.68, 1);
    --transition-fast: 0.2s var(--ease-out);
    --transition-med:  0.35s var(--ease-out);
}

:root[data-theme="light"] {
    --bg-primary:       #f7fafc;
    --bg-secondary:     #ffffff;
    --bg-card:          rgba(255, 255, 255, 0.86);
    --bg-card-hover:    rgba(255, 255, 255, 0.98);
    --bg-input:         rgba(15, 23, 42, 0.045);
    --bg-input-focus:   #ffffff;
    --bg-nav:           rgba(255, 255, 255, 0.9);
    --bg-detail:        rgba(15, 23, 42, 0.035);
    --bg-table-head:    rgba(0, 180, 216, 0.1);
    --bg-row-hover:     rgba(15, 23, 42, 0.045);

    --text-primary:     #0f172a;
    --text-secondary:   #475569;
    --text-muted:       #64748b;
    --text-link:        #0369a1;

    --border-color:     rgba(15, 23, 42, 0.12);
    --border-subtle:    rgba(15, 23, 42, 0.07);

    --shadow-sm:        0 1px 3px rgba(15, 23, 42, 0.08);
    --shadow-md:        0 6px 18px rgba(15, 23, 42, 0.10);
    --shadow-lg:        0 16px 38px rgba(15, 23, 42, 0.13);
    --shadow-glow:      0 0 20px rgba(0, 180, 216, 0.10);
}

/* ── Reset & Base ──────────────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 15px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    background: var(--bg-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

:root[data-theme="light"] .page-wrapper::before {
    background:
        radial-gradient(ellipse 600px 600px at 20% 30%, rgba(0,180,216,0.10) 0%, transparent 70%),
        radial-gradient(ellipse 500px 500px at 80% 70%, rgba(124,58,237,0.08) 0%, transparent 70%),
        radial-gradient(ellipse 400px 400px at 50% 50%, rgba(245,158,11,0.07) 0%, transparent 70%);
}

a { color: var(--text-link); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--accent-primary); }

img { max-width: 100%; height: auto; display: block; }

/* ── Animated Background ───────────────────────────────────────────────── */
.page-wrapper {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}

.page-wrapper::before {
    content: '';
    position: fixed;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background:
        radial-gradient(ellipse 600px 600px at 20% 30%, rgba(0,180,216,0.07) 0%, transparent 70%),
        radial-gradient(ellipse 500px 500px at 80% 70%, rgba(124,58,237,0.06) 0%, transparent 70%),
        radial-gradient(ellipse 400px 400px at 50% 50%, rgba(236,72,153,0.04) 0%, transparent 70%);
    animation: bgDrift 25s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}

@keyframes bgDrift {
    0%   { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-30px, -20px) rotate(3deg); }
}

/* ── Layout ────────────────────────────────────────────────────────────── */
.container {
    position: relative;
    z-index: 1;
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.container--narrow { max-width: 520px; }
.container--wide   { max-width: 1200px; }

/* ── Navbar ────────────────────────────────────────────────────────────── */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 2rem;
    background: var(--bg-nav);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
}

.navbar__brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--text-primary);
}

.navbar__brand img {
    height: 36px;
    width: auto;
}

.navbar__links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.navbar__links a {
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.navbar__links a:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover);
}

.theme-toggle {
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-input);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.theme-toggle:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover);
    border-color: var(--border-focus);
}

/* ── Cards (Glassmorphism) ─────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-med);
}

.card:hover {
    background: var(--bg-card-hover);
    box-shadow: var(--shadow-lg);
}

.card--static:hover {
    background: var(--bg-card);
    box-shadow: var(--shadow-md);
}

.card__header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.card__icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: var(--gradient-primary);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.card__title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
}

/* ── Typography ────────────────────────────────────────────────────────── */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    line-height: 1.25;
}

h1 { font-size: 2.4rem; font-weight: 800; }
h2 { font-size: 1.6rem; font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; }

.text-gradient {
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-muted    { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-center   { text-align: center; }
.text-success  { color: var(--color-success); }
.text-error    { color: var(--color-error); }
.text-warning  { color: var(--color-warning); }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.6rem;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    line-height: 1.4;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: 0 2px 12px rgba(0,180,216,0.25);
}
.btn-primary:hover {
    box-shadow: 0 4px 20px rgba(0,180,216,0.35);
    transform: translateY(-1px);
    color: #fff;
}

.btn-secondary {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
}

.btn-success {
    background: var(--color-success);
    color: #fff;
}
.btn-success:hover {
    background: #059669;
    color: #fff;
}

.btn-danger {
    background: var(--color-error);
    color: #fff;
}
.btn-danger:hover {
    background: #dc2626;
    color: #fff;
}

.btn-sm {
    padding: 0.4rem 0.9rem;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 0.9rem 2.4rem;
    font-size: 1rem;
    border-radius: var(--radius-md);
}

.btn-block {
    width: 100%;
}

.btn-icon {
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}
.btn-icon:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

/* ── Form Controls ─────────────────────────────────────────────────────── */
.form-section {
    margin-bottom: 2rem;
}

.form-section__title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-section__title span {
    font-size: 1.1rem;
}

.form-group {
    margin-bottom: 1.15rem;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}

.form-label .required {
    color: var(--color-error);
    margin-left: 2px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.65rem 0.9rem;
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    background: var(--bg-input-focus);
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(0,180,216,0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-muted);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8'%3E%3Cpath d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2rem;
}

.form-select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-row--three {
    grid-template-columns: 1fr 1fr 1fr;
}

/* Checkboxes */
.form-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.4rem 0;
    font-size: 0.9rem;
}

.form-checkbox input[type="checkbox"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-input);
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
    position: relative;
}

.form-checkbox input[type="checkbox"]:checked {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.form-checkbox input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.form-checkbox input[type="checkbox"]:focus {
    box-shadow: 0 0 0 3px rgba(0,180,216,0.15);
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.25rem;
}

.checkbox-grid--compact {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.conditional-section,
.conditional-field {
    animation: fadeIn 0.25s var(--ease-out);
}

.form-disclosure {
    padding: 0;
}

.form-disclosure__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    cursor: pointer;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border-color);
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.form-disclosure__summary::marker {
    color: var(--accent-primary);
}

.form-disclosure__summary small {
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-disclosure__notice {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    border: 1px solid rgba(245, 158, 11, 0.45);
    background: rgba(245, 158, 11, 0.16);
    color: #fbbf24 !important;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-disclosure__body {
    padding-top: 1.25rem;
}

.travel-only-note {
    margin-bottom: 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-radius: var(--radius-md);
    background: rgba(245, 158, 11, 0.12);
    color: var(--text-primary);
    font-size: 0.92rem;
    line-height: 1.5;
}

.travel-only-note strong {
    color: #fbbf24;
}

.site-footer {
    position: relative;
    z-index: 1;
    padding: 1rem 1.5rem 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.site-footer__event {
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.site-footer__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.45rem;
    margin-bottom: 0.25rem;
}

.form-error-text {
    font-size: 0.8rem;
    color: var(--color-error);
    margin-top: 0.3rem;
}

.form-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

/* ── Autocomplete Dropdown ─────────────────────────────────────────────── */
.autocomplete-wrapper {
    position: relative;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 260px;
    overflow-y: auto;
    background: rgba(13, 19, 33, 0.97);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 50;
    display: none;
}

.autocomplete-dropdown.active {
    display: block;
    animation: slideDown 0.2s var(--ease-out);
}

.autocomplete-item {
    padding: 0.65rem 0.9rem;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: background var(--transition-fast);
}

.autocomplete-item:hover,
.autocomplete-item.highlighted {
    background: rgba(0, 180, 216, 0.1);
}

.autocomplete-item__name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.autocomplete-item__meta {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.autocomplete-item mark {
    background: rgba(0,180,216,0.25);
    color: var(--accent-primary);
    border-radius: 2px;
    padding: 0 2px;
}

/* ── File Upload Zone ──────────────────────────────────────────────────── */
.file-upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 2rem;
    text-align: center;
    transition: all var(--transition-fast);
    cursor: pointer;
    position: relative;
}

.file-upload-zone:hover,
.file-upload-zone.dragover {
    border-color: var(--accent-primary);
    background: rgba(0, 180, 216, 0.05);
}

.file-upload-zone__icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.6;
}

.file-upload-zone__text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.file-upload-zone__text strong {
    color: var(--accent-primary);
}

.file-upload-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.file-preview-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.file-preview {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.9rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}

.file-preview__name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
}

.file-preview__size {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.file-preview__remove {
    background: none;
    border: none;
    color: var(--color-error);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0 0.25rem;
    opacity: 0.7;
    transition: opacity var(--transition-fast);
}

.file-preview__remove:hover {
    opacity: 1;
}

/* ── Fee Table ─────────────────────────────────────────────────────────── */
.fee-table-wrapper {
    overflow-x: auto;
    margin: 1rem 0;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.fee-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.fee-table thead {
    background: rgba(0, 180, 216, 0.1);
}

.fee-table th {
    font-family: var(--font-display);
    font-weight: 600;
    text-align: left;
    padding: 0.75rem 1rem;
    color: var(--accent-primary);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.fee-table td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    color: var(--text-secondary);
}

.fee-table tbody tr:hover {
    background: rgba(255,255,255,0.03);
}

.fee-table .fee-amount {
    font-weight: 600;
    color: var(--text-primary);
}

.fee-table .fee-remark {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ── Data Table (Admin) ────────────────────────────────────────────────── */
.data-table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.data-table thead {
    background: var(--bg-table-head);
    position: sticky;
    top: 0;
}

.data-table th {
    font-family: var(--font-display);
    font-weight: 600;
    text-align: left;
    padding: 0.7rem 0.9rem;
    color: var(--accent-primary);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.data-table td {
    padding: 0.6rem 0.9rem;
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: background var(--transition-fast);
    cursor: pointer;
}

.data-table tbody tr:hover {
    background: var(--bg-row-hover);
}

.data-table tbody tr.expanded {
    background: rgba(0, 180, 216, 0.05);
}

/* ── Badges ────────────────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.badge-pending {
    background: rgba(245, 158, 11, 0.12);
    color: var(--color-warning);
}
.badge-pending::before { background: var(--color-warning); }

.badge-verified {
    background: rgba(16, 185, 129, 0.12);
    color: var(--color-success);
}
.badge-verified::before { background: var(--color-success); }

.badge-rejected {
    background: rgba(239, 68, 68, 0.12);
    color: var(--color-error);
}
.badge-rejected::before { background: var(--color-error); }

/* ── Filter Bar (Admin) ───────────────────────────────────────────────── */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.filter-bar .form-input,
.filter-bar .form-select {
    width: auto;
    min-width: 180px;
    flex: 1;
}

.filter-bar .search-input {
    flex: 2;
    min-width: 250px;
}

.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.admin-export-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.admin-export-form .form-select {
    flex: 1 1 150px;
    min-width: 150px;
}

.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;
}

.filter-pill {
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    background: var(--bg-input);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.filter-pill:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.filter-pill.active {
    background: rgba(0, 180, 216, 0.15);
    color: var(--accent-primary);
    border-color: rgba(0, 180, 216, 0.3);
}

/* ── Registration Detail Panel (Admin expandable) ──────────────────────── */
.detail-panel {
    display: none;
    padding: 1.25rem;
    background: var(--bg-detail);
    border-top: 1px solid var(--border-color);
    animation: slideDown 0.25s var(--ease-out);
}

.detail-panel.open {
    display: block;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.75rem;
}

.detail-field {
    font-size: 0.83rem;
}

.detail-field__label {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.15rem;
}

.detail-field__value {
    color: var(--text-primary);
    word-break: break-word;
}

.detail-files {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.detail-file-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--text-link);
    transition: all var(--transition-fast);
}

.detail-file-link:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-focus);
}

.invoice-request-card,
.detail-file-group,
.admin-doc-upload {
    margin-top: 1rem;
    padding: 0.85rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.detail-file-group__title {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.admin-doc-upload {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.admin-doc-upload-form {
    min-width: 0;
}

.admin-doc-upload__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.5rem;
    align-items: center;
}

.admin-doc-upload__row .form-input {
    min-width: 0;
}

.admin-registration-edit-form {
    margin-top: 1rem;
    padding: 0.85rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.admin-edit-form__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.admin-edit-form__header h4 {
    margin: 0;
    font-size: 0.95rem;
}

.admin-edit-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.admin-edit-field {
    display: grid;
    gap: 0.3rem;
    min-width: 0;
}

.admin-edit-field span {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.admin-edit-field--wide,
.admin-edit-checks {
    grid-column: span 3;
}

.admin-edit-checks {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
    padding-top: 0.25rem;
}

.admin-edit-checkbox {
    min-width: 0;
}

.detail-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

/* ── Landing Page ──────────────────────────────────────────────────────── */
.landing-hero {
    text-align: center;
    padding: 3rem 0 2rem;
}

.landing-logo {
    max-height: 100px;
    margin: 0 auto 1.5rem;
}

.landing-hero h1 {
    margin-bottom: 0.5rem;
}

.landing-hero p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 500px;
    margin: 0 auto;
}

.landing-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 2.5rem;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.landing-option {
    text-align: center;
    padding: 2.5rem 1.5rem;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
}

.landing-option::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity var(--transition-med);
    border-radius: inherit;
}

.landing-option:first-child::before {
    background: linear-gradient(135deg, rgba(0,180,216,0.08), rgba(124,58,237,0.08));
}

.landing-option:last-child::before {
    background: linear-gradient(135deg, rgba(245,158,11,0.08), rgba(239,68,68,0.08));
}

.landing-option:hover::before {
    opacity: 1;
}

.landing-option:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.landing-option__icon {
    font-size: 2.8rem;
    margin-bottom: 1rem;
}

.landing-option__title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.landing-option__desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ── Toast / Notifications ─────────────────────────────────────────────── */
.toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.35s var(--ease-out), fadeOut 0.3s var(--ease-out) 3.5s forwards;
    max-width: 380px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toast--success {
    background: rgba(16,185,129,0.15);
    border: 1px solid rgba(16,185,129,0.3);
    color: var(--color-success);
}

.toast--error {
    background: rgba(239,68,68,0.15);
    border: 1px solid rgba(239,68,68,0.3);
    color: var(--color-error);
}

.toast--info {
    background: rgba(59,130,246,0.15);
    border: 1px solid rgba(59,130,246,0.3);
    color: var(--color-info);
}

/* ── Loading Spinner ───────────────────────────────────────────────────── */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    display: inline-block;
}

.spinner--lg {
    width: 36px;
    height: 36px;
    border-width: 3px;
}

.loading-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(7, 11, 20, 0.7);
    backdrop-filter: blur(4px);
    z-index: 999;
}

/* ── Stats Cards (Admin) ───────────────────────────────────────────────── */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    padding: 1.25rem;
    text-align: center;
}

.stat-card__value {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.3rem;
}

.stat-card__label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ── Payment Info Box ──────────────────────────────────────────────────── */
.info-box {
    padding: 1.25rem;
    border-radius: var(--radius-md);
    background: rgba(59, 130, 246, 0.06);
    border: 1px solid rgba(59, 130, 246, 0.15);
    margin-bottom: 1.5rem;
}

.info-box__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--color-info);
    margin-bottom: 0.5rem;
}

.info-box p, .info-box li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ── Alert boxes ───────────────────────────────────────────────────────── */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
}

.alert-success {
    background: rgba(16,185,129,0.1);
    border: 1px solid rgba(16,185,129,0.2);
    color: var(--color-success);
}

.alert-error {
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.2);
    color: var(--color-error);
}

.alert-warning {
    background: rgba(245,158,11,0.1);
    border: 1px solid rgba(245,158,11,0.2);
    color: var(--color-warning);
}

.alert-info {
    background: rgba(59,130,246,0.1);
    border: 1px solid rgba(59,130,246,0.2);
    color: var(--color-info);
}

/* ── Keyframes ─────────────────────────────────────────────────────────── */
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(60px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to   { opacity: 0; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.5; }
}

@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* page-level entrance */
.fade-in     { animation: fadeIn 0.4s var(--ease-out); }
.slide-up    { animation: slideUp 0.5s var(--ease-out); }

/* ── Utility Classes ───────────────────────────────────────────────────── */
.flex            { display: flex; }
.flex-col        { flex-direction: column; }
.flex-wrap       { flex-wrap: wrap; }
.items-center    { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.gap-sm          { gap: 0.5rem; }
.gap-md          { gap: 1rem; }
.gap-lg          { gap: 1.5rem; }
.mt-0            { margin-top: 0; }
.mt-1            { margin-top: 0.5rem; }
.mt-2            { margin-top: 1rem; }
.mt-3            { margin-top: 1.5rem; }
.mt-4            { margin-top: 2rem; }
.mb-0            { margin-bottom: 0; }
.mb-1            { margin-bottom: 0.5rem; }
.mb-2            { margin-bottom: 1rem; }
.mb-3            { margin-bottom: 1.5rem; }
.mb-4            { margin-bottom: 2rem; }
.p-0             { padding: 0; }
.p-1             { padding: 0.5rem; }
.p-2             { padding: 1rem; }
.hidden          { display: none !important; }
.w-full          { width: 100%; }
.truncate        { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    html { font-size: 14px; }

    .container { padding: 1.25rem 1rem; }

    .form-row,
    .form-row--three {
        grid-template-columns: 1fr;
    }

    .landing-options {
        grid-template-columns: 1fr;
    }

    .navbar {
        padding: 0.6rem 1rem;
    }

    .navbar__links {
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-bar .form-input,
    .filter-bar .form-select,
    .filter-bar .search-input {
        width: 100%;
        min-width: unset;
    }

    .admin-export-form {
        width: 100%;
        margin-left: 0;
    }

    .admin-export-form .btn {
        flex: 0 0 auto;
    }

    .admin-export-form .form-select {
        width: auto;
        min-width: 0;
    }

    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .data-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .data-table {
        min-width: 760px;
    }

    .admin-doc-upload {
        grid-template-columns: 1fr;
    }

    .admin-edit-grid,
    .admin-edit-checks {
        grid-template-columns: 1fr;
    }

    .admin-edit-field--wide,
    .admin-edit-checks {
        grid-column: span 1;
    }

    .card { padding: 1.25rem; }
    h1 { font-size: 1.8rem; }
}

@media (max-width: 480px) {
    .stats-row {
        grid-template-columns: 1fr;
    }

    .checkbox-grid {
        grid-template-columns: 1fr;
    }

    .detail-actions {
        flex-direction: column;
    }

    .admin-doc-upload__row {
        grid-template-columns: 1fr;
    }
}
