/* Reset basico */
* {
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
}
/* Cuerpo y background */
body {
   margin: 0;
  padding: 0;
  min-height: 100vh;

  /* Overlay oscuro + imagen */
  background-image:
    linear-gradient(
      rgba(0, 0, 0, 0.55),
      rgba(0, 0, 0, 0.55)
    ),
    url("/images/salaEstudio.jpg");

  background-size: cover;
  background-position: center;
  background-attachment: fixed;

  font-family: Arial, Helvetica, sans-serif;
}

/* Contenedor principal */
#main {
  max-width: 800px;
  margin: 40px auto;
  background: #fff;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Header */
#header h1 {
  margin-top: 0px;
  margin-bottom: 2px;
  color: #2c3e50;
}

#header p {
  margin-top: 0px;
  color: #666;
  padding-top: 20;
}
.header-row {
 display: flex;
  align-items: center;          /* CLAVE */
  justify-content: space-between;
}
.miniLogo {
   height: 110px;      /* ajusta tamaño */
  width: auto;
  
}
/* subtitulo */
.subtitulo{
  margin-top: 8px;
  margin-bottom: 18px;
  line-height: 1.35;
}

.subtitulo-titulo{
  color: #2c3e50;
  font-weight: 600;
}

.subtitulo-detalle{
  color: #6b7280;
  font-size: 0.95rem;
}

/* Formulario */
#formulario label {
  display: block;
  margin-top: 15px;
  font-weight: bold;
}

#formulario input,
#formulario select {
  width: 100%;
  padding: 8px;
  margin-top: 5px;
}

#boton {
  margin-top: 20px;
}

#boton button {
  padding: 10px 20px;
  background: #3498db;
  border: none;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  border-radius: 4px;
}

#boton button:hover {
  background: #2980b9;
}

/* Resultado */
#resultado {
  margin-top: 25px;
}

/* Mensajes */
.ok {
  background: #e8f8f1;
  border: 1px solid #2ecc71;
  padding: 15px;
  border-radius: 5px;
}

.error {
  background: #fdecea;
  border: 1px solid #e74c3c;
  padding: 15px;
  border-radius: 5px;
}

.error ul {
  margin: 0;
  padding-left: 20px;
}

/* Footer */
#footer {
  margin-top: 30px;
  text-align: center;
  color: #888;
}

/* Bloques horarios */
#bloques-horarios{
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.bloque{
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.15);
  cursor: pointer;
  font-weight: bold;
  background: #f7f7f7;
}

.bloque:hover{
  transform: translateY(-1px);
}

.bloque.disponible{ background: #e8f8f1; border-color: #2ecc71; }
.bloque.reservado{ background: #fdecea; border-color: #e74c3c; cursor: not-allowed; }
.bloque.pasado{ background: #eeeeee; border-color: #999; cursor: not-allowed; }

.bloque.seleccionado{
  outline: 3px solid rgba(52,152,219,0.35);
}

.estado-info{
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #f4f6f8;
  border-left: 4px solid #3498db;
  color: #2c3e50;
  font-size: 0.95rem;
}
.estado-info b{
  color: #3498db;
}

/* trancisiones para que parezca framework moderno sin serlo xD */

#formulario input,
#formulario select{
  transition: 
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background-color 0.15s ease;
}

#formulario input:focus,
#formulario select:focus{
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52,152,219,0.15);
  outline: none;
}

.bloque.disponible:hover{
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(46,204,113,0.25);
}

.bloque.seleccionado{
  background: #e8f8f1;
  border-color: #2ecc71;
  box-shadow: 0 0 0 3px rgba(46,204,113,0.25);
}

/* boton reservar */
#boton button{
  transition:
    background-color 0.15s ease,
    transform 0.1s ease,
    box-shadow 0.1s ease;
}

#boton button:hover{
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(52,152,219,0.35);
}

#boton button:active{
  transform: translateY(0);
  box-shadow: 0 3px 8px rgba(52,152,219,0.25);
}

/* aparicion suave mensajes de estado */
#estadoDisponibilidad,
#resultado{
  animation: fadeSlideIn 0.2s ease;
}

@keyframes fadeSlideIn{
  from{
    opacity: 0;
    transform: translateY(4px);
  }
  to{
    opacity: 1;
    transform: translateY(0);
  }
}
/* Boton deshabilitado (modo invitado) */
#boton button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
/* -----------------------------------
   Modal sesión cerrada
   ----------------------------------- */

.logout-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.logout-modal.show {
  display: flex;
}

.logout-card {
  background: #ffffff;
  padding: 28px 32px;
  border-radius: 14px;
  text-align: center;
  max-width: 360px;
  width: 100%;
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
}

.logout-card h3 {
  margin-top: 0;
  color: #2c3e50;
}

.logout-card p {
  color: #555;
  margin-bottom: 22px;
}

.logout-card button {
  padding: 10px 18px;
  border-radius: 8px;
  border: none;
  background: #3498db;
  color: #fff;
  cursor: pointer;
  font-size: 15px;
}

.logout-card button:hover {
  background: #2980b9;
}
/* ==========================================================================
   VALIDACIÓN DE QR (validar_token.php)
   ========================================================================== */

.qr-validate-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.qr-validate-card {
  width: 720px;
  max-width: 100%;
  background: #ffffff;
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.18);
}

.qr-validate-header {
  margin-bottom: 10px;
}

.qr-status-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.4px;
  border: 1px solid rgba(0,0,0,0.08);
}

/* Estados */
.qr-status-vigente {
  background: #eaf7ee;
  color: #1a7f37;
}

.qr-status-expirado {
  background: #fff3e6;
  color: #9a4d00;
}

.qr-status-revocado {
  background: #fdecec;
  color: #b42318;
}

.qr-status-error {
  background: #f3f4f6;
  color: #374151;
}

.qr-validate-message {
  margin-top: 10px;
  font-size: 15px;
}

.qr-validate-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
  margin-top: 16px;
}

.qr-validate-item {
  background: #f6f7f8;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
}

.qr-validate-item b {
  display: block;
  font-size: 12px;
  opacity: 0.7;
  margin-bottom: 4px;
}

.qr-validate-muted {
  opacity: 0.7;
  font-size: 13px;
  margin-top: 14px;
}
