/* =====================================================
   DREAM TEAM FR - DESIGN SYSTEM 2026
   Refonte Complète & Professionnelle
   ===================================================== */

:root {
    /* --- PALETTE DE COULEURS --- */
    /* Backgrounds */
    --bg-app: #0f172a;
    /* Slate 900 - Fond principal */
    --bg-sidebar: #1e293b;
    /* Slate 800 - Sidebar */
    --bg-card: #1e293b;
    /* Slate 800 - Cartes */
    --bg-card-hover: #334155;
    /* Slate 700 - Hover */
    --bg-input: #020617;
    /* Slate 950 - Inputs */

    /* Text */
    --text-main: #f8fafc;
    /* Slate 50 - Titres, texte principal */
    --text-muted: #94a3b8;
    /* Slate 400 - Sous-titres, labels */
    --text-dim: #64748b;
    /* Slate 500 - Texte tertiaire */

    /* Accents (Neon/Vibrant) */
    --brand-primary: #3b82f6;
    /* Blue 500 - Action principale */
    --brand-hover: #2563eb;
    /* Blue 600 */
    --brand-success: #10b981;
    /* Emerald 500 - Victoire, Validation */
    --brand-warning: #f59e0b;
    /* Amber 500 - Attention */
    --brand-danger: #ef4444;
    /* Red 500 - Erreur, Suppression */
    --brand-purple: #8b5cf6;
    /* Violet 500 - Events spéciaux */

    /* Borders & Effects */
    --border-subtle: #334155;
    /* Slate 700 */
    --border-focus: #3b82f6;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --glow-primary: 0 0 15px rgba(59, 130, 246, 0.3);

    /* Dimensions & Spacing */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --header-height: 70px;
    --sidebar-width: 280px;
    --sidebar-width-collapsed: 80px;
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-app);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

ul,
ol {
    list-style: none;
}

button,
input,
select {
    font-family: inherit;
}

/* =====================================================
   AUTH & CENTERED LAYOUTS
   ===================================================== */
.layout-centered {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background-color: var(--bg-app);
}

.auth-container {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
}

/* =====================================================
   LAYOUT STRUCTURE (Grid System)
   ===================================================== */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* --- LAYOUT UTILITIES --- */
.layout-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 32px;
}

@media (max-width: 1024px) {
    .layout-with-sidebar {
        grid-template-columns: 1fr;
    }
}

.layout-centered {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: radial-gradient(circle at top right, #1e293b 0%, #0f172a 100%);
}

.auth-container {
    width: 100%;
    max-width: 450px;
}

/* --- SIDEBAR --- */
.sidebar {
    width: var(--sidebar-width);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0) 12%),
        linear-gradient(180deg, #162033 0%, var(--bg-sidebar) 100%);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 50;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.02), 12px 0 30px rgba(2, 6, 23, 0.35);
    color: var(--text-main);
}

.sidebar.collapsed-mode {
    width: var(--sidebar-width-collapsed);
}

.sidebar-header {
    min-height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px 16px;
    border-bottom: 1px solid var(--border-subtle);
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.08), rgba(59, 130, 246, 0));
}

.header-content {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.sidebar-logo {
    height: 42px;
    width: 74px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: var(--shadow-md);
    flex-shrink: 0;
}

.header-text {
    min-width: 0;
}

.header-text h1 {
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.1;
}

.header-text p {
    font-size: 0.84rem;
    color: var(--text-muted);
}

.sidebar-season {
    display: inline-flex;
    align-items: center;
    margin-top: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.12);
    color: #dbeafe;
    border: 1px solid rgba(59, 130, 246, 0.22);
    font-weight: 600;
}

.sidebar-icon-btn {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.sidebar-icon-btn:hover {
    background: rgba(59, 130, 246, 0.14);
    border-color: rgba(59, 130, 246, 0.28);
}

.sidebar-icon-btn:focus-visible,
.nav-section-header:focus-visible,
.sidebar-nav a:focus-visible {
    outline: 2px solid rgba(96, 165, 250, 0.95);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.18);
}

.sidebar.collapsed-mode .header-text,
.sidebar.collapsed-mode .sidebar-user-info,
.sidebar.collapsed-mode .nav-text,
.sidebar.collapsed-mode .arrow {
    display: none;
}

.sidebar.collapsed-mode .sidebar-header {
    justify-content: center;
    padding: 14px 0 16px;
}

.sidebar.collapsed-mode .nav-section-header {
    justify-content: center;
    padding: 12px 0;
}

.sidebar.collapsed-mode .sidebar-nav a {
    justify-content: center;
    padding: 12px 0;
}

.sidebar.collapsed-mode .section-icon,
.sidebar.collapsed-mode .icon {
    margin-right: 0;
    font-size: 1.25rem;
}

/* Navigation */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 16px 12px 20px;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.5) transparent;
}

.sidebar-nav::-webkit-scrollbar {
    width: 8px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.35);
    border-radius: 999px;
}

.nav-section-header {
    width: 100%;
    background: rgba(255, 255, 255, 0.02);
    border: none;
    color: #cbd5e1;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: color 0.2s, background-color 0.2s, border-color 0.2s;
    border-radius: 12px;
    border: 1px solid transparent;
    margin-bottom: 6px;
}

.nav-section-header:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
}

.nav-section-header .arrow {
    margin-left: auto;
    transition: transform 0.2s;
    font-size: 0.76rem;
    color: #cbd5e1;
}

.nav-section-header.collapsed .arrow {
    transform: rotate(-90deg);
}

.nav-section-content {
    overflow: hidden;
    transition: max-height 0.3s ease;
    max-height: 500px;
    margin-bottom: 10px;
}

.nav-section-content.collapsed {
    max-height: 0;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    color: #d5deeb;
    font-size: 0.98rem;
    font-weight: 600;
    border-left: 3px solid transparent;
    border-radius: 12px;
    margin-bottom: 6px;
    transition: all 0.2s ease;
    min-height: 48px;
}

.sidebar-nav a:hover {
    background-color: rgba(255, 255, 255, 0.06);
    color: var(--text-main);
    transform: translateX(2px);
}

.sidebar-nav a.active {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.16) 0%, rgba(59, 130, 246, 0.05) 100%);
    color: #eff6ff;
    border-left-color: var(--brand-primary);
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.18), 0 6px 14px rgba(15, 23, 42, 0.18);
}

.sidebar-nav .icon {
    font-size: 1.18rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-nav .nav-text {
    min-width: 0;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

/* User Info */
.sidebar-user-info {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    margin: 14px 12px 4px;
    padding: 14px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.65));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}

.sidebar-user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(139, 92, 246, 0.25));
    border: 1px solid rgba(59, 130, 246, 0.28);
    color: var(--text-main);
    font-weight: 800;
    font-size: 1rem;
    flex-shrink: 0;
}

.sidebar-user-meta {
    min-width: 0;
    width: 100%;
}

.sidebar-user-label {
    font-size: 0.71rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
    font-weight: 700;
}

.sidebar-user-name {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-weight: 800;
    font-size: 1.02rem;
    color: var(--text-main);
    line-height: 1.2;
}

.sidebar-user-email {
    margin-top: 5px;
    font-size: 0.82rem;
    color: #cbd5e1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-admin-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: #d1fae5;
    background: rgba(16, 185, 129, 0.16);
    border: 1px solid rgba(16, 185, 129, 0.24);
}

.nav-category {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px 8px;
    margin-top: 12px;
    color: #e2e8f0;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.section-icon {
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-divider {
    margin: 18px 14px 14px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.28), transparent);
}

.sidebar-collapse-btn {
    margin: 0 12px 14px auto;
}

.disabled-link {
    color: #7b8aa3 !important;
    opacity: 1 !important;
}

.disabled-link .nav-text {
    color: #7b8aa3 !important;
}

#mobile-menu-toggle {
    display: none;
}

/* --- MAIN CONTENT --- */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 40px;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 1600px;
    margin-right: auto;
}

.sidebar.collapsed-mode~.main-content {
    margin-left: var(--sidebar-width-collapsed);
}

.page-header {
    margin-bottom: 40px;
}

.page-header h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-header p {
    color: var(--text-muted);
    font-size: 1rem;
}

/* =====================================================
   COMPONENTS
   ===================================================== */

/* --- CARDS --- */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.card-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.card-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
}

/* Card Variants */
.card-blue {
    border-top: 4px solid var(--brand-primary);
}

.card-green {
    border-top: 4px solid var(--brand-success);
}

.card-yellow {
    border-top: 4px solid var(--brand-warning);
}

.card-purple {
    border-top: 4px solid var(--brand-purple);
}

/* --- GRID SYSTEM --- */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

/* --- MATCH CARD (The Star Show) --- */
.match-card {
    display: grid;
    grid-template-columns: 1fr 140px 1fr;
    /* Player - Score/Info - Player */
    align-items: center;
    background-color: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 16px 24px;
    margin-bottom: 12px;
    position: relative;
    transition: all 0.2s;
}

.match-card:hover {
    border-color: var(--brand-primary);
    background-color: var(--bg-card-hover);
    box-shadow: var(--glow-primary);
}

.match-meta {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-dim);
    letter-spacing: 0.1em;
    background-color: rgba(15, 23, 42, 0.8);
    padding: 2px 8px;
    border-radius: 10px;
}

.match-player {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.match-player.home {
    align-items: flex-end;
    text-align: right;
}

.match-player.away {
    align-items: flex-start;
    text-align: left;
}

.match-player-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-main);
    margin-bottom: 4px;
}

.match-player-team {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.match-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.match-vs {
    font-family: 'Impact', sans-serif;
    /* Stylistic choice for VS */
    font-size: 1.2rem;
    color: var(--text-dim);
    opacity: 0.3;
}

.match-score {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--text-main);
}

.match-score.pending {
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: normal;
}

.match-actions {
    margin-top: 8px;
    display: flex;
    gap: 8px;
}

/* --- FORMS --- */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.form-input,
.form-select {
    width: 100%;
    background-color: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    color: var(--text-main);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* --- BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    gap: 8px;
}

.btn-primary {
    background-color: var(--brand-primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--brand-hover);
    box-shadow: var(--glow-primary);
}

.btn-secondary {
    background-color: var(--bg-card-hover);
    color: var(--text-main);
    border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
    background-color: var(--border-subtle);
}

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

.btn-danger:hover {
    background-color: rgba(239, 68, 68, 0.2);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.btn-block {
    width: 100%;
}

/* --- ALERTS --- */
.alert {
    padding: 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
    border-left: 4px solid;
    background-color: var(--bg-card);
}

.alert-info {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    background-color: rgba(59, 130, 246, 0.05);
}

.alert-success {
    border-color: var(--brand-success);
    color: var(--brand-success);
    background-color: rgba(16, 185, 129, 0.05);
}

.alert-warning {
    border-color: var(--brand-warning);
    color: var(--brand-warning);
    background-color: rgba(245, 158, 11, 0.05);
}

.alert-danger {
    border-color: var(--brand-danger);
    color: var(--brand-danger);
    background-color: rgba(239, 68, 68, 0.05);
}

/* --- ANIMATIONS --- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
    #mobile-menu-toggle {
        display: inline-flex;
    }

    #sidebar-toggle {
        display: none;
    }

    .sidebar {
        transform: translateX(-100%);
        width: min(88vw, 320px);
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .sidebar-header {
        padding: 16px;
    }

    .header-text h1 {
        font-size: 1.4rem;
    }

    .sidebar-nav {
        padding: 14px 10px 20px;
    }

    .sidebar-nav a,
    .nav-section-header {
        padding-left: 14px;
        padding-right: 14px;
    }

    .sidebar-user-info {
        margin: 12px 10px 6px;
        padding: 14px;
    }

    .main-content {
        margin-left: 0 !important;
        padding: 20px;
    }

    .match-card {
        grid-template-columns: 1fr;
        gap: 16px;
        text-align: center;
    }

    .match-player.home,
    .match-player.away {
        align-items: center;
        text-align: center;
    }

    .match-meta {
        position: static;
        transform: none;
        display: inline-block;
        margin-bottom: 8px;
    }


@media (max-width: 640px) {
    .sidebar {
        width: min(92vw, 340px);
    }

    .header-text h1 {
        font-size: 1.28rem;
    }

    .sidebar-nav a {
        font-size: 0.95rem;
        min-height: 46px;
    }

    .nav-section-header {
        font-size: 0.76rem;
    }

    .sidebar-user-name {
        font-size: 0.98rem;
    }

    .sidebar-user-email {
        font-size: 0.8rem;
    }
}

    /* Mobile Toggle */
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 8px;
        background: var(--bg-card);
        border: 1px solid var(--border-subtle);
        color: var(--text-main);
        position: fixed;
        top: 15px;
        right: 15px;
        z-index: 100;
        cursor: pointer;
    }
}

@media (min-width: 1025px) {
    .mobile-menu-btn {
        display: none;
    }
}

/* --- TABLES --- */
.table-container {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background-color: var(--bg-card);
}

.table {
    width: 100%;
    border-collapse: collapse;
    color: var(--text-main);
}

.table th {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-subtle);
}

.table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-subtle);
}

.table tr:last-child td {
    border-bottom: none;
}

.table tr:hover {
    background-color: var(--bg-card-hover);
}

/* --- AVATARS & BADGES --- */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background-color: var(--bg-card-hover);
    border: 2px solid var(--border-subtle);
}

.avatar-sm {
    width: 32px;
    height: 32px;
}

.avatar-lg {
    width: 64px;
    height: 64px;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

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

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

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

.badge-neutral {
    background-color: rgba(148, 163, 184, 0.1);
    color: var(--text-muted);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

/* --- FORM INDICATORS --- */
.form-indicators {
    display: flex;
    gap: 4px;
}

.indicator {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
}

.indicator.W {
    background-color: var(--brand-success);
    color: #fff;
}

.indicator.D {
    background-color: var(--text-muted);
    color: #fff;
}

.indicator.L {
    background-color: var(--brand-danger);
    color: #fff;
}

/* --- STATUS CLOSED --- */
.status-closed {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--brand-danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
    gap: 6px;
}

/* =====================================================
   HOME DASHBOARD
   ===================================================== */

/* --- HERO SECTION --- */
.home-hero {
    margin-bottom: 32px;
    padding: 32px;
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(30, 41, 59, 0.5) 100%);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    position: relative;
    overflow: hidden;
}

.home-hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 100%;
    background: radial-gradient(circle at center, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.home-hero-content {
    position: relative;
    z-index: 1;
}

.hero-welcome h2 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 4px;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    /* Added for lint fix */
    -webkit-text-fill-color: transparent;
}

.hero-welcome p {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 24px;
}

.hero-stats-row {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.stat-badge {
    display: flex;
    align-items: center;
    background-color: rgba(15, 23, 42, 0.6);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    gap: 12px;
    min-width: 180px;
}

.stat-icon {
    font-size: 1.5rem;
    background-color: rgba(255, 255, 255, 0.05);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-main);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --- FILTERS --- */
.competitions-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    gap: 8px;
    background-color: var(--bg-card);
    padding: 4px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
}

.filter-btn {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-muted);
    border: none;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    color: var(--text-main);
}

.filter-btn.active {
    background-color: var(--brand-primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.search-group {
    position: relative;
    flex: 1;
    max-width: 300px;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.search-input {
    width: 100%;
    padding: 10px 10px 10px 36px;
    background-color: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-size: 0.9rem;
}

.search-input:focus {
    outline: none;
    border-color: var(--brand-primary);
}

/* --- COMPETITION CARDS --- */
.comp-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.comp-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.comp-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border: 1px solid;
}

.comp-status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.status-pending,
.status-future {
    background-color: rgba(148, 163, 184, 0.1);
    color: var(--text-muted);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.comp-body {
    flex: 1;
    margin-bottom: 20px;
}

.comp-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
}

.comp-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 16px;
    height: 40px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.comp-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 0.8rem;
    color: var(--text-dim);
}

.comp-progress {
    margin-top: 16px;
}

.progress-bar-bg {
    height: 6px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 1s ease-out;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.comp-footer {
    display: flex;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
    margin-top: auto;
}

/* =====================================================
   CDM DT SPECIFIC STYLES
   ===================================================== */
.cdm-bracket {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
    overflow-x: auto;
}

.bracket-round {
    display: flex;
    flex-direction: column;
    gap: 30px;
    min-width: 250px;
}

.bracket-match {
    background: linear-gradient(145deg, var(--bg-card) 0%, rgba(30, 41, 59, 0.8) 100%);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 15px;
    position: relative;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.bracket-match:hover {
    transform: translateY(-2px);
    border-color: var(--brand-purple);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
}

.bracket-match .match-meta {
    top: -10px;
    background-color: var(--brand-purple);
    color: #fff;
}

.bracket-team {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.bracket-team:first-child {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.bracket-team-name {
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bracket-team-score {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--brand-primary);
    background: rgba(0, 0, 0, 0.2);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
}

.bracket-team.winner .bracket-team-name {
    color: var(--brand-success);
}

.bracket-team.winner .bracket-team-score {
    color: var(--brand-success);
}

.table-row-qualified {
    background: linear-gradient(to right, rgba(16, 185, 129, 0.05), transparent);
    border-left: 3px solid var(--brand-success);
}

.admin-panel {
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 32px;
}
