/* Newsroom Analytics · Design System v11 · tokens responsive */
:root {
  /* ── Breakpoints (referencia): mobile <768 · tablet 768–1279 · desktop ≥1280 ── */
  --nr-bp-tablet: 768px;
  --nr-bp-desktop: 1280px;

  /* ── Tipografía (mobile first) ── */
  --nr-fs-body: 14px;
  --nr-fs-label: 13px;
  --nr-fs-link: 14px;
  --nr-fs-input: 14px;
  --nr-fs-btn: 14px;
  --nr-fs-btn-sm: 13px;
  --nr-fs-btn-lg: 14px;
  --nr-fs-badge: 12px;
  --nr-fs-nav: 14px;
  --nr-fs-topbar: 14px;
  --nr-fs-h1: 30px;
  --nr-fs-h2: 24px;
  --nr-fs-h3: 20px;
  --nr-fs-h4: 18px;
  --nr-fs-h5: 16px;

  /* ── Alturas de control (mobile first) ── */
  --nr-h-input: 40px;
  --nr-h-btn: 40px;
  --nr-h-btn-sm: 36px;
  --nr-h-btn-lg: 44px;
  --nr-h-badge: 20px;
  --nr-h-nav: 40px;
  --nr-h-table-row: 40px;
  --nr-list-item-pad: 16px;

  /* ── Colores ── */
  --nr-primary: #12366D;
  --nr-primary-dark: #0d2852;
  --nr-primary-light: #1a4a8f;
  --nr-secondary: #E58300;
  --nr-secondary-soft: rgba(229, 131, 0, 0.08);
  --nr-bg: #FAFAFA;
  --nr-surface: #ffffff;
  --nr-border: #E5E7EB;
  --nr-border-light: #F3F4F6;
  --nr-text: #111827;
  --nr-text-muted: #6B7280;
  --nr-text-subtle: #9CA3AF;
  --nr-success: #059669;
  --nr-warning: #d97706;
  --nr-danger: #dc2626;
  --nr-nav-rail-w: 48px;
  --nr-nav-tree-w: 231px;
  --nr-sidebar-w: 279px;
  --nr-sidebar-collapsed-w: var(--nr-nav-rail-w);
  --nr-topbar-h: 56px;
  --nr-font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  --nr-radius: 24px;
  --nr-radius-sm: 24px;
  --nr-radius-lg: 24px;
  --nr-radius-pill: 9999px;
  --nr-radius-circle: 50%;
  --nr-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  --nr-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  /* macOS notices */
  --nr-notice-font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
  --nr-notice-bg: rgba(255, 255, 255, 0.72);
  --nr-notice-bg-solid: rgba(252, 252, 252, 0.94);
  --nr-notice-border: rgba(255, 255, 255, 0.55);
  --nr-notice-stroke: rgba(0, 0, 0, 0.08);
  --nr-notice-text: rgba(0, 0, 0, 0.88);
  --nr-notice-title: rgba(0, 0, 0, 0.92);
  --nr-notice-muted: rgba(0, 0, 0, 0.52);
  --nr-notice-shadow: 0 8px 28px rgba(0, 0, 0, 0.12), 0 1px 4px rgba(0, 0, 0, 0.06);
  --nr-notice-blur: blur(32px) saturate(160%);
  --nr-notice-radius: 16px;
  --nr-notice-max-w: 360px;
  --nr-notice-min-h: 48px;
  --nr-notice-icon: #34c759;
  --nr-notice-icon-error: #ff3b30;
  --nr-notice-icon-warn: #ff9500;
  --nr-notice-icon-info: #007aff;
  --nr-notice-icon-app: linear-gradient(180deg, #6366f1 0%, #4f46e5 100%);
  /* Medios editoriales */
  --nr-expreso: #0032A0;
  --nr-expreso-soft: rgba(0, 50, 160, 0.07);
  --nr-expreso-border: rgba(0, 50, 160, 0.22);
  --nr-extra: #EC2B00;
  --nr-extra-soft: rgba(236, 43, 0, 0.07);
  --nr-extra-border: rgba(236, 43, 0, 0.22);
}

@media (min-width: 768px) {
  :root {
    --nr-fs-h1: 36px;
    --nr-fs-h2: 30px;
    --nr-fs-h3: 24px;
    --nr-fs-h4: 20px;
    --nr-fs-h5: 18px;
    --nr-h-badge: 24px;
    --nr-h-table-row: 44px;
  }
}

@media (min-width: 1280px) {
  :root {
    /* Headings h1–h5: mismos valores que tablet (768px+) */
    --nr-h-btn-lg: 44px;
    --nr-h-badge: 24px;
    --nr-h-table-row: 44px;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body.nr-app {
  margin: 0;
  font-family: var(--nr-font);
  font-size: var(--nr-fs-body);
  color: var(--nr-text);
  background: var(--nr-bg);
  line-height: 1.5;
  cursor: default;
  /* Evita selección accidental al pulsar filas/botones del shell; ver excepciones abajo */
  -webkit-user-select: none;
  user-select: none;
}

/* Contenido de lectura: copiar sin apariencia de caja de texto */
body.nr-app :is(.nr-page-inner,
  .nr-content,
  .nr-chat-scroll,
  .nr-help-article,
  .nr-help-hub,
  .nr-breadcrumb,
  .nr-topbar h1,
  .nr-automation-log) {
  -webkit-user-select: text;
  user-select: text;
}

body.nr-app :is(.nr-page-inner, .nr-content, .nr-chat-scroll, .nr-help-article, .nr-help-hub) :is(p, span, li, td, th, div, h1, h2, h3, h4, h5, h6, pre, code, label,
  .nr-detail-label, .nr-detail-value, .nr-field-label,
  .nr-help-p, .nr-help-h3, .nr-help-h4, .nr-help-pre, .nr-help-callout,
  .nr-help-ul, .nr-help-ol, .nr-help-article-title,
  .nr-tech-panel-desc, .nr-tech-checklist-sub, .nr-tech-meta, .nr-tech-checklist-name) {
  cursor: inherit;
  caret-color: transparent;
}

body.nr-app :is(.nr-page-inner, .nr-content, .nr-chat-scroll, .nr-help-article, .nr-help-hub) :is(p, span, li, td, th, div, h1, h2, h3, h4, h5, h6, pre, code, label,
  .nr-detail-label, .nr-detail-value, .nr-field-label,
  .nr-help-p, .nr-help-h3, .nr-help-h4, .nr-help-pre, .nr-help-callout,
  .nr-help-ul, .nr-help-ol, .nr-help-article-title,
  .nr-tech-panel-desc, .nr-tech-checklist-sub, .nr-tech-meta, .nr-tech-checklist-name):focus {
  outline: none;
}

body.nr-app .nr-breadcrumb,
body.nr-app .nr-topbar h1,
body.nr-app .nr-automation-log {
  cursor: default;
  caret-color: transparent;
}

/* Solo campos reales son editables */
body.nr-app input:not([readonly]):not([disabled]):not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="hidden"]):not([type="file"]),
body.nr-app textarea:not([readonly]):not([disabled]),
body.nr-login-page input:not([readonly]):not([disabled]):not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="hidden"]) {
  cursor: text;
  -webkit-user-select: text;
  user-select: text;
  caret-color: auto;
}

body.nr-app input[readonly]:not([type="hidden"]),
body.nr-app textarea[readonly] {
  cursor: default;
  background: var(--nr-border-light);
  color: var(--nr-text-muted);
}

body.nr-app select,
body.nr-app .nr-select {
  cursor: pointer;
}

body.nr-app a[href],
body.nr-app button,
body.nr-app .nr-btn,
body.nr-app .nr-nav-link,
body.nr-app .nr-tab,
body.nr-app .nr-window-tab,
body.nr-app .nr-row-clickable,
body.nr-app summary,
body.nr-app [data-drawer-url],
body.nr-app .nr-drawer-close,
body.nr-app .nr-topbar-collapse,
body.nr-app .nr-mobile-menu,
body.nr-app label:has(> input[type="checkbox"]),
body.nr-app label:has(> input[type="radio"]),
body.nr-app input[type="checkbox"],
body.nr-app input[type="radio"] {
  cursor: pointer;
}

body.nr-app .nr-code-block,
body.nr-app pre.nr-pre,
body.nr-app .nr-code-inline,
body.nr-app .nr-table td {
  -webkit-user-select: text;
  user-select: text;
  cursor: default;
}

body.nr-login-page {
  cursor: default;
  -webkit-user-select: none;
  user-select: none;
}

a {
  color: var(--nr-primary);
  font-size: var(--nr-fs-link);
  text-decoration: none;
}

a:hover {
  color: var(--nr-secondary);
  text-decoration: underline;
}

/* ── Escala tipográfica (topbar fijo 14px; h1–h5 escalan hasta tablet y se mantienen en desktop) ── */
body.nr-app h1 {
  font-size: var(--nr-fs-h1);
  font-weight: 700;
  line-height: 1.15;
  margin: 0;
}

body.nr-app .nr-topbar h1 {
  font-size: var(--nr-fs-topbar);
  font-weight: 600;
  line-height: 1.35;
}

body.nr-app h2 {
  font-size: var(--nr-fs-h2);
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
}

body.nr-app h3 {
  font-size: var(--nr-fs-h3);
  font-weight: 600;
  line-height: 1.25;
  margin: 0;
}

body.nr-app h4 {
  font-size: var(--nr-fs-h4);
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
}

body.nr-app h5 {
  font-size: var(--nr-fs-h5);
  font-weight: 600;
  line-height: 1.35;
  margin: 0;
}

body.nr-app p {
  font-size: var(--nr-fs-body);
  margin: 0;
}

/* ═══════════════════════════════════════
   LOGIN
════════════════════════════════════════ */
.nr-login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--nr-primary-dark) 0%, var(--nr-primary) 60%, #1a4a8f 100%);
  padding: 1.5rem;
  font-family: var(--nr-font);
}

.nr-login-card {
  width: 100%;
  max-width: 400px;
  background: var(--nr-surface);
  border-radius: var(--nr-radius);
  padding: 2.5rem 2rem;
  border-top: 3px solid var(--nr-secondary);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
}

.nr-login-brand {
  text-align: center;
  margin-bottom: 2rem;
}

.nr-login-brand .logo-mark {
  width: 48px;
  height: 48px;
  background: var(--nr-primary);
  color: #fff;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.nr-login-brand h1 {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--nr-primary);
}

.nr-login-brand p {
  margin: 0.5rem 0 0;
  color: var(--nr-text-muted);
  font-size: 0.875rem;
}

/* ═══════════════════════════════════════
   SHELL LAYOUT
════════════════════════════════════════ */
.nr-shell {
  display: flex;
  min-height: 100vh;
}

.nr-shell.nr-chat-shell {
  height: 100vh;
  overflow: hidden;
}

/* ─── SIDEBAR ─── */
.nr-sidebar {
  width: var(--nr-sidebar-w);
  background: var(--nr-surface);
  border-right: 1px solid var(--nr-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 200;
  transition: width 0.22s ease, transform 0.22s ease;
  overflow: hidden;
}

.nr-shell.nr-sidebar-collapsed .nr-sidebar {
  width: var(--nr-sidebar-collapsed-w);
}

.nr-sidebar-header {
  display: flex;
  align-items: center;
  padding: 0 0.875rem;
  height: var(--nr-topbar-h);
  border-bottom: 1px solid var(--nr-border);
  flex-shrink: 0;
}

.nr-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-width: 0;
}

.nr-sidebar-brand .logo-mark {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  background: var(--nr-primary);
  color: #fff;
  border-radius: 7px;
  font-weight: 700;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nr-sidebar-brand span {
  color: var(--nr-text);
  font-weight: 600;
  font-size: 0.875rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Ocultar al colapsar (solo rail visible) */
.nr-shell.nr-sidebar-collapsed .nr-sidebar-brand span,
.nr-shell.nr-sidebar-collapsed .nr-sidebar-user-info {
  display: none;
}

.nr-shell.nr-sidebar-collapsed .nr-sidebar-header {
  justify-content: center;
  padding: 0;
}

.nr-shell.nr-sidebar-collapsed .nr-sidebar-user {
  justify-content: center;
}

/* NAV split — rail de iconos + árbol de ítems (estilo Outlook) */
.nr-nav-split {
  flex: 1;
  display: flex;
  min-height: 0;
  overflow: hidden;
}

.nr-nav-rail {
  width: var(--nr-nav-rail-w);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0;
  background: #EBEBEB;
  border-right: 1px solid var(--nr-border);
}

.nr-nav-rail-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--nr-text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.nr-nav-rail-btn .nr-nav-icon {
  width: 20px;
  height: 20px;
}

.nr-nav-rail-btn:hover {
  background: rgba(255, 255, 255, 0.65);
  color: var(--nr-text);
}

.nr-nav-rail-btn.active,
.nr-rail-settings.active {
  background: var(--nr-surface);
  color: var(--nr-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.nr-nav-rail-btn.active .nr-nav-icon,
.nr-rail-settings.active svg {
  stroke-width: 2.25;
}

.nr-nav-tree {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--nr-surface);
}

.nr-nav-tree-panel[hidden] {
  display: none;
}

.nr-nav-tree-head {
  height: var(--nr-topbar-h);
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  font-weight: 600;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--nr-border);
  color: var(--nr-text);
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.nr-nav-group-label {
  padding: 0.625rem 0.625rem 0.25rem;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--nr-text-subtle);
}

.nr-nav-group-label:first-child {
  padding-top: 0.125rem;
}

.nr-nav-items {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 0.75rem 0.5rem 0.75rem;
}

.nr-nav-link {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-height: var(--nr-h-nav);
  padding: 0 0.625rem;
  border-radius: var(--nr-radius-sm);
  color: var(--nr-text-muted);
  font-size: var(--nr-fs-nav);
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.nr-nav-link:hover {
  background: var(--nr-border-light);
  color: var(--nr-text);
  text-decoration: none;
}

.nr-nav-link.active {
  background: var(--nr-primary-light);
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
}

.nr-nav-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  stroke-width: 1.75;
}

.nr-nav-link.active .nr-nav-icon {
  stroke-width: 2.25;
}

.nr-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Sidebar colapsado: flyout del árbol al pasar sobre el icono del rail */
.nr-shell.nr-sidebar-collapsed .nr-sidebar {
  overflow: visible;
}

.nr-shell.nr-sidebar-collapsed .nr-nav-split {
  position: relative;
  overflow: visible;
}

.nr-shell.nr-sidebar-collapsed .nr-nav-tree {
  display: block !important;
  position: absolute;
  left: var(--nr-nav-rail-w);
  top: 0;
  width: var(--nr-nav-tree-w);
  max-height: min(70vh, 480px);
  z-index: 300;
  background: var(--nr-surface);
  border: 1px solid var(--nr-border);
  border-radius: 0 var(--nr-radius) var(--nr-radius) 0;
  box-shadow: 4px 8px 24px rgba(15, 23, 42, 0.12);
  transform: translateX(-6px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
  overflow-y: auto;
}

.nr-shell.nr-sidebar-collapsed.nr-nav-flyout-open .nr-nav-tree {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
}

/* SIDEBAR FOOTER — usuario */
.nr-sidebar-footer {
  border-top: 1px solid var(--nr-border);
  padding: 0.5rem;
  flex-shrink: 0;
}

.nr-sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.375rem 0.25rem;
  border-radius: var(--nr-radius-sm);
}

.nr-sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.nr-sidebar-username {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--nr-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nr-sidebar-role-badge {
  display: block;
  font-size: 0.625rem;
  color: var(--nr-text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nr-sidebar-logout {
  background: none;
  border: none;
  padding: 0.25rem;
  border-radius: 4px;
  color: var(--nr-text-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.nr-sidebar-logout:hover {
  background: #fee2e2;
  color: var(--nr-danger);
}

.nr-sidebar-logout svg {
  width: 13px;
  height: 13px;
}

.nr-sidebar-settings {
  border-radius: var(--nr-radius-sm);
  color: var(--nr-text-subtle);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.nr-sidebar-settings:hover,
.nr-sidebar-settings.active {
  background: var(--nr-border-light);
  color: var(--nr-primary);
}

.nr-shell.nr-sidebar-collapsed .nr-sidebar-logout,
.nr-shell.nr-sidebar-collapsed .nr-sidebar-settings {
  margin: 0 auto;
}

/* Cuenta — seguridad */
.nr-account-page {
  max-width: 640px;
}

.nr-account-section-title {
  margin: 0 0 1rem !important;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--nr-text);
}

.nr-account-card {
  margin-bottom: 0;
}

.nr-account-divider {
  border: none;
  border-top: 1px solid var(--nr-border);
  margin: 1.75rem 0 1.25rem;
}

.nr-account-logout-form {
  margin: 0;
  display: flex;
  justify-content: flex-end;
}

.nr-account-logout-btn {
  color: #fff;
  background: var(--nr-danger);
  border-color: var(--nr-danger);
}

.nr-account-logout-btn:hover {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #fff;
  text-decoration: none;
}

/* Avatar pequeño (sidebar) */
.nr-avatar-sm {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  background: rgba(229, 131, 0, 0.1);
  color: var(--nr-secondary);
  border-radius: var(--nr-radius-circle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.6875rem;
}

/* ─── MAIN AREA ─── */
.nr-main {
  flex: 1;
  margin-left: var(--nr-sidebar-w);
  min-width: 0;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.22s ease;
}

.nr-shell.nr-sidebar-collapsed .nr-main {
  margin-left: var(--nr-sidebar-collapsed-w);
}

/* ─── TOPBAR ─── */
.nr-topbar {
  background: var(--nr-surface);
  border-bottom: 1px solid var(--nr-border);
  height: var(--nr-topbar-h);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 50;
}

.nr-topbar-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.nr-topbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

body.nr-app .nr-topbar h1 {
  margin: 0;
  font-size: var(--nr-fs-topbar);
  font-weight: 600;
  line-height: 1.35;
  color: var(--nr-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.nr-app .nr-topbar .nr-breadcrumb {
  font-size: var(--nr-fs-topbar);
  font-weight: 400;
  line-height: 1.35;
  color: var(--nr-text-subtle);
  margin: 0 0 0.125rem;
}

.nr-breadcrumb a {
  color: var(--nr-text-muted);
  font-size: inherit;
}

.nr-breadcrumb a:hover {
  color: var(--nr-text);
  text-decoration: none;
}

/* Window tabs en topbar */
.nr-topbar-right .nr-window-tabs {
  margin-bottom: 0;
  border-color: var(--nr-border-light);
}

/* Toggle colapsar sidebar (desktop) */
.nr-topbar-collapse {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--nr-text-muted);
  border-radius: var(--nr-radius-sm);
  transition: background 0.15s, color 0.15s;
}

.nr-topbar-collapse:hover {
  background: var(--nr-border-light);
  color: var(--nr-text);
}

.nr-topbar-collapse svg {
  flex-shrink: 0;
}

/* Hamburger mobile */
.nr-mobile-menu {
  display: none;
  background: none;
  border: 1px solid var(--nr-border);
  border-radius: var(--nr-radius-sm);
  padding: 0.375rem;
  color: var(--nr-text-muted);
  align-items: center;
  justify-content: center;
}

/* ─── CONTENT ─── */
.nr-content {
  padding: 1.5rem;
  flex: 1;
  width: 100%;
  max-width: 1400px;
  margin-inline: auto;
  align-self: center;
  box-sizing: border-box;
}

/* ═══════════════════════════════════════
   COMPONENTS
════════════════════════════════════════ */

/* BUTTONS · tokens reutilizables */
.nr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  min-height: var(--nr-h-btn);
  height: var(--nr-h-btn);
  padding: 0 1rem;
  font-family: var(--nr-font);
  font-size: var(--nr-fs-btn);
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: var(--nr-radius-pill);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s, opacity 0.15s;
}

.nr-btn-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--nr-secondary);
  font-weight: 600;
  font-size: inherit;
  border-radius: 0;
  min-height: auto;
  height: auto;
}

.nr-editor-btn {
  border-radius: var(--nr-radius-sm);
}

.nr-nav-rail-btn,
.nr-prev-close,
.nr-prev-mode-btn,
.nr-chat-bar-back {
  border-radius: var(--nr-radius-sm);
}

.nr-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.nr-btn-primary {
  background: var(--nr-primary);
  color: #fff;
  border-color: var(--nr-primary);
}

.nr-btn-primary:hover {
  background: var(--nr-primary-dark);
  color: #fff;
  text-decoration: none;
  border-color: var(--nr-primary-dark);
}

.nr-btn-accent {
  background: var(--nr-secondary);
  color: #fff;
  border-color: var(--nr-secondary);
}

.nr-btn-accent:hover {
  opacity: 0.88;
  color: #fff;
  text-decoration: none;
}

.nr-btn-ghost {
  background: var(--nr-surface);
  color: var(--nr-text-muted);
  border-color: var(--nr-border);
}

.nr-btn-ghost:hover {
  background: var(--nr-border-light);
  color: var(--nr-text);
  text-decoration: none;
  border-color: var(--nr-border);
}

.nr-btn-sm {
  min-height: var(--nr-h-btn-sm);
  height: var(--nr-h-btn-sm);
  padding: 0 1rem;
  font-size: var(--nr-fs-btn-sm);
}

.nr-btn-lg {
  min-height: var(--nr-h-btn-lg);
  height: var(--nr-h-btn-lg);
  padding: 0 1.25rem;
  font-size: var(--nr-fs-btn-lg);
}

/* Botones solo icono: 36×36 px, SVG 20×20 px */
.nr-icon-btn,
.nr-gtr-config-goals-btn,
.nr-window-hero__gear,
.nr-prev-close,
.nr-sidebar-settings {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  flex-shrink: 0;
}

.nr-icon-btn {
  border: none;
  border-radius: var(--nr-radius-sm);
  background: transparent;
  color: var(--nr-text-muted);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.nr-icon-btn:hover {
  color: var(--nr-text);
  background: rgba(15, 23, 42, 0.05);
}

.nr-icon-btn svg,
.nr-gtr-config-goals-btn svg,
.nr-window-hero__gear svg,
.nr-prev-close svg,
.nr-sidebar-settings svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.nr-btn-link:hover {
  color: var(--nr-primary);
  text-decoration: underline;
}

/* INPUTS · tokens reutilizables */
.nr-input,
.nr-select,
.nr-textarea {
  width: 100%;
  min-height: var(--nr-h-input);
  padding: 0 0.75rem;
  border: 1px solid var(--nr-border);
  border-radius: var(--nr-radius-sm);
  font-family: var(--nr-font);
  font-size: var(--nr-fs-input);
  background: var(--nr-surface);
  color: var(--nr-text);
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}

:is(.nr-input):not(textarea),
.nr-select {
  height: var(--nr-h-input);
}

.nr-input-locked {
  width: 100%;
  min-height: var(--nr-h-input);
  height: var(--nr-h-input);
  padding: 0 0.75rem;
  border: 1px solid var(--nr-border);
  border-radius: var(--nr-radius-sm);
  font-family: var(--nr-font);
  font-size: var(--nr-fs-input);
  background: var(--nr-border-light);
  color: var(--nr-text-muted);
  display: flex;
  align-items: center;
  box-sizing: border-box;
  cursor: default;
  -webkit-user-select: text;
  user-select: text;
}

.nr-input:focus,
.nr-select:focus,
.nr-textarea:focus {
  outline: none;
  border-color: var(--nr-primary);
  box-shadow: 0 0 0 3px rgba(18, 54, 109, 0.1);
}

.nr-textarea {
  min-height: calc(var(--nr-h-input) * 3);
  padding: 0.5rem 0.75rem;
  font-family: Consolas, 'Courier New', monospace;
  resize: vertical;
  height: auto;
}

.nr-select {
  min-width: 180px;
}

.nr-field {
  margin-bottom: 1rem;
}

.nr-field-label,
.nr-field label:has(> input[type="checkbox"]),
.nr-field label:has(> input[type="radio"]) {
  display: block;
  font-size: var(--nr-fs-label);
  font-weight: 600;
  margin-bottom: 0.3125rem;
  color: var(--nr-text);
}

.nr-field-check label {
  display: inline;
  font-weight: 500;
  font-size: var(--nr-fs-body);
  margin-bottom: 0;
}

.nr-field-hint {
  font-size: var(--nr-fs-label);
  color: var(--nr-text-muted);
  margin-top: 0.25rem;
}

/* NOTICES · macOS (plantilla única — partials/notice.html + nr-notices.js) */
.nr-notice-host {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  left: auto;
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  width: min(var(--nr-notice-max-w), calc(100vw - 2.5rem));
  max-width: calc(100vw - 2.5rem);
  pointer-events: none;
}

.nr-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-height: var(--nr-notice-min-h);
  padding: 10px 12px;
  border-radius: var(--nr-notice-radius);
  font-family: var(--nr-notice-font);
  background: var(--nr-notice-bg);
  backdrop-filter: var(--nr-notice-blur);
  -webkit-backdrop-filter: var(--nr-notice-blur);
  border: 1px solid var(--nr-notice-border);
  box-shadow: var(--nr-notice-shadow);
  color: var(--nr-notice-text);
  pointer-events: auto;
  overflow: hidden;
}

.nr-notice--clickable {
  cursor: pointer;
}

.nr-notice--clickable:hover {
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.14), 0 2px 6px rgba(0, 0, 0, 0.08);
}

.nr-notice--persistent {
  position: relative;
  padding-right: 2rem;
}

@supports not (backdrop-filter: blur(1px)) {
  .nr-notice {
    background: var(--nr-notice-bg-solid);
  }
}

.nr-notice__icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 7.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 0.5px 0 rgba(255, 255, 255, 0.35) inset, 0 1px 2px rgba(0, 0, 0, 0.18);
}

.nr-notice__icon svg {
  width: 18px;
  height: 18px;
}

.nr-notice__icon--success {
  background: linear-gradient(180deg, #4ade80 0%, var(--nr-notice-icon) 100%);
}

.nr-notice__icon--error {
  background: linear-gradient(180deg, #ff6961 0%, var(--nr-notice-icon-error) 100%);
}

.nr-notice__icon--warning {
  background: linear-gradient(180deg, #ffb340 0%, var(--nr-notice-icon-warn) 100%);
}

.nr-notice__icon--info {
  background: linear-gradient(180deg, #5ac8fa 0%, var(--nr-notice-icon-info) 100%);
}

.nr-notice__body {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.nr-notice__title {
  margin: 0 0 2px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.018em;
  color: var(--nr-notice-title);
  line-height: 1.3;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.nr-notice__msg {
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.45;
  color: var(--nr-notice-text);
  display: block;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
  max-height: 3.2em;
}

.nr-notice--expandable .nr-notice__msg {
  max-height: 2.9em;
}

.nr-notice__hint {
  margin: 0.35rem 0 0;
  font-size: 11px;
  color: var(--nr-notice-muted);
  line-height: 1.3;
  text-align: center;
}

.nr-notice__close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--nr-notice-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nr-notice__close:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--nr-notice-title);
}

.nr-notice-modal {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  pointer-events: none;
}

.nr-notice-modal[hidden] {
  display: none !important;
}

.nr-notice-modal__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(3px);
  pointer-events: auto;
}

.nr-notice-modal__dialog {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  width: min(480px, calc(100vw - 2rem));
  max-width: calc(100vw - 2rem);
  max-height: min(80vh, 640px);
  overflow: auto;
  padding: 1.5rem 1.5rem 1.25rem;
  border-radius: var(--nr-notice-radius);
  background: var(--nr-surface);
  border: 1px solid var(--nr-border);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
  text-align: center;
  pointer-events: auto;
  margin: auto;
}

.nr-notice-modal__dialog .nr-notice-modal__icon {
  margin: 0 auto 1rem;
}

.nr-notice-modal__title {
  margin: 0 0 0.75rem;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--nr-text);
}

.nr-notice-modal__msg {
  margin: 0 auto 1.25rem;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--nr-text-muted);
  text-align: center;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-height: 50vh;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0.875rem 1rem;
  background: var(--nr-bg);
  border: 1px solid var(--nr-border-light);
  border-radius: var(--nr-radius-sm);
}

.nr-notice-modal__actions {
  display: flex;
  justify-content: center;
}

body.nr-notice-modal-open {
  overflow: hidden;
}

.nr-notice--inline {
  position: static;
  max-width: none;
  width: 100%;
  margin-bottom: 1rem;
  animation: none;
  pointer-events: auto;
}

.nr-notice--out {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

@keyframes nr-notice-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.nr-notice-host .nr-notice {
  animation: nr-notice-in 0.32s cubic-bezier(0.34, 1.25, 0.64, 1);
}

@media (max-width: 600px) {
  .nr-notice-host {
    right: 1rem;
    bottom: 1rem;
    left: auto;
    width: calc(100vw - 2rem);
    max-width: calc(100vw - 2rem);
  }

  .nr-notice-modal {
    padding: 1rem;
  }

  .nr-notice-modal__dialog {
    width: calc(100vw - 2rem);
    max-width: calc(100vw - 2rem);
    padding: 1.25rem 1rem 1rem;
  }
}

/* STAT CARDS */
.nr-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.nr-stat-card {
  background: var(--nr-surface);
  border-radius: var(--nr-radius);
  padding: 1.25rem;
  border: 1px solid var(--nr-border);
  position: relative;
  overflow: hidden;
}

.nr-stat-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--nr-primary);
}

.nr-stat-card.nr-stat-warn::before {
  background: var(--nr-warning);
}

.nr-stat-card.nr-stat-ok::before {
  background: var(--nr-success);
}

.nr-stat-card.nr-stat-accent::before {
  background: var(--nr-secondary);
}

.nr-stat-card .label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--nr-text-muted);
}

.nr-stat-card .value {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--nr-text);
  margin: 0.375rem 0 0.125rem;
  line-height: 1.1;
}

.nr-stat-card .hint {
  font-size: 0.8125rem;
  color: var(--nr-text-muted);
}

.nr-stats-compact {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

/* CARDS */
.nr-card {
  background: var(--nr-surface);
  border-radius: var(--nr-radius);
  border: 1px solid var(--nr-border);
  margin-bottom: 1rem;
  overflow: hidden;
}

.nr-card-header {
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--nr-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.625rem;
  background: var(--nr-surface);
}

.nr-card-header h2 {
  margin: 0;
  font-size: var(--nr-fs-h3);
  font-weight: 600;
  color: var(--nr-text);
}

.nr-card-body {
  padding: 1.25rem;
}

.nr-card-body.nr-table-wrap {
  padding: 0;
}

/* TABLES */
.nr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--nr-fs-body);
}

.nr-table th {
  text-align: left;
  padding: 0 1.25rem;
  height: var(--nr-h-table-row);
  font-size: var(--nr-fs-label);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--nr-text-subtle);
  background: var(--nr-border-light);
  border-bottom: 1px solid var(--nr-border);
}

.nr-table td {
  padding: 0 1.25rem;
  height: var(--nr-h-table-row);
  border-bottom: 1px solid var(--nr-border-light);
  color: var(--nr-text);
  vertical-align: middle;
}

.nr-table tbody tr:last-child td {
  border-bottom: none;
}

.nr-table tbody tr:hover {
  background: var(--nr-border-light);
}

/* Permisos por rol */
.nr-perm-page {
  max-width: 960px;
  padding-bottom: 2.5rem;
}

.nr-perm-roles-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.nr-perm-roles-card {
  margin-bottom: 1.25rem;
}

.nr-perm-table-wrap {
  overflow-x: auto;
}

.nr-perm-table .nr-perm-col-role {
  min-width: 88px;
}

.nr-perm-intro {
  font-size: 0.8125rem;
  color: var(--nr-text-muted);
  margin: 0 0 1.75rem;
  line-height: 1.6;
  max-width: 52rem;
}

.nr-perm-group {
  margin-bottom: 1.25rem;
}

.nr-perm-group .nr-card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--nr-border-light);
}

.nr-perm-group .nr-card-header h2 {
  font-size: 0.9375rem;
}

.nr-perm-table .nr-perm-col-label {
  width: 40%;
}

.nr-perm-table .nr-perm-col-role {
  text-align: center;
  width: 12%;
}

.nr-perm-table tbody td {
  padding-top: 16px;
  padding-bottom: 16px;
  height: auto;
}

.nr-perm-row-depth-0 .nr-perm-label {
  font-weight: 600;
}

.nr-perm-row-depth-1 td:first-child {
  padding-left: 1.75rem;
}

.nr-perm-row-depth-2 td:first-child {
  padding-left: 2.75rem;
}

.nr-perm-row-depth-3 td:first-child {
  padding-left: 3.75rem;
}

.nr-perm-label {
  font-weight: 500;
  font-size: 0.8125rem;
}

.nr-perm-meta {
  font-size: 0.6875rem;
  color: var(--nr-text-subtle);
  margin-top: 2px;
}

.nr-perm-code {
  font-size: 0.625rem;
  color: var(--nr-text-subtle);
  margin-top: 2px;
  font-family: var(--nr-font-mono, monospace);
}

.nr-perm-footnote {
  font-size: 0.75rem;
  color: var(--nr-text-subtle);
  margin-top: 0.5rem;
  line-height: 1.7;
}

.nr-perm-role-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.nr-icon-btn-danger {
  color: var(--nr-text-muted);
}

.nr-icon-btn-danger:hover {
  color: var(--nr-danger);
  background: rgba(220, 38, 38, 0.08);
}

.nr-role-perm-drawer {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.nr-role-perm-drawer .nr-panel-drawer-scroll {
  padding-bottom: 0;
}

.nr-role-perm-tabs-bar {
  flex-shrink: 0;
  background: #fff;
  padding: 12px 16px;
  border-bottom: 1px solid var(--nr-border-light);
}

.nr-role-perm-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.nr-role-perm-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--nr-h-btn-sm);
  height: var(--nr-h-btn-sm);
  padding: 0 14px;
  border: 1px solid var(--nr-border);
  border-radius: var(--nr-radius-pill);
  background: var(--nr-surface);
  font-family: var(--nr-font);
  font-size: var(--nr-fs-btn-sm);
  font-weight: 600;
  line-height: 1;
  color: var(--nr-text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
  margin: 0;
  border-bottom: 1px solid var(--nr-border);
}

.nr-role-perm-pill:hover {
  background: var(--nr-border-light);
  color: var(--nr-text);
  border-color: var(--nr-border);
}

.nr-role-perm-pill.active {
  background: var(--nr-primary);
  border-color: var(--nr-primary);
  color: #fff;
  box-shadow: 0 1px 3px rgba(18, 54, 109, 0.18);
}

.nr-role-perm-pill.active:hover {
  background: var(--nr-primary-dark);
  border-color: var(--nr-primary-dark);
  color: #fff;
}

.nr-role-perm-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem 1.25rem;
  min-height: 0;
}

.nr-role-perm-drawer .nr-drawer-footer {
  flex-shrink: 0;
}

.nr-role-perm-datapanel-hint {
  margin: 0 0 1rem !important;
}

.nr-role-perm-code-tag {
  color: var(--nr-text-subtle);
  font-family: var(--nr-font-mono, monospace);
  font-size: 0.75rem;
}

.nr-role-perm-meta-fields {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.nr-role-perm-textarea {
  padding-top: 16px !important;
  padding-bottom: 16px !important;
  min-height: 88px !important;
  resize: vertical;
}

.nr-role-perm-tab-panel {
  display: none;
}

.nr-role-perm-tab-panel.active {
  display: block;
}

.nr-role-perm-cluster {
  margin: 1rem 0 0.5rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--nr-text-subtle);
}

.nr-role-perm-group {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.nr-role-perm-sep {
  border: none;
  border-top: 1px solid var(--nr-border);
  margin: 1rem 0;
}

.nr-role-perm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0.4375rem 0;
  padding-left: calc(var(--perm-depth, 0) * 1.5rem);
  min-height: 38px;
}

.nr-role-perm-row--page:not([data-depth="0"]),
.nr-role-perm-row--button:not([data-depth="0"]) {
  border-left: 2px solid var(--nr-border-light);
  margin-left: 0.125rem;
  padding-left: calc(var(--perm-depth, 0) * 1.5rem + 0.375rem);
}

.nr-role-perm-row--section {
  padding-left: 0;
  padding-bottom: 0.25rem;
}

.nr-role-perm-row--section .nr-role-perm-row__label {
  font-weight: 700;
  font-size: 0.875rem;
}

.nr-role-perm-row--menu_item .nr-role-perm-row__label {
  font-weight: 600;
  font-size: 0.8125rem;
}

.nr-role-perm-row--page .nr-role-perm-row__label,
.nr-role-perm-row--button .nr-role-perm-row__label {
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--nr-text-muted);
}

.nr-role-perm-row__info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.nr-role-perm-row__label {
  font-size: 0.8125rem;
  font-weight: 500;
}

.nr-role-perm-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  flex-shrink: 0;
  color: var(--nr-text-subtle);
  line-height: 1;
}

.nr-role-perm-icon--menu_section {
  color: var(--nr-primary);
}

.nr-role-perm-icon--menu_item {
  color: var(--nr-text-muted);
}

.nr-role-perm-icon--page {
  color: var(--nr-text-muted);
}

.nr-role-perm-icon--button {
  color: var(--nr-secondary);
}

.nr-role-perm-row[data-depth="2"] .nr-role-perm-icon,
.nr-role-perm-row[data-depth="3"] .nr-role-perm-icon {
  opacity: 0.92;
}

.nr-role-perm-icon svg,
.nr-role-perm-icon .nr-nav-icon,
.nr-role-perm-kind-svg {
  width: 16px;
  height: 16px;
}

/* BADGES · tokens reutilizables */
.nr-badge {
  display: inline-flex;
  align-items: center;
  min-height: var(--nr-h-badge);
  height: var(--nr-h-badge);
  padding: 0 0.5rem;
  border-radius: var(--nr-radius-pill);
  font-size: var(--nr-fs-badge);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1;
}

.nr-badge-success {
  background: #d1fae5;
  color: #065f46;
}

.nr-badge-warning {
  background: #fef3c7;
  color: #92400e;
}

.nr-badge-danger {
  background: #fee2e2;
  color: #991b1b;
}

.nr-badge-neutral {
  background: var(--nr-border-light);
  color: var(--nr-text-muted);
}

.nr-badge-info {
  background: rgba(18, 54, 109, 0.08);
  color: var(--nr-primary);
}

.nr-badge-extra {
  background: var(--nr-extra-soft);
  color: var(--nr-extra);
  border: 1px solid var(--nr-extra-border);
}

.nr-badge-expreso {
  background: var(--nr-expreso-soft);
  color: var(--nr-expreso);
  border: 1px solid var(--nr-expreso-border);
}

/* GRIDS */
.nr-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.nr-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}

.nr-settings-tile {
  background: var(--nr-surface);
  border: 1px solid var(--nr-border);
  border-radius: var(--nr-radius);
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.nr-settings-tile:hover {
  border-color: var(--nr-secondary);
  box-shadow: 0 0 0 3px var(--nr-secondary-soft);
  text-decoration: none;
  color: inherit;
}

.nr-settings-tile h3 {
  margin: 0 0 0.375rem;
  font-size: var(--nr-fs-h3);
  color: var(--nr-primary);
}

.nr-settings-tile p {
  margin: 0;
  font-size: var(--nr-fs-body);
  color: var(--nr-text-muted);
}

/* WINDOW TABS */
.nr-window-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 1.25rem;
  padding: 0.25rem;
  background: var(--nr-surface);
  border: 1px solid var(--nr-border);
  border-radius: var(--nr-radius);
  width: fit-content;
}

.nr-window-tab {
  min-height: var(--nr-h-btn-sm);
  padding: 0 0.75rem;
  border-radius: var(--nr-radius-pill);
  font-size: var(--nr-fs-body);
  font-weight: 500;
  color: var(--nr-text-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
  display: inline-flex;
  align-items: center;
}

.nr-window-tab:hover {
  background: var(--nr-border-light);
  color: var(--nr-text);
  text-decoration: none;
}

.nr-window-tab.active {
  background: var(--nr-primary);
  color: #fff;
  font-weight: 600;
}

.nr-window-tab.active[href*="ideas"] {
  background: var(--nr-secondary);
  color: #fff;
}

/* IDEAS GRID */
.nr-metric-pill {
  display: inline-flex;
  align-items: center;
  min-height: var(--nr-h-badge);
  height: var(--nr-h-badge);
  padding: 0 0.5rem;
  font-size: var(--nr-fs-badge);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--nr-text-muted);
  background: var(--nr-border-light);
  border-radius: var(--nr-radius-pill);
  border: 1px solid var(--nr-border);
}

.nr-ideas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.nr-ideas-grid-compact .nr-idea-card {
  padding: 0.875rem 1rem;
}

.nr-idea-card {
  background: var(--nr-surface);
  border: 1px solid var(--nr-border);
  border-radius: var(--nr-radius);
  padding: 1rem 1.25rem;
  transition: border-color 0.15s, box-shadow 0.15s;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.nr-idea-card--expreso {
  border-color: var(--nr-expreso-border);
  background: linear-gradient(165deg, var(--nr-expreso-soft) 0%, var(--nr-surface) 42%);
}

.nr-idea-card--expreso:hover {
  border-color: rgba(0, 50, 160, 0.35);
  box-shadow: 0 4px 18px rgba(0, 50, 160, 0.08);
}

.nr-idea-card--extra {
  border-color: var(--nr-extra-border);
  background: linear-gradient(165deg, var(--nr-extra-soft) 0%, var(--nr-surface) 42%);
}

.nr-idea-card--extra:hover {
  border-color: rgba(236, 43, 0, 0.35);
  box-shadow: 0 4px 18px rgba(236, 43, 0, 0.08);
}

.nr-idea-card--expreso .nr-ideas-card-section {
  color: var(--nr-expreso);
}

.nr-idea-card--extra .nr-ideas-card-section {
  color: var(--nr-extra);
}

.nr-idea-card--expreso .nr-idea-card-link {
  color: var(--nr-expreso);
}

.nr-idea-card--extra .nr-idea-card-link {
  color: var(--nr-extra);
}

.nr-idea-card--expreso .nr-idea-footer {
  border-top-color: rgba(0, 50, 160, 0.12);
}

.nr-idea-card--extra .nr-idea-footer {
  border-top-color: rgba(236, 43, 0, 0.12);
}

.nr-idea-card:not(.nr-idea-card--expreso):not(.nr-idea-card--extra):hover {
  border-color: #D1D5DB;
}

.nr-idea-card-empty {
  border-style: dashed;
  opacity: 0.75;
}

.nr-idea-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.nr-idea-card-head h2 {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--nr-text);
}

.nr-idea-excerpt {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--nr-text);
  font-weight: 500;
}

.nr-idea-preview {
  font-size: 0.8125rem;
  line-height: 1.65;
  color: var(--nr-text-muted);
  white-space: pre-line;
  max-height: 6.5rem;
  overflow: hidden;
  mask-image: linear-gradient(180deg, #000 45%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 45%, transparent 100%);
  margin: 0;
}

.nr-idea-pre {
  margin: 0;
  font-size: 0.8125rem;
  white-space: pre-wrap;
  background: var(--nr-border-light);
  padding: 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--nr-border);
  max-height: 120px;
  overflow-y: auto;
}

.nr-idea-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem 0.625rem;
  align-items: center;
  padding-top: 0.625rem;
  border-top: 1px solid var(--nr-border-light);
  font-size: 0.75rem;
  color: var(--nr-text-muted);
}

.nr-empty-inline {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--nr-text-muted);
}

.nr-slug {
  font-size: 0.6875rem;
  color: var(--nr-text-subtle);
  background: var(--nr-border-light);
  padding: 0.125rem 0.375rem;
  border-radius: 3px;
  font-family: Consolas, monospace;
}

/* UTILITIES */
.nr-empty {
  padding: 2rem;
  text-align: center;
  color: var(--nr-text-muted);
  font-size: var(--nr-fs-body);
}

.nr-pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 1rem;
  border-radius: var(--nr-radius-sm);
  font-size: var(--nr-fs-body);
  overflow-x: auto;
  max-height: 280px;
  white-space: pre-wrap;
  font-family: Consolas, 'Courier New', monospace;
}

.nr-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 150;
}

/* ═══════════════════════════════════════
   DRAWER
════════════════════════════════════════ */
body.nr-drawer-open {
  overflow: hidden;
}

.nr-drawer {
  position: fixed;
  inset: 0;
  z-index: 400;
  pointer-events: none;
  visibility: hidden;
}

.nr-drawer.is-open {
  pointer-events: auto;
  visibility: visible;
}

.nr-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.24s ease;
}

.nr-drawer.is-open .nr-drawer-backdrop {
  opacity: 1;
}

.nr-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(480px, 96vw);
  height: 100%;
  background: var(--nr-surface);
  border-left: 1px solid var(--nr-border);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  border-top: 3px solid var(--nr-secondary);
}

.nr-drawer.is-open .nr-drawer-panel {
  transform: translateX(0);
}

.nr-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--nr-border);
}

.nr-drawer-eyebrow {
  margin: 0 0 0.125rem;
  font-size: 0.5625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--nr-text-subtle);
}

.nr-drawer-header h2 {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--nr-text);
}

.nr-drawer-close {
  border: none;
  background: none;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  color: var(--nr-text-muted);
  padding: 0.25rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  transition: background 0.15s, color 0.15s;
}

.nr-drawer-close:hover {
  background: var(--nr-border-light);
  color: var(--nr-danger);
}

.nr-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  padding-bottom: 0;
}

.nr-drawer-body .nr-drawer-footer {
  position: sticky;
  bottom: 0;
  background: var(--nr-surface);
  margin: 0 -1.25rem;
  padding: 1.1rem;
}

.nr-drawer-subtitle {
  margin: 1.25rem 0 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--nr-text);
}

.nr-drawer-hint {
  margin: 0 0 0.75rem !important;
  font-size: 0.8125rem;
  color: var(--nr-text-muted);
}

.nr-drawer-form-actions {
  display: flex;
  gap: 0.5rem;
}

.nr-drawer-fields {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.nr-drawer-fields .nr-field-label {
  font-weight: 600;
  font-size: var(--nr-fs-label);
  color: var(--nr-text);
  margin-bottom: 0.3125rem;
}

/* DETAIL GRID (drawer) */
.nr-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.625rem 1rem;
  margin-bottom: 0.75rem;
}

.nr-detail-grid-compact {
  grid-template-columns: 1fr 1fr;
}

.nr-detail-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.nr-detail-label {
  font-size: 0.5625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--nr-text-muted);
}

.nr-detail-value {
  font-size: 0.875rem;
  color: var(--nr-text);
  word-break: break-word;
}

.nr-detail-block {
  margin: 0.75rem 0;
}

.nr-detail-block-error .nr-code-block {
  border-color: #fecaca;
  background: #fff5f5;
  color: #991b1b;
}

/* DRAWER DETAIL REDESIGN */
.nr-drawer-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.6875rem;
  color: var(--nr-text-subtle);
  margin-bottom: 1.25rem;
}

.nr-drawer-meta-sep {
  color: var(--nr-border);
}

.nr-drawer-section {
  margin-bottom: 1.25rem;
}

.nr-drawer-section-label {
  display: block;
  font-size: 0.5625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--nr-text-subtle);
  margin-bottom: 0.5rem;
}

.nr-drawer-idea-text {
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--nr-text);
  white-space: pre-line;
  background: var(--nr-border-light);
  border: 1px solid var(--nr-border);
  border-radius: var(--nr-radius-sm);
  padding: 0.875rem;
}

.nr-drawer-blocks {
  border: 1px solid var(--nr-border);
  border-radius: var(--nr-radius);
  overflow: hidden;
}

.nr-drawer-block-row {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--nr-border-light);
}

.nr-drawer-block-row:last-child {
  border-bottom: none;
}

.nr-drawer-block-label {
  display: block;
  font-size: 0.5625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--nr-text-subtle);
  margin-bottom: 0.375rem;
}

.nr-drawer-block-text {
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--nr-text-muted);
  white-space: pre-line;
  margin: 0;
}

.nr-drawer-prompt-box {
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--nr-text-muted);
  font-family: Consolas, 'Courier New', monospace;
  background: var(--nr-border-light);
  border: 1px solid var(--nr-border);
  border-radius: var(--nr-radius-sm);
  padding: 0.875rem;
  max-height: 160px;
  overflow-y: auto;
  white-space: pre-wrap;
}

.nr-drawer-footer {
  border-top: 1px solid var(--nr-border);
  padding: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
  gap: 0.75rem;
  width: 100%;
  box-sizing: border-box;
  background: var(--nr-surface);
}

.nr-btn-cancel {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: var(--nr-text-muted);
  font-weight: 500;
  padding: 0.5rem 0.875rem;
}

.nr-btn-cancel:hover,
.nr-btn-cancel:focus {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: var(--nr-text);
}

.nr-drawer-audit-link {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: var(--nr-text-subtle);
  text-decoration: none;
  transition: color 0.15s;
}

.nr-drawer-audit-link:hover {
  color: var(--nr-text);
  text-decoration: none;
}

.nr-drawer-audit-link svg {
  flex-shrink: 0;
}

/* CODE */
.nr-code-block {
  margin: 0;
  padding: 0.75rem;
  border-radius: var(--nr-radius-sm);
  background: #0f172a;
  color: #e2e8f0;
  font-size: 0.75rem;
  line-height: 1.5;
  font-family: Consolas, 'Courier New', monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

.nr-code-scroll {
  max-height: 280px;
  overflow: auto;
}

.nr-code-scroll-sm {
  max-height: 140px;
  overflow: auto;
}

.nr-code-textarea {
  font-family: Consolas, 'Courier New', monospace;
  font-size: 0.8125rem;
}

.nr-code-inline {
  font-size: 0.75rem;
  background: var(--nr-border-light);
  padding: 0.125rem 0.35rem;
  border-radius: 3px;
  font-family: Consolas, monospace;
}

/* TABS */
.nr-tabs-nav {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--nr-border);
}

.nr-tab {
  border: none;
  background: transparent;
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--nr-text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}

.nr-tab.active {
  color: var(--nr-primary);
  border-bottom-color: var(--nr-secondary);
}

.nr-tab:hover {
  color: var(--nr-text);
}

.nr-tab-panel {
  display: none;
}

.nr-tab-panel.active {
  display: block;
}

/* EXPAND ITEMS */
.nr-expand-list {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.nr-expand-item {
  border: 1px solid var(--nr-border);
  border-radius: var(--nr-radius-sm);
  background: var(--nr-surface);
}

.nr-expand-summary {
  list-style: none;
  cursor: pointer;
  padding: 0.625rem 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nr-expand-summary::-webkit-details-marker {
  display: none;
}

.nr-expand-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.nr-expand-meta {
  font-size: 0.75rem;
  color: var(--nr-text-muted);
}

.nr-expand-body {
  padding: 0 0.875rem 0.875rem;
  border-top: 1px solid var(--nr-border);
}

.nr-expand-item-inline {
  margin-top: 0.5rem;
  border: none;
  background: transparent;
}

.nr-expand-item-inline .nr-expand-summary {
  padding: 0.35rem 0;
  font-size: 0.8125rem;
  color: var(--nr-primary);
}

/* TIMELINE */
.nr-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.nr-timeline-item {
  display: flex;
  gap: 0.625rem;
}

.nr-timeline-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-top: 0.4rem;
  background: var(--nr-primary);
  flex-shrink: 0;
}

.nr-timeline-body {
  flex: 1;
  font-size: 0.875rem;
}

.nr-timeline-meta {
  margin: 0.2rem 0 0;
  font-size: 0.75rem;
  color: var(--nr-text-muted);
}

/* ROWS */
.nr-row-clickable {
  cursor: pointer;
}

.nr-row-clickable:hover {
  background: var(--nr-border-light);
}

.nr-row-inactive {
  opacity: 0.65;
}

.nr-row-inactive td {
  color: var(--nr-text-muted);
}

.nr-actions-cell {
  white-space: nowrap;
}

.nr-actions-cell form.nr-inline-form {
  display: inline;
  margin: 0;
}

/* SKELETON */
.nr-skeleton {
  background: linear-gradient(90deg, var(--nr-border-light) 25%, var(--nr-border) 50%, var(--nr-border-light) 75%);
  background-size: 200% 100%;
  animation: nr-shimmer 1.3s infinite;
  border-radius: var(--nr-radius-sm);
}

.nr-skeleton-line {
  height: 13px;
  margin-bottom: 0.5rem;
}

.nr-skeleton-block {
  height: 120px;
  margin-top: 0.5rem;
}

@keyframes nr-shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

.nr-field-check label {
  font-weight: 500;
  font-size: var(--nr-fs-body);
  color: var(--nr-text);
}

/* ═══════════════════════════════════════
   INTEL DRAWER — Editorial Intelligence
════════════════════════════════════════ */

/* Wide drawer variant */
.nr-drawer-xl .nr-drawer-panel {
  width: min(700px, 96vw);
}

.nr-drawer-xl .nr-drawer-body {
  padding: 1.75rem 2rem;
  padding-bottom: 0;
}

.nr-drawer-xl .nr-drawer-body .nr-drawer-footer {
  margin: 0 -2rem;
  padding: 0.875rem 2rem;
}

.nr-intel-drawer {
  display: flex;
  flex-direction: column;
}

/* EOS Ring */
.nr-eos-ring {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}

.nr-eos-ring svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 42px;
  height: 42px;
}

.nr-eos-val {
  position: relative;
  z-index: 1;
  font-size: 0.6875rem;
  font-weight: 600;
}

.nr-eos-high .nr-eos-track {
  stroke: #d1fae5;
}

.nr-eos-high .nr-eos-fill {
  stroke: #059669;
}

.nr-eos-high .nr-eos-val {
  color: #065f46;
}

.nr-eos-mid .nr-eos-track {
  stroke: #fef3c7;
}

.nr-eos-mid .nr-eos-fill {
  stroke: #d97706;
}

.nr-eos-mid .nr-eos-val {
  color: #78350f;
}

.nr-eos-low .nr-eos-track {
  stroke: #fee2e2;
}

.nr-eos-low .nr-eos-fill {
  stroke: #dc2626;
}

.nr-eos-low .nr-eos-val {
  color: #991b1b;
}

/* ═══════════════════════════════════════
   AUDIT RUN DRAWER — Technical Premium
════════════════════════════════════════ */

/* ─── Run meta strip ─── */
.nr-audit-run-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.375rem 1rem;
  padding-bottom: 0.875rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--nr-border-light);
}

.nr-audit-run-meta-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.nr-audit-run-meta-right {
  font-size: 0.6875rem;
  color: var(--nr-text-subtle);
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-wrap: wrap;
}

.nr-audit-run-id {
  font-size: 1rem;
  font-weight: 700;
  color: var(--nr-text);
}

/* ─── Error block ─── */
.nr-audit-run-error {
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--nr-radius-sm);
}

.nr-audit-run-error-label {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--nr-danger);
  margin-bottom: 0.375rem;
}

/* ─── Sections divider ─── */
.nr-audit-sections-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--nr-text-subtle);
  margin-bottom: 0.75rem;
}

.nr-audit-sections-divider {
  flex: 1;
  height: 1px;
  background: var(--nr-border-light);
}

/* ─── Section card ─── */
.nr-audit-section-card {
  border: 1px solid var(--nr-border);
  border-radius: var(--nr-radius);
  overflow: hidden;
  margin-bottom: 0.875rem;
  background: var(--nr-surface);
}

.nr-audit-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.625rem 1rem;
  gap: 0.5rem;
  background: var(--nr-border-light);
  border-bottom: 1px solid var(--nr-border);
  flex-wrap: wrap;
}

.nr-audit-section-head-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.nr-audit-section-name {
  font-size: 0.8125rem;
  color: var(--nr-text);
}

.nr-audit-conf-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.nr-audit-conf-val {
  font-size: 0.625rem;
  color: var(--nr-text-subtle);
}

.nr-audit-section-body {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--nr-border-light);
}

.nr-audit-section-label {
  display: block;
  font-size: 0.5625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--nr-text-subtle);
  margin-bottom: 0.375rem;
}

/* Editorial blocks inside section */
.nr-audit-section-blocks {
  border-top: 1px solid var(--nr-border-light);
}

.nr-audit-block-item {
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--nr-border-light);
}

.nr-audit-block-item:last-child {
  border-bottom: none;
}

.nr-audit-block-label {
  display: block;
  font-size: 0.5625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--nr-text-subtle);
  margin-bottom: 0.25rem;
}

.nr-audit-block-text {
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--nr-text-muted);
  white-space: pre-line;
  margin: 0;
}

/* Section card footer */
.nr-audit-section-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--nr-border-light);
  border-top: 1px solid var(--nr-border-light);
}

/* Raw response collapsible */
.nr-audit-raw-detail {}

.nr-audit-raw-summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3125rem;
  font-size: 0.6875rem;
  color: var(--nr-text-subtle);
  padding: 0.1875rem 0;
  transition: color 0.15s;
}

.nr-audit-raw-summary::-webkit-details-marker {
  display: none;
}

.nr-audit-raw-summary:hover {
  color: var(--nr-text);
}

.nr-audit-raw-chevron {
  transition: transform 0.18s;
}

.nr-audit-raw-detail[open] .nr-audit-raw-chevron {
  transform: rotate(180deg);
}

/* ─── Technical section ─── */
.nr-audit-technical {
  margin-top: 1rem;
  padding-top: 0.875rem;
  border-top: 1px solid var(--nr-border-light);
}

.nr-audit-technical-label {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--nr-text-subtle);
  margin-bottom: 0.75rem;
}

/* Intel footer meta */
.nr-intel-footer-meta {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.6875rem;
  color: var(--nr-text-subtle);
  flex-wrap: wrap;
}

/* ═══════════════════════════════════════
   INTEL PANEL TOOLBAR (JSON ↔ HTML toggle)
════════════════════════════════════════ */
.nr-ip-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.625rem;
}

.nr-ip-view-toggle {
  display: flex;
  border: 1px solid var(--nr-border);
  border-radius: var(--nr-radius-sm);
  overflow: hidden;
}

.nr-ip-view-btn {
  border: none;
  background: none;
  padding: 0.25rem 0.625rem;
  font-size: 0.6875rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--nr-text-muted);
  transition: background 0.15s, color 0.15s;
  letter-spacing: 0.01em;
  line-height: 1.6;
}

.nr-ip-view-btn.active {
  background: var(--nr-primary);
  color: #fff;
}

.nr-ip-copy-btn {
  border: 1px solid var(--nr-border);
  background: none;
  font-size: 0.6875rem;
  font-weight: 500;
  padding: 0.25rem 0.625rem;
  border-radius: var(--nr-radius-sm);
  color: var(--nr-text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  line-height: 1.6;
}

.nr-ip-copy-btn:hover {
  background: var(--nr-border-light);
  color: var(--nr-text);
}

/* ═══════════════════════════════════════
   INTEL BRIEF — HTML view (Linear aesthetic)
════════════════════════════════════════ */
.nr-ib {
  display: flex;
  flex-direction: column;
  gap: 0;
  font-size: 0.875rem;
  color: var(--nr-text);
}

/* Confidence header */
.nr-ib-header {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  padding-bottom: 1.125rem;
  margin-bottom: 0.125rem;
  border-bottom: 1px solid #F3F4F6;
}

.nr-ib-conf {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  flex: 1;
  min-width: 0;
  width: 100%;
}

.nr-ib-conf-ring-wrap {
  flex-shrink: 0;
  line-height: 0;
}

.nr-eos-ring-lg {
  width: 56px;
  height: 56px;
}

.nr-eos-ring-lg svg {
  width: 56px;
  height: 56px;
}

.nr-eos-ring-lg .nr-eos-val {
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  gap: 0.0625rem;
}

.nr-eos-ring-lg .nr-eos-val small {
  font-size: 0.5625rem;
  font-weight: 600;
}

.nr-eos-ring-xl {
  width: 76px;
  height: 76px;
}

.nr-eos-ring-xl svg {
  width: 76px;
  height: 76px;
}

.nr-eos-ring-xl .nr-eos-val {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  display: flex;
  align-items: baseline;
  gap: 0.125rem;
}

.nr-eos-ring-xl .nr-eos-val small {
  font-size: 0.75rem;
  font-weight: 600;
}

.nr-ib-conf-info {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
}

.nr-ib-conf-note {
  font-size: 0.8125rem;
  color: var(--nr-text-muted);
  line-height: 1.55;
  margin: 0;
}

.nr-ib-conf-kicker {
  font-weight: 600;
  color: var(--nr-text);
}

.nr-ib-meta-row {
  display: flex;
  gap: 0.25rem;
  align-items: center;
  flex-wrap: wrap;
}

.nr-ib-pill {
  font-size: 0.5625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 0.1875rem 0.5rem;
  background: #F2F4F7;
  border-radius: var(--nr-radius-pill);
  color: var(--nr-text-muted);
}

.nr-ib-sources {
  font-size: 0.6875rem;
  color: var(--nr-text-subtle);
  margin-left: 0.25rem;
}

/* Shared block pattern */
.nr-ib-block {
  padding: 1rem 0;
  border-bottom: 1px solid #F3F4F6;
}

.nr-ib-block:last-of-type {
  border-bottom: none;
}

.nr-ib-block-label {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--nr-text-subtle);
  margin: 0 0 0.75rem;
}

.nr-ib-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: var(--nr-radius-pill);
  background: #F2F4F7;
  color: var(--nr-text-muted);
  font-size: 0.5625rem;
  font-weight: 700;
}

/* Agenda */
.nr-ib-agenda {
  display: flex;
  flex-direction: column;
}

.nr-ib-agenda-row {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  padding: 0.4375rem 0;
  border-bottom: 1px solid #F9FAFB;
}

.nr-ib-agenda-row:last-child {
  border-bottom: none;
}

.nr-ib-time {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--nr-primary);
  min-width: 38px;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.nr-ib-agenda-topic {
  font-size: 0.8125rem;
  color: var(--nr-text);
  line-height: 1.45;
}

.nr-ib-push-line {
  font-size: 0.75rem;
  color: var(--nr-text-muted);
  margin-top: 0.625rem;
  padding: 0.5rem 0.75rem;
  background: #F9FAFB;
  border-radius: 6px;
  line-height: 1.5;
}

.nr-ib-refuerzo {
  font-size: 0.75rem;
  color: #92400E;
  background: #FFFBEB;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  margin-top: 0.375rem;
  line-height: 1.5;
}

/* Ideas */
.nr-ib-ideas {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.nr-ib-idea {
  padding: 0.875rem;
  border-radius: var(--nr-radius);
  border: 1px solid #EAECF0;
  background: #FCFCFD;
  display: flex;
  flex-direction: column;
  gap: 0.4375rem;
}

.nr-ib-idea-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.nr-ib-eos {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.1875rem 0.5rem;
  border-radius: var(--nr-radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.nr-ib-eos.high {
  background: #DCFCE7;
  color: #166534;
}

.nr-ib-eos.mid {
  background: #FEF9C3;
  color: #854D0E;
}

.nr-ib-eos.low {
  background: #FEE2E2;
  color: #991B1B;
}

.nr-ib-idea-time {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--nr-text-muted);
  background: #F2F4F7;
  padding: 0.125rem 0.5rem;
  border-radius: var(--nr-radius-pill);
}

.nr-ib-idea-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--nr-text);
  line-height: 1.4;
  margin: 0;
}

.nr-ib-idea-alt {
  font-size: 0.75rem;
  color: var(--nr-text-subtle);
  font-style: italic;
  margin: 0;
  line-height: 1.4;
}

.nr-ib-idea-just {
  font-size: 0.75rem;
  color: var(--nr-text-muted);
  line-height: 1.55;
  margin: 0;
}

.nr-ib-scores {
  display: flex;
  gap: 0.75rem;
  font-size: 0.6875rem;
  color: var(--nr-text-subtle);
  padding-top: 0.375rem;
  border-top: 1px solid #F2F4F7;
}

.nr-ib-scores b {
  color: var(--nr-text-muted);
  font-weight: 600;
}

/* Priority list */
.nr-ib-prior-list {
  display: flex;
  flex-direction: column;
}

.nr-ib-prior-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.5rem 0;
  border-bottom: 1px solid #F9FAFB;
}

.nr-ib-prior-row:last-child {
  border-bottom: none;
}

.nr-ib-tag {
  font-size: 0.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.1875rem 0.4375rem;
  border-radius: var(--nr-radius-pill);
  flex-shrink: 0;
  margin-top: 3px;
  white-space: nowrap;
}

.nr-ib-tag.alta {
  background: #DCFCE7;
  color: #166534;
}

.nr-ib-tag.media {
  background: #FEF9C3;
  color: #854D0E;
}

.nr-ib-tag.baja {
  background: #F2F4F7;
  color: #6B7280;
}

.nr-ib-prior-topic {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--nr-text);
  margin: 0 0 0.125rem;
  line-height: 1.4;
}

.nr-ib-prior-reason {
  font-size: 0.75rem;
  color: var(--nr-text-muted);
  margin: 0;
  line-height: 1.5;
}

/* Opportunities */
.nr-ib-opp-list {
  display: flex;
  flex-direction: column;
}

.nr-ib-opp-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.5rem 0;
  border-bottom: 1px solid #F9FAFB;
}

.nr-ib-opp-row:last-child {
  border-bottom: none;
}

.nr-ib-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--nr-primary);
  color: #fff;
  font-size: 0.5625rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.nr-ib-opp-topic {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--nr-text);
  margin: 0 0 0.125rem;
  line-height: 1.4;
}

.nr-ib-opp-angle {
  font-size: 0.75rem;
  color: var(--nr-text-muted);
  margin: 0;
  line-height: 1.5;
}

/* Avoid */
.nr-ib-avoid-list {
  display: flex;
  flex-direction: column;
}

.nr-ib-avoid-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.5rem 0;
  border-bottom: 1px solid #F9FAFB;
}

.nr-ib-avoid-row:last-child {
  border-bottom: none;
}

.nr-ib-avoid-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #FCA5A5;
  flex-shrink: 0;
  margin-top: 5px;
}

.nr-ib-avoid-topic {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #7F1D1D;
  margin: 0 0 0.125rem;
  line-height: 1.4;
}

.nr-ib-avoid-reason {
  font-size: 0.75rem;
  color: #991B1B;
  margin: 0;
  line-height: 1.5;
}

/* Señales de datos */
.nr-ib-signals-list {
  display: flex;
  flex-direction: column;
  margin-top: 0;
}

.nr-ib-signal-item {
  font-size: 0.75rem;
  color: var(--nr-text-muted);
  padding: 0.3125rem 0;
  border-bottom: 1px solid #F9FAFB;
  line-height: 1.5;
}

.nr-ib-signal-item:last-child {
  border-bottom: none;
}

.nr-ib-limit-item {
  font-size: 0.6875rem;
  color: var(--nr-text-subtle);
  padding: 0.25rem 0 0.25rem 0.75rem;
  border-left: 2px solid #EAECF0;
}

/* Leyenda al pie del intel brief */
.nr-ib-legend {
  margin-top: 0;
  padding: 1rem 0 0.25rem;
  border-top: 0px solid #E5E7EB;
}

.nr-ib-legend>summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.nr-ib-legend>summary::-webkit-details-marker {
  display: none;
}

.nr-ib-legend-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1.25rem;
  margin-top: 0.625rem;
  font-size: 0.6875rem;
  color: var(--nr-text-muted);
  line-height: 1.5;
}

.nr-ib-legend-body dt {
  font-weight: 600;
  color: var(--nr-text);
  margin: 0;
}

.nr-ib-legend-body dd {
  margin: 0 0 0.375rem;
}

/* Email-parity intel preview (ideas por sección, detalle reasoning) */
.nr-ib-email-preview {
  padding: 28px 32px;
  max-width: 680px;
  margin: 0 auto;
}

.nr-intel-drawer--email-parity .nr-drawer-footer {
  display: none;
}

@media (max-width: 520px) {
  .nr-ib-legend-body {
    grid-template-columns: 1fr;
  }
}

/* Run section expand items — clean Linear style */
.nr-run-section-item {
  border: 1px solid #EAECF0;
  border-radius: var(--nr-radius);
  background: #fff;
  margin-bottom: 4px;
  transition: border-color 0.15s;
}

.nr-run-section-item[open] {
  border-left: 3px solid var(--nr-primary);
}

.nr-run-section-item>.nr-expand-summary {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 0.625rem 0.875rem;
  gap: 0.5rem;
}

.nr-run-section-item[open]>.nr-expand-summary {
  border-bottom: 1px solid #F3F4F6;
}

.nr-run-section-item .nr-expand-body {
  padding: 0.875rem;
  border-top: none;
}

/* Contenedor centrado unificado (listas, settings, auditoría) */
.nr-page-inner {
  width: 100%;
  max-width: 768px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* ═══════════════════════════════════════
   CHAT HISTORY LIST  (/audit/prompts/)
════════════════════════════════════════ */
.nr-conv-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 1.75rem;
}

.nr-conv-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--nr-text);
}

.nr-conv-filter {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nr-conv-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Filas de lista (conv, usuarios, queries, destinatarios, versiones…) — padding uniforme */
.nr-conv-item,
.nr-user-row,
.nr-q-row,
.nr-recip-row,
.nr-version-row {
  padding: var(--nr-list-item-pad);
}

.nr-conv-item {
  display: flex;
  align-items: center;
  gap: 14px;
  border-radius: var(--nr-radius);
  cursor: pointer;
  transition: background .1s, box-shadow .1s;
  border: 1px solid var(--nr-border);
  text-decoration: none !important;
  color: inherit;
  background: var(--nr-surface);
}

button.nr-conv-item {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  font: inherit;
  text-align: left;
}

.nr-conv-item:hover {
  background: var(--nr-border-light);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
  text-decoration: none !important;
}

.nr-conv-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--nr-border);
}

.nr-conv-dot.ok {
  background: var(--nr-success);
}

.nr-conv-dot.err {
  background: var(--nr-danger);
}

.nr-conv-dot.warn {
  background: var(--nr-warning);
}

.nr-conv-dot.run {
  background: var(--nr-secondary);
}

.nr-conv-body {
  flex: 1;
  min-width: 0;
}

.nr-conv-title2 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--nr-text);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nr-conv-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.6875rem;
  color: var(--nr-text-muted);
  flex-wrap: wrap;
}

.nr-conv-sep {
  color: var(--nr-border);
}

.nr-conv-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nr-conv-date {
  font-size: 0.6875rem;
  color: var(--nr-text-subtle);
  white-space: nowrap;
}

.nr-conv-arrow {
  color: var(--nr-border);
  transition: color .1s;
}

.nr-conv-item:hover .nr-conv-arrow {
  color: var(--nr-text-muted);
}

.nr-conv-empty {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--nr-text-subtle);
  font-size: 0.875rem;
}

/* ═══════════════════════════════════════
   ETL AUDIT  (/audit/etl/)
════════════════════════════════════════ */
.nr-etl-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 0.75rem;
}

.nr-recv-btn-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.nr-etl-status-select {
  font-size: 0.8125rem;
  padding: 6px 10px;
  min-width: 10rem;
}

.nr-etl-lead {
  margin: 0 0 1.25rem !important;
  font-size: 0.8125rem !important;
  color: var(--nr-text-muted);
  line-height: 1.5;
}

.nr-etl-row {
  cursor: pointer;
}

.nr-etl-row .nr-conv-dot {
  margin-left: 2px;
}

.nr-etl-row:hover .nr-conv-arrow {
  color: var(--nr-text-muted);
}

.nr-etl-fail-block {
  margin-top: 2rem;
}

.nr-etl-fail-block__title {
  margin: 0 0 0.75rem !important;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--nr-text-muted);
}

/* Panel lateral (detalle corrida / ingesta) */
.nr-etl-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 0.75rem;
}

.nr-etl-panel-eyebrow {
  margin: 0 0 4px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--nr-text-subtle);
}

.nr-etl-panel-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--nr-text);
  letter-spacing: -0.02em;
}

.nr-etl-panel-title code {
  font-size: 0.9375rem;
  background: transparent;
  padding: 0;
  color: inherit;
}

.nr-etl-panel-summary {
  margin: 0 0 1.25rem;
  font-size: 0.8125rem;
  color: var(--nr-text-muted);
  line-height: 1.55;
}

.nr-etl-panel-summary strong {
  color: var(--nr-danger);
  font-weight: 600;
}

.nr-etl-tabs-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.nr-etl-json-meta {
  margin-left: auto;
  font-size: 0.6875rem;
  color: var(--nr-text-subtle);
}

.nr-etl-code-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 6px;
}

.nr-etl-page .nr-user-row:hover {
  background: var(--nr-bg);
}

/* ═══════════════════════════════════════
   TECHNICAL DASHBOARD  (/dashboard/technical/)
════════════════════════════════════════ */
.nr-tech-dash {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

/* Header operativo — usa nr-window-hero en plantillas */
.nr-tech-panel {
  border-radius: var(--nr-radius);
  border: 1px solid var(--nr-border);
  background: var(--nr-surface);
  overflow: hidden;
}

.nr-tech-section {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.nr-tech-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.nr-tech-section-head .nr-tech-panel-title {
  margin: 0;
}

.nr-tech-section-head .nr-tech-panel-desc {
  margin: 0.25rem 0 0;
}

.nr-tech-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--nr-border-light);
  background: var(--nr-border-light);
}

.nr-tech-panel-title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--nr-text);
}

.nr-tech-panel-desc {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  color: var(--nr-text-muted);
  line-height: 1.55;
  max-width: 36rem;
}

.nr-tech-panel-body {
  padding: 1.125rem 1.25rem;
}

.nr-tech-panel-body--flush {
  padding: 0;
}

.nr-tech-meta {
  margin: 0.875rem 0 0;
  font-size: 0.8125rem;
  color: var(--nr-text-muted);
}

.nr-tech-page {
  padding-bottom: 2.5rem;
}

.nr-tech-block {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--nr-border-light);
}

.nr-tech-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.nr-tech-block-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.nr-tech-block-title {
  margin: 0 0 0.35rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--nr-text);
}

.nr-tech-block-lead {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--nr-text-muted);
  line-height: 1.55;
  max-width: 36rem;
}

.nr-tech-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.nr-tech-summary {
  margin: -0.5rem 0 2rem;
  font-size: 0.8125rem;
  color: var(--nr-text-muted);
}

.nr-tech-link {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--nr-primary);
  text-decoration: none;
  flex-shrink: 0;
}

.nr-tech-link:hover {
  text-decoration: underline;
}

.nr-tech-empty {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--nr-text-subtle);
  padding: 1.5rem 0;
}

.nr-tech-panel-body--flush .nr-tech-empty {
  padding: 1.5rem 1.25rem;
}

.nr-tech-health-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.nr-tech-health-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-height: 108px;
  padding: 1.25rem 1.375rem;
  border: 1px solid var(--nr-border);
  border-radius: var(--nr-radius);
  background: var(--nr-surface);
}

.nr-tech-health-card__body {
  flex: 1;
  min-width: 0;
}

.nr-tech-health-card__label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--nr-text);
}

.nr-tech-health-card__detail {
  margin-top: 0.375rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--nr-text-muted);
}

.nr-tech-issue-row {
  cursor: pointer;
}

.nr-tech-issue-row:hover .nr-conv-arrow {
  color: var(--nr-text-muted);
}

.nr-tech-checklists {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 0;
}

.nr-tech-checklist-card {
  position: relative;
  border: 1px solid var(--nr-border);
  border-radius: var(--nr-radius);
  background: var(--nr-surface);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 320px;
}

.nr-tech-checklist-loading {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.875rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.nr-tech-checklist-loading[hidden] {
  display: none !important;
}

.nr-tech-checklist-card--loading {
  pointer-events: none;
}

.nr-tech-checklist-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(18, 54, 109, 0.12);
  border-top-color: var(--nr-primary);
  border-radius: 50%;
  animation: nr-spin 0.75s linear infinite;
}

.nr-tech-checklist-loading-text {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--nr-primary);
  letter-spacing: 0.01em;
}

@keyframes nr-spin {
  to {
    transform: rotate(360deg);
  }
}

.nr-tech-checklist-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 1.125rem 1.125rem 0;
}

.nr-tech-checklist-title {
  margin: 0 0 2px;
  font-size: 0.875rem !important;
  font-weight: 700;
  color: var(--nr-text);
}

.nr-tech-checklist-sub {
  margin: 0;
  font-size: 0.6875rem !important;
  color: var(--nr-text-subtle);
}

.nr-tech-checklist-panel {
  padding: 14px 18px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.nr-tech-checklist-panel .nr-tech-checklist {
  flex: 1;
}

.nr-tech-checklist-panel .nr-ajax-advance {
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
  padding-top: 0.75rem;
}

.nr-tech-checklist-run,
.nr-tech-checklist-hint {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  color: var(--nr-text-muted);
}

.nr-tech-marfeel-cooldown-banner {
  margin: 0 0 0.875rem;
  padding: 0.625rem 0.875rem;
  font-size: 0.8125rem;
  color: var(--nr-primary);
  background: rgba(18, 54, 109, 0.06);
  border: 1px solid rgba(18, 54, 109, 0.12);
  border-radius: var(--nr-radius-sm);
}

.nr-tech-marfeel-cooldown-banner strong {
  font-variant-numeric: tabular-nums;
}

.nr-tech-checklist-hint [data-marfeel-countdown] {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--nr-primary);
}

.nr-tech-link-btn {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: var(--nr-primary);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.nr-tech-checklist {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--nr-border-light);
  border-radius: var(--nr-radius-sm);
  overflow: hidden;
}

.nr-tech-checklist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  font-size: 0.8125rem;
  border-bottom: 1px solid var(--nr-border-light);
  background: #fff;
}

.nr-tech-checklist-item:last-child {
  border-bottom: none;
}

.nr-tech-checklist-name {
  flex: 1;
  min-width: 0;
  font-weight: 500;
  color: var(--nr-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nr-tech-checklist-status {
  font-size: 0.6875rem;
  color: var(--nr-text-subtle);
  flex-shrink: 0;
}

/* ═══════════════════════════════════════
   EXECUTIVE SUMMARY  (/dashboard/resumen/)
════════════════════════════════════════ */
.nr-content-resumen,
.nr-content-window,
.nr-content-ideas {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding: 1.75rem 2rem 2.5rem;
}

.nr-resumen {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.nr-resumen-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.nr-resumen-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.nr-resumen-section-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--nr-text);
}

.nr-resumen-section-desc {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  color: var(--nr-text-muted);
}

.nr-resumen-link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--nr-secondary);
  text-decoration: none;
  white-space: nowrap;
}

.nr-resumen-link:hover {
  text-decoration: underline;
}

.nr-resumen-windows {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.nr-resumen-window {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  padding: 1.125rem 1.25rem;
  border-radius: var(--nr-radius);
  border: 1px solid var(--nr-border);
  background: var(--nr-surface);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.nr-resumen-window:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
  text-decoration: none;
}

.nr-resumen-window__top {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
}

.nr-resumen-window__titles {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.nr-resumen-window__name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--nr-text);
}

.nr-resumen-window__sub {
  font-size: 0.75rem;
  color: var(--nr-text-muted);
}

.nr-resumen-window__metrics {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: var(--nr-text-muted);
}

.nr-resumen-window__sep {
  color: var(--nr-border);
}

.nr-resumen-window__highlight {
  padding: 0.625rem 0.75rem;
  border-radius: var(--nr-radius-sm);
  background: var(--nr-border-light);
  border: 1px solid var(--nr-border);
}

.nr-resumen-window__highlight-label {
  display: block;
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nr-text-subtle);
  margin-bottom: 0.25rem;
}

.nr-resumen-window__highlight-text {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--nr-text);
}

.nr-resumen-window__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 0.625rem;
  border-top: 1px solid var(--nr-border-light);
}

.nr-resumen-window__time {
  font-size: 0.6875rem;
  color: var(--nr-text-subtle);
}

.nr-resumen-window:hover .nr-conv-arrow {
  color: var(--nr-text-muted);
}

.nr-resumen-idea-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  overflow: hidden;
}

.nr-resumen-idea-section {
  font-size: 0.5625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--nr-text-subtle);
  white-space: nowrap;
}

.nr-resumen-idea-score {
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--nr-text-subtle);
  font-variant-numeric: tabular-nums;
}

.nr-resumen-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 2.5rem 1.5rem;
  border: 1px dashed var(--nr-border);
  border-radius: var(--nr-radius);
  background: var(--nr-border-light);
  text-align: center;
}

.nr-resumen-empty p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--nr-text-muted);
}

@media (max-width: 1100px) {
  .nr-resumen-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nr-resumen-windows {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {

  .nr-content-resumen,
  .nr-content-window,
  .nr-content-ideas {
    padding: 1rem;
  }
}

/* ═══════════════════════════════════════
   WINDOW DASHBOARD  (/dashboard/realtime|ayer|7-dias/)
════════════════════════════════════════ */
.nr-window-dash {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.nr-window-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: stretch;
}

.nr-window-hero {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: 100%;
  padding: 1.5rem 1.75rem;
  border-radius: var(--nr-radius);
  background: linear-gradient(135deg, #0d2852 0%, var(--nr-primary) 55%, #1e5aa8 100%) !important;
  color: #fff !important;
  border: none !important;
  box-shadow: 0 12px 40px rgba(18, 54, 109, 0.22) !important;
}

/* Reset overrides for light-themed dashboard tabs */
.nr-window-dash--realtime .nr-window-hero {
  background: linear-gradient(135deg, #fff 0%, #fff7ed 50%, #fef3c7 100%) !important;
  color: var(--nr-text) !important;
  border: 1px solid var(--nr-border) !important;
  box-shadow: none !important;
}

.nr-window-dash--ayer .nr-window-hero {
  background: linear-gradient(135deg, #fff 0%, #f8fafc 55%, #eef2ff 100%) !important;
  color: var(--nr-text) !important;
  border: 1px solid var(--nr-border) !important;
  box-shadow: none !important;
}

.nr-window-dash--7-dias .nr-window-hero {
  background: linear-gradient(135deg, #fff 0%, #f0fdf4 50%, #ecfdf5 100%) !important;
  color: var(--nr-text) !important;
  border: 1px solid var(--nr-border) !important;
  box-shadow: none !important;
}

.nr-window-eyebrow {
  margin: 0 0 0.375rem !important;
  font-size: 0.625rem !important;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72) !important;
}

.nr-window-title {
  margin: 0;
  font-size: var(--nr-fs-h1);
  font-weight: 700;
  color: #fff !important;
  letter-spacing: -0.02em;
}

.nr-window-lead {
  margin: 0.5rem 0 0;
  font-size: var(--nr-fs-body);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.88) !important;
}

.nr-window-hero__charts-desc {
  margin: 0.375rem 0 0 !important;
  font-size: var(--nr-fs-body);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.88) !important;
}

/* Reset text colors for light-themed dashboards */
.nr-window-dash--realtime .nr-window-hero .nr-window-eyebrow,
.nr-window-dash--ayer .nr-window-hero .nr-window-eyebrow,
.nr-window-dash--7-dias .nr-window-hero .nr-window-eyebrow {
  color: var(--nr-text-subtle) !important;
}

.nr-window-dash--realtime .nr-window-hero .nr-window-title,
.nr-window-dash--ayer .nr-window-hero .nr-window-title,
.nr-window-dash--7-dias .nr-window-hero .nr-window-title {
  color: var(--nr-text) !important;
}

.nr-window-dash--realtime .nr-window-hero .nr-window-lead,
.nr-window-dash--realtime .nr-window-hero .nr-window-hero__charts-desc,
.nr-window-dash--ayer .nr-window-hero .nr-window-lead,
.nr-window-dash--ayer .nr-window-hero .nr-window-hero__charts-desc,
.nr-window-dash--7-dias .nr-window-hero .nr-window-lead,
.nr-window-dash--7-dias .nr-window-hero .nr-window-hero__charts-desc {
  color: var(--nr-text-muted) !important;
}

.nr-window-hero__status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  align-self: flex-start;
}

.nr-window-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  justify-content: flex-end;
}

.nr-window-hero__actions .nr-btn-ghost {
  border-color: rgba(255, 255, 255, 0.4) !important;
  color: #fff !important;
  background: transparent !important;
}

.nr-window-hero__actions .nr-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: #fff !important;
  color: #fff !important;
}

.nr-window-hero--tech {
  position: relative;
}

.nr-window-hero--tech .nr-window-hero__main {
  padding-right: 2.25rem;
}

.nr-window-hero__gear {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  border-radius: var(--nr-radius-sm);
  color: rgba(255, 255, 255, 0.72) !important;
  transition: color 0.15s, background 0.15s;
}

.nr-window-hero__gear:hover {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.1) !important;
}

.nr-window-hero__pipeline-switch {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin: 0;
  align-self: flex-start;
}

.nr-window-hero__pipeline-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88) !important;
}

/* Operational Headers Filters inside Hero */
.nr-window-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem;
  padding: 0.875rem 1.125rem;
  border-radius: var(--nr-radius-sm);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  margin-top: 1rem;
  align-self: stretch;
}

.nr-window-filter {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 8rem;
}

.nr-window-filter .nr-field-label {
  color: rgba(255, 255, 255, 0.85) !important;
  font-size: 0.625rem !important;
  margin-bottom: 0.25rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
}

.nr-window-filter .nr-input {
  background: #fff !important;
  color: var(--nr-text) !important;
  border: 1px solid transparent !important;
  min-height: 2.25rem !important;
  border-radius: var(--nr-radius-sm) !important;
  padding: 0.375rem 0.75rem !important;
  font-size: 0.8125rem !important;
  cursor: pointer;
  width: 9.5rem !important;
}

/* Segmented Control / Option Group */
.nr-segmented-control {
  display: inline-flex;
  align-self: flex-start;
  width: max-content;
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--nr-radius-sm);
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  min-height: 2.25rem;
  align-items: center;
}

.nr-segmented-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  margin: 0 !important;
  cursor: pointer;
}

.nr-segmented-item input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
}

.nr-segmented-item span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.375rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  border-radius: calc(var(--nr-radius-sm) - 2px);
  transition: all 0.15s ease;
  user-select: none;
  min-width: 4rem;
  text-align: center;
}

.nr-segmented-item input[type="radio"]:checked + span {
  background: #fff;
  color: var(--nr-primary);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.15);
}

.nr-segmented-item:hover input[type="radio"]:not(:checked) + span {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* Reset for light-themed dashboard filters */
.nr-window-dash--realtime .nr-window-filters,
.nr-window-dash--ayer .nr-window-filters,
.nr-window-dash--7-dias .nr-window-filters {
  background: rgba(15, 23, 42, 0.05) !important;
  border: 1px solid var(--nr-border) !important;
  backdrop-filter: none !important;
}

.nr-window-dash--realtime .nr-window-filter .nr-field-label,
.nr-window-dash--ayer .nr-window-filter .nr-field-label,
.nr-window-dash--7-dias .nr-window-filter .nr-field-label {
  color: var(--nr-text-subtle) !important;
}

.nr-window-dash--realtime .nr-segmented-control,
.nr-window-dash--ayer .nr-segmented-control,
.nr-window-dash--7-dias .nr-segmented-control {
  background: rgba(15, 23, 42, 0.05) !important;
  border-color: var(--nr-border) !important;
  align-self: flex-start !important;
  width: max-content !important;
}

.nr-window-dash--realtime .nr-segmented-item span,
.nr-window-dash--ayer .nr-segmented-item span,
.nr-window-dash--7-dias .nr-segmented-item span {
  color: var(--nr-text-muted) !important;
}

.nr-window-dash--realtime .nr-segmented-item input[type="radio"]:checked + span,
.nr-window-dash--ayer .nr-segmented-item input[type="radio"]:checked + span,
.nr-window-dash--7-dias .nr-segmented-item input[type="radio"]:checked + span {
  background: var(--nr-primary) !important;
  color: #fff !important;
}

.nr-window-dash--realtime .nr-window-filter .nr-input,
.nr-window-dash--ayer .nr-window-filter .nr-input,
.nr-window-dash--7-dias .nr-window-filter .nr-input {
  border-color: var(--nr-border) !important;
}

.nr-window-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  min-height: 100%;
}

.nr-window-top .nr-window-stat {
  height: 100%;
}

.nr-window-stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1.125rem 1.25rem;
  border-radius: var(--nr-radius);
  border: 1px solid var(--nr-border);
  background: var(--nr-surface);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.nr-window-stat:hover {
  border-color: #d1d5db;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.nr-window-stat--accent .nr-window-stat__value {
  color: var(--nr-secondary);
}

.nr-window-stat--ok .nr-window-stat__value {
  color: var(--nr-success);
}

.nr-window-stat--warn .nr-window-stat__value {
  color: var(--nr-warning);
}

.nr-window-stat--muted .nr-window-stat__value {
  color: var(--nr-text-muted);
}

.nr-window-stat--extra {
  border-color: var(--nr-extra-border);
  background: linear-gradient(160deg, var(--nr-extra-soft) 0%, var(--nr-surface) 55%);
}

.nr-window-stat--extra .nr-window-stat__value {
  color: var(--nr-extra);
}

.nr-window-stat--extra .nr-window-stat__label {
  color: var(--nr-extra);
  opacity: 0.85;
}

.nr-window-stat--expreso {
  border-color: var(--nr-expreso-border);
  background: linear-gradient(160deg, var(--nr-expreso-soft) 0%, var(--nr-surface) 55%);
}

.nr-window-stat--expreso .nr-window-stat__value {
  color: var(--nr-expreso);
}

.nr-window-stat--expreso .nr-window-stat__label {
  color: var(--nr-expreso);
  opacity: 0.85;
}

.nr-window-stat__label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--nr-text-subtle);
}

.nr-window-stat__value {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--nr-text);
  font-variant-numeric: tabular-nums;
}

.nr-window-stat__hint {
  font-size: 0.75rem;
  color: var(--nr-text-muted);
}

.nr-window-spotlight {
  padding: 1rem 1.25rem;
  border-radius: var(--nr-radius);
  border: 1px solid var(--nr-border);
  background: linear-gradient(90deg, var(--nr-border-light) 0%, #fff 100%);
}

.nr-window-spotlight__label {
  display: block;
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nr-text-subtle);
  margin-bottom: 0.375rem;
}

.nr-window-spotlight__text {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--nr-text);
}

.nr-window-spotlight__text--link {
  display: block;
  text-decoration: none;
  transition: color 0.15s;
}

.nr-window-spotlight__text--link:hover {
  color: var(--nr-primary);
  text-decoration: underline;
}

.nr-window-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.nr-window-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.nr-window-section-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--nr-text);
}

.nr-window-section-desc {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  color: var(--nr-text-muted);
}

.nr-window-charts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.nr-window-chart-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--nr-radius);
  border: 1px solid var(--nr-border);
  background: var(--nr-surface);
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.nr-window-chart-card:hover {
  border-color: #d1d5db;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.nr-window-chart-card--wide {
  grid-column: 1 / -1;
}

.nr-window-chart-card--articles .nr-window-chart-body--pill {
  height: auto;
  min-height: 18rem;
  padding: 1rem 1.25rem 1.125rem;
}

.nr-window-chart-card--doughnut .nr-window-chart-body {
  height: 220px;
  padding: 0.75rem 1rem;
}

.nr-window-chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.125rem;
}

.nr-window-chart-title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--nr-text);
}

.nr-window-chart-body {
  position: relative;
  height: 240px;
  padding: 0.875rem 1rem 1rem;
}

.nr-window-chart-card--wide .nr-window-chart-body {
  height: 280px;
}

.nr-window-chart-body--pill {
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  height: auto;
  padding: 1rem 1.25rem 0.875rem;
}

.nr-pill-bars--articles {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
}

.nr-pill-bars--articles .nr-pill-bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  flex: 1 1 0;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.nr-pill-bar-col--link {
  cursor: pointer;
  border-radius: var(--nr-radius-sm);
  transition: transform 0.15s ease;
}

.nr-pill-bar-col--link:hover {
  transform: translateY(-2px);
}

.nr-pill-bar-col--link:hover .nr-pill-bar-fill {
  background: #0f2d5c;
}

.nr-pill-bar-col--link:hover .nr-pill-bar-title {
  color: var(--nr-primary);
}

.nr-pill-bar-value {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--nr-text);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.nr-pill-bar-track {
  position: relative;
  width: 100%;
  max-width: 2.75rem;
  border-radius: 999px;
  background: #e8ebf0;
  overflow: hidden;
  flex-shrink: 0;
}

.nr-pill-bar-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  border-radius: 999px;
  background: var(--nr-primary);
  transition: height 0.45s cubic-bezier(0.4, 0, 0.2, 1), background 0.15s;
}

.nr-pill-bar-rank {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--nr-text-subtle);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.nr-pill-bar-title {
  width: 100%;
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--nr-text-muted);
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.nr-window-rankings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.nr-window-rank-card {
  border-radius: var(--nr-radius);
  border: 1px solid var(--nr-border);
  background: var(--nr-surface);
  overflow: hidden;
}

.nr-window-rank-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.875rem 1.125rem;
  border-bottom: 1px solid var(--nr-border-light);
  background: var(--nr-border-light);
}

.nr-window-rank-title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--nr-text);
}

.nr-window-rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nr-window-rank-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6875rem 1.125rem;
  border-bottom: 1px solid var(--nr-border-light);
  transition: background 0.15s;
}

.nr-window-rank-item:hover {
  background: rgba(248, 250, 252, 0.85);
}

.nr-window-rank-item:last-child {
  border-bottom: none;
}

.nr-window-rank-pos {
  flex-shrink: 0;
  width: 1.5rem;
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--nr-text-subtle);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.nr-rank-pos {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.375rem;
  height: 1.375rem;
  border-radius: 7px;
  font-size: 0.625rem;
  font-weight: 800;
  line-height: 1;
}

.nr-rank-pos--1 {
  background: linear-gradient(145deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.nr-rank-pos--2 {
  background: linear-gradient(145deg, #f8fafc 0%, #e2e8f0 100%);
  color: #475569;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.nr-rank-pos--3 {
  background: linear-gradient(145deg, #ffedd5 0%, #fdba74 100%);
  color: #9a3412;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.nr-window-rank-main {
  flex: 1;
  min-width: 0;
}

.nr-window-rank-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.nr-window-rank-label {
  flex: 1;
  min-width: 0;
}

.nr-window-rank-name {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--nr-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nr-window-rank-name--link {
  text-decoration: none;
  transition: color 0.15s;
}

.nr-window-rank-name--link:hover {
  color: var(--nr-primary);
  text-decoration: underline;
}

.nr-window-rank-detail {
  display: block;
  font-size: 0.6875rem;
  color: var(--nr-text-muted);
  margin-top: 0.125rem;
}

.nr-rank-metric {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  color: var(--nr-primary);
  padding: 0.25rem 0.625rem;
  border-radius: var(--nr-radius-pill);
  background: rgba(18, 54, 109, 0.05);
  border: 1px solid rgba(18, 54, 109, 0.08);
}

.nr-window-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 3rem 1.5rem;
  border: 1px dashed var(--nr-border);
  border-radius: var(--nr-radius);
  background: var(--nr-border-light);
  text-align: center;
}

.nr-window-empty p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--nr-text-muted);
}

@media (max-width: 1100px) {
  .nr-window-top {
    grid-template-columns: 1fr;
  }

  .nr-window-charts {
    grid-template-columns: 1fr;
  }

  .nr-window-chart-card--wide {
    grid-column: auto;
  }

  .nr-window-rankings {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nr-window-hero {
    min-height: 0;
  }

  .nr-window-hero__actions {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .nr-window-top .nr-window-stats {
    grid-template-columns: 1fr;
  }

  .nr-window-hero {
    padding: 1.125rem 1.25rem;
  }
}

/* ═══════════════════════════════════════
   IDEAS DASHBOARD  (/dashboard/ideas/)
════════════════════════════════════════ */
.nr-ideas-dash {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

/* IDEAS HERO BANNER - Unified Blue Gradient */
.nr-ideas-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  padding: 1.5rem 1.75rem;
  border-radius: var(--nr-radius);
  background: linear-gradient(135deg, #0d2852 0%, var(--nr-primary) 55%, #1e5aa8 100%) !important;
  color: #fff !important;
  border: none !important;
  box-shadow: 0 12px 40px rgba(18, 54, 109, 0.22) !important;
}

.nr-ideas-hero__text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  min-width: 280px;
}

.nr-ideas-eyebrow {
  margin: 0 !important;
  font-size: 0.625rem !important;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72) !important;
}

.nr-ideas-hero__title {
  margin: 0.25rem 0 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff !important;
  letter-spacing: -0.02em;
}

.nr-ideas-hero__sub {
  margin: 0;
  font-size: 0.8125rem;
  opacity: 0.88;
  max-width: 36rem;
  color: rgba(255, 255, 255, 0.88);
}

.nr-ideas-hero__actions {
  display: flex;
  gap: 0.5rem;
}

.nr-ideas-hero__actions .nr-btn-ghost {
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
  background: transparent;
}

.nr-ideas-hero__actions .nr-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
  color: #fff;
}

/* STATS CARDS - Bento glowing shadows, no top border */
.nr-ideas-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.nr-ideas-stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1.125rem 1.25rem;
  border-radius: var(--nr-radius);
  border: 1px solid var(--nr-border);
  background: var(--nr-surface);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.nr-ideas-stat:hover {
  transform: translateY(-2px);
}

.nr-ideas-stat--accent {
  border-color: rgba(229, 131, 0, 0.15);
}

.nr-ideas-stat--accent:hover {
  box-shadow: 0 8px 30px rgba(229, 131, 0, 0.12);
  border-color: rgba(229, 131, 0, 0.3);
}

.nr-ideas-stat--extra {
  border-color: var(--nr-extra-border);
  background: linear-gradient(160deg, var(--nr-extra-soft) 0%, var(--nr-surface) 55%);
}

.nr-ideas-stat--extra:hover {
  box-shadow: 0 8px 30px rgba(236, 43, 0, 0.12);
  border-color: rgba(236, 43, 0, 0.3);
}

.nr-ideas-stat--expreso {
  border-color: var(--nr-expreso-border);
  background: linear-gradient(160deg, var(--nr-expreso-soft) 0%, var(--nr-surface) 55%);
}

.nr-ideas-stat--expreso:hover {
  box-shadow: 0 8px 30px rgba(0, 50, 160, 0.12);
  border-color: rgba(0, 50, 160, 0.3);
}

.nr-ideas-stat__label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--nr-text-subtle);
}

.nr-ideas-stat--extra .nr-ideas-stat__label {
  color: var(--nr-extra);
  opacity: 0.85;
}

.nr-ideas-stat--expreso .nr-ideas-stat__label {
  color: var(--nr-expreso);
  opacity: 0.85;
}

.nr-ideas-stat__value {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--nr-text);
  font-variant-numeric: tabular-nums;
}

.nr-ideas-stat--accent .nr-ideas-stat__value {
  color: var(--nr-secondary);
}

.nr-ideas-stat--extra .nr-ideas-stat__value {
  color: var(--nr-extra);
}

.nr-ideas-stat--expreso .nr-ideas-stat__value {
  color: var(--nr-expreso);
}

.nr-ideas-stat__hint {
  font-size: 0.75rem;
  color: var(--nr-text-muted);
}

/* FILTERS FORM - Glassmorphic inside hero */
.nr-ideas-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: var(--nr-radius-sm);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  min-width: 320px;
}

.nr-ideas-filter {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 6rem;
  flex: 1;
}

.nr-ideas-filter--search {
  min-width: 10rem;
}

.nr-ideas-filter .nr-field-label {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nr-ideas-filter .nr-input {
  background: #fff;
  border-color: transparent;
  min-height: 2.25rem;
  height: 36px;
  color: var(--nr-text);
  font-size: 0.8125rem;
  border-radius: var(--nr-radius-sm);
  padding: 0.25rem 0.5rem;
}

.nr-ideas-filter-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.nr-ideas-filter-search-icon {
  position: absolute;
  left: 0.625rem;
  color: var(--nr-text-subtle);
  pointer-events: none;
}

.nr-ideas-filter-search {
  padding-left: 2rem !important;
  width: 100%;
}

/* SECTIONS GRID & RATIO CARDS */
.nr-ideas-sec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.nr-ideas-sec-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 200px;
  padding: 1.25rem 1rem;
  border-radius: var(--nr-radius);
  border: 1px solid var(--nr-border);
  background: linear-gradient(185deg, rgba(248, 250, 252, 0.7) 0%, rgba(255, 255, 255, 1) 100%);
  text-decoration: none;
  color: inherit;
  text-align: center;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.03);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s;
}

.nr-ideas-sec-card:hover {
  border-color: #c5cad1;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  transform: translateY(-2px);
  text-decoration: none;
  color: inherit;
}

.nr-ideas-sec-card.is-empty {
  opacity: 0.55;
}

.nr-ideas-sec-card--hidden {
  display: none !important;
}

.nr-ideas-back-link {
  color: var(--nr-text-muted);
  text-decoration: none;
  font-weight: 600;
}

.nr-ideas-back-link:hover {
  color: var(--nr-primary);
  text-decoration: none;
}

/* SECTION DETAILS VIEW - Header & Stats */
.nr-ideas-section-host-stats {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.nr-ideas-section-host-stat {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 90px;
  padding: 0.5rem 0.75rem;
  border-radius: var(--nr-radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.nr-ideas-section-host-stat__label {
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
}

.nr-ideas-section-host-stat__value {
  font-size: 1.125rem;
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: #fff;
}

.nr-ideas-sec-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--nr-border-light);
  color: var(--nr-primary);
  transition: background 0.15s, color 0.15s;
}

.nr-ideas-sec-card:hover .nr-ideas-sec-card__icon {
  background: var(--nr-primary-light);
  color: #fff;
}

.nr-ideas-sec-card__name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--nr-text);
  line-height: 1.35;
}

.nr-ideas-sec-card__count {
  font-size: 0.6875rem !important;
  font-weight: 700 !important;
  color: var(--nr-primary) !important;
  background: rgba(13, 40, 82, 0.06) !important;
  padding: 0.25rem 0.625rem !important;
  border-radius: var(--nr-radius-pill) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  letter-spacing: 0.02em !important;
}

/* Distribution ratio bar inside cards */
.nr-ideas-card-ratio {
  width: 100%;
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-items: stretch;
}


/* Ratio labels layout centering numbers above names */
.nr-ideas-card-ratio-labels {
  display: flex;
  justify-content: space-around;
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--nr-text-muted);
}

.nr-ratio-label-extra,
.nr-ratio-label-expreso {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.25;
}

.nr-ratio-label-extra {
  color: var(--nr-extra);
}

.nr-ratio-label-expreso {
  color: var(--nr-expreso);
}

.nr-ratio-num {
  font-size: 0.8125rem;
  font-weight: 700;
}

.nr-ratio-txt {
  font-size: 0.5625rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  opacity: 0.85;
}

.nr-ideas-sec-empty {
  margin: 0;
  padding: 1.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--nr-text-muted);
  border: 1px dashed var(--nr-border);
  border-radius: var(--nr-radius);
  background: var(--nr-border-light);
}

.nr-ideas-run-item.active {
  border-color: var(--nr-primary);
  background: rgba(18, 54, 109, 0.04);
}

.nr-ideas-run-preview {
  display: inline;
  color: var(--nr-text-subtle);
}

.nr-ideas-dash--split {
  width: 100%;
  margin-inline: auto;
}

.nr-ideas-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  width: 100%;
}

.nr-chat-layout.nr-panel-open .nr-ideas-list {
  grid-template-columns: 1fr;
}

/* INDIVIDUAL IDEAS CARDS - Clean borders & glowing hover accents */
.nr-ideas-list .nr-idea-card {
  position: relative;
  width: 100%;
  cursor: pointer;
  background: var(--nr-surface);
  border: 1px solid var(--nr-border) !important;
  border-radius: var(--nr-radius);
  padding: 1.25rem 1.5rem;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

.nr-ideas-list .nr-idea-card:hover {
  transform: translateY(-2px);
}

.nr-ideas-list .nr-idea-card--expreso:hover {
  border-color: var(--nr-expreso) !important;
  box-shadow: 0 10px 30px rgba(0, 50, 160, 0.08);
}

.nr-ideas-list .nr-idea-card--extra:hover {
  border-color: var(--nr-extra) !important;
  box-shadow: 0 10px 30px rgba(236, 43, 0, 0.08);
}

.nr-ideas-list .nr-idea-card--static {
  cursor: default;
}

.nr-ideas-list .nr-idea-card--static:hover {
  transform: none;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.nr-ideas-list .nr-idea-card--active {
  border-color: var(--nr-primary) !important;
  box-shadow: 0 0 0 2px var(--nr-primary);
}

.nr-ideas-list .nr-idea-card--extra.nr-idea-card--active {
  border-color: var(--nr-extra) !important;
  box-shadow: 0 0 0 2px var(--nr-extra);
}

.nr-ideas-list .nr-idea-card--expreso.nr-idea-card--active {
  border-color: var(--nr-expreso) !important;
  box-shadow: 0 0 0 2px var(--nr-expreso);
}

.nr-ideas-list .nr-idea-footer .nr-idea-card-link {
  margin-left: auto;
  pointer-events: none;
}

#nr-prev-body .nr-intel-drawer--email-parity,
#nr-prev-body .nr-intel-drawer {
  min-height: 100%;
  overflow-y: auto;
}

.nr-ideas-filter-bento {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  padding: 1.25rem 1.375rem;
  border-radius: var(--nr-radius);
  border: 1px solid var(--nr-border);
  background: var(--nr-surface);
}

.nr-ideas-filter-bento__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
}

.nr-ideas-filter-count {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--nr-text-muted);
  padding: 0.375rem 0.75rem;
  border-radius: var(--nr-radius-pill);
  background: var(--nr-border-light);
  white-space: nowrap;
}

.nr-ideas-section-select {
  width: 100%;
  min-height: 200px;
  height: auto;
  padding: 0.375rem 0.5rem;
  font-size: var(--nr-fs-input);
  line-height: 1.45;
}

.nr-idea-card-link {
  margin-left: auto;
  font-size: var(--nr-fs-body);
  font-weight: 600;
}

.nr-ideas-card-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  overflow: hidden;
}

.nr-ideas-card-section {
  font-size: 0.5625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--nr-text-subtle);
  white-space: nowrap;
}

/* PREMIUM CONFIDENCE GLOW CHIP STYLE */
.nr-ideas-confidence {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.5rem;
  border-radius: var(--nr-radius-pill);
  font-size: 0.6875rem;
  font-weight: 700;
  border: 1px solid transparent;
  flex-shrink: 0;
}

.nr-ideas-confidence--high {
  background: rgba(5, 150, 105, 0.08);
  border-color: rgba(5, 150, 105, 0.2);
  color: #059669;
  box-shadow: 0 0 8px rgba(5, 150, 105, 0.1);
}

.nr-ideas-confidence--mid {
  background: rgba(217, 119, 6, 0.08);
  border-color: rgba(217, 119, 6, 0.2);
  color: #d97706;
  box-shadow: 0 0 8px rgba(217, 119, 6, 0.1);
}

.nr-ideas-confidence--low {
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.2);
  color: #dc2626;
  box-shadow: 0 0 8px rgba(220, 38, 38, 0.1);
}

.nr-ideas-confidence__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 4px currentColor;
}

.nr-ideas-confidence--high .nr-ideas-confidence__dot {
  background: #059669;
}

.nr-ideas-confidence--mid .nr-ideas-confidence__dot {
  background: #d97706;
}

.nr-ideas-confidence--low .nr-ideas-confidence__dot {
  background: #dc2626;
}

.nr-ideas-confidence__value {
  font-size: 0.6875rem;
  color: inherit;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.nr-ideas-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 3rem 1.5rem;
  border: 1px dashed var(--nr-border);
  border-radius: var(--nr-radius);
  background: var(--nr-border-light);
  text-align: center;
}

.nr-ideas-empty p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--nr-text-muted);
}

@media (max-width: 1100px) {

  .nr-ideas-stats,
  .nr-tech-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nr-tech-health-grid,
  .nr-tech-checklists {
    grid-template-columns: 1fr;
  }

  .nr-chat-layout:not(.nr-panel-open) .nr-ideas-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {

  .nr-ideas-stats,
  .nr-tech-stats {
    grid-template-columns: 1fr;
  }

  .nr-ideas-filter-bar {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
  }

  .nr-ideas-filter-bar > *:first-child {
    margin-bottom: 0.75rem !important;
  }

  .nr-ideas-list {
    grid-template-columns: 1fr;
  }

  .nr-ideas-sec-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nr-ideas-hero,
  .nr-window-hero {
    padding: 1.125rem 1.25rem;
  }

  .nr-chat-scroll--dash>.nr-tech-dash {
    padding: 1rem;
  }
}

/* Prompt active card in conv page */
/* ═══════════════════════════════════════
   CHAT DETAIL PAGE  (/audit/prompts/ID/)
════════════════════════════════════════ */

/* Override nr-content to remove padding and fill height for chat page */
.nr-content-flush {
  padding: 0 !important;
  max-width: none !important;
  margin-inline: 0 !important;
  align-self: stretch !important;
  height: calc(100vh - var(--nr-topbar-h));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Outer split: chat area + preview panel */
.nr-chat-layout {
  flex: 1;
  display: flex;
  overflow: hidden;
  min-height: 0;
  position: relative;
}

/* ── Chat main column ── */
.nr-chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
  margin-right: 0;
  transition: margin-right .28s cubic-bezier(.4, 0, .2, 1);
  position: relative;
}

/* Desktop/tablet: el chat se recoge para dar espacio al panel */
.nr-chat-layout.nr-panel-open .nr-chat-main {
  margin-right: 52%;
}

@media (min-width: 961px) and (max-width: 1200px) {
  .nr-chat-layout.nr-panel-open .nr-chat-main {
    margin-right: 58%;
  }
}

/* Mobile: no se recoge */
@media (max-width: 960px) {
  .nr-chat-layout.nr-panel-open .nr-chat-main {
    margin-right: 0;
  }
}

.nr-chat-bar-back {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--nr-text-muted);
  text-decoration: none;
  border: none;
  background: none;
  cursor: pointer;
  padding: 4px 8px 4px 4px;
  border-radius: var(--nr-radius-sm);
  transition: color .1s, background .1s;
}

.nr-chat-bar-back:hover {
  background: var(--nr-border-light);
  color: var(--nr-text);
}

.nr-chat-bar-divider {
  width: 1px;
  height: 18px;
  background: var(--nr-border);
}

.nr-chat-bar-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.nr-chat-bar-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--nr-text);
}

.nr-chat-bar-meta {
  font-size: 0.75rem;
  color: var(--nr-text-muted);
}

.nr-chat-scroll {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 36px 24px;
  min-height: 0;
}

/* Hijos miden su contenido real (scroll) y quedan centrados */
.nr-chat-scroll>.nr-page-inner,
.nr-chat-scroll>.nr-tech-dash,
.nr-chat-scroll>.nr-ideas-dash--split,
.nr-chat-scroll>.nr-chat-inner {
  flex: 0 0 auto;
  height: auto;
  width: 100%;
  margin-inline: auto;
}

.nr-chat-scroll--dash {
  align-items: stretch;
  padding: 0;
  background: var(--nr-border-light);
}

.nr-chat-scroll--dash>.nr-tech-dash,
.nr-chat-scroll--dash>.nr-ideas-dash--split,
.nr-chat-scroll--dash>.nr-resumen {
  align-self: center;
}

.nr-chat-scroll--dash>.nr-tech-dash {
  padding: 1.75rem 2rem 2.5rem;
}

.nr-chat-inner {
  width: 100%;
  max-width: 768px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* ── Message rows ── */
.nr-msg {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.nr-msg.sent {
  align-items: flex-end;
}

.nr-msg.recv {
  align-items: stretch;
}

.nr-msg-label {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: capitalize;
  letter-spacing: .02em;
  color: var(--nr-text);
  padding: 0 4px;
}

/* ── Sent bubble (user / input) ── */
.nr-bubble-sent {
  background: var(--nr-border-light);
  border: 1px solid var(--nr-border);
  border-radius: 14px 14px 4px 14px;
  padding: 16px 20px;
  width: 100%;
  max-width: 650px;
  min-width: 260px;
  box-sizing: border-box;
}

.nr-bubble-sent-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--nr-text);
  margin-bottom: 12px;
}

.nr-sent-kv-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px 20px;
}

.nr-sent-kv {
  display: flex;
  gap: 6px;
  font-size: 0.75rem;
}

.nr-sent-key {
  font-weight: 600;
  color: var(--nr-text-muted);
  min-width: 80px;
}

.nr-sent-val {
  color: var(--nr-text-muted);
  word-break: break-word;
}

.nr-sent-sections {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.nr-sent-section-pill {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 2px 8px;
  border-radius: var(--nr-radius-pill);
  background: #fff;
  border: 1px solid var(--nr-border);
  color: var(--nr-text-muted);
}

/* ── Recv row (Claude / output) ── */
.nr-recv-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  max-width: none;
}

.nr-recv-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--nr-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.nr-recv-avatar svg {
  color: #fff;
}

/* ── Recv bubble (Claude output) ── */
.nr-bubble-recv {
  background: #fff;
  border: 1px solid var(--nr-border);
  border-radius: 14px 16px;
  overflow: hidden;
  flex: 1;
  min-width: 0;
  width: 100%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
}

.nr-bubble-recv-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: transparent;
}

.nr-bubble-recv-head .nr-chat-bar-meta {
  margin-left: auto;
  flex-shrink: 0;
  white-space: nowrap;
  text-align: right;
}

.nr-recv-section-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--nr-text);
}

.nr-recv-host-pill {
  font-size: 0.5625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 2px 7px;
  border-radius: var(--nr-radius-pill);
  border: 1px solid var(--nr-border);
  background: #fff;
  color: var(--nr-text-muted);
}

.nr-recv-status-pill {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.6875rem;
  color: var(--nr-text-muted);
}

.nr-recv-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--nr-success);
  flex-shrink: 0;
}

.nr-recv-status-dot.err {
  background: var(--nr-danger);
}

.nr-recv-status-dot.warn {
  background: var(--nr-warning);
}

.nr-bubble-recv-body {
  padding: 14px 16px;
}

/* Stats row */
.nr-recv-stats {
  display: flex;
  gap: 20px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.nr-recv-stat {
  display: flex;
  flex-direction: column;
}

.nr-recv-stat-val {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--nr-primary);
  letter-spacing: -.03em;
  line-height: 1.1;
}

.nr-recv-stat-val small {
  font-size: 0.625rem;
  font-weight: 700;
  vertical-align: super;
}

.nr-recv-stat-lbl {
  font-size: 0.5625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--nr-text-subtle);
  margin-top: 1px;
}

.nr-recv-divider {
  height: 1px;
  background: var(--nr-border-light);
  margin: 10px 0 12px;
}

/* Confidence mini bar */
.nr-recv-conf-bar {
  height: 3px;
  border-radius: var(--nr-radius-pill);
  background: var(--nr-border);
  margin-bottom: 12px;
  overflow: hidden;
}

.nr-recv-conf-fill {
  height: 100%;
  border-radius: var(--nr-radius-pill);
  background: var(--nr-primary);
  transition: width .4s ease;
}

/* Action buttons */
.nr-recv-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.nr-recv-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--nr-border);
  background: #fff;
  padding: 6.5px 16px;
  border-radius: var(--nr-radius-sm);
  font-size: 0.8875rem;
  font-weight: 600;
  color: var(--nr-text-muted);
  cursor: pointer;
  transition: all .12s;
  font-family: var(--nr-font);
}

.nr-recv-btn:hover {
  border-color: var(--nr-primary);
  color: var(--nr-primary);
  background: rgba(18, 54, 109, .04);
}

.nr-recv-btn.active {
  background: var(--nr-primary);
  border-color: var(--nr-primary);
  color: #fff;
}

.nr-recv-btn.active:hover {
  opacity: .88;
}

/* ── Preview panel — siempre entra/sale desde la derecha (todas las pantallas) ── */
.nr-prev-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 52%;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-left: 1px solid var(--nr-border);
  min-height: 0;
  z-index: 10;
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.4, 0, .2, 1);
  pointer-events: none;
}

.nr-prev-panel.open {
  transform: translateX(0);
  pointer-events: auto;
}

.nr-prev-bar {
  height: var(--nr-topbar-h);
  flex-shrink: 0;
  border-bottom: 1px solid var(--nr-border);
  display: flex;
  align-items: center;
  padding: 0 18px;
  gap: 10px;
  background: #fff;
}

.nr-prev-toggle {
  display: inline-flex;
  border: 1px solid var(--nr-border);
  border-radius: var(--nr-radius-sm);
  overflow: hidden;
}

.nr-prev-mode-btn {
  border: none;
  background: none;
  padding: 4px 14px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: .02em;
  cursor: pointer;
  color: var(--nr-text-muted);
  font-family: var(--nr-font);
  transition: background .1s, color .1s;
}

.nr-prev-mode-btn.active {
  background: var(--nr-primary);
  color: #fff;
}

.nr-prev-title {
  flex: 1;
  min-width: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--nr-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nr-prev-close {
  border: none;
  background: none;
  border-radius: var(--nr-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--nr-text-subtle);
  cursor: pointer;
  flex-shrink: 0;
  transition: all .1s;
  font-family: var(--nr-font);
}

.nr-prev-close:hover {
  background: var(--nr-border-light);
  color: var(--nr-text);
}

.nr-prev-body {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.nr-prev-body>.nr-role-perm-drawer {
  flex: 1;
  min-height: 0;
}

.nr-prev-panel-loading {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.nr-prev-panel-loading[hidden] {
  display: none !important;
}

.nr-prev-panel.is-saving {
  pointer-events: auto;
}

.nr-prev-panel.is-saving .nr-prev-body,
.nr-prev-panel.is-saving .nr-prev-close,
.nr-prev-panel.is-saving [data-panel-close] {
  pointer-events: none;
}

.nr-prev-panel.is-saving .nr-prev-close {
  opacity: 0.35;
}

.nr-prev-panel-loading {
  pointer-events: auto;
}

.nr-prev-panel-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(18, 54, 109, 0.12);
  border-top-color: var(--nr-primary);
  border-radius: 50%;
  animation: nr-spin 0.75s linear infinite;
}

.nr-prev-panel-loading-text {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--nr-primary);
  letter-spacing: 0.01em;
}

/* Formularios guardados en panel lateral (modal) */
.nr-panel-drawer-form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  width: 100%;
  margin: 0;
}

.nr-panel-drawer-scroll {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding: 1.75rem 2rem;
  font-size: 16px;
}

.nr-panel-drawer-form .nr-drawer-fields,
.nr-send-inner.nr-panel-drawer-form .nr-drawer-fields {
  gap: 0;
}

.nr-panel-drawer-form .nr-panel-drawer-scroll .nr-field,
.nr-send-inner.nr-panel-drawer-form .nr-panel-drawer-scroll .nr-field {
  margin-bottom: 20px;
}

.nr-panel-drawer-form .nr-panel-drawer-scroll .nr-field-label,
.nr-panel-drawer-form .nr-panel-drawer-scroll .nr-drawer-fields .nr-field-label,
.nr-send-inner.nr-panel-drawer-form .nr-panel-drawer-scroll .nr-field-label {
  font-size: var(--nr-fs-label);
  margin-top: 8px;
  margin-bottom: 8px;
  display: block;
}

.nr-panel-drawer-form .nr-panel-drawer-scroll .nr-drawer-hint,
.nr-panel-drawer-form .nr-panel-drawer-scroll .nr-field .nr-drawer-hint,
.nr-send-inner.nr-panel-drawer-form .nr-panel-drawer-scroll .nr-drawer-hint,
.nr-send-inner.nr-panel-drawer-form .nr-panel-drawer-scroll .nr-send-hint {
  font-size: var(--nr-fs-label);
}

.nr-panel-drawer-form .nr-panel-drawer-scroll :is(.nr-input):not(textarea),
.nr-panel-drawer-form .nr-panel-drawer-scroll .nr-select,
.nr-send-inner.nr-panel-drawer-form .nr-panel-drawer-scroll :is(.nr-input):not(textarea) {
  height: var(--nr-h-input);
  min-height: var(--nr-h-input);
}

.nr-panel-drawer-form .nr-panel-drawer-scroll .nr-input,
.nr-panel-drawer-form .nr-panel-drawer-scroll .nr-select,
.nr-send-inner.nr-panel-drawer-form .nr-panel-drawer-scroll .nr-input {
  border-radius: var(--nr-radius-sm);
  font-size: var(--nr-fs-input);
  padding: 0 0.75rem;
  box-sizing: border-box;
}

.nr-panel-drawer-form .nr-panel-drawer-scroll textarea.nr-input,
.nr-send-inner.nr-panel-drawer-form .nr-panel-drawer-scroll textarea.nr-input {
  padding-top: 0.5rem;
}

.nr-panel-drawer-form .nr-panel-drawer-scroll .nr-textarea,
.nr-panel-drawer-form .nr-panel-drawer-scroll .nr-textarea-code {
  border-radius: var(--nr-radius-sm);
  font-size: var(--nr-fs-input);
  min-height: calc(var(--nr-h-input) * 3);
  height: auto;
  padding: 0.5rem 0.75rem;
  box-sizing: border-box;
}

.nr-prev-body>form[data-panel-form]:not(.nr-panel-drawer-form) {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  width: 100%;
}

.nr-prev-body .nr-panel-drawer-form>.nr-drawer-footer,
.nr-prev-body form[data-panel-form]>.nr-drawer-footer,
.nr-send-inner.nr-panel-drawer-form>.nr-drawer-footer {
  margin-top: auto;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0.625rem;
  padding: 1.1rem;
}

.nr-prev-body .nr-drawer-footer .nr-btn,
.nr-send-inner.nr-panel-drawer-form>.nr-drawer-footer .nr-btn {
  width: 100%;
  justify-content: center;
  box-sizing: border-box;
  min-height: var(--nr-h-btn-lg);
  height: var(--nr-h-btn-lg);
  padding: 0 1rem;
  border: none;
  border-radius: var(--nr-radius-pill);
  font-size: var(--nr-fs-btn);
  font-weight: 700;
  cursor: pointer;
}

.nr-prev-body .nr-drawer-footer .nr-btn-cancel,
.nr-send-inner.nr-panel-drawer-form>.nr-drawer-footer .nr-btn-cancel {
  background: transparent !important;
  box-shadow: none !important;
  color: var(--nr-text-muted);
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
}

.nr-prev-body .nr-drawer-footer .nr-btn-cancel:hover,
.nr-prev-body .nr-drawer-footer .nr-btn-cancel:focus,
.nr-send-inner.nr-panel-drawer-form>.nr-drawer-footer .nr-btn-cancel:hover,
.nr-send-inner.nr-panel-drawer-form>.nr-drawer-footer .nr-btn-cancel:focus {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: var(--nr-text);
}

.nr-prev-body .nr-drawer-footer .nr-btn-primary,
.nr-send-inner.nr-panel-drawer-form>.nr-drawer-footer .nr-btn-primary {
  background: var(--nr-primary);
  color: #fff;
  min-height: var(--nr-h-btn-lg);
  height: var(--nr-h-btn-lg);
  display: inline-flex;
  align-items: center;
}

.nr-prev-body .nr-drawer-footer .nr-btn-primary:hover,
.nr-send-inner.nr-panel-drawer-form>.nr-drawer-footer .nr-btn-primary:hover {
  background: var(--nr-primary-dark);
  color: #fff;
}

.nr-send-inner.nr-panel-drawer-form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: 100%;
}

.nr-send-inner.nr-panel-drawer-form .nr-panel-drawer-scroll {
  padding: 1.75rem 2rem;
}

/* JSON mode in panel */
.nr-prev-json-wrap {
  flex: 1;
  overflow-y: auto;
  background: #0F1117;
  display: none;
  min-height: 0;
}

.nr-prev-json-wrap.active {
  display: flex;
  flex-direction: column;
}

.nr-prev-json-copy {
  flex-shrink: 0;
  display: flex;
  justify-content: flex-end;
  padding: 10px 14px 0;
}

.nr-prev-json-copy-btn {
  border: 1px solid #2D3748;
  background: none;
  color: #718096;
  font-size: 0.625rem;
  font-weight: 600;
  font-family: var(--nr-font);
  padding: 3px 10px;
  border-radius: var(--nr-radius-sm);
  cursor: pointer;
  transition: all .1s;
}

.nr-prev-json-copy-btn:hover {
  border-color: #4A5568;
  color: #A0AEC0;
}

.nr-prev-json-pre {
  flex: 1;
  margin: 0;
  padding: 12px 18px 24px;
  min-height: 0;
  font-family: 'JetBrains Mono', 'Cascadia Code', ui-monospace, monospace;
  font-size: 0.6875rem;
  line-height: 1.75;
  color: #E2E8F0;
  white-space: pre;
  overflow-x: auto;
  word-break: normal;
  -webkit-user-select: text;
  user-select: text;
  cursor: default;
  caret-color: transparent;
}

/* HTML mode in panel */
.nr-prev-html-wrap {
  flex: 1;
  overflow-y: auto;
  display: none;
  min-height: 0;
}

.nr-prev-html-wrap.active {
  display: block;
}

.nr-prev-html-inner {
  padding: 28px 32px;
  max-width: 680px;
  margin: 0 auto;
}

/* Prompt / plain text mode in panel */
.nr-prev-prompt-wrap {
  flex: 1;
  overflow-y: auto;
  display: none;
  background: #fff;
  min-height: 0;
}

.nr-prev-prompt-wrap.active {
  display: block;
}

.nr-prev-prompt-pre {
  margin: 0;
  padding: 28px 32px;
  font-family: 'JetBrains Mono', 'Cascadia Code', ui-monospace, monospace;
  font-size: 0.75rem;
  line-height: 1.75;
  color: var(--nr-text);
  white-space: pre-wrap;
  word-break: break-word;
  -webkit-user-select: text;
  user-select: text;
  cursor: default;
  caret-color: transparent;
}

/* Send mode in panel */
.nr-prev-send-wrap {
  flex: 1;
  overflow: hidden;
  display: none;
  min-height: 0;
  background: #fff;
  flex-direction: column;
}

.nr-prev-send-wrap.active {
  display: flex;
}

.nr-send-inner {
  padding: 0;
}

.nr-send-lead {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--nr-text-muted);
}

.nr-send-hint {
  margin: 8px 0 0;
  font-size: 0.6875rem;
  line-height: 1.5;
  color: var(--nr-text-subtle);
}

.nr-recv-btn-send.active {
  background: var(--nr-primary);
  border-color: var(--nr-primary);
  color: #fff;
}

/* Mobile: panel ocupa pantalla completa, animación siempre activa */
@media (max-width: 960px) {
  .nr-prev-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    z-index: 200;
    border-left: none;
    box-shadow: -4px 0 24px rgba(0, 0, 0, .12);
    /* NO transition:none — la animación transform se mantiene igual que en desktop */
  }
}

@media (min-width: 961px) and (max-width: 1200px) {
  .nr-prev-panel {
    width: 58%;
  }
}

/* ═══════════════════════════════════════
   SETTINGS  — user list
════════════════════════════════════════ */
.nr-user-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--nr-border);
  border-radius: var(--nr-radius-lg);
  overflow: hidden;
}

.nr-user-row-wrap {
  display: flex;
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--nr-border-light);
  transition: background .1s;
}

.nr-user-row-wrap:hover {
  background: var(--nr-bg) !important;
}

.nr-user-row-wrap:last-child {
  border-bottom: none;
}

.nr-user-row-wrap .nr-user-row {
  background: transparent !important;
  border-bottom: none !important;
  flex: 1;
}

.nr-user-row:not(:has(.nr-toggle)) {
  cursor: pointer !important;
}

.nr-user-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border-bottom: 1px solid var(--nr-border-light);
  transition: background .1s;
  text-decoration: none !important;
  color: inherit;
}

.nr-user-row * {
  cursor: inherit !important;
}

.nr-user-row:last-child {
  border-bottom: none;
}

.nr-user-row:hover {
  background: var(--nr-bg);
}

.nr-user-row.nr-q-inactive {
  opacity: .55;
}

.nr-user-row.nr-q-inactive:hover {
  opacity: .72;
}

.nr-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--nr-radius-circle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: .02em;
}

.nr-user-info {
  flex: 1;
  min-width: 0;
}

.nr-user-name {
  font-size: var(--nr-fs-body);
  font-weight: 600;
  color: var(--nr-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nr-user-meta {
  font-size: var(--nr-fs-label);
  color: var(--nr-text-subtle);
  margin-top: 2px;
}

.nr-user-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--nr-border);
  flex-shrink: 0;
}

.nr-user-dot.active {
  background: var(--nr-success);
}

/* ═══════════════════════════════════════
   SETTINGS — PROMPTS EDITOR
════════════════════════════════════════ */
.nr-prompt-status {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: .8rem;
  color: var(--nr-text-subtle);
  padding: .625rem 1rem;
  border-radius: var(--nr-radius);
  background: var(--nr-bg);
  border: 1px solid var(--nr-border);
  margin-bottom: 0;
  width: 100%;
  box-sizing: border-box;
}

.nr-prompt-status strong {
  color: var(--nr-text);
  font-weight: 600;
}

.nr-prompt-status-sep {
  color: var(--nr-border);
}

.nr-prompt-projects-layout {
  flex: 1;
  display: flex;
  min-height: 0;
  overflow: hidden;
}

.nr-prompt-projects-nav {
  width: 240px;
  flex-shrink: 0;
  border-right: 1px solid var(--nr-border);
  background: var(--nr-bg);
  padding: 1rem .875rem;
  overflow-y: auto;
}

.nr-prompt-projects-label {
  font-size: .6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--nr-text-subtle);
  margin: 0 0 .75rem;
}

.nr-prompt-project-card {
  display: block;
  padding: .75rem .875rem;
  border-radius: var(--nr-radius);
  border: 1.5px solid var(--nr-border);
  background: #fff;
  margin-bottom: .625rem;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, box-shadow .15s;
}

.nr-prompt-project-card:hover {
  border-color: #7a9fc2;
  box-shadow: 0 2px 8px rgba(18, 54, 109, .06);
}

.nr-prompt-project-card.is-selected {
  border-color: var(--nr-secondary);
  background: rgba(18, 54, 109, .04);
  box-shadow: 0 0 0 1px var(--nr-secondary);
}

.nr-prompt-project-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 4px;
}

.nr-prompt-project-badge {
  font-size: .625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--nr-secondary);
}

.nr-prompt-project-title {
  font-size: .9375rem;
  font-weight: 600;
  margin: 0 0 2px;
  color: var(--nr-text);
}

.nr-prompt-project-schedule {
  font-size: .75rem;
  color: var(--nr-text-subtle);
  margin: 0 0 6px;
}

.nr-prompt-project-meta {
  font-size: .6875rem;
  color: var(--nr-text-muted);
  margin: 0;
}

.nr-prompt-projects-hint {
  font-size: .6875rem;
  color: var(--nr-text-subtle);
  line-height: 1.45;
  margin: 1rem 0 0;
  padding-top: .75rem;
  border-top: 1px solid var(--nr-border);
}

.nr-prompt-editor-layout {
  flex: 1;
  min-width: 0;
}

.nr-prompt-mode-header {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.nr-prompt-mode-intro {
  width: 100%;
}

.nr-prompt-mode-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: .25rem 0;
  color: var(--nr-text);
}

.nr-prompt-mode-desc {
  font-size: .8125rem;
  color: var(--nr-text-muted);
  margin: 0;
  max-width: 42rem;
  line-height: 1.5;
}

.nr-prompt-pipeline-hint {
  font-size: .75rem;
  color: var(--nr-text-subtle);
  margin: 0 0 1.25rem;
  padding: .5rem .75rem;
  background: var(--nr-bg);
  border-radius: var(--nr-radius);
  border: 1px solid var(--nr-border);
}

.nr-prompt-mode-header .nr-prompt-status {
  margin-bottom: 0;
}

.nr-cmd-list {
  display: flex;
  flex-direction: column;
  gap: .875rem;
}

.nr-cmd-card {
  padding: 1rem 1.25rem;
  border: 1px solid var(--nr-border);
  border-radius: var(--nr-radius);
  background: #fff;
}

.nr-cmd-name {
  font-size: .9375rem;
  font-weight: 600;
  margin: 0 0 .375rem;
  font-family: var(--nr-font-mono, monospace);
  color: var(--nr-text);
}

.nr-cmd-summary {
  font-size: .8125rem;
  color: var(--nr-text-muted);
  margin: 0 0 .75rem;
  line-height: 1.5;
}

.nr-cmd-usage {
  margin: 0 0 .75rem;
  padding: .625rem .875rem;
  background: var(--nr-bg);
  border: 1px solid var(--nr-border);
  border-radius: var(--nr-radius);
  font-size: .75rem;
  overflow-x: auto;
}

.nr-cmd-usage code {
  font-family: var(--nr-font-mono, monospace);
}

.nr-cmd-when,
.nr-cmd-notes {
  font-size: .75rem;
  color: var(--nr-text-subtle);
  margin: 0;
  line-height: 1.55;
}

.nr-cmd-notes {
  margin-top: .375rem;
}

@media (max-width: 900px) {
  .nr-prompt-projects-layout {
    flex-direction: column;
  }

  .nr-prompt-projects-nav {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--nr-border);
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    padding: .75rem;
  }

  .nr-prompt-projects-label {
    width: 100%;
  }

  .nr-prompt-project-card {
    flex: 1;
    min-width: 140px;
    margin-bottom: 0;
  }

  .nr-prompt-projects-hint {
    width: 100%;
  }
}

.nr-editor-box {
  border: 1.5px solid var(--nr-border);
  border-radius: var(--nr-radius-sm);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 6px rgba(0, 0, 0, .05);
  transition: border-color .18s, box-shadow .18s;
}

.nr-editor-box:focus-within {
  border-color: #7a9fc2;
  box-shadow: 0 0 0 4px rgba(18, 54, 109, .07);
}

.nr-editor-box.nr-editor-invalid {
  border-color: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, .12);
}

.nr-editor-box .nr-textarea-code {
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  background: #fff !important;
  resize: none;
  width: 100%;
  padding: 1.25rem 1.25rem .75rem;
}

.nr-editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1rem;
  background: #fff;
  gap: 8px;
}

/* Botón ghost dentro del editor (Historial) */
.nr-editor-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .78rem;
  font-weight: 500;
  color: var(--nr-text-subtle);
  background: none;
  border: none;
  cursor: pointer;
  padding: .3rem .55rem;
  border-radius: 7px;
  transition: background .12s, color .12s;
}

.nr-editor-btn:hover {
  background: var(--nr-bg);
  color: var(--nr-text);
}

/* Checkbox dentro del editor */
.nr-editor-check {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .78rem;
  color: var(--nr-text-subtle);
  cursor: pointer;
  user-select: none;
}

/* Botón submit del editor */
.nr-editor-submit {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--nr-primary);
  color: #fff;
  border: none;
  border-radius: var(--nr-radius-pill);
  cursor: pointer;
  font-size: .8125rem;
  font-weight: 500;
  padding: .45rem 1.1rem;
  transition: opacity .12s;
  white-space: nowrap;
}

.nr-editor-submit:hover:not(:disabled) {
  opacity: .88;
}

.nr-editor-submit:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.nr-textarea-code {
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: .8125rem;
  line-height: 1.65;
  resize: vertical;
  min-height: 380px;
}

/* Grupo acordeón */
.nr-vg {
  border-bottom: 1px solid var(--nr-border);
}

.nr-vg:last-child {
  border-bottom: none;
}

.nr-vg-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .875rem 1.1rem;
  background: none;
  border: none;
  cursor: pointer;
  gap: 8px;
  transition: background .12s;
  text-align: left;
}

.nr-vg-header:hover {
  background: var(--nr-bg);
}

.nr-vg-code {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--nr-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nr-vg-count {
  flex-shrink: 0;
  font-size: .6875rem;
  font-weight: 500;
  color: var(--nr-text-subtle);
  background: var(--nr-bg);
  border: 1px solid var(--nr-border);
  border-radius: var(--nr-radius-pill);
  padding: 1px 7px;
}

.nr-vg-active>.nr-vg-header .nr-vg-code {
  color: var(--nr-success, #22c55e);
}

.nr-vg-chevron {
  transition: transform .2s;
  color: var(--nr-text-subtle);
  flex-shrink: 0;
}

.nr-vg-header.open .nr-vg-chevron {
  transform: rotate(180deg);
}

.nr-vg-body {
  display: none;
}

/* Filas de versión dentro del acordeón */
.nr-version-row {
  border-top: 1px solid var(--nr-border);
  transition: background .1s;
  background: var(--nr-bg);
}

.nr-version-row:hover {
  background: #f0f2f5;
}

.nr-version-active {
  background: color-mix(in srgb, var(--nr-success, #22c55e) 6%, white);
}

.nr-version-active:hover {
  background: color-mix(in srgb, var(--nr-success, #22c55e) 10%, white);
}

/* ═══════════════════════════════════════
   SETTINGS — SECTIONS
════════════════════════════════════════ */
.nr-sec-block {
  margin-bottom: 2.5rem;
  border: 1px solid var(--nr-border);
  border-radius: var(--nr-radius);
  overflow: hidden;
  background: #fff;
}

.nr-sec-block--hidden {
  display: none !important;
}

.nr-sections-save-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  background: #fff;
}

.nr-sections-save-overlay.is-active,
body.nr-sections-saving .nr-sections-save-overlay {
  display: flex !important;
}

.nr-sections-save-overlay[hidden]:not(.is-active) {
  display: none !important;
}

body.nr-sections-saving {
  overflow: hidden;
}

.nr-sections-save-overlay__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.nr-sections-save-overlay__inner p {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--nr-text-muted);
}

.nr-sections-save-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(18, 54, 109, 0.12);
  border-top-color: var(--nr-primary);
  border-radius: 50%;
  animation: nr-spin 0.75s linear infinite;
}

.nr-sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--nr-border);
  gap: 12px;
}

.nr-sec-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--nr-text);
  margin: 0;
}

.nr-recip-list {
  display: flex;
  flex-direction: column;
}

.nr-recip-row {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--nr-border);
  transition: background 0.12s;
}

.nr-recip-row:last-child {
  border-bottom: none;
}

.nr-recip-row:hover {
  background: var(--nr-bg);
}

.nr-recip-inactive {
  opacity: 0.48;
}

.nr-recip-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--nr-radius-circle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: .03em;
  flex-shrink: 0;
}

.nr-recip-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.nr-recip-email {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--nr-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nr-recip-name {
  font-size: 0.75rem;
  color: var(--nr-text-subtle);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.nr-recip-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: .05em;
  padding: 2px 7px;
  border-radius: var(--nr-radius-pill);
  border: 1px solid;
  flex-shrink: 0;
}

.nr-recip-empty {
  padding: 1.5rem 1.25rem;
  font-size: 0.8125rem;
  color: var(--nr-text-subtle);
}

/* Toggle switch */
.nr-toggle {
  position: relative;
  width: 36px;
  height: 20px;
  border-radius: 10px;
  background: var(--nr-border);
  border: none;
  cursor: pointer !important;
  transition: background 0.2s;
  flex-shrink: 0;
  padding: 0;
}

.nr-toggle.nr-toggle-on {
  background: var(--nr-success, #22c55e);
}

.nr-toggle-thumb {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  top: 3px;
  left: 3px;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
  pointer-events: none;
}

.nr-toggle.nr-toggle-on .nr-toggle-thumb {
  transform: translateX(16px);
}

.nr-toggle:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

/* Marfeel brand — settings / credenciales API */
.nr-marfeel-page {
  --nr-marfeel-primary: #ff8200;
  --nr-marfeel-secondary: #aec730;
}

.nr-marfeel-page .nr-user-avatar {
  background: linear-gradient(135deg, var(--nr-marfeel-primary) 0%, var(--nr-marfeel-secondary) 100%);
}

.nr-marfeel-page .nr-user-row:hover {
  background: color-mix(in srgb, var(--nr-marfeel-primary) 5%, #fff);
}

.nr-marfeel-page .nr-badge-info {
  background: color-mix(in srgb, var(--nr-marfeel-primary) 12%, #fff);
  color: var(--nr-marfeel-primary);
  border-color: color-mix(in srgb, var(--nr-marfeel-primary) 28%, #fff);
}

.nr-marfeel-page .nr-badge-neutral {
  background: color-mix(in srgb, var(--nr-marfeel-secondary) 14%, #fff);
  color: color-mix(in srgb, var(--nr-marfeel-secondary) 70%, #3d4a1a);
  border-color: color-mix(in srgb, var(--nr-marfeel-secondary) 35%, #fff);
}

.nr-marfeel-page .nr-toggle.nr-toggle-on {
  background: var(--nr-marfeel-primary);
}

.nr-marfeel-page .nr-btn-primary {
  background: var(--nr-marfeel-primary);
  border-color: var(--nr-marfeel-primary);
}

.nr-marfeel-page .nr-btn-primary:hover:not(:disabled) {
  background: color-mix(in srgb, var(--nr-marfeel-primary) 88%, #000);
  border-color: color-mix(in srgb, var(--nr-marfeel-primary) 88%, #000);
}

.nr-marfeel-page .nr-marfeel-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: color-mix(in srgb, var(--nr-marfeel-secondary) 55%, #2d3318);
  letter-spacing: .02em;
}

/* ═══════════════════════════════════════
   SETTINGS — ENVIRONMENT FORM
════════════════════════════════════════ */
.nr-settings-form-card {
  border: 1px solid var(--nr-border);
  border-radius: var(--nr-radius-lg);
  overflow: hidden;
  background: #fff;
}

.nr-settings-form-section {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--nr-border-light);
}

.nr-settings-form-section:last-child {
  border-bottom: none;
}

.nr-settings-form-section-title {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--nr-text-subtle);
  margin: 0 0 1rem;
}

.nr-settings-flags {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.nr-settings-flag-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.nr-settings-flag-text {
  flex: 1;
  min-width: 0;
}

.nr-settings-flag-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--nr-text);
  display: block;
}

.nr-settings-flag-hint {
  font-size: 0.75rem;
  color: var(--nr-text-subtle);
  margin-top: 3px;
  line-height: 1.5;
}

/* Claude brand — settings API */
.nr-claude-page {
  --nr-claude-primary: #d97757;
  --nr-claude-secondary: #141413;
}

.nr-claude-page .nr-user-avatar {
  background: linear-gradient(135deg, var(--nr-claude-primary) 0%, #c9654a 100%);
}

.nr-claude-page .nr-user-row:hover {
  background: color-mix(in srgb, var(--nr-claude-primary) 5%, #fff);
}

.nr-claude-page .nr-badge-info {
  background: color-mix(in srgb, var(--nr-claude-primary) 12%, #fff);
  color: var(--nr-claude-primary);
  border-color: color-mix(in srgb, var(--nr-claude-primary) 28%, #fff);
}

.nr-claude-page .nr-toggle.nr-toggle-on {
  background: var(--nr-claude-primary);
}

.nr-claude-page .nr-btn-primary {
  background: var(--nr-claude-primary);
  border-color: var(--nr-claude-primary);
}

.nr-claude-page .nr-claude-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--nr-claude-secondary);
  opacity: 0.65;
}

/* ═══════════════════════════════════════
   SETTINGS — QUERIES (Marfeel)
════════════════════════════════════════ */
.nr-q-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nr-q-chip {
  display: inline-flex;
  align-items: center;
  min-height: var(--nr-h-btn-sm);
  height: var(--nr-h-btn-sm);
  font-size: var(--nr-fs-btn-sm);
  font-weight: 500;
  padding: 0 0.85rem;
  border-radius: var(--nr-radius-pill);
  border: 1px solid var(--nr-border);
  background: #fff;
  color: var(--nr-text-subtle);
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
}

.nr-q-chip:hover {
  background: var(--nr-bg);
  color: var(--nr-text);
}

.nr-q-chip.active {
  background: var(--nr-primary);
  border-color: var(--nr-primary);
  color: #fff;
}

.nr-q-group {
  margin-bottom: 1.75rem;
  border: 1px solid var(--nr-border);
  border-radius: var(--nr-radius);
  overflow: hidden;
  background: #fff;
}

.nr-q-group-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: .65rem 1rem;
  background: var(--nr-bg);
  border-bottom: 1px solid var(--nr-border);
}

.nr-q-win-pill {
  font-size: .625rem;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 2px 8px;
  border-radius: var(--nr-radius-pill);
  border: 1px solid var(--nr-border);
}

.nr-q-group-count {
  font-size: .6875rem;
  color: var(--nr-text-subtle);
  background: #fff;
  border: 1px solid var(--nr-border);
  border-radius: var(--nr-radius-pill);
  padding: 1px 7px;
}

.nr-q-row {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--nr-border);
  transition: background .12s;
}

.nr-q-row:last-child {
  border-bottom: none;
}

.nr-q-row:hover {
  background: var(--nr-bg);
}

.nr-q-inactive {
  opacity: .48;
}

.nr-q-info {
  flex: 1;
  min-width: 0;
}

.nr-q-code {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--nr-text);
  margin-bottom: 3px;
}

.nr-q-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: .72rem;
  color: var(--nr-text-subtle);
  font-family: 'JetBrains Mono', monospace;
}

.nr-q-method {
  font-weight: 600;
  color: var(--nr-text-muted);
  background: var(--nr-bg);
  border: 1px solid var(--nr-border);
  border-radius: var(--nr-radius-pill);
  padding: 0 5px;
  font-size: .625rem;
}

/* ═══════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════ */
@media (max-width: 960px) {
  .nr-sidebar {
    transform: translateX(-100%);
    width: var(--nr-sidebar-w) !important;
  }

  .nr-shell.nr-mobile-open .nr-sidebar {
    transform: translateX(0);
  }

  .nr-shell.nr-mobile-open .nr-overlay {
    display: block;
  }

  .nr-main {
    margin-left: 0 !important;
  }

  .nr-topbar-collapse {
    display: none;
  }

  .nr-mobile-menu {
    display: flex;
  }

  .nr-shell.nr-sidebar-collapsed .nr-nav-tree {
    position: static;
    width: auto;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    box-shadow: none;
    border-right: none;
  }

  .nr-grid-2 {
    grid-template-columns: 1fr;
  }

  .nr-stats {
    grid-template-columns: 1fr 1fr;
  }

  .nr-topbar-right .nr-window-tabs {
    display: none;
  }
}

@media (max-width: 520px) {
  .nr-stats {
    grid-template-columns: 1fr;
  }

  .nr-content {
    padding: 1rem;
  }
}

/* ═══════════════════════════════════════
   EMAIL PRESENTATION — bloques premium
════════════════════════════════════════ */
.nr-ep-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.nr-ep-head-text {
  flex: 1;
  min-width: 0;
}

.nr-ep-head-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--nr-text);
  letter-spacing: -0.02em;
  margin: 0 0 0.375rem;
}

.nr-ep-head-desc {
  font-size: 0.8125rem;
  color: var(--nr-text-muted);
  line-height: 1.55;
  margin: 0;
}

.nr-ep-sample-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 0.625rem;
  padding: 0.25rem 0.625rem;
  border-radius: var(--nr-radius-pill);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(18, 54, 109, 0.06);
  color: var(--nr-primary);
  border: 1px solid rgba(18, 54, 109, 0.12);
}

.nr-ep-block-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border: 1px solid var(--nr-border);
  border-radius: var(--nr-radius-lg);
  background: var(--nr-surface);
  overflow: hidden;
  box-shadow: var(--nr-shadow);
}

.nr-ep-block-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: #fff;
  border-bottom: 1px solid var(--nr-border-light);
  transition: background 0.12s, opacity 0.18s;
}

.nr-ep-block-row:last-child {
  border-bottom: none;
}

.nr-ep-block-row:hover {
  background: #FAFBFC;
}

.nr-ep-block-row.is-off {
  opacity: 0.48;
}

.nr-ep-block-row.is-off:hover {
  opacity: 0.62;
}

.nr-ep-block-order {
  width: 22px;
  flex-shrink: 0;
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--nr-text-subtle);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.nr-ep-block-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--nr-radius-circle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9375rem;
  flex-shrink: 0;
  background: var(--nr-border-light);
  color: var(--nr-text-muted);
}

.nr-ep-block-icon.tone-primary {
  background: rgba(18, 54, 109, 0.08);
  color: var(--nr-primary);
}

.nr-ep-block-icon.tone-amber {
  background: #FFFBEB;
  color: #B45309;
}

.nr-ep-block-icon.tone-green {
  background: #F0FDF4;
  color: #059669;
}

.nr-ep-block-icon.tone-blue {
  background: #EFF6FF;
  color: #2563EB;
}

.nr-ep-block-icon.tone-red {
  background: #FEF2F2;
  color: #DC2626;
}

.nr-ep-block-icon.tone-muted {
  background: #F3F4F6;
  color: #6B7280;
}

.nr-ep-block-body {
  flex: 1;
  min-width: 0;
}

.nr-ep-block-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--nr-text);
  line-height: 1.3;
  margin: 0 0 0.125rem;
}

.nr-ep-block-desc {
  font-size: 0.6875rem;
  color: var(--nr-text-subtle);
  line-height: 1.45;
  margin: 0;
}

.nr-ep-block-actions {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-shrink: 0;
}

.nr-ep-move-btn {
  width: 28px;
  height: 28px;
  border: 1px solid var(--nr-border);
  background: #fff;
  border-radius: var(--nr-radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--nr-text-subtle);
  cursor: pointer;
  transition: border-color 0.12s, color 0.12s, background 0.12s;
  padding: 0;
}

.nr-ep-move-btn:hover {
  border-color: var(--nr-primary);
  color: var(--nr-primary);
  background: rgba(18, 54, 109, 0.04);
}

.nr-ep-move-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.nr-ep-block-row .nr-toggle {
  flex-shrink: 0;
}

.nr-ep-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.625rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

/* ─── Seguimiento de metas — configuración editorial ─── */
.nr-gtr-config-layout {
  min-height: 0;
  flex: 1;
}

.nr-gtr-config-intro {
  font-size: 0.8125rem;
  color: var(--nr-text-muted);
  margin: 0 0 1.25rem !important;
  line-height: 1.6;
}

.nr-gtr-config-filter {
  margin-bottom: 0.75rem;
}

.nr-gtr-config-active-only {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  color: var(--nr-text-muted);
  cursor: pointer;
  user-select: none;
}

.nr-gtr-config-active-only input {
  width: 1rem;
  height: 1rem;
  margin: 0;
  cursor: pointer;
}

.nr-gtr-config-domain-stack {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.nr-gtr-config-domain-stack--readonly {
  min-height: 2.25rem;
}

.nr-gtr-config-goals-btn--set {
  color: var(--nr-primary);
}

.nr-gtr-config-goals-btn--set:hover {
  color: var(--nr-primary);
  background: rgba(18, 54, 109, 0.08);
}

.nr-gtr-config-meta {
  font-size: 0.75rem !important;
  color: var(--nr-text-subtle);
  margin: 0 0 1rem !important;
}

.nr-gtr-config-card {
  margin-bottom: 1rem;
}

.nr-gtr-config-table th,
.nr-gtr-config-table td {
  padding: 16px;
  height: auto;
}

.nr-gtr-config-table th {
  background: var(--nr-surface);
  color: var(--nr-text);
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: none;
  letter-spacing: normal;
  border-bottom: 1px solid var(--nr-border);
}

.nr-gtr-config-table th.nr-gtr-config-col-domain,
.nr-gtr-config-table .nr-gtr-config-toggle-cell {
  width: 7.5rem;
  text-align: center;
}

.nr-gtr-config-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  padding: 12px 16px;
  border-top: 1px solid var(--nr-border-light);
  background: var(--nr-surface);
}

.nr-gtr-config-pager-size {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--nr-text-muted);
}

.nr-gtr-config-pager-size select {
  width: auto;
  min-width: 4.5rem;
  height: var(--nr-h-btn-sm);
  padding: 0 0.5rem;
  font-size: 0.8125rem;
}

.nr-gtr-config-pager-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nr-gtr-config-pager-info {
  font-size: 0.8125rem;
  color: var(--nr-text-muted);
  min-width: 7rem;
  text-align: center;
}

.nr-gtr-config-author {
  font-weight: 600;
  color: var(--nr-text);
  font-size: 0.875rem;
}

.nr-gtr-config-id {
  font-size: 0.6875rem;
  color: var(--nr-text-subtle);
  margin-top: 2px;
}

.nr-gtr-config-na {
  color: var(--nr-text-subtle);
  font-size: 0.8125rem;
}

.nr-gtr-config-table tbody tr:hover {
  background: rgba(18, 54, 109, 0.03);
}

/* ─── Centro de ayuda ─── */
.nr-chat-inner.nr-help-article {
  display: block;
  max-width: 720px;
  /* Sin gap de .nr-chat-inner (32px entre burbujas); el espaciado lo dan .nr-help-* */
}

.nr-help-article a,
.nr-help-hub a {
  cursor: pointer;
}

.nr-help-article-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--nr-text);
  margin: 0 0 1.25rem;
  line-height: 1.35;
}

.nr-help-p {
  font-size: 0.8125rem;
  color: var(--nr-text-muted);
  line-height: 1.65;
  margin: 0 0 0.75rem;
}

.nr-help-h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 1.25rem 0 0.5rem;
  color: var(--nr-text);
}

.nr-help-h4 {
  font-size: 0.8125rem;
  font-weight: 600;
  margin: 1rem 0 0.375rem;
}

.nr-help-ul,
.nr-help-ol {
  font-size: 0.8125rem;
  color: var(--nr-text-muted);
  line-height: 1.6;
  margin: 0 0 0.875rem;
  padding-left: 1.25rem;
}

.nr-help-ol {
  list-style: decimal;
}

.nr-help-callout {
  font-size: 0.8125rem;
  line-height: 1.55;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--nr-radius-sm);
  padding: 0.75rem 0.875rem;
  margin: 0 0 0.875rem;
}

.nr-help-pre {
  font-size: 0.6875rem;
  line-height: 1.55;
  background: #1e293b;
  color: #e2e8f0;
  border-radius: var(--nr-radius-sm);
  padding: 1rem 1.125rem;
  overflow-x: auto;
  margin: 0 0 0.875rem;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Log automatización — Operaciones */
.nr-automation-log {
  font-size: 0.6875rem;
  line-height: 1.5;
  font-family: ui-monospace, monospace;
  background: #0f172a;
  color: #cbd5e1;
  border-radius: var(--nr-radius-sm);
  padding: 0.875rem 1rem;
  max-height: 280px;
  overflow: auto;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ═══ Mis estadísticas (goal tracking personal) ═══ */
.nr-mystats-page .nr-mystats {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.nr-mystats-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  padding: 1.5rem 1.75rem;
  border-radius: var(--nr-radius);
  background: linear-gradient(135deg, #0d2852 0%, var(--nr-primary) 55%, #1e5aa8 100%);
  color: #fff;
  box-shadow: 0 12px 40px rgba(18, 54, 109, 0.22);
}

.nr-mystats-hero__title {
  margin: 0.25rem 0 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}

.nr-mystats-hero__sub {
  margin: 0;
  font-size: 0.8125rem;
  opacity: 0.88;
  max-width: 36rem;
}

.nr-mystats-hero .nr-window-eyebrow {
  color: rgba(255, 255, 255, 0.72);
}

.nr-mystats-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: var(--nr-radius-sm);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
}

.nr-mystats-filter {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 8rem;
}

.nr-mystats-filter .nr-field-label {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.625rem;
}

.nr-mystats-filter .nr-input {
  background: #fff;
  border-color: transparent;
  min-height: 2.25rem;
}

.nr-mystats-apply {
  align-self: flex-end;
}

.nr-mystats-section-head {
  margin-bottom: 1rem;
}

.nr-mystats-section-title {
  margin: 0 0 0.25rem;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--nr-text);
}

.nr-mystats-section-desc {
  margin: 0;
  font-size: 0.75rem;
  color: var(--nr-text-muted);
}

.nr-mystats-notice {
  padding: 0.75rem 1rem;
  border-radius: var(--nr-radius-sm);
  background: #fff8eb;
  border: 1px solid #fcd34d;
  color: #92400e;
  font-size: 0.8125rem;
}

.nr-mystats-donuts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.nr-mystats-donut-card {
  position: relative;
  padding: 1.25rem 1.25rem 1rem;
  border-radius: var(--nr-radius);
  border: 1px solid var(--nr-border);
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.nr-mystats-donut-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--ms-accent, var(--nr-primary));
}

.nr-mystats-donut-card__head {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  margin-bottom: 0.75rem;
}

.nr-mystats-donut-card__label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--nr-text);
}

.nr-mystats-donut-card__goal {
  font-size: 0.9875rem;
  color: #059669;
}

.nr-mystats-donut-card__goal--muted {
  font-style: italic;
}

/* ── Tabla de vendedores (vista admin publicidad) ── */
.nr-adv-vendors-table th,
.nr-adv-vendors-table td {
  vertical-align: middle;
}
.nr-adv-pct {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
}
.nr-adv-pct--ok   { background: #dcfce7; color: #15803d; }
.nr-adv-pct--warn { background: #fef9c3; color: #a16207; }
.nr-adv-pct--low  { background: #fee2e2; color: #b91c1c; }
.nr-text-center   { text-align: center !important; }
.nr-text-right    { text-align: right  !important; }

.nr-mystats-donut-wrap {
  position: relative;
  width: 100%;
  max-width: 11rem;
  margin: 0 auto 0.75rem;
  aspect-ratio: 1;
}

.nr-mystats-donut-wrap canvas {
  width: 100% !important;
  height: 100% !important;
}

.nr-mystats-donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  text-align: center;
  padding: 0.5rem;
}

.nr-mystats-donut-pct {
  font-size: 1.375rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--ms-accent, var(--nr-primary));
}

.nr-mystats-donut-val {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--nr-text);
  margin-top: 0.125rem;
}

.nr-mystats-donut-remain {
  font-size: 0.625rem;
  color: var(--nr-text-muted);
  margin-top: 0.25rem;
}

.nr-mystats-donut-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.75rem;
  border-top: 1px solid var(--nr-border);
  font-size: 0.6875rem;
  color: var(--nr-text-muted);
}

.nr-mystats-donut-foot strong {
  font-size: 0.875rem;
  color: var(--nr-text);
}

.nr-mystats-week-card {
  padding: 0;
  overflow: hidden;
}

.nr-mystats-week-grid {
  display: grid;
  grid-template-columns: 5.5rem repeat(3, minmax(0, 1fr));
  gap: 0.75rem 1rem;
  align-items: center;
  padding: 0.75rem 1.25rem;
}

.nr-mystats-week-grid--head {
  background: #f1f5f9;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--nr-text-muted);
  border-bottom: 1px solid var(--nr-border);
}

.nr-mystats-week-row {
  border-bottom: 1px solid var(--nr-border);
}

.nr-mystats-week-row:last-child {
  border-bottom: none;
}

.nr-mystats-week-row--selected {
  background: linear-gradient(90deg, var(--ms-accent-soft, rgba(18, 54, 109, 0.08)) 0%, transparent 100%);
  box-shadow: inset 3px 0 0 var(--nr-primary);
}

.nr-mystats-week-row--today .nr-mystats-week-weekday::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 4px;
  border-radius: 50%;
  background: #22c55e;
  vertical-align: middle;
}

.nr-mystats-week-day {
  display: flex;
  flex-direction: column;
  gap: 0.0625rem;
}

.nr-mystats-week-weekday {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--nr-text);
}

.nr-mystats-week-date {
  font-size: 0.6875rem;
  color: var(--nr-text-muted);
}

.nr-mystats-week-metric-top {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  margin-bottom: 0.375rem;
}

.nr-mystats-week-val {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--nr-text);
}

.nr-mystats-week-goal {
  font-size: 0.6875rem;
  color: var(--nr-text-muted);
}

.nr-mystats-week-remain {
  font-size: 0.625rem;
  color: var(--nr-text-muted);
  margin-top: 0.25rem;
  display: block;
}

.nr-mystats-week-remain--muted {
  font-style: italic;
}

.nr-mystats-progress {
  --ms-pct: 0%;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: transparent;
}

.nr-mystats-progress--lg {
  height: 12px;
  flex: 1;
  min-width: 0;
}

.nr-mystats-progress__done {
  flex: 0 0 auto;
  width: var(--ms-pct, 0%);
  max-width: 100%;
  height: 100%;
  background: var(--ms-accent, var(--nr-primary));
  transition: width 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}

.nr-mystats-progress__done--has-value {
  min-width: 5px;
}

.nr-mystats-progress__rest {
  flex: 1 1 auto;
  height: 100%;
  min-width: 0;
  background: var(--ms-accent-soft, #e8edf5);
  transition: flex 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}

.nr-mystats-month-card {
  margin-bottom: 1rem;
}

.nr-mystats-month-table th {
  font-size: 0.6875rem;
}

.nr-mystats-metric-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.5rem;
  vertical-align: middle;
}

.nr-mystats-month-progress-cell {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-width: 10rem;
}

.nr-mystats-month-pct {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--nr-text);
  white-space: nowrap;
}

.nr-text-muted {
  color: var(--nr-text-muted);
}

.nr-mystats-goal-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.nr-mystats-goal-card {
  padding: 1.125rem 1.25rem;
  border-radius: var(--nr-radius);
  border: 1px solid var(--nr-border);
  background: var(--ms-accent-soft, #f8fafc);
  border-top: 3px solid var(--ms-accent, var(--nr-primary));
}

.nr-mystats-goal-card__title {
  margin: 0 0 0.875rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--nr-text);
}

.nr-mystats-goal-card__list {
  margin: 0;
}

.nr-mystats-goal-card__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.5rem 0;
  border-bottom: 1px dashed rgba(15, 23, 42, 0.08);
}

.nr-mystats-goal-card__row:last-child {
  border-bottom: none;
}

.nr-mystats-goal-card__row dt {
  font-size: 0.6875rem;
  color: var(--nr-text-muted);
  font-weight: 500;
}

.nr-mystats-goal-card__row dd {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ms-accent, var(--nr-primary));
}

@media (max-width: 960px) {
  .nr-mystats-donuts {
    grid-template-columns: 1fr;
  }

  .nr-mystats-goal-cards {
    grid-template-columns: 1fr;
  }

  .nr-mystats-week-grid {
    grid-template-columns: 4.5rem repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    padding: 0.625rem 0.75rem;
  }
}

@media (max-width: 640px) {

  .nr-mystats-week-grid,
  .nr-mystats-week-grid--head {
    grid-template-columns: 1fr;
  }

  .nr-mystats-week-grid--head {
    display: none;
  }

  .nr-mystats-week-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: var(--nr-radius-sm);
    margin: 0.5rem;
    border: 1px solid var(--nr-border);
  }

  .nr-mystats-week-metric {
    padding-top: 0.375rem;
    border-top: 1px solid var(--nr-border);
  }
}

/* SPA page loading (nr-app.js) */
.nr-page-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  padding: 2rem;
}

.nr-page-loading-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.nr-page-loading-text {
  font-size: 0.8125rem;
  color: var(--nr-text-subtle);
  margin: 0;
}

/* Topbar placed inside chat layout on desktop */
@media (min-width: 961px) {
  .nr-topbar-in-chat .nr-content-flush {
    height: 100vh;
  }
}

/* Rediseño de Layout Flotante (Desktop) */
@media (min-width: 961px) {
  :root {
    --nr-nav-rail-w: 64px !important;
    --nr-sidebar-collapsed-w: 64px !important;
    --nr-radius-md: 12px !important;
  }

  body.nr-app {
    background-color: #EBEBEB !important;
  }

  .nr-shell {
    background-color: #EBEBEB;
  }

  /* Ocultar elementos clásicos en desktop */
  .nr-sidebar-header,
  .nr-sidebar-footer {
    display: none !important;
  }

  /* Sidebar flotante / transparente */
  .nr-sidebar {
    background: transparent !important;
    border-right: none !important;
    box-shadow: none !important;
  }

  /* Estructura del nav split */
  .nr-nav-split {
    height: 100vh;
    background: transparent !important;
  }

  /* Rail de iconos */
  .nr-nav-rail {
    height: 100% !important;
    background: transparent !important;
    border-right: none !important;
    padding: 16px 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0 !important;
  }

  .nr-rail-logo {
    width: 44px !important;
    height: 44px !important;
    background: var(--nr-primary);
    color: #fff;
    border-radius: var(--nr-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 20px !important;
    box-shadow: 0 4px 10px rgba(18, 54, 109, 0.2);
  }

  .nr-rail-middle-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    margin-bottom: auto !important;
  }

  /* Estilos para los botones de navegación en el rail */
  .nr-nav-rail-btn {
    width: 44px !important;
    height: 44px !important;
    border: none !important;
    background: transparent !important;
    border-radius: var(--nr-radius-md) !important;
    color: var(--nr-text-muted) !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: color .2s, background-color .2s !important;
  }

  .nr-nav-rail-btn:hover {
    background-color: rgba(0, 0, 0, 0.05) !important;
    color: var(--nr-text) !important;
  }

  .nr-nav-rail-btn.active,
  .nr-rail-settings.active {
    background-color: #ffffff !important;
    color: var(--nr-primary) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05) !important;
  }

  .nr-rail-settings {
    color: var(--nr-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px !important;
    height: 44px !important;
    border-radius: var(--nr-radius-md) !important;
    transition: color 0.2s, background-color 0.2s;
    margin-top: auto;
  }

  .nr-rail-settings:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--nr-text);
  }

  /* Submenú lateral (Nav Tree) como tarjeta flotante blanca */
  .nr-shell:not(.nr-sidebar-collapsed) .nr-nav-tree {
    height: calc(100vh - 16px) !important;
    margin: 8px 0 !important;
    background: #ffffff !important;
    border: 1px solid var(--nr-border) !important;
    border-radius: 16px 0 0 16px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04) !important;
    overflow-y: auto !important;
  }

  /* Área principal (Contenido) como tarjeta flotante blanca */
  .nr-main {
    height: calc(100vh - 16px) !important;
    background: #ffffff !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04) !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    transition: margin 0.22s ease, border-radius 0.22s ease !important;
  }

  /* El scroll está en nr-content, no en nr-main:
     el topbar queda fijo en la parte superior de la tarjeta */
  .nr-content {
    flex: 1 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    min-height: 0 !important;
  }

  .nr-shell:not(.nr-sidebar-collapsed) .nr-main {
    margin: 8px 8px 8px var(--nr-sidebar-w) !important;
    border-radius: 0 16px 16px 0 !important;
    border-top: 1px solid var(--nr-border) !important;
    border-right: 1px solid var(--nr-border) !important;
    border-bottom: 1px solid var(--nr-border) !important;
    border-left: none !important;
  }

  .nr-shell.nr-sidebar-collapsed .nr-main {
    margin: 8px 8px 8px var(--nr-sidebar-collapsed-w) !important;
    border-radius: 16px !important;
    border: 1px solid var(--nr-border) !important;
  }

  /* Nombre de usuario en el topbar — badge informativo */
  .nr-topbar-username-display {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--nr-text-muted);
    background: var(--nr-border-light, #f0f2f5);
    border: 1px solid var(--nr-border);
    border-radius: 99px;
    padding: 3px 10px 3px 8px;
    white-space: nowrap;
    letter-spacing: 0.01em;
  }

  /* Topbar hereda el borde redondeado de la tarjeta flotante */
  .nr-topbar {
    border-radius: 0 16px 0 0 !important;
    flex-shrink: 0 !important;
    min-height: var(--nr-topbar-h) !important;
    height: var(--nr-topbar-h) !important;
  }

  .nr-shell.nr-sidebar-collapsed .nr-topbar {
    border-radius: 16px 16px 0 0 !important;
  }

  /* Ajuste de altura para que el contenido no desborde la tarjeta principal */
  .nr-content-flush {
    height: calc(100vh - var(--nr-topbar-h) - 16px) !important;
  }
}

@media (max-width: 960px) {
  /* En mobile no se muestran los elementos del rail de desktop */
  .nr-rail-logo,
  .nr-rail-settings {
    display: none !important;
  }
  .nr-topbar-username-display {
    display: none !important;
  }
}

/* ═══════════════════════════════════════
   MODO CUENTA (nr-account-mode)
   Oculta el nav-tree en desktop y muestra botón volver
════════════════════════════════════════ */

/* Botón Volver en topbar */
.nr-topbar-back,
.nr-topbar-back * {
  cursor: pointer !important;
  pointer-events: auto !important;
}

.nr-topbar-back {
  display: none;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--nr-text-muted);
  background: none;
  border: none;
  position: relative !important;
  z-index: 100 !important;
  padding: 4px 8px;
  border-radius: var(--nr-radius-sm);
  transition: color .15s, background .15s;
  white-space: nowrap;
  flex-shrink: 0;
}

.nr-topbar-back:hover {
  background: var(--nr-border-light, #f0f2f5);
  color: var(--nr-text) !important;
}

@media (min-width: 961px) {
  /* En modo cuenta: ocultar nav-tree y colapsar hacia el rail */
  .nr-shell.nr-account-mode .nr-nav-tree {
    display: none !important;
  }

  /* El sidebar debe reducirse a 64px para no solapar el botón volver */
  .nr-shell.nr-account-mode .nr-sidebar {
    width: var(--nr-nav-rail-w, 64px) !important;
  }

  /* En modo cuenta: el área principal ocupa desde el rail (64px) sin el sub-menú */
  .nr-shell.nr-account-mode:not(.nr-sidebar-collapsed) .nr-main {
    margin-left: var(--nr-nav-rail-w, 64px) !important;
    border-radius: 16px !important;
    border: 1px solid var(--nr-border) !important;
  }

  /* En modo cuenta: topbar adopta esquinas redondeadas */
  .nr-shell.nr-account-mode .nr-topbar {
    border-radius: 16px 16px 0 0 !important;
  }

  /* En modo cuenta: mostrar botón volver, ocultar collapse */
  .nr-shell.nr-account-mode .nr-topbar-collapse {
    display: none !important;
  }

  .nr-shell.nr-account-mode .nr-topbar-back {
    display: inline-flex !important;
  }
}

/* Global split panel triggers show cursor pointer */
[data-panel-url] {
  cursor: pointer;
}
