:root {
    --bg-color: #0c111d;
    --card-bg: rgba(17, 24, 39, 0.45);
    --accent-color: #316eb5;
    --accent-red: #da251d;
    --accent-glow: rgba(49, 110, 181, 0.3);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --danger: #da251d;
    --success: #10b981;
    --warning: #f59e0b;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    font-size: 16px;
    overflow-x: hidden;
}

.main-content {
    margin-left: 260px;
    padding: 40px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #0c111d url('../images/background.png') no-repeat center center;
    background-size: 100% 100%;
    background-attachment: scroll;
}

/* Mobile Top Bar (hidden on desktop) */
.mobile-topbar {
    display: none;
    background: rgba(15, 23, 42, 0.95);
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
}
.mobile-topbar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--accent-color);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.mobile-menu-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 998;
    backdrop-filter: blur(3px);
}

/* Specific adjustments for mobile/tablet */
@media (max-width: 1024px) {
    .mobile-topbar {
        display: flex;
    }

    .main-content {
        margin-left: 0;
        background-attachment: scroll;
        background-size: cover;
        padding: 20px;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 999;
    }

    .sidebar.open {
        transform: translateX(0);
    }
    
    .sidebar-overlay.active {
        display: block;
    }
    
    #ct-main-grid {
        grid-template-columns: 1fr !important;
    }
    
    .card-grid {
        grid-template-columns: 1fr !important;
    }
    
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

@media (max-width: 600px) {
    .header-section {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 15px !important;
    }
}

/* Glassmorphism */
.glass {
    background: rgba(17, 24, 39, 0.05);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 12px 30px 0 rgba(0, 0, 0, 0.2);
}

.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 0 15px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px var(--accent-glow);
}

/* Sporty Sidebar/Navbar */
.sidebar {
    width: 260px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: rgba(15, 23, 42, 0.95);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.sidebar h2 {
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 1.4rem;
    margin-bottom: 40px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 14px 20px;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.2s;
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-color);
}

/* Content Area */
.main-content {
    margin-left: 260px;
    padding: 40px;
    flex: 1;
}

/* Cards for stats/info */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.card {
    padding: 20px;
    border-radius: 16px;
}

.card h3 {
    margin-top: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card .value {
    font-size: 2rem;
    font-weight: 800;
    margin: 10px 0;
}

/* Tables for lists */
.table-container {
    margin-top: 30px;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

th {
    text-align: left;
    padding: 15px;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
}

tr.glass-row {
    background: rgba(30, 41, 59, 0.4);
    transition: transform 0.2s;
}

tr.glass-row:hover {
    transform: scale(1.01);
    background: rgba(30, 41, 59, 0.6);
}

td {
    padding: 15px;
}

td:first-child {
    border-radius: 8px 0 0 8px;
}

td:last-child {
    border-radius: 0 8px 8px 0;
}

/* Sporty status badges */
.badge {
    padding: 6px 14px;
    border-radius: 99px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-pending {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.badge-active {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.badge-completed {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

/* FULLSCREEN IMMERSIVE MODE - COCKPIT FOCUS */
:fullscreen .sidebar {
    display: none !important;
}

:fullscreen .main-content {
    margin-left: 0 !important;
    width: 100% !important;
    padding: 30px !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
}

/* Webkit/Blink, Mozilla support */
:-webkit-full-screen .sidebar { display: none !important; }
:-webkit-full-screen .main-content { margin-left: 0 !important; width: 100% !important; padding: 30px !important; }

:-moz-full-screen .sidebar { display: none !important; }
:-moz-full-screen .main-content { margin-left: 0 !important; width: 100% !important; padding: 30px !important; }