/* ==========================================================================
   Sport for All - Admin Dashboard Styles
   Extends coordinator-dashboard.css for admin-specific components
   ========================================================================== */

/* ---------- Admin Dashboard ---------- */
.sfa-admin-dashboard {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--sfa-text, #1e293b);
    line-height: 1.6;
}

.sfa-admin-dashboard .dashboard-header {
    margin-bottom: 32px;
    padding: 28px;
    background: linear-gradient(135deg, #0f172a, #1e40af);
    border-radius: var(--sfa-radius, 12px);
    color: #fff;
}

.sfa-admin-dashboard .dashboard-header h1 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 4px 0;
    color: #fff;
}

.sfa-admin-dashboard .dashboard-header p {
    margin: 0;
    opacity: 0.85;
    font-size: 14px;
}

/* ---------- Admin Containers ---------- */
.sfa-admin-users,
.sfa-admin-content,
.sfa-admin-analytics,
.sfa-validation-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--sfa-text, #1e293b);
    line-height: 1.6;
}

/* ---------- Section Header ---------- */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.section-header h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
}

.section-header p {
    width: 100%;
    margin: 0;
    color: var(--sfa-text-muted, #64748b);
    font-size: 14px;
}

/* ---------- User Info Cell ---------- */
.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

/* ---------- Content Toolbar ---------- */
.content-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.status-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.filter-btn-sm {
    padding: 5px 12px;
    font-size: 12px;
}

.content-search {
    display: flex;
    gap: 6px;
}

.content-search .form-control {
    padding: 8px 12px;
    font-size: 13px;
    min-width: 200px;
}

/* ---------- Pagination ---------- */
.sfa-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 24px;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--sfa-radius-sm, 8px);
    font-size: 13px;
    font-weight: 500;
    color: var(--sfa-text-muted, #64748b);
    background: var(--sfa-white, #ffffff);
    border: 1px solid var(--sfa-border, #e2e8f0);
    text-decoration: none;
    transition: all 0.2s ease;
}

.pagination-btn:hover {
    border-color: var(--sfa-primary, #2563eb);
    color: var(--sfa-primary, #2563eb);
    text-decoration: none;
}

.pagination-btn.active {
    background: var(--sfa-primary, #2563eb);
    border-color: var(--sfa-primary, #2563eb);
    color: #fff;
}

/* ---------- Analytics ---------- */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.analytics-card {
    background: var(--sfa-white, #ffffff);
    border-radius: var(--sfa-radius, 12px);
    border: 1px solid var(--sfa-border, #e2e8f0);
    padding: 24px;
    box-shadow: var(--sfa-shadow, 0 1px 3px rgba(0, 0, 0, 0.1));
}

.analytics-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--sfa-border, #e2e8f0);
}

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

.sfa-table-compact thead th,
.sfa-table-compact tbody td {
    padding: 8px 12px;
    font-size: 13px;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #f1f5f9;
    border-radius: 999px;
    overflow: hidden;
    display: inline-block;
    vertical-align: middle;
    margin-right: 6px;
    max-width: 80px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, var(--sfa-primary, #2563eb), #7c3aed);
    border-radius: 999px;
    transition: width 0.5s ease;
    min-width: 2px;
}

/* Analytics List */
.analytics-list {
    display: flex;
    flex-direction: column;
}

.analytics-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--sfa-border, #e2e8f0);
    font-size: 14px;
}

.analytics-list-item:last-child {
    border-bottom: none;
}

.analytics-list-total {
    margin-top: 4px;
    padding-top: 12px;
    border-top: 2px solid var(--sfa-border, #e2e8f0);
    border-bottom: none;
}

.analytics-list-value {
    font-weight: 600;
    color: var(--sfa-primary, #2563eb);
}

/* Stats Grid 3 cols */
.stats-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.stat-secondary .stat-number {
    color: var(--sfa-secondary, #64748b);
}

.analytics-summary {
    margin-top: 8px;
}

.text-muted {
    color: var(--sfa-text-muted, #64748b);
    font-size: 14px;
}

/* ---------- Modal ---------- */
.sfa-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sfa-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
}

.sfa-modal-content {
    position: relative;
    background: var(--sfa-white, #ffffff);
    border-radius: var(--sfa-radius, 12px);
    width: 90%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--sfa-shadow-lg, 0 10px 15px rgba(0, 0, 0, 0.1));
    animation: sfa-modal-in 0.25s ease;
}

@keyframes sfa-modal-in {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.sfa-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--sfa-border, #e2e8f0);
}

.sfa-modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.sfa-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--sfa-text-muted, #64748b);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: all 0.2s ease;
}

.sfa-modal-close:hover {
    color: var(--sfa-danger, #dc2626);
}

.sfa-modal .sfa-form {
    border: none;
    border-radius: 0;
}

.sfa-modal .form-section {
    padding: 20px 24px;
}

.sfa-modal .form-row {
    margin-bottom: 14px;
}

.sfa-modal .form-group {
    margin-bottom: 0;
}

.sfa-modal-message {
    margin: 0 24px 16px;
    padding: 12px 16px;
    border-radius: var(--sfa-radius-sm, 8px);
    font-size: 13px;
}

.sfa-modal-message.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #16a34a;
}

.sfa-modal-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #dc2626;
}

/* ---------- Validation Queue Specific ---------- */
.sfa-validation-container h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 24px 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .sfa-admin-dashboard,
    .sfa-admin-users,
    .sfa-admin-content,
    .sfa-admin-analytics,
    .sfa-validation-container {
        padding: 16px;
    }

    .analytics-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid-3 {
        grid-template-columns: 1fr;
    }

    .content-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .content-search {
        width: 100%;
    }

    .content-search .form-control {
        min-width: 0;
        flex: 1;
    }

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

    .sfa-modal-content {
        width: 95%;
        margin: 16px;
    }
}

@media (max-width: 480px) {
    .analytics-card {
        padding: 16px;
    }

    .progress-bar {
        max-width: 50px;
    }
}
