/* ═══════════════════════════════════════════════════════════════
   LUX Monitoring — lux.css USTIGA qo'shimcha.

   Qoida o'zgarmaydi: xom hex YOZILMAYDI, faqat var(--...).
   Shu sabab qorong'i/kunduzgi tema bu yerda ham o'zi ishlaydi.
   ═══════════════════════════════════════════════════════════════ */

/* ─────────── Holat ranglari (progress/gauge uchun) ─────────── */
.is-good    { color: var(--good); }
.is-warning { color: var(--warning); }
.is-critical{ color: var(--critical); }

.progress > span.good     { background: var(--good); }
.progress > span.warning  { background: var(--warning); }
.progress > span.critical { background: var(--critical); }

/* ─────────── Aylanma gauge (CPU / RAM) ─────────── */
.gauges {
  display: flex; gap: var(--space-5); align-items: center;
  flex-wrap: wrap;
}
.gauge { position: relative; width: 96px; height: 96px; flex: none; }
.gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge .track { stroke: var(--surface-3); }
.gauge .bar {
  stroke: var(--brand-solid);
  stroke-linecap: round;
  transition: stroke-dashoffset .6s ease, stroke .3s ease;
}
.gauge .bar.warning  { stroke: var(--warning); }
.gauge .bar.critical { stroke: var(--critical); }
.gauge .val {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px;
}
.gauge .val b {
  font-size: 20px; font-weight: 650; line-height: 22px;
  font-variant-numeric: tabular-nums;
}
.gauge .val span {
  font-size: 10px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-muted);
}

/* ─────────── Server kartasi ─────────── */
.srv-head {
  display: flex; align-items: flex-start; gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.srv-head .who { min-width: 0; flex: 1; }
.srv-head h3 {
  font-size: 16px; line-height: 22px; font-weight: 620;
  margin: 0 0 2px; overflow-wrap: anywhere;
}
.srv-head .role {
  font-size: 12px; color: var(--text-secondary);
  overflow-wrap: anywhere;
}

/* Metrik qatorlar: nom · qiymat · progress */
.mrow { margin-bottom: var(--space-3); }
.mrow:last-child { margin-bottom: 0; }
.mrow .top {
  display: flex; align-items: baseline; gap: var(--space-2);
  margin-bottom: 5px; font-size: 12px;
}
.mrow .top .name { color: var(--text-secondary); }
.mrow .top .num {
  margin-left: auto; font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}

/* ─────────── Kichik ro'yxatlar (servis, papka) ─────────── */
.mini-list { display: flex; flex-direction: column; gap: 1px; }
.mini-list .item {
  display: flex; align-items: center; gap: var(--space-2);
  padding: 5px var(--space-2); border-radius: var(--radius-sm);
  font-size: 12.5px;
}
.mini-list .item:nth-child(odd) { background: var(--surface-2); }
.mini-list .item .name {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mini-list .item .spacer { margin-left: auto; }
.mini-list .item .val {
  font-variant-numeric: tabular-nums; color: var(--text-secondary);
  flex: none;
}

/* ─────────── Fayl explorer ─────────── */
.explorer {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: var(--space-4);
  align-items: start;
}
@media (max-width: 900px) {
  .explorer { grid-template-columns: 1fr; }
}

.crumbs {
  display: flex; align-items: center; gap: 2px; flex-wrap: wrap;
  margin-bottom: var(--space-3); font-size: 13px;
}
.crumbs a {
  padding: 3px var(--space-2); border-radius: var(--radius-sm);
  color: var(--text-secondary); text-decoration: none;
}
.crumbs a:hover { background: var(--surface-2); color: var(--text-primary); }
.crumbs .sep { color: var(--text-muted); }
.crumbs .cur { padding: 3px var(--space-2); color: var(--text-primary); font-weight: 560; }

.fs-list { display: flex; flex-direction: column; }
.fs-row {
  display: flex; align-items: center; gap: var(--space-3);
  padding: 7px var(--space-3); border-radius: var(--radius-sm);
  font-size: 13px; text-decoration: none; color: var(--text-primary);
  border: 1px solid transparent;
}
.fs-row:hover { background: var(--surface-2); }
.fs-row .icon { color: var(--text-muted); flex: none; }
.fs-row.dir .icon { color: var(--brand); }
.fs-row .nm {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fs-row .kind {
  margin-left: auto; color: var(--text-muted); font-size: 12px; flex: none;
}
.fs-row .sz {
  width: 84px; text-align: right; flex: none;
  font-variant-numeric: tabular-nums; color: var(--text-secondary); font-size: 12px;
}
/* Hajm ulushi — qator ostidagi ingichka chiziq */
.fs-row .share {
  position: absolute; left: 0; bottom: 0; height: 2px;
  background: var(--brand-subtle);
}
.fs-row { position: relative; }

/* ─────────── Obuna badge ─────────── */
.sub-line {
  display: flex; align-items: center; gap: var(--space-2);
  margin-top: var(--space-3); padding-top: var(--space-3);
  border-top: 1px solid var(--border);
  font-size: 12px; color: var(--text-secondary);
}
.sub-line .spacer { margin-left: auto; }

/* ─────────── Yangilanish indikatori ─────────── */
.refresh-note {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-muted);
}
.refresh-note .pulse {
  width: 6px; height: 6px; border-radius: var(--radius-full);
  background: var(--good);
}
/* Yangi ma'lumot kelganda bir marta miltillaydi */
.htmx-settling .refresh-note .pulse { background: var(--brand); }

@media (prefers-reduced-motion: reduce) {
  .gauge .bar { transition: none; }
}
