/* Admin Panel Specific Styles */

.admin-panel {
    background: #f8fafc;
}

.admin-layout {
    display: flex;
    min-height: calc(100vh - 80px);
}

.admin-sidebar {
    width: 260px;
    background: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 80px;
    height: calc(100vh - 80px);
    overflow-y: auto;
}

.admin-nav {
    padding: 20px 0;
}

.admin-nav .nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 25px;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    font-weight: 500;
}

.admin-nav .nav-item:hover {
    background: var(--light-bg);
    color: var(--primary-color);
}

.admin-nav .nav-item.active {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.1) 0%, transparent 100%);
    border-left-color: var(--primary-color);
    color: var(--primary-color);
}

.admin-nav .nav-item i {
    font-size: 18px;
    width: 20px;
}

.admin-content {
    flex: 1;
    padding: 40px;
    max-width: 1400px;
}

.admin-section {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 30px;
}

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

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 8px;
}

.action-buttons .btn-small {
    padding: 6px 12px;
    font-size: 13px;
}

/* Table Enhancements */
.table-container table {
    background: white;
}

.table-container img {
    border-radius: 4px;
    object-fit: cover;
}

/* Video thumbnail in table */
.video-thumb {
    width: 80px;
    height: 45px;
    object-fit: cover;
    border-radius: 6px;
}

/* Level Cards in Admin */
.admin-section .levels-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.admin-section .level-card {
    position: relative;
}

.level-card-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid var(--border-color);
}

/* Withdrawal Details Box */
.withdrawal-detail {
    margin: 10px 0;
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.withdrawal-detail:last-child {
    border-bottom: none;
}

.withdrawal-detail label {
    font-weight: 600;
    color: var(--text-dark);
}

.withdrawal-detail span {
    color: var(--text-light);
}

/* Status indicators */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.status-indicator.active {
    background: var(--success-color);
}

.status-indicator.inactive {
    background: var(--text-light);
}

.status-indicator.suspended {
    background: var(--danger-color);
}

.status-indicator.pending {
    background: var(--warning-color);
}

/* Enhanced modals for admin */
.modal-content form {
    max-height: 70vh;
    overflow-y: auto;
}

/* Responsive Admin Panel */
@media (max-width: 1024px) {
    .admin-layout {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
        height: auto;
        position: relative;
        top: 0;
    }

    .admin-nav {
        display: flex;
        overflow-x: auto;
        padding: 10px;
    }

    .admin-nav .nav-item {
        white-space: nowrap;
        border-left: none;
        border-bottom: 3px solid transparent;
    }

    .admin-nav .nav-item.active {
        border-left: none;
        border-bottom-color: var(--primary-color);
    }

    .admin-content {
        padding: 20px;
    }

    .page-title {
        font-size: 24px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-buttons .btn-small {
        width: 100%;
    }

    .table-container {
        overflow-x: auto;
    }

    table {
        font-size: 14px;
    }

    th, td {
        padding: 10px 8px;
    }
}

/* Loading state for tables */
.table-loading {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
}

.table-loading i {
    font-size: 32px;
    margin-bottom: 10px;
    display: block;
}

/* Enhanced form styling */
.form-group input[type="color"] {
    height: 50px;
    cursor: pointer;
}

/* Stats cards hover effect */
.stat-card {
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

/* Recent activity styling */
.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
}

.activity-icon.video {
    background: var(--primary-color);
}

.activity-icon.withdrawal {
    background: var(--warning-color);
}

.activity-icon.user {
    background: var(--success-color);
}

/* Top users table styling */
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-weight: 700;
    color: white;
}

.rank-badge.gold {
    background: linear-gradient(135deg, #FFD700, #FFA500);
}

.rank-badge.silver {
    background: linear-gradient(135deg, #C0C0C0, #A8A8A8);
}

.rank-badge.bronze {
    background: linear-gradient(135deg, #CD7F32, #8B4513);
}

.rank-badge.other {
    background: var(--text-light);
}
