/* ==========================================================================
   STARLIGA DASHBOARD SYSTEM V2.0 - ULTIMATE EDITION
   Design Based on: Starliga Index (Blue/Green Gradient)
   ========================================================================== */

/* 1. FONTS & IMPORTS */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800;900&display=swap');

/* ==========================================================================
   2. VARIABLES & THEME CONFIGURATION
   ========================================================================== */
:root {
    --color-cyan: #00C6FF;
    --color-green: #00f260;
    --color-discord: #5865F2;

    /* Aliases referenced in JS-generated HTML */
    --primary: var(--color-cyan);
    --accent-green: var(--color-green);
    --accent-red: #e10600;
    --accent-color: var(--color-cyan);

    --bg-deep: #050608;
    --bg-panel: #0a0b10;
    --bg-card: #13151a;
    --bg-input: #0f1116;
    --bg-hover: rgba(255, 255, 255, 0.03);

    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-muted: #6c757d;

    --gradient-main: linear-gradient(135deg, var(--color-cyan), var(--color-green));
    --gradient-hover: linear-gradient(135deg, #009ecb, #00c950);
    --gradient-text: linear-gradient(90deg, var(--color-cyan), var(--color-green));
    --gradient-glass: linear-gradient(145deg, rgba(19, 21, 26, 0.9), rgba(10, 11, 16, 0.95));

    --border-color: rgba(255, 255, 255, 0.08);
    --border-focus: rgba(0, 198, 255, 0.5);

    --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.6);
    --glow-primary: 0 0 20px rgba(0, 198, 255, 0.25);
    --glow-accent: 0 0 20px rgba(0, 242, 96, 0.25);
    --glow-text: 0 0 10px rgba(0, 198, 255, 0.5);

    --sidebar-width: 280px;
    --header-height: 80px;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-round: 50px;

    /* HQ theme colors (used globally) */
    --hq-gold: #f59e0b;
    --hq-emerald: #10b981;
    --hq-indigo: #6366f1;
    --hq-pink: #ec4899;
    --hq-gold-glow: rgba(245, 158, 11, 0.3);
    --hq-emerald-glow: rgba(16, 185, 129, 0.3);
    --hq-indigo-glow: rgba(99, 102, 241, 0.3);
    --hq-pink-glow: rgba(236, 72, 153, 0.3);
}

/* ==========================================================================
   3. RESET & GLOBAL STYLES
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    outline: none;
    /* Custom Focus Styles used instead */
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-deep);
    color: var(--text-primary);
    display: flex;
    height: 100vh;
    overflow: hidden;
    /* Main Container scrolls, not body */
    line-height: 1.6;
    letter-spacing: 0.2px;
}

/* Custom Scrollbar - Cyberpunk Style */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-deep);
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 10px;
    border: 1px solid var(--bg-deep);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-cyan);
    box-shadow: 0 0 10px var(--color-cyan);
}

/* Selection Color */
::selection {
    background: rgba(0, 198, 255, 0.3);
    color: white;
}

/* ==========================================================================
   4. SIDEBAR NAVIGATION
   ========================================================================== */
#sidebar {
    width: var(--sidebar-width);
    background: var(--bg-panel);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 30px 20px;
    flex-shrink: 0;
    z-index: 100;
    transition: width 0.3s ease;
    backdrop-filter: blur(20px);
    /* Modern Glass Feel */
}

/* Logo Area */
.sidebar-header {
    margin-bottom: 50px;
    text-align: center;
    position: relative;
}

.logo {
    font-weight: 900;
    font-size: 2rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 10px;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

/* Gradient Text for Logo Span */
.logo span {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* User Status Card (Mini Profile) */
.user-status-card {
    background: linear-gradient(to right, rgba(255, 255, 255, 0.03), transparent);
    padding: 15px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.user-status-card strong {
    color: var(--color-cyan);
}

/* Navigation Container */
.nav-group {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 5px;
    /* Space for scrollbar */
}

/* Nav Labels */
.nav-label {
    text-transform: uppercase;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin: 25px 0 10px 15px;
    font-weight: 800;
    letter-spacing: 1.5px;
    position: relative;
}

/* Decoration line for labels */
.nav-label::after {
    content: '';
    display: block;
    width: 20px;
    height: 2px;
    background: var(--color-cyan);
    margin-top: 5px;
    opacity: 0.5;
}

/* Navigation Buttons */
.nav-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    padding: 14px 20px;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--radius-round);
    /* Pill Shape */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    overflow: hidden;
}

.nav-btn i {
    width: 20px;
    text-align: center;
    transition: 0.3s;
}

/* Hover State */
.nav-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    padding-left: 25px;
    /* Slide Effect */
    border-color: rgba(255, 255, 255, 0.05);
}

.nav-btn:hover i {
    color: var(--color-cyan);
    transform: scale(1.1);
}

/* Active State */
.nav-btn.active {
    background: rgba(0, 198, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(0, 198, 255, 0.302);
    font-weight: 700;
    box-shadow: 0 0 25px rgba(0, 198, 255, 0.1);
}

.nav-btn.active i {
    color: var(--color-cyan);
}

/* Role Specific Button Overrides */
.staff-btn.active {
    background: rgba(0, 242, 96, 0.1) !important;
    border-color: rgba(0, 242, 96, 0.3) !important;
    box-shadow: 0 0 25px rgba(0, 242, 96, 0.1) !important;
}

.staff-btn.active i {
    color: var(--color-green);
}

.staff-label {
    color: #07f767;
    text-shadow: 0 0 10px #07f7676e;
}

.admin-btn.active {
    background: rgba(218, 54, 51, 0.1) !important;
    border-color: rgba(218, 54, 51, 0.3) !important;
    box-shadow: 0 0 25px rgba(218, 54, 51, 0.1) !important;
}

.admin-btn.active i {
    color: #ff3b30;
}

.admin-label {
    color: #fc1004;
    text-shadow: 0 0 10px #fc10047e;
}

/* Footer Area */
.sidebar-footer {
    padding-top: 25px;
    margin-top: 10px;
    border-top: 1px solid var(--border-color);
}

.logout-link {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    text-decoration: none;
    padding: 14px;
    border-radius: var(--radius-round);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: 0.4s ease;
}

.logout-link:hover {
    border-color: #ff3b30;
    color: #ff3b30;
    background: rgba(255, 59, 48, 0.05);
    box-shadow: 0 0 20px rgba(255, 59, 48, 0.15);
}

/* ==========================================================================
   5. MAIN CONTENT AREA
   ========================================================================== */
#main {
    flex: 1;
    padding: 40px 50px;
    overflow-y: auto;
    position: relative;
    /* Subtler radial gradient than before, high-end feel */
    background: radial-gradient(circle at 90% 10%, rgba(0, 198, 255, 0.03) 0%, transparent 40%),
        radial-gradient(circle at 10% 90%, rgba(0, 242, 96, 0.02) 0%, transparent 40%);
}

/* Section Transitions */
.view-section {
    display: none;
    animation: fadeSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.view-section.active {
    display: block;
}

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Titles */
.page-title {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 40px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: -1px;
    position: relative;
    display: inline-block;
    padding-right: 20px;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 40%;
    height: 4px;
    background: var(--gradient-main);
    border-radius: 2px;
}

/* ==========================================================================
   6. CARDS & GRID SYSTEM
   ========================================================================== */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Top colored accent line for cards */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--bg-hover), transparent);
    opacity: 0.5;
}

/* Card Headers */
.card h2,
.card h3 {
    margin-bottom: 25px;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card h2 i,
.card h3 i {
    color: var(--color-cyan);
    font-size: 1rem;
}

/* GRID LAYOUTS */
.grid-2-1 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.grid-1-2 {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
}

.grid-1-1 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.dashboard-standings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

/* Split View (Mail/Chat Layout) */
.split-view {
    display: flex;
    gap: 30px;
    height: calc(100vh - 200px);
    /* Dynamic height */
    min-height: 600px;
}

.list-pane {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.content-pane {
    flex: 2.5;
    overflow-y: auto;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    position: relative;
}

/* ==========================================================================
   7. FORMS, INPUTS & BUTTONS
   ========================================================================== */
.form-row {
    display: flex;
    gap: 25px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
    flex: 1;
}

label,
.input-label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* Modern Input Styles */
input,
select,
textarea {
    width: 100%;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

input::placeholder,
textarea::placeholder {
    color: #444;
}

/* Input Focus States */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-cyan);
    box-shadow: 0 0 0 4px rgba(0, 198, 255, 0.1);
    background-color: #16181e;
    transform: translateY(-2px);
}

/* Gradient Action Buttons */
.action-btn {
    background: var(--gradient-main);
    color: #050608;
    /* Dark Text for Contrast */
    border: none;
    padding: 14px 32px;
    border-radius: var(--radius-round);
    cursor: pointer;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-top: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: var(--glow-accent);
}

.action-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 242, 96, 0.4);
    color: #000;
}

.action-btn:active {
    transform: translateY(-1px);
}

.hq-quick-actions .action-btn {
    margin-top: 0;
    width: 100%;
}

/* Secondary / Outline Button Style (if needed) */
.action-btn.secondary {
    background: transparent;
    border: 2px solid var(--color-cyan);
    color: var(--color-cyan);
    box-shadow: none;
}

.action-btn.secondary:hover {
    background: var(--color-cyan);
    color: #000;
}

.compose-btn {
    width: 100%;
    margin-bottom: 20px;
    margin-top: 0;
}

/* ==========================================================================
   8. SPECIFIC COMPONENTS (STATS, CHAT, TABLES)
   ========================================================================== */

/* --- STAT CARDS --- */
.stat-card {
    text-align: center;
    border-top: none;
    padding: 25px;
    background: linear-gradient(180deg, var(--bg-card) 0%, rgba(19, 21, 26, 0.5) 100%);
}

.stat-label {
    display: block;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1.5px;
    font-weight: 600;
    margin-bottom: 15px;
}

.stat-value {
    display: block;
    font-size: 3rem;
    font-weight: 900;
    color: #fff;
    /* Gradient Text removed for compatibility */
    line-height: 1.1;
}

/* Accent Lines for Stats */
.stat-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: var(--color-cyan);
    border-radius: 2px;
    box-shadow: var(--glow-primary);
}

/* --- LIST ITEMS (Mail/Drivers) --- */
.item-list div,
.standings-list div {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.item-list div:hover {
    background: var(--bg-hover);
    padding-left: 25px;
    /* Indent on hover */
    border-left: 3px solid var(--color-green);
}

.item-list div.unread {
    background: rgba(0, 198, 255, 0.05);
    border-left: 3px solid var(--color-cyan);
}

.item-list div h4 {
    margin: 0 0 5px 0;
    font-size: 0.95rem;
    color: #fff;
}

.item-list div p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* --- CHAT SYSTEM --- */
.chat-container {
    height: calc(100vh - 220px);
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.chat-header {
    padding: 20px 25px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-window {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background-image: radial-gradient(circle at center, #161920 0%, #13151a 100%);
}

/* Input Area */
.chat-input-area {
    padding: 20px;
    background: var(--bg-panel);
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 15px;
    align-items: center;
}

/* Messages Bubbles */
.chat-msg {
    padding: 15px 20px;
    border-radius: 20px;
    max-width: 75%;
    line-height: 1.5;
    font-size: 0.95rem;
    position: relative;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    animation: fadeInMsg 0.3s ease;
}

@keyframes fadeInMsg {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-msg strong {
    display: block;
    font-size: 0.7rem;
    margin-bottom: 5px;
    text-transform: uppercase;
    opacity: 0.8;
    letter-spacing: 0.5px;
}

/* Own Message Style (Cyan/Green Gradient) */
.msg-own {
    align-self: flex-end;
    background: linear-gradient(135deg, rgba(0, 198, 255, 0.15), rgba(0, 242, 96, 0.15));
    border: 1px solid rgba(0, 198, 255, 0.3);
    border-bottom-right-radius: 4px;
    /* Corner accent */
    color: #fff;
}

.msg-own strong {
    color: var(--color-cyan);
}

/* Other Message Style */
.msg-other {
    align-self: flex-start;
    background: #20242c;
    border: 1px solid var(--border-color);
    border-bottom-left-radius: 4px;
    /* Corner accent */
    color: #ddd;
}

.msg-other strong {
    color: var(--text-muted);
}

/* --- DRIVER CONTRACT LIST --- */
.driver-contract-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    border: 1px solid transparent;
    transition: 0.2s;
}

.driver-contract-row:hover {
    border-color: var(--border-color);
    background: rgba(255, 255, 255, 0.04);
}

.contract-status {
    font-size: 0.75rem;
    padding: 6px 12px;
    background: rgba(0, 242, 96, 0.15);
    color: var(--color-green);
    border: 1px solid rgba(0, 242, 96, 0.3);
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
}

/* ==========================================================================
   9. MODALS & OVERLAYS
   ========================================================================== */
.overlay-modal,
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 6, 8, 0.9);
    /* Very dark backdrop */
    backdrop-filter: blur(12px);
    /* Heavy blur */
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    /* JS toggles this usually, but css default is visible if class present */
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--bg-card);
    width: 90%;
    max-width: 650px;
    padding: 40px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 50px rgba(0, 198, 255, 0.15);
    /* Blue glow around modal */
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

/* Modal Header */
.modal-header,
.rc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.modal-header h2 {
    font-size: 1.8rem;
    text-transform: uppercase;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    transition: 0.3s;
}

.close-btn:hover {
    color: #ff3b30;
    transform: rotate(90deg);
}

/* Race Control Specific Modal Styling */
#modal-race-control .modal-content {
    border-color: var(--color-cyan);
}

#modal-race-control label {
    color: var(--color-cyan);
}

/* Lists inside Modal */
.p-list li {
    background: var(--bg-input);
    padding: 12px;
    margin-bottom: 8px;
    border-radius: var(--radius-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid transparent;
}

.p-list li:hover {
    border-color: var(--border-color);
}

/* ==========================================================================
   10. UTILITIES & EMPTY STATES
   ========================================================================== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    font-style: italic;
    opacity: 0.7;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--border-color);
}

.f1-red-text {
    color: #ff3b30;
    font-weight: bold;
}

/* Principal Role Gold Accents */
.principal-label {
    color: #fbbf24;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.4);
}

.principal-btn.active {
    background: rgba(251, 191, 36, 0.15) !important;
    color: #fbbf24 !important;
    border-color: #fbbf24 !important;
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.2) !important;
}

/* ==========================================================================
   11. RESPONSIVE DESIGN (MOBILE OPTIMIZED)
   ========================================================================== */
/* ==========================================================================
   11. RESPONSIVE DESIGN (TABLET & MOBILE)
   ========================================================================== */

/* --- TABLET / SMALL LAPTOP (max-width: 1024px) --- */
@media (max-width: 1024px) {

    /* 1. Layout Reset to Vertical */
    body {
        flex-direction: column;
        height: auto;
        overflow-y: auto;
        overflow-x: hidden;
    }

    /* 2. Sidebar transformation to Top Bar / App Bar */
    #sidebar {
        width: 100%;
        height: auto;
        padding: 10px 20px;
        position: sticky;
        top: 0;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        background: rgba(5, 6, 8, 0.98);
        border-bottom: 1px solid var(--border-color);
        border-right: none;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    }

    .sidebar-header {
        margin: 0;
        text-align: left;
    }

    .logo {
        font-size: 1.2rem;
        margin: 0;
    }

    .user-status-card,
    .sidebar-footer {
        display: none;
    }

    /* Horizontal Scrollable Navigation */
    .nav-group {
        flex-direction: row;
        flex: 1;
        margin-left: 20px;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 0;
        gap: 8px;
        align-items: center;
        -ms-overflow-style: none;
        /* IE and Edge */
        scrollbar-width: none;
        /* Firefox */
    }

    .nav-group::-webkit-scrollbar {
        display: none;
    }

    .nav-label {
        display: none;
    }

    .nav-btn {
        padding: 8px 14px;
        font-size: 0.75rem;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 50px;
        flex-shrink: 0;
        height: 36px;
        gap: 8px;
    }

    .nav-btn.active {
        background: var(--gradient-main);
        color: #000;
        border: none;
        box-shadow: 0 0 10px var(--glow-accent);
    }

    .nav-btn.active i {
        color: #000;
    }

    /* Main Content Padding */
    #main {
        padding: 20px;
        min-height: calc(100vh - 60px);
    }

    .page-title {
        font-size: 1.8rem;
        text-align: center;
        display: block;
        margin-bottom: 25px;
    }

    .page-title::after {
        left: 50%;
        transform: translateX(-50%);
        width: 60px;
    }

    /* Grid Adjustments for Tablet */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .hq-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .dashboard-standings-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Forms */
    .form-row {
        flex-direction: row;
        gap: 15px;
    }

    /* Split Views (Mail/Chat/Ticket) */
    .split-view {
        flex-direction: column;
        height: auto;
        gap: 20px;
    }

    .list-pane {
        max-height: 250px;
        border-bottom: 1px solid var(--border-color);
    }

    .content-pane {
        min-height: 400px;
    }

    .chat-container {
        height: 600px;
    }
}

/* --- MOBILE LANDSCAPE / LARGE PHONE (max-width: 768px) --- */
@media (max-width: 768px) {

    .nav-btn {
        padding: 8px 12px;
        font-size: 0.7rem;
    }

    /* Flatten all grids to single column */
    .grid-2-1,
    .grid-1-2,
    .grid-1-1,
    .grid-3,
    .stats-grid,
    .hq-stats-grid {
        display: flex;
        /* Flex column is often better than grid 1fr for stacking */
        flex-direction: column;
        gap: 15px;
    }

    /* HQ Specific Mobile Overrides from previous code */
    #principal-hq .grid-2-1,
    #principal-hq .grid-1-2,
    #principal-hq .grid-1-1 {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    /* Inputs stack on mobile */
    .form-row {
        flex-direction: column;
        gap: 15px;
    }

    /* Card padding reduced */
    .card {
        padding: 20px;
    }

    .hq-stat-card .stat-value {
        font-size: 1.8rem;
    }

    .hq-next-race-card::after {
        display: none;
        /* Hide background icon on small screens */
    }

    /* Modal Mobile */
    .modal-content {
        width: 95%;
        padding: 20px;
        margin: 10px;
        max-height: 85vh;
    }

    .modal-header h2 {
        font-size: 1.3rem;
    }

    /* Adjust Transfer Market Table for Mobile */
    .table-header {
        display: none !important;
        /* Hide header, use card layout for rows instead if possible, or just scroll */
    }

    .market-row {
        grid-template-columns: 1fr !important;
        gap: 5px;
        text-align: center;
    }

    .market-row button {
        width: 100%;
        margin-top: 5px;
    }
}

/* ==========================================================================
   TEAM HQ DASHBOARD STYLES - PREMIUM EDITION
   ========================================================================== */

/* --- HQ Color Theme Variables --- */
.principal-hq {
    --hq-gold: #f59e0b;
    --hq-emerald: #10b981;
    --hq-indigo: #6366f1;
    --hq-pink: #ec4899;
    --hq-gold-glow: rgba(245, 158, 11, 0.3);
    --hq-emerald-glow: rgba(16, 185, 129, 0.3);
    --hq-indigo-glow: rgba(99, 102, 241, 0.3);
    --hq-pink-glow: rgba(236, 72, 153, 0.3);
}

/* --- HQ Stats Grid Layout --- */
.hq-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

/* --- HQ Stat Cards - Enhanced --- */
.hq-stat-card {
    position: relative;
    text-align: center;
    padding: 28px 20px;
    background: linear-gradient(180deg, var(--bg-card) 0%, rgba(19, 21, 26, 0.6) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hq-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.hq-stat-card::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.hq-stat-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* Individual Stat Card Colors */
.hq-stat-card.hq-budget::before {
    background: linear-gradient(90deg, var(--hq-gold), #fbbf24);
}

.hq-stat-card.hq-budget:hover {
    border-color: var(--hq-gold);
    box-shadow: 0 20px 40px var(--hq-gold-glow);
}

.hq-stat-card.hq-budget .stat-value {
    background: linear-gradient(180deg, var(--hq-gold), #fbbf24);
    -webkit-background-clip: text;
    background-clip: text;
}

.hq-stat-card.hq-drivers::before {
    background: linear-gradient(90deg, var(--hq-emerald), #34d399);
}

.hq-stat-card.hq-drivers:hover {
    border-color: var(--hq-emerald);
    box-shadow: 0 20px 40px var(--hq-emerald-glow);
}

.hq-stat-card.hq-drivers .stat-value {
    background: linear-gradient(180deg, var(--hq-emerald), #34d399);
    -webkit-background-clip: text;
    background-clip: text;
}

.hq-stat-card.hq-position::before {
    background: linear-gradient(90deg, var(--hq-indigo), #818cf8);
}

.hq-stat-card.hq-position:hover {
    border-color: var(--hq-indigo);
    box-shadow: 0 20px 40px var(--hq-indigo-glow);
}

.hq-stat-card.hq-position .stat-value {
    background: linear-gradient(180deg, var(--hq-indigo), #818cf8);
    -webkit-background-clip: text;
    background-clip: text;
}

.hq-stat-card.hq-points::before {
    background: linear-gradient(90deg, var(--hq-pink), #f472b6);
}

.hq-stat-card.hq-points:hover {
    border-color: var(--hq-pink);
    box-shadow: 0 20px 40px var(--hq-pink-glow);
}

.hq-stat-card.hq-points .stat-value {
    background: linear-gradient(180deg, var(--hq-pink), #f472b6);
    -webkit-background-clip: text;
    background-clip: text;
}

/* Stat Card Labels & Values */
.hq-stat-card .stat-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 12px;
    font-weight: 700;
}

.hq-stat-card .stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 900;
    line-height: 1.1;
}

/* Stat Card Icon */
.hq-stat-card .stat-icon {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 1.2rem;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.hq-stat-card:hover .stat-icon {
    opacity: 1;
}

/* --- HQ Section Grid Layouts --- */
#principal-hq .grid-2-1 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 25px;
    margin-top: 25px;
}

#principal-hq .grid-1-2 {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 25px;
    margin-top: 25px;
}

#principal-hq .grid-1-1 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-top: 25px;
}

/* --- HQ Card Styling Override --- */
#principal-hq .card {
    background: linear-gradient(145deg, var(--bg-card), rgba(19, 21, 26, 0.8));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.4s ease;
}

#principal-hq .card:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

#principal-hq .card h3 {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

/* --- Next Race Card - Premium --- */
.hq-next-race-card {
    position: relative;
    background: linear-gradient(135deg,
            rgba(99, 102, 241, 0.15) 0%,
            rgba(139, 92, 246, 0.08) 50%,
            var(--bg-card) 100%);
    border: 1px solid rgba(99, 102, 241, 0.3);
    overflow: hidden;
}

.hq-next-race-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--hq-indigo), #8b5cf6);
    box-shadow: 0 0 20px var(--hq-indigo-glow);
}

.hq-next-race-card::after {
    content: '🏁';
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    font-size: 3rem;
    opacity: 0.1;
}

.hq-next-race-card:hover {
    background: linear-gradient(135deg,
            rgba(99, 102, 241, 0.2) 0%,
            rgba(139, 92, 246, 0.12) 50%,
            var(--bg-card) 100%);
    border-color: var(--hq-indigo);
    box-shadow: 0 0 30px var(--hq-indigo-glow);
}

/* Next Race Content */
.hq-next-race-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hq-race-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
}

.hq-race-date {
    font-size: 0.9rem;
    color: var(--hq-indigo);
    font-weight: 600;
}

.hq-race-track {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* --- Quick Actions Card --- */
#principal-hq .card .action-btn {
    width: 100%;
    margin-top: 0;
    margin-bottom: 10px;
}

#principal-hq .card .nav-btn {
    width: 100%;
    text-align: center;
    justify-content: center;
}

/* --- Team Settings Card --- */
.hq-team-settings-card .form-group {
    margin-bottom: 18px;
}

.hq-color-preview-container {
    display: flex;
    gap: 12px;
    align-items: center;
}

.hq-color-input {
    width: 60px;
    height: 44px;
    padding: 4px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: border-color 0.3s;
}

.hq-color-input:hover {
    border-color: var(--color-cyan);
}

.hq-color-preview {
    flex: 1;
    height: 44px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: box-shadow 0.3s;
}

/* --- Driver List Styling --- */
#hq-driver-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hq-driver-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 18px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.02), transparent);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.hq-driver-item:hover {
    background: rgba(16, 185, 129, 0.05);
    border-color: var(--hq-emerald);
    transform: translateX(6px);
    box-shadow: 0 4px 15px var(--hq-emerald-glow);
}

.hq-driver-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hq-driver-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--hq-emerald), var(--hq-indigo));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: #000;
}

.hq-driver-name {
    font-weight: 600;
    color: #fff;
}

.hq-driver-status {
    font-size: 0.75rem;
    padding: 5px 12px;
    border-radius: 50px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.hq-driver-status.active {
    background: rgba(16, 185, 129, 0.15);
    color: var(--hq-emerald);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* --- Transactions List --- */
.transactions-list {
    max-height: 220px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hq-transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-sm);
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

.hq-transaction-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.hq-transaction-item.income {
    border-left-color: var(--hq-emerald);
}

.hq-transaction-item.expense {
    border-left-color: #ef4444;
}

.hq-transaction-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.hq-transaction-amount {
    font-weight: 700;
    font-size: 0.9rem;
}

.hq-transaction-amount.positive {
    color: var(--hq-emerald);
}

.hq-transaction-amount.negative {
    color: #ef4444;
}

/* --- Announcements --- */
#hq-announcements-list {
    max-height: 200px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hq-announcement-item {
    padding: 14px;
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.05), transparent);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: var(--radius-sm);
    position: relative;
}

.hq-announcement-item::before {
    content: '📢';
    position: absolute;
    left: 14px;
    top: 14px;
    font-size: 0.9rem;
}

.hq-announcement-text {
    padding-left: 28px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.hq-announcement-time {
    display: block;
    padding-left: 28px;
    margin-top: 8px;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- Team Name Header --- */
.hq-team-header {
    color: var(--hq-gold);
    font-weight: 700;
    text-shadow: 0 0 15px var(--hq-gold-glow);
}

/* --- Mobile Responsive for HQ --- */
/* Old media queries removed/consolidated */

/* --- Additional HQ Component Styles --- */
.hq-quick-actions .action-btn,
.hq-quick-actions .nav-btn {
    width: 100%;
    margin-bottom: 10px;
}

.hq-readonly-input {
    opacity: 0.7;
    cursor: not-allowed;
}

.hq-hint-text {
    display: block;
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.hq-announcement-form {
    margin-bottom: 15px;
}

.hq-announcement-form .action-btn {
    width: 100%;
    margin-top: 10px;
}

.hq-announcement-textarea {
    resize: none;
}

/* --- Fix background-clip browser compatibility --- */
.logo span,
.stat-value,
.modal-header h2,
.hq-stat-card.hq-budget .stat-value,
.hq-stat-card.hq-drivers .stat-value,
.hq-stat-card.hq-position .stat-value,
.hq-stat-card.hq-points .stat-value {
    background-clip: text;
}

/* ==========================================================================
   12. UTILITY CLASSES (extracted from inline styles in app.js)
   ========================================================================== */

/* --- Layout Utilities --- */
.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flex-center {
    display: flex;
    align-items: center;
    gap: 12px;
}

.grid-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.grid-row:hover {
    background: var(--bg-hover);
}

/* --- Standings Row --- */
.standing-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.standing-rank {
    color: #666;
    font-weight: bold;
    width: 20px;
}

.standing-points {
    font-weight: 700;
    color: #fff;
}

/* --- Text Utilities --- */
.text-white { color: #fff; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-sm { font-size: 0.8rem; }
.text-xs { font-size: 0.75rem; }
.text-mono { font-family: monospace; }
.text-bold { font-weight: 600; }
.text-bold-700 { font-weight: 700; }

/* --- Badge / Status Pill --- */
.status-badge {
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
}

.role-badge {
    font-size: 0.6rem;
    background: #444;
    padding: 2px 4px;
    border-radius: 3px;
    margin-left: 5px;
}

/* --- Penalty / Incident Items --- */
.penalty-item {
    border-left: 4px solid #da3633;
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 8px;
    padding: 10px;
    border-radius: 4px;
}

.penalty-type {
    color: #da3633;
    font-weight: bold;
}

.penalty-detail {
    font-size: 0.85rem;
    color: #aaa;
    margin-top: 4px;
}

/* --- Market Row --- */
.market-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.market-row:hover {
    background: var(--bg-hover);
}

/* --- Announcement Card --- */
.announcement-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    border-left: 3px solid #f59e0b;
}

.announcement-item p {
    margin: 0;
    color: #ddd;
    font-size: 0.9rem;
}

.announcement-item small {
    color: #666;
    display: block;
    margin-top: 5px;
}

/* --- Ticket Card --- */
.ticket-item {
    padding: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: transform 0.2s;
}

.ticket-item:hover {
    transform: translateX(3px);
}

/* --- Chat Message Content --- */
.chat-msg-content {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* --- Audit Log Entry --- */
.audit-entry {
    font-size: 0.8rem;
    padding: 8px;
    border-bottom: 1px solid #333;
    color: #aaa;
}

.audit-entry .audit-time {
    color: var(--color-cyan);
    font-family: monospace;
}

.audit-entry .audit-user {
    color: #fff;
    font-weight: bold;
}

/* --- Loading Spinner --- */
.loading-spinner {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-style: italic;
}

/* --- Generic Delete Button (inline red) --- */
.btn-delete-inline {
    background: #da3633;
    font-size: 0.7rem;
    padding: 6px 12px;
    margin: 0;
}

/* --- Team Card Border --- */
.team-card-border {
    padding: 15px;
    position: relative;
    margin-bottom: 15px;
}

/* ==========================================================================
   13. APP.JS COMPONENT STYLES
   ========================================================================== */

.user-role-label {
    font-size: 0.75rem;
    color: var(--primary);
    text-transform: uppercase;
    font-weight: 600;
}

.text-cyan { color: var(--color-cyan); }
.text-green { color: var(--color-green); }
.text-red { color: var(--accent-red); }
.text-error { color: var(--accent-red); text-align: center; padding: 20px; }

/* Email */
.email-item {
    padding: 15px;
    border-bottom: 1px solid #333;
    cursor: pointer;
    transition: background 0.2s;
}
.email-item:hover { background: rgba(255,255,255,0.05); }
.email-detail-view { padding: 20px; }
.email-detail-view h2 { margin-bottom: 10px; border-bottom: 1px solid #333; padding-bottom: 15px; }
.email-meta { margin-bottom: 20px; color: #888; font-size: 0.9rem; }
.email-body { line-height: 1.6; font-size: 1rem; color: #ddd; white-space: pre-wrap; }

/* Chat */
.chat-msg-header { font-size: 0.75rem; color: #888; margin-bottom: 2px; }
.chat-time { float: right; opacity: 0.5; }

/* Steward Tickets */
.steward-ticket-row {
    padding: 15px;
    border-bottom: 1px solid #333;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    transition: background 0.2s;
}
.steward-ticket-row:hover { background: var(--bg-hover); }
.steward-detail-view { padding: 20px; height: 100%; display: flex; flex-direction: column; }
.steward-detail-header { border-bottom: 1px solid #333; padding-bottom: 15px; margin-bottom: 15px; }
.steward-detail-header h2 { margin-bottom: 10px; }
.ticket-status-controls { display: flex; gap: 5px; }
.ticket-status-controls select { padding: 5px; font-size: 0.8rem; width: auto; margin-bottom: 0; }
.ticket-original { background: rgba(0,0,0,0.3); padding: 15px; border-radius: 8px; margin-bottom: 20px; color: #ccc; }
.ticket-original::before { content: 'Ursprüngliche Anfrage:'; display: block; font-weight: bold; margin-bottom: 8px; font-size: 0.85rem; }
.ticket-replies-scroll { flex: 1; overflow-y: auto; margin-bottom: 20px; padding-right: 5px; }
.ticket-reply-form { border-top: 1px solid #333; padding-top: 15px; }
.ticket-reply-form textarea { width: 100%; margin-bottom: 10px; }
.ticket-reply.staff { background: rgba(47,129,247,0.1); border-left: 3px solid var(--primary); }
.ticket-reply.user { background: rgba(255,255,255,0.05); border-left: 3px solid #444; }
.ticket-reply { margin-bottom: 10px; padding: 10px; border-radius: 8px; }
.ticket-reply-header { font-size: 0.75rem; color: #888; margin-bottom: 4px; display: flex; justify-content: space-between; }
.ticket-reply-body { color: #ddd; white-space: pre-wrap; }

/* Ticket bubbles (user modal view) */
.ticket-bubble { max-width: 80%; width: fit-content; padding: 10px 15px; border-radius: 12px; margin-bottom: 10px; }
.ticket-bubble.own { margin-left: auto; background: #0056b3; color: white; border-bottom-right-radius: 0; }
.ticket-bubble.other { margin-right: auto; background: #2c3036; color: #ddd; border-bottom-left-radius: 0; }
.ticket-bubble.staff { background: rgba(47,129,247,0.15); }
.ticket-bubble-name { font-size: 0.75rem; margin-bottom: 4px; color: #aaa; }
.ticket-bubble.own .ticket-bubble-name { color: #ccc; }
.ticket-bubble-time { font-size: 0.65rem; text-align: right; opacity: 0.7; margin-top: 5px; }
.staff-badge { font-size: 0.7em; border: 1px solid #f59e0b; padding: 1px 4px; border-radius: 3px; color: #f59e0b; }

/* Race cards */
.race-type-label { font-size: 0.7rem; font-weight: bold; text-transform: uppercase; }
.race-round-badge { background: #222; padding: 5px 10px; border-radius: 5px; text-align: center; }
.race-round-badge small { display: block; font-size: 0.6rem; color: #888; }
.race-round-badge span { font-weight: bold; font-size: 1.1rem; }
.race-round-badge.hq { background: rgba(99,102,241,0.2); }
.race-round-badge.hq span { color: #6366f1; }
.race-details-btn { background: #444 !important; border: 1px solid #666 !important; font-size: 0.75rem !important; padding: 5px 12px !important; width: auto !important; }
.participation-zone { margin-top: 15px; padding-top: 10px; border-top: 1px solid #333; }
.participation-zone small { display: block; margin-bottom: 5px; }
.participation-btns { display: flex; gap: 10px; }
.part-btn { flex: 1; background: #2a2a2a !important; border: 1px solid #444 !important; }
.part-btn.confirmed { background: #00d26a !important; border-color: #00d26a !important; }
.part-btn.declined { background: var(--accent-red) !important; border-color: var(--accent-red) !important; }

/* Track list */
.track-row { padding: 10px; border-bottom: 1px solid #333; display: flex; justify-content: space-between; }
.track-delete { color: #da3633; cursor: pointer; font-size: 1.2rem; }
.track-delete:hover { color: #ff6b6b; }

/* Offers */
.offer-highlight-card { border-left: 5px solid #f59e0b; margin-bottom: 20px; }
.offer-row { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #333; padding: 10px 0; margin-top: 10px; }
.offer-actions { display: flex; gap: 10px; }
.offer-accept { background: #10b981 !important; }
.offer-decline { background: var(--accent-red) !important; }

/* Participant list (modal) */
.participants-section { margin-bottom: 25px; }
.participants-section h4 { margin-bottom: 12px; border-bottom: 1px solid #333; padding-bottom: 5px; }
.participants-section h4.text-green { color: #00d26a; }
.participants-section h4.text-red { color: var(--accent-red); }
.participant-row { background: #333; padding: 10px; border-radius: 4px; margin-bottom: 6px; display: flex; justify-content: space-between; align-items: center; }

/* HQ driver cards */
.driver-card { margin-bottom: 10px; padding: 15px; }
.driver-status-active { display: block; color: #10b981; font-weight: bold; font-size: 0.75rem; }
.driver-status-pending { display: block; color: #f59e0b; font-weight: bold; font-size: 0.75rem; }
.btn-fire { background: #b91c1c !important; margin-top: 12px; width: 100%; padding: 6px; font-size: 0.75rem; }
.btn-pay { background: var(--hq-emerald) !important; margin-top: 8px; width: 100%; padding: 6px; font-size: 0.75rem; color: #07f767; }
.pending-offers-title { margin: 20px 0 10px 0; color: #aaa; font-size: 0.8rem; text-transform: uppercase; }
.pending-offer-card { margin-bottom: 10px; opacity: 0.8; border: 1px dashed #444; background: rgba(255,255,255,0.02); padding: 15px; }