@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap');
:root{--navy:#172554;--ink:#172033;--muted:#758096;--line:#e7eaf0;--bg:#f5f7fb;--blue:#3478df;--green:#269b69;--orange:#e58a32;--purple:#8759c7;--red:#df5962;--shadow:0 8px 28px rgba(24,39,75,.055)}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:'DM Sans',sans-serif;font-size:14px}.app-shell{max-width:1600px;margin:auto}.topbar{height:76px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 34px}.brand{display:flex;align-items:center;gap:12px;text-decoration:none;color:var(--ink)}.brand-mark{width:39px;height:39px;border-radius:12px;background:var(--navy);color:white;display:grid;place-items:center;font:800 20px Manrope}.brand-mark span{color:#7db6ff}.brand strong,.brand small{display:block}.brand strong{font:800 15px Manrope}.brand small{color:var(--muted);font-size:11px;margin-top:2px}.top-actions,.heading-actions,.editor-tools{display:flex;align-items:center;gap:12px}.save-status{font-size:11px;color:#32936b}.btn{border:0;border-radius:9px;padding:11px 15px;font:600 12px 'DM Sans';cursor:pointer;transition:.18s}.btn:hover{transform:translateY(-1px);filter:brightness(.98)}.btn-primary{background:var(--navy);color:white}.btn-light{background:#f0f3f8;color:#35415a}.btn-outline{background:white;border:1px solid var(--line);color:#35415a}.btn-danger{background:#bd3544;color:white}.btn-small{padding:8px 11px;font-size:11px}main{padding:28px 34px 48px}.page-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.eyebrow{font-size:9px;letter-spacing:1.6px;font-weight:700;color:#8290a8;margin:0 0 6px}.page-heading h1{font:800 25px Manrope;margin:0 0 5px}.muted{color:var(--muted)}.page-heading p{margin:0}.card{background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow)}.essay-meta{display:grid;grid-template-columns:1fr 1.6fr 170px;gap:16px;padding:16px 18px;margin-bottom:18px}.field{display:flex;flex-direction:column;gap:6px}.field label{font-size:11px;font-weight:700;color:#536078}.field input,.field select,.field textarea{width:100%;border:1px solid #e3e7ef;border-radius:8px;padding:10px 11px;font:13px 'DM Sans';color:var(--ink);background:#fff;outline:none}.field input:focus,.field textarea:focus,.field select:focus,.search:focus{border-color:#8aa9e6;box-shadow:0 0 0 3px #eaf0fc}.workspace{display:grid;grid-template-columns:320px minmax(0,1fr);gap:18px;align-items:start}.sidebar{padding:17px;position:sticky;top:14px;max-height:calc(100vh - 28px);display:flex;flex-direction:column}.sidebar-head,.section-title,.dialog-head{display:flex;justify-content:space-between;align-items:center;gap:12px}.sidebar h2,.section-title h2,.dialog-head h2{font:800 15px Manrope;margin:0}.tiny{font-size:11px;margin:4px 0 0}.icon-btn{border:1px solid var(--line);background:white;border-radius:8px;width:32px;height:32px;font-size:19px;color:#47536a;cursor:pointer}.search{margin:15px 0 10px;padding:11px 12px;border:1px solid var(--line);border-radius:8px;width:100%;font:12px 'DM Sans';outline:none}.quick-filters{display:flex;gap:5px;margin-bottom:12px}.chip{border:1px solid var(--line);background:#fff;color:#6d7789;border-radius:20px;padding:6px 9px;font:600 10px 'DM Sans';cursor:pointer}.chip.active{background:#edf2fc;border-color:#d9e4fb;color:#294d91}.competence-filters{display:flex;flex-wrap:wrap;gap:6px;padding-bottom:13px;border-bottom:1px solid var(--line)}.comp-filter{border:0;border-radius:7px;padding:7px 9px;background:#f2f4f8;color:#68748a;font-size:10px;font-weight:700;cursor:pointer}.comp-filter.active{color:#fff}.marker-list-heading{display:flex;justify-content:space-between;color:#8a94a5;font-size:9px;text-transform:uppercase;letter-spacing:.6px;padding:13px 2px 7px}.marker-list{overflow:auto;min-height:100px;max-height:calc(100vh - 400px);padding-right:3px}.marker-item{display:flex;align-items:flex-start;gap:9px;padding:9px 8px;border-radius:8px;cursor:pointer;border:1px solid transparent}.marker-item:hover{background:#f7f8fb}.marker-item.selected{background:#eef3fc;border-color:#dce6fa}.marker-dot{width:8px;height:8px;border-radius:50%;margin-top:5px;flex:none}.marker-info{flex:1;min-width:0}.marker-info strong{display:block;font-size:11px;line-height:1.35;font-weight:600}.marker-info small{color:#8a94a5;font-size:9px}.favorite{border:0;background:none;color:#aab2c0;font-size:17px;padding:0 2px;cursor:pointer}.favorite.on{color:#e3a52f}.marker-help{background:#f7f8fb;border-radius:8px;padding:10px;color:#7b879b;font-size:10px;line-height:1.5;margin-top:10px}.main-column{display:flex;flex-direction:column;gap:16px}.editor-card,.scoring-card,.summary-card{padding:19px}.section-title{margin-bottom:14px}.toggle-label{display:flex;align-items:center;gap:6px;font-size:10px;color:#667187;white-space:nowrap}.toggle-label input{accent-color:var(--navy)}.essay-editor{min-height:340px;border:1px solid #e4e8ef;border-radius:10px;padding:20px 22px;font:15px/1.9 Georgia,serif;white-space:pre-wrap;outline:none;color:#293247}.essay-editor:empty:before{content:attr(data-placeholder);white-space:pre-wrap;color:#aab2c0}.essay-editor:focus{border-color:#9eb4df}.essay-editor mark,.student-essay mark{padding:2px 0;border-radius:3px;cursor:pointer;color:inherit;box-decoration-break:clone;-webkit-box-decoration-break:clone}.essay-editor.hide-marks mark,.student-essay.hide-marks mark{background:transparent!important;outline:1px dotted #aab2c0}.editor-foot{display:flex;justify-content:space-between;color:#99a2b2;font-size:10px;margin-top:9px}.score-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:10px}.score-item{border:1px solid var(--line);border-radius:10px;padding:12px 10px}.score-item-head{display:flex;align-items:center;gap:7px;margin-bottom:10px}.score-item-head strong{font:700 11px Manrope}.score-item-head small{display:block;color:#8993a5;font-size:9px}.score-item select{width:100%;padding:8px;border:1px solid var(--line);border-radius:7px;font:600 12px 'DM Sans';background:white}.total-score{font:800 24px Manrope;color:var(--navy)}.total-score small{font:500 10px 'DM Sans';color:#8993a5}.summary-stats{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;margin:5px 0 15px}.stat{background:#f7f8fb;border-radius:8px;padding:10px}.stat strong{font:800 18px Manrope;display:block}.stat span{font-size:10px;color:#7d8798}.occurrence-summary{display:grid;grid-template-columns:1fr 1fr;gap:6px}.occurrence-row{display:flex;justify-content:space-between;gap:8px;padding:8px 10px;background:#fafbfc;border-radius:7px;font-size:10px}.occurrence-row strong{white-space:nowrap}.zero-alerts{display:flex;justify-content:space-between;align-items:center;border-top:1px solid var(--line);margin-top:16px;padding-top:14px}.zero-alerts h3{font:700 12px Manrope;margin:0}.zero-list{padding:10px 0;display:grid;grid-template-columns:1fr 1fr;gap:7px}.zero-option{font-size:11px;display:flex;align-items:center;gap:7px;padding:7px;border-radius:6px;background:#fff8f0}.zero-option input{accent-color:#d45a40}.hidden{display:none!important}.student-workspace{display:block}.student-banner{background:linear-gradient(110deg,#172554,#263f79);color:white;border-radius:14px;padding:24px 28px;display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}.student-banner .eyebrow{color:#a9bce6}.student-banner h2{font:800 22px Manrope;margin:0 0 5px}.student-banner p{color:#d3def4;margin:0;font-size:12px}.student-total{text-align:right}.student-total small{display:block;font-size:9px;letter-spacing:1px;color:#c0cdeb}.student-total strong{font:800 30px Manrope}.student-total strong span{font:500 12px Manrope;color:#c0cdeb}.student-grid{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(260px,.8fr);gap:18px}.student-text-card,.student-report{padding:19px}.student-essay{font:16px/2 Georgia,serif;white-space:pre-wrap;padding:16px;border:1px solid var(--line);border-radius:9px;min-height:260px}.error-navigation{display:flex;justify-content:space-between;align-items:center;margin:12px 0;color:#7d8798;font-size:11px}.feedback-card{background:#f6f8fc;border:1px solid #e7ebf3;border-radius:10px;padding:14px;min-height:92px}.feedback-card h3{font:700 13px Manrope;margin:0 0 6px}.feedback-card p{font-size:12px;line-height:1.6;margin:5px 0}.feedback-card .teacher-comment{border-top:1px solid #e0e5ef;padding-top:8px;margin-top:9px}.student-report h2{font:800 15px Manrope;margin:0 0 14px}.student-report h3{font:700 12px Manrope;margin:0 0 10px}.report-score{display:flex;align-items:center;gap:8px;padding:7px 0;border-bottom:1px solid #f0f1f4}.report-score span{font-size:11px;flex:1}.report-score strong{font:700 12px Manrope}.report-dot{width:7px;height:7px;border-radius:50%}.report-divider{border-top:1px solid var(--line);margin:14px 0}.student-bottom{display:flex;justify-content:space-between;margin-top:18px}footer{padding:18px 34px;border-top:1px solid var(--line);background:#fff;color:#667187;font-size:11px}footer span{float:right;color:#9aa3b2}.toast{position:fixed;bottom:24px;left:50%;transform:translate(-50%,20px);background:#172554;color:white;padding:11px 17px;border-radius:9px;font-size:12px;opacity:0;pointer-events:none;transition:.25s;z-index:20}.toast.show{opacity:1;transform:translate(-50%,0)}dialog{border:0;border-radius:14px;padding:22px;width:min(480px,calc(100% - 30px));box-shadow:0 20px 80px #11182740}dialog::backdrop{background:#11182780}.dialog-head{margin-bottom:18px}.dialog-head h2{font-size:17px}.dialog-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}.zero-confirm-row{background:#fff7ed;border-radius:8px;padding:12px;font-size:12px;line-height:1.5;margin-top:15px}.zero-confirm-row input{accent-color:#c54a3d}.zero-option.active{outline:1px solid #e8a18f}
@media(max-width:1100px){.workspace{grid-template-columns:280px minmax(0,1fr)}.score-grid{grid-template-columns:repeat(3,1fr)}.sidebar{position:static;max-height:none}.marker-list{max-height:440px}}
@media(max-width:760px){.topbar{padding:0 16px;height:65px}.save-status{display:none}main{padding:20px 14px 32px}.page-heading{align-items:flex-start;gap:12px;flex-direction:column}.page-heading h1{font-size:22px}.heading-actions{width:100%}.heading-actions .btn{flex:1}.essay-meta{grid-template-columns:1fr;gap:12px}.workspace{grid-template-columns:1fr}.sidebar{order:2}.main-column{order:1}.score-grid{grid-template-columns:repeat(2,1fr)}.summary-stats{grid-template-columns:repeat(3,1fr)}.occurrence-summary{grid-template-columns:1fr}.editor-tools{gap:8px}.editor-card,.scoring-card,.summary-card{padding:14px}.essay-editor{min-height:300px;padding:15px;font-size:14px}.student-grid{grid-template-columns:1fr}.student-banner{padding:18px;gap:10px}.student-banner h2{font-size:18px}.student-total strong{font-size:25px}.student-text-card,.student-report{padding:14px}.section-title{align-items:flex-start}.editor-tools{flex-direction:column;align-items:flex-end}.zero-list{grid-template-columns:1fr}footer{padding:16px}footer span{float:none;display:block;margin-top:5px}}
@media print{body{background:#fff}.topbar,.page-heading .heading-actions,.sidebar,.editor-tools,.student-bottom,.error-navigation,.toggle-label,.btn,footer{display:none!important}main{padding:0}.workspace,.student-grid{display:block}.card{box-shadow:none;break-inside:avoid;margin-bottom:12px}.essay-meta{display:flex}.essay-editor,.student-essay{min-height:0;border:0;padding:8px;font-size:12px}.student-workspace.hidden,.workspace.hidden{display:block!important}.student-banner{print-color-adjust:exact;-webkit-print-color-adjust:exact}.student-essay mark,.essay-editor mark{print-color-adjust:exact;-webkit-print-color-adjust:exact} }
/* Modo manuscrito */
.mode-switch{display:flex;gap:7px;margin:0 0 13px;padding:4px;background:#f2f4f8;border-radius:10px;width:max-content;max-width:100%}.mode-tab{border:0;background:transparent;padding:9px 13px;border-radius:7px;color:#657087;font:600 11px 'DM Sans';cursor:pointer}.mode-tab.active{background:#fff;color:#172554;box-shadow:0 2px 8px #18274b12}.image-correction{display:flex;flex-direction:column;gap:12px}.image-upload{border:2px dashed #cbd5e1;border-radius:13px;padding:35px 16px;text-align:center;background:#f9fbff;cursor:pointer;display:flex;align-items:center;flex-direction:column;gap:8px}.image-upload.dragover{border-color:#3478df;background:#eef4ff}.image-upload strong{font:700 14px Manrope}.image-upload p{margin:0;color:#7c879b;font-size:11px}.upload-symbol{width:46px;height:46px;border-radius:13px;background:#e9f0ff;color:#2854a0;display:grid;place-items:center;font-size:26px}.image-toolbar-top,.image-adjustments,.image-tool-options{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}.page-controls,.image-actions{display:flex;align-items:center;gap:8px}.page-controls span{font-size:11px;color:#68758b;font-weight:600}.image-adjustments{padding:10px 12px;background:#f7f8fb;border-radius:9px}.image-adjustments label,.image-tool-options label{display:flex;align-items:center;gap:7px;color:#667187;font-size:10px}.image-adjustments input[type=range],.image-tool-options input[type=range]{width:90px;accent-color:#172554}.image-workspace{height:min(70vh,780px);min-height:350px;overflow:hidden;position:relative;background:#e8ebf1;border:1px solid #dce1e9;border-radius:10px;touch-action:none;overscroll-behavior:contain}.page-stage{position:absolute;left:0;top:0;transform-origin:top left;box-shadow:0 4px 20px #17203330;background:#fff;will-change:transform}.page-stage img{display:block;max-width:none;user-select:none;-webkit-user-drag:none}.page-stage canvas{position:absolute;inset:0;max-width:none}.page-stage #lineGridCanvas{pointer-events:none}.image-toolbar{display:flex;align-items:stretch;gap:5px;overflow-x:auto;padding:8px;background:#f2f4f8;border-radius:11px;scrollbar-width:thin}.tool-button{min-width:56px;min-height:52px;border:1px solid transparent;background:#fff;border-radius:8px;color:#34425b;font-size:19px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;cursor:pointer;flex:none}.tool-button small{font-size:8px;font-weight:600}.tool-button.active{border-color:#9bb5e9;background:#eaf1ff;color:#214a91}.image-tool-options{justify-content:flex-start}.image-hint{font-size:10px;color:#7c879b;margin:0;line-height:1.5}.image-annotation-list{display:flex;flex-direction:column;gap:5px}.image-ann-row{display:flex;align-items:center;gap:8px;padding:7px 9px;border:1px solid #edf0f5;border-radius:7px;font-size:10px}.image-ann-row span:nth-child(3){flex:1}.image-ann-row button{border:0;background:#f2f4f8;border-radius:5px;padding:4px 7px;cursor:pointer;color:#536078}.image-marker-dialog{max-height:90vh;overflow:auto}.image-marker-competencies{display:flex;gap:6px;flex-wrap:wrap;margin:9px 0}.image-marker-competencies button{border:0;border-radius:7px;padding:7px 10px;background:#f0f2f6;color:#68748a;font-size:10px;font-weight:700;cursor:pointer}.image-marker-competencies button.active{background:var(--cc,#172554);color:#fff}.image-marker-choices{display:flex;flex-direction:column;gap:4px;max-height:230px;overflow:auto;margin-bottom:12px}.image-marker-choice{display:flex;align-items:center;gap:9px;text-align:left;border:1px solid #edf0f4;background:#fff;border-radius:7px;padding:9px;font-size:10px;cursor:pointer}.image-marker-choice:hover{background:#f6f8fc;border-color:#d8e2f4}.image-marker-choice i{width:9px;height:9px;border-radius:50%;flex:none}.image-marker-choice span{line-height:1.4}.image-marker-choice b{margin-right:4px}.student-image-preview{margin-top:16px}.student-image-preview h3{font:700 13px Manrope}.student-image-page{position:relative;margin:12px 0;border:1px solid #e5e8ef;border-radius:8px;overflow:hidden;background:#fff}.student-image-page img{display:block;width:100%;height:auto}.student-image-page canvas{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.print-image-page{page-break-after:always;position:relative}.print-image-page img,.print-image-page canvas{width:100%;height:auto;display:block}.print-image-page canvas{position:absolute;inset:0}
body.dark-mode{--bg:#111827;--ink:#e5e7eb;--muted:#9ca3af;--line:#374151;background:#111827;color:#e5e7eb}body.dark-mode .card,body.dark-mode .topbar,body.dark-mode footer,body.dark-mode dialog{background:#1f2937;color:#e5e7eb;border-color:#374151}body.dark-mode .image-upload,body.dark-mode .image-adjustments,body.dark-mode .image-toolbar,body.dark-mode .marker-help{background:#273449}body.dark-mode .mode-switch{background:#273449}body.dark-mode .mode-tab.active{background:#374151;color:#fff}body.dark-mode .image-marker-choice{background:#1f2937;color:#e5e7eb;border-color:#374151}
@media(max-width:760px){.mode-switch{width:100%}.mode-tab{flex:1;padding:10px 6px}.image-workspace{height:58vh;min-height:320px}.image-toolbar{position:sticky;bottom:0;z-index:5}.tool-button{min-width:58px;min-height:58px}.image-adjustments{align-items:flex-start}.image-adjustments label{flex:1 1 42%}.image-toolbar-top{align-items:flex-start}.page-controls{flex-wrap:wrap}.image-marker-dialog{width:calc(100% - 18px);padding:16px}}
@media print{#imageEditorArea,.image-upload,.mode-switch{display:none!important}#imagePrintPages{display:block!important}.print-image-page{break-after:page}.print-image-page img{width:100%}}
.image-marker-choice.chosen{border-color:#7698d9;background:#edf3ff;box-shadow:inset 0 0 0 1px #7698d9}
@media(max-width:760px){.top-actions{gap:5px}.top-actions .btn{padding:8px 9px;font-size:10px}}
@media(max-width:760px){.sidebar{position:fixed!important;left:0;top:0;bottom:0;width:min(88vw,350px);max-height:100vh!important;z-index:40;border-radius:0 14px 14px 0;overflow:auto;transform:translateX(-110%);transition:transform .22s ease;box-shadow:12px 0 35px #11182730}.sidebar.drawer-open{transform:translateX(0)}#closeMarkerDrawer{display:inline-grid;place-items:center}.image-tool-options #openMarkerDrawer{display:inline-flex}}
@media(min-width:761px){#closeMarkerDrawer{display:none}#openMarkerDrawer{display:none}}
