:root{--ink:#202b3c;--muted:#8290a3;--line:#e8edf3;--paper:#fff;--bg:#f4f6fa;--blue:#3869da;--blue-dark:#2858c5;--navy:#202c40;--green:#19865d;--red:#c84d4d;--shadow:0 18px 48px #1d2d461c}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:'DM Sans',Arial,sans-serif;font-size:14px}.shell{min-height:100vh;display:flex}.rail{width:82px;background:#1d293b;display:flex;flex-direction:column;align-items:center;position:fixed;inset:0 auto 0 0;color:white;z-index:2}.brand-mark{margin-top:23px;width:39px;height:39px;border-radius:12px;background:linear-gradient(145deg,#6ea0ff,#3665d8);display:grid;place-items:center;font:800 22px Manrope;color:#fff;box-shadow:0 5px 14px #0b173b66}.rail-label{margin-top:17px;text-align:center;font:700 9px/1.5 Manrope;letter-spacing:1.1px}.rail-label span{font-size:6px;letter-spacing:.8px;color:#9eacc0}.rail-bottom{position:absolute;bottom:24px;color:#aebbd0;font-size:8px;letter-spacing:1px;writing-mode:vertical-rl;display:flex;align-items:center;gap:8px}.lock-dot,.local-pill span{width:7px;height:7px;background:#4dc696;border-radius:50%;display:inline-block;box-shadow:0 0 0 3px #42bd8720}.main{width:calc(100% - 82px);margin-left:82px;max-width:1780px;padding:0 44px;display:flex;flex-direction:column;min-height:100vh}.topbar{height:70px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;color:#7b8797;font-size:12px}.breadcrumbs span{padding:0 9px;color:#c4ccd6}.breadcrumbs b{color:#354258;font-weight:600}.local-pill{display:flex;align-items:center;gap:9px;background:#fff;border:1px solid var(--line);border-radius:20px;padding:8px 12px;font-size:11px;color:#647287}.local-pill span{width:6px;height:6px}.intro{display:flex;justify-content:space-between;align-items:flex-end;padding:35px 0 24px}.eyebrow{font-size:9px;letter-spacing:1.5px;color:#7d8ba0;font-weight:700}.intro h1{font:800 27px Manrope;letter-spacing:-.7px;margin:7px 0 5px}.intro p{margin:0;color:#7b8798;font-size:13px}.button{height:40px;border:0;border-radius:8px;padding:0 15px;display:inline-flex;align-items:center;justify-content:center;gap:9px;font:600 12px 'DM Sans';cursor:pointer;transition:.15s}.button.primary{background:var(--blue);color:#fff;box-shadow:0 5px 12px #3869da25}.button.primary:hover{background:var(--blue-dark);transform:translateY(-1px)}.button:disabled{opacity:.48;cursor:not-allowed;transform:none}.button.subtle{background:#fff;border:1px solid #e3e8ef;color:#4e5e74}.button.subtle:hover{background:#f6f8fc}.upload-button{position:relative}.upload-button input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}.upload-icon{font-size:18px;font-weight:400}.dropzone{height:90px;background:#fff;border:1px dashed #cbd5e2;border-radius:11px;display:flex;align-items:center;padding:0 20px;gap:14px;margin-bottom:24px;transition:.15s}.dropzone.dragging{border-color:#5480e7;background:#f1f5ff}.drop-icon{width:42px;height:42px;display:grid;place-items:center;border-radius:11px;background:#eef3ff;color:#4774dc;font-size:25px}.dropzone strong,.dropzone span{display:block}.dropzone strong{font-size:12px;margin-bottom:5px}.dropzone span{font-size:11px;color:#8a96a6}.dropzone button{margin-left:auto}.notice{padding:12px 15px;border-radius:8px;margin:-9px 0 17px;font-size:12px;line-height:1.5;background:#edf5ff;color:#3e65a4;border:1px solid #d7e5ff}.notice.error{background:#fff1f0;color:#a34540;border-color:#ffd9d5}.notice.success{background:#edfaf4;color:#287451;border-color:#d1efde}.hidden{display:none!important}.workspace{animation:appear .2s ease}@keyframes appear{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.summary-row{display:grid;grid-template-columns:repeat(4,1fr);gap:13px;margin-bottom:20px}.summary-card{height:75px;background:#fff;border:1px solid #e9edf3;border-radius:10px;display:flex;align-items:center;padding:0 15px;gap:12px}.summary-icon{width:36px;height:36px;border-radius:10px;display:grid;place-items:center;font-size:17px}.summary-icon.blue{background:#edf3ff;color:#4773d7}.summary-icon.violet{background:#f3efff;color:#8367d7}.summary-icon.amber{background:#fff7e7;color:#d39829}.summary-icon.green{background:#eaf8f1;color:#24936b}.summary-card small,.summary-card strong{display:block}.summary-card small{font-size:8px;letter-spacing:.75px;color:#8c98a9;font-weight:700;margin-bottom:4px}.summary-card strong{font:700 19px Manrope;color:#263349}.toolbar{display:flex;align-items:center;gap:9px;margin-bottom:12px}.search-wrap{height:39px;background:#fff;border:1px solid #e5eaf1;border-radius:7px;display:flex;align-items:center;padding:0 11px;gap:8px;flex:1;max-width:430px;color:#95a1b1;font-size:19px}.search-wrap input{border:0;outline:0;width:100%;font:12px 'DM Sans';color:#29374b}.search-wrap input::placeholder{color:#a0abba}.filters{display:flex;gap:8px}.filters select{height:39px;border:1px solid #e5eaf1;background:#fff;border-radius:7px;padding:0 27px 0 11px;color:#5e6d82;font:11px 'DM Sans'}.toolbar>.button{margin-left:auto;height:39px}.table-wrap{background:#fff;border:1px solid #e6ebf2;border-radius:10px;overflow:auto;min-height:220px}table{width:100%;border-collapse:collapse;white-space:nowrap}thead{background:#f8f9fb}th{height:38px;text-align:left;font-size:8px;letter-spacing:.85px;color:#8794a6;font-weight:700;border-bottom:1px solid #e8edf3;padding:0 11px}td{height:57px;border-bottom:1px solid #eef1f5;padding:6px 11px;font-size:11px;color:#425168}tbody tr{cursor:pointer;transition:background .1s}tbody tr:hover{background:#f8faff}tbody tr:last-child td{border-bottom:0}.check-col{width:34px;padding-left:14px;padding-right:2px}input[type=checkbox]{accent-color:#3869da;width:14px;height:14px;cursor:pointer}.guide-type{display:inline-flex;align-items:center;border-radius:5px;padding:4px 7px;font-size:9px;font-weight:700}.guide-type.sadt{background:#eef3ff;color:#476fc9}.guide-type.consulta{background:#f4efff;color:#795fbd}.batch-caption{display:block;color:#9aa5b4;font-size:9px;margin-top:5px}.cell-main{font-weight:600;color:#344257;max-width:170px;overflow:hidden;text-overflow:ellipsis;display:block}.cell-sub{display:block;font-size:9px;color:#98a3b2;margin-top:4px;max-width:180px;overflow:hidden;text-overflow:ellipsis}.valid-pill{font-size:9px;font-weight:600;display:inline-flex;align-items:center;gap:5px;color:#24835d}.valid-pill:before{content:'';width:5px;height:5px;border-radius:50%;background:#35b47f}.valid-pill.warn{color:#b78025}.valid-pill.warn:before{background:#e5ae45}.edit-mark{display:inline-block;width:5px;height:5px;border-radius:50%;background:#df9e29;margin-left:5px;vertical-align:middle}.row-open{border:1px solid #e8edf4;color:#8a96a5;width:27px;height:27px;border-radius:6px;background:#fff;font-size:15px;cursor:pointer}.row-open:hover{color:#3869da;border-color:#cbd8f4}.empty-rows{height:180px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:7px;color:#8996a7}.empty-rows>span{font-size:23px;color:#a8b5c8}.empty-rows strong{font-size:12px;color:#536178}.empty-rows small{font-size:10px}.table-footer{display:flex;justify-content:space-between;padding:11px 3px;color:#8b97a7;font-size:10px}.main>footer{margin-top:auto;padding:18px 0 20px;display:flex;justify-content:space-between;color:#a0a9b7;font-size:9px;border-top:1px solid #e8edf2}.modal{position:fixed;inset:0;z-index:10;display:flex;justify-content:flex-end}.modal-backdrop{position:absolute;inset:0;background:#15223882;backdrop-filter:blur(2px)}.modal-panel{position:relative;width:min(790px,94vw);height:100%;background:#f7f8fb;box-shadow:var(--shadow);display:flex;flex-direction:column;animation:slide .2s ease}@keyframes slide{from{transform:translateX(30px);opacity:.7}to{transform:translateX(0);opacity:1}}.modal-head{display:flex;justify-content:space-between;align-items:flex-start;padding:24px 27px 16px;background:#fff;border-bottom:1px solid var(--line)}.modal-head h2{font:700 19px Manrope;margin:5px 0 4px;letter-spacing:-.3px}.modal-head p{font-size:11px;color:#8995a5;margin:0}.icon-button{width:31px;height:31px;border:1px solid #e5eaf0;background:#fff;border-radius:7px;color:#728095;font-size:20px;cursor:pointer}.modal-tabs{height:48px;display:flex;align-items:center;padding:0 27px;gap:21px;background:#fff}.tab{height:48px;border:0;border-bottom:2px solid transparent;background:none;padding:0 2px;font:600 11px 'DM Sans';color:#8793a4;cursor:pointer}.tab.active{color:#3565d1;border-color:#4776df}.save-indicator{margin-left:auto;font-size:10px;color:#ae7c27}.modal-body{padding:17px 27px;overflow:auto;flex:1}.field-group{background:#fff;border:1px solid #e7ecf3;border-radius:9px;margin-bottom:11px;overflow:hidden}.group-title{font:700 10px Manrope;color:#45556c;padding:11px 14px;background:#fbfcfd;border-bottom:1px solid #eef1f5;text-transform:uppercase;letter-spacing:.45px}.field-grid{padding:12px 14px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px 13px}.field{min-width:0}.field.wide{grid-column:1/-1}.field label{font-size:9px;color:#7f8da0;display:block;margin-bottom:5px}.field input,.field textarea,.field select{width:100%;border:1px solid #e4e9f0;border-radius:6px;background:#fff;padding:8px 9px;font:11px 'DM Sans';color:#344257;outline:0}.field input:focus,.field textarea:focus{border-color:#7d9be6;box-shadow:0 0 0 2px #4776df17}.field textarea{min-height:54px;resize:vertical}.field-repeat{border-top:1px dashed #e4e9f0;margin:9px 0 0;padding-top:9px}.repeat-label{font-size:9px;color:#5876b4;font-weight:700;margin:0 0 7px}.modal-actions{height:65px;display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:0 27px;background:#fff;border-top:1px solid var(--line)}.preview-pane{background:#e9edf3;padding:23px}.paper{background:#fff;max-width:670px;margin:0 auto;padding:27px 31px;box-shadow:0 3px 16px #22324a14;border-radius:2px;color:#263449}.paper-top{border-bottom:2px solid #293a52;padding-bottom:13px;margin-bottom:14px;display:flex;justify-content:space-between}.paper-kicker{font-size:8px;letter-spacing:1px;color:#7b8a9e}.paper h3{font:700 17px Manrope;margin:5px 0}.paper-sub{font-size:10px;color:#77869a}.paper-section{margin:15px 0}.paper-section h4{font:700 9px Manrope;letter-spacing:.6px;color:#48628d;border-bottom:1px solid #e5eaf1;padding-bottom:6px;margin:0 0 8px;text-transform:uppercase}.paper-fields{display:grid;grid-template-columns:repeat(2,1fr);gap:8px 14px}.paper-field label{display:block;color:#8a97a8;font-size:8px;margin-bottom:3px}.paper-field div{font-size:10px;word-break:break-word}.toast{position:fixed;bottom:23px;left:50%;transform:translate(-50%,12px);opacity:0;pointer-events:none;background:#26364d;color:#fff;padding:11px 16px;border-radius:8px;font-size:11px;box-shadow:var(--shadow);transition:.2s;z-index:30}.toast.show{opacity:1;transform:translate(-50%,0)}
@media(max-width:1100px){.main{padding:0 25px}.summary-row{grid-template-columns:repeat(2,1fr)}.filters select{max-width:135px}th,td{padding-left:8px;padding-right:8px}}@media(max-width:700px){.rail{width:54px}.brand-mark{width:34px;height:34px}.rail-label{font-size:7px}.main{width:calc(100% - 54px);margin-left:54px;padding:0 15px}.topbar{height:58px}.local-pill{font-size:0;padding:8px}.local-pill span{width:7px;height:7px}.intro{padding:25px 0 17px;align-items:flex-start;gap:10px}.intro h1{font-size:21px}.intro p{font-size:11px;max-width:260px;line-height:1.5}.intro .button{font-size:0;padding:0 12px}.upload-icon{font-size:20px}.dropzone{height:auto;min-height:90px;padding:13px;flex-wrap:wrap}.dropzone button{margin-left:56px}.summary-row{gap:8px}.summary-card{padding:0 9px;height:67px;gap:8px}.summary-icon{width:30px;height:30px}.summary-card small{font-size:7px}.summary-card strong{font-size:16px}.toolbar{flex-wrap:wrap}.search-wrap{max-width:none;flex-basis:100%}.filters{flex:1}.filters select{flex:1;max-width:none}.toolbar>.button{margin-left:0;font-size:10px;padding:0 9px}.table-wrap{margin:0 -3px}.modal-panel{width:100%}.modal-head,.modal-tabs{padding-left:17px;padding-right:17px}.modal-body{padding:12px}.field-grid{grid-template-columns:1fr}.field.wide{grid-column:auto}.modal-actions{padding:0 14px}.modal-tabs{gap:13px}.tab{font-size:10px}.preview-pane{padding:10px}.paper{padding:18px}.main>footer{font-size:8px}}

/* Keep messages in the viewport, above the current modal, at every zoom level. */
dialog.app-message-dialog{position:fixed;inset:0;margin:auto;width:min(620px,calc(100vw - 24px));max-width:calc(100vw - 24px);height:fit-content;max-height:calc(100dvh - 24px);padding:0;border:1px solid #9db1c4;border-radius:6px;background:#fff;color:#243b53;box-sizing:border-box;overflow:hidden}
.app-message-dialog::backdrop{background:#152b4666}
.app-message-dialog form{display:flex;flex-direction:column;max-height:calc(100dvh - 26px);margin:0}
.app-message-dialog header{flex:none;padding:12px 16px;background:#edf3f9;border-bottom:1px solid #c4d0dc}
.app-message-dialog h2{margin:0;font:700 16px Arial}
.app-message-body{min-height:0;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;padding:14px 16px;font:13px/1.5 Arial;overscroll-behavior:contain}
.app-message-dialog footer{flex:none;display:flex;justify-content:flex-end;gap:8px;padding:10px 16px;background:#edf3f9;border-top:1px solid #c4d0dc}
.app-message-dialog button{padding:7px 14px;border:1px solid #9eb5ca;background:#fff;border-radius:3px;color:#244a6b;font:13px Arial;cursor:pointer}
.app-message-dialog [data-accept]{background:#d8eaf7;font-weight:700}
.app-message-dialog button:focus-visible{outline:2px solid #2775b0;outline-offset:2px}
/* Existing forms keep headers/actions visible and scroll only their contents. */
dialog.df-dialog{max-height:calc(100dvh - 24px);max-width:calc(100vw - 24px);box-sizing:border-box;margin:auto;overflow:hidden}
.df-dialog>form{display:flex;flex-direction:column;max-height:calc(100dvh - 26px);min-height:0;margin:0}
.df-dialog>form>header,.df-dialog>form>footer{flex:none;position:static}
.df-dialog>form>.df-body{flex:1;min-height:0;overflow:auto;max-height:none;overscroll-behavior:contain}
dialog.record-dialog{max-height:calc(100dvh - 24px);max-width:calc(100vw - 24px);box-sizing:border-box;margin:auto;overflow:hidden}
.record-dialog>form{max-height:calc(100dvh - 26px);min-height:0}
.record-dialog>form>.record-fields{min-height:0;overflow:auto;overscroll-behavior:contain}
#toast.toast{position:fixed;inset:auto auto 16px 50%;margin:0;max-width:calc(100vw - 32px);max-height:min(40dvh,280px);width:max-content;box-sizing:border-box;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;pointer-events:auto;border:0;font:13px/1.4 Arial}
#toast.toast:not(.show){pointer-events:none}
