/* ============================================================
   GUARDIAN MONITOR — LAYOUT.CSS
   Responsabilidade:
   - desenho estrutural desktop
   - colunas
   - divisões
   - proporções
   - superfícies
   ============================================================ */


/* ============================================================
   BLOCO 01 — MENU LATERAL
   ============================================================ */

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;

  width: var(--sidebar-width);
  height: 100vh;

  display: grid;
  grid-template-rows: 80px 1fr 135px;

  background:
    linear-gradient(
      180deg,
      rgba(7, 21, 33, 0.98) 0%,
      rgba(6, 20, 31, 0.98) 100%
    );

  border-right: 1px solid var(--border-soft);

  box-shadow:
    10px 0 28px rgba(0, 0, 0, 0.11);
}


.sidebar-top,
.sidebar-nav,
.sidebar-bottom {
  width: 100%;
}


.sidebar-top {
  border-bottom:
    1px solid rgba(117, 157, 188, 0.08);
}


.sidebar-bottom {
  border-top:
    1px solid rgba(117, 157, 188, 0.13);

  position: relative;
}

.sidebar-bottom::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 0;
  right: 0;
  border-top: 1px solid rgba(117, 157, 188, 0.13);
}

.sidebar-bottom {
  border-top: none;
}

/* ============================================================
   SIDEBAR — USUÁRIO CONECTADO
   ============================================================ */

.guardian-usuario-painel {
  height: 100%;
  padding: 23px 14px 16px;
  box-sizing: border-box;

  display: flex;
  flex-direction: column;
  gap: 12px;
}

.guardian-usuario-titulo {
  color: #8fa9bc;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
}

.guardian-usuario-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.guardian-usuario-icone {
  width: 36px;
  height: 36px;

  display: flex;
  align-items: center;
  justify-content: center;

  flex-shrink: 0;

  background: #174a7e;
  border-radius: 50%;
  font-size: 18px;
}

.guardian-usuario-dados {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

#guardian-usuario-nome {
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
}

.guardian-usuario-status {
  color: #4ade80;
  font-size: 10px;
}

.guardian-usuario-sair {
  width: 100%;
  height: 34px;

  margin-top: auto;

  background: #17344a;
  border: 1px solid #34546b;
  border-radius: 6px;

  color: #d7e3ec;
  font-size: 12px;
  font-weight: 600;

  cursor: pointer;
}

.guardian-usuario-sair:hover {
  background: #174a7e;
  color: #ffffff;
}



/* ============================================================
   BLOCO 01.1 — MARCA DO PAINEL
   Logo + PAINEL NEXOINDOOR
   ============================================================ */

.brand-panel {
  width: 100%;
  height: 88px;

  display: flex;
  align-items: center;

  gap: 9px;

  padding-left: 14px;
  padding-right: 8px;
}


/* LOGO NEXO */

.brand-logo {
  width: 72px;
  height: 72px;

  object-fit: contain;

  flex-shrink: 0;
}


/* BLOCO DOS TEXTOS */

.brand-text {
  display: flex;
  flex-direction: column;

  justify-content: center;
  align-items: flex-start;

  line-height: 1;

  white-space: nowrap;
}


/* PAINEL */

.brand-title {
  color: #ffffff;

  font-size: 18px;
  font-weight: 700;

  letter-spacing: 0.2px;
}


/* NEXOINDOOR */

.brand-name {
  color: #ff7a00;

  font-size: 14px;
  font-weight: 700;

  margin-top: 5px;

  letter-spacing: 0.1px;
}



/* ============================================================
   BLOCO 01.2 — NAVEGAÇÃO LATERAL
   ============================================================ */

.sidebar-nav {
  width: 100%;

  padding: 10px 12px 0px;

  display: flex;
  flex-direction: column;

  gap: 8px;
}


/* BOTÃO LATERAL */

.sidebar-button {
  width: 100%;
  height: 44px;

  display: flex;
  align-items: center;

  gap: 11px;

  padding: 0 13px;

  border: 0;
  border-radius: 7px;

  background: transparent;

  color: #d7e0e7;

  font-size: 14px;
  font-weight: 500;

  cursor: pointer;

  text-align: left;
}


/* BOTÃO SELECIONADO */

.sidebar-button-active {
  color: #ffffff;

  background:
    linear-gradient(
      90deg,
      #174a7e,
      #153f6b
    );

  box-shadow:
    inset 0 0 0 1px rgba(73, 139, 213, 0.18);
}


/* ÍCONE DO MAPA */

.sidebar-map-icon {
  width: 18px;
  height: 18px;

  display: flex;
  align-items: center;
  justify-content: center;

  color: #ffffff;

  flex-shrink: 0;
}


.sidebar-map-icon svg {
  width: 18px;
  height: 18px;

  display: block;
}


/* TEXTO DO BOTÃO */

.sidebar-button-text {
  white-space: nowrap;
}


/* BOTÕES DINÂMICOS DAS REGIÕES */

#region-buttons {
  width: 100%;

  display: flex;
  flex-direction: column;

  gap: 2px;

  min-height: 0;
  overflow: hidden;
}

/* ROLAGEM INDEPENDENTE — ESTADOS, REGIÕES E LOCALIDADES */

.sidebar-nav {
  min-height: 0;
    overflow: visible;
}

.sidebar-location-buttons {
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(117, 157, 188, 0.35) transparent;
}

#sidebar-estados {
  height: 60px;
}

#sidebar-regioes {
  height: 240px;
}

#sidebar-localidades {
  height: 70px;
}



/* ============================================================
   BLOCO 02 — ÁREA PRINCIPAL
   ============================================================ */

.main-area {
  width: calc(100% - var(--sidebar-width));
  min-height: 100vh;

  margin-left: var(--sidebar-width);

  display: grid;

  grid-template-rows:
    var(--topbar-height)
    1fr
    var(--footer-height);
}



/* ============================================================
   BLOCO 02.1 — TOPO COMPACTO
   ============================================================ */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0 18px 0 26px;
}


/* TÍTULO */

.topbar-title {
  color: #ffffff;

  font-size: 16px;
  font-weight: 700;

  white-space: nowrap;
}


/* ÁREA DIREITA */

.topbar-status {
  display: flex;
  align-items: center;

  gap: 10px;
}


/* ÚLTIMA ATUALIZAÇÃO */

.last-update {
  color: #d2d8dd;

  font-size: 11px;
  font-weight: 400;

  white-space: nowrap;
}


.last-update strong {
  color: #ffffff;

  font-weight: 500;
}


/* STATUS ONLINE */

.online-status {
  height: 30px;

  display: flex;
  align-items: center;

  gap: 7px;

  padding: 0 11px;

  color: #ffffff;

  font-size: 11px;
  font-weight: 500;

  white-space: nowrap;

  background:
    rgba(25, 48, 65, 0.85);

  border:
    1px solid rgba(117, 157, 188, 0.08);

  border-radius: 6px;
}


/* ============================================================
   STATUS GUARDIAN — INDICADOR ONLINE ANIMADO
   ============================================================ */

.online-dot {
  width: 7px;
  height: 7px;

  flex-shrink: 0;

  background: #20c65a;
  border-radius: 50%;

  box-shadow:
    0 0 6px rgba(32, 198, 90, 0.65);

  animation: guardian-online-pulse 1.8s ease-in-out infinite;
}


/* PULSO SUAVE DO GUARDIAN ONLINE */

@keyframes guardian-online-pulse {

  0%,
  100% {
    opacity: 1;

    box-shadow:
      0 0 4px rgba(32, 198, 90, 0.45);
  }

  50% {
    opacity: 0.30;

    box-shadow:
      0 0 10px rgba(32, 198, 90, 0.95);
  }
}


/* ============================================================
   BLOCO 02.2 — CONTEÚDO PRINCIPAL
   Mesmas colunas do mapa:
   esquerda = mapa + chips
   direita  = painéis laterais
   ============================================================ */

.page-content {
  min-width: 0;
  min-height: 0;

  display: grid;

  /* Mesma proporção usada pelo mapa + coluna direita */
  grid-template-columns:
    minmax(0, 3.12fr)
    minmax(292px, 1fr);

  grid-template-rows:
    78px
    minmax(0, 1fr);

  column-gap: 14px;
  row-gap: 10px;

  padding:
    var(--page-padding-y)
    var(--page-padding-x)
    8px;
}



/* ============================================================
   BLOCO 03 — 4 CHIPS
   Os quatro juntos ocupam exatamente a largura do mapa
   ============================================================ */

.summary-grid {
  min-width: 0;

  /* Ocupa somente a coluna do mapa */
  grid-column: 1;
  grid-row: 1;

  display: grid;

  /* Quatro chips de mesma largura */
  grid-template-columns:
    repeat(4, minmax(0, 1fr));

  gap: 10px;
}

/* ============================================================
   BLOCO 03 — CARD INDIVIDUAL
   Fundo e estrutura visual de cada um dos 4 chips
   ============================================================ */

.summary-card {
  min-width: 0;
  min-height: 78px;

  display: flex;
  align-items: center;

  padding: 8px 14px;
  gap: 12px;

  background:
    linear-gradient(
      135deg,
      rgba(24, 48, 66, 0.96),
      rgba(19, 40, 56, 0.96)
    );

  border:
    1px solid rgba(117, 157, 188, 0.08);

  border-radius: 9px;

  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.14);

  overflow: hidden;
}

/* ============================================================
   BLOCO 03.1 — CONTEÚDO DOS CHIPS
   ============================================================ */

.summary-icon {
  width: 48px;
  height: 48px;

  flex-shrink: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;

  color: #ffffff;

  font-size: 23px;
  font-weight: 700;
}


/* CORES DOS ÍCONES */

.icon-total {
  background: #238df2;
}


.icon-online {
  background: #20ad4b;
}


.icon-offline {
  background: #ef3434;
}


.icon-alert {
  color: #ffb52e;

  background:
    rgba(255, 181, 46, 0.17);

  border-radius: 9px;
}



/* BLOCO DE INFORMAÇÕES */

.summary-info {
  min-width: 0;

  display: flex;
  flex-direction: column;

  justify-content: center;

  line-height: 1;
}


/* TÍTULOS */

.summary-title {
  color: #ffffff;

  font-size: 11px;
  font-weight: 400;

  margin-bottom: 4px;
}


.title-online {
  color: #68e487;
}


.title-offline {
  color: #fb5353;
}


.title-alert {
  color: #ffc44d;
}


/* NÚMEROS */

.summary-number {
  color: #ffffff;

  font-size: 21px;
  font-weight: 600;

  line-height: 1;

  margin-bottom: 5px;
}


/* TEXTO INFERIOR */

.summary-description {
  color: #aeb9c2;

  font-size: 9px;
  font-weight: 400;

  white-space: nowrap;
}



/* ============================================================
   BLOCO 03.2 — ÍCONE DE MONITOR
   ============================================================ */

.monitor-icon {
  position: relative;

  width: 23px;
  height: 16px;

  border: 2px solid #ffffff;
  border-radius: 2px;
}


/* PÉ DO MONITOR */

.monitor-icon::before {
  content: "";

  position: absolute;

  left: 50%;
  bottom: -6px;

  width: 2px;
  height: 5px;

  background: #ffffff;

  transform:
    translateX(-50%);
}


/* BASE DO MONITOR */

.monitor-icon::after {
  content: "";

  position: absolute;

  left: 50%;
  bottom: -7px;

  width: 11px;
  height: 2px;

  background: #ffffff;

  border-radius: 2px;

  transform:
    translateX(-50%);
}



/* ============================================================
   BLOCO 04 — CORPO PRINCIPAL
   ============================================================ */

.dashboard-grid {
  min-width: 0;
  min-height: 0;

  grid-column: 1 / -1;
  grid-row: 2;

  display: grid;

  grid-template-columns:
    minmax(0, 3.12fr)
    minmax(292px, 1fr);

  gap: 14px;
}


/* ============================================================
   BLOCO 04.1 — ÁREA CENTRAL / FUTURO MAPA
   ============================================================ */

.map-panel {

  position: relative;
  min-width: 0;
  min-height: 0;

  overflow: hidden;

  background:
    linear-gradient(
      145deg,
      rgba(15, 36, 51, 0.98),
      rgba(11, 29, 42, 0.98)
    );

  border:
    1px solid var(--border-medium);

  border-radius:
    var(--radius-lg);

  box-shadow:
    var(--shadow-soft);
}

/* ============================================================
   MAPA — NOME DO FILTRO SELECIONADO
   ============================================================ */

#guardian-map-filter-name {
  position: absolute;

  top: 14px;
  left: 55px;

  z-index: 500;

  color: #1f2937;

  font-size: 18px;
  font-weight: 700;

  line-height: 1;

  pointer-events: none;
}

/* ============================================================
   LEGENDA DO MAPA — DESKTOP
   ============================================================ */

.guardian-map-legenda {
  position: absolute;
  bottom: 10px;
  left: 10px;
  z-index: 500;

  display: flex;
  flex-direction: column;
  gap: 0px;

  padding: 4px 6px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);

  color: #1f2937;
  font-size: 11px;
  pointer-events: none;
}

.guardian-map-legenda-titulo {
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 2px;
}

.guardian-map-legenda-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.guardian-map-legenda-online,
.guardian-map-legenda-offline {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.guardian-map-legenda-online {
  background: #22c55e;
}

.guardian-map-legenda-offline {
  background: #ef4444;
}

/* ============================================================
   BLOCO 04.2 — COLUNA DIREITA
   ============================================================ */

.right-column {
  min-width: 0;
  min-height: 520px;

  display: grid;

  grid-template-rows:
    1fr
    1fr;

  gap: 16px;
}


.right-panel {
  min-width: 0;
  min-height: 0;

  background:
    linear-gradient(
      180deg,
      rgba(9, 27, 40, 0.98),
      rgba(8, 24, 36, 0.98)
    );

  border:
    1px solid var(--border-medium);

  border-radius:
    var(--radius-lg);

  box-shadow:
    var(--shadow-soft);
}

/* ============================================================
   AJUSTE Y — CHIP DO MEIO DA COLUNA DIREITA
   Move visualmente sem alterar tamanho nem os outros chips
   ============================================================ */

.right-panel-top {
  transform: translateY(12px);
}

/* ============================================================
   AJUSTE Y — TERCEIRO CHIP DA COLUNA DIREITA
   Só move o último chip para baixo
   ============================================================ */

.right-column {
  min-width: 0;
  min-height: 0;

  display: grid;

  grid-template-rows:
    1fr
    220px;

  gap: 16px;
}

/* ============================================================
   BLOCO 05 — RODAPÉ
   ============================================================ */

.footer {
  width: 100%;

  background:
    linear-gradient(
      90deg,
      rgba(7, 21, 33, 0.74),
      rgba(8, 25, 37, 0.88)
    );

  border-top:
    1px solid rgba(117, 157, 188, 0.08);
}


/* ============================================================
   BLOCO 03.3 — PAINEL SUPERIOR DIREITO
   Preenche somente o espaço acima da coluna direita
   Mantém o mesmo desenho dos painéis inferiores
   ============================================================ */

.right-top-chip {
  grid-column: 2;
  grid-row: 1;

  width: 100%;
  height: 95px;
}


/* ============================================================
   BLOCO 03.3.1 — CABEÇALHO HISTÓRICO GUARDIAN
   ============================================================ */

.guardian-history-header {
  width: 100%;
  height: 34px;

  display: flex;
  align-items: center;

  padding: 0 12px;

  color: #ffffff;

  font-size: 10px;
  font-weight: 700;

  text-transform: uppercase;

  cursor: pointer;

  user-select: none;
}


/* ============================================================
   BLOCO 03.3.2 — CHIP INTERNO DO HISTÓRICO
   Área pequena onde futuramente os dados vão rodar
   ============================================================ */

.guardian-history-feed {
  height: 54px;

  margin: 0 8px 6px 8px;

  background:
    linear-gradient(
      135deg,
      rgba(24, 48, 66, 0.96),
      rgba(18, 39, 55, 0.96)
    );

  border:
    1px solid rgba(117, 157, 188, 0.14);

  border-radius: 6px;

  overflow: hidden;
}

/* ============================================================
   MINI TERMINAL — HISTÓRICO GUARDIAN
   As linhas entram embaixo e sobem automaticamente
   ============================================================ */

#guardian-live-feed {
  width: 100%;
  height: 100%;

 padding: 8px 10px 2px;

  overflow: hidden;

  display: flex;
  flex-direction: column;

  justify-content: flex-end;

  color: #dce8f0;

  font-size: 10px;
  line-height: 16px;
}


/* CADA LINHA RECEBIDA */

.guardian-live-line {
  flex-shrink: 0;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  animation: guardian-line-enter 0.25s ease-out;
}


/* ENTRADA SUAVE DA NOVA LINHA */

@keyframes guardian-line-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
   HISTÓRICO GUARDIAN — PAINEL EXPANSÍVEL

   FECHADO:
   - continua exatamente onde já está.

   ABERTO:
   - sai visualmente do grid;
   - mantém exatamente X, Y e largura atuais;
   - cresce somente para baixo;
   - não empurra mapa nem outros chips.
   ============================================================ */

.right-top-chip {
  position: relative;

  z-index: 5;

  transition:
    height 0.30s ease,
    box-shadow 0.30s ease;
}


/* ============================================================
   ESTADO ABERTO
   As coordenadas são fornecidas pelo guardian.js
   ============================================================ */

.right-top-chip.guardian-history-open {
  position: fixed;

  top: var(--guardian-history-top);
  left: var(--guardian-history-left);

  width: var(--guardian-history-width);

  height:
    calc(
      100vh
      - var(--guardian-history-top)
      - 12px
    );

  z-index: 1000;

  box-shadow:
    0 18px 45px rgba(0, 0, 0, 0.48);
}


/* ============================================================
   CHIP INTERNO — ABERTO
   ============================================================ */

.right-top-chip.guardian-history-open
.guardian-history-feed {
  height:
    calc(100% - 42px);

  margin:
    0 8px 8px 8px;

  overflow: hidden;
}


/* ============================================================
   TERMINAL — ABERTO
   ============================================================ */

.right-top-chip.guardian-history-open
#guardian-live-feed {
  height: 100%;

  padding: 12px;

  overflow-y: auto;

  justify-content: flex-start;

  font-size: 11px;
  line-height: 18px;
}


/* SCROLL DISCRETO */

.right-top-chip.guardian-history-open
#guardian-live-feed::-webkit-scrollbar {
  width: 5px;
}


.right-top-chip.guardian-history-open
#guardian-live-feed::-webkit-scrollbar-thumb {
  background:
    rgba(117, 157, 188, 0.35);

  border-radius: 10px;
}

/* ============================================================
   STATUS DO GUARDIAN
   ============================================================ */
   .online-dot.guardian-dot-offline {
  background: #e53935;
}

/* ============================================================
   SIDEBAR — TÍTULOS DOS GRUPOS DE LOCALIZAÇÃO
   ============================================================ */

.sidebar-location-title {
  display: flex;
  align-items: center;
  gap: 8px;

  margin-top: 0px;
  margin-bottom: 2px;

  color: #8fa9bc;

  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
}

.sidebar-location-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(143, 169, 188, 0.22);
}

/* ============================================================
   SIDEBAR — BOTÕES DINÂMICOS DE LOCALIZAÇÃO
   ============================================================ */

.sidebar-location-button {
  display: flex;
  align-items: center;

  width: 100%;
  min-height: 28px;

  margin: 2px 0;
  padding: 4px 10px;

  border: 0;
  border-left: 3px solid transparent;
  border-radius: 5px;

  background: transparent;

  color: #d7e3ec;

  font-size: 12px;
  font-weight: 500;
  text-align: left;

  cursor: pointer;

  transition:
    background 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease,
    padding-left 0.18s ease;
}


/* Pequeno marcador antes do nome */

.sidebar-location-button::before {
  content: "›";

  margin-right: 9px;

  color: #4fa3e3;

  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}


/* Mouse sobre a opção */

.sidebar-location-button:hover {
  padding-left: 14px;

  background: rgba(63, 111, 175, 0.18);

  border-left-color: #4fa3e3;

  color: #ffffff;
}

/* ============================================================
   PAINEL NEXO — ÁREA INTERNA
   ============================================================ */

.right-panel-top .painel-nexo-feed {
  height: calc(100% - 42px);
  margin: 0 8px 0px 8px;
}

/* ============================================================
   PAINEL DE ALERTAS — FUNDO INTERNO
   ============================================================ */

.right-panel-bottom .painel-nexo-feed {
  height: calc(100% - 42px);
  margin: 0 8px 8px 8px;
}

/* PAINEL DE ALERTAS — AVISO DE RETENÇÃO */

.guardian-alertas-retencao {
  position: sticky;
  top: 0;
  z-index: 2;
  margin: 8px;
  padding: 2px 12px;
  border: 1px solid rgba(117, 157, 188, 0.25);
  border-radius: 6px;
  background: #20394c;
  color: #a9bacb;
  font-size: 11px;
  line-height: 1.6;
}

.guardian-alertas-retencao div:first-child {
  color: #d5e5f3;
  font-weight: 600;
  margin-bottom: 3px;
}

/* ============================================================
   PAINEL DE ALERTAS — MENSAGENS
   ============================================================ */

.guardian-alerta-mensagem {
  background: #193449;
  border: 1px solid #31536b;
  border-radius: 8px;
  padding: 12px;
  margin-top: 10px;
}

.guardian-alerta-data {
  color: #a9d8ff;
  font-size: 12px;
  font-weight: 600;
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-bottom: 1px solid #31536b;
}

.guardian-alerta-texto {
  color: #eaf4ff;
  font-size: 12px;
  line-height: 1;
  overflow-wrap: anywhere;
}

/* PAINEL DE ALERTAS — EXPANSÃO PARA CIMA */

.right-panel-bottom.guardian-history-open {
  position: fixed;

  top: auto;
  bottom: 12px;
  left: var(--guardian-history-left);

  width: var(--guardian-history-width);
  height: calc(100vh - 66px);

    z-index: 1000;

  box-shadow:
    0 18px 45px rgba(0, 0, 0, 0.48);
}

/* SCROLL INTERNO — PAINEL DE ALERTAS */

.right-panel-bottom .painel-nexo-feed {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.right-panel-bottom .guardian-alertas-retencao {
  position: static;
  flex-shrink: 0;
}

.right-panel-bottom .guardian-alertas-lista {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 4px 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(117, 157, 188, 0.35) transparent;
}

/* ============================================================
   PAINEL NEXO — REGRAS
   ============================================================ */

.painel-nexo-regra {
  margin: 10px;
  padding: 0;

  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 6px 4px;
}

.painel-nexo-regra-titulo {
  margin-bottom: 10px;
  grid-column: 1 / -1;

  color: #ff8601;

  font-size: 11px;
  font-weight: 700;
}


.painel-nexo-opcao {
  min-height: 18px;
  transform: translateY(-8px);

  display: flex;
  align-items: center;
  justify-content: space-between;

  margin-top: 0;
  padding: 0 4px;

  background:
    rgba(63, 111, 175, 0.14);

  border:
    1px solid rgba(117, 157, 188, 0.10);

  border-radius: 6px;

  color: #d7e3ec;

  font-size: 10px;
  font-weight: 500;
}


/* ============================================================
   PAINEL NEXO — CHAVE ON/OFF
   ============================================================ */

.painel-nexo-switch {
  position: relative;

  width: 30px;
  height: 11px;

  flex-shrink: 0;
}


.painel-nexo-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}


.painel-nexo-slider {
  position: absolute;

  inset: 0;

  cursor: pointer;

  background:
    rgba(117, 157, 188, 0.20);

  border:
    1px solid rgba(117, 157, 188, 0.28);

  border-radius: 18px;

  transition: 0.20s ease;
}


.painel-nexo-slider::before {
  content: "";

  position: absolute;

  width: 9px;
  height: 9px;

  left: 0px;
  top: 0px;

  background: #d7e3ec;

  border-radius: 50%;

  transition: 0.20s ease;
}


.painel-nexo-switch
input:checked +
.painel-nexo-slider {
  background: #174a7e;

  border-color: #4fa3e3;
}


.painel-nexo-switch
input:checked +
.painel-nexo-slider::before {
  transform: translateX(18px);

  background: #ffffff;
}

/* ============================================================
   PAINEL NEXO — INTERVALO DO ALERTA
   ============================================================ */

.painel-nexo-intervalo {
  width: max-content;
  min-height: 20px;
  transform: translateY(-8px);

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0 4px;

  background:
    rgba(63, 111, 175, 0.14);

  border:
    1px solid rgba(117, 157, 188, 0.10);

  border-radius: 6px;

  color: #d7e3ec;

  font-size: 10px;
  font-weight: 500;
}


.painel-nexo-intervalo select {
  
  flex-shrink: 0;

  height: 16px;

  padding: 0 1px;

  border:
    1px solid rgba(117, 157, 188, 0.28);

  border-radius: 4px;

  background: #17344a;

  color: #ffffff;

  font-size: 8px;
  
  margin-left: 4px;

  outline: none;

  cursor: pointer;
}

.painel-nexo-intervalo input[type="time"] {

  flex-shrink: 0;

  width: 55px;
  height: 16px;

  box-sizing: border-box;

  padding: 0 3px;

  border:
    1px solid rgba(117, 157, 188, 0.28);

  border-radius: 4px;

  background: #17344a;

  color: #ffffff;

  font-size: 8px;

  margin-left: 4px;

  outline: none;

  cursor: pointer;
}

/* ============================================================
   CONFIG ALERTAS — VISUAL BLOQUEADO
   ============================================================ */

#guardian-config-controles.guardian-config-bloqueado {
  opacity: 0.55;
}

#guardian-config-controles.guardian-config-bloqueado input,
#guardian-config-controles.guardian-config-bloqueado select,
#guardian-config-controles.guardian-config-bloqueado button {
  pointer-events: none;
}

/* ============================================================
   GUARDIAN NEXO — TELA DE LOGIN
   ============================================================ */

#guardian-login {
  position: fixed;
  inset: 0;
  z-index: 5000;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 20px;
  box-sizing: border-box;

  background: linear-gradient(
    145deg,
    #071521,
    #102b42
  );

  overflow-y: auto;
}

.guardian-login-caixa {
  width: 100%;
  max-width: 380px;
  padding: 32px;
  box-sizing: border-box;

  display: flex;
  flex-direction: column;
  gap: 14px;

  background: linear-gradient(
    145deg,
    #142f45,
    #091b2a
  );

  border: 1px solid #34546b;
  border-radius: 14px;

  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);

  color: #ffffff;
}

.guardian-login-logo {
  display: flex;
  justify-content: center;
}

.guardian-login-logo img {
  width: 90px;
  height: 90px;
  object-fit: contain;
}

.guardian-login-caixa h1 {
  margin: 0;
  color: #ffffff;
  font-size: 22px;
  text-align: center;
}

.guardian-login-caixa p {
  margin: 0 0 12px;
  color: #a9bacb;
  font-size: 12px;
  text-align: center;
}

.guardian-login-opcao {
  display: flex;
  align-items: center;
  gap: 12px;

  margin-bottom: 6px;

  padding: 12px;

  background: #193449;
  border: 1px solid #31536b;
  border-radius: 7px;

  color: #eaf4ff;
  font-size: 13px;
  cursor: pointer;
}

.guardian-login-opcao:has(input:checked) {
  border-color: #4fa3e3;
  background: #174a7e;
}

.guardian-login-opcao input {
  accent-color: #4fa3e3;
}

.guardian-login-caixa input[type="password"],
.guardian-login-caixa select {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  box-sizing: border-box;

  background: #102b40;
  border: 1px solid #34546b;
  border-radius: 7px;

  color: #ffffff;
  font-size: 13px;
  outline: none;
}

.guardian-login-caixa input:focus,
.guardian-login-caixa select:focus {
  border-color: #4fa3e3;
}

.guardian-login-caixa button {
  min-height: 40px;
  padding: 10px 14px;

  background: #174a7e;
  border: 1px solid #397bb3;
  border-radius: 7px;

  color: #ffffff;
  font-size: 12px;
  font-weight: 700;

  cursor: pointer;
}

.guardian-login-caixa button:hover {
  background: #1d5b98;
}

#guardian-login-entrar,
#guardian-login-alterar {
  margin-top: 16px;
}

#guardian-login-alterar {
  margin-left: 8px;
  background: transparent;
  border-color: #34546b;
  color: #a9d8ff;
}

#guardian-login-recuperacao,
#guardian-login-nova-senha {
  flex-direction: column;
  gap: 12px;
}

#guardian-login-recuperacao:not([hidden]),
#guardian-login-nova-senha:not([hidden]) {
  display: flex;
}

#guardian-login-controles[hidden],
#guardian-login-recuperacao[hidden],
#guardian-login-nova-senha[hidden],
#guardian-login[hidden] {
  display: none;
}

#guardian-login-mensagem {
  color: #ffb52e;
  font-size: 12px;
  text-align: center;
}

/* ============================================================
   GUARDIAN EKAZA — CONFIRMAÇÃO V08
   ============================================================ */

#guardian-v08-confirmacao {

  position: fixed;
  inset: 0;

  z-index: 3000;

  display: flex;
  align-items: center;
  justify-content: center;

  background:
    rgba(0, 0, 0, 0.58);

}


#guardian-v08-confirmacao[hidden] {

  display: none;

}


.guardian-v08-caixa {

  width: 340px;

  padding: 24px;

  background:
    linear-gradient(
      145deg,
      rgba(15, 36, 51, 0.99),
      rgba(8, 24, 36, 0.99)
    );

  border:
    1px solid rgba(117, 157, 188, 0.28);

  border-radius: 10px;

  box-shadow:
    0 18px 45px rgba(0, 0, 0, 0.48);

}


.guardian-v08-titulo {

  color: #ffffff;

  font-size: 15px;
  font-weight: 600;

  text-align: center;

}


.guardian-v08-acoes {

  display: flex;
  justify-content: center;

  gap: 12px;

  margin-top: 22px;

}


.guardian-v08-acoes button {

  min-width: 90px;
  height: 34px;

  border:
    1px solid rgba(117, 157, 188, 0.28);

  border-radius: 6px;

  background: #174a7e;

  color: #ffffff;

  font-size: 11px;
  font-weight: 700;

  cursor: pointer;

}


.guardian-v08-acoes button:hover {

  background: #1d5b98;

}