/* Состояние сервера — надстройка над общим /dash.css */

/* ─── общий вердикт: одна строка, по которой всё понятно ─── */
.verdict {
    display: flex; flex-direction: column; gap: 3px;
    padding: 16px 20px; border-radius: var(--r, 10px);
    border: 1px solid var(--border); margin-bottom: 22px;
}
.verdict b { font-size: 16px; font-weight: 700; }
.verdict span { font-size: 13.5px; opacity: .85; }
.verdict-ok   { background: var(--ok-soft);     color: var(--ok);
                border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.verdict-warn { background: var(--warn-soft);   color: var(--warn);
                border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.verdict-bad  { background: var(--danger-soft); color: var(--danger);
                border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.verdict-wait { background: var(--surface-2);   color: var(--muted); }

/* ─── шкалы ресурсов ─── */
.gauges { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-bottom: 22px; }
.gauge {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r, 10px);
    padding: 16px 18px; box-shadow: var(--shadow-sm);
}
.gauge-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.gauge-ico { font-size: 16px; }
.gauge-title { font-weight: 650; font-size: 13.5px; color: var(--text); }
.gauge-val { margin-left: auto; font-weight: 700; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.gauge-track { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.gauge-fill { height: 100%; border-radius: 999px; transition: width .4s ease; }
.gauge-note { margin-top: 9px; font-size: 12px; color: var(--muted); line-height: 1.45; }

.gauge-ok   .gauge-fill { background: var(--ok); }
.gauge-warn .gauge-fill { background: var(--warn); }
.gauge-bad  .gauge-fill { background: var(--danger); }
.gauge-ok   .gauge-val  { color: var(--ok); }
.gauge-warn .gauge-val  { color: var(--warn); }
.gauge-bad  .gauge-val  { color: var(--danger); }

/* ─── строки «название → значение» ─── */
.rows { display: flex; flex-direction: column; }
.row {
    display: flex; align-items: center; gap: 12px;
    padding: 9px 0; border-bottom: 1px solid var(--border);
}
.row:last-child { border-bottom: none; }
.row-name { font-size: 13.5px; color: var(--text-2); }
.row .pill { margin-left: auto; }
.pill {
    display: inline-block; font-size: 12px; font-weight: 650; padding: 3px 10px;
    border-radius: 999px; white-space: nowrap;
}
.pill-ok    { background: var(--ok-soft);     color: var(--ok); }
.pill-warn  { background: var(--warn-soft);   color: var(--warn); }
.pill-bad   { background: var(--danger-soft); color: var(--danger); }
.pill-muted { background: var(--surface-3);   color: var(--text-2); }

.tag-fresh {
    display: inline-block; font-size: 10px; font-weight: 700; padding: 1px 7px;
    border-radius: 999px; background: var(--ok-soft); color: var(--ok); vertical-align: middle;
}

.ip-list { margin-top: 12px; font-size: 12px; line-height: 2; }
.ip-head { color: var(--muted); margin-bottom: 2px; }
.ip-list code {
    background: var(--surface-3); padding: 2px 7px; border-radius: 6px;
    font-size: 11.5px; font-variant-numeric: tabular-nums;
}
.ip-more { color: var(--muted); }

.hint-note {
    margin-top: 12px; font-size: 12px; color: var(--muted); line-height: 1.5;
    padding-top: 10px; border-top: 1px dashed var(--border);
}

/* ─── счётчики записей ─── */
.rec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.rec {
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: var(--r-sm, 8px); padding: 14px; text-align: center;
}
.rec-val { font-size: 22px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.rec-label { font-size: 12px; color: var(--muted); margin-top: 3px; }

/* ─── переключатель автообновления в шапке ─── */
.auto-toggle {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12.5px; color: var(--text-2); cursor: pointer; user-select: none;
}
.auto-toggle input { width: auto; cursor: pointer; accent-color: var(--accent); }

@media (max-width: 720px) {
    .gauges { grid-template-columns: 1fr; }
}

/* ─── логи сервера ─── */
.logs-toolbar {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    margin-bottom: 12px;
}
.logs-toolbar select { width: auto; min-width: 170px; }
.log-updated { font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin-left: auto; }
.log-text {
    background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm, 8px);
    padding: 14px; margin: 0; max-height: 560px; overflow: auto;
    font-family: var(--mono); font-size: 12px; line-height: 1.55; color: var(--text);
    white-space: pre-wrap; word-break: break-all;
}
.log-text.log-empty { color: var(--muted); }
