/* Estilos base. Los colores de la marca se definen en /marca/estilo.css (--nr-primary y
   --nr-on-primary, el texto sobre el color principal; T05.7). */
:root { --nr-primary: #1f4e79; --nr-on-primary: #ffffff; --nr-bg: #f5f7fa; --nr-text: #1d2733; --nr-muted: #6b7785; }
* { box-sizing: border-box; }
body { margin: 0; font-family: "Segoe UI", Arial, sans-serif; color: var(--nr-text); background: var(--nr-bg); }
.nr-app { display: flex; min-height: 100vh; }
.nr-sidebar { width: 230px; background: var(--nr-primary); color: var(--nr-on-primary); display: flex; flex-direction: column; padding: 16px; }
.nr-brand { display: flex; align-items: center; gap: 10px; color: var(--nr-on-primary); text-decoration: none; font-weight: 600; margin-bottom: 24px; }
.nr-logo { width: 32px; height: 32px; }
.nr-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.nr-nav a { color: var(--nr-on-primary); text-decoration: none; padding: 8px 10px; border-radius: 6px; opacity: .85; }
.nr-nav a:hover, .nr-nav a.active { background: rgba(255, 255, 255, .15); opacity: 1; }
.nr-user { display: flex; justify-content: space-between; align-items: center; font-size: .9em; }
.nr-link { background: none; border: 0; color: var(--nr-on-primary); cursor: pointer; text-decoration: underline; padding: 0; }
.nr-main { flex: 1; padding: 24px 32px; }
.nr-message { padding: 10px 14px; border-radius: 6px; margin-bottom: 12px; background: #e8eef5; }
.nr-error { background: #fdecea; color: #8a1c12; }
.nr-login { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.nr-card { background: #fff; padding: 32px; border-radius: 10px; box-shadow: 0 2px 12px rgba(0, 0, 0, .08); width: 340px; display: flex; flex-direction: column; gap: 8px; }
.nr-card h1 { margin: 0 0 12px; font-size: 1.3em; text-align: center; }
.nr-logo-large { width: 64px; height: 64px; align-self: center; }
.nr-card input { padding: 9px 10px; border: 1px solid #c9d1db; border-radius: 6px; font-size: 1em; }
.nr-card button { margin-top: 12px; padding: 10px; background: var(--nr-primary); color: var(--nr-on-primary); border: 0; border-radius: 6px; font-size: 1em; cursor: pointer; }
.nr-nav-section { margin: 14px 10px 2px; font-size: .75em; text-transform: uppercase; letter-spacing: .05em; opacity: .7; }
.nr-account-link { color: var(--nr-on-primary); text-decoration: none; }
.nr-account-link:hover { text-decoration: underline; }

/* Páginas de administración y de la cuenta (T05.2) */
.nr-page-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.nr-button { display: inline-block; padding: 8px 14px; background: var(--nr-primary); color: var(--nr-on-primary); border: 0; border-radius: 6px; font-size: 1em; cursor: pointer; text-decoration: none; }
.nr-button.nr-danger { background: #b3261e; }
.nr-danger-link { color: #b3261e; }
.nr-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 6px rgba(0, 0, 0, .06); }
.nr-table th, .nr-table td { padding: 9px 12px; text-align: left; border-bottom: 1px solid #e3e8ee; vertical-align: top; }
.nr-table th { background: #eef2f6; font-weight: 600; }
.nr-actions a { margin-right: 10px; white-space: nowrap; }
.nr-form { background: #fff; padding: 20px 24px; border-radius: 8px; box-shadow: 0 1px 6px rgba(0, 0, 0, .06); max-width: 640px; }
.nr-field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.nr-field > label, .nr-label { font-weight: 600; }
.nr-field input[type=text], .nr-field input[type=email], .nr-field input[type=password], .nr-field select { padding: 8px 10px; border: 1px solid #c9d1db; border-radius: 6px; font-size: 1em; max-width: 420px; }
.nr-check { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.nr-choices { border: 1px solid #c9d1db; border-radius: 6px; padding: 8px 12px; max-height: 260px; overflow-y: auto; }
.nr-choices legend { font-weight: 600; padding: 0 4px; }
.nr-choices label { display: flex; align-items: center; gap: 8px; padding: 2px 0; }
.nr-help { color: var(--nr-muted); font-size: .9em; }
.nr-help p, .nr-help ul { margin: 4px 0; }
.nr-has-error input, .nr-has-error select, .nr-has-error .nr-choices { border-color: #b3261e; }
.errorlist { margin: 2px 0 0; padding-left: 18px; color: #8a1c12; }
.nr-form-actions { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.nr-details { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; }
.nr-details dt { font-weight: 600; }
.nr-details dd { margin: 0; }
.nr-search { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.nr-search input { padding: 7px 10px; border: 1px solid #c9d1db; border-radius: 6px; font-size: 1em; width: 280px; max-width: 100%; }

/* Fuentes de datos (T05.6) */
.nr-field input[type=number], .nr-field textarea { padding: 8px 10px; border: 1px solid #c9d1db; border-radius: 6px; font-size: 1em; max-width: 420px; font-family: inherit; }
.nr-success { background: #e7f4ea; color: #1e5b2c; }
.nr-inline-form { display: inline; margin-right: 10px; }
.nr-link-button { background: none; border: 0; padding: 0; color: var(--nr-primary); text-decoration: underline; cursor: pointer; font: inherit; }

/* Árbol de reportes (T05.4) */
.nr-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.nr-breadcrumb { font-size: .9em; color: var(--nr-muted); margin-bottom: 4px; }
.nr-breadcrumb a { color: var(--nr-primary); }
.nr-icon { width: 16px; height: 16px; vertical-align: -3px; }
.nr-icon-large { width: 24px; height: 24px; vertical-align: -4px; }
.nr-tree { list-style: none; margin: 0; padding-left: 20px; }
.nr-tree-root { background: #fff; border-radius: 8px; box-shadow: 0 1px 6px rgba(0, 0, 0, .06); padding: 10px 14px; }
.nr-node { position: relative; padding: 3px 0; }
.nr-node > details > summary, .nr-node-row { padding-right: 110px; }
.nr-node > details > summary { cursor: pointer; }
.nr-node-report .nr-node-row { padding-left: 16px; }
.nr-tree-note { color: var(--nr-muted); font-style: italic; padding: 3px 0; }
.nr-menu { position: absolute; top: 3px; right: 0; font-size: .9em; }
.nr-page-header .nr-menu, .nr-toolbar .nr-menu { position: relative; top: 0; }
.nr-menu > summary { cursor: pointer; color: var(--nr-primary); list-style: none; }
.nr-menu > summary::-webkit-details-marker { display: none; }
.nr-menu > summary::after { content: " \25BE"; }
.nr-menu-items { position: absolute; right: 0; z-index: 10; background: #fff; border: 1px solid #c9d1db; border-radius: 6px; box-shadow: 0 2px 12px rgba(0, 0, 0, .12); padding: 6px 0; min-width: 190px; display: flex; flex-direction: column; }
.nr-menu-items > a, .nr-menu-items > form { padding: 4px 12px; white-space: nowrap; }
.nr-menu-items > a:hover, .nr-menu-items > form:hover { background: #eef2f6; }
.nr-clipboard { display: flex; align-items: center; gap: 12px; }
.nr-code { background: #f3f5f8; border: 1px solid #e3e8ee; border-radius: 6px; padding: 8px 10px; white-space: pre-wrap; word-break: break-word; font-size: .85em; max-height: 360px; overflow: auto; margin: 4px 0; }
.nr-details code { word-break: break-all; font-size: .85em; }

/* Cambios entre versiones (T08.3) */
.nr-changes { margin: 0 0 4px; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: .9em; }
.nr-changes-fields { margin: 0; padding-left: 16px; font-size: .9em; }
.nr-changes-fields li { word-break: break-word; }
.nr-diff span { display: block; }
.nr-diff-add { background: #e6f4ea; color: #145c2e; unicode-bidi: isolate; }
.nr-diff-del { background: #fdecea; color: #8a1c12; unicode-bidi: isolate; }
.nr-changes-fields code { unicode-bidi: isolate; }
.nr-diff-sep { color: var(--nr-muted); }

/* Configuración y auditoría (T05.7) */
.nr-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 16px; border-bottom: 1px solid #c9d1db; }
.nr-tabs a { padding: 8px 12px; text-decoration: none; color: var(--nr-primary); border-radius: 6px 6px 0 0; }
.nr-tabs a.active { background: #fff; border: 1px solid #c9d1db; border-bottom-color: #fff; margin-bottom: -1px; font-weight: 600; }
.nr-warning { background: #fff4d6; color: #6b4e00; }
.nr-badge { display: inline-block; padding: 1px 8px; border-radius: 10px; background: #fff4d6; color: #6b4e00; font-size: .8em; font-weight: 600; }
.nr-source { color: var(--nr-muted); font-size: .85em; }
.nr-section { margin-top: 24px; }
.nr-logo-preview { max-width: 160px; max-height: 80px; background: var(--nr-primary); padding: 8px; border-radius: 6px; }
.nr-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin: 0 0 14px; background: #fff; padding: 12px 14px; border-radius: 8px; box-shadow: 0 1px 6px rgba(0, 0, 0, .06); }
.nr-filters .nr-field { margin-bottom: 0; }
.nr-filters input, .nr-filters select { padding: 7px 10px; border: 1px solid #c9d1db; border-radius: 6px; font-size: 1em; }
.nr-detail-list { margin: 4px 0 0; display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; font-size: .85em; }
.nr-detail-list dt { font-weight: 600; }
.nr-detail-list dd { margin: 0; word-break: break-word; white-space: pre-wrap; }
.nr-pagination { display: flex; align-items: center; gap: 14px; margin: 12px 0; }
.nr-nowrap { white-space: nowrap; }

/* Pantalla «Ejecutar» (T06.1) */
.nr-params { border: 1px solid #c9d1db; border-radius: 8px; padding: 12px 16px; margin: 0 0 16px; background: #fff; }
.nr-params legend { font-weight: 600; padding: 0 6px; }
.nr-mail { border: 1px solid #c9d1db; border-radius: 8px; padding: 12px 16px; margin: 0 0 16px; background: #fff; }
.nr-mail legend { font-weight: 600; padding: 0 6px; }
.nr-mail-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; font-family: inherit; }
.nr-required { color: #b3261e; font-style: normal; }
.nr-field input[type=date], .nr-field input[type=search] { padding: 8px 10px; border: 1px solid #c9d1db; border-radius: 6px; font-size: 1em; max-width: 420px; font-family: inherit; }
.nr-multi { display: flex; flex-direction: column; gap: 6px; max-width: 420px; }
.nr-multi-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.nr-multi-tools input[type=search] { flex: 1 1 180px; }
.nr-multi select[multiple] { min-height: 12em; }

/* Avisos de fin de ejecución (T06.3, D59) */
.nr-badge { display: inline-block; min-width: 1.4em; padding: 0 6px; border-radius: 999px; background: #c0392b; color: #fff; font-size: .8em; text-align: center; }
.nr-notices { list-style: none; padding: 0; }
.nr-notices li { padding: 8px 0; border-bottom: 1px solid #e0e0e0; }
.nr-notices li.nr-unread a { font-weight: 600; }
.nr-muted { color: #666; font-size: .9em; margin-left: 8px; }

/* Monitor de ejecuciones (T06.4) */
.nr-table tr.nr-mine td { background: #f1f7ff; }
.nr-tag { display: inline-block; padding: 0 6px; border-radius: 4px; background: #e3e8ee; color: var(--nr-text); font-size: .8em; }
.nr-tag.nr-tag-new { background: #e1f3e6; color: #1e5b2e; font-weight: 600; }
.nr-limit-mark { margin-top: 4px; padding: 2px 6px; border-radius: 4px; background: #fff4d6; color: #6b4e00; font-size: .85em; }
.nr-row-actions form { display: inline-block; margin: 0 6px 6px 0; }
