/* ═══════════════════════════════════════════════════════════════
   overrides.css — Correcciones y ajustes finales de tema.
   Se carga ÚLTIMO en el HTML, por lo que gana por orden de cascada.
   Todo ajuste fino de tema va AQUÍ, no en base.css ni themes.css,
   para mantener un único lugar de correcciones.
   ═══════════════════════════════════════════════════════════════ */

/* ── 1. Botón de usuario — naranja de marca, texto blanco, legible ──
   En Día y en Noche. No hereda --t2. */
nav .user-pill {
  background: #f28d00;
  color: #ffffff;
  border: 1px solid #d97a00;
  font-weight: 600;
}
nav .user-pill:hover {
  background: #d97a00;
  color: #ffffff;
  border-color: #b96800;
}
nav .user-pill span,
nav .user-pill * { color: #ffffff; }

/* ── 2. Nav (vidrio esmerilado, ver base.css) y footer (var(--bg2),
   se adapta al tema) ya no se fuerzan a un mismo --bg4: el nuevo
   diseño Deep Tech los trata como capas distintas a propósito. */
footer .footer-inner, footer .footer-brand, footer .footer-bottom { background: transparent; }

/* ── 3. Chat: el header no se corta ──
   El panel se limita al alto de la ventana y el cuerpo hace scroll.
   110px -> 146px: el bottom del panel subió de 88px a 124px (chat.css,
   para no tapar el footer), así que el margen reservado total
   (arriba + abajo) tiene que crecer la misma diferencia (+36px) para
   que el tope siga sin exceder el viewport en pantallas chicas. */
#chat-panel {
  max-height: calc(100vh - 146px);
  top: auto;
}
#chat-header {
  position: sticky;
  top: 0;
  z-index: 2;
}
#chat-messages {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

/* ── 4. Ribete verde en el header del formulario (panel lateral) ── */
.form-panel-head {
  background: var(--bg4);
  color: #ffffff;
  border-top: 4px solid var(--g);
}
.form-panel-head #form-panel-title { color: #ffffff; }
.form-close { color: rgba(255,255,255,0.85); }
.form-close:hover { color: #ffffff; }

/* ═══ RESPONSIVE del nav — evita que el logo y botones se desborden ═══ */
@media (max-width: 820px) {
  nav {
    height: auto;
    min-height: 56px;
    flex-wrap: wrap;
    gap: 8px 6px;
    padding: 8px 14px;
  }
  /* El subtítulo largo se oculta en pantallas chicas — queda solo el
     título, sin amontonarse con los controles del nav. */
  nav .brand-sub { display: none; }
  /* Los pills de estado (telemetría, Operativo, hora) se ocultan en
     pantallas chicas */
  nav .nav-right .pill { display: none; }
  .nav-right { flex-wrap: wrap; gap: 6px; }
}
@media (max-width: 560px) {
  /* En móvil: logo + nombre compactos, botones esenciales bajan a segunda línea */
  nav .brand { font-size: 16px; }
  nav .brand-logo { width: 30px; height: 30px; }
  nav .mode-btn { font-size: 11.5px; padding: 3px 9px; }
  nav .user-pill { font-size: 11.5px; padding: 3px 8px; }
  /* El nombre WOLI TRACE no se corta */
  nav .brand > div > div:first-child { white-space: nowrap; }
}

/* ═══ RESPONSIVE del sidebar — se colapsa solo a barra de íconos ═══ */
@media (max-width: 900px) {
  .sidebar { width: 68px; }
  .sidebar .sidebar-brand-text,
  .sidebar .sidebar-section-label,
  .sidebar .nav-item span { display: none; }
  .sidebar .nav-item { justify-content: center; padding: 11px; }
  .sidebar-header { padding: 20px 10px; justify-content: center; }
}

/* ═══ RESPONSIVE del footer — apila y centra en pantalla chica ═══ */
@media (max-width: 820px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 1.2rem;
    text-align: center;
    padding: 1.25rem 1rem;
  }
  .footer-brand {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
  }
  .footer-links {
    justify-content: center;
    gap: 14px;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
  }
}

/* ═══════════════════════════════════════════════════════════════
   Íconos de cannabis reutilizables (SVG inline como background).
   Uso: <i class="ic ic-hoja"></i> o <i class="ic ic-cogollo"></i>
   Escalan con font-size del contenedor. Color fijo verde de marca.
   ═══════════════════════════════════════════════════════════════ */
.ic {
  display: inline-block;
  width: 1.15em;
  height: 1.15em;
  vertical-align: -0.2em;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  flex-shrink: 0;
}

/* Hoja de cannabis (misma silueta que el logo) */
.ic-hoja {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg stroke='%23739800' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' fill='%23739800'%3E%3Cpath d='M24 42 V26'/%3E%3Cpath d='M24 26 C24 18 24 6 24 4 C22 8 20 14 20.5 20 C20 15 17 9 14 7 C15 12 15 18 18 22 C15 18 9 15 5 15 C9 19 13 23 19 24 C13 23 7 25 4 28 C10 28 17 27 22 25'/%3E%3Cpath d='M24 26 C24 18 24 6 24 4 C26 8 28 14 27.5 20 C28 15 31 9 34 7 C33 12 33 18 30 22 C33 18 39 15 43 15 C39 19 35 23 29 24 C35 23 41 25 44 28 C38 28 31 27 26 25'/%3E%3C/g%3E%3C/svg%3E");
}

/* Cogollo / bud de cannabis (silueta de cogollo con textura) */
.ic-cogollo {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg fill='%23739800'%3E%3Cpath d='M24 4 C21 8 22 11 24 13 C26 11 27 8 24 4 Z'/%3E%3Cpath d='M24 10 C19 12 17 16 19 20 C22 18 24 16 24 13 C24 16 26 18 29 20 C31 16 29 12 24 10 Z'/%3E%3Cpath d='M24 17 C17 19 14 24 17 29 C21 26 23 23 24 20 C25 23 27 26 31 29 C34 24 31 19 24 17 Z'/%3E%3Cpath d='M24 25 C16 27 12 33 16 39 C20 35 23 31 24 28 C25 31 28 35 32 39 C36 33 32 27 24 25 Z'/%3E%3C/g%3E%3Cpath d='M24 40 V44' stroke='%235c7a00' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* Variante clara para fondos oscuros (nav/footer) */
.ic-hoja-light {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg stroke='%23adcc60' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' fill='%23adcc60'%3E%3Cpath d='M24 42 V26'/%3E%3Cpath d='M24 26 C24 18 24 6 24 4 C22 8 20 14 20.5 20 C20 15 17 9 14 7 C15 12 15 18 18 22 C15 18 9 15 5 15 C9 19 13 23 19 24 C13 23 7 25 4 28 C10 28 17 27 22 25'/%3E%3Cpath d='M24 26 C24 18 24 6 24 4 C26 8 28 14 27.5 20 C28 15 31 9 34 7 C33 12 33 18 30 22 C33 18 39 15 43 15 C39 19 35 23 29 24 C35 23 41 25 44 28 C38 28 31 27 26 25'/%3E%3C/g%3E%3C/svg%3E");
}

/* ═══ Barra de pestañas — layout del mockup ═══
   Los botones usan su ancho natural (no se estiran); si no caben
   todos en una fila, el scroll queda contenido en la propia barra
   (.tabs-wrap ya tiene overflow-x:auto en base.css) y nunca se
   desborda hacia la página completa. */
.tb {
  flex: 0 0 auto;        /* tamaño natural, no se estiran */
  min-width: auto;
  padding: 8px 14px;
}
/* Hover que cubre exactamente el botón */
.tb:hover { background: var(--bg3); color: var(--t1); }

/* ═══ Grupo de botones de registro por pestaña (fila con wrap) ═══ */
.rbtn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}
.rbtn-group .rbtn { flex: 0 0 auto; }
@media (max-width: 700px) {
  .shdr { flex-direction: column; align-items: flex-start; gap: 8px; }
  .rbtn-group { justify-content: flex-start; }
}

/* ═══ Módulo de acciones "Registrar evento" — sección propia ═══ */
.action-bar {
  background: var(--bg2);
  border: 1px solid var(--bsub);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .2s, box-shadow .2s;
}
.action-bar-label {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--g);
}
.action-bar .rbtn-group {
  justify-content: flex-start;
}

/* ═══ Glow esmeralda en hover — extendido a contenedores de módulo que
   todavía no lo tenían (.mc/.panel/.ac/.seg-panel ya lo traían). Mismo
   tratamiento en los 4 temas: anillo rgba(16,185,129,.25) + sombra.
   Selector agrupado para no repetir el bloque en cada clase. ═══ */
.inv-selector:hover,
.action-bar:hover,
.seg-kpi:hover {
  border-color: var(--bacc);
  box-shadow: 0 6px 18px rgba(0,0,0,.3), 0 0 0 1px rgba(16,185,129,.25);
}

