.sidebar-wrapper .sidebar {
  width: 240px;
  background-color: #fff;
  border-right: 1px solid #eee;
  display: flex;
  flex-direction: column;
  height: 100vh;
  transition: width 0.3s ease;
  overflow: hidden;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.05);
  position: relative;
}

.sidebar-wrapper .sidebar.collapsed {
  width: 64px;
}

/* ---------- BOTÓN DE COLAPSAR CENTRADO ---------- */
.sidebar-wrapper .collapse-button {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}
.sidebar-wrapper .collapse-button button {
  background: #eef3f8;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  color: #005BAC;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
}
.sidebar-wrapper .collapse-button button:hover {
  background-color: #dbe9f8;
}

/* ---------- LOGOS ---------- */
.sidebar-wrapper .sidebar-logo {
  max-width: 120px;
  height: auto;
  display: block;
  margin: 10px auto;
}
.sidebar-wrapper .sidebar-logo-small {
  display: none;
  max-width: 30px;
  margin: 10px auto;
}
.sidebar-wrapper .sidebar.collapsed .sidebar-logo {
  display: none;
}
.sidebar-wrapper .sidebar.collapsed .sidebar-logo-small {
  display: block;
}

/* ---------- MENÚ PRINCIPAL ---------- */
.sidebar-wrapper .nav {
  flex-grow: 1;
  padding-top: 10px;
}
.sidebar-wrapper .nav > li > a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  font-size: 14px;
  color: #2b2b2b;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  position: relative;
}
.sidebar-wrapper .nav > li > a:hover {
  background-color: #f4f9ff;
  color: #005BAC;
}
.sidebar-wrapper .nav > li.active > a {
  background-color: #e9f3fc;
  color: #005BAC;
  font-weight: 600;
}
.sidebar-wrapper .nav > li > a > em,
.sidebar-wrapper .nav > li > a > img {
  width: 20px;
  height: 20px;
}

/* ---------- EN MODO COLAPSADO ---------- */
.sidebar-wrapper .sidebar.collapsed .nav > li > a {
  justify-content: center;
  padding: 12px 0;
}
.sidebar-wrapper .sidebar.collapsed .nav > li > a > span {
  display: none;
}
.sidebar-wrapper .sidebar.collapsed .nav > li > a:hover::after {
  content: attr(title);
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  background-color: #005BAC;
  color: white;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 6px;
  margin-left: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  z-index: 10;
  white-space: nowrap;
}

/* ---------- BOTÓN SALIR ---------- */
.sidebar-wrapper .cerrar-sesion {
  padding: 14px 20px;
  border-top: 1px solid #f0f0f0;
  background: #f9f9f9;
  text-align: center;
}
.sidebar-wrapper .cerrar-sesion a {
  color: #005BAC;
  font-weight: bold;
  text-decoration: none;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
}
.sidebar-wrapper .sidebar.collapsed .cerrar-sesion a span {
  display: none;
}
.sidebar-wrapper .cerrar-sesion a span {
  display: inline;
}

/* VIEWS TABLES */
.title-text {
  margin: 0;
  font-size: 2rem;
  line-height: 1;
  font-weight: bold;
}

.text-thin {
  font-weight: 400;
}

.title-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.title-header img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
}

.admin-panel {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  color: #333;
  padding: 1rem;
  padding-right: 1.5rem;
  box-sizing: border-box;
}

.search-form {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.search-input {
  flex-grow: 1;
  min-width: 220px;
  padding: 0.4rem 0.8rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.search-input:focus {
  outline: none;
  border-color: #1167b1;
  box-shadow: 0 0 5px rgba(17, 103, 177, 0.5);
}

.btn {
  cursor: pointer;
  padding: 0.4rem 1rem;
  border-radius: 6px;
  border: none;
  font-size: 1rem;
  transition: background-color 0.3s;
  user-select: none;
}

.btn-primary {
  background-color: #1167b1;
}

.btn-primary:hover {
  background-color: #0e558b;
}

.btn-success {
  background-color: #2e7d32;
}

.btn-success:hover {
  background-color: #276529;
}

.table-wrapper {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgb(0 0 0 / 0.05);
  background-color: #fff;
}

.data-table {
  width: 99% !important;
  border-collapse: collapse;
  font-size: 0.95rem;
  table-layout: auto;
  margin-right: 1rem;
}

.data-table thead {
  color: #1167b1;
  user-select: none;
}

.data-table thead th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.data-table tbody tr:hover {
  background-color: #f1f8ff;
}

.data-table tbody td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid #eee;
  vertical-align: middle;
}

.actions {
  display: flex;
  justify-content: center;
  gap: 0.3rem;
}

.icon-btn {
  background: #e0e7ef;
  color: #333;
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background-color 0.3s;
  user-select: none;
}

.icon-btn:hover {
  background-color: #1167b1;
  color: white;
}

.icon-btn.delete {
  background-color: #f8d7da;
  color: #721c24;
}

.icon-btn.delete:hover {
  background-color: #c82333;
  color: white;
}

.panel-footer {
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  padding: 1rem 1.5rem !important;
  background-color: #f9fafb !important;
  border-top: 1px solid #dee2e6 !important;
  gap: 1rem !important;
  flex-wrap: wrap !important;
  width: 100% !important;
}

.panel-footer ul.pagination-sm {
  display: flex !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.panel-footer ul.pagination-sm li {
  display: inline-block !important;
  margin: 0 3px !important;
}

.panel-footer ul.pagination-sm li a {
  display: inline-block !important;
  padding: 6px 12px !important;
  color: #1167b1 !important;
  text-decoration: none !important;
  border: 1px solid #dee2e6 !important;
  border-radius: 4px !important;
  cursor: pointer !important;
  transition: background-color 0.3s !important;
}

.panel-footer ul.pagination-sm li.active a {
  background-color: #1167b1 !important;
  color: white !important;
  border-color: #1167b1 !important;
}

.panel-footer ul.pagination-sm li a:hover {
  background-color: #0e558b !important;
  color: white !important;
  border-color: #0e558b !important;
}

.btn-refresh {
  background: none !important;
  border: none !important;
  font-size: 1.4rem !important;
  color: #1167b1 !important;
  cursor: pointer !important;
  padding: 0 !important;
  transition: color 0.3s !important;
}

.btn-refresh:hover {
  color: #0e558b !important;
}

/* Estilo base para select nativo igual al ui-select */
.search-form select.form-control {
  appearance: none; /* Elimina el estilo nativo del navegador */
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 0.4rem 0.8rem;
  font-size: 0.95rem;
  height: 38px;
  line-height: 1.2;
  box-shadow: none;
  transition: border-color 0.3s;
}

.btn:not(.btn-primary):not(.btn-success):not(.btn-warning):not(.btn-danger):not(.btn-default) {
  color: #1167b1 !important;
}


/* MODALS */
.modal.lateral-raw-modal,
.modal.lateral-raw-modal > .modal-dialog,
.modal.lateral-raw-modal > .modal-dialog > .modal-content {
  all: unset;
  display: contents !important;
}

.modal-right-panel-container {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 520px;
  max-width: 100%;
  background: #fff;
  box-shadow: -4px 0 10px rgba(0, 0, 0, 0.15);
  z-index: 1050;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideInRight 0.3s ease;
}
@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.custom-close-btn {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  font-size: 1.2rem;
  color: #666;
  cursor: pointer;
  z-index: 10;
}
.custom-close-btn:hover {
  color: #000;
}

.custom-header {
  padding: 20px 20px 10px;
  flex-shrink: 0;
}
.custom-header h2 {
  font-size: 1.2rem;
  margin: 0;
  color: #333;
}
.custom-subtitle {
  font-size: 0.9rem;
  color: #666;
  margin-top: 4px;
}

.custom-modal-body {
  padding: 20px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.custom-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 12px 20px;
  border-top: 1px solid #eee;
  background-color: #f8f9fa;
  flex-shrink: 0;
}