*{box-sizing:border-box}body{margin:0;background:#f4f4f4;color:#26322b;font:15px Arial,sans-serif}header{background:#4CAF50;color:white;padding:20px max(20px,calc((100vw - 1320px)/2));display:flex;align-items:center;gap:16px;flex-wrap:wrap}header div{flex:1}h1{font-size:25px;margin:0}header p{margin:6px 0 0}header a{color:white}main{max-width:1360px;margin:22px auto;padding:0 18px}section{background:white;border-radius:10px;padding:20px;margin-bottom:16px;box-shadow:0 1px 8px #0001}h2{margin:0 0 12px;font-size:20px}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.stats span{display:block;color:#59645c}.stats strong{font-size:27px;display:block;margin-top:10px}button,.button{font:inherit;background:#368c3a;color:white;border:0;border-radius:5px;padding:10px 15px;cursor:pointer;text-decoration:none;display:inline-block}button:hover,.button:hover{background:#286e2d}.secondary{background:#626e65}.danger{background:none;color:#a22925;padding:3px 0}.danger:hover{background:#fbe9e9}input,textarea{font:inherit;width:100%;border:1px solid #bfc8c1;border-radius:5px;padding:9px;background:white;min-width:0}label{display:block;font-size:14px;font-weight:bold}label input,label textarea{display:block;margin-top:5px;font-weight:normal}.check{display:flex;align-items:center;gap:8px;margin:12px 0;font-weight:normal}.check input{width:auto;margin:0}.actions,.filters,.import{display:flex;flex-wrap:wrap;gap:12px;align-items:end}.filters label:nth-child(2){flex:1;min-width:200px}.import{margin-left:auto}.fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.wide{grid-column:1/-1}fieldset{border:1px solid #d5dfd6;border-radius:8px;padding:16px;margin:0 0 16px}legend{font-weight:bold;color:#287830}.alert,.notice{padding:12px;border-radius:5px;margin:10px 0;background:#fff2dc;color:#784609}.notice{background:#e6f3e7;color:#255e29}.table-wrap{overflow-x:auto;margin-top:20px}table{border-collapse:collapse;width:100%;font-size:13px}th,td{text-align:left;padding:12px 9px;border-bottom:1px solid #dfe5df;vertical-align:top}th{background:#eef4ee}td small{display:block;margin-top:5px;line-height:1.4;min-width:190px}.money{white-space:nowrap;font-variant-numeric:tabular-nums}td a{color:#277b32}.login{max-width:430px;margin:45px auto}.login button{margin-top:14px;width:100%}footer{text-align:center;color:#68736a;padding:20px}.delete{display:inline-block}@media(max-width:750px){.stats,.fields{grid-template-columns:1fr}.stats section{margin-bottom:0}.import{margin:0}.stats{margin-bottom:16px}header{padding:16px}h1{font-size:21px}}@media print{header a,header form,.actions,.filters,td:last-child,th:last-child,footer{display:none}section{box-shadow:none;padding:0}.table-wrap{overflow:visible}table{font-size:10px}main{padding:0}}

.table-wrap td:last-child a { margin-right: 8px; }
.table-wrap td:last-child .delete { margin-left: 4px; }

/* v1.0.7: revisión lado a lado y libro ordenable */
.filters select{display:block;margin-top:5px;min-height:38px;max-width:100%;padding:8px;border:1px solid #bfc8c1;border-radius:5px;background:white;color:inherit;font:inherit;font-weight:normal}
.filters label:nth-child(2){min-width:190px}.list-hint,.pdf-help{font-size:12px;line-height:1.5;color:#59645c;margin:12px 0 0}.table-wrap table th{white-space:nowrap}.sort-link{color:#25492b;text-decoration:none;display:inline-block}.sort-link:hover,.sort-link:focus{text-decoration:underline}.date-cell{white-space:nowrap;font-variant-numeric:tabular-nums}.record-actions{display:flex;align-items:center;gap:5px;flex-wrap:wrap;min-width:105px}.table-wrap td:last-child .record-actions a,.table-wrap td:last-child .record-actions .delete{margin:0}.small-action,.record-actions .danger{font-size:12px;border:1px solid #cbd9cd;border-radius:4px;padding:5px 8px;display:inline-block;text-decoration:none;line-height:1.3;background:#f5f9f5;color:#287830}.record-actions .danger{border-color:#e8cccc;color:#a22925;background:#fff6f6}.small-action:hover{background:#e7f3e7}.record-state{font-size:12px;display:inline-block;padding:4px 8px;border-radius:5px;white-space:nowrap}.record-state.pending{background:#fff2dc;color:#784609}.record-state.complete{background:#e6f3e7;color:#255e29}tr:target{background:#e6f3e7;outline:2px solid #368c3a;outline-offset:-2px}.agent-summary table{max-width:650px}.conflict p{margin:6px 0}.conflict a{color:#255e29}.review-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:16px}.review-layout.has-pdf{grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);align-items:start}.review-fields{min-width:0}.review-layout.has-pdf .review-fields{max-height:76vh;overflow:auto;padding:0 8px 5px 0;scrollbar-gutter:stable}.review-layout.has-pdf .fields{grid-template-columns:repeat(2,minmax(0,1fr))}.review-layout.has-pdf .fields label:first-child{grid-column:1/-1}.review-layout.has-pdf fieldset{min-width:0;padding:12px}.review-layout.has-pdf textarea{min-height:72px;resize:vertical}.pdf-panel{min-width:0;position:sticky;top:12px;background:#f0f3f0;border:1px solid #cad5cb;border-radius:8px;overflow:hidden}.pdf-toolbar{padding:9px 12px;background:#385e40;color:white;display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap}.pdf-toolbar>div{display:flex;align-items:center;flex-wrap:wrap;gap:10px}.pdf-toolbar a{color:white;font-size:12px}.pdf-toolbar button{font-size:12px;padding:6px 9px;border:1px solid #9db5a1}.pdf-panel iframe{display:block;border:0;width:100%;height:clamp(360px,65vh,1000px);background:#525659}.pdf-help{padding:8px 10px;margin:0}.pdf-panel.expanded{position:fixed;inset:12px;z-index:50;display:flex;flex-direction:column;box-shadow:0 0 0 100vmax #0008}.pdf-panel.expanded iframe{height:auto;flex:1;min-height:0}.review-section:has(.pdf-panel.expanded) .review-fields{visibility:hidden}
@media(max-width:1000px){.review-layout.has-pdf{grid-template-columns:minmax(0,1fr)}.review-layout.has-pdf .review-fields{max-height:none;overflow:visible;padding:0}.pdf-panel{position:static;grid-row:1}.pdf-panel iframe{height:60vh;min-height:280px}.pdf-panel.expanded{position:fixed}.pdf-panel.expanded iframe{height:auto}}
@media(max-width:540px){.review-layout.has-pdf .fields{grid-template-columns:1fr}.review-section{padding:12px}.record-actions{min-width:85px}}
@media print{.pdf-panel,.list-hint{display:none!important}.review-layout.has-pdf{display:block}.review-layout.has-pdf .review-fields{max-height:none;overflow:visible}.sort-link{color:inherit;text-decoration:none}.record-state{background:none!important;color:inherit!important}.agent-summary{break-inside:avoid}}

/* v1.0.8 */
.review-section{padding:16px 20px}.review-section>h2{margin:0 0 8px}.review-section>p{margin:0 0 12px}.review-layout.has-pdf{grid-template-columns:minmax(0,var(--review-width,45%)) 12px minmax(0,1fr);gap:6px}.review-divider{align-self:stretch;min-width:0;padding:0;border:0;border-radius:4px;background:#d6e2d8;cursor:col-resize;touch-action:none;position:relative}.review-divider::after{content:"";position:absolute;top:50%;left:4px;width:4px;height:30px;border-radius:2px;background:#52765a}.review-divider:focus-visible{outline:2px solid #287830}.review-layout.resizing iframe{pointer-events:none}.review-layout.resizing{user-select:none}.review-layout.has-pdf .review-fields{max-height:76vh;padding-right:5px}.review-layout.has-pdf .case-title{min-height:66px;resize:vertical}.review-save{position:sticky;bottom:0;z-index:3;background:#fff;padding:10px 0;margin:0;border-top:1px solid #d5dfd6;box-shadow:0 -4px 8px #fff}.pdf-panel iframe{height:clamp(360px,68vh,1000px)}.review-section:has(.pdf-panel.expanded) .review-divider{visibility:hidden}
@media(max-width:1000px){.review-layout.has-pdf{grid-template-columns:minmax(0,1fr);gap:12px}.review-divider{display:none}.review-layout.has-pdf .review-fields{max-height:none;overflow:visible}.review-save{position:static}.pdf-panel iframe{height:60vh}}
@media print{.review-divider,.review-save{display:none!important}}
