/* Ajustes propios de la intranet sobre el template NiceAdmin. */

/* El tema limita el contenido a 1300 px y en pantallas anchas deja franjas vacías a los lados. Se usa el ancho
   disponible, con un tope para monitores muy grandes donde las líneas demasiado largas cuestan de leer. */
.page-wrapper > .container-fluid,
.page-wrapper > .page-breadcrumb {
  max-width: 1920px;
}

.auth-wrapper.intranet-auth {
  /* Azules de los logos de CLRobotics. */
  background: linear-gradient(135deg, #1c2a39 0%, #2b4a6f 55%, #3a6ea5 100%);
  min-height: 100vh;
  padding: 0 16px;
}

.auth-wrapper.intranet-auth .auth-box {
  max-width: 420px;
  width: 100%;
  margin: 5% 0;
}

.intranet-auth .auth-logo {
  height: 60px;
}

/* El logo viene cortado en dos imágenes (CLR + OBOTICS) para que el menú colapsado muestre solo el ícono. Deben
   quedar pegadas: sin el espacio en blanco entre elementos en línea ni el margen del template. */
.topbar .navbar-brand .logo {
  display: flex;
  align-items: center;
}

#main-wrapper .topbar .top-navbar .navbar-header .navbar-brand .logo-icon {
  display: flex;
  margin-right: 0;
}

.topbar .navbar-brand .logo-text {
  line-height: 0;
}

.topbar .navbar-brand .logo-icon img,
.topbar .navbar-brand .logo-text img {
  display: block;
  height: 40px;
}

/* Contador de notificaciones: se ancla a la campana y no al enlace, que mide todo el alto de la barra. */
.topbar .notification-bell {
  position: relative;
  display: inline-flex;
  line-height: 1;
  vertical-align: middle;
}

.topbar .notification-bell .badge {
  position: absolute;
  top: -7px;
  right: -9px;
  min-width: 17px;
  padding: 3px 5px;
  font-size: 10px;
  line-height: 1;
}

/* Casillas de selección múltiple: el tema las dibuja casi sin borde cuando están desmarcadas. */
.permission-matrix .form-check-input,
input[name="roles"].form-check-input,
input[name="contact_types"].form-check-input {
  border: 1px solid #adb5bd;
}

.permission-matrix .form-check-input:disabled {
  cursor: not-allowed;
}

/* Botón de formulario con apariencia de ítem de menú (logout por POST). */
.btn-as-link {
  background: none;
  border: 0;
  width: 100%;
  text-align: left;
}

/* Configuración del sistema: secciones con ítems de icono, título y descripción. */
.settings-section + .settings-section {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e9ecef;
}

.settings-section-title {
  margin-bottom: 1rem;
  font-weight: 500;
}

.settings-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  height: 100%;
  padding: .75rem;
  border-radius: .5rem;
  color: inherit;
}

.settings-item:hover,
.settings-item:focus-visible {
  background: #f4f6f9;
  color: inherit;
}

.settings-item-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: #eef1f5;
  font-size: 1.4rem;
}

.settings-item-title {
  display: block;
  font-weight: 500;
}

.settings-item-description {
  display: block;
  color: #6c757d;
  font-size: .875rem;
}

/* Ítem activo del menú lateral: visible sobre el fondo oscuro (lo marca sidebarmenu.js). */
#main-wrapper .left-sidebar #sidebarnav .sidebar-item.selected > .sidebar-link {
  background: rgba(255, 255, 255, .12);
  border-left: 3px solid #137eff;
  opacity: 1;
  font-weight: 500;
}
