/* ==========================================================================
   Tema Nexum para el panel del sitio web
   Mismos colores, tipografía y alertas que el sistema Nexum
   (sistemaPos/ventas/assets/css/app-ui.css). Se carga después de los demás
   estilos del panel para sobrescribirlos.
========================================================================== */

:root {
  --nx-primary: #0f766e;
  --nx-primary-600: #0d9488;
  --nx-primary-700: #115e59;
  --nx-primary-soft: #e6fffb;
  --nx-accent: #14b8a6;
  --nx-glow: #22f2b3;
  --nx-danger: #dc2626;
  --nx-ink: #0f172a;
  --nx-text: #17233f;
  --nx-muted: #64748b;
  --nx-border: #e1e6eb;
  --nx-bg: #eef1f4;
  --nx-sidebar-bg: #111827;
  --nx-sidebar-bg-2: #0f172a;
  --nx-sidebar-text: #cbd5e1;
  --nx-sidebar-muted: #94a3b8;
  --nx-radius: 12px;
  --nx-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 10px 24px rgba(15, 23, 42, .06);
}

body {
  background: var(--nx-bg);
  color: var(--nx-text);
  font-family: "Inter", "Roboto", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgba(20, 184, 166, .25);
}

a {
  color: var(--nx-primary);
}

.backDashboard,
#content {
  background: var(--nx-bg) !important;
}

/* ---------------------------------------------------------------------------
   Menú lateral
--------------------------------------------------------------------------- */

#sidebar-wrapper {
  background: linear-gradient(180deg, var(--nx-sidebar-bg) 0%, var(--nx-sidebar-bg-2) 100%) !important;
  box-shadow: 4px 0 24px rgba(15, 23, 42, .18) !important;
  color: var(--nx-sidebar-text);
  width: 260px;
}

#sidebar-wrapper .nx-brand {
  align-items: center;
  color: #fff;
  display: flex;
  font-size: 1.05rem;
  font-weight: 800;
  gap: 10px;
  justify-content: flex-start;
  letter-spacing: -.01em;
  min-height: 64px;
  min-width: 0 !important;
  padding: 14px 20px;
  text-align: left;
  white-space: nowrap;
}

#sidebar-wrapper .nx-brand img {
  border-radius: 8px;
  height: 32px !important;
}

#sidebar-wrapper .nx-brand i {
  color: var(--nx-accent);
}

#sidebar-wrapper hr,
#sidebar-wrapper .borderDashboard {
  background: rgba(255, 255, 255, .08);
  border: 0 !important;
  color: transparent;
  height: 1px;
  margin: 0 0 8px;
  opacity: 1;
}

#sidebar-wrapper .list-group {
  padding: 6px 10px;
}

#sidebar-wrapper .list-group-item {
  background: transparent !important;
  border-radius: 10px;
  color: var(--nx-sidebar-text);
  margin-bottom: 2px;
  padding: 0 !important;
  transition: background-color .15s ease;
}

#sidebar-wrapper .list-group-item > a {
  align-items: center;
  border-radius: 10px;
  color: var(--nx-sidebar-text) !important;
  display: flex;
  font-size: 14px;
  font-weight: 600;
  gap: 2px;
  padding: 11px 14px;
}

#sidebar-wrapper .list-group-item i,
#sidebar-wrapper .list-group-item .textColor {
  color: var(--nx-accent) !important;
  font-size: 1.05rem;
  width: 22px;
}

#sidebar-wrapper .list-group-item:hover {
  background: rgba(255, 255, 255, .06) !important;
}

#sidebar-wrapper .list-group-item:hover > a {
  color: #fff !important;
}

#sidebar-wrapper .list-group-item.active-page {
  background: rgba(20, 184, 166, .16) !important;
  box-shadow: inset 3px 0 0 var(--nx-accent);
}

#sidebar-wrapper .list-group-item.active-page > a {
  color: #fff !important;
}

/* Botones de mover, editar y borrar páginas (solo superadmin) */
#sidebar-wrapper .btnPages {
  background: rgba(15, 23, 42, .85) !important;
  border-color: rgba(255, 255, 255, .1) !important;
  opacity: 0;
  top: 8px !important;
  transition: opacity .15s ease;
}

#sidebar-wrapper .list-group-item:hover .btnPages {
  opacity: 1;
}

#sidebar-wrapper .btnPages .btn,
#sidebar-wrapper .btnPages i {
  color: var(--nx-sidebar-muted) !important;
  font-size: .85rem;
  width: auto;
}

#sidebar-wrapper .btnPages .btn:hover i {
  color: #fff !important;
}

#sidebar-wrapper .nx-btn-ghost {
  background: rgba(255, 255, 255, .06);
  border: 1px dashed rgba(255, 255, 255, .22);
  border-radius: 10px;
  color: var(--nx-sidebar-text);
  font-weight: 600;
  padding: 8px 14px;
}

#sidebar-wrapper .nx-btn-ghost:hover {
  background: rgba(20, 184, 166, .16);
  border-color: var(--nx-accent);
  color: #fff;
}

#sidebar-wrapper.collapsed {
  width: 76px;
}

#sidebar-wrapper.collapsed .nx-brand {
  justify-content: center;
  padding: 14px 8px;
}

#sidebar-wrapper.collapsed .list-group-item > a {
  justify-content: center;
}

/* Barra superior y tablas fijas por encima del contenido */
#page-content-wrapper {
  min-width: 0;
}

/* ---------------------------------------------------------------------------
   Barra superior
--------------------------------------------------------------------------- */

.nx-topbar {
  background: #fff;
  border-bottom: 1px solid var(--nx-border);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  min-height: 64px;
  padding: 8px 18px 8px 8px;
  position: sticky;
  top: 0;
  z-index: 900;
}

.nx-topbar #menu-toggle {
  border-radius: 10px;
  color: var(--nx-ink);
  font-size: 1.35rem;
  height: 40px;
  line-height: 1;
  width: 40px;
}

.nx-topbar #menu-toggle:hover {
  background: var(--nx-primary-soft);
  color: var(--nx-primary);
}

.nx-topbar__title {
  color: var(--nx-muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  margin-left: 8px;
  text-transform: uppercase;
}

.nx-user {
  align-items: center;
  border-radius: 999px;
  color: var(--nx-ink) !important;
  display: flex;
  gap: 10px;
  padding: 4px 12px 4px 4px;
  transition: background-color .15s ease;
}

.nx-user:hover {
  background: #f1f5f9;
}

.nx-user__avatar {
  align-items: center;
  background: linear-gradient(135deg, var(--nx-primary) 0%, var(--nx-accent) 100%);
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  font-size: 1.05rem;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.nx-user__text {
  flex-direction: column;
  line-height: 1.15;
}

.nx-user__text strong {
  font-size: 13px;
  font-weight: 700;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nx-user__text small {
  color: var(--nx-muted);
  font-size: 11.5px;
  font-weight: 600;
}

.nx-logout {
  align-items: center;
  border-radius: 10px;
  color: var(--nx-muted) !important;
  display: inline-flex;
  font-size: 1.2rem;
  height: 40px;
  justify-content: center;
  margin-left: 6px;
  width: 40px;
}

.nx-logout:hover {
  background: #fef2f2;
  color: var(--nx-danger) !important;
}

/* ---------------------------------------------------------------------------
   Contenido: títulos, tarjetas, tablas
--------------------------------------------------------------------------- */

#page-content-wrapper .h5.text-capitalize {
  color: var(--nx-ink);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -.02em;
}

#page-content-wrapper .nav .nav-link {
  color: var(--nx-muted) !important;
  font-size: 13px;
  font-weight: 600;
}

#page-content-wrapper .nav .nav-link:not(.disabled):hover {
  color: var(--nx-primary) !important;
}

.card {
  border: 1px solid var(--nx-border) !important;
  border-radius: var(--nx-radius) !important;
  box-shadow: var(--nx-shadow) !important;
}

.card-header,
.card-footer {
  background: #fff !important;
  border-color: var(--nx-border) !important;
}

.card-header:first-child {
  border-radius: var(--nx-radius) var(--nx-radius) 0 0 !important;
}

.card-footer:last-child {
  border-radius: 0 0 var(--nx-radius) var(--nx-radius) !important;
}

/* Bloques del formulario de edición */
.card.shadow.mb-3 {
  box-shadow: var(--nx-shadow) !important;
}

.form-label,
label {
  color: #334155;
  font-weight: 600;
}

.badge.badge-default {
  background: #f1f5f9;
  color: var(--nx-muted) !important;
  font-weight: 600;
}

.table {
  --bs-table-hover-bg: #f0fdfa;
  color: var(--nx-text);
  font-size: 14px;
}

.table > thead th,
.table > thead > tr > th {
  background: var(--nx-primary) !important;
  border: 0 !important;
  color: #fff !important;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .02em;
  padding-bottom: 11px;
  padding-top: 11px;
  white-space: nowrap;
}

.table > thead th:first-child {
  border-top-left-radius: 10px;
}

.table > thead th:last-child {
  border-top-right-radius: 10px;
}

.table > thead th a,
.table > thead th i {
  color: #fff !important;
}

.table > tbody > tr > td {
  border-color: #edf1f4;
  vertical-align: middle;
}

.table > tbody > tr:hover > td {
  background: #f8fffd;
}

.nx-row-action {
  align-items: center;
  border-radius: 8px !important;
  display: inline-flex !important;
  height: 30px;
  justify-content: center;
  transition: background-color .15s ease;
  width: 30px;
}

.nx-row-action:hover {
  background: #f1f5f9;
}

.nx-row-action.text-primary {
  color: var(--nx-primary) !important;
}

.nx-row-action.text-maroon {
  color: var(--nx-danger) !important;
}

.nx-row-action.deleteItem:hover {
  background: #fef2f2;
}

/* ---------------------------------------------------------------------------
   Botones y campos
--------------------------------------------------------------------------- */

.btn {
  border-radius: 10px !important;
  font-weight: 600;
}

.backColor,
.nx-btn-primary {
  background: linear-gradient(135deg, var(--nx-primary) 0%, var(--nx-primary-600) 100%) !important;
  border: 0 !important;
  box-shadow: 0 8px 18px rgba(15, 118, 110, .22) !important;
  color: #fff !important;
}

.backColor:hover,
.nx-btn-primary:hover {
  background: linear-gradient(135deg, var(--nx-primary-700) 0%, var(--nx-primary) 100%) !important;
  color: #fff !important;
}

.btn-default.border {
  background: #fff;
  border-color: #d7dee6 !important;
  color: #334155;
}

.btn-default.border:hover {
  background: #f8fafc;
  border-color: var(--nx-accent) !important;
  color: var(--nx-primary);
}

.bg-blue,
.bg-indigo,
.bg-purple,
.bg-maroon {
  align-items: center;
  color: #fff !important;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.bg-blue { background: var(--nx-ink) !important; }
.bg-indigo { background: var(--nx-primary) !important; }
.bg-purple { background: var(--nx-primary-600) !important; }
.bg-maroon { background: var(--nx-danger) !important; }

.bg-success-50,
.bg-success-50:hover {
  background: linear-gradient(135deg, var(--nx-primary) 0%, var(--nx-primary-600) 100%) !important;
  color: #fff !important;
}

.bg-info-50,
.bg-info-50:hover {
  background: var(--nx-ink) !important;
  color: #fff !important;
}

.form-control,
.form-select,
.input-group-text {
  border-color: #d7dee6;
  border-radius: 8px;
  font-size: 14.5px;
}

.form-control,
.form-select {
  min-height: 40px;
}

.form-control:focus,
.form-select:focus,
.select2-container--focus .select2-selection {
  border-color: var(--nx-accent) !important;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, .18) !important;
}

.form-check-input:checked {
  background-color: var(--nx-primary) !important;
  border-color: var(--nx-primary) !important;
}

.form-check-input:focus {
  border-color: var(--nx-accent);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, .18) !important;
}

.textColor {
  color: var(--nx-primary) !important;
}

.page-item.active .page-link {
  background: var(--nx-primary) !important;
  border-color: var(--nx-primary) !important;
}

.page-link {
  color: var(--nx-primary) !important;
}

/* ---------------------------------------------------------------------------
   Modales de Bootstrap
--------------------------------------------------------------------------- */

.modal-content {
  border: 0 !important;
  border-radius: 16px !important;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
  overflow: hidden;
}

.modal-header {
  background: linear-gradient(135deg, var(--nx-ink) 0%, var(--nx-primary) 100%);
  border: 0;
  color: #fff;
}

.modal-header .modal-title {
  font-size: 1.1rem;
  font-weight: 800;
}

.modal-header .btn-close {
  filter: invert(1) grayscale(1) brightness(2);
  opacity: .8;
}

.modal-footer {
  background: #f8fafc;
  border-color: var(--nx-border);
}

.modal-footer .btn-dark {
  background: #e2e8f0;
  border: 0;
  color: #334155;
}

.modal-backdrop.show {
  backdrop-filter: blur(2px);
  opacity: .55;
}

/* ---------------------------------------------------------------------------
   Administrador de archivos
--------------------------------------------------------------------------- */

#dragFiles {
  background: #f8fffd;
  border: 2px dashed rgba(20, 184, 166, .45) !important;
  border-radius: 14px !important;
  color: var(--nx-muted);
  line-height: 1.4;
  padding: 28px 16px !important;
  transition: background-color .15s ease, border-color .15s ease;
}

#dragFiles:hover {
  background: var(--nx-primary-soft);
  border-color: var(--nx-accent) !important;
}

#dragFiles > i {
  color: var(--nx-accent);
  display: block;
  font-size: 2.2rem;
  margin-bottom: 6px;
}

#dragFiles h4 {
  color: var(--nx-ink);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 4px;
}

#dragFiles p {
  font-size: 12.5px;
  margin: 0;
}

.changeView.bg-dark {
  background: var(--nx-primary) !important;
}

.progress {
  background: #e2e8f0;
  border-radius: 999px;
}

.progress-bar.bg-success {
  background-color: var(--nx-accent) !important;
}

.progress-spinner {
  align-items: center;
  color: var(--nx-primary);
  display: flex;
  gap: 4px;
}

#up {
  align-items: center;
  background: var(--nx-primary);
  border-radius: 50%;
  bottom: 18px;
  box-shadow: 0 10px 22px rgba(15, 118, 110, .3);
  color: #fff !important;
  display: flex;
  font-size: 1.2rem;
  height: 46px;
  justify-content: center;
  line-height: 1;
  right: 18px;
  width: 46px;
}

/* Barra de carga superior por encima de la barra fija */
.load-bar-container {
  z-index: 99990 !important;
}

/* ---------------------------------------------------------------------------
   SweetAlert2 (igual que en Nexum)
--------------------------------------------------------------------------- */

.swal2-container {
  z-index: 100000 !important;
}

.swal2-container.swal2-backdrop-show {
  background: rgba(15, 23, 42, .62) !important;
  backdrop-filter: blur(3px);
}

.swal2-popup.nx-swal {
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .32);
  font-family: inherit;
  padding: 28px 30px 24px;
}

.nx-swal .swal2-title {
  color: var(--nx-ink);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.02em;
}

.nx-swal .swal2-html-container {
  color: #475569;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.5;
}

.nx-swal .swal2-actions {
  gap: 10px;
}

.nx-swal-btn {
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14.5px;
  font-weight: 700;
  padding: 10px 22px;
  transition: filter .15s ease, transform .15s ease;
}

.nx-swal-btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.nx-swal-btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(20, 184, 166, .45);
  outline: 0;
}

.nx-swal-confirm {
  background: linear-gradient(135deg, var(--nx-primary) 0%, var(--nx-primary-600) 100%);
  box-shadow: 0 10px 22px rgba(15, 118, 110, .22);
  color: #fff;
}

.nx-swal-danger {
  background: var(--nx-danger);
  box-shadow: 0 10px 22px rgba(220, 38, 38, .22);
  color: #fff;
}

.nx-swal-cancel {
  background: #e2e8f0;
  color: #334155;
}

.swal2-icon.swal2-info,
.swal2-icon.swal2-question {
  border-color: var(--nx-accent) !important;
  color: var(--nx-accent) !important;
}

.swal2-icon.swal2-success [class^='swal2-success-line'] {
  background-color: var(--nx-accent) !important;
}

.swal2-icon.swal2-success .swal2-success-ring {
  border-color: rgba(20, 184, 166, .3) !important;
}

.swal2-icon.swal2-warning {
  border-color: #f59e0b !important;
  color: #f59e0b !important;
}

.swal2-timer-progress-bar {
  background: rgba(20, 184, 166, .55) !important;
}

/* Notificaciones breves */
body.swal2-toast-shown .swal2-container {
  backdrop-filter: none !important;
  background: transparent !important;
}

.swal2-popup.swal2-toast.nx-toast {
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .18);
  padding: 10px 14px;
}

.nx-toast .swal2-title {
  color: var(--nx-ink);
  font-size: 13.5px;
  font-weight: 600;
}

/* ---------------------------------------------------------------------------
   Inicio de sesión
--------------------------------------------------------------------------- */

.nx-login {
  background: #f8fafc;
  display: grid;
  grid-template-columns: minmax(360px, 46%) 1fr;
  min-height: 100vh;
}

.nx-login__brand {
  background:
    radial-gradient(circle at 12% 12%, rgba(255, 255, 255, .16), transparent 28%),
    radial-gradient(circle at 85% 85%, rgba(34, 242, 179, .16), transparent 32%),
    linear-gradient(145deg, #0f172a 0%, #102b34 48%, #0f766e 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 44px 52px;
  position: relative;
}

/* Con "Imagen para el Login" en el perfil, la imagen va detrás del degradado. */
.nx-login__brand[style] {
  background:
    linear-gradient(145deg, rgba(15, 23, 42, .92) 0%, rgba(16, 43, 52, .85) 48%, rgba(15, 118, 110, .82) 100%),
    var(--nx-login-img) center / cover no-repeat;
}

.nx-login__logo {
  height: 64px;
  object-fit: contain;
  object-position: left center;
  width: auto;
}

.nx-login__copy {
  max-width: 460px;
}

.nx-login__tag {
  background: rgba(20, 184, 166, .2);
  border: 1px solid rgba(34, 242, 179, .35);
  border-radius: 999px;
  color: #a7f3d0;
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  margin-bottom: 18px;
  padding: 5px 12px;
  text-transform: uppercase;
}

.nx-login__copy h1 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.12;
  margin-bottom: 14px;
}

.nx-login__copy p {
  color: rgba(255, 255, 255, .78);
  font-size: 15.5px;
  line-height: 1.6;
  margin-bottom: 22px;
}

.nx-login__copy ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nx-login__copy li {
  align-items: center;
  color: rgba(255, 255, 255, .88);
  display: flex;
  font-size: 14.5px;
  font-weight: 500;
  gap: 10px;
  margin-bottom: 10px;
}

.nx-login__copy li i {
  align-items: center;
  background: rgba(255, 255, 255, .1);
  border-radius: 8px;
  color: var(--nx-glow);
  display: inline-flex;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.nx-login__foot {
  color: rgba(255, 255, 255, .5);
}

.nx-login__panel {
  align-items: center;
  background:
    radial-gradient(circle at 90% 10%, rgba(20, 184, 166, .1), transparent 30%),
    linear-gradient(135deg, #f8fafc 0%, #eef4f7 100%);
  display: flex;
  justify-content: center;
  padding: 32px 20px;
}

.nx-login__card {
  background: #fff;
  border: 1px solid var(--nx-border);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .1);
  max-width: 420px;
  padding: 34px 34px 30px;
  width: 100%;
}

.nx-login__head {
  margin-bottom: 24px;
  text-align: center;
}

.nx-login__symbol {
  margin-bottom: 10px;
}

.nx-login__symbol img {
  border-radius: 14px;
  height: 56px !important;
}

.nx-login__symbol i {
  color: var(--nx-primary);
  font-size: 2.6rem;
}

.nx-login__head h2 {
  color: var(--nx-ink);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 4px;
}

.nx-login__head p {
  color: var(--nx-muted);
  font-size: 14px;
  margin: 0;
}

.nx-login__card .form-control {
  min-height: 44px;
}

.nx-login__card .btn.backColor {
  font-size: 15px;
  min-height: 46px;
}

@media (max-width: 900px) {
  .nx-login {
    grid-template-columns: 1fr;
  }

  .nx-login__brand {
    gap: 18px;
    padding: 28px 24px;
  }

  .nx-login__copy p,
  .nx-login__copy ul,
  .nx-login__foot {
    display: none;
  }

  .nx-login__copy h1 {
    font-size: 1.5rem;
    margin: 0;
  }

  .nx-login__panel {
    align-items: flex-start;
  }

  .nx-login__card {
    padding: 26px 22px;
  }
}

/* Instalador */
.nx-auth {
  background:
    radial-gradient(circle at 10% 15%, rgba(20, 184, 166, .13), transparent 30%),
    linear-gradient(135deg, #f8fafc 0%, #eef4f7 100%);
}

.nx-auth__card {
  max-width: 480px;
  width: 100%;
}

.nx-auth__head {
  margin-bottom: 22px;
  text-align: center;
}

.nx-auth__logo {
  height: 48px;
  margin-bottom: 12px;
}

.nx-auth__head h1 {
  color: var(--nx-ink);
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.nx-auth__head p {
  color: var(--nx-muted);
  font-size: 14px;
  margin: 0;
}

/* Celular: menú lateral flotante */
@media (max-width: 768px) {
  #sidebar-wrapper {
    left: -270px;
  }

  #sidebar-wrapper.show {
    left: 0;
  }

  .nx-topbar {
    padding-right: 10px;
  }
}

/* Etiquetas del formulario: solo la primera letra en mayúscula */
.form-label.text-capitalize {
  text-transform: none !important;
}

.form-label.text-capitalize::first-letter {
  text-transform: uppercase;
}

/* Métricas del inicio */
.nx-metric {
  align-items: center;
  background: #fff;
  border: 1px solid var(--nx-border);
  border-radius: var(--nx-radius);
  box-shadow: var(--nx-shadow);
  display: flex;
  gap: 16px;
  min-height: 104px;
  overflow: hidden;
  padding: 20px 22px;
  position: relative;
}

.nx-metric::before {
  background: rgb(var(--nx-metric-rgb, 15, 118, 110));
  bottom: 0;
  content: "";
  left: 0;
  position: absolute;
  top: 0;
  width: 4px;
}

.nx-metric__icon {
  align-items: center;
  background: rgba(var(--nx-metric-rgb, 15, 118, 110), .12);
  border-radius: 14px;
  color: rgb(var(--nx-metric-rgb, 15, 118, 110));
  display: inline-flex;
  flex: 0 0 56px;
  font-size: 1.6rem;
  height: 56px;
  justify-content: center;
}

.nx-metric__title {
  color: var(--nx-muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.nx-metric__value {
  color: var(--nx-ink);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.1;
  margin-top: 4px;
}

/* Botones de editar y borrar módulos (solo superadmin), por encima de la tarjeta */
#page-content-wrapper .position-relative > .position-absolute.border.rounded {
  background: #fff;
  z-index: 5;
}

/* En pantallas táctiles no hay "pasar el mouse": los botones de páginas se ven siempre */
@media (hover: none) {
  #sidebar-wrapper .btnPages {
    opacity: 1;
  }
}

/* Validación: solo se marcan los campos con error */
.valid-feedback {
  display: none !important;
}

.was-validated .form-control:valid,
.was-validated .form-select:valid {
  background-image: none;
  border-color: #d7dee6;
  padding-right: .75rem;
}

/* ---------------------------------------------------------------------------
   Aviso "Revisa tu correo"
--------------------------------------------------------------------------- */

.swal2-icon.nx-swal-icon-mail {
  background: var(--nx-primary-soft);
  border: 0 !important;
  color: var(--nx-primary) !important;
}

.swal2-icon.nx-swal-icon-mail .swal2-icon-content {
  font-size: 2.6rem;
}

/* ---------------------------------------------------------------------------
   Páginas propias (Usuarios)
--------------------------------------------------------------------------- */

.nx-page-head {
  align-items: flex-end;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.nx-page-title {
  color: var(--nx-ink);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -.02em;
  margin: 0;
}

.nx-page-sub {
  color: var(--nx-muted);
  font-size: 14px;
  margin: 4px 0 0;
}

.nx-note {
  align-items: center;
  background: var(--nx-primary-soft);
  border: 1px solid rgba(20, 184, 166, .3);
  border-radius: 10px;
  color: var(--nx-primary-700);
  display: flex;
  font-size: 13.5px;
  font-weight: 500;
  gap: 8px;
  padding: 10px 14px;
}

.nx-note--warn {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

.nx-users > thead th:first-child,
.nx-users > thead th:last-child {
  border-radius: 0 !important;
}

.nx-users td {
  padding-bottom: 14px;
  padding-top: 14px;
}

.nx-users__who {
  align-items: center;
  display: flex;
  gap: 12px;
}

.nx-users__who strong {
  color: var(--nx-ink);
  font-weight: 600;
  margin-right: 6px;
}

.nx-users__avatar {
  align-items: center;
  background: linear-gradient(135deg, var(--nx-primary) 0%, var(--nx-accent) 100%);
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  flex: 0 0 38px;
  font-weight: 800;
  height: 38px;
  justify-content: center;
}

.nx-users__off td {
  opacity: .6;
}

.nx-users__off td:last-child {
  opacity: 1;
}

.nx-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.nx-chip {
  background: #f1f5f9;
  border-radius: 999px;
  color: #334155;
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
}

.nx-chip--you {
  background: var(--nx-primary-soft);
  color: var(--nx-primary);
}

.nx-role {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 12.5px;
  font-weight: 700;
  gap: 6px;
  padding: 4px 12px;
  white-space: nowrap;
}

.nx-role--superadmin { background: #0f172a; color: #fff; }
.nx-role--admin { background: var(--nx-primary-soft); color: var(--nx-primary-700); }
.nx-role--editor { background: #f1f5f9; color: #334155; }

.nx-status {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 12.5px;
  font-weight: 700;
  gap: 6px;
  padding: 4px 12px;
}

.nx-status::before {
  border-radius: 50%;
  content: "";
  height: 8px;
  width: 8px;
}

.nx-status--on { background: #ecfdf5; color: #047857; }
.nx-status--on::before { background: #10b981; }
.nx-status--off { background: #fef2f2; color: #b91c1c; }
.nx-status--off::before { background: #ef4444; }

.nx-roles {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.nx-roles__item {
  background: #fff;
  border: 1px solid var(--nx-border);
  border-radius: var(--nx-radius);
  padding: 14px 16px;
}

.nx-roles__item p {
  color: var(--nx-muted);
  font-size: 13px;
  margin: 8px 0 0;
}

/* Elegir rol en el formulario */
.nx-role-pick {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, 1fr);
}

.nx-role-pick__opt {
  cursor: pointer;
  margin: 0;
}

.nx-role-pick__opt input {
  opacity: 0;
  pointer-events: none;
  position: absolute;
}

.nx-role-pick__opt span {
  border: 1.5px solid #d7dee6;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  height: 100%;
  padding: 12px 14px;
  transition: border-color .15s ease, background-color .15s ease;
}

.nx-role-pick__opt i {
  color: var(--nx-accent);
  font-size: 1.2rem;
}

.nx-role-pick__opt strong {
  color: var(--nx-ink);
  font-size: 14px;
}

.nx-role-pick__opt small {
  color: var(--nx-muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
}

.nx-role-pick__opt input:checked + span {
  background: var(--nx-primary-soft);
  border-color: var(--nx-accent);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, .15);
}

.nx-role-pick__opt input:focus-visible + span {
  border-color: var(--nx-accent);
}

.nx-role-pick__opt input:disabled + span {
  cursor: not-allowed;
  opacity: .45;
}

/* Páginas del editor */
.nx-perms {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}

.nx-perms__opt {
  align-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  font-size: 13.5px;
  font-weight: 500;
  gap: 8px;
  margin: 0;
  padding: 8px 10px;
}

.nx-perms__opt .form-check-input {
  flex: 0 0 auto;
  margin: 0 !important;
}

.nx-perms__opt i {
  color: var(--nx-accent);
}

.nx-perms__opt:has(input:checked) {
  background: var(--nx-primary-soft);
  border-color: rgba(20, 184, 166, .5);
}

@media (max-width: 640px) {
  .nx-role-pick {
    grid-template-columns: 1fr;
  }
}

/* Interruptores (el CMS fija el tamaño de todas las casillas y los dejaba redondos) */
.form-switch .form-check-input {
  border-radius: 2em !important;
  height: 1.35em !important;
  margin-top: .1em !important;
  width: 2.5em !important;
}

.table > thead th.text-capitalize {
  text-transform: none !important;
}

.table > thead th.text-capitalize::first-letter {
  text-transform: uppercase;
}

/* Textos largos (políticas legales): campo alto para editarlos con comodidad */
textarea[name="contenido_legal"] {
  font-size: 14px;
  line-height: 1.6;
  min-height: 520px;
}

textarea[name="resumen_legal"] {
  min-height: 90px;
}
