/* Estilos generales */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f5f5f5;
  color: #333;
}

/* ESTILOS DE AUTENTICACIÓN - IMPORTANTE */
body.not-authenticated .main-sidebar { 
  display: none !important; 
}

body.not-authenticated .content-wrapper { 
  margin-left: 0 !important; 
}

body.not-authenticated .right-side { 
  display: none !important; 
}

body.authenticated .login-fullscreen {
  display: none !important;
}

/* Mostrar contenido cuando autenticado */
body.authenticated .content-wrapper,
body.authenticated .right-side {
  display: block !important;
}

/* Login pantalla completa */
.login-fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: url('reservaBM.jpeg');
  background-size: cover;
  background-position: center;
  display: flex;
  justify-content: center; /* centra horizontalmente */
  align-items: center;     /* centra verticalmente */
  z-index: 9999;
  flex-direction: column;
}

/* Contenedor del login invisible */
.login-container {
  background-color: transparent; /* sin fondo */
  padding: 0;                    /* sin padding extra */
  border: none;                  /* sin bordes */
  box-shadow: none;              /* sin sombra */
  width: auto;
  max-width: 90%;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Título principal */
.login-container h1 {
  color: #ffffff;
  font-weight: bold;       
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 28px;
}

/* Subtítulo / párrafo */
.login-container h3 {
  color: #000000;      /* azul marino */
  font-weight: bold;        /* gris claro */
  margin-top: 100px; 
  margin-bottom: 25px;
  font-size: 28px;
}

.login-container label {
  color: #ffffff;        
  font-weight: bold;     /* negrita */
  font-size: 20px;
}

.login-container .btn-primary {
  color: #ffffff;             /* texto blanco */
  font-weight: bold;           /* negrita */
  font-size: 20px;
  width: 100%;                /* ancho completo */
}

/* Barra de navegación */
.navbar-default {
  background-color: #2c3e50;
  border-color: #2c3e50;
}

.navbar-default .navbar-brand {
  color: #ecf0f1;
}

.navbar-default .navbar-nav > li > a {
  color: #ecf0f1;
}

.navbar-default .navbar-nav > li > a:hover {
  color: #18bc9c;
}

/* Paneles */
.panel {
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.panel-heading {
  background-color: #18bc9c !important;
  color: white !important;
  border-radius: 4px 4px 0 0 !important;
}

/* Botones */
.btn-default {
  margin: 2px;
  font-size: 0.9em;
}

.btn-primary {
  background-color: #3498db;
  border-color: #2980b9;
}

.btn-success {
  background-color: #18bc9c;
  border-color: #13987d;
}

.btn-danger {
  background-color: #e74c3c;
  border-color: #c0392b;
}


/* Tablas */
.dataTables_wrapper {
  background-color: white;
  padding: 15px;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Footer */
.footer {
  background-color: #2c3e50;
  color: white;
  padding: 15px 0;
  text-align: center;
  margin-top: 30px;
}

/* Márgenes y espaciado */
.tab-pane {
  padding: 15px;
  background-color: white;
  border-radius: 0 0 4px 4px;
  border: 1px solid #ddd;
  border-top: none;
}

/* Estilos específicos para mapas */
.leaflet-container {
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Adaptación para móviles */
@media (max-width: 768px) {
  .navbar-nav {
    margin: 0 -15px;
  }
  
  .tab-pane {
    padding: 10px;
  }
  
  .login-container {
    width: 90%;
    padding: 20px;
  }
}

/* Notificaciones */
.shiny-notification {
  position: fixed;
  top: 15px;
  right: 15px;
  width: 300px;
  padding: 15px;
  border-radius: 4px;
  color: white;
  font-weight: bold;
}

.shiny-notification-success {
  background-color: #18bc9c;
}

.shiny-notification-error {
  background-color: #e74c3c;
}

.shiny-notification-warning {
  background-color: #f39c12;
}

.shiny-notification-message {
  background-color: #3498db;
}

/* --- FORMULARIO DINÁMICO RESPONSIVO --- */
.crud-form-grid-responsive {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 15px;
  padding: 15px;
  background-color: white;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Campos del formulario */
.crud-field {
  margin-bottom: 15px;
}

.crud-field .form-group {
  margin-bottom: 8px;
}

/* Campos requeridos */
.crud-required label::after {
  content: " *";
  color: #e74c3c;
}

/* Selectize personalizado */
.crud-field .selectize-control {
  width: 100% !important;
}

.crud-field .selectize-input {
  border-radius: 4px;
  border: 1px solid #ddd;
  padding: 6px 12px;
  box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
}

/* Responsividad para móviles */
@media (max-width: 768px) {
  .crud-form-grid-responsive {
    grid-template-columns: 1fr; /* 1 columna en móviles */
    gap: 10px;
    padding: 10px;
  }
  
  .crud-field {
    margin-bottom: 10px;
  }
}

/* Para tablets */
@media (min-width: 769px) and (max-width: 1024px) {
  .crud-form-grid-responsive {
    grid-template-columns: repeat(2, 1fr); /* 2 columnas en tablets */
  }
}

/* Estilos para los controles dentro del grid */
.crud-form-grid-responsive .form-control {
  width: 100%;
  border-radius: 4px;
  border: 1px solid #ddd;
  padding: 6px 12px;
  box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
}

.crud-form-grid-responsive .selectize-input {
  border-radius: 4px !important;
}

/* --- ESTILOS ESPECÍFICOS PARA EL GRID DE 2 COLUMNAS DEL CRUD --- */
.crud-form-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 15px !important;
  margin: 15px 0 !important;
  width: 100% !important;
}

.crud-form-grid > div {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Asegurar que los campos se vean bien en el grid */
.crud-form-grid .form-group {
  margin-bottom: 0 !important;
}

.crud-form-grid label {
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}

.crud-form-grid .form-control,
.crud-form-grid .selectize-control,
.crud-form-grid .selectize-input {
  width: 100% !important;
  min-width: 100% !important;
}

/* Responsividad del grid */
@media (max-width: 992px) {
  .crud-form-grid {
    grid-template-columns: 1fr !important; /* 1 columna en pantallas pequeñas */
  }
}

/* Contenedor del formulario */
.form-container {
  background: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  margin-bottom: 20px;
}

/* Estilos para campos requeridos */
.crud-required label::after {
  content: " *";
  color: #e74c3c;
  font-weight: bold;
}

/* Mejorar apariencia de inputs en el grid */
.crud-form-grid input[type="text"],
.crud-form-grid input[type="number"],
.crud-form-grid select,
.crud-form-grid textarea {
  border-radius: 4px;
  border: 1px solid #ccc;
  padding: 8px 12px;
  font-size: 14px;
  transition: border-color 0.2s ease;
}

.crud-form-grid input[type="text"]:focus,
.crud-form-grid input[type="number"]:focus,
.crud-form-grid select:focus,
.crud-form-grid textarea:focus {
  border-color: #3498db;
  outline: none;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

