/* ============================================================
   RACE CONTROL — Ironman Triathlon edition
   Fond clair, texte noir classique, accents rouge race
   ============================================================ */

:root {
    --bg: #f7f5f0;
    --bg-soft: #fdfcf8;
    --surface: #ffffff;
    --line: #e5e1d8;
    --line-soft: #efebe2;
    --ink: #14181c;
    --ink-soft: #4a5159;
    --ink-mute: #7d848d;
    --ink-dim: #adb3bb;
    --race-red: #c41e3a;
    --race-red-soft: #fce8eb;
    --race-red-dark: #8e1429;
    --race-yellow: #ffcc00;
    --race-blue: #1976d2;
    --success: #2e7d32;
    --warning: #ed6c02;
    --danger: #c62828;
    --shadow-sm: 0 1px 2px rgba(20, 24, 28, 0.04);
    --shadow: 0 2px 8px rgba(20, 24, 28, 0.06);
    --shadow-lg: 0 8px 28px rgba(20, 24, 28, 0.08);
    --font-display: 'Bebas Neue', 'Barlow Condensed', Impact, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    --radius: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--ink);
    font-size: 15px;
    line-height: 1.7;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--race-red); text-decoration: none; }
a:hover { color: var(--race-red-dark); }

/* ===== LOGIN PAGE ===== */
.login-body {
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--bg-soft) 0%, var(--bg) 100%);
    padding: 24px;
}
.login-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 56px 44px;
    box-shadow: var(--shadow-lg);
    max-width: 440px; width: 100%;
    border-top: 4px solid var(--race-red);
}
.login-logo {
    font-family: var(--font-display);
    font-size: 38px;
    letter-spacing: 4px;
    color: var(--race-red);
    text-align: center;
    margin-bottom: 6px;
    line-height: 1;
}
.login-subtitle {
    text-align: center;
    color: var(--ink-mute);
    font-size: 12px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    margin-bottom: 36px;
    font-weight: 600;
}
.login-card form { display: flex; flex-direction: column; gap: 6px; }
.login-card label {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-soft);
    margin-top: 16px;
    letter-spacing: 0.5px;
}
.login-card input {
    padding: 14px 16px;
    background: var(--bg-soft);
    border: 1.5px solid var(--line);
    border-radius: 6px;
    font-size: 15px;
    font-family: var(--font-body);
    color: var(--ink);
    transition: all 0.2s;
}
.login-card input:focus {
    outline: none; border-color: var(--race-red);
    background: var(--surface);
    box-shadow: 0 0 0 3px var(--race-red-soft);
}
.login-card button {
    margin-top: 28px;
    padding: 15px;
    background: var(--race-red);
    color: white;
    border: none;
    border-radius: 6px;
    font-family: var(--font-display);
    font-size: 18px;
    letter-spacing: 3px;
    cursor: pointer;
    transition: all 0.2s;
}
.login-card button:hover { background: var(--race-red-dark); transform: translateY(-1px); box-shadow: var(--shadow); }
.login-footer {
    text-align: center;
    color: var(--ink-mute);
    font-size: 11px;
    margin-top: 32px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 500;
}
.alert { padding: 14px 18px; border-radius: 6px; font-size: 14px; margin-bottom: 18px; }
.alert-error { background: var(--race-red-soft); color: var(--danger); border-left: 4px solid var(--danger); }

/* ===== RACE TOPBAR ===== */
.race-body { background: var(--bg); }

.race-topbar {
    background: var(--surface);
    border-bottom: 3px solid var(--race-red);
    padding: 18px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
}
.race-brand { display: flex; align-items: center; gap: 18px; }

.mdot {
    width: 52px; height: 52px;
    background: var(--race-red);
    color: white;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display);
    font-size: 30px;
    letter-spacing: 0;
    box-shadow: 0 2px 8px rgba(196, 30, 58, 0.3);
}

.brand-title {
    font-family: var(--font-display);
    font-size: 28px;
    letter-spacing: 5px;
    color: var(--ink);
    line-height: 1;
}
.brand-sub {
    font-size: 11px;
    color: var(--ink-mute);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 4px;
    font-weight: 600;
}
.race-status { display: flex; align-items: center; gap: 16px; }
.status-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.15);
}
.status-text {
    font-size: 12px;
    color: var(--ink-soft);
    letter-spacing: 1.5px;
    font-weight: 600;
    text-transform: uppercase;
}
.race-logout, .btn-ghost {
    color: var(--ink-soft);
    font-size: 12px;
    letter-spacing: 1.5px;
    text-decoration: none;
    padding: 9px 16px;
    border: 1.5px solid var(--line);
    border-radius: 6px;
    transition: all 0.2s;
    font-weight: 600;
    text-transform: uppercase;
}
.race-logout:hover, .btn-ghost:hover {
    color: var(--race-red);
    border-color: var(--race-red);
    background: var(--race-red-soft);
}

/* ===== MAIN ===== */
.race-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 36px 28px 80px;
}

/* HERO */
.race-hero {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 32px;
    margin-bottom: 32px;
    display: grid;
    grid-template-columns: 200px 1fr 320px;
    gap: 32px;
    align-items: center;
    box-shadow: var(--shadow);
    border-left: 6px solid var(--race-red);
}

.hero-bib {
    text-align: center;
    background: linear-gradient(135deg, var(--race-red), var(--race-red-dark));
    color: white;
    padding: 20px 14px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 2px solid white;
    outline: 2px solid var(--race-red);
}
.bib-number {
    font-family: var(--font-display);
    font-size: 56px;
    line-height: 1;
    letter-spacing: 2px;
}
.bib-name {
    font-family: var(--font-display);
    font-size: 16px;
    letter-spacing: 2px;
    margin-top: 6px;
    text-transform: uppercase;
}
.bib-team {
    font-size: 9px;
    letter-spacing: 2px;
    margin-top: 4px;
    opacity: 0.9;
    font-weight: 600;
    text-transform: uppercase;
}

.hero-rank { display: flex; align-items: center; gap: 22px; }
.rank-icon {
    font-size: 56px;
    line-height: 1;
}
.rank-label {
    font-size: 11px;
    color: var(--ink-mute);
    letter-spacing: 2.5px;
    text-transform: uppercase;
    font-weight: 700;
}
.rank-name {
    font-family: var(--font-display);
    font-size: 32px;
    letter-spacing: 2px;
    margin: 6px 0 8px;
    line-height: 1;
}
.rank-meta {
    display: flex; align-items: center; gap: 10px;
    font-size: 14px;
    color: var(--ink-soft);
    font-weight: 600;
}
.meta-pts { color: var(--race-red); font-size: 16px; }
.meta-sep { color: var(--ink-dim); }

.hero-progress { width: 100%; }
.prog-header {
    display: flex; justify-content: space-between;
    font-size: 12px;
    letter-spacing: 1.5px;
    margin-bottom: 10px;
    text-transform: uppercase;
    font-weight: 600;
}
.prog-header span { color: var(--ink-mute); }
.prog-header strong { color: var(--race-red); font-weight: 700; }
.prog-bar {
    height: 14px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}
.prog-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--race-red), var(--race-yellow));
    transition: width 0.6s ease-out;
}
.prog-footer {
    margin-top: 10px;
    font-size: 13px;
    color: var(--ink-soft);
    text-align: right;
    font-weight: 500;
}

/* STATS CARDS */
.race-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 36px;
}
.stat-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 22px 20px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
    border-top: 3px solid var(--race-red);
}
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.stat-highlight { border-top-color: var(--race-yellow); background: linear-gradient(135deg, var(--surface), #fff9e6); }
.stat-alert { border-top-color: var(--warning); animation: alert-pulse 2.4s ease-in-out infinite; }
@keyframes alert-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(237, 108, 2, 0); } 50% { box-shadow: 0 0 0 6px rgba(237, 108, 2, 0.12); } }

.stat-label {
    font-size: 11px;
    color: var(--ink-mute);
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 700;
}
.stat-value {
    font-family: var(--font-display);
    font-size: 44px;
    color: var(--ink);
    margin: 8px 0;
    line-height: 1;
    letter-spacing: 1px;
}
.stat-sep { color: var(--ink-dim); font-size: 32px; }
.stat-sub {
    font-size: 13px;
    color: var(--ink-mute);
    line-height: 1.5;
}
.stat-progress {
    height: 4px;
    background: var(--bg);
    margin: 12px 0 8px;
    border-radius: 2px;
    overflow: hidden;
}
.stat-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--race-yellow), var(--race-red));
    transition: width 0.6s ease-out;
}
.stat-action {
    display: inline-block;
    margin-top: 12px;
    padding: 8px 14px;
    background: var(--race-red);
    color: white !important;
    text-decoration: none;
    font-size: 12px;
    letter-spacing: 1.5px;
    border-radius: 6px;
    font-weight: 700;
    transition: all 0.2s;
}
.stat-action:hover { background: var(--race-red-dark); transform: translateY(-1px); }

/* SECTIONS */
.race-section { margin-bottom: 40px; }
.section-title {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
    padding: 14px 0;
    border-bottom: 2px solid var(--ink);
}
.section-bar {
    display: inline-block;
    width: 6px; height: 22px;
    background: var(--race-red);
    border-radius: 2px;
}
.section-text {
    font-family: var(--font-display);
    font-size: 22px;
    color: var(--ink);
    letter-spacing: 3px;
}
.section-counter {
    margin-left: auto;
    font-size: 12px;
    color: var(--ink-mute);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 600;
}

/* MÉDAILLES */
.medals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 20px;
}
.medal {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 22px 16px 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    position: relative;
}
.medal-unlocked {
    background: linear-gradient(180deg, var(--surface) 0%, #fff9e6 100%);
    box-shadow: var(--shadow);
}
.medal-unlocked:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.medal-locked { opacity: 0.55; filter: grayscale(60%); }

.medal-disc {
    width: 80px;
    margin: 0 auto 12px;
    position: relative;
}
.medal-ribbon {
    position: absolute;
    top: -4px; left: 50%;
    transform: translateX(-50%);
    width: 38px; height: 16px;
    background: linear-gradient(180deg, var(--race-red), var(--race-red-dark));
    clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 70%, 0 100%);
    z-index: 0;
}
.medal-locked .medal-ribbon { background: linear-gradient(180deg, #999, #666); }
.medal-circle {
    position: relative; z-index: 1;
    width: 72px; height: 72px;
    margin: 12px auto 0;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ffd966, #ffba00 60%, #b8860b);
    box-shadow: 0 4px 12px rgba(255, 186, 0, 0.35);
    display: flex; align-items: center; justify-content: center;
    border: 3px solid white;
}
.medal-locked .medal-circle {
    background: radial-gradient(circle at 30% 30%, #c5c5c5, #888 60%, #555);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.medal-icon { font-size: 32px; }

.medal-name {
    font-family: var(--font-display);
    font-size: 17px;
    letter-spacing: 1.5px;
    color: var(--ink);
    margin-bottom: 6px;
    line-height: 1.1;
}
.medal-desc {
    font-size: 12px;
    color: var(--ink-mute);
    line-height: 1.5;
}

/* RACE LOG TABLE */
.races-table {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.races-thead, .races-row {
    display: grid;
    grid-template-columns: 130px 1fr 100px 160px 220px;
    gap: 16px;
    padding: 14px 22px;
    align-items: center;
}
.races-thead {
    background: var(--ink);
    color: white;
    font-size: 11px;
    letter-spacing: 2px;
    font-weight: 700;
    text-transform: uppercase;
}
.races-row {
    border-bottom: 1px solid var(--line-soft);
    transition: background 0.15s;
}
.races-row:nth-child(even) { background: var(--bg-soft); }
.races-row:hover { background: var(--race-red-soft); }
.races-row:last-child { border-bottom: none; }

.race-title {
    font-size: 15px;
    color: var(--ink);
    font-weight: 500;
    line-height: 1.4;
    display: flex; flex-direction: column; gap: 6px;
}
.race-cat {
    display: inline-block;
    width: fit-content;
    font-size: 10px;
    letter-spacing: 1.5px;
    color: var(--race-blue);
    text-transform: uppercase;
    font-weight: 700;
    background: #e3f2fd;
    padding: 2px 8px;
    border-radius: 3px;
}
.race-date {
    font-size: 13px;
    color: var(--ink-soft);
    font-weight: 500;
    line-height: 1.5;
}
.race-author { display: block; font-size: 11px; color: var(--ink-mute); margin-top: 2px; }
.race-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.status-pill {
    display: inline-block;
    padding: 5px 11px;
    font-size: 10px;
    letter-spacing: 1.5px;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
}
.st-gen { background: #fff3e0; color: var(--warning); }
.st-rev { background: #e3f2fd; color: var(--race-blue); }
.st-mod { background: #fff8e1; color: #c89a00; }
.st-pub { background: #e8f5e9; color: var(--success); }
.st-rej { background: #ffebee; color: var(--danger); }

.btn-mini {
    display: inline-block;
    padding: 7px 13px;
    font-size: 11px;
    letter-spacing: 1.5px;
    border-radius: 5px;
    text-decoration: none;
    border: 1.5px solid var(--line);
    color: var(--ink-soft);
    transition: all 0.2s;
    font-weight: 700;
    text-transform: uppercase;
}
.btn-mini:hover { color: var(--race-red); border-color: var(--race-red); background: var(--race-red-soft); }
.btn-mini-primary {
    background: var(--race-red);
    color: white;
    border-color: var(--race-red);
}
.btn-mini-primary:hover { background: var(--race-red-dark); color: white; }

/* PERFORMANCE */
.perf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius);
    overflow: hidden;
}
.perf-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 18px 22px;
    border-right: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line-soft);
}
.perf-item:last-child { border-right: none; }
.perf-label {
    font-size: 13px;
    color: var(--ink-soft);
    font-weight: 500;
}
.perf-value {
    font-family: var(--font-display);
    font-size: 26px;
    color: var(--race-red);
    letter-spacing: 1px;
}

.empty-race {
    text-align: center;
    padding: 80px 20px;
    background: var(--surface);
    border: 2px dashed var(--line);
    border-radius: var(--radius);
    color: var(--ink-mute);
}
.empty-race div {
    font-family: var(--font-display);
    font-size: 22px;
    color: var(--warning);
    letter-spacing: 2.5px;
    margin-bottom: 10px;
}

.race-footer {
    text-align: center;
    padding: 28px;
    font-size: 11px;
    color: var(--ink-dim);
    letter-spacing: 2px;
    font-weight: 600;
    text-transform: uppercase;
    border-top: 1px solid var(--line-soft);
}

/* ===== EDIT PAGE (article editor) ===== */
.topbar {
    background: var(--surface);
    border-bottom: 3px solid var(--race-red);
    color: var(--ink);
    padding: 16px 32px;
    display: flex; justify-content: space-between; align-items: center;
    box-shadow: var(--shadow-sm);
}
.topbar-brand .brand-name { font-family: var(--font-display); font-size: 22px; letter-spacing: 3px; color: var(--race-red); }
.topbar-brand .brand-sub { display: block; font-size: 11px; letter-spacing: 1.5px; color: var(--ink-mute); margin-top: 4px; text-transform: uppercase; font-weight: 600; }
.topbar-user { display: flex; align-items: center; gap: 14px; font-size: 14px; color: var(--ink-soft); }

.container { max-width: 980px; margin: 0 auto; padding: 32px 28px 130px; }

.article-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 28px; }
.article-meta {
    font-size: 11px;
    color: var(--race-red);
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 10px;
}
.article-header h1 {
    font-family: var(--font-display);
    font-size: 30px;
    letter-spacing: 1px;
    line-height: 1.2;
    color: var(--ink);
}

.drafts-selector {
    background: var(--surface);
    padding: 12px 16px;
    border-radius: 6px;
    border: 1.5px solid var(--line);
    font-size: 13px;
    box-shadow: var(--shadow-sm);
}
.drafts-selector label { color: var(--ink-soft); font-weight: 600; }
.drafts-selector select { border: none; padding: 6px; background: transparent; cursor: pointer; color: var(--ink); font-family: var(--font-body); font-size: 14px; }

.card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}
.card h2 {
    font-family: var(--font-display);
    font-size: 18px;
    color: var(--race-red);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--line);
}
.card label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--ink-soft);
    margin-top: 18px;
    margin-bottom: 8px;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.card input[type="text"], .card textarea {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-soft);
    border: 1.5px solid var(--line);
    color: var(--ink);
    border-radius: 6px;
    font-size: 15px;
    font-family: var(--font-body);
    line-height: 1.6;
    transition: all 0.2s;
}
.card input[type="text"]:focus, .card textarea:focus {
    outline: none;
    border-color: var(--race-red);
    background: var(--surface);
    box-shadow: 0 0 0 3px var(--race-red-soft);
}
.card textarea { resize: vertical; min-height: 90px; }
.field-hint { font-size: 12px; color: var(--ink-mute); margin-top: 6px; }
.field-hint code { background: var(--bg); padding: 2px 7px; border-radius: 3px; font-family: 'Monaco', 'Consolas', monospace; color: var(--race-red); font-size: 11px; }

.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.main-image-preview { width: 100%; max-width: 480px; border-radius: 6px; margin-bottom: 14px; border: 1px solid var(--line); }

.quill-editor {
    background: var(--bg-soft);
    border: 1.5px solid var(--line);
    border-radius: 6px;
    min-height: 300px;
    font-size: 15px;
    line-height: 1.75;
}
.ql-toolbar.ql-snow { border-color: var(--line); background: var(--surface); border-radius: 6px 6px 0 0; }
.ql-container.ql-snow { border-color: var(--line); border-radius: 0 0 6px 6px; font-family: var(--font-body); color: var(--ink); font-size: 15px; }
.ql-editor { min-height: 280px; padding: 18px; line-height: 1.75; }
.ql-editor h2 { font-family: var(--font-display); font-size: 24px; margin: 20px 0 12px; color: var(--ink); }
.ql-editor h3 { font-family: var(--font-display); font-size: 20px; margin: 16px 0 10px; color: var(--ink); }
.ql-editor a { color: var(--race-red); }

.actions-bar {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--ink);
    border-top: 4px solid var(--race-red);
    padding: 16px 32px;
    display: flex; justify-content: space-between; align-items: center;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 100;
}
.actions-info { font-size: 13px; color: rgba(255, 255, 255, 0.75); letter-spacing: 0.5px; }
.actions-buttons { display: flex; gap: 12px; }
.btn {
    padding: 12px 26px;
    border: none;
    border-radius: 6px;
    font-family: var(--font-display);
    font-size: 16px;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.2s;
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.actions-bar .btn-ghost {
    background: transparent;
    color: white;
    border: 1.5px solid rgba(255, 255, 255, 0.35);
}
.actions-bar .btn-ghost:hover:not(:disabled) { border-color: var(--race-red); color: white; background: var(--race-red); }
.btn-primary {
    background: var(--race-red);
    color: white;
}
.btn-primary:hover:not(:disabled) { background: var(--race-red-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(196, 30, 58, 0.4); }
.btn-danger-ghost { color: #ff8a80 !important; border-color: rgba(239, 83, 80, 0.4) !important; }
.btn-danger-ghost:hover:not(:disabled) { background: rgba(239, 83, 80, 0.15) !important; border-color: rgba(239, 83, 80, 0.8) !important; color: #ff8a80 !important; }

.toast {
    position: fixed; bottom: 90px; right: 32px;
    background: var(--surface);
    border-left: 4px solid var(--race-red);
    color: var(--ink);
    padding: 16px 22px;
    border-radius: 6px;
    box-shadow: var(--shadow-lg);
    font-size: 14px;
    line-height: 1.5;
    opacity: 0; transform: translateY(20px);
    transition: all 0.3s;
    pointer-events: none;
    z-index: 200; max-width: 380px;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }

.empty-state { text-align: center; padding: 70px 20px; color: var(--ink-mute); }
.empty-state h1 {
    font-family: var(--font-display);
    font-size: 28px;
    color: var(--ink);
    margin-bottom: 14px;
    letter-spacing: 2px;
}

/* RESPONSIVE */
@media (max-width: 1000px) {
    .race-hero { grid-template-columns: 1fr; gap: 24px; }
    .race-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
    .races-thead, .races-row { grid-template-columns: 1fr; gap: 10px; }
    .races-thead { display: none; }
    .races-row { padding: 16px 18px; border-bottom: 2px solid var(--line); }
}
@media (max-width: 600px) {
    .race-topbar { padding: 14px 16px; flex-wrap: wrap; gap: 12px; }
    .race-main { padding: 24px 16px; }
    .race-stats { grid-template-columns: 1fr; }
    .brand-title { font-size: 22px; }
    .actions-bar { flex-direction: column; gap: 12px; padding: 14px 16px; }
    .actions-buttons { width: 100%; }
    .actions-buttons .btn { flex: 1; padding: 11px 12px; font-size: 13px; }
    .perf-item { border-right: none; }
}
