@import url('normalize.css'); /* Caminho local para o normalize.css */

:root {
  --c1: #202B36;
  --c2: #0093ff;
  --c2a: rgba(0,147,255,0.7);
  --c3: #7EFAFF;
  --c3a: rgba(126, 250, 255, 0.2);
  --c4: #EBFFFB;
  --c5: #ffffff;
  --c6: #324354;
  --c7: #000;
  --metal-1: #d0d0d0;
  --metal-2: #a9a9a9;
  --metal-3: #efefef;
  --metal-4: #8a8a8a;
  --metal-5: #cccccc;
  --gauge-size: 100%; 
  --gauge-max-size: 15rem;  
}

html {
  scroll-behavior: smooth;
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--c1);
    overflow-x: hidden;
    position: relative;
    z-index: 0;
}

/* BARRA DE NAVEGAÇÃO */
.navbar {
    white-space: nowrap;
    background-color: var(--c1);
    position: relative;
    z-index: 100;
    top: 0%;
    height: 4rem;
    width: 100%;
    border-bottom: 2px solid var(--c5);
    border-radius: 0px;
    box-shadow: 0 0 15px rgba(212,239,238,0.1), inset 0 0 10px rgba(1,1,1,0.5);
    margin-bottom: 2%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    transform: translate3d(0,0,0); /* Cria novo contexto de empilhamento */
    will-change: transform; /* Otimização */
}

/* Ajustes para os itens da navbar */
.w3-bar-item.w3-button {
    height: 4rem;
    display: inline-flex; /* Mudamos para inline-flex */
    align-items: center;
    color: rgb(79,119,141);
    transition: color 0.3s ease;
    padding: 0 15px;
    margin: 0; /* Removemos a margem */
    width: auto !important; /* Força a largura automática */
    white-space: nowrap; /* Impede quebra de linha */
    padding-right: 2vw;
    background-color: transparent;
}

.w3-bar-item.w3-button:hover {
    color: var(--c5) !important;
    background-color: transparent !important;
}

/* Ajuste para o logo */
.w3-bar-item.w3-button.w3-wide {
    color: var(--c5) !important;
    font-weight: bold;
    font-size: 1.5rem;
}

.w3-teal {
    background-color: var(--c2) !important;
}

.row-custom {
    display: flex;
    gap: 1rem; /* espaço entre as colunas */
}

.third {
    flex: 1;           /* equivale a 1 parte */
    max-width: 33.333%;
}

.twothirds {
    flex: 2;           /* equivale a 2 partes */
    max-width: 66.666%;
}

.w3-text-white {
    color: var(--c5) !important;
}

/* Container central para os itens - DESKTOP */
.nav-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-wrap: nowrap; /* Impede quebra de linha */
    white-space: nowrap; /* Impede quebra de texto */
}

/* Ajuste para a data */
.text-date {
    margin-left: 10px;
}

/* Logo - sempre à esquerda */
.nav-logo {
    position: relative; 
    z-index: 1;
    margin-right: auto; 
}

/* Aplica SOMENTE à sidebar mobile (não afeta desktop) */
.w3-sidebar.w3-bar-block {
    display: none; /* Inicialmente escondido */
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 250px !important;
    z-index: 200;
    background-color: var(--c1) !important;
    overflow-y: auto;
    box-shadow: 4px 0 15px rgba(0,0,0,0.5);
}

/* Ajustes para telas em paisagem */
@media (max-width: 992px) and (orientation: landscape) {
    .w3-sidebar.w3-bar-block {
        width: 200px !important;
    }
    
    .w3-sidebar .w3-bar-item {
        padding: 12px 16px !important;
    }
}

/* Telas muito pequenas em paisagem */
@media (max-width: 600px) and (orientation: landscape) {
    .w3-sidebar.w3-bar-block {
        width: 180px !important;
    }
}

@media (max-width: 600px) {
    .motores-info {
        display: block !important;
    }
}

@media (min-width: 601px) {
    .motores-info {
        display: flex !important;
    }
}

/* Itens do menu mobile */
.w3-sidebar .w3-bar-item {
    width: 100% !important;
    display: block !important;
    text-align: left !important;
    padding: 15px 20px !important;
    margin: 0 !important;
    border-bottom: 1px solid rgba(212, 239, 238, 0.2) !important;
    color: var(--c4) !important;
    white-space: normal !important;
}

/* Botão de fechar (X) */
.w3-sidebar .w3-bar-item.w3-button.w3-large {
    text-align: right !important;
    font-size: 28px !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    border-bottom: 2px solid rgba(212, 239, 238, 0.5) !important;
}

/* Efeito hover mobile */
.w3-sidebar .w3-bar-item:hover {
    background-color: rgba(212, 239, 238, 0.1) !important;
}

/* MOBILE - Esconde o menu centralizado */
@media (max-width: 992px) {
    .w3-sidebar.w3-bar-block {
        width: 100% !important;
    }

    .nav-center {
        display: none !important;
    }

    .graph-ticks-block {
        display: none !important;
    }
    
    /* Mostra botão menu mobile APENAS no mobile */
    .mobile-menu-btn {
        display: block !important;
    }

    #nt-var {
        display: none !important;
    }

    .variable-group-mobile {
        display: block !important;
    }

    .left-side {
        display: none !important;
    }
}

/* DESKTOP - Esconde botão menu */
@media (min-width: 993px) {
    .mobile-menu-btn {
        display: none !important;
    }

    #nt-var {
        display: block !important;
    }

    .variable-group-mobile {
        display: none !important;
    }

    .left-side {
        display: flex !important;
    }
}

/* Estilo do botão mobile */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--c5);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0 15px;
    height: 3rem;
    margin-left: auto; /* Posiciona à direita */
}

.navbar-nav {
    background-color: transparent;
}

.navbar-nav .nav-link {
    background-color: transparent;
    color: rgb(79,119,141) !important;
    cursor: pointer;
}

.nav-link-2 {
    background-color: transparent;
    color: rgb(79,119,141);
    cursor: pointer;
    padding-right: 5vw;
}

.navbar-nav .nav-link:hover {
    color: var(--c5);
}

.w3-bar-item:active {
    font-weight: bold;
    color: var(--c4) !important;
}

.navbar-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--c5);
    text-align: center;
    margin: 0 auto;
    position: relative;
    left: -30%;
    padding-left: 6rem;
}

.container-fluid {
    padding-left: 0px;
    left: 0%;
    justify-content: space-between;
}

.config-btn{
    display: flex;
    height: 50px;
    width: 50px;
    border-color: transparent;
    background-color: transparent;
    justify-content: center;
    margin-left: 10px;
}

.config-btn:hover{
    background-image: url('/demo/images/engrenagem_hover.png');
    background-color: transparent;
    color: transparent;
    border-color: transparent;
}

.engrenagem-img {
    height: 65%;
    width: 65%;
    position: relative;
}

.engrenagem-img:hover {
    height: 75%;
    width: 75%;
    position: relative;
}

/* VISUALIZAÇÃO DE TANQUES */

.w3-light-grey {
    background-color: var(--c1) !important;
}

/* CONTAINER DE COLUNAS */

.columns-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    justify-content: center;
    gap: 40px;
    margin: 20px auto;
    max-width: 1350px;
    width: 100%;
    position: relative;
}

.tank-columns-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
    padding: 20px;
    justify-content: space-around;
    margin-top: 5px;
    margin-left: 300px;
    margin-right: 300px;
}

/* WRAPPERS ESQUERDA, CENTRAL E DIREITA */

.visualizations-wrapper-left,
.visualizations-wrapper-center,
.visualizations-wrapper-right {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.visualizations-wrapper-right {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.visualizations-wrapper-center{
    justify-content: space-between;
}


/* --------------- BLOCOS DE BÚSSOLA --------------- */

.compass-block {
    background-color: var(--c6);
    padding: 3%;
    border-radius: 10px;
    text-align: left;
    border: 2px solid var(--c5);
    box-shadow: 0 0 15px rgba(212,239,238,0.1), inset 0 0 100px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    margin-bottom: 1rem;
}

.compass-title {
    color: var(--c5);
    margin-bottom: 10px;
    margin-left: 5px;
    font-size: 22px;
    font-family: 'Helvetica', Courier, monospace;
    transform: uppercase;
}

.compass-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 1rem;
    width: 100%; 
}

.pitch-roll-compass-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0.5rem;
    width: 100%; 
}

.compass-container {
    box-shadow: 0 0 2rem rgba(0, 0, 0, 0.3); 
    position: relative;
    background-color: var(--c1);
    border: 2px solid var(--c5);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: auto !important; /* Remove qualquer z-index herdado */
    transform: none; /* Remove transformações que criam contextos */
    opacity: 1; /* Garante que não haja contextos desnecessários */
    isolation: isolate; /* Isola o contexto interno */
}

.compass {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.compass::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    opacity: 1;
    z-index: 0;
}

.arrow-container {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    z-index: 2;
}

/* --------------- BÚSSOLA DE DIREÇÃO DO VENTO --------------- */

.wind-compass-container {
  position: relative;
  width: 70%;
  max-width: 225px;
  aspect-ratio: 1/1;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
  z-index: 0;
}

/* Borda metálica externa, atrás de tudo */
.wind-compass-border {
  width: 120%;
  height: 120%;
  border-radius: 50%;
  background: linear-gradient(145deg, #f3f3f3 0%, #d1d1d1 25%, #9b9b9b 50%, #7a7a7a 75%, #cfcfcf 100%);
  box-shadow:
    inset 0 0 1rem rgba(255,255,255,0.12),
    inset -0.2rem -0.2rem 2rem rgba(255,255,255,0.06),
    inset 0.2rem 0.2rem 1.2rem rgba(0,0,0,0.12);
  z-index: 0;
  position: absolute;
  top: -10%;
  left: -10%;
}

/* Anel onde ficam as letras (mesma cor do círculo interno) */
.wind-compass-letter-ring {
  position: absolute;
  width: 115%;
  height: 115%;
  border-radius: 50%;
  background-color: var(--c1);
  border: 2px solid var(--c5);
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Círculo interno (com borda branca) */
.wind-compass-inner {
  position: relative;
  width: 95%;
  height: 95%;
  border-radius: 50%;
  background-color: var(--c1);
  border: 2px solid var(--c5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2;
  overflow: hidden;
}

/* Texto central */
.wind-compass-text {
  position: absolute;
  color: var(--c2);
  font-weight: bold;
  font-size: 1.2rem;
  z-index: 6;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

/* Navio (SVG aumentado pelo path) */
.wind-compass-ship {
  position: absolute;
  width: 120%;
  height: 120%;
  z-index: 4;
  pointer-events: none;
}

.wind-ship-body {
  fill: var(--c1);
  stroke: var(--c5);
  stroke-width: 3;
}

/* Letras de direção */
.compass-directions {
  width: 100%;
  height: 100%;
  position: relative;
}

.compass-directions .dir {
  position: absolute;
  font-size: 0.9em;
  font-weight: 700;
  color: var(--c5);
  text-transform: uppercase;
}

.compass-directions .dir.main { font-size: 1.15em; }

.dir.n  { top: 0; left: 50%; transform: translateX(-50%); }
.dir.s  { bottom: 0; left: 50%; transform: translateX(-50%) rotate(180deg); }
.dir.e  { right: 2.5%; top: 50%; transform: translateY(-50%) rotate(90deg); }
.dir.w  { left: 2%; top: 50%; transform: translateY(-50%) rotate(-90deg); }
.dir.ne { top: 18%; right: 18%; transform: translate(50%, -50%) rotate(45deg); }
.dir.se { bottom: 18%; right: 18%; transform: translate(50%, 50%) rotate(135deg); }
.dir.sw { bottom: 18%; left: 18%; transform: translate(-50%, 50%) rotate(225deg); }
.dir.nw { top: 18%; left: 18%; transform: translate(-50%, -50%) rotate(315deg); }

/* Vidro */
.wind-glass-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 120%;
  height: 120%;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.12), transparent 65%);
  pointer-events: none;
  z-index: 5;
  position: absolute;
  top: -10%;
  left: -10%;
}

/* Seta apontando para dentro */
.wind-arrow-container {
  position: absolute;
  width: 110%;
  height: 110%;
  transform-origin: 50% 50%;
  z-index: 6;
  pointer-events: none;
}

.wind-arrow {
  position: absolute;
  left: 50%;
  top: 4.5%;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 28px solid var(--c2);
  filter: drop-shadow(0 0 6px var(--c2a));
  transform: translateX(-50%);
}

/* Grid SVG com as linhas radiais (de centro até a borda) */
.compass-grid {
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  z-index: 3;
  pointer-events: none;
}

/* estilo das linhas radiais */
.ray-line {
  stroke: rgba(255,255,255,0.12);
  stroke-width: 1;
}

/* destaque linhas maiores a cada 30 graus (opcional via JS) */
.ray-line.major {
  stroke-width: 1.4;
  stroke: rgba(255,255,255,0.18);
}

/* --------------- DATA E HORA --------------- */

#box-date{
    overflow: visible;
}

#navbarDate {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 20px; 
    position: relative; 
    color: var(--c5);
    font-size: 20px;
}

#navbarDate:hover {
    color: var(--c3);
    text-decoration: underline;
}

/* Estilos para o popup */

.config-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--c1);
    padding: 2em;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    border: 2px, solid, var(--c5);
    border-radius: 2px;
    border-color: var(--c5);
    box-shadow: 0 0 50px var(--c5);
}

.config-popup input[type="datetime-local"] {
    margin-top: 1rem;
    width: 17rem;
    box-sizing: border-box;
}

.config-popup input[disabled] {
    opacity: 0.6;
    pointer-events: none;
}

.popup-content {
    width: 21em;
    text-align: center;
    color: var(--c5);
}

#btnSave{
    background-color: var(--c2);
}

#btnSave:hover{
    background-color: var(--c5);
}

/* --------------- BARRA DE ROT --------------- */

.rot-title {
    position: relative;
    text-align: center;
    color: var(--c5);
    margin-bottom: 5px;
    margin-left: 5px;
    font-size: 22px;
    font-family: 'Helvetica', Courier, monospace;
    transform: uppercase;
}

 .rot-container {
    position: relative;
    width: 100%;
    height: 40px; /* Aumentei a altura para acomodar as barrinhas */
    margin: 0 auto;
    background-color: rgba(57, 72, 80, 0.5);
    border-radius: 0px;
    overflow: visible;
    border-bottom: 1px solid var(--c5);
    border-top: 1px solid var(--c5);
    box-shadow: 0 0 2rem rgba(0, 0, 0, 0.3), inset 0 0 1rem var(--c3a); 
}

.rot-pointer {
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background-color: var(--c3);
    box-shadow: 0 0 1rem rgba(0, 0, 0, 0.8); 
    transition: left 0.1s ease-in-out;
}

.pointer-triangle{
    position: absolute;
    top: -17px;
    left: -6px;
    color: var(--c3);
    transition: left 0.1s ease-in-out;
}

.rot-value{
    color: ciano;
    bottom: 100%;
    position: relative;
    left: 0%;
    font-family: 'Helvetica', Courier, monospace;
}

.rot-container::before,
.rot-container::after {
    content: '';
    position: absolute;
    top: 0;
    width: 0;
    height: 0;
    background-color: #333;
}

.rot-container::before {
    left: 0;
}

.rot-container::after {
    right: 0;
}

/* Criação das barrinhas como uma régua */

.rot-tick-mark {
    position: absolute;
    top: 0;
    width: 2px;
    height: 100%;
    background-color: var(--c5);
}

.rot-tick-mark-bot {
    position: absolute;
    bottom: 0;
    width: 2px;
    height: 100%;
    background-color: var(--c5);
}

.rot-container .small-tick {
    height: 25%; /* Barras menores */
    background: linear-gradient(to bottom, var(--c5) 50%, transparent 50%);
}

.rot-container .small-bot-tick {
    height: 25%; /* Barras menores */
    background: linear-gradient(to top, var(--c5) 50%, transparent 50%);
}

.rot-container .large-tick {
    height: 25%; /* Barras maiores */
} 

/* Distribui as barrinhas ao longo da barra de ROT */
.rot-container .rot-tick-mark:nth-child(1)  { left: 0%; }
.rot-container .rot-tick-mark:nth-child(2)  { left: 5%; }
.rot-container .rot-tick-mark:nth-child(3)  { left: 10%; }
.rot-container .rot-tick-mark:nth-child(4)  { left: 15%; }
.rot-container .rot-tick-mark:nth-child(5)  { left: 20%; }
.rot-container .rot-tick-mark:nth-child(6)  { left: 25%; }
.rot-container .rot-tick-mark:nth-child(7)  { left: 30%; }
.rot-container .rot-tick-mark:nth-child(8)  { left: 35%; }
.rot-container .rot-tick-mark:nth-child(9)  { left: 40%; }
.rot-container .rot-tick-mark:nth-child(10) { left: 45%; }
.rot-container .rot-tick-mark:nth-child(11) { left: 50%; }
.rot-container .rot-tick-mark:nth-child(12) { left: 55%; }
.rot-container .rot-tick-mark:nth-child(13) { left: 60%; }
.rot-container .rot-tick-mark:nth-child(14) { left: 65%; }
.rot-container .rot-tick-mark:nth-child(15) { left: 70%; }
.rot-container .rot-tick-mark:nth-child(16) { left: 75%; }
.rot-container .rot-tick-mark:nth-child(17) { left: 80%; }
.rot-container .rot-tick-mark:nth-child(18) { left: 85%; }
.rot-container .rot-tick-mark:nth-child(19) { left: 90%; }
.rot-container .rot-tick-mark:nth-child(20) { left: 95%; }
.rot-container .rot-tick-mark:nth-child(21) { right: 0%; }

.rot-container .rot-tick-mark-bot:nth-child(22) { left: 0%; }
.rot-container .rot-tick-mark-bot:nth-child(23) { left: 5%; }
.rot-container .rot-tick-mark-bot:nth-child(24) { left: 10%; }
.rot-container .rot-tick-mark-bot:nth-child(25) { left: 15%; }
.rot-container .rot-tick-mark-bot:nth-child(26) { left: 20%; }
.rot-container .rot-tick-mark-bot:nth-child(27) { left: 25%; }
.rot-container .rot-tick-mark-bot:nth-child(28) { left: 30%; }
.rot-container .rot-tick-mark-bot:nth-child(29) { left: 35%; }
.rot-container .rot-tick-mark-bot:nth-child(30) { left: 40%; }
.rot-container .rot-tick-mark-bot:nth-child(31) { left: 45%; }
.rot-container .rot-tick-mark-bot:nth-child(32) { left: 50%; }
.rot-container .rot-tick-mark-bot:nth-child(33) { left: 55%; }
.rot-container .rot-tick-mark-bot:nth-child(34) { left: 60%; }
.rot-container .rot-tick-mark-bot:nth-child(35) { left: 65%; }
.rot-container .rot-tick-mark-bot:nth-child(36) { left: 70%; }
.rot-container .rot-tick-mark-bot:nth-child(37) { left: 75%; }
.rot-container .rot-tick-mark-bot:nth-child(38) { left: 80%; }
.rot-container .rot-tick-mark-bot:nth-child(39) { left: 85%; }
.rot-container .rot-tick-mark-bot:nth-child(40) { left: 90%; }
.rot-container .rot-tick-mark-bot:nth-child(41) { left: 95%; }
.rot-container .rot-tick-mark-bot:nth-child(42) { right: 0%; }

/* Configura a fonte dos números da barra do ROT */

.rot-ticks {
    position: relative;
    top: 80%;
    color: var(--c5);
    font-family: 'Helvetica', Courier, monospace;
    font-size: 14px; /* Ajuste o tamanho da fonte conforme necessário */
    left: -350%;
}

#num-100 {
    position: relative;
    left: -525%;
}

#num0 {
    position: relative;
    font-family: 'Helvetica', Courier, monospace;
    left: -125%;
}

#num100 {
    position: relative;
    font-family: 'Helvetica', Courier, monospace;
    left: -525%;
}

/* --------------- ROTAÇÃO DOS MOTORES --------------- */

#textRPM {
    position: absolute;
    top: -30px;
    color: var(--c5);
    font-family: 'Helvetica', Courier, monospace;
    white-space: nowrap;
}

/* --------------- MAIS INFORMAÇÕES NO CANTO SUPERIOR DIREITO (LAT, LON, COG, SOG) --------------- */

.upright-title{
    color: var(--c5);
    margin-bottom: 10px;
    margin-left: 0px;
    font-size: 22px;
    font-family: 'Helvetica', Courier, monospace;
    transform: uppercase;
}

.upright-results{
    float: right;
    color: var(--c5);
    margin-bottom: 10px;
    margin-left: 0px;
    font-size: 22px;
    font-family: 'Helvetica', Courier, monospace;
    transform: uppercase;
}

/* --------------- BÚSSOLA DE PITCH --------------- */

.pitch-roll {
    display: flex;
    justify-content: space-between;
}

/* --------------- BÚSSOLA DE ROLL --------------- */

.roll-compass-container, .pitch-compass-container {
  position: relative;
  width: 100%;
  max-width: 300px;
  aspect-ratio: 1 / 1;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
}

.roll-compass-border, .pitch-compass-border {
    position: absolute;
    width: 105%;
    height: 105%;
    border-radius: 50%;
    background: linear-gradient(#efefef 0%, #d0d0d0 25%, #a9a9a9 50%, #8a8a8a 75%, #cccccc 100%);
    box-shadow:
        inset 0 0 1rem rgba(255,255,255,0.2),
        inset -0.2rem -0.2rem 2rem rgba(255,255,255,0.1),
        inset 0.2rem 0.2rem 2rem rgba(0,0,0,0.1);
    z-index: 0;
    pointer-events: none;
}

.roll-compass, .pitch-compass {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: var(--c1);
  border: 2px solid var(--c5);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  z-index: 1;
}

.roll-compass-center, .pitch-compass-center {
  position: absolute;
  width: 40%;
  height: 40%;
  max-width: 40%;
  max-height: 40%;
  object-fit: contain;
  z-index: 3;
  transform-origin: 50% 50%;
  pointer-events: none;
}

.roll-compass-text, .pitch-compass-text {
  position: absolute;
  color: var(--c2);
  font-size: 1.5em;
  font-weight: bold;
  z-index: 6;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

.roll-arrow-container, .pitch-arrow-container {
    align-items: center;
    z-index: 3;
}

.roll-arrow, .pitch-arrow {
    width: 5%;
    height: 15%;
    background-color: var(--c2);
    transform-origin: center bottom;
    clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
    position: absolute;
    top: 0%;
}

/* SVG que contém ticks */
.roll-ticks, .pitch-ticks {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.roll-tick-line, .pitch-tick-line {
  stroke: var(--c5);
  stroke-width: 1;
}

.roll-tick-line.major, .pitch-tick-line.major {
  stroke-width: 2;
}

.roll-glass-overlay, .pitch-glass-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.15), transparent 70%);
  pointer-events: none;
  z-index: 7;
}

/* --------------- BÚSSOLA DE HEADING --------------- */

.heading-info {
    display: flex;
    justify-content: space-between;
}

/* Contêiner principal */
.motores-info {
  display: flex;
  justify-content: space-evenly;
  margin-top: 1%;
  gap: 1rem;
}

.motor-gauge {
  flex: 0 1 32%;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  margin: 0% 2% 2% 2%;
  z-index: 0;
}

/* Gauge container */
.outer-wrap {
  position: relative;
  width: var(--gauge-size);
  height: var(--gauge-size);
  max-width: var(--gauge-max-size);
  border-radius: 50%;
  padding: 0.4rem;
  background: linear-gradient(#efefef 0%, #d0d0d0 25%, #a9a9a9 50%, #8a8a8a 75%, #cccccc 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 0;
}

/* Camada de vidro */
.glass-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  pointer-events: none;
  z-index: 5;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.17) 0%, rgba(255, 255, 255, 0.0017) 30%, rgba(255,255,255,0) 100%);
  box-shadow: inset 0 0 1.5rem rgba(255, 255, 255, 0.15),
              inset -0.2rem -0.2rem 2rem rgba(255,255,255,0.1),
              inset 0.2rem 0.2rem 2rem rgba(255,255,255,0.08);
}

/* Gauge internals */
.gauge {
  width: 100%;
  height: 100%;
  background: var(--c1);
  border-radius: 50%;
  position: relative;
}

.center-circle {
  fill: var(--c1);
  stroke: var(--c2);
  stroke-width: 0.15rem;
  filter: drop-shadow(0 0 2rem var(--c2a));
  z-index: 2;
}

.mcp-label {
  fill: #9aa6b2;
  font-size: 0.6rem;
}

.rpm-value {
  fill: var(--c2);
  font-size: 1.1rem;
  font-weight: 700;
}

.rpm-unit {
  fill: #9aa6b2;
  font-size: 0.65rem;
}

.needle {
  fill: var(--c2);
  filter: drop-shadow(0 0 6px var(--c2a));
  transform-origin: 100px 100px;
  z-index: 10;
  stroke: var(--c2);
  stroke-width: 2;
}

.ticks line {
  stroke: var(--c4);
  stroke-width: 0.07rem;
}

.ticks line.big {
  stroke-width: 0.12rem;
}

.ticks text {
  fill: var(--c4);
  font-size: 0.65rem;
}

.motor-values {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  color: var(--c4);
  font-size: 0.9rem;
  text-align: center;
}

.gauge-warning-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 200px;
  height: 200px;
  pointer-events: none;
  z-index: 4;
}

/* Barras curvas externas */
.gauge-bars-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 127%;
  height: 127%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1;
}

.gauge-bar-bg {
  stroke: rgba(255,255,255,0.15);
  stroke-width: 10;
  fill: none;
  stroke-linecap: round;
}

.gauge-bar {
  stroke: var(--c2);
  stroke-width: 10;
  fill: none;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.5s ease;
  filter: drop-shadow(0 0 6px var(--c2a));
}

.gauge-bar-glass {
  stroke: rgba(255,255,255,0.3);
  stroke-width: 12;
  fill: none;
  stroke-linecap: round;
}

/* Correção para a barra de consumo (direita) */
#consumo-bar-bb,
#consumo-bar-lc,
#consumo-bar-be {
  transform: scaleY(-1);
  transform-origin: 150px 150px;
}

#carga-text-bb,
#carga-text-lc,
#carga-text-be {
  border: 1px solid #d0d0d0;
}

/* Legendas padronizadas para carga, potência e consumo */
.legend-box {
  position: absolute;
  text-align: center;
  font-size: 0.75rem;
  width: 80px;
  line-height: 1.2;
  border-radius: 4px;
  padding: 4px;
  color: #9aa6b2; /* cor neutra para o nome da variável */
}

.legend-box .legend-name {
  font-size: 0.65rem;
  color: #9aa6b2;
}

.legend-box .legend-value {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--c2);
}

/* Legendas das barras */
.bar-legend {
  position: absolute;
  text-align: center;
  font-size: 0.7rem;
  color: var(--c2);
  width: 80px;
  line-height: 1.2;
  border-radius: 4px;
  padding: 4px;
}

.potencia-legend {
  bottom: -2rem;
  left: 5%;
}

.consumo-legend {
  bottom: -2rem;
  right: 5%;
}


.info-display {
  margin-top: 10px;
  text-align: center;
  color: var(--c5);
}


.heading-compass-container {
  position: relative;
  width: 70%;
  max-width: 300px;
  aspect-ratio: 1/1;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
  z-index: 0;
}

/* Borda metálica como anel externo */
.heading-compass-border {
  position: absolute;
  width: 105%;  
  height: 105%;
  border-radius: 50%;
  background: linear-gradient(#efefef 0%, #d0d0d0 25%, #a9a9a9 50%, #8a8a8a 75%, #cccccc 100%);
  box-shadow: inset 0 0 1rem rgba(255,255,255,0.2),
              inset -0.2rem -0.2rem 2rem rgba(255,255,255,0.1),
              inset 0.2rem 0.2rem 2rem rgba(0,0,0,0.1);
  z-index: 1;
}

/* Conteúdo da bússola */
.heading-compass-inner {
  position: relative;
  width: 100%;
  height: 100%;
  background-color: var(--c1);
  border-radius: 50%;
  overflow: hidden;
  z-index: 2;
}

.heading-compass {
  width: 100%;
  height: 100%;
  border: 3px solid var(--c5);
  border-radius: 50%;
}

.heading-glass-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.15), transparent 70%);
  pointer-events: none;
  z-index: 3;
}

/* Direções principais */
.heading-compass-dir-main,
.heading-compass-dir-sub {
  font-weight: bold;
  fill: var(--c5);
  text-anchor: middle;
  dominant-baseline: middle;
}

/* Direções principais */
.heading-compass-dir-main {
  font-size: 1.3rem;
}

/* Direções intermediárias */
.heading-compass-dir-sub {
  font-size: 0.9rem;
}

/* Ticks */
.heading-tick-line {
  stroke: var(--c5);
  stroke-width: 0.6;
}
.heading-tick-line.major {
  stroke-width: 1.2;
}
.heading-tick-text {
  font-size: 0.55rem;
  fill: var(--c5);
  text-anchor: middle;
  dominant-baseline: middle;
}

/* Navio */
.heading-compass-ship {
  position: absolute;
  transform-origin: center center;
  z-index: 4;
  pointer-events: none;
  filter: drop-shadow(0 0 6px var(--c2a));
}

.heading-ship-body {
  fill: none;
  stroke: var(--c5);
  stroke-width: 3; /* reduzido pela metade */
}

.heading-ship-center {
  fill: var(--c2);
}

.heading-ship-line {
  stroke: var(--c2);
  stroke-width: 1.5; /* reduzido pela metade */
}

.heading-ship-arrow {
  fill: var(--c2);
}

.heading-value {
  margin-top: 0.5rem;
  font-size: 1rem;
  font-weight: bold;
  color: var(--c5);
  text-align: center;
}


.heading-compass-text {
    position: absolute;
    color: var(--c5);
    font-size: 1.5em;
    font-weight: bold;
    z-index: 2;
    bottom: 10px;
    top: unset;
}

/* --------------- TANQUES --------------- */

#Tanques {
    scroll-margin-top: 80px;
  }

.tank-name {
    font-family: 'Helvetica', Courier, monospace;
}

.tank-name:hover {
    cursor: pointer;
    color: var(--c3);
    text-decoration: underline;
}

.tank-container {
    width: 150px;
    height: 500px;
    border: 4px solid var(--c5);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2), inset 0 0 100px rgba(0,0,0,0.5);
    border-radius: 10px;
    position: relative;
    background-color: transparent;
}

/* Container do nível do tanque */
.tank-level-container {
    position: relative;
    height: 1.5rem; 
    width: 100%;
    overflow: hidden; /* Garante que o conteúdo não vaze */
    box-shadow: inset 0 0 1rem #000; 
}

.tank-level-container:hover {
    cursor: pointer;
    box-shadow: 0 0 10px var(--c2a), 0 0 100px var(--c3a), inset 0 0 10px var(--c2a); 
}

/* Barra de preenchimento */
.tank-fill {
    position: absolute;
    height: 100%; /* Sempre 100% da altura do container */
    top: 0;
    left: 0;
    border-radius: 12px; /* Metade da altura para manter o round-xlarge */
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: linear-gradient(to bottom, var(--c2), var(--c3));
    height: 100%;
    width: 0;
    transition: width 0.5s ease;
    box-shadow: inset 0 0 1% var(--c7);
}

/* Texto de porcentagem */
.tank-volume-text {
    position: absolute;
    padding: 2px;
    width: 100%; /* Ocupa toda a largura */
    text-align: center; /* Centraliza o texto horizontalmente */
    top: 50%; /* Posiciona no meio vertical */
    transform: translateY(-50%); /* Ajuste fino vertical */
    z-index: auto !important;
    color: var(--c5);
    font-size: 12px;
    font-weight: bold;
    text-shadow: 
        -1px -1px 0 var(--c7),
        1px -1px 0 var(--c7),
        -1px 1px 0 var(--c7),
        1px 1px 0 var(--c7);
    left: 0; /* Alinhamento horizontal corrigido */
}

.tank-volume-text:hover {
    font-size: 16px;
}

.tank-scale {
    position: absolute;
    top: 0;
    height: 100%;
    width: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.tank-scale div {
    height: 0;
    border-top: 1px solid var(--c5);
    text-align: right;
    font-size: 12px;
    color: var(--c5);
}

.tank-scale div:first-child {
    border: none;
}

/* Cada bloco tanque (nome + barra) */
.nt-variable-box {
    padding: 6px 0; 
    width: 100%;
}

/* Nome do tanque */
.nt-tank-name {
    margin: 0 0 6px 0;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Helvetica', Courier, monospace;
    color: var(--c5);
    text-align: center;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.nt-tank-name:hover {
    cursor: pointer;
    color: var(--c3);
    text-decoration: underline;
}

/* Container da barra */
.nt-tank-level-container {
    position: relative;
    height: 28px;
    border-radius: 1.5rem;
    overflow: hidden;
    background: var(--c1);
    backdrop-filter: blur(4px);
    border: 1px solid var(--c5);
    box-shadow: inset 0 0 12px rgba(0,0,0,0.35), 0 0 12px rgba(0,0,0,0.25);
    font-size: 0.9rem;
}

.nt-tank-level-container:hover {
    cursor: pointer;
    font-size: 1rem;   
}

/* Barra de preenchimento */
.nt-tank-fill {
    height: 100%;
    width: 0; /* começa vazio, JS controla depois */
    border-radius: 1.5rem;
    background: linear-gradient(
        135deg,
        var(--c2) 0%,
        var(--c3) 50%,
        var(--c2) 100%
    );
    background-size: 200% 200%;
    box-shadow: inset 0 0 10px rgba(255,255,255,0.2);
}

.nt-tank-fill:hover {
    animation: liquidFlow 3s ease-in-out infinite;
    transition: width 0.5s ease;
    cursor: pointer;
}

/* Texto dentro da barra */
.nt-tank-volume-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
    color: white;
    text-shadow: 0 0 4px rgba(0,0,0,0.8);
    pointer-events: none;
    z-index: 4;
    text-shadow: 
        -1px -1px 0 var(--c7),
        1px -1px 0 var(--c7),
        -1px 1px 0 var(--c7),
        1px 1px 0 var(--c7);
}

/* Animação "onda" no líquido */
@keyframes liquidFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Divisórias curvas */
.nt-tank-divisions {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
    z-index: 3;
    padding: 0 10%; /* deixa as curvas dentro da barra */
}

.nt-tank-divisions span {
    flex: none;
    width: 2px;
    height: 70%;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    box-shadow: 0 0 3px rgba(0,0,0,0.5);
}

/* BLOCO CENTRALIZADO PARA O TANQUE E GRÁFICO */
.central-block {
    background-color: var(--c6);
    padding: 3%;
    padding-bottom: 6%;
    border-radius: 10px;
    justify-content: center;
    gap: 20px;
    overflow: hidden;
    position: relative;
    border: 2px solid var(--c5);
    box-shadow: 0 0 15px rgba(212,239,238,0.1), inset 0 0 100px rgba(0, 0, 0, 0.2);
    margin-bottom: 1rem;
}

.navbar-space {
    padding-top: 4rem;
}

/* BLOCO CENTRALIZADO PARA O TANQUE E GRÁFICO */
.title-block {
    background-color: var(--c6);;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Alinha os itens ao topo */
    overflow: visible;
    position: relative;
    border: 2px solid white;
    margin-bottom: 1rem;
}

.title-block-title {
    position: absolute;
    transform: translateX(-50%);
    text-align: center;
    font-size: 2rem !important;
    color: var(--c5);;
    background-color: transparent;
    border-color: transparent;
    cursor: pointer;
    text-decoration: none;
}

.central-block-title {
    position: relative;
    top: 1%; /* Ajuste conforme necessário para a posição desejada */
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    font-size: 2rem;
    color: var(--c5);
    background-color: transparent;
    border-color: transparent;
    cursor: pointer;
}

.central-block-title option {
    background-color: var(--c1); /* Cor de fundo de cada item */
    color: var(--c5); /* Cor do texto de cada item */
}

.central-block-title option:hover {
    background-color: var(--c3); /* Cor de fundo ao passar o mouse */
    color: #BBE1FA; /* Cor do texto ao passar o mouse */
}

/* TANQUE E GRÁFICO DENTRO DO BLOCO CENTRALIZADO */
.tank-display,
.graph-container {
    flex: 1;
}

/* Estilos para o gráfico */
.chart-container {
    position: relative;
    margin: 0 auto;
    width: 100%;
    max-width: 800px;
    height: 27rem;
}

/* Estilos para o seletor de tempo */
.chart-time-selector {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 1%;
    margin-bottom: 1%;
}

.time-arrow {
    background-color: var(--c3);
    color: var(--c5);
    border: 1px solid var(--c5);
    font-size: 20px;
    cursor: pointer;
    padding: 5px 10px;
    margin: 0 10px;
}

.time-frame {
    color: var(--c5);
    font-size: 18px;
    cursor: pointer;
    text-decoration: none;
}

.time-frame:hover {
    color: var(--c3);
    text-decoration: underline;
}

.tank-display {
    display: flex;
    justify-content: left;
}

.graph-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: right;
    padding: 1%;
}

.graph-header-block {
    display: flex;
    justify-content: right;
    width: 100%;
    position: relative;
}

.graph-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1%;
    flex-grow: 1;
}

.graph-ticks-block {
    margin-bottom: 1%;
    margin-right: 1%;
    position: absolute;
    text-align: right;
    color: var(--c5);
}

#tank-graph {
    width: 100%;
    height: 100%;
}

#engine-graph {
    width: 100%;
    height: 100%;
}

#y-axis-variable, #y-axis-variable-engines {
    font-size: 20px;
    font-weight: bold;
    color: var(--c5);
    margin-left: 1%;
    margin-right: 1%;
}

.info-display-container {
    display: flex;
    flex-direction: column;
    gap: 10px; /* Espaçamento entre os blocos */
    margin-top: -15px;
    align-items: center; /* Centraliza as informações */
}

.tank-info-display-container {
    display: flex;
    flex-direction: column;
    gap: 10px; /* Espaçamento entre os blocos */
    margin-top: 15px;
    align-items: center; /* Centraliza as informações */
}

.info-display {
    display: flex;
    justify-content: space-between; /* Para ajustar o conteúdo dentro de cada bloco */
    padding: 5px;
    background-color: var(--c1); /* Exemplo de cor de fundo */
    border: 1px solid var(--c5);
    border-radius: 5px;
    color: var(--c5); /* Cor do texto */
}

.info-item {
    font-size: 1em;
    text-align: center;
    display: block; /* Garante que o conteúdo do item seja exibido em bloco */
    min-width: 10rem;
}

/* --------------- LOGIN --------------- */

/* Dividindo a tela ao meio */
.container-split {
    display: flex;
    height: 100vh;
}

/* Lado esquerdo com background color */
.left-side {
    background-color: var(--c4);
    flex: 1;
    display: flex;
    align-items: bottom;
    justify-content: right;
}

/* Lado direito, mantendo o conteúdo */
.right-side {
    background-color: var(--c5);
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Estilos do login */
.login-container {
    background-color: rgb(2, 101, 168);
    border: 1px solid var(--c4);
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.5);
    padding: 2rem;
    padding-top: 1.5rem;
    width: 25em; 
    height: auto; 
    margin:auto;
    top: 50%;
    text-align: center;
}

/* Garantindo que os itens não alterem de tamanho */
.login-box {
    position: relative;
    font-size: 1rem; /* Unidades relativas */
}

h2 {
    color: var(--c5);
    margin-bottom: 1.5rem;
}

form {
    display: flex;
    flex-direction: column;
}

input {
    background-color: var(--c5);
    border: 0.1rem solid var(--c4);
    border-radius: 0.25rem;
    color: black;
    font-size: 1rem; /* Unidades relativas */
    margin-bottom: 1.25rem;
    padding: 0.75rem;
}

input::placeholder {
    font-style: italic;
    color: gray;
}

button {
    background-color: var(--c2);
    border: 0.1rem solid var(--c4);
    border-radius: 0.25rem;
    color: var(--c5);
    cursor: pointer;
    font-size: 1.125rem; /* Unidades relativas */
    padding: 0.75rem;
}

button:hover {
    background-color: var(--c4);
    color: var(--c1);
    border-color: var(--c1);
}

.falhaLogin {
    color: #B83332;
    position: absolute;
    text-align: center;
    left: 50%;
    top: 80%;
    margin-top: 20px;
    transform: translateX(-50%);
}

.texto-criar-usuario {
    cursor: pointer;
    color: var(--c4);
}

.texto-criar-usuario:hover {
    text-decoration: underline;
}

/* Estilo customizado para o checkbox */
.custom-checkbox {
    display: flex;
    align-items: top;
    cursor: pointer;
    color: var(--c5);
    font-size: 1rem;
    user-select: none;
}

.custom-checkbox input[type="checkbox"] {
    appearance: none;
    background-color: transparent;
    border: 0.125rem solid var(--c5);
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 0.25rem;
    margin-right: 0.625rem;
    position: relative;
    cursor: pointer;
}

.custom-checkbox input[type="checkbox"]:checked {
    background-color: var(--c5);
}

.custom-checkbox input[type="checkbox"]:checked:before {
    content: '✔';
    position: absolute;
    left: 0.125rem;
    font-size: 1rem;
    color: rgb(2, 101, 168);
}

.checkbox-text {
    color: var(--c5);
    margin-left: 0.25rem;
    font-style: italic;
    margin-top: 0.1rem;
}

/* Estilizando a imagem do banner */
.banner {
    width: 47%;
    height: auto;
    position: fixed;
    bottom: 0%;
    object-fit: contain;
    display: block;
}

.logo {
    width: 50%;
    position: relative;
    transform: translateX(-50%);
    left: 25%;
}

/* Estilos para o campo de senha com o botão de visibilidade */
.password-container {
    position: relative;
    display: flex;
    align-items: center;
}

.login-input {
    width: 100%;
    padding-right: 2.5rem; /* Espaço para o botão de ver senha */
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 9px;
    width: 25px;
    height: auto;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    outline: none;
}

.toggle-password img {
    width: 25px; /* Ajusta o tamanho do ícone */
    height: 25px;
}

.toggle-password:hover img {
    opacity: 0.7;
}


/* --------------- MOTORES --------------- */

#Motores {
    scroll-margin-top: 100px;
  }

  .motor-compass {
    position: relative;
    width: 150px;
    height: 150px;
    background-image: url('/demo/images/Gauge-Branco.png');
    background-size: cover;
    background-position: center;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--c1);
    border: 5px solid var(--c5);
    box-shadow: 0 0 2rem rgba(0, 0, 0, 0.3); 
}

.motor-compass-container {
    display: flex;
    gap: 40px;
    padding:5px;
}

.motor-compass-center {
    position: absolute;
    width: 70%;
    height: 70%;
    object-fit: cover;
    z-index: auto !important;
}

.motor-compass-text {
    position: absolute;
    color: var(--c5);
    font-size: 1em;
    font-weight: bold;
    z-index: auto !important;
    bottom: 10px;
    top: unset;
    font-family: 'Helvetica', Courier, monospace;}

.motor-span {
    position: relative;
    top: -90px;
    color: var(--c5);
    font-family: 'Helvetica', Courier, monospace;
}

/* SETAS LATERAIS PARA ALTERNAÇÃO DOS MOTORES E TANQUES */

.motor-arrow-container,
.tank-arrow-container {
    display: flex;
    justify-content: space-between;
    pointer-events: none; /* Permite que os cliques atravessem o contêiner */
}

.motor-arrow,
.tank-arrow {
    background-image: radial-gradient(var(--c3), var(--c2));
    color: var(--c5);
    border: 1px solid var(--c5);
    cursor: pointer;
    padding: 1% 2%;
    pointer-events: all; /* Permite que os botões recebam cliques */
    z-index: 100;
    font-size: 2rem;
    color: #bce2fa;
}

.motor-arrow:hover,
.tank-arrow:hover {
    background-image: radial-gradient(var(--c2),var(--c3));
}

/* --------------- ALARMES --------------- */

.alarm-table {
    max-width: 1350px;
    width: 100%;
    margin-bottom: 2rem auto;
    border-collapse: collapse;
    box-shadow: 0 0 15px rgba(212,239,238,0.1), inset 0 0 100px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    margin-bottom: 1rem;
}

.alarm-table th, .alarm-table td {
    padding: 12px;
    border: 2px solid var(--c5);
    text-align: left;
    cursor: pointer;
    color: var(--c5);
}

.alarm-table th {
    background-color: var(--c6);
    color: var(--c5);
}

.alarm-table tbody tr:hover {
    background-color: var(--c6);
    color: var(--c5);
    cursor: pointer;
}

.alarm-table tbody tr:active {
    background-color: var(--c1);
    color: var(--c5);
}

.download-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.texto-clicavel {
    color:var(--c3);
    text-decoration: underline;
    text-align: center;
    cursor: pointer;
}

.texto-clicavel:hover {
    color:var(--c5);
}

#loadingOverlay {
    position: fixed;
    top: -10%;
    left: 0;
    width: 100%;
    height: 110%;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 9999;
    color: var(--c5);
}

#page-info, #consumo-page-info {
    color: var(--c5);
    padding-bottom: 30px;
}

#loadingOverlay img {
    max-width: 250px; /* Ajuste o tamanho conforme necessário */
    max-height: 250px;
    z-index: 10000; /* Garante que a imagem fique na frente */
}

#pagination, #pagination-consumo {
    text-align: center;
    margin-bottom: 1rem;
}

#filter-container {
    margin: 10px 0;
    text-align: center;
}

#filter {
    padding: 5px;
    font-size: 16px;
}

#alarm-container {
    display: flex;
    position: relative;
}

#TabelaAlarmes {
    overflow-x:auto;
    flex: 1;
}

#button-overlay {
    width: 50px; /* Ajuste conforme necessário */
    position: absolute;
    top: 0;
    right: 0;
}

.notification-dot {
    width: 12px; 
    height: 12px;
    background-color: #e05c43;
    border-radius: 50%;
    position: absolute;
    top: 0; 
    right: -8px; /* Ajuste para posicionar no canto superior direito */
    display: none; /* Inicialmente escondido */
    border: 2px solid var(--c1); /* Para criar o efeito de contorno */
}

.nav-link.position-relative {
    position: relative;
}


/* --------------- PopUp Exportação --------------- */

#intervalTimeUnit {
    background-color: #4F778D;
    border: 1px solid var(--c5);
    border-radius: 4px;
    color: var(--c5);
    font-size: 16px;
    margin-bottom: 20px;
    padding: 10px;
    text-align: left;
    cursor: pointer;
}

#intervalTimeInput {
    width: 100px;
}

#btnSelect{
    background-color: var(--c3);
}

#btnSelect:hover{
    background-color: var(--c5);
}

.popup-nav {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.nav-button {
    background-color: rgba(212,239,238,0.5);
    border: 1px solid var(--c5);
    padding: 10px 20px;
    cursor: pointer;
}

.nav-button-o {
    background-color: rgba(212,239,238,0.5);
    border: 1px solid var(--c5);
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 0.25rem;
    color: var(--c5);
    font-size: 1.125rem; /* Unidades relativas */
    text-decoration: none;
}

.nav-button-o:hover {
    background-color: var(--c4);
    color: var(--c1);
    border-color: var(--c1);
}

.tab-content {
    display: block;
}

.alarm-table-popup {
    width: 100%;
    border-collapse: collapse;
}

.alarm-table-popup th, .alarm-table-popup td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
}

#alarm-body-popup {
    max-height: 200px; 
    overflow-y: auto; 
    display: block; 
}
.alarm-row {
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.alarm-row:hover {
    background-color: rgba(212,239,238,0.2);
}
.alarm-row.selected {
    background-color: rgba(212,239,238,0.5);
}
.alarm-row.anomalia {
    background-color: #ac2f2f;
}
.alarm-row.anomalia:hover {
    background-color: #915353;
}

.alarm-table-popup tbody {
    display: block;
}
.alarm-table-popup thead, .alarm-table-popup tbody tr {
    display: table;
    width: 100%;
    table-layout: fixed;
}

.ship-list {
    margin-top: 1rem;
    border-width: 2px;
    border: 3px solid var(--c5);
    border-radius: 10px;
    padding: 2rem;
    width: 70%;
    min-width: 25rem;
    position: relative;
    /* Centralizar horizontalmente a .ship-list na tela */
    margin-left: auto;
    margin-right: auto;
    /* Centralizar o conteúdo dentro da .ship-list */
    display: flex;
    flex-direction: column; /* Itens empilhados verticalmente */
    align-items: center; /* Centraliza horizontalmente os itens */
    justify-content: center; /* Centraliza verticalmente os itens */
    z-index: 0;
    box-shadow: 0 0 25px rgba(212,239,238, 0.5), inset 0 3px 100px rgba(0, 0, 0, 0.5);
}

.ship-list:hover{
    background-color: var(--c1);
    cursor: pointer;
    box-shadow: 0 3px 100px rgba(0, 0, 0, 0.5), inset 0 0 25px rgba(212,239,238, 0.5);
}

/* Título */
.title {
    display: flex;
    text-align: left;
    color: var(--c5);
    margin-bottom: 15px;
}

/* Cada grupo de variáveis */
.tanques-navio .variaveis-navio {
    display: flex;
    justify-content: space-between;
    width: 100%; /* Tamanho do grupo */
}

.variable-group-mobile {
    width: 100%;
}
  
.variable-box {
    width: calc(25% - 15px);
    border-radius: 10px;
    padding: 0;
    color: var(--c5);
    border: 2px solid var(--c5);
    position: relative;
    overflow: hidden;
    display: flex;           /* Flexbox para centralizar */
    flex-direction: column;  /* Mantém o conteúdo empilhado verticalmente */
    justify-content: center; /* Centraliza verticalmente o conteúdo */
    align-items: center;     /* Centraliza horizontalmente o conteúdo */
    text-align: center;      /* Centraliza o texto dentro da box */
    box-shadow: 0 0 5px rgba(212,239,238, 0.5), inset 0 3px 10px rgba(0, 0, 0, 0.5);
}

.variable-box-content {
    position: relative;
    z-index: 2;
    padding: 10px;
    color: var(--c5);
    font-size: 1rem;   /* Tamanho da fonte para conteúdo regular */
}

/* Cada variável deve ser um bloco empilhado */
.nt-var-box {
    display: flex;
    flex-direction: row;          /* nome e valor lado a lado */
    justify-content: space-between;
    align-items: center;
    width: 100%;                  /* ocupa toda a largura disponível */
    margin-bottom: 6px;           /* espaço entre variáveis */
    padding: 4px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    box-sizing: border-box;
}

/* Nome da variável (lado esquerdo) */
.nt-var-name {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
    font-family: 'Helvetica', Courier, monospace;
    color: white;
}

/* Valor da variável (lado direito) */
.nt-var-value {
    margin: 0;
    font-size: 1rem;
    font-weight: bold;
    font-family: 'Helvetica', Courier, monospace;
    color: white;
    text-align: right;
    flex-shrink: 0; /* impede que o valor seja "espremido" */
}

.fill-bar {
    background-image: linear-gradient(to right, var(--c2), var(--c3));
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    z-index: 1;
    pointer-events: none;
    box-shadow: inset 0 0 50px rgba(0,0,0,0.2);
}

/* Nome das variáveis */
.variable-name {
    font-weight: bold;
    color: var(--c5); /* Cor do texto */
}
  
/* Valores das variáveis */
.variable-value {
    border-radius: 10px;
    color: var(--c5);
    font-size: 1.5rem; /* Aumenta o tamanho da fonte para os valores */
    font-weight: bold; /* Deixa o valor mais destacado */
    margin: 5px 0;     /* Espaçamento vertical ao redor do valor */
}

.tanques-navio, .variaveis-navio {
    display: flex;
    flex-wrap: wrap; /* Permite que os itens quebrem para a próxima linha */
    gap: 20px; /* Espaçamento entre os itens */
}

.map-block {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 1rem;
    text-align: center;
    text-decoration: none;
}

.map-block:hover {
    cursor: pointer;  
}

.status-indicator {
    display: flex;
    align-items: center;
    margin-left: auto; /* Empurra para a direita */
    padding-right: 15px; /* Espaçamento */
}

.status-indicator .circle-white {
    width: 8px;
    height: 8px;
    background-color: var(--c5);
    border-radius: 50%;
}

.status-indicator .circle-blue {
    width: 8px;
    height: 8px;
    background-color: var(--c3);
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(212,239,238,1), inset 0 0 100px rgba(0, 0, 0, 0.2);
}

.status-indicator .text-white {
    color: var(--c5);
    font-size: 15px;
    margin-right: 5px; /* Espaço entre o texto e o círculo */
}

.status-indicator .text-blue {
    color: var(--c3);
    font-size: 15px;
    margin-right: 5px; /* Espaço entre o texto e o círculo */
}

.footer-link {
    color: var(--c5);
    text-decoration: none;
}

.footer-link:hover {
    text-decoration: underline;
    cursor: pointer;
}

.footer-custom {
    bottom: 0;
    position: fixed;
    margin-top: 2rem;
    width: 100%;
    justify-content: center;
    align-items: center;
    justify-items: center;
    text-align: center;
}

/* Mapa */
.map-container {
    position: relative; /* Para estabelecer contexto, se necessário */
    width: 100%;
    text-align: center;
    margin-top: 3rem; /* Compensar a altura da barra fixa, se necessário */
    overflow: hidden;
}

#ship-map {
    width: 100%;
    height: 20rem;
    border: 2px solid var(--c5);
    border-radius: 10px;
    margin-top: 1rem;
    z-index: 0;
}

.map-title {
    color: var(--c5);
    font-size: 1.5rem;
    text-align: center !important;
    margin-bottom: 1rem;
}

.espaco {
    margin: 10rem;
}