/* Bổ sung cho Sneat — GPS Monitor */

.min-w-0 { min-width: 0; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .8125rem; }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.cursor-pointer { cursor: pointer; }

/* Logo */
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: .5rem;
  background: var(--bs-primary); color: #fff; font-size: 1.25rem;
  box-shadow: 0 2px 6px rgba(105, 108, 255, .4);
}
.app-brand { height: 64px; margin-top: 12px; }
.app-brand-text { font-size: 1.35rem; letter-spacing: -.3px; }

/* Chấm trạng thái */
.dot { display: inline-block; width: .625rem; height: .625rem; border-radius: 50%; background: var(--bs-secondary); flex-shrink: 0; }
.dot.ok { background: var(--bs-success); box-shadow: 0 0 0 3px rgba(113, 221, 55, .18); }
.dot.warn { background: var(--bs-warning); box-shadow: 0 0 0 3px rgba(255, 171, 0, .2); }
.dot.crit { background: var(--bs-danger); box-shadow: 0 0 0 3px rgba(255, 62, 29, .18); animation: pulse 1.6s infinite; }
.dot.muted { background: #b4bdc6; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(255, 62, 29, .05); } }

.text-ok { color: var(--bs-success) !important; }
.text-warn { color: var(--bs-warning) !important; }
.text-crit { color: var(--bs-danger) !important; }

/* Thẻ chỉ số */
.stat-card .avatar-initial { font-size: 1.4rem; }
.stat-card .stat-value { font-size: 1.5rem; font-weight: 600; line-height: 1.2; color: var(--bs-heading-color); }

/* Trang tổng quan: thẻ sức khỏe + dải chỉ số */
.health-card { border-left: 4px solid transparent; }
.health-card.health-danger { border-left-color: var(--bs-danger); }
.health-card.health-warning { border-left-color: var(--bs-warning); }
.health-card.health-success { border-left-color: var(--bs-success); }
.health-card .avatar-initial { font-size: 1.9rem; }
.health-card h5 { line-height: 1.35; }
.health-card .small > div + div { margin-top: .2rem; }

.stats-strip .stat-value { font-size: 1.375rem; font-weight: 600; line-height: 1.2; color: var(--bs-heading-color); }
.stats-strip .stat-value small { font-size: .875rem; font-weight: 400; color: var(--bs-secondary-color); }
@media (min-width: 768px) {
  .stats-strip > .stat-item + .stat-item { border-left: 1px solid var(--bs-border-color); }
}

/* Ít hệ thống: mỗi thẻ hệ thống chiếm hết cột trái */
.single-col > [class*="col-"] { flex: 0 0 100%; max-width: 100%; }

/* Danh sách cảnh báo gọn */
.alert-list li { padding: .7rem 0; }
.alert-list li + li { border-top: 1px dashed var(--bs-border-color); }
.alert-list .badge i { font-size: 1.05rem; }

/* Thẻ hệ thống trên trang tổng quan */
.system-card { transition: box-shadow .15s ease; }
.system-card:hover { box-shadow: 0 .25rem 1rem rgba(34, 48, 62, .14); }
.system-card.state-crit { border-top: 3px solid var(--bs-danger); }
.system-card.state-warn { border-top: 3px solid var(--bs-warning); }
.system-card.state-ok { border-top: 3px solid var(--bs-success); }
.system-card.state-muted { border-top: 3px solid #b4bdc6; }

.node-row { display: grid; grid-template-columns: auto minmax(0, 1fr) repeat(3, 56px); gap: .5rem; align-items: center; padding: .3rem 0; }
.node-row + .node-row { border-top: 1px dashed var(--bs-border-color); }
.node-row a { color: var(--bs-heading-color); }
.node-row a:hover { color: var(--bs-primary); }
.mini-meter { font-size: .75rem; text-align: right; font-variant-numeric: tabular-nums; }
.mini-meter .progress { height: 4px; margin-top: 2px; }
@media (max-width: 400px) { .node-row { grid-template-columns: auto minmax(0, 1fr) repeat(3, 44px); } }

.chip { display: inline-flex; align-items: center; gap: .35rem; font-size: .75rem; padding: .25rem .55rem; border-radius: 50rem; margin: 0 .25rem .35rem 0; text-decoration: none; }

/* Biểu đồ */
.chart-card .card-header { padding-bottom: 0; }
.chart-box { min-height: 260px; }
.chart-empty { height: 240px; display: flex; align-items: center; justify-content: center; color: var(--bs-secondary-color); font-size: .875rem; }

/* Bảng */
.table > :not(caption) > * > * { vertical-align: middle; }
.table-sm-text td, .table-sm-text th { font-size: .8125rem; }
.card .table-responsive { margin-bottom: 0; }
.card > .table-responsive > .table, .card > .table { margin-bottom: 0; }
.empty { padding: 2rem 1rem; text-align: center; color: var(--bs-secondary-color); }

/* Thanh tỷ lệ */
.meter { display: grid; grid-template-columns: minmax(60px, 1fr) 56px; gap: .5rem; align-items: center; }
.meter .progress { height: 8px; }

/* Lựa chọn khoảng thời gian */
.range-group .btn { padding: .3rem .65rem; font-size: .8125rem; }

/* Tiêu đề trang */
.page-head { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: flex-end; justify-content: space-between; margin-bottom: 1.5rem; }
.page-head h4 { margin-bottom: .25rem; }
.page-head h4 .mono { font-size: inherit; }
.page-head .sub { color: var(--bs-secondary-color); font-size: .875rem; }

.section-title { font-size: .8125rem; text-transform: uppercase; letter-spacing: .6px; color: var(--bs-secondary-color); font-weight: 600; margin: 1.75rem 0 .75rem; }

pre.alert-message { white-space: pre-wrap; font-size: .8125rem; background: var(--bs-gray-100, #f5f5f9); border-radius: .375rem; padding: .75rem; margin: .5rem 0 0; }

/* Nút chữ (bản free của Sneat không có btn-text-*) */
.btn-text-secondary { color: var(--bs-secondary-color); background: transparent; border-color: transparent; }
.btn-text-secondary:hover, .btn-text-secondary:focus { color: var(--bs-heading-color); background: rgba(133, 146, 163, .16); border-color: transparent; }

/* Menu: số cảnh báo theo hệ thống */
.menu-item .menu-link .badge { font-size: .7rem; }

@media (max-width: 575.98px) {
  .page-head { align-items: stretch; }
  .page-head > * { width: 100%; }
  .stat-card .stat-value { font-size: 1.25rem; }
}
