/* === AI-OBSERVABILITY.CSS === */
/* assets/css/ai-observability.css */
/* НАЗНАЧЕНИЕ: Стили AI Observability Dashboard */

/* KPI Cards Grid */
.aio-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 10px;
}

.aio-kpi-card {
    background: var(--card-bg, hsl(220, 13%, 8%));
    border: 1px solid var(--border-color, hsl(220, 10%, 16%));
    border-radius: 8px;
    padding: 10px;
}

.aio-kpi-label {
    font-size: 11px;
    color: hsl(0, 0%, 70%);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    font-weight: 500;
}

.aio-kpi-value {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.aio-kpi-sub {
    font-size: 11px;
    color: hsl(0, 0%, 65%);
    margin-top: 2px;
}

.aio-kpi-trend-up { color: #10b981; }
.aio-kpi-trend-down { color: hsl(0, 84%, 60%); }

/* Charts Grid */
.aio-charts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

.aio-chart-card {
    background: var(--card-bg, hsl(220, 13%, 8%));
    border: 1px solid var(--border-color, hsl(220, 10%, 16%));
    border-radius: 8px;
    padding: 10px;
}

.aio-chart-title {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 10px;
}

.aio-chart-wrap {
    position: relative;
    height: 200px;
}

/* Health Score */
.aio-health-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

.aio-health-card {
    background: var(--card-bg, hsl(220, 13%, 8%));
    border: 1px solid var(--border-color, hsl(220, 10%, 16%));
    border-radius: 8px;
    padding: 10px;
}

.aio-health-score {
    display: flex;
    align-items: center;
    gap: 10px;
}

.aio-health-number {
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
    color: #fff;
}

.aio-health-grade {
    font-size: 20px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    background: hsla(142, 71%, 45%, 0.15);
    color: #10b981;
}

.aio-health-grade-a { background: hsla(142, 71%, 45%, 0.15); color: #10b981; }
.aio-health-grade-b { background: hsla(217, 91%, 60%, 0.15); color: hsl(217, 91%, 60%); }
.aio-health-grade-c { background: hsla(45, 93%, 47%, 0.15); color: hsl(45, 93%, 47%); }
.aio-health-grade-d { background: hsla(25, 95%, 53%, 0.15); color: hsl(25, 95%, 53%); }
.aio-health-grade-f { background: hsla(0, 84%, 60%, 0.15); color: hsl(0, 84%, 60%); }

.aio-health-trend {
    font-size: 12px;
    margin-top: 6px;
    color: hsl(0, 0%, 75%);
}

/* Health Components */
.aio-component {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.aio-component-name {
    flex: 0 0 120px;
    font-size: 12px;
    color: hsl(0, 0%, 72%);
}

.aio-component-bar {
    flex: 1;
    height: 6px;
    background: var(--border-color, hsl(220, 10%, 16%));
    border-radius: 3px;
    overflow: hidden;
}

.aio-component-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

.aio-component-value {
    flex: 0 0 36px;
    font-size: 12px;
    text-align: right;
    font-weight: 600;
    color: #fff;
}

/* Errors Table */
.aio-errors-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.aio-errors-table th {
    text-align: left;
    font-weight: 600;
    color: hsl(0, 0%, 65%);
    padding: 6px 8px;
    border-bottom: 1px solid var(--border-color);
    font-size: 11px;
    text-transform: uppercase;
}

.aio-errors-table td {
    padding: 6px 8px;
    border-bottom: 1px solid var(--border-color, hsl(220, 10%, 16%));
    color: hsl(0, 0%, 88%);
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.aio-errors-table tr:hover td {
    background: hsla(217, 91%, 60%, 0.05);
}

/* Process Mining */
.aio-process-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 10px;
}

.aio-process-card {
    background: var(--card-bg, hsl(220, 13%, 8%));
    border: 1px solid var(--border-color, hsl(220, 10%, 16%));
    border-radius: 8px;
    padding: 10px;
    text-align: center;
}

.aio-process-value {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
}

.aio-process-unit {
    font-size: 12px;
    color: hsl(0, 0%, 65%);
}

.aio-process-label {
    font-size: 11px;
    color: hsl(0, 0%, 70%);
    margin-top: 4px;
}

/* Bottleneck list */
.aio-bottleneck {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid var(--border-color, hsl(220, 10%, 16%));
    font-size: 12px;
}

.aio-bottleneck-flow {
    flex: 0 0 auto;
    white-space: nowrap;
    font-weight: 600;
    color: #fff;
}

.aio-bottleneck-arrow {
    color: hsl(0, 0%, 55%);
}

.aio-bottleneck-time {
    flex: 0 0 auto;
    margin-left: auto;
    font-weight: 600;
    color: hsl(0, 0%, 85%);
}

/* Loading */
.aio-loading {
    text-align: center;
    padding: 40px;
    color: hsl(0, 0%, 60%);
}

/* Light Theme Override */
html.light-theme .aio-kpi-label { color: hsl(220, 10%, 45%); }
html.light-theme .aio-kpi-value { color: hsl(220, 20%, 12%); }
html.light-theme .aio-kpi-sub { color: hsl(220, 8%, 50%); }
html.light-theme .aio-chart-title { color: hsl(220, 20%, 12%); }
html.light-theme .aio-health-number { color: hsl(220, 20%, 12%); }
html.light-theme .aio-health-trend { color: hsl(220, 8%, 45%); }
html.light-theme .aio-component-name { color: hsl(220, 8%, 45%); }
html.light-theme .aio-component-value { color: hsl(220, 20%, 12%); }
html.light-theme .aio-bottleneck-flow { color: hsl(220, 20%, 12%); }
html.light-theme .aio-bottleneck-time { color: hsl(220, 8%, 35%); }
html.light-theme .aio-process-value { color: hsl(220, 20%, 12%); }
html.light-theme .aio-process-unit { color: hsl(220, 8%, 50%); }
html.light-theme .aio-process-label { color: hsl(220, 8%, 45%); }

/* Responsive */
@media (max-width: 900px) {
    .aio-kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .aio-charts-grid { grid-template-columns: 1fr; }
    .aio-health-grid { grid-template-columns: 1fr; }
    .aio-process-grid { grid-template-columns: 1fr; }
}
