/* Céu Azul — Dashboard Gestão */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --blue: #1A5276;
  --blue-light: #2980B9;
  --orange: #E67E22;
  --orange-light: #F39C12;
  --red: #E74C3C;
  --red-light: #FDEDEC;
  --green: #27AE60;
  --green-dark: #1E8449;
  --green-light: #EAFAF1;
  --purple: #8E44AD;
  --bg: #F4F6F9;
  --surface: #FFFFFF;
  --border: #E8ECF1;
  --text: #2C3E50;
  --text-light: #7F8C8D;
  --text-muted: #BDC3C7;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.03);
  --shadow-hover: 0 2px 8px rgba(0,0,0,0.08), 0 8px 24px rgba(0,0,0,0.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body {
  font-family: 'Inter', -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── HEADER ─────────────────────────────────────────────────────── */
header {
  background: linear-gradient(135deg, #1A5276, #2471A3);
  color: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  position: sticky;
  top: 0;
  z-index: 50;
}

/* Desktop: header é flex row, header-top "dissolve" (display:contents)
   para brand e clock ficarem como filhos directos do flex */
@media (min-width: 701px) {
  header {
    display: flex;
    align-items: center;
    padding: 0 1.8rem;
    height: 60px;
    gap: 1rem;
  }
  .header-top {
    display: contents; /* brand e clock tornam-se filhos directos do header */
  }
  nav {
    flex: 1;
    justify-content: flex-start;
    order: 2;
  }
  .brand { order: 1; }
  .clock { order: 3; flex-shrink: 0; }
}

/* Mobile default para header-top (overridden por desktop via @media min-width) */
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.9rem;
}

.brand { display: flex; align-items: baseline; gap: 0.6rem; }
.brand .logo {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.15em;
}
.brand .subtitle {
  font-size: 0.78rem;
  opacity: 0.7;
  font-weight: 500;
}
nav { display: flex; gap: 0.3rem; align-items: center; }
nav a {
  color: white;
  text-decoration: none;
  opacity: 0.7;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  transition: all 0.15s;
}
nav a:hover { opacity: 1; background: rgba(255,255,255,0.1); }
nav a.active {
  opacity: 1;
  background: rgba(255,255,255,0.18);
  font-weight: 600;
}
nav a.factory-link {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
}
nav a.factory-link:hover { background: rgba(255,255,255,0.18); }
.nav-sep {
  display: inline-block;
  width: 1px;
  height: 18px;
  background: rgba(255,255,255,0.2);
  margin: 0 0.3rem;
}
.clock {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-variant-numeric: tabular-nums;
}
#clock {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.clock .date {
  font-size: 0.7rem;
  opacity: 0.65;
  font-weight: 500;
}

/* ── MAIN ───────────────────────────────────────────────────────── */
main {
  flex: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 1.8rem;
}
/* Tabelas: sempre scroll horizontal se necessário */
.order-list, .metric-table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  /* Voltar para table quando não há overflow */
  display: table;
  width: 100%;
}
@media (max-width: 700px) {
  .order-list, .metric-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }
}

/* ── SUMMARY CARDS (KPIs) ──────────────────────────────────────── */
.summary-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: var(--radius) var(--radius) 0 0;
}
.card-icon {
  font-size: 1.6rem;
  margin-bottom: 0.6rem;
  display: block;
}
.card-number {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}
.card-label {
  font-size: 0.82rem;
  color: var(--text-light);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.5rem;
}
.card-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  font-weight: 500;
}

/* Card variants */
.card-info::before { background: var(--blue); }
.card-info .card-number { color: var(--blue); }

.card-warn::before { background: var(--orange); }
.card-warn .card-number { color: var(--orange); }

.card-ok::before { background: var(--green); }
.card-ok .card-number { color: var(--green-dark); }

.card-express::before { background: var(--purple); }
.card-express .card-number { color: var(--purple); }

.card-danger::before { background: var(--red); }
.card-danger .card-number { color: var(--red); }
.card-danger { background: var(--red-light); }

/* ── SECTIONS ───────────────────────────────────────────────────── */
section { margin-bottom: 2rem; }
section h2 {
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
section h2 .h2-icon { font-size: 1.1rem; }
section h3 {
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 600;
  margin-top: 1.2rem;
  margin-bottom: 0.5rem;
}

.two-col {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2rem;
}
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }

/* ── PRODUCTION CARDS ───────────────────────────────────────────── */
.production-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  margin-bottom: 0.8rem;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--green);
  transition: box-shadow 0.2s;
}
.production-card:hover { box-shadow: var(--shadow-hover); }
.production-card.open { border-left-color: var(--orange); }
.production-card.closed { border-left-color: var(--green); opacity: 0.8; }

.production-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.production-header h3 { margin: 0; font-size: 1.05rem; font-weight: 700; }
.production-header a { color: var(--blue); text-decoration: none; }
.production-header a:hover { text-decoration: underline; }
.production-meta { color: var(--text-light); font-size: 0.82rem; }

.production-status {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 20px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-left: 0.5rem;
  vertical-align: middle;
}
.status-open { background: #FFF3E0; color: #E65100; }
.status-closed { background: var(--green-light); color: var(--green-dark); }

.production-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  font-size: 0.82rem;
  color: var(--text-light);
  margin: 0.6rem 0 0.6rem;
}
.production-stats span { white-space: nowrap; }
.stat-ok { color: var(--green-dark); }
.stat-warn { color: #E65100; }
.stat-express { color: var(--purple); }
.stat-late { color: var(--red); }

.progress-bar {
  position: relative;
  background: var(--border);
  border-radius: 6px;
  height: 22px;
  overflow: hidden;
}
.progress-fill {
  background: linear-gradient(90deg, var(--green-dark), var(--green));
  height: 100%;
  border-radius: 6px;
  transition: width 0.6s ease;
}
.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.critical-list {
  margin-top: 0.7rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.critical-item {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  font-size: 0.78rem;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  font-weight: 500;
}
.critical-item.is-express { background: #FFF8F0; }
.critical-item.is-late { background: var(--red-light); }
.critical-name { color: var(--text-light); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.critical-deadline { color: var(--text-muted); font-size: 0.7rem; }
.production-footer {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* ── METRICS ────────────────────────────────────────────────────── */
.metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}
.metric {
  background: var(--surface);
  padding: 1rem 1.2rem;
  border-radius: 10px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  position: relative;
}
.metric::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 10px 10px 0 0;
  background: var(--blue);
}
.metric-label {
  font-size: 0.72rem;
  color: var(--text-light);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.metric-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--blue);
  margin-top: 0.3rem;
  letter-spacing: -0.02em;
}
.metric-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}
.metric.metric-main {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #1A5276, #2471A3);
  color: white;
}
.metric.metric-main::before { display: none; }
.metric.metric-main .metric-label { color: rgba(255,255,255,0.7); }
.metric.metric-main .metric-value { color: white; font-size: 2rem; }
.metric.metric-main .metric-sub { color: rgba(255,255,255,0.6); }
.delta { font-size: 0.72rem; font-weight: 600; margin-top: 0.35rem; display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.15rem 0.5rem; border-radius: 20px; }
.delta-good { color: var(--green-dark); background: var(--green-light); }
.delta-bad { color: var(--red); background: var(--red-light); }
.delta-neutral { color: var(--text-light); background: #F0F0F0; }
.metric.metric-main .delta-good { background: rgba(39, 174, 96, 0.2); color: #A3E4BC; }
.metric.metric-main .delta-bad { background: rgba(231, 76, 60, 0.2); color: #F5B7B1; }
.benchmark { font-size: 0.72rem; color: var(--text-muted); margin-top: 0.25rem; display: block; font-weight: 500; }
.benchmark .meta { color: var(--text-muted); }
.metric.metric-main .benchmark { color: rgba(255,255,255,0.5); }

.metric-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.metric-table td {
  padding: 0.55rem 0.9rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}
.metric-table tr:last-child td { border-bottom: none; }
.metric-table tr:hover { background: #FAFBFC; }

/* ── ORDER LIST ─────────────────────────────────────────────────── */
.order-list {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.order-list th {
  background: #F8F9FA;
  text-align: left;
  padding: 0.7rem 0.9rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-light);
  letter-spacing: 0.04em;
  font-weight: 600;
  border-bottom: 2px solid var(--border);
}
.order-list td {
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}
.order-list tr:hover { background: #FAFBFC; }
.order-list tr:last-child td { border-bottom: none; }
.order-list .meta { color: var(--text-muted); font-size: 0.72rem; }
.order-list .late { color: var(--red); font-weight: 600; }
.ts-date { font-weight: 600; font-size: 0.82rem; }
.ts-time { font-size: 0.72rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.express-badge {
  display: inline-block;
  background: var(--purple);
  color: white;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-left: 0.3rem;
}

/* ── MISC COMPONENTS ───────────────────────────────────────────── */
.paper-group {
  margin-bottom: 1.5rem;
  background: var(--surface);
  border-radius: 10px;
  padding: 1rem;
  box-shadow: var(--shadow);
}
.paper-group h3 { color: var(--blue); font-size: 1rem; margin-bottom: 0.5rem; }
.paper-group h3 .meta { color: var(--text-muted); font-weight: normal; font-size: 0.85rem; }
.job-title {
  font-size: 0.72rem;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  color: var(--text-light);
  background: #F8F9FA;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

.actions { white-space: nowrap; display: flex; gap: 0.25rem; }
.btn {
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  border: none;
  font-size: 0.75rem;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.15s;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-ok { background: var(--green); color: white; }
.btn-warn { background: var(--orange); color: white; }
.btn-danger { background: var(--red); color: white; }
.btn.success { background: var(--green); }

.health-status {
  padding: 1.5rem;
  border-radius: var(--radius);
  font-size: 1.6rem;
  font-weight: 800;
  text-align: center;
  letter-spacing: 0.04em;
  margin: 1rem 0 2rem;
}
.health-status.ok { background: var(--green-light); color: var(--green-dark); }
.health-status.fail { background: var(--red-light); color: var(--red); }

.express-row { background: #FFF8F2 !important; }
.express-row:hover { background: #FFF3E8 !important; }
.late-row { background: var(--red-light) !important; }

.stage {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.stage-nova { background: #EBF5FB; color: #1A5276; }
.stage-a_imprimir { background: #FFF3E0; color: #E65100; }
.stage-parcial { background: #FFE0B2; color: #BF360C; }
.stage-impresso { background: var(--green-light); color: var(--green-dark); }
.stage-expedido { background: #E8F5E9; color: #2E7D32; }

.breadcrumb { margin-bottom: 1rem; font-size: 0.88rem; }
.breadcrumb a { color: var(--blue); text-decoration: none; font-weight: 500; }
.breadcrumb a:hover { text-decoration: underline; }

h1 { color: var(--text); font-size: 1.6rem; margin-bottom: 0.5rem; font-weight: 800; }
.production-summary { color: var(--text-light); margin-bottom: 1.5rem; }

/* ── EVENTS ─────────────────────────────────────────────────────── */
.events-table .meta { white-space: nowrap; }
.level {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
  font-size: 0.68rem;
  text-transform: uppercase;
  font-weight: 600;
}
.level-info { background: #EBF5FB; color: #1A5276; }
.level-warning { background: #FFF3E0; color: #E65100; }
.level-error { background: var(--red-light); color: var(--red); }

/* ── EMPTY STATE ────────────────────────────────────────────────── */
.empty {
  color: var(--text-muted);
  font-size: 0.88rem;
  padding: 1rem 0;
  text-align: center;
}

/* ── FOOTER ─────────────────────────────────────────────────────── */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 0.8rem 1.8rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 0.5rem;
}
.tunnel-info a {
  color: var(--blue);
  text-decoration: none;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.7rem;
}
.tunnel-info a:hover { text-decoration: underline; }

/* ── Big Metrics (metricas page) ───────────────────────────────── */
.metrics-big {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.metric-big {
  background: var(--surface);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
}
.metric-big::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--blue);
}
.metric-big-number {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--blue);
  line-height: 1;
  letter-spacing: -0.02em;
}
.metric-big-number .unit { font-size: 1.1rem; color: var(--text-light); margin-left: 0.2rem; }
.metric-big-label {
  font-size: 0.92rem;
  color: var(--text);
  margin-top: 0.5rem;
  font-weight: 600;
}
.metric-big-sub { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.2rem; }

/* ── RESPONSIVE ─────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .summary-cards { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 700px) {
  /* Header: linha única com brand + clock, nav em baixo */
  header {
    padding: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    height: auto;
  }
  .brand { display: flex; align-items: baseline; gap: 0.4rem; }
  .brand .subtitle { display: none; }
  .brand .logo { font-size: 1.05rem; }
  .clock { flex-direction: row; gap: 0.5rem; align-items: baseline; }
  #clock { font-size: 0.95rem; }
  .clock .date { font-size: 0.65rem; }

  /* Nav: barra scrollável abaixo do header, sem recorte */
  nav {
    display: flex;
    gap: 0.2rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    padding: 0.4rem 0.7rem 0.5rem;
    border-top: 1px solid rgba(255,255,255,0.08);
    /* Fade nas bordas para indicar que há mais links */
    -webkit-mask-image: linear-gradient(to right, transparent 0, black 8px, black calc(100% - 8px), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, black 8px, black calc(100% - 8px), transparent 100%);
    scrollbar-width: none;
  }
  nav::-webkit-scrollbar { display: none; }
  nav a { font-size: 0.78rem; padding: 0.35rem 0.65rem; flex-shrink: 0; }
  .nav-sep { display: none; }

  main { padding: 0.85rem; }

  /* Cards KPI: 2 colunas */
  .summary-cards { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; margin-bottom: 1.2rem; }
  .card { padding: 0.85rem 1rem; }
  .card-number { font-size: 1.9rem; }
  .card-label { font-size: 0.73rem; }
  .card-hint { font-size: 0.67rem; }
  .card-icon { font-size: 1.3rem; margin-bottom: 0.35rem; }

  /* Two-col: stack */
  .two-col { grid-template-columns: 1fr; gap: 1rem; }

  /* Tabelas: scroll horizontal */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 10px; }
  .order-list { font-size: 0.8rem; min-width: 520px; }
  .order-list th, .order-list td { padding: 0.4rem 0.55rem; }
  table:not(.order-list) { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* Métricas */
  .metrics-grid { grid-template-columns: 1fr; }
  .metrics-big { grid-template-columns: 1fr 1fr; }
  .metric-big-number { font-size: 2rem; }

  /* Sections */
  section h2 { font-size: 1rem; }
  h1 { font-size: 1.3rem; }
}

@media (max-width: 420px) {
  .summary-cards { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
  .card-number { font-size: 1.6rem; }
  .metrics-big { grid-template-columns: 1fr; }
  .health-grid { grid-template-columns: 1fr 1fr; }
}

/* ── NAV HEALTH DOT ──────────────────────────────────────────────── */
.nav-health-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  margin-right: 0.35rem;
  vertical-align: middle;
  transition: background 0.3s;
}
.nav-health-dot.ok { background: #2ECC71; box-shadow: 0 0 6px rgba(46,204,113,0.7); }
.nav-health-dot.bad {
  background: #E74C3C;
  box-shadow: 0 0 6px rgba(231,76,60,0.7);
  animation: pulse-bad 1.5s ease-in-out infinite;
}
@keyframes pulse-bad {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

/* ── HEALTH CARD ─────────────────────────────────────────────────── */
.health-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  margin-top: 1.5rem;
  box-shadow: var(--shadow);
}
.health-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}
.health-header h2 {
  margin: 0;
  font-size: 1rem;
  color: var(--text);
}
.health-badge {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  letter-spacing: 0.3px;
}
.health-badge-ok { background: var(--green-light); color: var(--green-dark); }
.health-badge-bad { background: var(--red-light); color: var(--red); }
.health-badge-loading { background: var(--bg); color: var(--text-light); }

.health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.5rem;
}
.health-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.7rem;
  background: var(--bg);
  border-radius: 8px;
  font-size: 0.82rem;
  line-height: 1.2;
  min-height: 2.1rem;
}
.health-item.ok { background: var(--green-light); }
.health-item.bad { background: var(--red-light); }
.health-item.health-loading { color: var(--text-light); justify-content: center; }
.hdot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.hdot-ok { background: var(--green); }
.hdot-bad { background: var(--red); }
.hlabel { font-weight: 600; color: var(--text); }
.hdetail {
  margin-left: auto;
  font-size: 0.72rem;
  color: var(--text-light);
  font-variant-numeric: tabular-nums;
}

.health-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.9rem;
  font-size: 0.76rem;
}
.health-footer a {
  color: var(--blue-light);
  text-decoration: none;
  font-weight: 600;
}
.health-footer a:hover { text-decoration: underline; }
.health-ts { color: var(--text-light); font-variant-numeric: tabular-nums; }

@media (max-width: 600px) {
  .health-section { padding: 0.9rem 1rem; }
  .health-grid { grid-template-columns: 1fr 1fr; }
  .health-item { font-size: 0.76rem; padding: 0.5rem 0.6rem; }
  .hdetail { display: none; }
}
