/* V2 API Stats Styles */

/* V2 Stats Section */
.v2-stats-section {
    background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.v2-stats-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #475569;
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
}

.v2-stats-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.v2-stats-title h2 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.v2-stats-title .badge {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    font-size: 0.625rem;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.v2-stats-title .subtitle {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-left: 0.5rem;
}

.v2-status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.v2-status-indicator .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

.v2-status-indicator .dot.active {
    background: #22c55e;
}

.v2-status-indicator .dot.idle {
    background: #facc15;
}

.v2-status-indicator .dot.offline {
    background: #ef4444;
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Tab Cards Grid */
.v2-tabs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

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

.v2-tab-card {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid #475569;
    border-radius: 8px;
    padding: 1rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.v2-tab-card:hover {
    border-color: #60a5fa;
    transform: translateY(-2px);
}

.v2-tab-card.primary {
    border-color: #22c55e;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(30, 41, 59, 0.8));
}

.v2-tab-card.busy {
    border-color: #3b82f6;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(30, 41, 59, 0.8));
}

.v2-tab-card.empty {
    border-style: dashed;
    opacity: 0.5;
}

.v2-tab-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.v2-tab-id {
    font-family: monospace;
    font-size: 0.75rem;
    color: #94a3b8;
}

.v2-tab-badge {
    font-size: 0.625rem;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
}

.v2-tab-badge.primary {
    background: #22c55e;
    color: #fff;
}

.v2-tab-badge.secondary {
    background: #6366f1;
    color: #fff;
}

.v2-tab-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.v2-tab-status .icon {
    width: 20px;
    height: 20px;
}

.v2-tab-status.idle {
    color: #22c55e;
}

.v2-tab-status.busy {
    color: #3b82f6;
}

.v2-tab-request {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #cbd5e1;
}

/* Queue Section */
.v2-queue-section {
    background: rgba(15, 23, 42, 0.6);
    border-radius: 8px;
    padding: 0.75rem;
}

.v2-queue-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

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

.v2-queue-count {
    font-size: 0.75rem;
    color: #64748b;
}

.v2-queue-bar {
    height: 6px;
    background: #1e293b;
    border-radius: 3px;
    overflow: hidden;
}

.v2-queue-fill {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #ef4444);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Stats Summary */
.v2-stats-summary {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #334155;
}

.v2-stat-item {
    text-align: center;
}

.v2-stat-label {
    font-size: 0.625rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.25rem;
}

.v2-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

.v2-stat-value.active {
    color: #3b82f6;
}

.v2-stat-value.idle {
    color: #22c55e;
}

.v2-stat-value.queue {
    color: #f59e0b;
}

/* Spinning animation for busy tabs */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.v2-tab-card.busy .spinning {
    animation: spin 2s linear infinite;
}