/* Admin Dashboard Styles */

.admin-page {
    background: var(--bg-primary);
    min-height: 100vh;
}

.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Admin Header */
.admin-header {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.admin-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.admin-title h1 {
    color: var(--primary-light);
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.admin-title p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.admin-actions {
    display: flex;
    gap: 10px;
}

/* Loading State */
.admin-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    color: var(--text-secondary);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--bg-tertiary);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Access Denied */
.admin-denied {
    text-align: center;
    padding: 80px 20px;
}

.admin-denied h2 {
    color: var(--danger-color);
    margin-bottom: 15px;
}

.admin-denied p {
    color: var(--text-secondary);
    margin-bottom: 25px;
}

/* Stats Section */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    font-size: 2.5rem;
}

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

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-light);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Admin Section */
.admin-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 25px;
    margin-bottom: 30px;
}

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

.section-header h2 {
    color: var(--text-primary);
    font-size: 1.3rem;
}

.section-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.search-input {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 10px 15px;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    min-width: 200px;
}

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

.search-input::placeholder {
    color: var(--text-muted);
}

/* Table Styles */
.table-container {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-table td {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

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

.admin-table .email-cell {
    color: var(--text-primary);
    font-weight: 500;
}

.admin-table .date-cell {
    white-space: nowrap;
}

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-badge.active {
    background: rgba(34, 197, 94, 0.2);
    color: var(--success-color);
}

.status-badge.inactive {
    background: rgba(100, 116, 139, 0.2);
    color: var(--text-secondary);
}

/* Admin Badge */
.admin-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.admin-badge.yes {
    background: rgba(37, 99, 235, 0.2);
    color: var(--primary-light);
}

.admin-badge.no {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

/* Action Buttons */
.action-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px 10px;
    font-size: 0.85rem;
    transition: var(--transition);
}

.action-btn:hover {
    color: var(--primary-light);
}

.action-btn.danger:hover {
    color: var(--danger-color);
}

/* Table Footer */
.table-footer {
    margin-top: 15px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .admin-header-content {
        flex-direction: column;
        text-align: center;
    }

    .section-header {
        flex-direction: column;
        align-items: stretch;
    }

    .section-actions {
        justify-content: center;
    }

    .search-input {
        width: 100%;
    }

    .admin-table th,
    .admin-table td {
        padding: 10px 8px;
        font-size: 0.85rem;
    }
}
