﻿/* Admin Dashboard specific styles */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.dashboard-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
}

.dashboard-title-icon {
    margin-right: 0.75rem;
    color: var(--accent);
}

.dashboard-actions {
    display: flex;
    gap: 0.5rem;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    border: none;   /* override enhanced-layout.css's light-gray .stat-card border */
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    min-height: 140px;
}

.stat-card-total {
    background: linear-gradient(135deg, #4e73df 0%, #2e59d9 100%);
}

.stat-card-connected {
    background: linear-gradient(135deg, #36b9cc 0%, #1a8a98 100%);
}

.stat-card-duration {
    /* Deeper amber than the old gold so white text stays legible. */
    background: linear-gradient(135deg, #f0a020 0%, #c2740a 100%);
}

.stat-card-success {
    background: linear-gradient(135deg, #1cc88a 0%, #13855c 100%);
}

.stat-content {
    z-index: 1;
}

/* Explicit #fff — enhanced-layout.css sets .stat-value to a near-black (gray-900) for its
   white-card design, which otherwise wins over the inherited white here and makes the numbers
   unreadable on the coloured gradient tiles. Scoped under .stat-card to beat that on specificity. */
.stat-card .stat-title {
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    opacity: 0.85;
    margin-bottom: 0.75rem;
    color: #fff;
}

.stat-card .stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
    color: #fff;
}

.stat-card .stat-subtitle {
    font-size: 0.875rem;
    opacity: 0.85;
    color: #fff;
}

.stat-icon {
    font-size: 2.5rem;
    opacity: 0.15;
    z-index: 0;
}

.stat-bg-icon {
    position: absolute;
    bottom: -15px;
    right: -15px;
    font-size: 7rem;
    opacity: 0.1;
    z-index: 0;
}

.section-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: none;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.section-header {
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
    display: flex;
    align-items: center;
}

.section-icon {
    color: var(--accent);
    margin-right: 0.5rem;
    font-size: 1.25rem;
}

.section-body {
    padding: 1.5rem;
}

.empty-state {
    background-color: var(--surface-2);
    border-radius: 8px;
    padding: 1.25rem;
    text-align: center;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
    color: var(--accent);
}

.empty-state-message {
    margin-bottom: 0.75rem;
}

.empty-state-action {
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
}

    .empty-state-action:hover {
        text-decoration: underline;
    }

.chart-container {
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-placeholder {
    color: var(--text-muted);
    text-align: center;
}

.chart-placeholder-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

/* Table styles */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.modern-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

    .modern-table th {
        text-transform: uppercase;
        font-size: 0.75rem;
        font-weight: 600;
        letter-spacing: 0.03em;
        color: var(--text-muted);
        padding: 0.75rem 1rem;
        border-bottom: 1px solid var(--border);
    }

    .modern-table td {
        padding: 1rem;
        border-bottom: 1px solid var(--border);
        vertical-align: middle;
    }

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

    .modern-table tr:hover td {
        background-color: var(--card-hover, rgba(255,255,255,0.03));
    }

.badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35em 0.65em;
    border-radius: 50rem;
}

.badge-active {
    background-color: rgba(var(--success-rgb), 0.1);
    color: var(--success-color);
}

.badge-inactive {
    background-color: rgba(var(--text-muted-rgb), 0.1);
    color: var(--text-muted);
}

.action-btns {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 0.875rem;
}

/* Animation for chart loading placeholders */
@keyframes pulse {
    0% {
        opacity: 0.6;
    }

    50% {
        opacity: 0.3;
    }

    100% {
        opacity: 0.6;
    }
}

.pulse-animation {
    animation: pulse 2s infinite ease-in-out;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .stats-row {
        grid-template-columns: repeat(auto-fit, minmax(100%, 1fr));
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .dashboard-actions {
        width: 100%;
    }
}
