@import url('https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,100..900;1,100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Reset e estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    height: 100%;
	font-family: "Inter", sans-serif;    
	background-color: #f5f7fa;
    overflow-x: hidden;
    overflow: hidden;       
    display: flex;
    flex-direction: column;
    min-height: 100vh    
    margin: 0;
    padding: 0;
    
}

input {
	font-family: "Inter", sans-serif; 
}

/* Container principal da página */
body {
    display: flex;
    flex-direction: column;
}

/* Container principal */
.login-wrapper {
    flex: 1 0 auto; /* Cresce para preencher o espaço disponível */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* Centraliza verticalmente o conteúdo */
    padding: 20px;
    width: 100%;
}

/* Cabeçalho */
.login-header {
    text-align: center;
    margin-bottom: 30px;
    width: 100%;
    max-width: 480px;
}

h1 {
	font-family: "Raleway", sans-serif;
}


.login-header h1 {
    color: #2c3e50;
    font-size: 28px;
    font-weight: 500;
    margin-bottom: 8px;
}

.login-header p {
    color: #7f8c8d;
    font-size: 16px;
    font-weight: 300;
}

/* Container do formulário - SOLUÇÃO DEFINITIVA */
.login-container {
    width: 100%;
    max-width: 480px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 40px;
    margin: 0 auto;
    position: relative; /* Para posicionamento absoluto dos erros */
}

/* Caixa de login */
.login-box {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Container de mensagens de erro - NÃO AFETA O LAYOUT */
.error-message-container {
    position: absolute;
    bottom: -20px;
    left: 40px;
    right: 40px;
    transform: translateY(100%);
}

.error-message {
    color: #e74c3c;
    background-color: #fdecea;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    display: none;
    border: 1px solid #f5c6cb;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.error-message.show {
    display: block;
    animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Grupos de input */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    color: #2c3e50;
    font-size: 14px;
    font-weight: 400;
}

/* Inputs */
.login-input {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    font-size: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background-color: #f9f9f9;
    transition: all 0.3s ease;
    color: #34495e;
}

.login-input:focus {
    border-color: #3498db;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    outline: none;
}

.login-input::placeholder {
    color: #95a5a6;
    opacity: 0.7;
}

/* Botão */
.login-button {
    width: 100%;
    height: 48px;
    background: #3498db;
    color: white;
    font-size: 16px;
    font-weight: 500;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-button:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.login-button:active {
    transform: translateY(0);
}

/* Links */
.forgot-password {
    color: #7f8c8d;
    font-size: 14px;
    text-decoration: none;
    text-align: center;
    transition: color 0.3s;
    margin-top: 10px;
    display: inline-block;
}

.forgot-password:hover {
    color: #3498db;
    text-decoration: underline;
}

/* Aviso de navegador */
.browser-warning {
    color: #e74c3c;
    background-color: #fdecea;
    padding: 16px;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
    display: none;
    border: 1px solid #f5c6cb;
    margin-top: 20px;
}

.browser-button {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
    margin-top: 10px;
}

.browser-button:hover {
    background: #2980b9;
}

/* Recaptcha */
.g-recaptcha {
    margin: 20px auto;
    transform: scale(0.95);
    transform-origin: center;
}

/* Dialog de navegadores */
.browser-dialog {
    border-radius: 8px !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2) !important;
    border: none !important;
}

.browsers-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.browsers-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.browsers-table img {
    width: 24px;
    height: 24px;
    vertical-align: middle;
    margin-right: 10px;
}

/* Responsividade */
@media (max-width: 480px) {
    .login-container {
        padding: 30px 20px;
    }
    
    .error-message-container {
        left: 20px;
        right: 20px;
    }
    
    .login-header h1 {
        font-size: 24px;
    }
    
    .login-header p {
        font-size: 14px;
    }
    
    .login-input, .login-button {
        height: 44px;
    }
    
    .g-recaptcha {
        transform: scale(0.85);
    }
}

@media (max-width: 360px) {
    .login-container {
        padding: 25px 15px;
    }
    
    .error-message-container {
        left: 15px;
        right: 15px;
    }
    
    .login-input, .login-button {
        font-size: 14px;
    }
    
    .forgot-password {
        font-size: 13px;
    }
}

/* Container de mensagens de erro - PADRÃO PARA TODAS AS PÁGINAS */
.error-message-container {
    position: absolute;
    bottom: -15px;
    left: 0;
    right: 0;
    padding: 0 40px;
    transform: translateY(100%);
    z-index: 10;
}

.error-message {
    color: #e74c3c;
    background-color: #fdecea;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    display: none;
    border: 1px solid #f5c6cb;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.error-message p {
    margin: 5px 0;
}

.error-message.show {
    display: block;
    animation: fadeInUp 0.3s ease-out;
}

/* Ajuste para páginas sem recaptcha */
.no-recaptcha .login-container {
    padding-bottom: 60px; /* Espaço extra para mensagens de erro */
}

/* Responsividade */
@media (max-width: 480px) {
    .error-message-container {
        padding: 0 20px;
    }
}

@media (max-width: 360px) {
    .error-message-container {
        padding: 0 15px;
    }
}

/* Mensagem de sucesso */
.success-message {
    color: #2e7d32;
    background-color: #e8f5e9;
    padding: 16px 20px;
    border-radius: 6px;
    font-size: 15px;
    line-height: 1.5;
    border: 1px solid #c8e6c9;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    width: 100%;
    animation: fadeInUp 0.3s ease-out;
}

.success-message p {
    margin: 8px 0;
    color: #2c3e50;
    font-weight: 400;
}

.success-message strong {
    font-weight: 500;
    color: #1b5e20;
}

/* Mensagens de status (sucesso, aviso, erro, info) */
.success-message,
.warning-message,
.error-message,
.info-message {
    padding: 16px 20px;
    border-radius: 6px;
    font-size: 15px;
    line-height: 1.5;
    width: 100%;
    margin-top: 10px;
    animation: fadeInUp 0.3s ease-out;
}

/* Sucesso */
.success-message {
    color: #2e7d32;
    background-color: #e8f5e9;
    border: 1px solid #c8e6c9;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Aviso */
.warning-message {
    color: #8a6d3b;
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Erro */
.error-message {
    color: #e74c3c;
    background-color: #fdecea;
    border: 1px solid #f5c6cb;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Informação */
.info-message {
    color: #31708f;
    background-color: #d9edf7;
    border: 1px solid #bce8f1;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.success-message p,
.warning-message p,
.error-message p,
.info-message p {
    margin: 8px 0;
    color: #2c3e50;
    font-weight: 400;
}

.success-message strong,
.warning-message strong,
.error-message strong,
.info-message strong {
    font-weight: 500;
}

/* body {
  background: #f7f9fc;
  margin: 0;
  padding: 16px;
  color: #333;
}

.header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
} */

/* .menu-btn {
  border: none;
  background: none;
  font-size: 22px;
  cursor: pointer;
} */

/* .filter {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
} */

.filter select,
.filter input {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 12px;
  font-size: 14px;
}

.status-legend {
  display: flex;
  justify-content: space-around;
  margin-bottom: 16px;
  font-size: 14px;
}

.status {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  margin-right: 6px;
}

.status.ok {
  background: #28c76f;
}

.status.fail {
  background: #ff4d4f;
}

.card {
  background: white;
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.card-header {
  display: flex;
  justify-content: space-between;
  font-weight: bold;
  margin-bottom: 6px;
}

.subtitle {
  color: #666;
  font-size: 14px;
  margin: 0 0 8px;
}

.temperature {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}

.temperature strong {
  font-size: 18px;
}

/* Footer sempre no final da página */
footer {
    text-align: center;
    background: #f7fbff;
    border-top: 1px solid #e0e0e0;
    font-size: 14px;
    color: #667;
    width: 100%;
}

nav a {
  display: block;
  padding: 8px 12px;
  color: #334155;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

nav a i {
  margin-right: 5px;
  color: #3498db;
  width: 18px; /* mantém alinhamento dos textos */
  text-align: center;
}

nav a:hover {
  background-color: #f4f7fb;
  color: #2980b9;
}

nav a:hover i {
  color: #2980b9;
}

.nav-separator {
  margin-top: 10px;
  font-weight: 600;
  font-size: 0.85rem;
  color: #64748b;
  padding: 6px 12px;
}

.nav-separator-line {
  border-top: 1px solid #e2e8f0;
  margin: 10px 0;
}

/* === Menu Hambúrguer === */
.menu-toggle {
    position: fixed; top:14px; left:14px; width:44px; height:44px; border-radius:10px; background:#fff; border:none;
    display:flex; align-items:center; justify-content:center; font-size:24px; color:#0073e6; cursor:pointer; z-index:2200;
}
.side-menu {
    position:fixed; top:0; left:-280px; width:280px; height:100%; background:#fff; box-shadow:2px 0 20px rgba(0,0,0,0.08);
    transition:left 0.28s ease; z-index:2100; display:flex; flex-direction:column;
}
.side-menu.active { left:0; }
.side-menu .menu-header { padding:18px 16px; border-bottom:1px solid #f0f0f0; background:linear-gradient(180deg,#f7fbff 0%,#fff 100%); }
.side-menu .user-info { display:flex; gap:12px; align-items:center; }
.side-menu .avatar { width:46px; height:46px; border-radius:8px; background:#e8f0ff; display:flex; align-items:center; justify-content:center; font-size:20px; color:#0073e6; }
.side-menu .user-info .details span { display:block; font-weight:500; color:#223; font-size:1rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.side-menu .user-info .details small { display:block; font-size:0.8rem; color:#667; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.side-menu nav { padding:10px 14px; flex:1; overflow:auto; }
.side-menu nav a { display:block; padding:12px 8px; margin-bottom:6px; border-radius:6px; font-weight:500; text-decoration:none; color:#223; font-size: 13px; }
.side-menu nav a:hover { background:#f2f8ff; color:#0073e6; }
.side-menu .close-menu { position:absolute; top:12px; right:12px; width:34px; height:34px; border:none; background:transparent; font-size:20px; cursor:pointer; color:#667; }
.side-menu-footer {
    margin-top: auto;
    text-align: center;
    font-size: 0.85rem;
    color: #667;
    border-top: 1px solid #f0f0f0;
}


/* === Overlay === */
.overlay { position:fixed; inset:0; background:rgba(0,0,0,0.28); opacity:0; visibility:hidden; transition:opacity 0.28s ease; z-index:2050; }
.overlay.active { opacity:1; visibility:visible; }

/* === Carousel Principal - CORREÇÃO COMPLETA === */
.carousel-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
}

.carousel {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.carousel-inner {
    display: flex;
    transition: transform 0.4s ease;
    width: 100%; /* deixa flex distribuir os slides */
}

.carousel-inner .edificio {
    flex: 0 0 100%; /* cada slide ocupa 100% */
    max-width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    padding: 0;
}

.carousel-inner .edificio img {
    width: 100%;
    height: 400px;
	object-fit: contain;
    border-radius: 8px 8px 8px 8px;
    display: block;
}

.carousel-inner .edificio p {
    margin: 10px 0;
    font-weight: 500;
    color: #2c3e50;
    font-size: 16px;
    padding: 0 15px;
    word-break: break-word;
    line-height: 1.3;
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(0,0,0,0.3);
    border: none;
    color: white;
    font-size: 2em;
    cursor: pointer;
    padding: 0 10px;
}

.carousel-button.prev { left: 15px; }
.carousel-button.next { right: 15px; }

.carousel-button:hover {
    background: white;
    color: #2980b9;
    transform: translateY(-50%) scale(1.1);
}

.carousel-counter {
    text-align: center;
    margin: 15px 0;
    font-weight: 600;
    color: #2c3e50;
    font-size: 15px;
}

#acessarForm {
    margin-top: 15px;
}

/* Responsividade */
@media (max-width: 768px) {
    .carousel .edificio img {
        height: 400px;   
    }
    .carousel-button {
        display: none;
    }
}

@media (max-width: 480px) {
    .carousel .edificio img {
        height: 400px;
    }

    .carousel .edificio p {
        font-size: 14px;
        padding: 0 10px;
    }

    .carousel-button {
        display: none;
    }

    .carousel-button.prev { left: 8px; }
    .carousel-button.next { right: 8px; }
}

/* Botões de navegação do carousel - VERSÃO MINIMALISTA */
@media (min-width: 769px) {
    .carousel-button {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 10;
        background: rgba(255, 255, 255, 0.9);
        border: none;
        color: #2c3e50;
        font-size: 1.1em;
        cursor: pointer;
        padding: 0;
        border-radius: 50%;
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.25s ease;
        box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1);
        opacity: 0.8;
    }

    .carousel-button.prev { 
        left: 15px; 
    }
    
    .carousel-button.next { 
        right: 15px; 
    }

    .carousel-button:hover {
        background: rgba(255, 255, 255, 1);
        color: #3498db;
        transform: translateY(-50%) scale(1.05);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
        opacity: 1;
    }

    .carousel-button:active {
        transform: translateY(-50%) scale(0.95);
    }

    /* Aparecer apenas quando passar o mouse no carousel */
    .carousel-wrapper:hover .carousel-button {
        opacity: 0.8;
    }
    
    .carousel-button {
        opacity: 0;
    }
}



.login-button { width: 100%; max-width: 100%; text-align: center; padding: 12px 0; font-size: 16px; border-radius: 8px; background: #3498db; color: #fff; border: none; cursor: pointer; transition: background 0.3s; }
.login-button:hover { background: #2980b9; }

/* Caixa principal */
.history-box {
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    max-width: 800px;
    margin: 0 auto 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Grupos de input */
.history-box .input-group {
    display: flex;
    flex-direction: column;
}

/* Labels */
.history-box label {
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 6px;
    color: #334155;
}

/* Inputs e selects */
.history-box .history-input {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    font-size: 14px;
    transition: all 0.2s ease;
}

.history-box .history-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52,152,219,0.2);
}

/* Botão */
.history-button {
    background-color: #3498db;
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.history-button:hover {
    background-color: #2779bd;
}

/* Resultados */
.history-results {
    margin-top: 16px;
    width: 100%;
}

