* { box-sizing: border-box; }

:root{
  --header-offset: 160px;
  --gap-under-header: 30px;
  --sidebar-width: 56px; /* ✅ antes 64px: ahora NO empuja el contenido */
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #c2bcd3;
  color: #0A2342;
}

/* ---------------- HEADER ---------------- */
/* ✅ Sticky + layout left/right */
header.header-bar{
  position: sticky;
  top: 0;
  z-index: 1000;

  background: linear-gradient(90deg, #0A2342, #1C6DD0);
  color: white;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 3px solid #4DA9FF;
}

.header-left{
  display:flex;
  align-items:center;
  gap: 12px;
  min-width: 0;
}

header h1 { margin: 0; font-size: 1.4rem; }
header p { margin: 4px 0 0; opacity: 0.95; }
.header-text { display: flex; flex-direction: column; min-width: 0; }

.logo {
  height: 70px;
  margin-right: 12px;
  object-fit: contain;
}

/* ---------------- LOGIN PANEL ---------------- */
.login-panel {
  min-height: 75vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.login-panel h2 {
  margin-top: 0;
  margin-bottom: 16px;
  text-align: center;
  font-size: 1.6rem;
}

.login-card {
  background: #d7dde5;
  width: 350px;
  padding: 30px 25px;
  border-radius: 15px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  border-left: 6px solid #1C6DD0;

  opacity: 0;
  transform: translateY(20px);
  animation: loginFadeInUp 0.7s ease-out forwards;
}

.login_avatar {
  width: 26px;
  height: 26px;
  object-fit: contain;
  display:inline-block;
}

.login-title{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
}

/* ✅ LOGIN: alineación perfecta icono + input (arregla lo disparejo) */
.login-card .input-group{
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

/* icono PNG */
.login-card .input-icon-img{
  width:22px;
  height:22px;
  object-fit:contain;
  display:block;
  margin: 0 auto;
}

/* inputs idénticos SIEMPRE */
.login-card .input-group input{
  width: 100%;
  height: 46px;
  line-height: 46px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid #cfd8e3;
  font-size: 16px;
  outline:none;
  background: #eef5ff;
  color: #0A2342;
  margin-left: 0;
}

.login-card .input-group input::placeholder { color: #777; }

.login-card .input-group input:focus{
  border-color: #1C6DD0;
  box-shadow: 0 0 0 3px rgba(28,109,208,.15);
  background: #ffffff;
}

.login-card button { width: 100%; margin-top: 8px; }
.login-status { margin-top: 8px; font-size: 0.9rem; }

@keyframes loginFadeInUp {
  0% { opacity: 0; transform: translateY(20px) scale(0.98); }
  60% { opacity: 1; transform: translateY(-3px) scale(1.01); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------------- APP LAYOUT ---------------- */
.app-shell{
  position: relative;
  padding: 16px 18px 40px;
  padding-left: calc(var(--sidebar-width) + 28px);
}

/* ---------------- USER BADGE ---------------- */
/* ✅ Ya NO es fixed. Vive dentro del header. */
.user-badge{
  display: inline-flex;
  align-items: center;
  gap: 10px;

  background: rgba(255,255,255,0.18);
  border-radius: 12px;
  padding: 8px 10px;
  box-shadow: none;
  color: white;
  border-left: 0;
}

.user-avatar {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.user-badge #userInfo{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* =========================================================
   ✅ NUEVO SIDEBAR OVERLAY (MODERNO)
========================================================= */

/* Botón flotante */
.sb-toggle{
  position: fixed;
  top: 128px;           /* debajo del header */
  left: 0px;
  z-index: 1102;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(10px);
  cursor: pointer;
  font-size: 20px;
  font-weight: 900;
}

/* Overlay */
.sb-overlay{
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(3px);
}

/* Sidebar overlay */
.sidebar{
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 320px;
  z-index: 1101;

  background: rgba(10,35,66,0.92);
  color: #fff;
  border-right: 1px solid rgba(255,255,255,0.12);
  transform: translateX(-110%);
  transition: transform 220ms ease;

  display: flex;
  flex-direction: column;
  padding: 12px 12px 14px;
}

.sidebar.is-open{
  transform: translateX(0);
}

.sb-head{
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding: 10px 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.sb-brand{
  display:flex;
  align-items:center;
  gap: 10px;
}

.sb-logo{
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display:grid;
  place-items:center;
  background: rgba(77,169,255,0.18);
  border: 1px solid rgba(77,169,255,0.28);
  font-weight: 950;
}

.sb-name{ font-weight: 950; line-height: 1.05; }
.sb-sub{ opacity: .75; font-weight: 700; font-size: 12px; margin-top: 2px; }

.sb-close{
  background: transparent;
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  border-radius: 12px;
  width: 38px;
  height: 38px;
  cursor: pointer;
  font-weight: 900;
}

/* Menú items */
.sb-nav{
  padding: 12px 6px;
  display: grid;
  gap: 10px;
}

.sb-item{
  width: 100%;
  display:flex;
  align-items:center;
  gap: 12px;
  border-radius: 14px;
  padding: 12px 12px;
  border: 1px solid transparent;

  background: rgba(255,255,255,0.06);
  color: #fff;
  cursor: pointer;
  transition: 0.16s;
}

.sb-item:hover{
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.10);
  transform: translateX(2px);
}

/* Tu .nav-btn.active sigue funcionando */
.nav-btn.active{
  background: rgba(77,169,255,0.22);
  border-color: rgba(77,169,255,0.25);
  color: #fff;
  box-shadow: 0 10px 24px rgba(0,0,0,0.25);
}

.sb-ico{
  width: 26px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.sb-txt{
  font-weight: 900;
  letter-spacing: .2px;
}

.sb-foot{
  margin-top: auto;
  padding: 10px 10px 0;
  border-top: 1px solid rgba(255,255,255,0.12);
  opacity: .75;
  font-weight: 700;
}

/* Reutilizas iconos */
.nav-icon {
  width: 60px;
  height: 60px;
  object-fit: contain;
  display: block;
  pointer-events: none
}

.content { min-width: 0; }

/* ---------------- SELECTORES ---------------- */
.client-selector,
.store-selector {
  background: #dfe3eb;
  padding: 12px 16px;
  border-radius: 10px;
  border-left: 5px solid #1C6DD0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  margin-bottom: 12px;
}

.client-selector h2,
.store-selector h2 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

select, input[type="date"], input[type="text"] {
  padding: 8px 10px;
  border-radius: 8px;
  border: 2px solid rgba(28, 109, 208, 0.35);
  background: white;
  color: #0A2342;
  outline: none;
}

label {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

/* ---------------- BOTONES ---------------- */
button:not(.nav-btn) {
  padding: 10px 18px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 800;
  background: #1C6DD0;
  color: white;
  box-shadow: 0 4px 10px rgba(28, 109, 208, 0.4);
  transition: 0.2s;
}

button:not(.nav-btn):hover {
  background: #4DA9FF;
  transform: translateY(-2px);
}

.logout-btn {
  background: #c0392b !important;
  color: white;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s;
}

.logout-btn:hover {
  background: #e74c3c !important;
  transform: translateY(-2px);
}

/* 🔥 Reset solo imagen */
#resetStoreBtn.reset-btn {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  box-shadow: none !important;

  display: inline-block;
  cursor: pointer;
}

/* tamaño del PNG */
#resetStoreBtn.reset-btn img {
  height: 65px;      /* 🔥 mismo alto que “Actualizar ahora” */
  width: auto;
  display: block;
}

/* efecto hover sutil */
#resetStoreBtn.reset-btn:hover img {
  transform: scale(1.05);
  transition: 0.2s ease;
}

/* ---------------- TOOLBAR ---------------- */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

/* ---------------- VISTAS ---------------- */
.view { display: none; }
.view.active-view { display: block; }

.view h2 { margin: 0 0 8px; }
.view-desc { margin: 0 0 14px; opacity: 0.85; }

.tool-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

/* ---------------- SENSOR CARD ---------------- */
.sensor-legend{
  display:flex;
  gap:14px;
  align-items:center;
  margin: 6px 0 10px;
}

.legend-item{
  display:flex;
  align-items:center;
  gap:8px;
  font-weight: 700;
}

.dot{
  width:12px;height:12px;border-radius:999px;
  display:inline-block;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.dot-on{ background:#2ecc71; }
.dot-off{ background:#e74c3c; }

.sensor-card {
  background: #d7dde5;
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  border-left: 6px solid #1C6DD0;
}

.sensor-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}

.sensor-id { font-weight: 900; font-size: 1.1rem; }
.sensor-type { font-size: 0.85rem; color: #555; }

.sensor-right-mini{
  display:flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.status-pill{
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 0.9rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}
.status-on{ background: rgba(46, 204, 113, 0.2); color: #1b7a3a; }
.status-off{ background: rgba(231, 76, 60, 0.2); color: #8f2b22; }

/* ✅ Compatibilidad con app.js actual (info-grid / info-box) */
.info-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.info-box{
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 12px;
  padding: 12px 12px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);
  min-height: 86px;
}

.info-title{
  font-weight: 900;
  font-size: 0.9rem;
  color:#0A2342;
}

.info-value{
  font-size: 1.6rem;
  font-weight: 900;
  margin-top: 6px;
  color:#1C6DD0;
}

.info-sub{
  font-size: 0.78rem;
  opacity: 0.8;
  margin-top: 2px;
}

@media (max-width: 980px){
  .info-grid{ grid-template-columns: 1fr; }
}

/* ---------------- DONUT + INFO FIJA ---------------- */
.donut-section{
  background: #dfe3eb;
  padding: 12px 16px;
  border-radius: 10px;
  border-left: 5px solid #1C6DD0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  margin-bottom: 12px;
}

.donut-head{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.donut-row{
  display:flex;
  gap: 14px;
  align-items: stretch;
  flex-wrap: wrap;
}

.donut-wrap{
  flex: 1 1 520px;
  min-height: 320px;
  background: rgba(255,255,255,0.35);
  border-radius: 12px;
  padding: 10px;
}

.donut-pinned{
  flex: 0 0 340px;
  align-self: flex-start;
  background: rgba(0,0,0,0.85);
  color: #fff;
  border-radius: 10px;
  padding: 12px 12px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.12);
}

.donut-pinned-title{
  font-weight: 900;
  margin-bottom: 10px;
}

.donut-pinned-row{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 6px 0;
}

.donut-pinned-swatch{
  width: 14px;
  height: 14px;
  border-radius: 3px;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.12);
  flex: 0 0 14px;
}

.donut-pinned-label{
  flex: 1 1 auto;
  opacity: 0.95;
}

.donut-pinned-value{
  font-weight: 900;
  min-width: 38px;
  text-align: right;
}

.donut-pinned-sub{
  margin-top: 10px;
  font-size: 0.82rem;
  opacity: 0.8;
}

@media (max-width: 980px){
  .donut-pinned{ flex: 1 1 320px; }
}

/* ---------------- DATE FIELD (inputs + Hoy/Limpiar) ---------------- */
.date-field{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  flex-wrap: wrap;
}

.date-input-wrap{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(0,0,0,0.10);
}

.date-icon{ opacity: 0.85; }

.date-input{
  border: none !important;
  outline: none !important;
  padding: 6px 0 !important;
  background: transparent !important;
  min-width: 150px;
}

.date-today-btn, .date-clear-btn{
  padding: 8px 12px !important;
}

/* ---------------- FOOTER ---------------- */
footer {
  text-align: center;
  padding: 12px 0 16px;
  font-size: 0.85rem;
  color: #0A2342;
  opacity: 0.8;
}

/* ---------------- MODAL ---------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modal-box {
  background: #d7dde5;
  padding: 24px 28px;
  border-radius: 14px;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.25);
  max-width: 420px;
  width: 90%;
  text-align: center;
  border-left: 6px solid #1C6DD0;
}

/* ---------------- RESPONSIVE ---------------- */
@media (max-width: 980px){
  .info-grid{ grid-template-columns: 1fr; }
}

@media (max-width: 420px){
  header.header-bar { padding: 14px 14px; }
  .logo { height: 54px; }
  header h1 { font-size: 1.05rem; }
  .login-card { width: 92%; }

  .user-badge #userInfo{ max-width: 180px; }
}

/* CONTENEDOR DEL GRÁFICO */
.chart-wrap{
  background: rgba(255,255,255,0.35);
  padding: 20px 18px 18px;
  border-radius: 12px;
  margin-top: 24px;
  height: 360px;
  overflow: hidden;
}

/* CANVAS */
#chartCanvas{
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.kpi_row{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
  align-items:stretch;
  margin-top: 10px;
}

.kpi-card{
  flex: 1 1 180px;
  max-width: 260px;
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 6px 16px;
}

/* ✅ Ajuste: como header es sticky, esta variable no es tan necesaria,
   pero la dejamos por compatibilidad. */
@media (max-width: 900px){
  :root{ --header-offset: 130px; }
}

/* ============================
   VISTA: TODOS LOS SENSORES
============================ */
.status-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

@media (max-width: 980px){
  .status-grid{ grid-template-columns: 1fr; }
}

.status-card{
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 12px;
  padding: 12px 12px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.status-left{
  min-width: 0;
}

.status-store{
  font-weight: 950;
  color: #0A2342;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-id{
  font-size: 12px;
  opacity: .75;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-pill-mini{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 900;
  font-size: 12px;
  white-space: nowrap;
}

.status-pill-mini.on{
  background: rgba(46, 204, 113, 0.18);
  color: #1b7a3a;
}

.status-pill-mini.off{
  background: rgba(231, 76, 60, 0.18);
  color: #8f2b22;
}

.status-dot-mini{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.status-dot-mini.on{ background:#2ecc71; }
.status-dot-mini.off{ background:#e74c3c; }

/* Ocultar selectores en menú Terminal*/

.view.hide-top-selectors #clientSelectorSection,
.view.hide-top-selectors #storeSelectorSection{
    display: none !important;
}

/* =========================================================
   ✅ SELECTORES MODERNOS (cliente / tienda) + PREMIUM GLASS
   - Fondo blanco + letras negras
   - Apple-like blur + glass
   - Sin reglas duplicadas
========================================================= */

/* ---------------------------
   Contenedores de secciones
---------------------------- */
.client-selector,
.store-selector{
  background: rgba(255,255,255,0.70);
  border: 1px solid rgba(10,35,66,0.10);
  border-left: 6px solid rgba(28,109,208,0.85);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 14px 34px rgba(10,35,66,0.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Títulos */
.client-selector h2,
.store-selector h2{
  margin: 0 0 10px;
  font-size: 1.05rem;
  font-weight: 950;
  letter-spacing: .2px;
  color: #0A2342;
}

/* Label fila */
.client-selector label,
.store-selector label{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-weight: 900;
  color: rgba(10,35,66,0.88);
}

/* Si aún queda algún select nativo visible por error */
.client-selector select,
.store-selector select{
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(10,35,66,0.15);
  background: rgba(255,255,255,0.90);
  color: #0A2342;
  font-weight: 800;
  min-width: 220px;
  box-shadow: 0 10px 22px rgba(10,35,66,0.10);
}

/* Responsive */
@media (max-width: 680px){
  .client-selector select,
  .store-selector select{
    width: 100%;
    min-width: 0;
  }
}

/* ---------------------------
   Ocultar select nativo seguro
---------------------------- */
.native-select-hidden{
  position: absolute !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* =========================================================
   ✅ CUSTOM SELECT (APPLE-LIKE, fondo blanco, texto negro)
========================================================= */

.custom-select{
  position: relative;
  width: 100%;
  max-width: 520px;
  z-index: 1;
}

/* Cuando abre: sube por encima de todo */
.custom-select.is-open{ z-index: 999999; }

/* Botón principal */
.custom-select-display{
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;

  border-radius: 14px;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;

  /* ✅ Fondo blanco + glass */
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(10,35,66,0.14);
  box-shadow:
    0 12px 30px rgba(10,35,66,0.10),
    inset 0 1px 0 rgba(255,255,255,0.60);

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.custom-select-display:hover{
  transform: translateY(-1px);
  border-color: rgba(28,109,208,0.28);
  box-shadow:
    0 16px 36px rgba(10,35,66,0.14),
    inset 0 1px 0 rgba(255,255,255,0.62);
}

/* Icono */
.custom-select-icon{
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex: 0 0 auto;
  opacity: .92;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.12));
}

/* Texto */
.custom-select-text{
  flex: 1 1 auto;
  text-align: left;
  font-weight: 850;
  color: #0A2342; /* ✅ negro/azul oscuro */
}

/* Flechita */
.custom-select-arrow{
  flex: 0 0 auto;
  opacity: .70;
  color: rgba(10,35,66,.72);
  transition: transform .18s ease, opacity .18s ease;
}

/* Flecha gira cuando abre */
.custom-select.is-open .custom-select-arrow{
  transform: rotate(180deg);
  opacity: 1;
}

/* =========================================================
   ✅ Dropdown: soporta 2 modos
   1) .custom-select-options (absoluto dentro del wrapper)
   2) .custom-select-portal  (FIXED en body)
========================================================= */

/* Base dropdown (look) */
.custom-select-options,
.custom-select-portal{
  background: rgba(255,255,255,0.86); /* ✅ fondo blanco glass */
  border: 1px solid rgba(10,35,66,0.14);
  border-radius: 14px;
  box-shadow: 0 22px 60px rgba(10,35,66,0.18);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  max-height: 280px;
  overflow-y: auto;

  /* animación */
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;

  z-index: 2147483647;
}

/* Modo normal (si lo usas) */
.custom-select-options{
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
}

/* Modo portal (el que tú estás usando ahora) */
.custom-select-portal{
  position: fixed;  /* JS lo posiciona con left/top/width */
}

/* Cuando abre (para portal: JS agrega .is-open, para normal: wrapper .is-open) */
.custom-select.is-open .custom-select-options{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.custom-select-portal.is-open{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Opciones */
.custom-select-option{
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 12px 14px;
  cursor: pointer;

  font-weight: 800;
  color: #0A2342; /* ✅ letras negras */
}

/* Separadores suaves */
.custom-select-option + .custom-select-option{
  border-top: 1px solid rgba(10,35,66,0.08);
}

/* Hover con contraste */
.custom-select-option:hover{
  background: rgba(28,109,208,0.12);
}

/* Opción “activa” si luego decides marcarla en JS (opcional) */
.custom-select-option.is-active{
  background: rgba(28,109,208,0.18);
}

/* Mobile: full width */
@media (max-width: 680px){
  .custom-select{ max-width: 100%; }
}

/* =========================================================
   🔧 FIX FINAL: FORZAR blanco + texto oscuro (CUSTOM SELECT)
   👉 Pegar AL FINAL del CSS
========================================================= */

/* Botón */
.custom-select .custom-select-display{
  background: rgba(255,255,255,0.85) !important;
  color: #0A2342 !important;
  border: 1px solid rgba(10,35,66,0.18) !important;
}

/* Texto dentro del botón */
.custom-select .custom-select-text{
  color: #0A2342 !important;
  font-weight: 900 !important;
}

/* Flecha */
.custom-select .custom-select-arrow{
  color: rgba(10,35,66,0.80) !important;
}

/* Dropdown (portal o normal) */
.custom-select-portal,
.custom-select-options{
  background: rgba(255,255,255,0.92) !important;
  border: 1px solid rgba(10,35,66,0.18) !important;
}

/* Opciones */
.custom-select-option{
  color: #0A2342 !important;
  font-weight: 800 !important;
}

/* Hover con contraste (sin azul sólido) */
.custom-select-option:hover{
  background: rgba(28,109,208,0.12) !important;
  color: #0A2342 !important;
}

/* =========================
   TERMINAL: botón + "Ver:" + select en la misma línea
========================= */
#view-status-all .toolbar{
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* El label no debe ocupar toda la fila */
#view-status-all .toolbar > label{
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  flex: 0 0 auto;
}

/* El select del terminal: ancho controlado (no 100%) */
#view-status-all .toolbar #statusFilter{
  width: auto;
  min-width: 160px;
}

/* Si usas custom select también en terminal */
#view-status-all .toolbar .custom-select{
  width: auto !important;
  max-width: 220px !important;
  flex: 0 0 auto;
}

#view-status-all #statusFilter{
  background: rgba(255,255,255,0.85);
  color: #0A2342;
  font-weight: 900;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.12);
  padding: 10px 36px 10px 12px;
}