/* ============================================
   Admin Dashboard
   ============================================ */
.admin-page {
    min-height: calc(100vh - var(--header-height));
}

.admin-container {
    padding: 30px 20px 60px;
}

.admin-layout {
    display: flex;
    gap: 24px;
/*    max-width: 1400px;*/
    margin: 0 auto;
    padding: 0 20px 60px;
}

.admin-main {
    flex: 1;
    min-width: 0;
}

.admin-sidebar {
    width: 220px;
    flex-shrink: 0;
/*    background: var(--bg-card);*/
/*    border: 1px solid var(--border-color);*/
/*    border-radius: var(--radius-lg);*/
    padding: 20px 0;
    height: fit-content;
/*    position: sticky;*/
/*    top: 90px;*/
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
}

.sidebar-section {
    padding: 0 0 8px;
    margin-bottom: 4px;
}

.sidebar-section + .sidebar-section {
    border-top: 1px solid var(--border-light);
    padding-top: 12px;
    margin-top: 4px;
}

.sidebar-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    padding: 6px 20px 8px;
}

.sidebar-link {
    display: block;
    padding: 4px 20px 4px 28px;
    color: var(--text-primary);
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition);
    border-left: 3px solid transparent;
    position: relative;
    cursor: pointer;
}

.sidebar-link:hover {
    background: var(--bg-secondary);
    color: var(--accent-primary);
    border-left-color: var(--accent-primary);
}

.sidebar-link::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--text-muted);
}

.link-text {
    padding-left: 5px;
}



.admin-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0;
}

.tab-btn {
    padding: 12px 24px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-family);
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}

.tab-btn:hover {
    color: var(--accent-primary);
}

.tab-btn.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}

.admin-tab-content {
    display: none;
}

.admin-tab-content.active {
    display: block;
}

.admin-tab-content h2 {
    font-size: 1.3rem;
/*    margin-bottom: 20px;*/
}

.logs-header {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    margin: 20px 0 10px;
}

.logs-header h2 {
    padding: 0 20px;
}

.logs-content {
    padding: 20px;
    font-size: 0.9rem;
}

.games-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0 10px;
}

.games-header h2 {
    margin: 20px 0 10px;
    padding: 0 20px;
}

.games-actions {
    
}

/* Tables */
.games-table-wrapper,
.bets-table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.admin-table th {
    background: var(--bg-secondary);
    padding: 14px 16px;
    text-align: left;
    font-weight: 700;
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

.admin-table th.right {
    text-align: right;
}

.admin-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
    vertical-align: middle;
    white-space: nowrap;
}

.admin-table td .success {
    color: var(--success);
    font-weight: bold;
}

.admin-table td .danger {
    color: var(--danger);
    font-weight: bold;
}

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

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

.empty-cell {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 16px !important;
}

.status-select {
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.8rem;
    font-family: var(--font-family);
    cursor: pointer;
}

.status-select:focus {
    outline: none;
    border-color: var(--accent-primary);
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 32px;
    max-width: 460px;
    width: 100%;
    box-shadow: var(--shadow-xl);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-header h3 {
    font-size: 1.2rem;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--danger-bg);
    color: var(--danger);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .admin-tabs {
        overflow-x: auto;
        gap: 0;
    }

    .tab-btn {
        padding: 10px 16px;
        font-size: 0.85rem;
        white-space: nowrap;
    }

    .admin-table {
        font-size: 0.8rem;
    }

    .admin-table th,
    .admin-table td {
        padding: 10px 12px;
    }
}

@media (max-width: 900px) {
    .admin-layout {
        flex-direction: column;
        padding: 0 0 40px;
    }
    .admin-sidebar {
        width: 100%;
        position: static;
        padding: 12px 0;
    }
    .sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
        padding: 0 16px;
    }
    .sidebar-section {
        padding: 0;
        margin: 0;
        border: none !important;
    }
    .sidebar-section-title {
/*        display: none;*/
    }
    .sidebar-section + .sidebar-section {
        border-top: none;
        margin-top: 0;
        padding-top: 0;
    }
    .sidebar-link {
        padding: 6px 14px;
        border-left: none;
        border-radius: var(--radius-sm);
        background: var(--bg-secondary);
        font-size: 0.85rem;
    }
    .sidebar-link::before {
        display: none;
    }
    .sidebar-link:hover {
        border-left: none;
        background: var(--accent-primary);
        color: #fff;
    }
}