:root, html[data-theme="navy"] {
  --bg: #eef3f7;
  --panel: #ffffff;
  --ink: #0b1f33;
  --muted: #5b6b7c;
  --line: #d5dee6;
  --accent: #1494a8;
  --accent-dark: #0d6f80;
  --nav: #0b1f33;
  --nav-text: #e8f4f7;
  --ok: #1f7a4d;
  --danger: #b42318;
  --shadow: 0 8px 24px rgba(11, 31, 51, 0.08);
  font-family: "Segoe UI", system-ui, sans-serif;
}
html[data-theme="light"] {
  --bg: #f7f5f0;
  --nav: #f3eee4;
  --nav-text: #1c1915;
  --accent: #c45c26;
  --accent-dark: #9a4318;
  --ink: #1c1915;
}
html[data-theme="forest"] {
  --bg: #eef6f0;
  --nav: #143528;
  --nav-text: #e8f6ee;
  --accent: #2f9e6b;
  --accent-dark: #217552;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
img.logo-img {
  height: 48px !important;
  width: 48px !important;
  max-height: 48px !important;
  max-width: 48px !important;
  object-fit: contain;
  display: block;
  background: #fff;
  border-radius: 10px;
  padding: 2px;
}
.login-logo {
  height: auto !important;
  width: min(260px, 100%) !important;
  max-height: none !important;
  max-width: 280px !important;
  margin: 0 auto 10px;
  object-fit: contain;
  display: block;
  background: transparent;
  border-radius: 0;
  padding: 0;
}
.app-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  min-height: 84px;
}
.brand-link {
  flex: 0 0 auto;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  max-width: 220px;
}
.brand-name {
  font-size: 15px;
  letter-spacing: 0.04em;
  color: #0b1f33;
}
.brand-slogan {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #1494a8;
  text-transform: uppercase;
}
.login-slogan {
  text-align: center;
  margin: 0 0 18px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #1494a8;
  text-transform: uppercase;
}
.mod-nav {
  display: flex;
  flex: 1;
  gap: 4px;
  overflow-x: auto;
  align-items: stretch;
}
.mod {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 78px;
  width: 86px;
  padding: 8px 4px;
  border-radius: 10px;
  text-decoration: none;
  color: #3a4a58;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
}
.mod svg { width: 28px; height: 28px; color: var(--accent); }
.mod:hover, .mod.active { background: #e7f5f8; color: var(--ink); }
.nav-user { display: flex; align-items: center; gap: 10px; font-size: 13px; white-space: nowrap; }
body.has-shell {
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.app-shell {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  flex: 1;
  min-height: 0;
}
.proj-side {
  background: #f4f7fa;
  border-right: 1px solid var(--line);
  padding: 12px;
  overflow: hidden;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.proj-head {
  font-weight: 800;
  margin-bottom: 10px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.proj-toggle,
.proj-close,
.proj-overlay { display: none; }
.proj-create { width: 100%; margin-bottom: 10px; flex-shrink: 0; }
.proj-side #proj-search { flex-shrink: 0; margin-bottom: 8px; }
.client-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.client-list a {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.page {
  padding: 18px 20px 40px;
  max-width: none;
  margin: 0;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.page-head h1 { margin: 0 0 6px; font-size: 1.6rem; }
.page-head .muted { margin: 0 0 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 10px; padding: 8px 12px; cursor: pointer; text-decoration: none; font-weight: 600; }
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { background: transparent; color: var(--nav-text); border: 1px solid rgba(255,255,255,0.25); }
.btn-light { background: white; border: 1px solid var(--line); color: var(--ink); }
.btn-danger { background: #f8e4e2; color: var(--danger); }
.flash, .error { padding: 10px 12px; border-radius: 10px; margin-bottom: 12px; }
.flash { background: #e8f4ec; color: var(--ok); }
.error { background: #f8e8e8; color: var(--danger); }
label { display: block; font-size: 13px; margin: 10px 0 6px; font-weight: 600; }
input[type="text"], input[type="password"], input[type="search"], input[type="date"], textarea, select {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: white;
}
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; box-shadow: var(--shadow); margin-bottom: 16px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; background: var(--panel); }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 14px; }

/* Inventario compacto (lista densa + scroll horizontal) */
.inv-toolbar { padding: 12px 14px; }
.inv-toolbar h2 { margin: 0 0 8px; font-size: 1.15rem; }
.inv-hint { margin: 6px 0 0; font-size: 12px; }
.inv-stats strong { color: var(--ink); font-weight: 700; }
.inv-add { margin-top: 8px; }
.btn-xs { padding: 4px 8px; font-size: 12px; }
.inv-scroll {
  padding: 0;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}
.inv-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}
.inv-table th,
.inv-table td {
  padding: 4px 10px;
  font-size: 12.5px;
  line-height: 1.25;
  white-space: nowrap;
  vertical-align: middle;
  border-bottom: 1px solid #e6ebf0;
}
.inv-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f4f7fa;
  font-size: 11px;
  padding: 6px 10px;
  color: #5b6b7c;
  box-shadow: inset 0 -1px 0 var(--line);
}
.inv-table tbody tr:hover { background: #f7fafc; }
.inv-link {
  color: #1a6bb5;
  font-weight: 600;
  text-decoration: none;
}
.inv-link:hover { text-decoration: underline; }
.inv-table .serial-link { font-weight: 700; }
.cell-vendor { color: #3d4f63; font-weight: 500; }
.cell-ref {
  color: #1f7a4d;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.badge-sm {
  padding: 1px 6px;
  font-size: 10.5px;
  border-radius: 4px;
  font-weight: 600;
}
.inv-table .col-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  white-space: nowrap;
}
.inv-table .col-actions form { display: inline; margin: 0; }
.inv-action {
  background: none;
  border: 0;
  padding: 0;
  color: #1a6bb5;
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.inv-action:hover { text-decoration: underline; }
.inv-danger { color: #b42318; }
.inv-table .comm-ok,
.inv-table .comm-off { font-size: 12px; font-weight: 600; }
.inv-table .cell-edit { min-width: 72px; }
th { font-size: 12px; text-transform: uppercase; color: var(--muted); }
.badge { display: inline-block; background: #d7eef2; color: #0d3b66; border-radius: 999px; padding: 2px 8px; font-size: 12px; }
.badge-kind { background: #e8eef5; color: #1a3550; }
.badge-status.badge-monitored { background: #d8f3e3; color: #146c43; }
.badge-status.badge-unmonitored { background: #eceff3; color: #4a5560; }
.badge-status.badge-offline { background: #f8e4e2; color: #b42318; }
.row-status-offline td:first-child { box-shadow: inset 3px 0 0 #b42318; }
.row-status-unmonitored td:first-child { box-shadow: inset 3px 0 0 #8a96a3; }
.row-status-monitored td:first-child { box-shadow: inset 3px 0 0 #1f7a4d; }
.equipo-tabs { display: inline-flex; gap: 4px; margin-right: 8px; }
.equipo-tabs a {
  padding: 8px 14px; border-radius: 10px; text-decoration: none; font-weight: 600;
  background: white; border: 1px solid var(--line); color: var(--ink);
}
.equipo-tabs a.active { background: var(--accent); color: white; border-color: var(--accent); }
.historial-forms { display: grid; gap: 12px; margin: 12px 0 20px; }
.historial-forms .row { align-items: end; }
.history-current { background: #f3faf6; }
.report-historial { min-height: auto; }
.mono { font-family: ui-monospace, Consolas, monospace; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.muted { color: var(--muted); }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #0b1f33; }
.login-card { width: min(420px, 100%); background: white; border-radius: 18px; padding: 28px; }
.serial-link { color: var(--accent); font-weight: 700; text-decoration: none; }
.subnav { display: flex; gap: 8px; margin-bottom: 14px; }
.subnav a { padding: 8px 12px; border-radius: 999px; background: white; border: 1px solid var(--line); text-decoration: none; }
th.js-sort { cursor: pointer; user-select: none; white-space: nowrap; }
th.js-sort:hover { color: var(--ink); }
th.js-sort.sorted-asc::after { content: " ▲"; font-size: 10px; }
th.js-sort.sorted-desc::after { content: " ▼"; font-size: 10px; }
.comm-ok { color: #1f7a4d; font-weight: 600; white-space: nowrap; }
.comm-off { color: #b42318; font-weight: 600; white-space: nowrap; }
.cell-edit { cursor: text; min-width: 90px; border-radius: 6px; }
.cell-edit:hover { background: #eef5f8; }
.cell-edit.editing { padding: 4px 6px; }
.cell-edit.editing input {
  width: 100%; padding: 4px 6px; border: 0; border-bottom: 1px solid var(--accent);
  border-radius: 0; background: transparent; outline: none;
}
.sidebar-layout { display: grid; grid-template-columns: 240px 1fr; gap: 16px; }
.client-list a { display: block; padding: 8px 10px; border-radius: 8px; text-decoration: none; }
.client-list a.active, .client-list a:hover { background: #d7eef2; }
.ficha-page { max-width: 980px; margin: 0 auto; padding: 16px; }
.ficha-sheet { background: white; border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.ficha-head { display: grid; grid-template-columns: 1fr 240px; gap: 16px; align-items: center; }
.photo-wrap img { width: 100%; border-radius: 10px; }
.ficha-card { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin: 12px 0; }
.ficha-grid, .meters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
.meters { grid-template-columns: repeat(4, 1fr); }
.supply-table { width: 100%; }
.level-track { height: 8px; background: #e6eef2; border-radius: 99px; overflow: hidden; }
.level-fill { height: 100%; }
.level-fill.ok { background: #1f7a4d; }
.level-fill.mid { background: #c45c26; }
.level-fill.low { background: #b42318; }
.chart { display: flex; align-items: flex-end; gap: 12px; height: 140px; }
.chart-stack { width: 36px; display: flex; flex-direction: column-reverse; background: #eef3f7; }
.bar-black { background: #0b1f33; width: 100%; }
.bar-color { background: #1494a8; width: 100%; }

.report-body { background: #d9e2ea; }
.report-toolbar {
  display: flex; flex-direction: column; gap: 8px;
  max-width: 210mm; margin: 16px auto 10px; padding: 0 8px;
}
.report-toolbar-actions {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}
.report-dates {
  display: flex; gap: 8px; align-items: end; flex-wrap: wrap;
}
.report-dates label { margin: 0 0 4px; font-size: 11px; color: #5b6b7c; }
.report-dates input[type="date"] { width: auto; min-width: 150px; padding: 7px 10px; }
.report-toolbar > .muted { margin: 0; }
.report {
  width: 210mm;
  min-height: 297mm;
  margin: 0 auto 24px;
  background: #fff;
  color: #122033;
  padding: 14mm 16mm 16mm;
  box-shadow: 0 10px 40px rgba(11, 31, 51, 0.12);
  font-family: "Segoe UI", Calibri, Arial, sans-serif;
}
.report-letterhead {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 3px solid #0b1f33;
}
.report-brand { display: flex; align-items: center; gap: 12px; }
.report-logo {
  height: 52px !important;
  width: auto !important;
  max-height: 52px !important;
  max-width: 160px !important;
  object-fit: contain;
  background: transparent !important;
  border-radius: 0 !important;
}
.report-company { font-size: 20px; font-weight: 800; letter-spacing: 0.04em; color: #0b1f33; line-height: 1; }
.report-tag { font-size: 11px; color: #5b6b7c; margin-top: 4px; letter-spacing: 0.08em; text-transform: uppercase; }
.report-doc { text-align: right; }
.report-doc-kicker { font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: #1494a8; font-weight: 700; }
.report-doc-title { font-size: 22px; font-weight: 800; color: #0b1f33; line-height: 1.1; margin: 2px 0; }
.report-doc-meta { font-size: 12px; color: #5b6b7c; }
.report-banner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
  margin: 14px 0 16px;
  padding: 12px 14px;
  background: #0b1f33;
  color: #fff;
}
.report-banner h1 { margin: 2px 0 4px; font-size: 20px; font-weight: 800; }
.report-banner p { margin: 0; color: #c5d6e2; font-size: 12px; }
.report-kicker { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: #7ad0dc; font-weight: 700; }
.report-banner-side { text-align: right; }
.report-banner-side strong { display: block; font-size: 15px; margin: 2px 0 4px; }
.report-split { display: grid; grid-template-columns: 210px 1fr; gap: 16px; align-items: start; margin-bottom: 16px; }
.report-photo {
  border: 1px solid #d5dee6;
  background: #f7fafc;
  min-height: 160px;
  display: grid;
  place-items: center;
  padding: 10px;
}
.report-photo img { max-width: 100%; max-height: 190px; object-fit: contain; }
.report-photo-empty { color: #5b6b7c; font-size: 12px; text-align: center; padding: 24px; }
.report-h {
  margin: 16px 0 8px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #0b1f33;
  border-left: 4px solid #1494a8;
  padding-left: 8px;
}
.report-kv, .report-data { width: 100%; border-collapse: collapse; }
.report-kv th, .report-kv td, .report-data th, .report-data td {
  border: 1px solid #cfd8e0;
  padding: 7px 10px;
  font-size: 13px;
  text-align: left;
}
.report-kv th {
  width: 38%;
  background: #f3f6f8;
  color: #3a4a58;
  font-weight: 700;
  text-transform: none;
  font-size: 12px;
}
.report-data thead th {
  background: #0b1f33;
  color: #fff;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.report-data td { font-variant-numeric: tabular-nums; }
.report-note { font-size: 11px; color: #5b6b7c; margin: 6px 0 0; }
.report-signs { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 28px; }
.report-sign-line { border-top: 1px solid #0b1f33; margin-bottom: 6px; }
.report-signs strong { display: block; font-size: 12px; }
.report-signs span { font-size: 11px; color: #5b6b7c; }
.report-foot {
  margin-top: 22px;
  padding-top: 8px;
  border-top: 1px solid #d5dee6;
  font-size: 10px;
  color: #5b6b7c;
  letter-spacing: 0.02em;
}
@media screen and (max-width: 900px) {
  .sidebar-layout, .grid-2, .ficha-head, .meters { grid-template-columns: 1fr; }
  .hide-sm { display: none !important; }
  .app-top {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "toggle brand user"
      "nav nav nav"
      "search search search";
    align-items: center;
    gap: 8px;
    padding: 8px;
    min-height: 0;
  }
  .proj-toggle {
    display: inline-flex;
    grid-area: toggle;
    align-items: center;
    gap: 6px;
    max-width: 42vw;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 10px;
    padding: 8px 10px;
    font-weight: 700;
    font-size: 13px;
    color: var(--ink);
    cursor: pointer;
  }
  .proj-toggle svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--accent); }
  .proj-toggle span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .proj-toggle em {
    font-style: normal;
    font-size: 11px;
    color: var(--muted);
    flex-shrink: 0;
  }
  .brand-link { grid-area: brand; min-width: 0; }
  .brand-slogan { display: none; }
  .brand-text { max-width: none; }
  .logo-img {
    height: 36px !important;
    width: 36px !important;
    max-height: 36px !important;
    max-width: 36px !important;
  }
  .mod-nav {
    grid-area: nav;
    width: 100%;
    flex: none;
  }
  .mod { min-width: 64px; width: auto; flex: 0 0 auto; padding: 6px 8px; }
  .mod svg { width: 22px; height: 22px; }
  .mod span { font-size: 10px; }
  .global-search {
    grid-area: search;
    min-width: 0;
    width: 100%;
  }
  .global-search input { width: 100%; }
  .search-hits { left: 0; right: 0; width: auto; }
  .nav-user { grid-area: user; }
  .nav-user-name { display: none; }
  .app-shell { grid-template-columns: 1fr; }
  .proj-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(11, 31, 51, 0.45);
    z-index: 70;
  }
  body.proj-open .proj-overlay { display: block; }
  .proj-side {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(88vw, 320px);
    z-index: 80;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    box-shadow: 8px 0 28px rgba(11, 31, 51, 0.2);
    padding: 12px;
  }
  body.proj-open .proj-side { transform: translateX(0); }
  .proj-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: #e7eef3;
    cursor: pointer;
    font-size: 16px;
  }
  .page { padding: 12px 12px 28px; }
  .page-head h1 { font-size: 1.35rem; }
  .health-hero {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin: 4px 0 12px;
  }
  .health-ring, .health-ring svg { width: 120px; height: 120px; margin: 0 auto; }
  .health-ring-label strong { font-size: 24px; }
  .health-pills { width: 100%; }
  .pill { min-width: 0; width: 100%; gap: 12px; padding: 10px 12px; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .kpi { padding: 12px; }
  .kpi-value { font-size: 22px; }
  .month-stats { grid-template-columns: 1fr 1fr; }
  .bar-row { grid-template-columns: 1fr auto; }
  .bar-row .bar { grid-column: 1 / -1; }
  .row { flex-direction: column; align-items: stretch; }
  .row .btn, .inv-add .btn { width: 100%; }
}
@media screen and (max-width: 900px) {
  .report-split, .report-banner, .report-signs { grid-template-columns: 1fr; }
}
@media print {
  .no-print, .topnav, .app-top, .proj-side, .proj-overlay, .proj-toggle, .report-toolbar { display: none !important; }
  html, body, .report-body {
    background: white !important;
    height: auto !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .report {
    width: auto !important;
    min-height: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
  }
  .report-letterhead { padding-bottom: 8px; }
  .report-logo { height: 40px !important; max-height: 40px !important; }
  .report-company { font-size: 16px; }
  .report-doc-title { font-size: 18px; }
  .report-banner {
    display: grid !important;
    grid-template-columns: 1.4fr 1fr !important;
    gap: 12px !important;
    margin: 8px 0 10px !important;
    padding: 8px 10px !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .report-banner h1 { font-size: 16px; }
  .report-split {
    display: grid !important;
    grid-template-columns: 42mm 1fr !important;
    gap: 10px !important;
    margin-bottom: 8px !important;
  }
  .report-photo { min-height: 0; padding: 6px; }
  .report-photo img { max-height: 38mm; }
  .report-h { margin: 10px 0 6px; }
  .report-kv th, .report-kv td, .report-data th, .report-data td { padding: 4px 8px; font-size: 11px; }
  .report-data thead th {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .report-note { font-size: 9px; margin: 4px 0 0; }
  .report-signs {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 24px !important;
    margin-top: 14px !important;
  }
  .report-foot { margin-top: 12px; }
  .cell-edit { cursor: default; }
  .cell-edit:hover { background: transparent; }
  .level-track { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  * { box-shadow: none !important; }
  @page { size: A4 portrait; margin: 8mm; }
}

.nav-user { display:flex; align-items:center; gap:10px; }
.global-search { position:relative; min-width:220px; }
.global-search input { width:240px; }
.search-hits {
  position:absolute; right:0; top:110%; z-index:40; width:360px; max-height:420px; overflow:auto;
  background:#fff; border:1px solid var(--line); border-radius:12px; box-shadow:var(--shadow);
}
.search-hits a { display:flex; flex-direction:column; gap:2px; padding:10px 12px; text-decoration:none; border-bottom:1px solid var(--line); }
.search-hits a:hover { background:#f3f8fb; }
.search-hits span { color:var(--muted); font-size:12px; }
.table-pager {
  display:flex; justify-content:space-between; align-items:center; gap:12px;
  padding:10px 12px; border-top:1px solid var(--line); font-size:13px; color:var(--muted);
}
.health-hero { display:flex; gap:28px; align-items:center; flex-wrap:wrap; margin:8px 0 20px; }
.health-ring { position:relative; width:140px; height:140px; }
.health-ring svg { width:140px; height:140px; }
.health-ring-label { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; }
.health-ring-label strong { font-size:28px; }
.health-pills { display:flex; flex-direction:column; gap:10px; }
.pill { display:flex; justify-content:space-between; gap:24px; min-width:280px; padding:12px 16px; border-radius:12px; background:#fff; border:1px solid var(--line); }
.pill.ok { border-left:6px solid #1f7a4d; }
.pill.warn { border-left:6px solid #d4a017; }
.pill.bad { border-left:6px solid #b42318; }
.kpi-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:12px; margin-bottom:16px; }
.kpi { background:#fff; border:1px solid var(--line); border-radius:14px; padding:14px; box-shadow:var(--shadow); }
.kpi-kicker { font-size:12px; color:var(--muted); }
.kpi-value { font-size:28px; font-weight:700; margin-top:4px; }
.kpi-value.warn { color:#b8860b; }
.kpi-value.bad { color:var(--danger); }
.kpi-value.ok { color:var(--ok); }
.kpi-sub { font-size:12px; color:var(--muted); }
.issue-list { margin:0 0 12px; padding-left:18px; }
.bar-row { display:grid; grid-template-columns:1fr 140px auto; gap:8px; align-items:center; margin:8px 0; font-size:13px; }
.bar { height:8px; background:#e6eef3; border-radius:99px; overflow:hidden; }
.bar i { display:block; height:100%; background:var(--accent); }
.month-stats { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; }
.month-stats div { background:#f4f8fb; border-radius:10px; padding:12px; }
.month-stats span { display:block; color:var(--muted); font-size:12px; }
.model-card .model-head { display:grid; grid-template-columns:160px 1fr; gap:16px; align-items:start; margin-bottom:12px; }
.model-photo { background:#f4f8fb; border:1px solid var(--line); border-radius:12px; min-height:140px; display:flex; align-items:center; justify-content:center; overflow:hidden; }
.model-photo img { width:100%; max-height:180px; object-fit:contain; display:block; background:#fff; }
.model-photo-empty { color:var(--muted); font-size:13px; padding:24px; text-align:center; }
.model-upload { margin-top:10px; }
.model-upload .row { align-items:flex-end; }
@media (max-width: 720px) {
  .model-card .model-head { grid-template-columns:1fr; }
}
