/* Cuaderno compacto con notas por párrafo (maqueta aprobada, 15 nov 2026). */
.nbx-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; margin-top: 18px; border: 1px solid #dfe6e2; border-bottom: 0; border-radius: 12px 12px 0 0; padding: 10px 14px; background: #f4f7f5; font-family: Manrope, Arial, sans-serif; }
.nbx-all { display: flex; align-items: center; gap: 10px; color: #25433a; font-size: 13px; font-weight: 600; cursor: pointer; }
.nbx-all input { width: 16px; height: 16px; margin: 0; accent-color: #245d49; }
.nbx-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.nbx-summary { color: #56665f; font: 400 11px "DM Mono", Manrope, monospace; }
.nbx-study { border: 1px solid #245d49; border-radius: 8px; padding: 6px 11px; background: #245d49; color: #fff; font: 600 12px Manrope, Arial, sans-serif; cursor: pointer; }
.nbx-study:disabled { border-color: #cbd6d1; background: #fff; color: #6c7d74; cursor: default; }
.notebook-general-study > [data-study-selection] { display: none; }

.nbx-list { overflow: hidden; border: 1px solid #dfe6e2; border-radius: 0 0 12px 12px; background: #fff; }
.nbx-list > .notebook-consultation { margin: 0; border: 0; border-bottom: 1px solid #eef2ef; border-radius: 0; }
.nbx-list > .notebook-consultation:last-child { border-bottom: 0; }

.notebook-consultation.nbx-entry > summary.nbx-row { position: static; display: flex; align-items: center; gap: 12px; padding: 9px 14px; list-style: none; cursor: pointer; }
.notebook-consultation.nbx-entry > summary.nbx-row::-webkit-details-marker { display: none; }
.notebook-consultation.nbx-entry > summary.nbx-row:hover { background: #fafcfb; }
.nbx-row .notebook-study-select { position: static; flex: none; width: 16px; height: 16px; margin: 0; accent-color: #245d49; }
.nbx-row .nbx-title { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.notebook-consultation .nbx-row .nbx-title strong { color: #17231f; font-size: 14px; font-weight: 700; }
.notebook-consultation .nbx-row .nbx-title small { color: #6c7d74; font-size: 12px; }
.notebook-consultation .nbx-row .nbx-count { flex: none; border-radius: 999px; padding: 2px 8px; background: #f8efd4; color: #8a6410; font-size: 11px; font-weight: 600; }
.nbx-row .nbx-count[hidden] { display: none; }
.nbx-row .nbx-del { flex: none; justify-self: auto; opacity: 0; border: 0; padding: 2px 4px; background: none; color: #9a3b2a; font-size: 12px; font-weight: 600; }
.nbx-row:hover .nbx-del, .nbx-row .nbx-del:focus-visible { opacity: 1; }
.nbx-chev { flex: none; color: #6c7d74; transition: transform .12s; }
.nbx-entry[open] > summary .nbx-chev { transform: rotate(90deg); }

.notebook-consultation-body.nbx-body { max-width: 760px; padding: 22px 56px 18px 66px; border-top: 1px solid #eef2ef; color: #22302b; font-size: 14.5px; line-height: 1.7; }
.nbx-body .document-page-copy { color: #22302b; font: 400 14.5px/1.7 Manrope, Arial, sans-serif; }
/* 19 nov 2026: los saltos de línea del documento se conservan, como en el lector de Documentos (antes el texto salía en un solo bloque). */
.nbx-body .document-page-copy p { margin: 0 0 10px; white-space: pre-line; }
.nbx-page + .nbx-page { margin-top: 4px; padding-top: 14px; border-top: 1px dashed #e3e9e5; }
.nbx-para { position: relative; }
/* 19 nov 2026: el «+» va al pie del párrafo, junto a donde se abre el campo para escribir la nota. */
.nbx-add { position: absolute; left: -34px; bottom: 3px; width: 24px; height: 22px; opacity: 0; border: 1px solid #d9c38f; border-radius: 6px; padding: 0; background: #fffaf0; color: #8a6410; font: 700 13px/1 Manrope, Arial, sans-serif; cursor: pointer; }
.nbx-para:hover > .nbx-add, .nbx-add:focus-visible { opacity: 1; }
.nbf-acts.nbf-confirm { align-items: center; gap: 6px; flex-wrap: wrap; }
.nbf-confirm-text { color: #9b2c2c; font: 600 11px Manrope, sans-serif; }
.nbf-confirm input { width: 90px; border: 1px solid #c97b7b; border-radius: 6px; padding: 3px 6px; font: 700 11px Manrope, sans-serif; text-transform: uppercase; }
.nbf-acts .nbf-confirm-ok { background: #b42318; color: #fff; }
.nbf-acts .nbf-confirm-ok:hover { background: #912018; color: #fff; }
.nbf-acts .nbf-confirm-ok:disabled { background: #e7c3c0; color: #fff; cursor: not-allowed; }
@media (hover: none) { .nbx-add { opacity: .55; } }
.nbx-mark { position: absolute; left: -14px; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: #bd8e53; }
.nbx-note { margin: -4px 0 12px; border-left: 2px solid #d9c38f; padding: 2px 0 2px 12px; color: #5b4a1c; font-size: 13.5px; font-style: italic; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.nbx-note-del { margin-left: 8px; opacity: 0; border: 0; padding: 0 4px; background: none; color: #8a6410; font: 600 11px Manrope, Arial, sans-serif; font-style: normal; cursor: pointer; }
.nbx-note:hover .nbx-note-del, .nbx-note-del:focus-visible { opacity: 1; }
.nbx-editor { display: flex; flex-direction: column; gap: 6px; margin: -4px 0 14px; border-left: 2px solid #d9c38f; padding-left: 12px; }
.nbx-editor textarea { border: 1px solid #e2cf9a; border-radius: 8px; padding: 8px 10px; background: #fffdf7; color: #5b4a1c; font: italic 13.5px/1.6 Manrope, Arial, sans-serif; resize: vertical; }
.nbx-editor span { display: flex; gap: 8px; }
.nbx-save { border: 1px solid #8a6410; border-radius: 7px; padding: 5px 11px; background: #8a6410; color: #fff; font: 600 12px Manrope, Arial, sans-serif; cursor: pointer; }
.nbx-save:disabled { opacity: .6; cursor: default; }
.nbx-cancel { border: 0; padding: 5px 6px; background: none; color: #6c7d74; font: 600 12px Manrope, Arial, sans-serif; cursor: pointer; }
.nbx-plink { margin-left: 6px; border: 1px solid #cfe0d7; border-radius: 999px; padding: 1px 7px; background: #f2f8f5; color: #1c6a57; font: 500 11px "DM Mono", Manrope, monospace; text-decoration: none; white-space: nowrap; }
a.nbx-plink:hover { background: #e2f1ea; }
.nbx-body button:focus-visible, .nbx-body textarea:focus-visible, .nbx-row button:focus-visible { outline: 2px solid #a58a4e; outline-offset: 2px; }
@media (max-width: 700px) { .notebook-consultation-body.nbx-body { padding: 18px 16px 16px 40px; } .nbx-add { left: -30px; } }

/* 19 nov 2026: una línea en blanco entre punto y punto de las listas del documento. */
.nbx-body .document-page-copy li + li { margin-top: 1em; }

/* Client request (20 Nov 2026): the PDF file each entry comes from, discreet, on the same line. */
.notebook-consultation .nbx-row .nbx-title small.nbx-file { display: inline-flex; align-items: center; gap: 4px; min-width: 0; max-width: 100%; color: #8a968f; }
.nbx-row .nbx-file svg { flex: none; }
.nbx-row .nbx-file span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 340px; }

/* 22 nov 2026: procedencia del documento junto al título (de quién es y su fecha). */
.nbx-row .nbx-title strong .nbx-origin { color: #5d6f68; font-weight: 500; }

/* 22 nov 2026: carpetas del Cuaderno (maqueta aprobada). */
.nbf-new { border: 1px solid #1c6a57; border-radius: 8px; background: #fff; color: #1c6a57; padding: 6px 12px; font: 700 12px Manrope, sans-serif; cursor: pointer; }
.nbf-new:hover { background: #e8f1ec; }
.nbx-list.nbf-list { display: grid; gap: 10px; padding-top: 10px; }
.nbf-group { border: 1px solid #c9d6cf; border-radius: 12px; background: #fff; overflow: hidden; }
.nbf-row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; list-style: none; background: #eef4f0; }
.nbf-row::-webkit-details-marker { display: none; }
.nbf-group[open] > .nbf-row { border-bottom: 1px solid #c9d6cf; }
.nbf-group[open] > .nbf-row .nbf-chev { transform: rotate(90deg); }
.nbf-check { width: 16px; height: 16px; margin: 0; accent-color: #1c6a57; flex: none; cursor: pointer; }
.nbf-icon { width: 17px; height: 17px; color: #1c6a57; flex: none; }
.nbf-name { flex: 1; min-width: 0; color: #17231f; font: 700 14px Manrope, sans-serif; overflow-wrap: anywhere; }
.nbf-rename { flex: 1; min-width: 0; border: 1px solid #1c6a57; border-radius: 7px; padding: 4px 8px; font: 700 14px Manrope, sans-serif; color: #17231f; }
.nbf-acts { display: inline-flex; gap: 4px; }
.nbf-acts button { border: 0; background: none; padding: 2px 6px; border-radius: 6px; color: #40554b; font: 600 11px Manrope, sans-serif; cursor: pointer; }
.nbf-acts button:hover { background: #e8f1ec; color: #1c6a57; }
.nbf-count { min-width: 24px; padding: 1px 8px; border-radius: 999px; background: #1c6a57; color: #fff; font: 700 11px Manrope, sans-serif; text-align: center; }
.nbf-chev { flex: none; color: #40554b; transition: transform .15s; }
.nbf-body { display: grid; gap: 6px; padding: 6px 10px 10px; background: #fff; }
.nbf-body > .nbx-entry { background: #fff; }
.nbf-empty { margin: 6px; color: #6c7d74; font: 500 12.5px Manrope, sans-serif; }
.nbf-move { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; color: #40554b; font: 600 11px Manrope, sans-serif; white-space: nowrap; }
.nbf-move select { border: 1px solid #cbd6d1; border-radius: 7px; padding: 3px 6px; background: #fff; color: #1c6a57; font: 600 11px Manrope, sans-serif; max-width: 160px; }
.nbf-dragging { opacity: .9; box-shadow: 0 6px 18px #17231f33; }
.nbf-drop { outline: 2px dashed #2f8f68; outline-offset: 2px; }
.nbf-moved { background: #e7f5ec !important; transition: background .8s; }
summary[draggable="true"] { cursor: grab; }
