/* Metrics */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.metric-card {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
}

.metric-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.metric-value {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 8px;
}

.metric-trend {
    font-size: 0.75rem;
    font-weight: 700;
}

.metric-trend.success {
    color: var(--success);
}

.metric-trend.warning {
    color: var(--warning);
}

/* Charts */
.chart-container {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: auto;
    min-height: 180px;
}

.chart-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    height: 100%;
    justify-content: flex-end;
}

.chart-bar {
    width: 100%;
    max-width: 40px;
    background: linear-gradient(to top, var(--accent), #818cf8);
    border-radius: 4px 4px 0 0;
    transition: 0.5s ease;
}

.chart-bar.warning {
    background: var(--warning);
}

.stat-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-val {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-main);
}

.stat-bar-bg {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.stat-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #818cf8);
    border-radius: 10px;
    transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 10px var(--accent-glow);
}

.chart-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* Grid Layouts */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 1.5rem;
}

.dashboard-grid.split {
    grid-template-columns: 1fr 400px;
}

.glass-container {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

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

.panel-header h3 {
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: var(--text-dim);
}

/* Tables */
.clients-table-container {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-glass);
    overflow: hidden;
}

.enterprise-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.enterprise-table th {
    background: rgba(0, 0, 0, 0.2);
    padding: 16px;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 800;
    border-bottom: 1px solid var(--border);
}

.enterprise-table td {
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    font-size: 0.85rem;
}

.enterprise-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.platform-badge {
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.tag {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.add-tag-btn {
    background: transparent;
    border: 1px dashed var(--border);
    color: var(--text-muted);
    cursor: pointer;
    padding: 0 6px;
    border-radius: 4px;
}

.badge {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid transparent;
}

.status-ready {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border-color: rgba(16, 185, 129, 0.2);
}

.status-executing {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
    border-color: rgba(245, 158, 11, 0.2);
}

.status-offline {
    background: rgba(244, 63, 94, 0.1);
    color: var(--error);
    border-color: rgba(244, 63, 94, 0.2);
}

@media (max-width: 1200px) {

    .dashboard-grid,
    .dashboard-grid.split {
        grid-template-columns: 1fr;
    }

    .metric-card {
        padding: 1rem;
    }
}