/* ruta en el servidor: assets/estilos.css */
/* hoja de estilos compartida — aplica la identidad visual definida en
   el mockup original (paleta de baja saturacion, azul pizarra + terracota)
   sobre los componentes de bootstrap ya usados en todo el sistema. */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@500;700&display=swap');

:root {
  --ink: #245A53;
  --brand: #2E6F66;
  --brand-soft: #7CC7B6;
  --brand-bg-soft: #E3EFEC;
  --brand-dark: #245A53;
  --signal: #A4413A;
  --signal-soft: #F5DEDA;
  --signal-dark: #7A332A;
  --paper: #F4F6F3;
  --card: #FFFFFF;
  --line: #E1E6E1;
  --text: #1E2A2C;
  --text-mute: #56676A;
  --ok: #2F6B45;
  --ok-soft: #E4F0E8;
  --warn: #8A5410;
  --warn-soft: #FBF0DF;
  --bad: #A4413A;
  --bad-soft: #F5DEDA;
}

body {
  background: var(--paper);
  color: var(--text);
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
}

h1, h2, h3, .marca {
  font-family: 'Space Grotesk', 'Inter', ui-sans-serif, system-ui, sans-serif;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: -0.01em;
}

p.fw-bold, p.fw-semibold {
  color: var(--text);
}

a {
  color: var(--brand);
}

/* botones: mapeamos las clases de bootstrap que ya usamos en todo el
   sistema a nuestra paleta, sin tener que tocar el markup de cada pagina */
.btn-dark, .btn-dark:hover {
  background-color: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.btn-dark:hover {
  background-color: var(--brand-dark);
  border-color: var(--brand-dark);
}

.btn-outline-secondary {
  color: var(--text-mute);
  border-color: var(--line);
}
.btn-outline-secondary:hover {
  background-color: var(--paper);
  color: var(--text);
  border-color: var(--text-mute);
}

.btn-outline-success {
  color: var(--ok);
  border-color: var(--ok);
}
.btn-outline-success:hover {
  background-color: var(--ok);
  border-color: var(--ok);
}

.btn-outline-danger {
  color: var(--bad);
  border-color: var(--bad);
}
.btn-outline-danger:hover {
  background-color: var(--bad);
  border-color: var(--bad);
}

/* alertas */
.alert-success {
  background-color: var(--ok-soft);
  color: #3d6b4d;
  border: none;
}
.alert-danger {
  background-color: var(--bad-soft);
  color: #8a4841;
  border: none;
}
.alert-warning {
  background-color: var(--warn-soft);
  color: #7a5c26;
  border: none;
}

/* insignias de estado */
.badge-activa, .badge.bg-success {
  background: var(--ok-soft) !important;
  color: #3d6b4d !important;
}
.badge-suspendida, .badge.bg-warning {
  background: var(--warn-soft) !important;
  color: #7a5c26 !important;
}

/* tablas */
.table thead th, table thead tr {
  color: var(--text-mute) !important;
  font-weight: 600;
  border-bottom-color: var(--line) !important;
}
.table td, .table th {
  border-color: var(--line) !important;
}

/* tarjetas / contenedores con fondo blanco */
.border.rounded {
  border-color: var(--line) !important;
  border-radius: 10px !important;
}

/* inputs y selects */
.form-control, .form-select {
  border-color: var(--line);
}
.form-control:focus, .form-select:focus {
  border-color: var(--brand-soft);
  box-shadow: 0 0 0 0.2rem rgba(46, 125, 115, 0.15);
}

hr {
  border-color: var(--line);
  opacity: 1;
}

.text-muted {
  color: var(--text-mute) !important;
}

/* estructura de panel con barra lateral */
.app-shell {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 220px;
  background: #FBFCFA;
  color: var(--text);
  padding: 1.5rem 1rem;
  flex-shrink: 0;
  border-right: 1px solid var(--line);
}
.sidebar .marca-sidebar {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 1.5rem;
  color: var(--text);
}
.sidebar .nav-item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--text-mute);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  margin-bottom: 4px;
}
.sidebar .nav-item:hover {
  background: var(--brand-bg-soft);
  color: var(--brand-dark);
}
.sidebar .nav-item.active {
  background: var(--brand-bg-soft);
  color: var(--brand-dark);
  font-weight: 600;
}
.sidebar .usuario-info {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--text-mute);
}
.sidebar .usuario-info a {
  color: var(--brand-dark);
}
.contenido {
  flex: 1;
  padding: 2rem;
  max-width: 900px;
}
.vista {
  display: none;
}
.vista.activa {
  display: block;
}
@media (max-width: 720px) {
  .sidebar { width: 64px; padding: 1rem 0.5rem; }
  .sidebar .marca-sidebar, .sidebar .nav-item span, .sidebar .usuario-info { display: none; }
  .sidebar .nav-item { text-align: center; }
}

/* iconos en la navegacion */
.sidebar .nav-item i {
  font-size: 16px;
  margin-right: 8px;
  vertical-align: -3px;
}

/* tarjetas de metrica (dashboard) */
.metrica-card {
  background: var(--card);
  border: none;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(31, 92, 86, 0.06);
}
.metrica-card i {
  font-size: 15px;
  color: var(--brand);
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--brand-bg-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.metrica-card .metrica-valor {
  font-size: 24px;
  font-weight: 700;
  margin: 8px 0 0;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  color: var(--text);
}
.metrica-card .metrica-etiqueta {
  font-size: 13px;
  color: var(--text-mute);
  margin: 2px 0 0;
}

/* insignias de estado */
.badge-estado {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}
.badge-estado-confirmada { background: #E6F1FB; color: #0C447C; }
.badge-estado-pendiente { background: var(--warn-soft); color: #7a5c26; }
.badge-estado-checkin { background: var(--ok-soft); color: #3d6b4d; }
.badge-estado-checkout { background: var(--line); color: var(--text-mute); }
.badge-estado-cancelada { background: var(--bad-soft); color: #8a4841; }

/* chip cuadrado con el numero de habitacion */
.chip-habitacion {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

/* fila de lista (reservas, habitaciones, servicios, personal, facturas) */
.fila-lista {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 10px 12px;
  background: var(--card);
  border: none;
  border-radius: 10px;
  margin-bottom: 8px;
  box-shadow: 0 1px 3px rgba(31, 92, 86, 0.06);
}
.fila-lista .fila-contenido {
  flex: 1;
  min-width: 160px;
}
.fila-lista .fila-titulo {
  font-size: 14px;
  margin: 0;
  color: var(--text);
}
.fila-lista .fila-detalle {
  font-size: 12px;
  color: var(--text-mute);
  margin: 0;
}
.fila-lista .fila-acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex-shrink: 0;
  margin-left: auto;
}

/* tarjeta que agrupa un formulario, con encabezado tipo barra en vez
   de solo texto en negrita — le da un "ancla" visual a cada seccion. */
.tarjeta-formulario {
  background: var(--card);
  border: none;
  border-radius: 12px;
  padding: 0 1.25rem 1.25rem;
  margin-bottom: 1.5rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(31, 92, 86, 0.08), 0 4px 14px rgba(31, 92, 86, 0.06);
}
.tarjeta-formulario .tarjeta-titulo {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin: 0 -1.25rem 1.25rem;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 9px;
  background: linear-gradient(135deg, var(--brand), var(--ink));
  border-radius: 12px 12px 0 0;
}
.tarjeta-formulario .tarjeta-titulo i {
  color: #fff;
  font-size: 14px;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* etiqueta pequeña sobre un campo de formulario */
.campo-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 0 0 3px;
  display: block;
}

/* separador de seccion con titulo, mas presencia que un <hr> suelto */
.separador-seccion {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 1.75rem 0 1rem;
}
.separador-seccion .separador-titulo {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-mute);
  white-space: nowrap;
}
.separador-seccion .separador-linea {
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* grupo de pestañas internas (dentro de una seccion) */
.pestanas-internas {
  display: inline-flex;
  background: var(--paper);
  border: 0.5px solid var(--line);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}
.pestanas-internas button {
  border: none;
  background: transparent;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-mute);
}
.pestanas-internas button.active {
  background: var(--brand);
  color: #fff;
}
.pestanas-internas button i {
  margin-right: 5px;
  font-size: 14px;
  vertical-align: -2px;
}

/* burbuja tipo notificacion de app, para mostrar cantidades en pestanas */
.badge-notificacion {
  background: var(--signal);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  line-height: 1;
  vertical-align: 1px;
}

/* linea de titulo completa, clicable, que expande/contrae una seccion */
.acordeon-titulo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--card);
  border: none;
  border-radius: 10px;
  margin-bottom: 10px;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 1px 3px rgba(31, 92, 86, 0.06);
}
.acordeon-titulo span {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}
.acordeon-titulo span i {
  color: var(--brand);
  font-size: 14px;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--brand-bg-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.acordeon-titulo > i {
  color: var(--text-mute);
  font-size: 16px;
  transition: transform 0.15s ease;
}

/* componente de modal reutilizable, para reemplazar los formularios
   fijos en tarjeta por ventanas que aparecen solo al crear/editar. */
.modal-fondo {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(37, 43, 66, 0.45);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-fondo.activo {
  display: flex;
}
.modal-caja {
  background: var(--card);
  border-radius: 14px;
  padding: 0 1.5rem 1.5rem;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-x: hidden;
  overflow-y: auto;
}
.modal-caja .modal-titulo {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 -1.5rem 1.25rem;
  padding: 1.1rem 1.5rem;
  background: linear-gradient(135deg, var(--brand), var(--ink));
  border-radius: 14px 14px 0 0;
}
.modal-caja .modal-titulo p {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  margin: 0;
}
.modal-caja .modal-cerrar {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}
.modal-caja .modal-cerrar:hover {
  color: #fff;
}

/* botones "+ nuevo" que abren un modal, estilo consistente */
.btn-nuevo {
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: var(--radius, 8px);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-nuevo:hover {
  background: var(--brand-dark);
  color: #fff;
}

/* elemento que solo aparece en la version impresa (oculto en pantalla) */
.solo-impresion {
  display: none;
}

/* secciones de un reporte formal, con titulo subrayado */
.reporte-seccion {
  margin-bottom: 1.75rem;
  max-width: 720px;
}
.reporte-seccion-titulo {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.5rem;
  padding-bottom: 6px;
  border-bottom: 1.5px solid var(--brand);
}
.reporte-tabla {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.reporte-tabla th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-mute);
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
}
.reporte-tabla td {
  padding: 7px 8px;
  border-bottom: 0.5px solid var(--line);
  color: var(--text);
}
.reporte-tabla tfoot td {
  border-top: 1.5px solid var(--line);
  border-bottom: none;
  padding-top: 10px;
}

.barra-seccion-wrap {
  position: relative;
  display: block;
  margin-bottom: 4px;
}

.barra-seccion-wrap {
  position: relative;
  display: block;
  margin-bottom: 4px;
}

.barra-seccion {
  position: relative;
  display: inline-block;
  padding: 0.5px 18px 0.5px 14px;
  background: linear-gradient(135deg, var(--brand-dark), var(--brand));
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  
  border-radius: 0 12px 0 0;
  z-index: 2;
}

.barra-seccion-wrap::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 3px;
  background: var(--brand);
  z-index: 1;
}

/* archivo: assets/estilos.css — después de .barra-seccion-wrap::after */
.barra-seccion--suave {
  background: var(--brand-bg-soft);
  color: var(--brand-dark);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 3px 16px 3px 12px;
}

.barra-seccion-wrap--suave::after {
  background: var(--brand-soft);
  height: 2px;
}

/* reglas de impresion: solo el contenido del reporte activo, sin
   barra lateral, sin botones ni filtros — pensado para papel/pdf. */
@page {
  size: letter portrait;
  margin: 0;
}

@media print {
  .sidebar,
  .no-imprimir,
  button,
  select {
    display: none !important;
  }
  .app-shell {
    display: block !important;
  }
  .contenido {
    padding: 1.5cm 1.5cm 1.5cm 1cm !important;
    max-width: 100% !important;
  }
  .solo-impresion {
    display: block !important;
    font-size: 13px;
    color: #444;
    margin-bottom: 1rem;
  }
  .metrica-card {
    border: 0.5px solid #ccc !important;
    break-inside: avoid;
  }
  body {
    background: #fff !important;
  }
}.barra-seccion--suave {
  background: var(--brand-bg-soft);
  color: var(--brand-dark);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 3px 16px 3px 12px;
}
.barra-seccion-wrap--suave::after {
  background: var(--brand-soft);
  height: 2px;
}
