/*
ACUMEN SPORTS - DASHBOARD CSS
Complete Mobile-Friendly Version
*/

:root {
    --navy: #0a1e3d;
    --navy-light: #1a3a6b;
    --maroon: #6b1a2a;
    --red: #c41e3a;
    --white: #ffffff;
    --off-white: #f8f6f4;
    --gray-light: #e8e4e0;
    --gray: #8a8580;
    --shadow: rgba(10, 30, 61, 0.08);
    --shadow-hover: rgba(10, 30, 61, 0.15);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Arial, sans-serif;
    background: var(--off-white);
    color: #222;
}

/* ========================================
   DASHBOARD LAYOUT
   ======================================== */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* ========================================
   SIDEBAR - FIXED POSITION
   ======================================== */
.dashboard-sidebar {
    width: 260px;
    background: var(--navy);
    color: var(--white);
    padding: 25px 20px;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
}

/* ========================================
   MAIN CONTENT - MARGIN LEFT FOR SIDEBAR
   ======================================== */
.dashboard-content {
    margin-left: 260px;
    padding: 30px 35px;
    width: calc(100% - 260px);
    min-height: 100vh;
    flex: 1;
}

/* Sidebar Scrollbar */
.dashboard-sidebar::-webkit-scrollbar {
    width: 4px;
}
.dashboard-sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}
.dashboard-sidebar::-webkit-scrollbar-thumb {
    background: var(--red);
    border-radius: 10px;
}

/* Sidebar Profile */
.dashboard-sidebar .sidebar-profile {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 20px;
}

.dashboard-sidebar .sidebar-profile .avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    margin: 0 auto 12px;
    color: var(--red);
    border: 3px solid var(--red);
}

.dashboard-sidebar .sidebar-profile h4 {
    font-size: 16px;
    margin-bottom: 2px;
    font-weight: 600;
}

.dashboard-sidebar .sidebar-profile small {
    opacity: 0.6;
    font-size: 13px;
}

/* Sidebar Navigation */
.dashboard-sidebar .sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dashboard-sidebar .sidebar-nav a {
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    padding: 11px 16px;
    border-radius: 10px;
    transition: all var(--transition);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.dashboard-sidebar .sidebar-nav a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--white);
}

.dashboard-sidebar .sidebar-nav a.active {
    background: rgba(196, 30, 58, 0.2);
    color: var(--white);
    border-right: 3px solid var(--red);
}

.dashboard-sidebar .sidebar-nav a .icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.dashboard-sidebar .sidebar-nav a .label {
    flex: 1;
}

.dashboard-sidebar .sidebar-nav a .badge {
    background: var(--red);
    color: var(--white);
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 30px;
    font-weight: 700;
}

.dashboard-sidebar .sidebar-nav a.logout-link {
    margin-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 15px;
    color: rgba(255, 100, 100, 0.7);
}

.dashboard-sidebar .sidebar-nav a.logout-link:hover {
    color: var(--red);
    background: rgba(196, 30, 58, 0.1);
}

/* ========================================
   SIDEBAR OVERLAY (Mobile)
   ======================================== */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ========================================
   MAIN CONTENT
   ======================================== */
.dashboard-content {
    margin-left: 260px;
    padding: 30px 35px;
    width: 100%;
    min-height: 100vh;
}

/* ========================================
   TOP BAR
   ======================================== */
.dashboard-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0 20px;
    border-bottom: 1px solid var(--gray-light);
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.dashboard-topbar .left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.dashboard-topbar .left .menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 8px;
    transition: all var(--transition);
    color: var(--navy);
    line-height: 1;
}

.dashboard-topbar .left .menu-toggle:hover {
    background: var(--off-white);
}

.dashboard-topbar .left h1 {
    font-size: 24px;
    color: var(--navy);
    font-weight: 700;
}

.dashboard-topbar .left h1 span {
    color: var(--red);
}

.dashboard-topbar .right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.dashboard-topbar .right .date {
    color: #888;
    font-size: 14px;
}

.dashboard-topbar .right .user-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--white);
    padding: 6px 16px 6px 10px;
    border-radius: 30px;
    box-shadow: 0 2px 10px var(--shadow);
}

.dashboard-topbar .right .user-badge .avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--red);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
}

.dashboard-topbar .right .user-badge .name {
    font-size: 14px;
    font-weight: 600;
    color: var(--navy);
}

.dashboard-topbar .right .user-badge .role-tag {
    font-size: 11px;
    color: var(--gray);
    font-weight: 500;
}

/* ========================================
   CONTENT HEADER
   ======================================== */
.content-header {
    margin-bottom: 30px;
}

.content-header h1 {
    color: var(--navy);
    font-size: 28px;
    font-weight: 700;
}

.content-header p {
    color: #888;
    font-size: 15px;
    margin-top: 4px;
}

/* ========================================
   STATS GRID
   ======================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    padding: 22px 18px;
    border-radius: 16px;
    box-shadow: 0 5px 20px var(--shadow);
    text-align: center;
    border-bottom: 4px solid var(--red);
    transition: all var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px var(--shadow-hover);
}

.stat-card .number {
    font-size: 32px;
    font-weight: 800;
    color: var(--red);
    line-height: 1.2;
}

.stat-card .label {
    color: #888;
    font-size: 14px;
    margin-top: 5px;
}

/* ========================================
   SECTION CARDS
   ======================================== */
.section-card {
    background: var(--white);
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 5px 20px var(--shadow);
}

.section-card h3 {
    color: var(--navy);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gray-light);
    font-size: 18px;
}

.section-card .item {
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-card .item:last-child {
    border-bottom: none;
}

/* ========================================
   QUICK ACTIONS
   ======================================== */
.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.quick-actions a {
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    background: var(--off-white);
    color: var(--navy);
    transition: all var(--transition);
    border: 2px solid transparent;
    font-size: 14px;
}

.quick-actions a:hover {
    border-color: var(--red);
    background: rgba(196, 30, 58, 0.05);
    transform: translateY(-2px);
}

.quick-actions a .icon {
    font-size: 24px;
    display: block;
    margin-bottom: 5px;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--red);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--maroon);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(196, 30, 58, 0.3);
}

.btn-secondary {
    background: var(--gray-light);
    color: var(--navy);
}

.btn-secondary:hover {
    background: var(--gray);
}

.btn-success {
    background: #2e7d32;
    color: var(--white);
}

.btn-success:hover {
    background: #1b5e20;
}

.btn-sm {
    padding: 5px 16px;
    font-size: 12px;
}

/* ========================================
   TABLES
   ======================================== */
.table-responsive {
    overflow-x: auto;
    margin: 15px 0;
    border-radius: 12px;
    box-shadow: 0 2px 10px var(--shadow);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: var(--white);
}

.table th {
    background: var(--navy);
    color: var(--white);
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

.table td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--gray-light);
}

.table tr:last-child td {
    border-bottom: none;
}

.table tr:hover td {
    background: rgba(196, 30, 58, 0.02);
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.active {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-badge.inactive {
    background: #ffebee;
    color: #c62828;
}

.status-badge.suspended {
    background: #fff3e0;
    color: #e65100;
}

.status-badge.pending {
    background: #fff3e0;
    color: #e65100;
}

.status-badge.paid {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-badge.completed {
    background: #e3f2fd;
    color: #0d47a1;
}

.status-badge.failed {
    background: #ffebee;
    color: #c62828;
}

/* ========================================
   FORMS
   ======================================== */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 5px;
    font-size: 14px;
}

.form-group .required {
    color: var(--red);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--gray-light);
    border-radius: 10px;
    font-size: 14px;
    transition: all var(--transition);
    background: var(--white);
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--red);
    outline: none;
    box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.08);
}

.form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* ========================================
   TABLE TOOLBAR
   ======================================== */
.table-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.table-toolbar input,
.table-toolbar select {
    padding: 8px 14px;
    border: 2px solid var(--gray-light);
    border-radius: 10px;
    font-size: 14px;
    min-width: 200px;
    background: var(--white);
}

.table-toolbar input:focus,
.table-toolbar select:focus {
    border-color: var(--red);
    outline: none;
}

/* ========================================
   RESPONSIVE - TABLETS & MOBILE
   ======================================== */

/* Tablets */
@media (max-width: 1024px) {
    .dashboard-sidebar {
        width: 220px;
        padding: 20px 15px;
    }
    .dashboard-content {
        margin-left: 220px;
        padding: 20px 25px;
    }
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobile */
@media (max-width: 768px) {
    /* Sidebar - Hidden by default, slides in */
    .dashboard-sidebar {
        width: 280px;
        left: -280px;
        padding: 20px;
        box-shadow: none;
    }
    
    .dashboard-sidebar.open {
        left: 0;
        box-shadow: 2px 0 30px rgba(0, 0, 0, 0.3);
    }
    
    .dashboard-content {
        margin-left: 0;
        padding: 15px;
        padding-top: 0;
    }
    
    /* Top Bar */
    .dashboard-topbar {
        padding: 12px 0 15px;
        gap: 10px;
    }
    
    .dashboard-topbar .left .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 22px;
    }
    
    .dashboard-topbar .left h1 {
        font-size: 20px;
    }
    
    .dashboard-topbar .right .date {
        display: none;
    }
    
    .dashboard-topbar .right .user-badge .name {
        display: none;
    }
    
    .dashboard-topbar .right .user-badge {
        padding: 4px 10px 4px 6px;
    }
    
    .dashboard-topbar .right .user-badge .role-tag {
        display: none;
    }
    
    /* Content */
    .content-header h1 {
        font-size: 22px;
    }
    
    /* Stats */
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .stat-card {
        padding: 16px 12px;
    }
    
    .stat-card .number {
        font-size: 24px;
    }
    
    .stat-card .label {
        font-size: 12px;
    }
    
    /* Forms */
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    /* Tables */
    .table {
        font-size: 13px;
    }
    
    .table th,
    .table td {
        padding: 8px 10px;
    }
    
    /* Buttons */
    .btn {
        padding: 8px 18px;
        font-size: 13px;
    }
    
    /* Quick Actions */
    .quick-actions {
        grid-template-columns: 1fr 1fr;
    }
    
    /* Table Toolbar */
    .table-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .table-toolbar input {
        min-width: auto;
    }
    
    /* Overlay */
    .sidebar-overlay.active {
        display: block;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .dashboard-content {
        padding: 10px;
    }
    
    .dashboard-topbar .left h1 {
        font-size: 17px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .stat-card {
        padding: 14px 10px;
    }
    
    .stat-card .number {
        font-size: 20px;
    }
    
    .dashboard-sidebar {
        width: 260px;
        left: -260px;
    }
    
    .section-card {
        padding: 15px;
    }
    
    .table {
        font-size: 12px;
    }
    
    .table th,
    .table td {
        padding: 6px 8px;
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.text-center { text-align: center; }
.text-navy { color: var(--navy); }
.text-red { color: var(--red); }
.text-gray { color: #888; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.p-20 { padding: 20px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-10 { gap: 10px; }
.gap-15 { gap: 15px; }
.gap-20 { gap: 20px; }
.w-full { width: 100%; }