/* Canonical Jugueton presentation aligned with the Cangrejera operator shell.
 *
 * Los colores, radios, espaciado y foco se declaran UNA vez, en el `:root` de
 * `styles.css`.  Este archivo llevaba DOS bloques `:root` con tres juegos de
 * valores distintos entre él y `styles.css`, y sólo el último contaba: leer un
 * token obligaba a reconstruir la cascada a mano.  De aquí queda sólo lo que
 * de verdad es propio de la paridad —la geometría de su barra lateral— en un
 * único bloque, más abajo. */

.app-shell {
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.sidebar {
  width: var(--sidebar-width);
  gap: 7px;
  padding: 15px 13px 12px;
  background: #090c11;
  box-shadow: none;
}

.sidebar-brand {
  min-height: 52px;
  padding: 2px 7px 12px;
}

.brand-wordmark strong { font-size: 16px; }
.brand-wordmark span { color: var(--accent); }

.site-identity {
  position: relative;
  min-height: 112px;
  align-content: end;
  isolation: isolate;
  margin: 2px 0 5px;
  padding: 46px 12px 11px;
  border-radius: 6px;
  background: #11151a url("assets/vista-aerea.webp?v=20260930-rooftop1") center 41% / cover no-repeat;
}

.site-identity::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 8, 11, .12), rgba(6, 8, 11, .94));
  content: "";
}

.site-identity::after {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--warning);
  box-shadow: 0 0 10px rgba(240, 182, 76, .52);
  content: "";
}

.site-identity span,
.site-identity small { color: #c1c6cc; }
.site-identity strong { font-size: 16px; }
.portfolio-lockup { display: none !important; }

.nav-section {
  margin: 12px 8px 5px;
  color: #737c87;
  font-size: 8px;
}

.nav-section::after { display: none; }

.nav-link,
.nav-link[data-nav-tier="secondary"] {
  min-height: 34px;
  padding: 0 9px;
  border-radius: 5px;
  font-size: 12px;
}

.nav-link:hover { background: #141922; }

.nav-link[aria-current="page"] {
  border-color: #554025;
  color: #f6c77b;
  background: #1c1812;
  box-shadow: inset 2px 0 0 var(--accent);
  font-weight: 700;
}

.nav-link[aria-current="page"] .nav-icon { color: var(--accent); }

.workspace {
  padding: 0 28px 18px;
}

main { max-width: 1600px; }

.screen-intro {
  min-height: 88px;
  align-items: center;
  margin: 0 -28px 12px;
  padding: 12px 28px 11px 31px;
  border-bottom-color: #232a33;
}

.screen-intro::before {
  position: absolute;
  top: 15px;
  bottom: 15px;
  left: 27px;
  width: 2px;
  background: var(--accent);
  content: "";
}

.screen-intro::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(219, 132, 41, .5), transparent 42%);
  content: "";
}

.screen-intro > div:first-child { padding-left: 12px; }
.screen-eyebrow { color: #b38b54; font-size: 8px; }
.screen-intro h1 { font-size: clamp(22px, 2vw, 30px); }
.screen-intro p { font-size: 12px; }
.screen-side { gap: 5px; }
.topbar-actions { gap: 8px; }

.connection-state,
.quiet-button,
.account-button {
  min-height: 34px;
  border-radius: 5px;
  background: var(--control-surface);
}

.quiet-button { border-color: var(--line); }
.account-initials { border-radius: 5px; background: #dbe0dc; }

.screen-stack { gap: 12px; }

.state-banner,
.global-notice {
  margin-bottom: 0;
  border-color: #4a3b22;
  border-radius: 6px;
  background: #15130f;
}

.plant-profile {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(310px, 39%) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.plant-profile-media {
  position: relative;
  min-height: 410px;
  margin: 0;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background: #11161c;
}

.plant-profile-media::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(5, 7, 10, .88));
  content: "";
}

.plant-profile-media img {
  width: 100%;
  height: 100%;
  min-height: 410px;
  display: block;
  object-fit: cover;
}

.plant-profile-media figcaption {
  position: absolute;
  z-index: 1;
  right: 18px;
  bottom: 15px;
  left: 18px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  color: #fff;
}

.plant-profile-media figcaption span {
  max-width: 30ch;
  color: #d6dade;
  font: 700 9px/1.4 "Cascadia Code", Consolas, monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.plant-profile-media figcaption strong { font-size: 13px; }

.plant-profile-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.plant-profile .board-header {
  min-height: 128px;
  align-items: flex-start;
  padding: 22px 22px 18px;
}

.plant-profile .board-header h2 {
  font-size: clamp(22px, 2vw, 31px);
  letter-spacing: -.03em;
}

.plant-profile .board-header p {
  max-width: 72ch;
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.55;
}

.plant-profile .facts-ledger {
  flex: 1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.plant-profile .fact {
  min-height: 140px;
  padding: 20px 22px;
}

.plant-profile .fact:nth-child(2) { border-right: 0; }
.plant-profile .fact:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
.plant-profile .fact strong { font-size: 25px; }

.operations-board,
.section-block,
.selection-summary,
.report-grid,
.report-provenance,
.key-value-grid {
  border-radius: 8px;
  background: var(--surface);
}

.board-header,
.section-header { padding: 13px 16px; }
.board-header h2,
.section-header h2 { font-size: 14px; }
.two-column { grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr); }

@media (max-width: 1120px) {
  :root { --sidebar-width: 230px; }
  .plant-profile { grid-template-columns: minmax(270px, 42%) minmax(0, 1fr); }
  .plant-profile-media,
  .plant-profile-media img { min-height: 450px; }
}

@media (max-width: 900px) {
  .sidebar {
    top: var(--topbar-height);
    bottom: 0;
    height: auto;
    width: min(330px, calc(100vw - 36px));
    padding: 12px;
  }

  .topbar {
    min-height: var(--topbar-height);
    margin: 0 -18px;
    padding: 8px 18px;
  }

  .workspace { padding: 0 18px 18px; }
  .screen-intro { margin-inline: -18px; padding-inline: 18px; }
  .screen-intro::before { left: 18px; }
  .screen-intro > div:first-child { padding-left: 10px; }
  .plant-profile { grid-template-columns: 1fr; }
  .plant-profile-media { min-height: 300px; border-right: 0; border-bottom: 1px solid var(--line); }
  .plant-profile-media img { min-height: 300px; max-height: 360px; }
}

@media (max-width: 680px) {
  :root { --topbar-height: 58px; }
  .workspace { padding: 0 12px 18px; }
  main { padding-top: 0; }
  .topbar { margin-inline: -12px; padding: 7px 12px; }
  .screen-intro {
    min-height: 80px;
    gap: 8px;
    margin: 0 -12px 10px;
    padding: 11px 12px 11px 23px;
  }
  .screen-intro::before { top: 12px; bottom: 12px; left: 12px; }
  .screen-intro > div:first-child { padding-left: 0; }
  .screen-intro h1 { font-size: 21px; }
  .screen-intro p { font-size: 10.5px; }
  .screen-side { justify-items: end; }
  .plant-profile-media,
  .plant-profile-media img { min-height: 218px; max-height: 218px; }
  .plant-profile .board-header { min-height: 0; padding: 18px 16px 15px; }
  .plant-profile .board-header h2 { font-size: 22px; }
  .plant-profile .facts-ledger { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plant-profile .fact,
  .plant-profile .fact:nth-child(2) {
    min-height: 106px;
    padding: 14px;
    border-right: 1px solid var(--line);
  }
  .plant-profile .fact:nth-child(2n) { border-right: 0; }
  .plant-profile .fact:nth-last-child(-n + 2) { border-bottom: 0; }
  .plant-profile .fact strong { font-size: 20px; }
  .plant-profile-media figcaption { right: 13px; bottom: 12px; left: 13px; }
  .two-column { grid-template-columns: 1fr; }
}

@media (pointer: coarse) {
  .nav-link,
  .nav-link[data-nav-tier="secondary"],
  .quiet-button,
  .account-button,
  .menu-button { min-height: 44px; }
}

/* --------------------------------------------------------------------------
   Canonical ATOMIC AI SCADA shell
   Juguetón inherits the Cangrejera component system; only site facts differ.
   -------------------------------------------------------------------------- */
/* Los valores que este bloque imponía (carbón #080b10, naranja #ea8622,
   radios 8/12/14…) son ahora los del `:root` de `styles.css`: el aspecto
   nocturno es idéntico, pero se declara una sola vez.  Queda la geometría:
   la barra de 246 px y su modo compacto de 76 px son de la paridad. */
:root {
  --sidebar-width: 246px;
  --sidebar-compact-width: 76px;
}

html,
body { background: var(--bg); }

body {
  background:
    radial-gradient(circle at 72% -18%, rgba(234, 134, 34, .055), transparent 34rem),
    var(--bg);
}

/* Login: same lockup, industrial floor grid and access card as Cangrejera.
   La portada de Cangrejera centra un bloque unico (marca + tarjeta + pie) en
   la ventana; aqui se reproduce fila por fila para que ambas consolas abran
   con la misma composicion. */
.auth-view {
  align-content: center;
  justify-items: center;
  gap: 0;
  padding: 34px 22px;
  background: #070807;
}

.auth-grid {
  position: absolute;
  z-index: -1;
  inset: 42% -12% -24%;
  display: block;
  opacity: .32;
  background-image:
    linear-gradient(rgba(234, 134, 34, .18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(234, 134, 34, .14) 1px, transparent 1px);
  background-size: 88px 64px;
  transform: perspective(520px) rotateX(62deg) scale(1.35);
  transform-origin: center top;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 74%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 74%, transparent);
}

.auth-stripes {
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: .12;
  pointer-events: none;
  background: repeating-linear-gradient(55deg, transparent 0 30px, rgba(234, 134, 34, .2) 30px 31px);
  -webkit-mask-image: radial-gradient(70% 70% at 50% 48%, #000, transparent 78%);
  mask-image: radial-gradient(70% 70% at 50% 48%, #000, transparent 78%);
}

.auth-glow {
  bottom: -12%;
  width: 780px;
  height: 600px;
  border-radius: 0;
  opacity: .9;
  background: radial-gradient(ellipse at center, rgba(255, 170, 60, .47), rgba(234, 134, 34, .17) 38%, transparent 68%);
  filter: blur(10px);
}

.auth-layout {
  width: min(470px, calc(100vw - 36px));
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  margin: 0;
  padding-inline: 30px;
}

.auth-context,
.auth-panel { min-width: 0; }

/* El lockup es mas ancho que la columna de 470px. Con la pista en `auto`
   crecia hasta 536px y arrastraba logo, kicker y bajada 63px a la derecha
   del eje de la tarjeta; fijada a `minmax(0, 1fr)` la pista se queda en el
   ancho de la columna y el lockup desborda simetrico, centrado en la
   ventana como en Cangrejera. */
.auth-context { grid-template-columns: minmax(0, 1fr); }

.auth-logo {
  width: 104px;
  height: 104px;
  filter: drop-shadow(0 18px 44px rgba(234, 134, 34, .35));
  animation: canonical-logo-float 5.5s ease-in-out 1s infinite;
}

@keyframes canonical-logo-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.auth-lockup {
  width: auto;
  justify-self: stretch;
  justify-content: center;
  gap: 18px;
  margin-top: 30px;
  color: #f4f6f8;
  font-size: 31px;
  font-weight: 800;
  line-height: 1.45;
}

.auth-lockup strong,
.auth-lockup em,
.auth-lockup span { line-height: 1; }
.auth-lockup strong { font-weight: 800; }

.auth-lockup i {
  color: #68727f;
  font-size: 24px;
  font-weight: 400;
  transform: translateY(-2px);
}

.auth-kicker {
  margin-top: 24px;
  color: #ffca05;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: .34em;
}

.auth-context > p {
  margin-top: 11px;
  color: rgba(244, 246, 248, .64);
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: .035em;
}

.auth-context > small { display: none; }

.auth-panel {
  min-height: 0;
  padding: 22px;
  border-color: rgba(202, 166, 92, .22);
  background: linear-gradient(145deg, rgba(202, 166, 92, .06), rgba(255, 255, 255, .018));
  box-shadow: 0 24px 70px -48px rgba(234, 134, 34, .9);
  backdrop-filter: none;
}

.login-form { gap: 13px; }

/* Cangrejera separa el encabezado del formulario con 20px; aqui son los 13px
   de la rejilla mas estos 7px. */
.form-heading { margin-bottom: 7px; }
.form-heading h2 {
  color: #f4f6f8;
  font-size: 19px;
  line-height: 1.45;
  letter-spacing: -.025em;
}
.form-heading p {
  margin-top: 6px;
  color: rgba(226, 232, 240, .58);
  font-size: 11px;
  line-height: 1.45;
}
.form-heading > span {
  margin-bottom: 6px;
  color: #caa65c;
  font-size: 8px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .18em;
}
.form-heading > span,
.login-form label { font-family: "Cascadia Code", Consolas, monospace; }
.login-form label {
  gap: 6px;
  color: rgba(226, 232, 240, .72);
  font-size: 8px;
  font-weight: 740;
  line-height: 1;
  letter-spacing: .08em;
}
.login-form input {
  min-height: 42px;
  padding: 9px 11px;
  border-color: rgba(148, 163, 184, .2);
  background: rgba(2, 6, 12, .64);
  font: 650 13px/1.2 "Cascadia Code", Consolas, monospace;
}
.login-form input:hover { border-color: rgba(148, 163, 184, .34); }
.login-form input:focus {
  border-color: rgba(202, 166, 92, .7);
  box-shadow: 0 0 0 3px rgba(202, 166, 92, .1);
}
.auth-panel .form-error {
  min-height: 16px;
  margin-top: -2px;
  color: #f6a7a7;
  font: 700 9px/1.4 "Cascadia Code", Consolas, monospace;
}
.auth-panel .primary-button,
.auth-panel .quiet-button {
  min-width: 0;
  min-height: 42px;
  padding: 10px 15px;
  border-radius: 9px;
  gap: 18px;
  font-size: 12px;
  font-weight: 760;
}
.auth-panel .primary-button {
  color: #1b1306;
  background: linear-gradient(135deg, #ea8622, #ffca05);
  box-shadow: 0 14px 36px -20px rgba(234, 134, 34, .8);
}
.auth-panel .primary-button:hover:not(:disabled) {
  background: linear-gradient(135deg, #f29530, #ffd649);
}
.auth-panel .primary-button b { font-size: 12px; line-height: 1; }

/* El pie viaja con el bloque centrado, como en Cangrejera, en lugar de
   quedar anclado al borde inferior de la ventana. */
.auth-foot {
  position: static;
  inset: auto;
  width: min(470px, calc(100vw - 36px));
  flex-wrap: wrap;
  gap: 11px;
  margin: 26px 0 0;
  padding-inline: 30px;
  color: rgba(244, 246, 248, .48);
  font-size: 10.5px;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: normal;
}
.auth-foot span { display: inline-flex; align-items: center; gap: 7px; }
.auth-foot b { color: inherit; font-weight: 400; }
.auth-foot i {
  background: #34d27e;
  box-shadow: 0 0 10px rgba(52, 210, 126, .75);
}

/* Sidebar brand and plant card: exact component grammar, site-specific image. */
.app-shell {
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.app-shell.is-nav-compact { grid-template-columns: var(--sidebar-compact-width) minmax(0, 1fr); }

.sidebar {
  width: var(--sidebar-width);
  gap: 7px;
  padding: 15px 13px 12px;
  border-right-color: #222a34;
  background: #0b0f15;
  box-shadow: none;
}

.sidebar-brand {
  min-height: 54px;
  justify-content: space-between;
  padding: 0 7px 10px;
  border-bottom-color: #232a34;
}

.sidebar-brand-lockup {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.sidebar-brand-logo {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  object-fit: contain;
  filter: contrast(1.06) drop-shadow(0 0 8px rgba(255, 255, 255, .08));
}

.sidebar-brand-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.sidebar-brand-copy strong {
  color: #f5f7fb;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .06em;
  white-space: nowrap;
}

.sidebar-brand-copy small {
  color: var(--accent);
  font: 800 9px/1 "Cascadia Code", Consolas, monospace;
  letter-spacing: .32em;
}

.sidebar-toggle {
  width: 27px;
  height: 27px;
  display: grid;
  flex: 0 0 27px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 7px;
  color: #7d8690;
  background: transparent;
  opacity: .42;
  transition: color .18s ease, background .18s ease, opacity .18s ease;
}

.sidebar-toggle svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-toggle-rail { opacity: .48; }
.sidebar-toggle-caret { transform-origin: 12px 12px; transition: transform .2s ease; }
.sidebar-toggle:hover,
.sidebar-toggle:focus-visible { color: #e2bd83; background: rgba(234, 134, 34, .075); opacity: 1; }
.sidebar-toggle[aria-expanded="false"] .sidebar-toggle-caret { transform: scaleX(-1); }

@media (min-width: 901px) {
  .app-shell.is-nav-compact .sidebar {
    width: var(--sidebar-compact-width);
    gap: 9px;
    padding: 15px 10px 12px;
  }

  .sidebar.is-compact .sidebar-brand { position: relative; justify-content: center; padding-inline: 0; }
  .sidebar.is-compact .sidebar-brand-lockup { justify-content: center; transition: opacity .18s ease; }
  .sidebar.is-compact .sidebar-brand-logo { width: 42px; height: 42px; flex-basis: 42px; }
  .sidebar.is-compact .sidebar-brand-copy,
  .sidebar.is-compact .site-identity,
  .sidebar.is-compact .nav-section,
  .sidebar.is-compact .readonly-seal,
  .sidebar.is-compact #package-revision,
  .sidebar.is-compact .sidebar-utility > span:last-child { display: none; }
  .sidebar.is-compact .sidebar-toggle { position: absolute; inset: 0; width: 100%; height: 57px; opacity: 0; }
  .sidebar.is-compact .sidebar-brand:hover .sidebar-brand-lockup,
  .sidebar.is-compact .sidebar-brand:focus-within .sidebar-brand-lockup { opacity: .12; }
  .sidebar.is-compact .sidebar-brand:hover .sidebar-toggle,
  .sidebar.is-compact .sidebar-toggle:focus-visible { opacity: 1; }
  .sidebar.is-compact .site-navigation { padding-right: 0; }
  .sidebar.is-compact .nav-link { justify-content: center; width: 46px; min-height: 40px; margin-inline: auto; padding: 0; }
  .sidebar.is-compact .nav-label { display: none; }
  .sidebar.is-compact .nav-icon { width: 20px; height: 20px; }
  .sidebar.is-compact .sidebar-foot { justify-items: center; padding-inline: 0; }
  .sidebar.is-compact .sidebar-utility { width: 44px; min-height: 42px; justify-content: center; padding: 0; }
}

.site-identity {
  position: relative;
  min-height: 124px;
  align-content: end;
  isolation: isolate;
  margin: 1px 0 3px;
  padding: 44px 12px 9px;
  border-color: #343a2b;
  border-radius: 10px;
  background: #090d12 url("assets/vista-aerea.webp?v=20260930-rooftop1") center 48% / cover no-repeat;
}

.site-identity::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(5, 8, 12, .1), rgba(5, 8, 12, .3) 43%, rgba(5, 8, 12, .94) 86%);
  content: "";
}

.site-mode-chip {
  position: absolute;
  z-index: 2;
  top: 9px;
  right: 9px;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  color: rgba(255, 255, 255, .92) !important;
  background: rgba(4, 7, 10, .62);
  box-shadow: 0 8px 20px -14px #000;
  font: 680 7.5px/1 "Cascadia Code", Consolas, monospace !important;
  letter-spacing: .025em;
}

.site-mode-chip i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.site-identity-label { color: rgba(255, 255, 255, .64) !important; }
.site-identity strong { color: #f8fafc; font-size: 14px; text-shadow: 0 1px 8px rgba(0, 0, 0, .42); }
.site-identity > small { color: rgba(255, 255, 255, .62); }

.portfolio-lockup {
  display: flex !important;
  align-items: baseline;
  gap: 6px;
  margin-top: 4px;
  padding-top: 4px;
  border-top-color: rgba(255, 255, 255, .16);
}

.portfolio-lockup span { font-size: 7px; }
.portfolio-lockup b { color: #f4a12d; }
.portfolio-lockup i { display: none; }

/* Navigation keeps Juguetón's authorized modules, but uses the canonical rows. */
.site-navigation { padding-right: 0; }
.nav-section { margin: 12px 8px 5px; color: #7b8592; font-size: 8px; }
.nav-section::after { display: block; background: #252c36; }
.nav-section:first-child { margin-top: 1px; }

.nav-link,
.nav-link[data-nav-tier="secondary"] {
  min-height: 34px;
  padding: 0 9px;
  border-radius: 5px;
  color: #aeb7c3;
  font-size: 12px;
}

.nav-link[data-nav-tier="secondary"] { min-height: 30px; font-size: 11px; }
.nav-link:hover { color: #eef2f7; background: rgba(255, 255, 255, .055); }
.nav-link[aria-current="page"],
.nav-link[aria-current="page"]:hover {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(180deg, #ef8f22, #d97207);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
  font-weight: 650;
}

.nav-link[aria-current="page"] .nav-icon { color: #fff; }

.sidebar-foot {
  gap: 8px;
  padding: 10px 3px 0;
  border-top-color: #252c36;
}

/* La frontera read-only vuelve a estar a la vista.
 *
 * PRODUCT.md promete una consola query-only y DESIGN.md pide "estados y
 * procedencia visibles sin sugerir control OT"; el sello existía en el pie de
 * la barra lateral y esta regla lo ocultaba, de modo que el producto escrito y
 * el producto visible se contradecían.  No se vuelve a esconder: si estorba,
 * se ajusta su presentación.
 *
 * `#package-revision` sigue oculto: la revisión del paquete es un dato de
 * despliegue, no una garantía que el operador necesite leer en pantalla.
 */
#package-revision { display: none; }

.readonly-seal {
  display: inline-flex;
  align-items: center;
  margin-bottom: 2px;
  letter-spacing: .04em;
}

.sidebar-utility {
  width: 100%;
  min-height: 43px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 9px;
  border: 1px solid #252c36;
  border-radius: 8px;
  color: #aeb7c3;
  background: #10151d;
  text-align: left;
}

.sidebar-utility:hover { color: #fff; border-color: #3a4451; background: #151b24; }
.sidebar-utility-mark { width: 27px; height: 27px; display: grid; flex: 0 0 27px; place-items: center; border: 1px solid #36404c; border-radius: 7px; }
.sidebar-utility-mark svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-utility > span:last-child { min-width: 0; display: grid; gap: 2px; }
.sidebar-utility small { color: #7b8592; font: 700 7px/1 "Cascadia Code", Consolas, monospace; letter-spacing: .15em; text-transform: uppercase; }
.sidebar-utility strong { overflow: hidden; color: inherit; font: 650 9px/1.2 "Cascadia Code", Consolas, monospace; letter-spacing: .05em; text-overflow: ellipsis; white-space: nowrap; }

/* View header mirrors the Cangrejera hierarchy and operator readout. */
.workspace { padding: 0 30px 12px; }
main { max-width: 1600px; }
.screen-intro {
  min-height: 89px;
  align-items: center;
  margin: 0 0 12px;
  padding: 9px 0 12px 17px;
  border-bottom-color: #252c36;
}

.screen-intro::before {
  position: absolute;
  top: 15px;
  bottom: 15px;
  left: 0;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), rgba(234, 134, 34, .16));
  content: "";
}

.screen-intro::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(234, 134, 34, .62), transparent 44%);
  content: "";
}

.screen-context-line { display: flex; align-items: center; gap: 10px; margin-bottom: 2px; }
.screen-eyebrow { margin: 0; color: #b79569; font-size: 8.5px; }
.screen-brand-tag { min-height: 16px; display: inline-flex; align-items: center; gap: 5px; padding: 0 8px; border: 1px solid rgba(234, 134, 34, .38); border-radius: 999px; color: #d5a86d; font: 700 7.5px/1 "Cascadia Code", Consolas, monospace; letter-spacing: .12em; text-transform: uppercase; }
.screen-brand-tag i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.screen-brand-tag b { color: inherit; font-weight: inherit; }
.screen-intro h1 { font-size: 24px; font-weight: 740; line-height: 1.13; letter-spacing: -.035em; }
.screen-intro p { max-width: 78ch; margin-top: 4px; color: #aeb7c3; font-size: 11.5px; }
.screen-side { gap: 5px; }
.topbar-actions { gap: 8px; }
.mobile-brand { display: none; }

/* El relleno y el borde de los controles de la cabecera eran dos literales
   oscuros, así que en el tema claro quedaban como pastillas negras sobre
   blanco. Ahora son tokens: en nocturna valen exactamente lo mismo que antes
   y en claro siguen la superficie. */
.connection-state,
.quiet-button,
.account-button,
.view-clock {
  min-height: 34px;
  border: 1px solid var(--control-edge);
  border-radius: 5px;
  background: var(--control-surface);
}

.connection-state { padding-inline: 10px; }
.quiet-button { padding-inline: 12px; }
.account-button { padding: 3px 8px 3px 3px; }
.account-initials { border-radius: 8px; background: var(--accent); }
.view-clock { min-width: 88px; display: grid; align-content: center; padding: 4px 10px; }
.view-clock strong { font: 700 13px/1 "Cascadia Code", Consolas, monospace; letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.view-clock small { margin-top: 4px; color: #737e8b; font: 650 7px/1 "Cascadia Code", Consolas, monospace; letter-spacing: .08em; text-transform: uppercase; }

/* Operational content: deep panels, strict lines and compact plant ledger. */
.screen-stack { gap: 14px; }
.state-banner,
.global-notice { border-radius: 12px; background: #10151d; }
.plant-overview-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #252c36;
  border-radius: 14px;
  background: #10151d;
}
.plant-overview-panel .fact {
  min-height: 116px;
  padding: 20px 24px;
}
.plant-overview-panel .fact strong { font-size: 27px; }

.endpoint-dashboard {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #252c36;
  border-radius: 14px;
  background: #0c1016;
}
.endpoint-dashboard-header {
  min-height: 106px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 20px 24px;
  border-bottom: 1px solid #252c36;
  background: #10151d;
}
.endpoint-dashboard-header > div:first-child { min-width: 0; }
.endpoint-dashboard-header h2 {
  margin: 0;
  color: #f5f7fb;
  font-size: 20px;
  letter-spacing: -.025em;
}
.endpoint-dashboard-header p {
  max-width: 72ch;
  margin: 6px 0 0;
  color: #aeb7c3;
  font-size: 12px;
  line-height: 1.5;
}
.endpoint-dashboard-meta {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: auto auto minmax(190px, auto);
  border: 1px solid #252c36;
  border-radius: 10px;
  background: #0b1016;
}
.endpoint-dashboard-meta span {
  min-width: 112px;
  display: grid;
  gap: 5px;
  padding: 11px 14px;
  border-right: 1px solid #252c36;
}
.endpoint-dashboard-meta span:last-child { border-right: 0; }
.endpoint-dashboard-meta strong {
  color: #f5f7fb;
  font: 750 13px/1.15 "Cascadia Code", Consolas, monospace;
  font-variant-numeric: tabular-nums;
}
.endpoint-dashboard-meta small {
  color: #788391;
  font: 700 8.5px/1.2 "Cascadia Code", Consolas, monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.endpoint-chart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(380px, .65fr);
}
.endpoint-chart-stack {
  min-width: 0;
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
}
.endpoint-chart-card {
  min-width: 0;
  padding: 18px 20px 20px;
  background: #10151d;
}
.endpoint-chart-card-featured { border-right: 1px solid #252c36; }
.endpoint-chart-stack .endpoint-chart-card:first-child { border-bottom: 1px solid #252c36; }
.endpoint-chart-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.endpoint-chart-card h3 {
  margin: 0;
  color: #f5f7fb;
  font-size: 15px;
  letter-spacing: -.015em;
}
.endpoint-chart-card header p {
  margin: 4px 0 0;
  color: #788391;
  font-size: 11px;
}
.endpoint-chart-unit {
  min-width: 31px;
  padding: 5px 8px;
  border: 1px solid #3a4451;
  border-radius: 8px;
  color: #b9c0cb;
  background: #0c1016;
  font: 750 9px/1 "Cascadia Code", Consolas, monospace;
  text-align: center;
}
.endpoint-chart-card figure { margin: 20px 0 0; }
.endpoint-chart-axis {
  display: flex;
  justify-content: space-between;
  margin: 0 0 8px 158px;
  color: #788391;
  font: 650 8.5px/1 "Cascadia Code", Consolas, monospace;
  font-variant-numeric: tabular-nums;
}
.endpoint-chart-axis-diverging { position: relative; }
.endpoint-chart-axis-diverging b {
  position: absolute;
  left: 50%;
  color: #aeb7c3;
  font: inherit;
  transform: translateX(-50%);
}
.endpoint-bars { display: grid; gap: 11px; }
.endpoint-bar-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 142px minmax(80px, 1fr) 88px;
  align-items: center;
  gap: 12px;
}
.endpoint-bar-row > strong {
  min-width: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #b9c0cb;
  font: 700 10px/1.2 "Cascadia Code", Consolas, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.endpoint-bar-row > strong::before {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #f0b64c;
  content: "";
}
.endpoint-bar-row.is-solaredge > strong::before { background: #73b6ff; }
.endpoint-bar-row > b {
  color: #f5f7fb;
  font: 750 11px/1 "Cascadia Code", Consolas, monospace;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.endpoint-bar-track {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 5px;
  background: #080b10;
}
.endpoint-bar-axis { stroke: #4a5564; stroke-width: .5; vector-effect: non-scaling-stroke; }
.endpoint-bar-fill {
  fill: #ea8622;
}
.endpoint-chart-card[data-metric="voltage"] .endpoint-bar-fill { fill: #73b6ff; }
.endpoint-chart-card[data-metric="current"] .endpoint-bar-fill { fill: #ea8622; }
.endpoint-bar-track.is-diverging .endpoint-bar-fill.is-negative {
  fill: #f0b64c;
}
.endpoint-bar-track.is-diverging .endpoint-bar-fill.is-positive {
  fill: #53d7a0;
}
.endpoint-bar-zero { fill: #788391; }
.endpoint-chart-insights {
  margin: 26px 0 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid #252c36;
}
.endpoint-chart-insights div {
  min-width: 0;
  display: grid;
  gap: 7px;
  padding: 16px 14px 0;
  border-right: 1px solid #252c36;
}
.endpoint-chart-insights div:first-child { padding-left: 0; }
.endpoint-chart-insights div:last-child { padding-right: 0; border-right: 0; }
.endpoint-chart-insights dt {
  color: #788391;
  font: 700 8.5px/1.2 "Cascadia Code", Consolas, monospace;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.endpoint-chart-insights dd {
  min-width: 0;
  margin: 0;
  display: grid;
  gap: 5px;
  color: #f5f7fb;
  font: 750 15px/1 "Cascadia Code", Consolas, monospace;
  font-variant-numeric: tabular-nums;
}
.endpoint-chart-insights small {
  overflow: hidden;
  color: #788391;
  font: 650 9px/1.2 "Cascadia Code", Consolas, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Home context: the four-fact ledger spans full width and the coverage list
   sits under it as a 3x3 grid. The old 1.4fr/0.6fr split left a tall void
   beside a single 116px row and clipped "297 kWp" to "297 k...". */
.home-context-grid {
  display: grid;
  gap: 14px;
  align-items: start;
}
.home-context-grid > * { min-width: 0; }
.coverage-section .coverage-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.coverage-section .coverage-list div { padding: 14px 16px; }
.coverage-section .coverage-list dt { font-size: 11.5px; }

.endpoint-table-section { padding: 0; overflow: hidden; }
.endpoint-table-section > .section-header {
  margin: 0;
  padding: 18px 20px;
  border-bottom: 1px solid #252c36;
  background: #10151d;
}
.endpoint-table-section > .section-header h2 { font-size: 17px; }
.endpoint-table-section > .section-header p { margin-top: 5px; }
.endpoint-table-shell { border: 0; border-radius: 0; }
.endpoint-table { table-layout: fixed; }
.endpoint-table th,
.endpoint-table td { padding: 12px 16px; }
.endpoint-table th {
  height: 42px;
  color: #7f8996;
  background: #0b1016;
  font: 750 9px/1.2 "Cascadia Code", Consolas, monospace;
  letter-spacing: .11em;
}
.endpoint-table th:nth-child(1) { width: 24%; }
.endpoint-table th:nth-child(2) { width: 20%; }
.endpoint-table th:nth-child(3) { width: 15%; }
.endpoint-table th:nth-child(4) { width: 25%; }
.endpoint-table th:nth-child(5) { width: 16%; }
.endpoint-table td { height: 52px; background: #10151d; }
.endpoint-table tbody tr:nth-child(even) td { background: #0e141b; }
.endpoint-table tbody tr:hover td { background: #151c25; }
.endpoint-table .endpoint-group-start:not(:first-child) td {
  border-top: 4px solid #080b10;
}
.endpoint-table td:nth-child(3),
.endpoint-table th:nth-child(3) { text-align: right; }
.endpoint-table td:nth-child(5) { white-space: nowrap; }
.endpoint-identity {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.endpoint-identity i {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(239, 143, 34, .11);
}
.endpoint-identity strong {
  overflow: hidden;
  font: 750 11px/1.3 "Cascadia Code", Consolas, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.endpoint-reading {
  color: #f4f7fb;
  font: 750 13px/1.2 "Cascadia Code", Consolas, monospace;
  font-variant-numeric: tabular-nums;
}
.endpoint-observed { color: #98a3af; font-size: 11px; }
.endpoint-table .state-chip {
  min-height: 25px;
  padding: 3px 8px;
  font-size: 9.5px;
}
.plant-profile { border-color: #252c36; border-radius: 14px; background: #10151d; }
.plant-profile-media { height: 500px; min-height: 500px; border-right-color: #252c36; }
.plant-profile-media img { height: 100%; min-height: 0; object-position: center 10%; transform: none; }
.plant-profile-media figcaption span { color: #e1e5eb; }
.plant-profile .board-header { min-height: 148px; padding: 25px 26px 21px; }
.plant-profile .board-header h2 { font-size: clamp(25px, 2.2vw, 34px); }
.plant-profile .board-header p { color: #aeb7c3; font-size: 12.5px; }
.plant-profile .fact { min-height: 176px; padding: 22px 26px; }
.plant-profile .fact strong { font-size: 29px; }
.operations-board,
.section-block,
.selection-summary,
.report-grid,
.report-provenance,
.key-value-grid { border-color: #252c36; border-radius: 14px; background: #0e131a; }
.board-header,
.section-header { padding: 16px 18px; }
.board-header h2,
.section-header h2 { font-size: 15px; }
.two-column { grid-template-columns: minmax(0, 1.4fr) minmax(300px, .6fr); }

/* The optional light surface remains functional, but the default is canonical night. */
html[data-theme="light"] {
  color-scheme: light;
  --bg: #eef1f4;
  --bg-raised: #f7f9fb;
  --surface: #ffffff;
  --surface-strong: #f3f5f7;
  --surface-soft: #e8edf2;
  --line: #d7dde4;
  --line-strong: #b7c0ca;
  --text: #19212b;
  --text-soft: #465260;
  /* #697584 daba 4.14:1 sobre el suelo claro: la procedencia, la edad y el
     metadato se leían por debajo de AA en todas las vistas.  #5a6675 es el
     mismo gris azulado un paso más oscuro (4.96:1 en la peor superficie). */
  --text-muted: #5a6675;
}

html[data-theme="light"] body { background: #eef1f4; }
html[data-theme="light"] .workspace { background: #eef1f4; }
html[data-theme="light"] .screen-intro p { color: #566372; }
html[data-theme="light"] .operations-board,
html[data-theme="light"] .section-block,
html[data-theme="light"] .plant-profile,
html[data-theme="light"] .plant-overview-panel { background: #fff; }
html[data-theme="light"] .endpoint-table-section > .section-header,
html[data-theme="light"] .endpoint-table td { background: #fff; }
html[data-theme="light"] .endpoint-table th { background: #f2f5f8; }
html[data-theme="light"] .endpoint-table tbody tr:nth-child(even) td { background: #f8fafc; }
html[data-theme="light"] .endpoint-table tbody tr:hover td { background: #edf2f6; }
html[data-theme="light"] .endpoint-reading { color: #19212b; }
html[data-theme="light"] .endpoint-dashboard,
html[data-theme="light"] .endpoint-chart-card,
html[data-theme="light"] .endpoint-dashboard-header { background: #fff; }
html[data-theme="light"] .endpoint-dashboard-header h2,
html[data-theme="light"] .endpoint-chart-card h3,
html[data-theme="light"] .endpoint-dashboard-meta strong,
html[data-theme="light"] .endpoint-bar-row > b,
html[data-theme="light"] .endpoint-chart-insights dd { color: #19212b; }
html[data-theme="light"] .endpoint-dashboard-header p,
html[data-theme="light"] .endpoint-bar-row > strong { color: #465260; }
html[data-theme="light"] .endpoint-dashboard-meta,
html[data-theme="light"] .endpoint-chart-unit,
html[data-theme="light"] .endpoint-bar-track { background: #eef2f6; }
html[data-theme="light"] .plant-trend-readouts button:hover,
html[data-theme="light"] .plant-trend-readouts button.is-active { background: #f2f5f8; }
html[data-theme="light"] .readout-value,
html[data-theme="light"] .endpoint-metric dd strong,
html[data-theme="light"] .endpoint-grid-meta dd,
html[data-theme="light"] .endpoint-card-identity h4 { color: #19212b; }
html[data-theme="light"] .endpoint-card { background: #fff; }
html[data-theme="light"] .endpoint-card-metrics,
html[data-theme="light"] .endpoint-card-icon,
html[data-theme="light"] .endpoint-grid-meta,
html[data-theme="light"] .tip-bubble { background: #f6f8fa; }
html[data-theme="light"] .tip-bubble { color: #19212b; }
html[data-theme="light"] .plant-scope-control button[data-tone="jugueton"] { --tone: #566372; }
html[data-theme="light"] .scope-dot { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18); }

@media (max-width: 1120px) {
  :root { --sidebar-width: 230px; }
  .endpoint-dashboard-header { align-items: flex-start; flex-direction: column; gap: 16px; }
  .endpoint-dashboard-meta { width: 100%; grid-template-columns: auto auto minmax(190px, 1fr); }
  .plant-profile-media,
  .plant-profile-media img { min-height: 440px; }
  .plant-profile .fact { min-height: 150px; }
}

@media (max-width: 900px) {
  .auth-layout { gap: 28px; }
  .auth-context .auth-lockup { max-width: none; font-size: 31px; }
  .sidebar-toggle { display: none; }
  .sidebar { width: min(340px, calc(100vw - 32px)); padding: 14px 12px; }
  .workspace { padding: 0 18px 18px; }
  .topbar { justify-content: space-between; background: rgba(8, 11, 16, .97); }
  .mobile-brand { min-width: 0; display: flex; align-items: center; gap: 9px; }
  .mobile-brand img { width: 31px; height: 31px; object-fit: contain; }
  .mobile-brand span { min-width: 0; display: grid; gap: 2px; }
  .mobile-brand strong { color: #f5f7fb; font-size: 11px; line-height: 1; letter-spacing: .055em; white-space: nowrap; }
  .mobile-brand strong b { color: var(--accent); font-size: 8px; letter-spacing: .16em; }
  .mobile-brand small { color: #7b8592; font: 650 8px/1 "Cascadia Code", Consolas, monospace; }
  .menu-button { margin-left: auto; }
  .screen-intro { margin-top: 0; padding-top: 14px; }
  .endpoint-chart-layout { grid-template-columns: 1fr; }
  .endpoint-chart-card-featured { border-right: 0; border-bottom: 1px solid #252c36; }
  .endpoint-chart-stack { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; }
  .endpoint-chart-stack .endpoint-chart-card:first-child { border-right: 1px solid #252c36; border-bottom: 0; }
  .plant-overview-panel .facts-ledger { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plant-overview-panel .fact:nth-child(2) { border-right: 0; }
  .plant-overview-panel .fact:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .coverage-section .coverage-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .plant-profile { grid-template-columns: 1fr; }
  .plant-profile-media { border-right: 0; border-bottom: 1px solid var(--line); }
}

@media (max-width: 720px) {
  .auth-logo { width: 84px; height: 84px; }
  .auth-context .auth-lockup { gap: 10px; font-size: 21px; }
  .auth-context .auth-lockup i { font-size: 16px; }
}

@media (max-width: 680px) {
  .auth-view { gap: 0; padding: 24px 16px; }
  .auth-layout { gap: 28px; padding-inline: 18px; }
  .auth-context .auth-lockup {
    width: auto;
    max-width: 100%;
    margin-top: 30px;
  }
  .auth-kicker { margin-top: 18px; font-size: 9px; }
  .auth-context > p { font-size: 14px; }
  .auth-panel { padding: 17px 14px; }
  .auth-foot { padding-inline: 18px; }
  .workspace { padding: 0 12px 16px; }
  .screen-intro { min-height: 0; align-items: flex-start; gap: 12px; padding: 14px 0 13px 13px; }
  .screen-context-line { align-items: flex-start; flex-direction: column; gap: 7px; }
  .screen-brand-tag { display: none; }
  .screen-intro h1 { font-size: 24px; }
  .screen-intro p { font-size: 11px; }
  .endpoint-dashboard-header { min-height: 0; padding: 17px 16px; }
  .endpoint-dashboard-header h2 { font-size: 17px; }
  .endpoint-dashboard-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .endpoint-dashboard-meta span { min-width: 0; padding: 10px 11px; }
  .endpoint-dashboard-meta span:nth-child(2) { border-right: 0; }
  .endpoint-dashboard-meta span:last-child { grid-column: 1 / -1; border-top: 1px solid #252c36; }
  .endpoint-chart-stack { grid-template-columns: 1fr; }
  .endpoint-chart-stack .endpoint-chart-card:first-child { border-right: 0; border-bottom: 1px solid #252c36; }
  .endpoint-chart-card { padding: 17px 14px 19px; }
  .endpoint-chart-axis { margin-left: 116px; }
  .endpoint-bar-row { grid-template-columns: 104px minmax(70px, 1fr) 78px; gap: 8px; }
  .endpoint-chart-insights { margin-top: 20px; }
  .endpoint-chart-insights div { padding: 13px 8px 0; }
  .endpoint-chart-insights dd { font-size: 13px; }
  .topbar-actions { flex-wrap: wrap; justify-content: flex-end; }
  .connection-state span { display: inline; }
  .connection-state { gap: 7px; padding-inline: 9px; }
  .connection-state { order: 1; }
  .quiet-button { order: 2; }
  .view-clock { display: none; }
  .account-button { order: 3; }
  .plant-profile-media,
  .plant-profile-media img { height: 260px; min-height: 260px; max-height: 260px; }
  .plant-profile-media img { object-position: center 34%; transform: none; }
  .plant-profile .board-header { min-height: 0; padding: 19px 16px 16px; }
  .plant-profile .facts-ledger { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plant-profile .fact { min-height: 112px; padding: 15px; }
  .plant-profile .fact strong { font-size: 22px; }
  .plant-overview-panel .facts-ledger { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plant-overview-panel .fact,
  .plant-overview-panel .fact:nth-child(2) {
    min-height: 108px;
    padding: 15px;
    border-right: 1px solid var(--line);
  }
  .plant-overview-panel .fact:nth-child(2n) { border-right: 0; }
  .plant-overview-panel .fact:nth-last-child(-n + 2) { border-bottom: 0; }
  .plant-overview-panel .fact strong { font-size: 22px; }
  .endpoint-table-section > .section-header { padding: 16px; }
  .endpoint-table { table-layout: auto; }
  .endpoint-table tr { padding: 12px 14px; }
  .endpoint-table .endpoint-group-start:not(:first-child) { border-top: 5px solid #080b10; }
  .endpoint-table .endpoint-group-start:not(:first-child) td { border-top: 0; }
  .endpoint-table td { height: auto; padding: 6px 0; }
  .endpoint-table td:nth-child(3) { text-align: left; }
  .endpoint-table td:nth-child(5) { align-items: center; }
  .endpoint-table .state-chip { justify-self: start; }
  .two-column { grid-template-columns: 1fr; }
  .coverage-section .coverage-list { grid-template-columns: 1fr; }
}

@media (pointer: coarse) {
  .login-form input,
  .auth-panel .primary-button,
  .auth-panel .quiet-button,
  .nav-link,
  .nav-link[data-nav-tier="secondary"],
  .section-collapse-button,
  .sidebar-utility,
  .menu-button,
  .quiet-button { min-height: 44px; }

  /* El compactador del menú medía 27 px: con un dedo se acierta por suerte.
     El cuadro crece a 44 px sin mover el glifo de 17 px ni la fila de marca,
     porque el dibujo se centra en una caja mayor. */
  .sidebar-toggle {
    width: var(--touch-target);
    height: var(--touch-target);
    flex: 0 0 var(--touch-target);
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-logo { animation: none; }
  .app-shell,
  .sidebar,
  .sidebar-toggle-caret { transition: none; }
}
