/**
 * P7CO Admin Panel Styles
 * Subtle overrides for admin pages using Wolmart base
 * Color palette: soft blues, warm grays, elegant accents
 */

/* Admin Page Header - elegant subtle gradient */
.page-header-admin {
    background: linear-gradient(135deg, #f8fafc 0%, #eef2f7 50%, #e8eef5 100%);
    border-bottom: 1px solid #e2e8f0;
    padding: 2rem 0;
}

.page-header-admin .page-title {
    color: #1e293b;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.page-header-admin .page-subtitle {
    color: #64748b;
    font-size: 0.95rem;
}

/* Admin Cards - elegant with subtle shadow */
.card-admin {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
    transition: all 0.25s ease;
}

.card-admin:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
    transform: translateY(-1px);
}

.card-admin .card-header {
    background: linear-gradient(180deg, #fafbfc 0%, #f8fafc 100%);
    border-bottom: 1px solid #e2e8f0;
    padding: 1.25rem 1.5rem;
    border-radius: 0.75rem 0.75rem 0 0;
}

.card-admin .card-body {
    padding: 1.5rem;
}

.card-admin .card-title {
    color: #334155;
    font-weight: 600;
    font-size: 1rem;
}

/* Admin Icon Boxes */
.icon-box-admin {
    background: #f8fafc;
    border-radius: 0.5rem;
    padding: 1.25rem;
    border: 1px solid #e2e8f0;
}

/* Admin Tables */
.card-admin .table {
    margin-bottom: 0;
}

.card-admin .table td {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
}

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

/* Status Colors */
.status-pending {
    color: #f59e0b;
}

.status-approved {
    color: #10b981;
}

.status-rejected {
    color: #ef4444;
}

/* Admin Alert Styling */
.alert-admin {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 0.5rem;
    color: #0369a1;
}

/* Admin Filter Card */
.filter-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 1.25rem;
}

/* Moderation Item Cards */
.moderation-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.moderation-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    border-color: #cbd5e1;
}

/* Blog markdown tables */
.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.25rem 0;
    font-size: 0.95rem;
}

.post-content table th,
.post-content table td {
    border: 1px solid #e2e8f0;
    padding: 0.75rem 0.85rem;
    text-align: left;
    vertical-align: top;
}

.post-content table th {
    background: #f8fafc;
    color: #0f172a;
    font-weight: 600;
}

.post-content table tr:nth-child(even) td {
    background: #f9fbfd;
}

.moderation-item .item-title {
    color: #1e293b;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.moderation-item .item-meta {
    color: #64748b;
    font-size: 0.875rem;
}

/* Action Buttons */
.btn-approve {
    background: #10b981;
    border-color: #10b981;
    color: #fff;
}

.btn-approve:hover {
    background: #059669;
    border-color: #059669;
    color: #fff;
}

.btn-reject {
    background: #ef4444;
    border-color: #ef4444;
    color: #fff;
}

.btn-reject:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
}

/* Badge Status */
.badge-pending {
    background: #fef3c7;
    color: #92400e;
}

.badge-approved {
    background: #d1fae5;
    color: #065f46;
}

.badge-rejected {
    background: #fee2e2;
    color: #991b1b;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .card-admin .card-header,
    .card-admin .card-body {
        padding: 1rem;
    }
    
    .moderation-item {
        padding: 1rem;
    }
}

/* ===== KPI Dashboard Styling ===== */

/* KPI Stats Cards - elegant with accent colors */
.kpi-card {
    background: #fff;
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--kpi-accent, #3b82f6) 0%, var(--kpi-accent-light, #60a5fa) 100%);
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.kpi-card.kpi-primary { --kpi-accent: #3b82f6; --kpi-accent-light: #60a5fa; }
.kpi-card.kpi-success { --kpi-accent: #10b981; --kpi-accent-light: #34d399; }
.kpi-card.kpi-warning { --kpi-accent: #f59e0b; --kpi-accent-light: #fbbf24; }
.kpi-card.kpi-danger { --kpi-accent: #ef4444; --kpi-accent-light: #f87171; }
.kpi-card.kpi-info { --kpi-accent: #06b6d4; --kpi-accent-light: #22d3ee; }
.kpi-card.kpi-secondary { --kpi-accent: #6366f1; --kpi-accent-light: #818cf8; }

.kpi-value {
    font-size: 2.25rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.1;
    margin-bottom: 0.25rem;
}

.kpi-label {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--kpi-accent, #3b82f6) 0%, var(--kpi-accent-light, #60a5fa) 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Quick Action Links - beautiful hover effects */
.admin-action-link {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    color: #334155;
    text-decoration: none;
    transition: all 0.25s ease;
    gap: 0.75rem;
}

.admin-action-link:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #eef2f7 100%);
    border-color: #cbd5e1;
    color: #1e293b;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.admin-action-link i {
    font-size: 1.25rem;
    color: #64748b;
    transition: color 0.25s ease;
}

.admin-action-link:hover i {
    color: #3b82f6;
}

/* Health Status Indicators */
.health-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.health-status.healthy {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
}

.health-status.warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
}

.health-status.critical {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
}

.health-status::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.health-status.healthy::before { background: #10b981; }
.health-status.warning::before { background: #f59e0b; }
.health-status.critical::before { background: #ef4444; }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Queue Status Cards */
.queue-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1.25rem;
    transition: all 0.25s ease;
}

.queue-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.queue-name {
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.25rem;
}

.queue-count {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
}

.queue-meta {
    font-size: 0.75rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Admin Section Titles */
.admin-section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e2e8f0;
    position: relative;
}

.admin-section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 3rem;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 100%);
}

/* Empty State */
.admin-empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #64748b;
}

.admin-empty-state i {
    font-size: 3rem;
    color: #cbd5e1;
    margin-bottom: 1rem;
}

.admin-empty-state h4 {
    color: #475569;
    margin-bottom: 0.5rem;
}
