/* === ESTILOS GENERALES — MODO OSCURO === */
:root {
  --fondo: #0e0e11;
  --fondo-claro: #1b1b1f;
  --texto: #eaeaea;
  --texto-sec: #aaa;
  --borde: #333;
  --azul: #007bff;
  --azul-hover: #3390ff;
  --rojo: #dc3545;
  --verde: #28a745;
  --sombra: 0 0 15px rgba(0,0,0,0.4);
  font-family: "Inter", system-ui, sans-serif;
}

body {
  margin: 0;
  background-color: var(--fondo);
  color: var(--texto);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
}

/* === CONTENEDOR GENERAL === */
.container {
  background: var(--fondo-claro);
  border-radius: 12px;
  padding: 40px;
  box-shadow: var(--sombra);
  width: 90%;
  max-width: 420px;
  margin-top: 60px;
  backdrop-filter: blur(8px);
  background: rgba(40, 40, 45, 0.75);
  border: 1px solid rgba(255,255,255,0.05);
}

/* === CABECERA GLOBAL (LOGO + NOMBRE + MENÚ DEBAJO) === */
/* === CABECERA GLOBAL (LOGO IZQUIERDA + MENÚ DERECHA EN ESCRITORIO) === */
.header-app {
  width: 100%;
  background: var(--fondo-claro);
  display: flex;
  flex-direction: row; /* ✅ ahora horizontal */
  align-items: center;
  justify-content: space-between; /* logo izq, menú der */
  padding: 10px 25px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
}


/* === BLOQUE IZQUIERDO: LOGO + NOMBRE === */
.header-left {
  display: flex;
  flex-direction:column;
  align-items: center;
  gap: 8px;
}

.header-left .logo-app {
  height: 55px;
}

.titulo-app {
  color: var(--texto);
  font-size: 1.4em;
  font-weight: 600;
  margin: 0;
}
.alert-trial {
    padding: 18px;
    border-radius: 10px;
    margin: 15px 0;
    font-size: 1em;
    font-weight: 500;
}

.alert-trial.aviso {
    background: #003366;
    color: #d0e7ff;
    border-left: 5px solid #3399ff;
}

.alert-trial.urgente {
    background: #664400;
    color: #ffe7b3;
    border-left: 5px solid #ffcc00;
}

.alert-trial.terminado {
    background: #4c0000;
    color: #ffb3b3;
    border-left: 5px solid #ff0000;
}

.nombre-alojamiento {
  color: #00d084;
  font-size: 1em;
  margin: 0;
  font-weight: 600;
}

/* === NAVBAR — CENTRADO DEBAJO DEL NOMBRE (solo escritorio) === */
.navbar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 10px; /* separa del nombre */
}

.btn-nav {
  text-decoration: none;
  color: var(--azul-hover);
  font-weight: bold;
  transition: color 0.2s, background 0.2s;
  padding: 6px 10px;
  border-radius: 6px;
}

.btn-nav:hover { 
  color: white; 
  background: #2a2a2f;
}

.btn-nav.salir:hover { 
  color: var(--rojo); 
}

/* === BOTÓN HAMBURGUESA (solo móvil) === */
.menu-toggle {
  display: none;
  font-size: 1.8em;
  color: #00d084;
  cursor: pointer;
  background: rgba(0,0,0,0.35);
  border: none;
  border-radius: 6px;
  padding: 4px 10px;
  position: absolute;
  top: 15px;
  right: 20px;
  transition: background 0.2s, transform 0.2s;
}

.menu-toggle:hover {
  background: rgba(0,0,0,0.55);
  transform: scale(1.05);
}

/* === CONTENIDO DEL PANEL === */
.panel-container {
  margin-top: 5px;
  width: 95%;
  max-width: 900px;
  background: var(--fondo-claro);
  border-radius: 12px;
  padding: 30px;
  box-shadow: var(--sombra);
  text-align: center;
}

.panel-container h3 {
  color: #00d084;
  margin-bottom: 15px;
}

/* === FORMULARIOS === */
form label {
  display: block;
  margin-top: 15px;
  margin-bottom: 5px;
  color: var(--texto-sec);
  font-weight: 500;
}

form input,
form select {
  width: 100%;
  background: #2a2a2f;
  color: var(--texto);
  border: 1px solid var(--borde);
  border-radius: 8px;
  padding: 10px;
  font-size: 1em;
  transition: border 0.2s;
}

form input:focus,
form select:focus {
  border-color: var(--azul);
  outline: none;
}

/* === BOTONES === */
button {
  background: var(--azul);
  border: none;
  color: white;
  padding: 12px;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: 500;
  width: 100%;
  margin-top: 20px;
  cursor: pointer;
  transition: background 0.2s;
}
button:hover { background: var(--azul-hover); }

/* === TEXTOS Y ENLACES === */
h2 {
  text-align: center;
  color: var(--texto);
  margin-bottom: 20px;
}
p { color: var(--texto-sec); line-height: 1.5; }
a { color: var(--azul-hover); text-decoration: none; }
a:hover { text-decoration: underline; }

/* === MENSAJES FLOTANTES === */
.mensaje-flotante {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  width: 90%;
  max-width: 600px;
  border-radius: 10px;
  padding: 16px 20px;
  font-size: 1.05em;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 0 15px rgba(0,0,0,0.4);
  backdrop-filter: blur(5px);
  animation: aparecer 0.4s ease;
}
@keyframes aparecer {
  from { opacity: 0; transform: translate(-50%, 20px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
.mensaje-flotante.exito {
  background-color: #144d2c;
  color: #b6ffbf;
  border: 2px solid #29a05d;
}

.mensaje-flotante.error {
  background-color: #4d1414;
  color: #ffb3b3;
  border: 2px solid #e04b4b;
}
.mensaje-flotante button {
  background: transparent;
  border: none;
  color: inherit;
  font-size: 18px;
  cursor: pointer;
  margin-left: 12px;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .header-app {
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    flex-direction: row;
    padding: 10px 15px;
  }

  .menu-toggle {
    display: block;
  }

  .navbar {
    display: none;
    flex-direction: column;
    width: 100%;
    background: var(--fondo-claro);
    text-align: center;
    padding: 10px 0;
    border-top: 1px solid var(--borde);
    margin-top: 10px;
  }

  .navbar.active {
    display: flex;
  }

  .btn-nav {
    padding: 10px 0;
    width: 100%;
    border-bottom: 1px solid #222;
  }

  .btn-nav:last-child {
    border-bottom: none;
  }

  .panel-container {
    width: 95%;
    padding: 20px;
    margin-top: 50px;
  }

  .header-left {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .titulo-app {
    
    font-size: 1.2em;
  }

  .header-left .logo-app {
    height: 45px;
  }

  .qr-container #qrcode {
    width: 140px !important;
    height: 140px !important;
  }
}

/* === SCROLLBAR PERSONALIZADO === */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0f0f12; }
::-webkit-scrollbar-thumb { background-color: #333; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background-color: #555; }
/* === 💻 Ajuste de cabecera en modo escritorio (logo izquierda + menú completo visible) === */
@media (min-width: 769px) {
  .header-app {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 10px 40px;              /* 🔧 más espacio lateral */
    overflow: visible;               /* asegura que no recorte contenido */
  }

  .navbar {
    display: flex !important;
    justify-content: flex-end;
    flex-wrap: nowrap;               /* evita saltos de línea */
    gap: 25px;
    background: none;
    width: auto;
    position: static;
    margin-left: auto;
  }

  .btn-nav {
    white-space: nowrap;             /* 🔧 evita que el texto se rompa en dos líneas */
    font-weight: 500;
    padding: 6px 12px;
    color: var(--texto);
  }

  .menu-toggle {
    display: none;                   /* oculta el botón ☰ en escritorio */
  }
}
/* === 💻 Corrección final: evitar que el menú se corte en el borde derecho === */
@media (min-width: 769px) {
  html, body {
    overflow-x: hidden; /* evita scroll horizontal por el header */
  }

  .header-app {
    position: relative;         /* antes era fixed */
    top: 0;
    left: 0;
    width: 100%;
    padding: 10px 60px;         /* 🔧 más espacio lateral */
    box-sizing: border-box;     /* el padding cuenta dentro del ancho total */
  }

  main.panel-container {
    margin-top: 1px;          /* ajusta margen superior, ya que header ya no es fixed */
  }

  .navbar {
    flex-wrap: nowrap;
    gap: 30px;
  }

  .btn-nav {
    font-size: 1em;
    white-space: nowrap;
  }
}
/* === 📱 Ajuste: botón menú a la derecha en móvil === */
@media (max-width: 768px) {
  .header-app {
    position: relative;
  }

  .menu-toggle {
    position: absolute;
    top: 15px;
    right: 15px;
    margin: 0;
    background: rgba(0,0,0,0.35);
    border: none;
    border-radius: 6px;
    padding: 4px 10px;
  }

  .header-left {
    width: 100%;
    justify-content: flex-start;
  }

  .titulo-app,
  .nombre-alojamiento {
    text-align: left;
  }
}
/* === 📱 Corrección definitiva: botón ☰ visible a la derecha === */
@media (max-width: 768px) {
  .header-app {
    display: flex;
    flex-direction: row;
    justify-content: flex-start; /* logo a la izquierda */
    align-items: center;
    position: relative;
  }

  .header-left {
    flex: 1; /* ocupa todo el espacio disponible */
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .menu-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%); /* centrado vertical perfecto */
    display: block;
    background: rgba(0,0,0,0.35);
    border: none;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 1.8em;
    color: #00d084;
    cursor: pointer;
  }
}
/* === FOOTER PANEL EMPLEADOS === */
.footer-empleados {
    margin-top: 40px;
    padding: 20px 10px;
    text-align: center;
    background: var(--fondo-claro);
    border-top: 1px solid var(--borde);
    color: var(--texto-sec);
}

.footer-empleados .footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 12px;
}

.footer-empleados .footer-links a {
    color: var(--white);
    font-size: 14px;
    text-decoration: none;
    transition: 0.2s;
}

.footer-empleados .footer-links a:hover {
    color: var(--azul-hover);
    text-decoration: underline;
}

.footer-empleados .copy {
    font-size: 13px;
    color: var(--texto-sec);
    margin-top: 10px;
}

