/* ========== BASE ========== */
html, body {
  height: 100%;
  margin: 0;
}

body {
  padding-top: 56px;
  background-color: #fff;
  color: #212529;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* ========== NAVBAR ========== */
.navbar {
  background-color: #f8f9fa;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.navbar .dropdown > .nav-link,
.navbar .navbar-brand,
.navbar .nav-link,
.navbar .dropdown-toggle {
  color: #495057;
  background-color: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.navbar .dropdown > .nav-link:hover,
.navbar .dropdown > .nav-link:focus,
.navbar .nav-link:hover,
.navbar .dropdown-toggle:hover {
  background-color: #e9ecef;
  color: #0d6efd;
  text-decoration: none;
}

.navbar .dropdown-menu {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 0.25rem;
  min-width: 200px;
}

.navbar .dropdown-item {
  color: #495057;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus {
  background-color: #e9ecef;
  color: #0d6efd;
}

/* ========== SIDEBAR ========== */
.sidebar {
  width: 240px;
  min-height: 100vh;
  position: fixed;
  top: 56px;
  left: 0;
  background-color: #f8f9fa;
  overflow-y: auto;
  border-right: 1px solid #dee2e6;
  box-shadow: inset -1px 0 0 #dee2e6;
  transition: margin-left 0.3s ease, background-color 0.3s ease;
}

.sidebar .nav-link {
  color: #495057;
  font-weight: 500;
  border-radius: 0.25rem;
  transition: all 0.2s ease-in-out;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
  background-color: #e9ecef;
  color: #000;
}

/* Sidebar oculto */
#sidebar.active,
.sidebar.collapsed {
  margin-left: -240px;
  display: none;
}

/* ========== CONTENT ========== */
.content {
  margin-left: 240px;
  padding: 20px 24px;
  min-height: calc(100vh - 56px);
  overflow-y: auto;
  transition: margin-left 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

.content.fullwidth {
  margin-left: 0 !important;
}

#sidebar.active ~ #mainContent,
#sidebar.active ~ main.content {
  width: 100% !important;
}

/* ========== FOOTER ========== */
footer {
  flex-shrink: 0;
  background-color: #f8f9fa;
  color: #212529;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* ========== COMPONENTES ========== */
.card {
  background-color: #fff;
  border: 1px solid #dee2e6;
  color: #212529;
}

.card-header {
  background-color: #f8f9fa;
  color: #212529;
}

.table {
  background-color: #fff;
  color: #212529;
}

.table thead {
  background-color: #e9ecef;
  color: #212529;
}

.table-striped > tbody > tr:nth-of-type(odd) {
  background-color: #f2f2f2;
}

.table-bordered {
  border-color: #dee2e6;
}

.badge.bg-success {
  background-color: #198754 !important;
  color: #fff !important;
}

.badge.bg-warning {
  background-color: #ffc107 !important;
  color: #000 !important;
}

.badge.bg-danger {
  background-color: #dc3545 !important;
  color: #fff !important;
}

/* ========== DARK MODE ========== */
.dark-mode {
  background-color: #121212;
  color: #e0e0e0;
}

.dark-mode #mainNavbar,
.dark-mode #sidebar,
.dark-mode #mainFooter,
.dark-mode #notificaciones,
.dark-mode #fechaActual {
  background-color: #1e1e1e !important;
  color: #e0e0e0 !important;
}

/* Sidebar */
.dark-mode .sidebar {
  background-color: #1f1f1f;
  color: #ccc;
  border-right: 1px solid #444;
  box-shadow: inset -1px 0 0 #333;
}

.dark-mode .sidebar .nav-link {
  color: #ccc !important;
}

.dark-mode #sidebar .nav-link.active,
.dark-mode #sidebar .nav-link:hover {
  background-color: #333 !important;
  color: #fff !important;
}

/* Navbar */
.dark-mode .navbar {
  background-color: #1f1f1f !important;
  border-color: #343a40 !important;
  color: #eee;
}

.dark-mode .navbar .navbar-brand,
.dark-mode .navbar .nav-link,
.dark-mode .navbar .dropdown-toggle {
  color: #ddd;
}

.dark-mode .navbar .nav-link:hover,
.dark-mode .navbar .dropdown-toggle:hover {
  background-color: #333;
  color: #0d6efd;
}

.dark-mode .navbar .dropdown-menu {
  background-color: #2a2a2a !important;
  border-color: #444 !important;
}

.dark-mode .navbar .dropdown-item {
  color: #ddd !important;
}

.dark-mode .navbar .dropdown-item:hover,
.dark-mode .navbar .dropdown-item:focus {
  background-color: #444 !important;
  color: #fff !important;
}

/* Content */
.dark-mode .content {
  background-color: #1e1e1e !important;
  color: #ddd !important;
}

/* Footer */
.dark-mode footer {
  background-color: #1f1f1f;
  color: #bbb;
}

/* Components */
.dark-mode .card {
  background-color: #2c2c2c !important;
  border-color: #444 !important;
  color: #ddd !important;
}

.dark-mode .card-header {
  background-color: #3a3a3a !important;
  color: #fff !important;
}

.dark-mode .table {
  background-color: #2b2b2b !important;
  color: #ddd !important;
}

.dark-mode .table thead {
  background-color: #3c3c3c !important;
  color: #fff !important;
}

.dark-mode .table-striped > tbody > tr:nth-of-type(odd) {
  background-color: #2a2a2a !important;
}

.dark-mode .table-bordered {
  border-color: #444 !important;
}

.dark-mode .badge.bg-success,
.dark-mode .badge.bg-warning,
.dark-mode .badge.bg-danger {
  color: #fff !important;
}

/* Textos */
.dark-mode h1,
.dark-mode h2,
.dark-mode h3,
.dark-mode h4,
.dark-mode h5,
.dark-mode h6,
.dark-mode p,
.dark-mode span,
.dark-mode a {
  color: #ddd !important;
}

.dark-mode hr,
.dark-mode .dropdown-divider {
  border-color: #555;
}

/* Notificaciones */
.dark-mode #notificaciones .btn {
  background-color: #2a2a2a !important;
  color: #e0e0e0 !important;
  border-color: #444 !important;
}

.dark-mode #notificaciones .btn:hover {
  background-color: #3a3a3a !important;
  color: #fff !important;
}

.dark-mode #notificaciones .dropdown-menu {
  background-color: #2a2a2a !important;
  color: #e0e0e0 !important;
  border-color: #444 !important;
}

.dark-mode #notificaciones .dropdown-header {
  color: #bbb !important;
}

.dark-mode #notificaciones .dropdown-item {
  color: #ddd !important;
}

.dark-mode #notificaciones .dropdown-item:hover {
  background-color: #3a3a3a !important;
  color: #fff !important;
}

.dark-mode #notificaciones .text-muted {
  color: #aaa !important;
}

.dark-mode #notificaciones .bi {
  color: #0d6efd !important;
}
/* Tabla en modo oscuro */
body.dark-mode .table {
  background-color: #2c2c2c;
  color: #e0e0e0;
}

body.dark-mode .table th,
body.dark-mode .table td {
  background-color: #2c2c2c;
  color: #e0e0e0;
}

body.dark-mode .table-striped > tbody > tr:nth-of-type(odd) {
  background-color: #3a3a3a;
}

body.dark-mode .table-hover > tbody > tr:hover {
  background-color: #444444;
}

body.dark-mode .table-bordered {
  border-color: #555 !important;
}

body.dark-mode .table thead {
  background-color: #1f1f1f;
  color: #f8f9fa;
}

/* Card que contiene la tabla */
body.dark-mode .card {
  background-color: #1e1e1e;
  border-color: #444;
  color: #e0e0e0;
}

/* Menú desplegable en modo oscuro */
body.dark-mode .dropdown-menu {
  background-color: #2b2b2b;
  color: #fff;
  border: 1px solid #444;
}

body.dark-mode .dropdown-item {
  color: #fff;
}

body.dark-mode .dropdown-item:hover {
  background-color: #444;
}
/* Botones de paginación de DataTables (o similares) */
body.dark-mode .paginate_button {
  background-color: #2c2c2c !important;
  color: #e0e0e0 !important;
  border: 1px solid #444 !important;
}

body.dark-mode .paginate_button:hover {
  background-color: #444 !important;
  color: #fff !important;
}

body.dark-mode .paginate_button.current {
  background-color: #007bff !important;
  color: #fff !important;
  border-color: #007bff !important;
}

/* Para botones Bootstrap normales si usás paginación manual */
body.dark-mode .page-link {
  background-color: #2c2c2c;
  color: #e0e0e0;
  border-color: #444;
}

body.dark-mode .page-link:hover {
  background-color: #444;
  color: #fff;
}

body.dark-mode .page-item.active .page-link {
  background-color: #007bff;
  border-color: #007bff;
  color: #fff;
}
#map {
  height: 300px;
  border-radius: 8px;
  margin-bottom: 1rem;
}


  .table-responsive {
    overflow: visible !important;
  }

#permisosList {
  display: flex;
  flex-wrap: wrap;
  gap: 20px; /* Aumento el espacio entre las columnas */
  justify-content: space-between; /* Distribuye las columnas de manera equilibrada */
}

.permisos-col {
  display: flex;
  flex-direction: column;
  flex: 1 1 48%; /* Ajuste para ocupar un 48% del espacio disponible */
  min-width: 200px;
}

.form-check {
  display: block;
  margin-bottom: 10px; /* Añadir espacio entre cada checkbox */
}

h6 {
  text-align: left; /* Alineamos el título a la izquierda */
  width: 100%;
  margin-bottom: 5px; /* Espacio debajo del título */
  border-bottom: 2px solid #ccc; /* Línea debajo del título */
  padding-bottom: 5px; /* Espacio entre el título y la línea */
}

.permisos-lista {
  display: flex;
  flex-wrap: wrap;
  width: 100%; /* Asegura que la lista ocupe todo el ancho disponible */
}

.permisos-col .form-check {
  margin-bottom: 5px; /* Asegura que haya un pequeño espacio entre los checkboxes */
}

#permisosList > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  width: 100%;
}

h6 {
  margin-left: 0; /* Eliminar margen izquierdo del título */
  margin-top: 0; /* Elimina espacio extra por encima del título */
}
