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

/* ============================================================
   Design tokens
   ============================================================ */
:root {
    --primary:       #0087FF;
    --primary-dark:  #006DD6;
    --primary-light: rgba(0, 135, 255, 0.1);

    /* Surfaces — off-white / off-dark, never pure #FFF or #000 */
    --bg:            #F1F3F7;
    --card:          #FFFFFF;
    --border:        #E2E6EE;
    --border-strong: #C8CFD9;

    /* Text hierarchy */
    --text:           #0F1923;
    --text-secondary: #4A5568;
    --text-muted:     #8E98A8;

    /* Semantic */
    --success: #16A34A;
    --error:   #DC2626;

    /* Geometry */
    --radius:    12px;
    --radius-sm:  8px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   Header (racer PWA + management login)
   ============================================================ */
header {
    background: var(--primary);
    color: white;
    height: 52px;
    display: flex;
    align-items: center;
    padding: 0 1rem;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 1px 0 rgba(0,0,0,0.1);
}

.header-inner {
    max-width: 560px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.4px;
}

.lang-btn {
    background: rgba(255,255,255,0.15);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 6px;
    padding: 3px 10px;
    font-size: 0.78rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    letter-spacing: 0.4px;
    transition: background 0.15s;
}
.lang-btn:hover { background: rgba(255,255,255,0.25); }

/* ============================================================
   Main layout
   ============================================================ */
main {
    max-width: 560px;
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
}

/* ============================================================
   Card
   ============================================================ */
.card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 1.75rem 1.5rem;
    box-shadow: 0 1px 3px rgba(15,25,35,0.07), 0 4px 16px rgba(15,25,35,0.04);
}

.card h1 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    letter-spacing: -0.3px;
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 1.75rem;
}

/* Two-column row */
.row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1rem;
}

/* ============================================================
   Form fields
   ============================================================ */
.field { margin-bottom: 1.1rem; }

.field label:not(.radio-label) {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
    letter-spacing: 0.1px;
    text-transform: uppercase;
}

input[type="text"],
input[type="email"],
input[type="date"],
input[type="time"],
input[type="password"],
input[type="number"],
select {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text);
    background: white;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0,135,255,0.12);
}

input.invalid { border-color: var(--error); }
input.invalid:focus { box-shadow: 0 0 0 3px rgba(220,38,38,0.12); }

/* Radio group */
.radio-group {
    display: flex;
    gap: 1.25rem;
    margin-top: 0.35rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.92rem;
    cursor: pointer;
    user-select: none;
}

.radio-label input[type="radio"] {
    width: 17px;
    height: 17px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* Hints and errors */
.hint {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.error {
    display: block;
    font-size: 0.75rem;
    color: var(--error);
    margin-top: 0.25rem;
    min-height: 1.1em;
}

.required-mark { color: var(--error); font-weight: 700; }

/* ============================================================
   Buttons
   ============================================================ */
.btn-primary {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0.8rem 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    margin-top: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background 0.15s, transform 0.1s;
    letter-spacing: -0.1px;
}
.btn-primary:hover:not(:disabled) { background: var(--primary-dark); }
.btn-primary:active:not(:disabled) { transform: scale(0.99); }
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-secondary {
    width: 100%;
    background: transparent;
    color: var(--text);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 0.92rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    margin-top: 0.75rem;
    text-align: center;
    transition: background 0.15s, border-color 0.15s;
}
.btn-secondary:hover { background: var(--bg); border-color: var(--border-strong); }

/* ============================================================
   Spinner
   ============================================================ */
.spinner {
    width: 17px;
    height: 17px;
    border: 2px solid rgba(255,255,255,0.35);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.65s linear infinite;
}

.spinner-dark {
    width: 26px;
    height: 26px;
    border: 2.5px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.65s linear infinite;
    display: inline-block;
}

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

/* ============================================================
   Auth toggle
   ============================================================ */
.auth-toggle {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.link-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-size: inherit;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ============================================================
   Success card
   ============================================================ */
#success-card { text-align: center; }

.success-icon {
    width: 56px;
    height: 56px;
    background: var(--success);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1.25rem;
}

#success-card h1 { margin-bottom: 0.75rem; }
#success-card p { color: var(--text-muted); font-size: 0.92rem; }

/* ============================================================
   Utilities
   ============================================================ */
.hidden { display: none !important; }

/* ============================================================
   Landing page
   ============================================================ */
.landing-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg);
}

.landing-main {
    max-width: 380px;
    width: 100%;
    padding: 2rem 1.5rem;
    text-align: center;
}

.landing-wordmark {
    font-size: 2.75rem;
    font-weight: 800;
    letter-spacing: -2px;
    color: var(--text);
    margin-bottom: 0.4rem;
    line-height: 1;
}

.landing-tagline {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    font-weight: 400;
}

.landing-ctas {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.landing-cta-primary {
    display: block;
    background: var(--primary);
    color: white;
    text-decoration: none;
    padding: 0.8rem 1rem;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: background 0.15s;
}
.landing-cta-primary:hover { background: var(--primary-dark); }

.landing-cta-secondary {
    display: block;
    background: var(--card);
    color: var(--text);
    text-decoration: none;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.92rem;
    font-weight: 600;
    border: 1.5px solid var(--border);
    transition: background 0.15s, border-color 0.15s;
}
.landing-cta-secondary:hover { background: var(--bg); border-color: var(--border-strong); }

/* Legacy landing classes (kept for compatibility) */
.landing-card { text-align: center; margin-top: 2rem; padding: 2.5rem 2rem; }
.landing-icon  { font-size: 3rem; margin-bottom: 0.75rem; display: block; }
.landing-title { font-size: 2rem; font-weight: 800; letter-spacing: -1px; margin-bottom: 0.3rem; }
.landing-btn   { display: block; text-decoration: none; text-align: center; margin-top: 0.75rem; }

/* ============================================================
   Racer PWA — race list
   ============================================================ */
.screen-title { margin-bottom: 1rem; }
.screen-title h1 { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.3px; }

.race-card {
    margin-bottom: 0.6rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}
.race-card-body  { flex: 1; }
.race-card-org   { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase;
                   letter-spacing: 0.6px; font-weight: 600; margin-bottom: 0.2rem; }
.race-card-name  { font-size: 1rem; font-weight: 700; margin-bottom: 0.25rem; letter-spacing: -0.2px; }
.race-card-meta  { font-size: 0.8rem; color: var(--text-muted); display: flex;
                   gap: 0.75rem; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.race-card-dist  { font-weight: 600; }
.race-card-series { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.2rem; }
.race-register-btn { flex-shrink: 0; width: auto; padding: 0.5rem 1rem; font-size: 0.85rem; margin-top: 0; }

.back-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    padding: 0;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.back-btn:hover { text-decoration: underline; text-underline-offset: 2px; }

.race-badge {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 6px;
    padding: 0.25rem 0.65rem;
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.loading-state { text-align: center; padding: 3rem 0; }
.empty-state   { text-align: center; padding: 3rem 0; color: var(--text-muted); font-size: 0.9rem; }

/* ============================================================
   Racer PWA — auth + my-races extras
   ============================================================ */
.racer-header    { max-width: 100%; }
.header-actions  { display: flex; align-items: center; gap: 0.4rem; }
.racer-greeting  { color: rgba(255,255,255,0.85); font-size: 0.82rem; margin-right: 0.15rem; }

.my-race-card   { margin-bottom: 0.6rem; }
.my-race-name   { font-size: 0.97rem; font-weight: 700; margin-bottom: 0.25rem; letter-spacing: -0.1px; }
.my-race-meta   { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
                  margin-bottom: 0.2rem; font-variant-numeric: tabular-nums; }
.my-race-pending { font-size: 0.78rem; color: var(--text-muted); font-style: italic; }
.my-race-date   { font-size: 0.75rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* ============================================================
   Management app — sidebar shell
   ============================================================ */
.admin-body { background: var(--bg); min-height: 100vh; }

.app-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: 216px;
    flex-shrink: 0;
    background: #141C26;
    color: white;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-brand {
    padding: 1.2rem 1rem 1rem;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    color: white;
}

.sidebar-nav {
    flex: 1;
    padding: 0.6rem 0.5rem;
}

.nav-item {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    color: rgba(255,255,255,0.55);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 0.15rem;
    transition: background 0.15s, color 0.15s;
}
.nav-item:hover  { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.85); }
.nav-item.active { background: var(--primary); color: white; font-weight: 600; }

.sidebar-footer {
    padding: 0.9rem 1rem;
    border-top: 1px solid rgba(255,255,255,0.07);
}

.sidebar-user {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.45);
    margin-bottom: 0.65rem;
    line-height: 1.45;
    word-break: break-all;
}
.sidebar-user strong { color: rgba(255,255,255,0.8); font-weight: 600; }

.sidebar-signout {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
    padding: 0.38rem 0.75rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    text-align: center;
    transition: background 0.15s, color 0.15s;
}
.sidebar-signout:hover { background: rgba(255,255,255,0.13); color: white; }

.sidebar-profile {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.5);
    padding: 0.38rem 0.75rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    text-align: center;
    margin-bottom: 0.4rem;
    transition: background 0.15s, color 0.15s;
}
.sidebar-profile:hover { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.8); }

.sidebar-build {
    margin-top: 0.6rem;
    font-size: 0.7rem;
    color: rgba(255,255,255,0.25);
    text-align: center;
    letter-spacing: 0.2px;
}

.input-suffix-group {
    display: flex;
    align-items: stretch;
}
.input-suffix-group input {
    flex: 1;
    min-width: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}
.input-suffix {
    display: flex;
    align-items: center;
    padding: 0 0.75rem;
    background: #f4f6f9;
    border: 1.5px solid var(--border);
    border-left: none;
    border-top-right-radius: var(--radius-sm);
    border-bottom-right-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.875rem;
    white-space: nowrap;
    user-select: none;
}

.main-wrapper {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.content-topbar {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 5;
    box-shadow: 0 1px 0 rgba(15,25,35,0.04);
}

.breadcrumb {
    padding: 0.55rem 0;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    flex-wrap: wrap;
}
.bc-link {
    background: none;
    border: none;
    color: var(--primary);
    font-size: inherit;
    font-family: inherit;
    cursor: pointer;
    padding: 0;
    font-weight: 500;
}
.bc-link:hover { text-decoration: underline; text-underline-offset: 2px; }
.bc-sep    { color: var(--text-muted); }
.bc-current { color: var(--text); font-weight: 600; }

.topbar-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.topbar-lang-btn {
    flex-shrink: 0;
    font-size: 0.72rem;
    letter-spacing: 0.4px;
    padding: 0.2rem 0.55rem;
}

.admin-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0 0.65rem;
}
.admin-toolbar h2 { font-size: 1rem; font-weight: 700; letter-spacing: -0.2px; text-align: left; }

.admin-main { padding: 0 0 3rem; background: var(--card); }

@media (max-width: 768px) {
    .app-shell { flex-direction: column; }
    .sidebar {
        width: 100%; height: auto; position: static;
        flex-direction: row; align-items: center;
    }
    .sidebar-brand { border-bottom: none; padding: 0.7rem 1rem; }
    .sidebar-nav { display: flex; padding: 0.4rem; flex: 1; flex-direction: row; }
    .sidebar-footer { padding: 0.4rem; border-top: none; border-left: 1px solid rgba(255,255,255,0.07); }
    .sidebar-user { display: none; }
    .admin-main { padding: 0 0 3rem; }
}

/* ============================================================
   List rows
   ============================================================ */
.list-row {
    background: var(--card);
    border-radius: var(--radius-sm);
    padding: 0.8rem 1rem;
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    box-shadow: 0 1px 2px rgba(15,25,35,0.05);
    border: 1px solid var(--border);
}
.row-label   { font-size: 0.9rem; font-weight: 600; display: flex;
               align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.row-date    { font-size: 0.78rem; font-weight: 400; color: var(--text-muted);
               font-variant-numeric: tabular-nums; }
.row-actions { display: flex; gap: 0.35rem; flex-shrink: 0; flex-wrap: wrap; }

.list-loading { padding: 3rem 1.5rem; text-align: center; }
.list-empty   { padding: 3rem 1.5rem; text-align: center; color: var(--text-muted); font-size: 0.88rem; }
.list-error   { padding: 3rem 1.5rem; text-align: center; color: var(--error); font-size: 0.88rem; }

/* ============================================================
   Admin table (main list views) — flat, full-bleed data grid
   ============================================================ */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    background: var(--card);
}
.admin-table thead th {
    text-align: left;
    padding: 0.6rem 1.5rem;
    background: #f7f8fa;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-muted);
    white-space: nowrap;
}
.admin-table thead th:last-child { text-align: right; }
.admin-table tbody td {
    padding: 0.72rem 1.5rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    background: var(--card);
}
.admin-table tbody tr:last-child td { border-bottom: 1px solid var(--border); }
.admin-table tbody tr:hover td { background: #f5f8ff; }

.td-name   { font-weight: 500; color: var(--text); }
.td-muted  { color: var(--text-muted); font-size: 0.85rem; }
.td-actions { text-align: right; width: 1%; white-space: nowrap; }

/* ============================================================
   Row action dropdown menu
   ============================================================ */
.row-menu { position: relative; display: inline-block; }

.row-menu-btn {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.2rem 0.6rem;
    font-size: 1rem;
    line-height: 1;
    letter-spacing: 1px;
    cursor: pointer;
    color: var(--text-muted);
    font-family: inherit;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.row-menu-btn:hover {
    background: var(--bg);
    border-color: var(--border-strong);
    color: var(--text);
}

.row-menu-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: 0 6px 24px rgba(15,25,35,0.13);
    min-width: 150px;
    z-index: 50;
    overflow: hidden;
}

.row-menu-item {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 0.9rem;
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    color: var(--text);
    transition: background 0.1s;
}
.row-menu-item:last-child { border-bottom: none; }
.row-menu-item:hover     { background: var(--bg); }
.row-menu-primary { color: var(--primary); font-weight: 600; }
.row-menu-danger  { color: var(--error); }

/* ============================================================
   Small buttons
   ============================================================ */
.btn-sm {
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: opacity 0.15s, background 0.15s;
    white-space: nowrap;
}
.btn-sm:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary-sm  { background: var(--primary); color: white; }
.btn-primary-sm:hover { background: var(--primary-dark); }
.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg); border-color: var(--border-strong); }
.btn-danger { background: #FEE2E2; color: var(--error); }
.btn-danger:hover { background: #FECACA; }

/* ============================================================
   Status badges
   ============================================================ */
.badge {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    padding: 0.2rem 0.55rem;
    border-radius: 20px;
    flex-shrink: 0;
}
.badge-active     { background: #DCFCE7; color: #15803D; }
.badge-upcoming   { background: #DBEAFE; color: #1D4ED8; }
.badge-completed  { background: #F3F4F6; color: #4B5563; }
.badge-archived   { background: #E5E7EB; color: #374151; }
/* Registration status badges */
.badge-pending    { background: rgba(234, 179, 8, 0.12); color: #B45309; }
.badge-confirmed  { background: #DCFCE7; color: #15803D; }
.badge-dns        { background: #FEE2E2; color: #B91C1C; }
.row-confirmed    { font-size: 0.85rem; color: #15803D; font-weight: 600; }

/* ============================================================
   Modal
   ============================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,25,35,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 1rem;
    backdrop-filter: blur(2px);
}
.modal-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 1.5rem;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 8px 32px rgba(15,25,35,0.2);
    border: 1px solid var(--border);
}
.modal-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; letter-spacing: -0.2px; }
.modal-footer  { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 1.25rem; }

/* ============================================================
   Registrations table
   ============================================================ */
.reg-panel       { margin-top: 0; border-top: 2px solid var(--border); }
.reg-panel-title { font-size: 0.9rem; font-weight: 700; margin-bottom: 0; letter-spacing: -0.1px;
                   padding: 0.7rem 1.5rem; background: #f7f8fa; border-bottom: 1px solid var(--border); }

.reg-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
    background: var(--card);
}
.reg-table th {
    text-align: left;
    padding: 0.6rem 1.5rem;
    background: #f7f8fa;
    border-bottom: 1px solid var(--border);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-muted);
}
.reg-table td {
    padding: 0.65rem 1.5rem;
    border-bottom: 1px solid var(--border);
}
.reg-table tbody tr:last-child td { border-bottom: 1px solid var(--border); }
.reg-table tbody tr:hover td { background: #f5f8ff; }
.reg-table .bib-cell    { font-variant-numeric: tabular-nums; width: 5rem; }
.reg-table .action-cell { white-space: nowrap; }

/* ============================================================
   Season Members panel
   ============================================================ */
.season-members-panel       { margin-top: 0; border-top: 2px solid var(--border); }
.season-members-panel-title { font-size: 0.9rem; font-weight: 700; margin-bottom: 0; letter-spacing: -0.1px;
                              padding: 0.7rem 1.5rem; background: #f7f8fa; border-bottom: 1px solid var(--border); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 400px) {
    .row   { grid-template-columns: 1fr; }
    .card  { padding: 1.25rem 1rem; }
    .admin-main { padding: 0 0 3rem; }
}
