/**
 * NetPulse Design System
 * SKILL: DESIGN_VARIANCE 5 · MOTION_INTENSITY 4 · VISUAL_DENSITY 5
 * Sin #000 puro, sin glow neón, sin Inter.
 */

/* —— Tipografía —— */
.np-heading-1 {
  font-size: 1.875rem;
  line-height: 2.25rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: #0f172a; /* slate-900 */
}

.np-heading-2 {
  font-size: 1.25rem;
  line-height: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.np-heading-3 {
  font-size: 1rem;
  line-height: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: #0f172a;
}

.np-prose {
  max-width: 65ch;
  color: #64748b; /* slate-500 */
  line-height: 1.6;
}

.np-metric,
.np-mono {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
}

/* —— Layout (Grid, no flex complejo) —— */
.np-app-grid {
  display: grid;
  grid-template-columns: 16rem minmax(0, 1fr);
  min-height: 100vh;
  background-color: #f8fafc; /* slate-50 */
}

@media (max-width: 768px) {
  .np-app-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
}

.np-sidebar {
  grid-column: 1;
  grid-row: 1 / -1;
  display: grid;
  grid-template-rows: auto 1fr auto;
  border-right: 1px solid rgb(226 232 240 / 0.5); /* slate-200/50 */
  background-color: #ffffff;
  z-index: 30;
}

@media (max-width: 768px) {
  .np-sidebar {
    grid-row: 1;
    grid-column: 1;
    border-right: none;
    border-bottom: 1px solid rgb(226 232 240 / 0.5);
  }
}

.np-main {
  grid-column: 2;
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
}

@media (max-width: 768px) {
  .np-main {
    grid-column: 1;
    grid-row: 2;
  }
}

.np-page-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  column-gap: 1.5rem;
  row-gap: 0.5rem;
  padding: 1.5rem 1.5rem 1.25rem;
  text-align: left; /* ANTI-CENTER BIAS */
}

.np-page-header > *:not(:first-child) {
  grid-column: 2;
  grid-row: 1;
  display: inline-grid;
  grid-auto-flow: column;
  gap: 0.5rem;
  align-self: start;
}

.np-page-body {
  padding: 1.5rem;
}

/* —— Superficies (jerarquía por elevación, no decoración) —— */
.np-card {
  background-color: #ffffff;
  border: 1px solid rgb(226 232 240 / 0.5);
  border-radius: 0.5rem;
}

.np-card-padded {
  padding: 1.25rem 1.5rem;
}

/* —— Navegación lateral —— */
.np-nav {
  display: grid;
  gap: 0.125rem;
  padding: 0.75rem;
}

.np-nav-link {
  display: grid;
  grid-template-columns: 1.25rem 1fr;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
  text-decoration: none;
  transition: color 0.2s ease-out, background-color 0.2s ease-out;
}

.np-nav-link:hover {
  color: #0f172a;
  background-color: #f1f5f9;
}

.np-nav-link.is-active {
  color: #0891b2; /* cyan-600 */
  background-color: #ecfeff;
}

.np-nav-link i {
  font-size: 1.125rem;
}

/* —— Botones y enlaces —— */
.np-btn {
  display: inline-grid;
  grid-auto-flow: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.375rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: color 0.2s ease-out, background-color 0.2s ease-out,
    border-color 0.2s ease-out;
}

.np-btn-primary {
  color: #ffffff;
  background-color: #0891b2;
}

.np-btn-primary:hover {
  background-color: #0e7490;
}

.np-btn-secondary {
  color: #0f172a;
  background-color: #ffffff;
  border-color: rgb(226 232 240 / 0.8);
}

.np-btn-secondary:hover {
  background-color: #f8fafc;
}

a.np-link {
  color: #0891b2;
  text-decoration: none;
  transition: color 0.2s ease-out;
}

a.np-link:hover {
  color: #0e7490;
}

/* —— Estados ONU/OLT —— */
.np-status {
  display: inline-grid;
  grid-auto-flow: column;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.np-status-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
}

.np-status-online .np-status-dot {
  background-color: #22c55e;
}

.np-status-online {
  color: #15803d;
}

.np-status-offline .np-status-dot {
  background-color: #ef4444;
}

.np-status-offline {
  color: #b91c1c;
}

.np-status-unknown .np-status-dot {
  background-color: #94a3b8;
}

.np-status-unknown {
  color: #64748b;
}

/* —— Alertas —— */
.np-alert {
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  border: 1px solid;
  max-width: 65ch;
}

.np-alert-info {
  color: #0e7490;
  background-color: #ecfeff;
  border-color: #a5f3fc;
}

.np-alert-warning {
  color: #b45309;
  background-color: #fffbeb;
  border-color: #fcd34d;
}

.np-alert-error {
  color: #b91c1c;
  background-color: #fef2f2;
  border-color: #fecaca;
}

/* —— Formularios —— */
.np-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #334155;
  margin-bottom: 0.375rem;
}

.np-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: #0f172a;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
  transition: border-color 0.2s ease-out, box-shadow 0.2s ease-out;
}

.np-input:focus {
  outline: none;
  border-color: #0891b2;
  box-shadow: 0 0 0 3px rgb(8 145 178 / 0.15);
}

/* —— Tablas —— */
.np-table-wrap {
  overflow-x: auto;
  border: 1px solid rgb(226 232 240 / 0.5);
  border-radius: 0.5rem;
  background-color: #ffffff;
}

.np-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.np-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-weight: 600;
  color: #64748b;
  background-color: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.np-table td {
  padding: 0.75rem 1rem;
  color: #0f172a;
  border-bottom: 1px solid #f1f5f9;
}

.np-table tbody tr:last-child td {
  border-bottom: none;
}

/* —— Skeleton loaders —— */
@keyframes np-shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.np-skeleton {
  background: linear-gradient(
    90deg,
    #e2e8f0 0%,
    #f1f5f9 50%,
    #e2e8f0 100%
  );
  background-size: 200% 100%;
  animation: np-shimmer 1.4s ease-in-out infinite;
  border-radius: 0.25rem;
}

.np-skeleton-line {
  height: 0.875rem;
  margin-bottom: 0.5rem;
}

.np-skeleton-line:last-child {
  margin-bottom: 0;
  width: 70%;
}

.np-skeleton-card {
  height: 6rem;
  border-radius: 0.5rem;
}

/* —— Modal / Toast z-index (referencia) —— */
.np-modal {
  z-index: 40;
}

.np-toast {
  z-index: 50;
}

/* —— Scrollbar —— */
.np-scroll,
.np-sidebar nav,
.np-main {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f8fafc;
}

.np-scroll::-webkit-scrollbar,
.np-sidebar nav::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.np-scroll::-webkit-scrollbar-thumb,
.np-sidebar nav::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 3px;
}

.np-scroll::-webkit-scrollbar-track,
.np-sidebar nav::-webkit-scrollbar-track {
  background-color: #f8fafc;
}

/* —— Login split screen (Fase 6.1) —— */
.np-login-split {
  display: grid;
  grid-template-columns: 2fr 3fr; /* 40% · 60% */
  min-height: 100vh;
  background-color: #f8fafc;
}

@media (max-width: 1024px) {
  .np-login-split {
    grid-template-columns: 1fr;
    grid-template-rows: 11rem 1fr;
  }
}

.np-login-form-panel {
  display: grid;
  align-content: center;
  justify-items: start;
  padding: 2.5rem clamp(1.5rem, 5vw, 4rem);
  background-color: #f8fafc;
}

@media (max-width: 1024px) {
  .np-login-form-panel {
    padding: 2rem 1.5rem 2.5rem;
  }
}

.np-login-form-inner {
  width: 100%;
  max-width: 22rem;
}

.np-login-input {
  display: block;
  width: 100%;
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  color: #0f172a;
  background-color: #ffffff;
  border: 1px solid #e2e8f0; /* slate-200 */
  border-radius: 0.375rem;
  transition: border-color 0.2s ease-out, box-shadow 0.2s ease-out;
}

.np-login-input:focus {
  outline: none;
  border-color: #06b6d4;
  box-shadow: 0 0 0 3px rgb(6 182 212 / 0.35); /* ring-cyan-500 */
}

.np-login-submit {
  display: inline-grid;
  grid-auto-flow: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #ffffff;
  background-color: #0891b2; /* cyan-600 */
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background-color 0.2s ease-out, transform 0.15s ease-out;
}

.np-login-submit:hover {
  background-color: #0e7490; /* cyan-700 */
}

.np-login-submit:active {
  transform: scale(0.98);
}

.np-login-visual {
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    145deg,
    #0891b2 0%,
    #0e7490 28%,
    #155e75 52%,
    #1e3a5f 78%,
    #0f172a 100%
  );
}

@media (max-width: 1024px) {
  .np-login-visual {
    grid-row: 1;
    min-height: 11rem;
  }
}

.np-login-visual-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.45;
}

.np-login-visual-caption {
  position: absolute;
  left: 2rem;
  bottom: 2rem;
  max-width: 28rem;
  text-align: left;
  z-index: 1;
}

@media (max-width: 1024px) {
  .np-login-visual-caption {
    left: 1.25rem;
    bottom: 1.25rem;
  }
}

.np-login-footer {
  display: grid;
  gap: 0.5rem;
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgb(226 232 240 / 0.8);
  font-size: 0.8125rem;
  color: #64748b;
  text-align: left;
}

.np-login-footer a {
  color: #0891b2;
  text-decoration: none;
  transition: color 0.2s ease-out;
}

.np-login-footer a:hover {
  color: #0e7490;
}

/* —— Dashboard tenant (Fase 6.2) —— */
.np-dashboard {
  display: grid;
  grid-template-areas:
    "metrics"
    "chart"
    "table";
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  transition: opacity 0.2s ease-out;
}

.np-dashboard-loading {
  opacity: 0.92;
}

.np-dashboard-loaded {
  opacity: 1;
}

.np-dashboard-metrics {
  grid-area: metrics;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  padding-bottom: 1.75rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid rgb(226 232 240 / 0.8);
}

@media (max-width: 1024px) {
  .np-dashboard-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .np-dashboard-metrics {
    grid-template-columns: 1fr;
  }
}

.np-kpi {
  position: relative;
  padding: 0 1.5rem 0 0;
  text-align: left;
  border-right: 1px solid rgb(226 232 240 / 0.6);
}

.np-kpi:last-child {
  border-right: none;
  padding-right: 0;
}

@media (max-width: 1024px) {
  .np-kpi:nth-child(2) {
    border-right: none;
  }
  .np-kpi {
    padding-bottom: 1.25rem;
    margin-bottom: 0.5rem;
  }
}

.np-kpi-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.np-kpi-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.np-kpi-value {
  font-size: 2rem;
  line-height: 1.1;
  font-weight: 600;
  color: #0f172a;
  transition: color 0.2s ease-out;
}

.np-kpi-unit {
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
  margin-left: 0.25rem;
}

.np-kpi-sub {
  margin-left: 0.125rem;
}

.np-kpi-detail {
  margin-top: 0.375rem;
}

/* Indicador verde pulsante (sin glow neón) */
@keyframes np-live-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.45;
    transform: scale(0.92);
  }
}

.np-live-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background-color: #22c55e;
  justify-self: end;
  animation: np-live-pulse 2s ease-in-out infinite;
}

/* Tooltips KPI */
.np-kpi[data-np-tooltip]::after,
[data-np-tooltip]:not(.np-kpi)::after {
  content: attr(data-np-tooltip);
  position: absolute;
  left: 0;
  bottom: calc(100% + 0.35rem);
  z-index: 20;
  max-width: 16rem;
  padding: 0.4rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.35;
  color: #f8fafc;
  background-color: #334155;
  border-radius: 0.25rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease-out;
  text-transform: none;
  letter-spacing: normal;
}

.np-kpi[data-np-tooltip]:hover::after,
[data-np-tooltip]:hover::after {
  opacity: 1;
}

.np-dashboard-chart {
  grid-area: chart;
  margin-bottom: 2rem;
}

.np-dashboard-table {
  grid-area: table;
}

.np-dashboard-section-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1rem;
  text-align: left;
}

.np-chart-panel {
  position: relative;
  min-height: 280px;
  padding: 1rem 1rem 0.5rem;
  background-color: #ffffff;
  border: 1px solid rgb(226 232 240 / 0.5);
  border-radius: 0.5rem;
}

.np-chart-wrap {
  position: relative;
  height: 280px;
  transition: opacity 0.25s ease-out;
}

.np-data-row {
  transition: background-color 0.15s ease-out;
}

.np-data-row:hover {
  background-color: #f8fafc;
}

/* —— OLTs (Fase 6.3) —— */

/* Pulso sutil en estado online (sin glow neón) */
.np-status-pulse .np-status-dot {
  animation: np-live-pulse 2s ease-in-out infinite;
}

.np-tabs {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 0;
  border-bottom: 1px solid rgb(226 232 240 / 0.8);
}

.np-tab {
  display: inline-grid;
  grid-auto-flow: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  transition: color 0.2s ease-out, border-color 0.2s ease-out;
}

.np-tab:hover {
  color: #0f172a;
}

.np-tab.is-active {
  color: #0891b2;
  border-bottom-color: #0891b2;
}

.np-tab-count {
  font-size: 0.75rem;
  color: #94a3b8;
}

.np-tab.is-active .np-tab-count {
  color: #0e7490;
}

.np-table-actions {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 0.25rem;
  justify-content: end;
}

.np-btn-icon {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  font-size: 1rem;
  color: #64748b;
  background: none;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: color 0.2s ease-out, background-color 0.2s ease-out;
}

.np-btn-icon:hover {
  color: #0891b2;
  background-color: #f1f5f9;
}

.np-btn-icon-danger:hover {
  color: #b91c1c;
  background-color: #fef2f2;
}

.np-empty-state {
  display: grid;
  justify-items: start;
  max-width: 28rem;
  text-align: left;
}

.np-empty-illustration {
  width: 100%;
  max-width: 12rem;
  margin-bottom: 1.25rem;
  opacity: 0.9;
}

.np-empty-illustration svg {
  width: 100%;
  height: auto;
}

.np-olt-row.is-hidden {
  display: none;
}

/* Formulario OLT */
.np-form-layout {
  text-align: left;
}

.np-field {
  display: grid;
  gap: 0.25rem;
}

.np-helper {
  font-size: 0.75rem;
  color: #94a3b8;
  margin: 0;
}

.np-field-error {
  font-size: 0.75rem;
  color: #b91c1c;
  margin: 0;
}

.np-field-error:not(.hidden),
.np-input.is-invalid {
  border-color: #fca5a5;
}

.np-input.is-invalid:focus {
  box-shadow: 0 0 0 3px rgb(239 68 68 / 0.12);
}

.np-form-test {
  display: grid;
  gap: 0.75rem;
  padding-top: 0.25rem;
}

.np-form-actions {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 0.5rem;
  padding-top: 0.5rem;
}

.np-btn.is-loading .np-btn-label {
  display: none;
}

.np-btn.is-loading .np-btn-loading {
  display: inline-grid;
  grid-auto-flow: column;
  align-items: center;
  gap: 0.5rem;
}

.np-btn-loading {
  display: none;
}

@keyframes np-spin {
  to {
    transform: rotate(360deg);
  }
}

.np-spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid #e2e8f0;
  border-top-color: #0891b2;
  border-radius: 9999px;
  animation: np-spin 0.7s linear infinite;
}

.np-test-result {
  display: inline-grid;
  grid-auto-flow: column;
  align-items: start;
  gap: 0.5rem;
  font-size: 0.875rem;
  max-width: 65ch;
}

.np-test-result.is-ok {
  color: #15803d;
}

.np-test-result.is-error {
  color: #b91c1c;
}

.np-test-result i {
  font-size: 1.125rem;
  margin-top: 0.1rem;
}

/* Detalle OLT */
.np-olt-detail-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  padding-bottom: 1.5rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid rgb(226 232 240 / 0.8);
}

@media (max-width: 768px) {
  .np-olt-detail-metrics {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

.np-kpi-inline {
  padding: 0 1.5rem 0 0;
  border-right: 1px solid rgb(226 232 240 / 0.6);
  text-align: left;
}

.np-kpi-inline:last-child {
  border-right: none;
  padding-right: 0;
}

@media (max-width: 768px) {
  .np-kpi-inline {
    border-right: none;
    padding-right: 0;
  }
}

/* —— ONUs (Fase 6.4) —— */
.np-filters {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)) auto auto;
  align-items: end;
  gap: 1rem 1.25rem;
  max-width: 48rem;
}

.np-field-inline .np-label {
  margin-bottom: 0.25rem;
}

.np-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364748b'%3E%3Cpath d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  padding-right: 2rem;
}

.np-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 0.25rem;
  letter-spacing: 0.01em;
}

.np-badge-muted {
  color: #64748b;
  background-color: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.np-badge-ok {
  color: #15803d;
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.np-dl {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  gap: 1rem 1.5rem;
  text-align: left;
}

.np-dl dt {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  margin-bottom: 0.25rem;
}

.np-dl dd {
  margin: 0;
  font-size: 0.875rem;
  color: #0f172a;
}

.np-dl-compact {
  max-width: 28rem;
}

.np-wifi-loader {
  display: grid;
  justify-items: start;
  padding: 1.5rem 0;
}

.np-spinner-lg {
  width: 1.5rem;
  height: 1.5rem;
}

.np-adopt-feedback {
  display: inline-grid;
  grid-auto-flow: column;
  align-items: start;
  gap: 0.5rem;
  font-size: 0.875rem;
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  max-width: 65ch;
}

.np-adopt-feedback.is-ok {
  color: #15803d;
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.np-adopt-feedback.is-error {
  color: #b91c1c;
  background-color: #fef2f2;
  border: 1px solid #fecaca;
}

.np-onu-detail-grid {
  padding-bottom: 1rem;
  border-bottom: 1px solid rgb(226 232 240 / 0.8);
}

/* —— Perfiles (Fase 6.5) —— */
/* Campo contraseña: acciones dentro del input (generar + ojo) */
.np-password-field {
  position: relative;
  width: 100%;
}

.np-password-field > .np-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
}

.np-password-field--actions .np-input {
  padding-right: 4.75rem;
}

.np-password-field--toggle-only .np-input {
  padding-right: 2.75rem;
}

.np-password-actions {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 0.125rem;
  padding-right: 0.35rem;
  pointer-events: none;
}

.np-password-action,
.np-password-toggle {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  margin: 0;
  padding: 0;
  color: #64748b;
  background: transparent;
  border: none;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: color 0.2s ease-out, background-color 0.2s ease-out;
}

.np-password-action:hover,
.np-password-toggle:hover {
  color: #0891b2;
  background-color: rgb(8 145 178 / 0.08);
}

.np-password-toggle.is-visible {
  color: #0891b2;
}

.np-password-action i,
.np-password-toggle i {
  font-size: 1.125rem;
  line-height: 1;
}

.np-credential-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  align-items: start;
}

.np-credential-row dd {
  margin: 0;
}

.np-copy-btn {
  flex-shrink: 0;
}

.np-copy-btn.is-copied {
  color: #15803d;
}

.np-input-suffix-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: stretch;
}

.np-input-suffix-wrap .np-input {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.np-input-suffix {
  display: inline-grid;
  place-items: center;
  padding: 0 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: none;
  border-radius: 0 0.375rem 0.375rem 0;
}

.np-btn-danger {
  color: #ffffff;
  background-color: #dc2626;
  border-color: #dc2626;
}

.np-btn-danger:hover {
  background-color: #b91c1c;
}

.np-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: start center;
  padding: 2rem 1rem;
  background-color: rgb(15 23 42 / 0.45);
  overflow-y: auto;
}

.np-modal-overlay.hidden {
  display: none;
}

body.np-modal-open {
  overflow: hidden;
}

.np-modal-panel {
  width: 100%;
  max-width: 24rem;
  margin-top: 10vh;
  padding: 1.25rem 1.5rem;
  background-color: #ffffff;
  border: 1px solid rgb(226 232 240 / 0.8);
  border-radius: 0.5rem;
  text-align: left;
  box-shadow: 0 4px 24px rgb(15 23 42 / 0.08);
}

.np-modal-actions {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 0.5rem;
  justify-content: start;
}

.np-autocomplete {
  margin: 0.25rem 0 0;
  padding: 0.25rem 0;
  list-style: none;
  max-height: 12rem;
  overflow-y: auto;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
  box-shadow: 0 4px 12px rgb(15 23 42 / 0.06);
}

.np-autocomplete.hidden {
  display: none;
}

.np-autocomplete li {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color 0.15s ease-out;
}

.np-autocomplete li:hover,
.np-autocomplete li:focus {
  background-color: #f1f5f9;
  outline: none;
}

.np-assign-form-section {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgb(226 232 240 / 0.8);
}

/* —— Monitoreo (Fase 6.6) —— */
.np-monitoring {
  display: grid;
  gap: 0;
  text-align: left;
}

.np-monitor-subnav {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 0;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgb(226 232 240 / 0.8);
}

.np-monitor-subnav-link {
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.2s ease-out, border-color 0.2s ease-out;
}

.np-monitor-subnav-link:hover {
  color: #0f172a;
}

.np-monitor-subnav-link.is-active {
  color: #0891b2;
  border-bottom-color: #0891b2;
}

.np-monitor-section {
  padding-top: 1.5rem;
  padding-bottom: 1.75rem;
  border-top: 1px solid rgb(226 232 240 / 0.55);
}

.np-monitor-section:first-of-type {
  border-top: none;
  padding-top: 0;
}

.np-monitor-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .np-monitor-metrics {
    grid-template-columns: 1fr;
  }
}

.np-chart-panel-flat {
  border: none;
  padding: 0.5rem 0 0;
  min-height: 280px;
  background: transparent;
}

.np-chart-wrap {
  position: relative;
  height: 280px;
}

.np-chart-wrap-bar {
  height: 240px;
}

.np-history-filters {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  align-items: end;
  gap: 1rem 1.25rem;
  max-width: 52rem;
}

input[type="datetime-local"].np-input {
  min-height: 2.375rem;
}

.np-badge-error {
  color: #b91c1c;
  background-color: #fef2f2;
  border: 1px solid #fecaca;
}

.np-badge-warning {
  color: #b45309;
  background-color: #fffbeb;
  border: 1px solid #fcd34d;
}

.np-alert-rules {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.np-alert-rules li {
  display: inline-grid;
  grid-auto-flow: column;
  align-items: center;
  gap: 0.5rem;
}

.np-alerts-list {
  display: grid;
  gap: 0;
}

.np-alert-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid rgb(241 245 249 / 0.9);
}

.np-alert-row:first-child {
  border-top: none;
  padding-top: 0;
}

.np-alert-row-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 0.25rem;
}

.np-alert-row-body {
  min-width: 0;
}

/* —— Admin superadmin (Fase 6.7) —— */
.np-admin-dashboard {
  text-align: left;
}

.np-input-group {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: stretch;
}

.np-input-group-prefix,
.np-input-group-suffix {
  display: inline-grid;
  place-items: center;
  padding: 0 0.65rem;
  font-size: 0.8125rem;
  color: #64748b;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  white-space: nowrap;
}

.np-input-group-prefix {
  border-right: none;
  border-radius: 0.375rem 0 0 0.375rem;
}

.np-input-group .np-input {
  border-radius: 0;
  min-width: 0;
}

.np-input-group-suffix {
  border-left: none;
  border-radius: 0 0.375rem 0.375rem 0;
}

.np-input-group .np-input:focus {
  position: relative;
  z-index: 1;
}
