:root{font-family:Inter,"Segoe UI",Roboto,Arial,sans-serif;color:#182d48;background:#f3f6fa;font-synthesis:none;--ink:#192f4e;--ink2:#607188;--navy:#102d4b;--blue:#285c9b;--line:#dde4ed;--soft:#f3f6fa;--card:#fff;--green:#187a54;--red:#bd363b;--amber:#b57912;--orange:#ca6616;--shadow:0 8px 28px rgba(16,45,75,.055)}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.5}[hidden]{display:none!important}.app-shell{min-height:100vh;display:flex}.sidebar{width:255px;background:var(--navy);color:#dce7f3;position:sticky;top:0;height:100vh;display:flex;flex-direction:column;flex-shrink:0;padding:23px 15px}.brand{display:flex;align-items:center;gap:12px;padding:7px 8px 24px}.logo{height:41px;width:41px;border-radius:13px;display:grid;place-items:center;background:#f6fafc;color:var(--navy);font-size:22px;font-weight:800;letter-spacing:-1px}.logo span{color:#4e96d6}.brand b{display:block;letter-spacing:1.5px;font-size:13px}.brand small{display:block;color:#9fb9d0;font-size:11px;margin-top:3px}.org-tag{display:flex;gap:10px;align-items:center;border-radius:10px;background:#203e60;padding:14px 12px;margin:0 4px 27px}.org-dot{height:8px;width:8px;border-radius:50%;background:#5cdda8;flex-shrink:0}.org-tag small{display:block;color:#a9c0d8;font-size:10px}.org-tag b{display:block;font-size:12px;margin-top:4px}nav{display:grid;gap:5px}.nav-btn{width:100%;border:0;background:transparent;text-align:left;color:#c8d7e6;padding:13px 12px;border-radius:9px;font-size:13px;font-weight:540;display:flex;align-items:center;gap:12px;transition:.15s}.nav-btn:hover,.nav-btn.selected{background:#294c74;color:#fff}.nav-btn.selected{box-shadow:inset 3px 0 #79b9f3}.nav-icon{width:20px;text-align:center;font-size:18px}.nav-sep{height:1px;background:#36506a;margin:12px 6px}.side-bottom{margin-top:auto;padding:14px 8px 4px;border-top:1px solid #385473}.mode-label{font-size:11px;color:#c6d3df;margin-bottom:12px}.user-card{font-size:12px;overflow-wrap:anywhere}.user-card strong{display:block;color:#fff}.user-card span{display:block;color:#9db6ce;margin-top:3px}.workspace{width:calc(100% - 255px);min-width:0}.topbar{height:107px;background:white;border-bottom:1px solid var(--line);padding:22px 34px;display:flex;align-items:center;justify-content:space-between;gap:16px}.topbar h1{margin:5px 0 0;font-size:25px;letter-spacing:-.7px;font-weight:720;color:#193657}.eyebrow{font-size:10px;letter-spacing:1.8px;font-weight:800;color:#8596aa}.top-actions{display:flex;align-items:center;gap:12px}.pill{font-size:10px;letter-spacing:1px;background:#e8f2ff;border:1px solid #cae1fb;border-radius:20px;color:#235d98;padding:7px 12px;font-weight:800}.content{padding:27px 35px 60px;max-width:1640px;margin:auto}.kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:22px}.kpi{background:#fff;border:1px solid var(--line);border-radius:14px;padding:20px 21px;box-shadow:var(--shadow)}.kpi .k-label{font-size:12px;font-weight:600;color:#66788d;display:flex;justify-content:space-between;align-items:center}.kpi .k-label span{font-size:19px;opacity:.65}.kpi strong{font-size:32px;letter-spacing:-1.5px;display:block;margin:9px 0 5px}.kpi .k-foot{font-size:11px;color:#8090a2}.section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin:22px 0 14px}.section-head h2{font-size:17px;margin:0 0 4px;color:#213952}.section-head p{margin:0;color:#7c8ca0;font-size:12px}.toolbar{display:flex;gap:9px;align-items:center;flex-wrap:wrap}.card{background:var(--card);border:1px solid var(--line);box-shadow:var(--shadow);border-radius:13px;overflow:hidden}.card-pad{padding:22px}.table-scroll{overflow-x:auto}.data-table{border-collapse:collapse;width:100%;font-size:12px}.data-table th{background:#f4f7fb;text-align:left;color:#6b7e92;font-size:10px;font-weight:750;letter-spacing:.55px;white-space:nowrap;padding:14px 15px;border-bottom:1px solid var(--line)}.data-table td{padding:13px 15px;border-bottom:1px solid #edf1f6;vertical-align:middle;color:#2f4560}.data-table tr:last-child td{border-bottom:0}.data-table tbody tr:hover{background:#fafdff}.code{font-weight:700;color:#285d98;white-space:nowrap}.muted{color:#8290a3}.truncate{max-width:420px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.status{font-size:10px;display:inline-flex;align-items:center;gap:5px;padding:5px 9px;border-radius:20px;font-weight:720;white-space:nowrap}.status:before{content:'';width:6px;height:6px;border-radius:50%;background:currentColor}.status.good{background:#e7f7ef;color:#17784f}.status.bad{background:#fdeaea;color:#b3323b}.status.warning{background:#fff3dc;color:#9a6711}.status.orange{background:#fff0e2;color:#c05b15}.status.neutral{background:#edf2f8;color:#597086}.status.info{background:#eaf2ff;color:#315f9a}.primary,.secondary,.subtle{border-radius:9px;padding:11px 15px;font-size:12px;font-weight:700;white-space:nowrap}.primary{background:#2262a2;color:#fff;border:1px solid #2262a2}.primary:hover{background:#17518b}.secondary{background:white;border:1px solid #cfdae8;color:#335472}.secondary:hover{background:#f3f8ff}.subtle{background:transparent;color:inherit;border:1px solid #547088}.mini{font-size:11px;padding:8px 11px}.icon-btn{background:none;border:0;font-size:20px}.empty{padding:46px;text-align:center;color:#7b8aa0;font-size:13px}.empty strong{display:block;color:#34506e;margin-bottom:8px;font-size:15px}.notice{background:#ecf5fd;border-left:3px solid #5e9bd0;color:#315879;padding:13px 15px;font-size:12px;border-radius:8px;line-height:1.55;margin:0 0 18px}.notice.warn{background:#fff8e9;border-color:#deae55;color:#7b5819}.notice.red{background:#feeff0;border-color:#da7479;color:#8f3540}.filter-row{display:flex;gap:9px;margin:0 0 14px;flex-wrap:wrap}.filter-row select,.filter-row input{min-height:39px}.field,input,select,textarea{border:1px solid #cfdae5;border-radius:8px;background:white;color:#29425f;padding:10px 11px;font-size:12px;outline:0}input:focus,select:focus,textarea:focus{border-color:#4384c4;box-shadow:0 0 0 3px #e9f3fd}.filter-row input{min-width:220px;flex:1}.two-col{display:grid;grid-template-columns:1.35fr 1fr;gap:18px}.chart-horiz{display:flex;align-items:center;gap:10px;margin:10px 0}.chart-horiz .lab{width:80px;font-size:12px;font-weight:600}.chart-horiz .track{flex:1;height:10px;background:#edf1f5;border-radius:10px;overflow:hidden}.chart-horiz .bar{height:100%;background:#477faf;border-radius:10px}.chart-horiz .num{width:25px;text-align:right;font-size:12px;color:#6c8193}.import-tiles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px;margin-bottom:20px}.import-card{padding:22px;border:1px solid var(--line);background:white;border-radius:13px;display:flex;flex-direction:column;gap:10px}.import-card .import-icon{font-size:28px;color:#4581b5}.import-card h3{font-size:15px;margin:0}.import-card p{font-size:12px;color:#7d8ea0;line-height:1.5;flex:1;margin:0}.import-card input{width:100%;min-width:0}.preview-box{border:1px solid #cbdbe9;border-radius:12px;background:#fff;overflow:hidden}.preview-top{background:#eaf3fb;padding:16px 20px}.preview-top h3{font-size:15px;margin:0}.preview-top p{margin:5px 0 0;font-size:12px;color:#667e94}.preview-main{padding:18px 20px}.preview-main h4{font-size:12px;color:#446381;margin:16px 0 7px}.preview-main pre{white-space:pre-wrap;word-wrap:break-word;font-family:inherit;font-size:12px;background:#f7f9fc;border:1px solid #e5ebf2;border-radius:8px;padding:12px;line-height:1.5;max-height:160px;overflow:auto}.preview-main ul{font-size:12px;line-height:1.6}.preview-actions{padding:14px 20px;background:#f8fafc;border-top:1px solid var(--line);display:flex;justify-content:space-between;gap:10px}.modal{position:fixed;inset:0;z-index:100;display:grid;place-items:center;padding:20px}.modal-backdrop{position:absolute;inset:0;background:rgba(17,33,52,.64)}.modal-panel{position:relative;width:min(790px,100%);max-height:90vh;background:#fff;border-radius:16px;box-shadow:0 24px 60px #0f1d3080;overflow:hidden;display:flex;flex-direction:column}.modal-header{padding:21px 25px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;gap:16px}.modal-header h2{font-size:18px;margin:0}.modal-header button{background:none;border:0;font-size:18px}.modal-body{padding:24px 26px;overflow-y:auto}.detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.detail-grid label,.stack label{display:block;font-size:11px;font-weight:700;color:#57708a}.detail-grid input,.detail-grid select,.detail-grid textarea,.stack input{display:block;width:100%;margin-top:6px;font-size:12px}.detail-grid .wide{grid-column:1/-1}.info-label{display:block;color:#8796a4;font-size:11px;margin-bottom:6px}.info-value{font-size:12px;line-height:1.6;white-space:pre-wrap}.info-group{padding:11px 0;border-bottom:1px solid #e8edf3}.info-group:last-child{border:0}.divider{height:1px;background:var(--line);margin:20px 0}.form-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}.plan-grid{overflow:auto}.calendar{border-collapse:collapse;font-size:12px;width:100%;min-width:840px}.calendar th,.calendar td{border:1px solid #e2e9f1;text-align:center;padding:12px 8px}.calendar th{background:#edf3f9;color:#4c647c;font-size:11px}.calendar td:first-child,.calendar th:first-child{text-align:left;min-width:155px;font-weight:700;position:sticky;left:0;background:#fff}.calendar td.event{background:#e7f1ff;color:#33669a;font-weight:750}.calendar td.event.done{background:#e0f5e9;color:#207e52}.calendar td.event.marked{background:#fff1cf;color:#9c761f}.calendar td.event.late{background:#ffeaeb;color:#af343d}.calendar td.event{cursor:pointer}.calendar .event small{display:block;font-size:8px;font-weight:500;margin-top:4px}.auth-screen{min-height:100vh;display:grid;place-items:center;background:linear-gradient(145deg,#102b49 20%,#255583 100%);padding:20px}.auth-card{background:white;width:min(430px,100%);padding:34px;border-radius:20px;box-shadow:0 30px 80px #061b2e66}.auth-brand{display:flex;align-items:center;gap:13px;margin-bottom:33px}.auth-brand b,.auth-brand strong{display:block;font-size:12px;letter-spacing:.5px}.auth-brand small{font-size:10px;color:#8999a9;display:block;margin-top:4px}.auth-card h1{font-size:25px;margin-bottom:8px}.auth-card p{font-size:13px;color:#738397;line-height:1.6;margin-bottom:25px}.auth-card label{font-size:12px;font-weight:700;display:block;margin:14px 0;color:#4d667d}.auth-card input,.auth-card button{display:block;width:100%;margin-top:7px;padding:12px}.auth-footer{font-size:10px;color:#8b9bad;text-align:center;margin-top:25px}.alert{padding:12px;border-radius:8px;font-size:12px}.alert.error{background:#fce5e5;color:#9f3030}.toast{position:fixed;bottom:22px;right:24px;padding:14px 18px;border-radius:10px;background:#143d5c;color:white;box-shadow:var(--shadow);z-index:200;font-size:12px;max-width:400px;line-height:1.55}.boot{height:100vh;display:grid;place-content:center;justify-items:center;color:#6a7a8a;font-size:13px}.loader{width:30px;height:30px;border:3px solid #e0e8f1;border-top-color:#316ba7;border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.row-between{display:flex;justify-content:space-between;align-items:center;gap:12px}.row-right{display:flex;justify-content:flex-end;gap:10px}.highlight{color:#245b92;font-weight:700}.small{font-size:11px}.mt1{margin-top:8px}.mt2{margin-top:17px}.mt3{margin-top:25px}.tag{display:inline-block;color:#697e90;background:#edf2f8;border-radius:5px;padding:4px 7px;font-size:11px}.scroll-note{font-size:11px;color:#8393a5;margin:6px 0}.nowrap{white-space:nowrap}
@media(max-width:1150px){.kpi-grid{grid-template-columns:repeat(2,1fr)}.import-tiles{grid-template-columns:1fr 1fr}.two-col{grid-template-columns:1fr}}
@media(max-width:760px){.sidebar{position:fixed;z-index:40;transform:translateX(-100%);transition:transform .2s}.sidebar.mobile-open{transform:translateX(0)}.workspace{width:100%}.topbar{padding:18px;height:88px}.topbar h1{font-size:19px}.content{padding:20px 13px 55px}.kpi-grid{gap:9px}.kpi{padding:15px}.kpi strong{font-size:26px}.import-tiles{grid-template-columns:1fr}.top-actions #refresh{display:none}.detail-grid{grid-template-columns:1fr}.modal{padding:8px}.modal-body{padding:17px}.section-head{flex-direction:column}}

/* V0.2: KPIs de NC, deadlines por subcolumna y tabla de seguimiento ampliada */
.nc-kpi-split{display:flex;gap:10px;margin:7px 0 9px;flex-wrap:wrap}
.nc-kpi-split span{display:inline-flex;align-items:center;gap:7px;padding:5px 9px;border-radius:8px;font-size:11px;font-weight:650}
.nc-kpi-split b{font-size:16px}
.nc-open{color:#aa3039;background:#fff0f0}
.nc-closed{color:#177a4d;background:#eaf9ef}
.calendar-deadline{min-width:1800px;table-layout:fixed}
.calendar-deadline th:first-child,.calendar-deadline td:first-child{width:155px;min-width:155px;z-index:1}
.calendar-deadline th:not(:first-child){min-width:64px}
.calendar-deadline td{padding:12px 3px;height:57px;min-width:64px}
.calendar-deadline th.subheading{font-size:9px;letter-spacing:.3px;padding:8px 2px}
.calendar-deadline .dl-heading{background:#e3ebf4;color:#5f738a}
.calendar-deadline .deadline-cell{background:#f6f9fd;color:#75849b;font-size:16px;font-weight:800}
.calendar-deadline .deadline-cell.deadline-mark{background:#fff1e9;color:#b94c2f}
.calendar-deadline .prog-cell{font-weight:700}
.calendar-deadline .prog-cell.late{background:#fce7e9;color:#a82d36}
.nc-table{min-width:1410px}
.nc-table td{vertical-align:top;line-height:1.5}
.nc-table .nc-desc-cell{min-width:220px;max-width:350px;width:27%}
.nc-table .nc-short{max-height:53px;overflow:hidden}
.nc-table .nc-full{display:none;white-space:pre-wrap;overflow-wrap:anywhere;margin:0 0 6px}
.nc-table .expanded .nc-short{display:none}
.nc-table .expanded .nc-full{display:block}
.nc-table .nc-notes{min-width:145px;max-width:200px;overflow-wrap:anywhere}
.nc-table .nc-notes span{display:block;max-height:40px;overflow:hidden}
.nc-table .nc-owner{min-width:110px;max-width:160px;overflow-wrap:anywhere}
.text-link{background:none;border:0;padding:3px 0;color:#23639d;text-decoration:underline;font-size:11px;font-weight:650;white-space:nowrap}
.text-link:hover{color:#164677}
.nc-download{white-space:nowrap}
.due-extended{display:block;font-size:9px;color:#bd7516;margin-top:5px}
.data-table .clickable{cursor:pointer}

.nc-table th:first-child,.nc-table td:first-child{position:sticky;left:0;background:#fff;z-index:1;box-shadow:1px 0 0 #edf1f5}
.nc-table th:first-child{background:#f4f7fb;z-index:2}


/* v0.3 · Plan condensado, listado anual y alertas preparadas */
.calendar-deadline{min-width:995px;width:100%;table-layout:fixed}
.calendar-deadline th:first-child,.calendar-deadline td:first-child{min-width:122px;width:122px;padding-left:9px;font-size:10px;z-index:1}
.calendar-deadline th:not(:first-child){min-width:0;width:auto;padding:8px 0;font-size:9px}
.calendar-deadline td{height:40px;min-width:0;padding:5px 0;font-size:10px}
.calendar-deadline th.subheading{padding:6px 0;font-size:8px;letter-spacing:0}
.calendar-deadline .deadline-cell{font-size:12px}
.calendar-deadline .event small{font-size:8px;margin-top:1px;line-height:1.15}
.year-selector{min-width:148px}
.obs-desc-cell{min-width:260px;max-width:600px;width:48%;vertical-align:top!important;line-height:1.5}
.obs-short{max-height:45px;overflow:hidden}
.obs-full{display:none;white-space:pre-wrap;overflow-wrap:anywhere;margin-bottom:7px}
.expanded .obs-desc-cell .obs-short{display:none}
.expanded .obs-desc-cell .obs-full{display:block}
/* Every table cell, including the sticky first column, gets the same pale NC status background. */
.nc-row--yellow{--nc-bg:#fff8df;--nc-hover:#fff2c9}
.nc-row--orange{--nc-bg:#fff0e1;--nc-hover:#ffe5cc}
.nc-row--red,.nc-row--overdue{--nc-bg:#ffebed;--nc-hover:#ffe0e4}
.nc-row--closed,.nc-row--cancelled,.nc-row--none,.nc-row--future{--nc-bg:#fff;--nc-hover:#f6fafe}
.nc-table tbody tr[class*="nc-row--"] td,.two-col .data-table tbody tr[class*="nc-row--"] td{background:var(--nc-bg)}
.nc-table tbody tr[class*="nc-row--"]:hover td,.two-col .data-table tbody tr[class*="nc-row--"]:hover td{background:var(--nc-hover)}
.nc-table th:first-child{background:#f4f7fb}
.nc-table tbody td:first-child{background:var(--nc-bg)}
.alerts-presets{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.alert-preset{display:flex;flex-direction:column;gap:12px}
.alert-preset h3{font-size:14px;margin:0;color:#203e5d}
.alert-preset p{font-size:12px;line-height:1.6;color:#657b90;flex:1;margin:0}
.alert-preset button{align-self:flex-start}
.alert-icon{font-size:22px;color:#2c659f}
.alerts-table td{vertical-align:top}
.alert-case-list{display:grid;gap:7px}
.alert-case{border:1px solid #e2eaf2;border-radius:9px;padding:11px;display:grid;gap:4px;font-size:12px}
.alert-case span{font-size:11px}.alert-case small{color:#778ba0;font-size:10px}
.checkline{display:flex!important;align-items:center;gap:11px;margin:5px 0}.checkline input{width:auto!important;display:inline-block!important;margin:0!important}
@media(max-width:1100px){.alerts-presets{grid-template-columns:1fr}}
@media(max-width:760px){.calendar-deadline{min-width:995px}.filter-row .year-selector{flex:0 0 145px}}

/* v0.4 compact NC table */
.nc-table{width:100%;table-layout:fixed;min-width:0;font-size:10.5px}
.nc-table th{padding:9px 6px;white-space:normal;font-size:9px;letter-spacing:0}
.nc-table td{padding:9px 6px;overflow-wrap:anywhere;line-height:1.4}
.nc-table td:nth-child(1),.nc-table th:nth-child(1){width:16%}
.nc-table td:nth-child(2),.nc-table th:nth-child(2){width:5.5%}
.nc-table td:nth-child(3),.nc-table th:nth-child(3){width:19%}
.nc-table td:nth-child(4),.nc-table th:nth-child(4){width:8%}
.nc-table td:nth-child(5),.nc-table th:nth-child(5){width:9%}
.nc-table td:nth-child(6),.nc-table th:nth-child(6){width:12%}
.nc-table td:nth-child(7),.nc-table th:nth-child(7){width:11%}
.nc-table td:nth-child(8),.nc-table th:nth-child(8){width:12%}
.nc-table td:nth-child(9),.nc-table th:nth-child(9){width:7.5%}
.nc-table .code{white-space:normal;overflow-wrap:anywhere;font-size:10px}
.nc-table .status{font-size:9px;white-space:normal;line-height:1.2;padding:5px 6px}
.nc-table .nc-desc-cell{min-width:0;width:auto;max-width:unset}
.nc-table .nc-notes,.nc-table .nc-owner{min-width:0;overflow-wrap:anywhere}
.nc-table .nc-download{padding:5px 6px;white-space:normal;font-size:9px}
.nc-table .tag{padding:4px 5px;font-size:9px}
/* Missed-month events are red even if the imported plan had them colored green */
.calendar td.event.missing,.calendar-deadline td.event.missing{background:#ffe2e5;color:#a12d38}
.calendar td.event.missing small{color:#9d303b}
/* Drag/drop upload */
.file-dropzone{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:16px 9px;border:2px dashed #c8d9e9;border-radius:10px;background:#f6faff;text-align:center;color:#45627d;cursor:pointer;min-height:160px}
.file-dropzone:hover,.file-dropzone.drag-over,.file-dropzone:focus{background:#e6f2ff;border-color:#3079b7;outline:0}
.file-dropzone .drop-symbol{font-size:23px;color:#3476aa}.file-dropzone b{font-size:12px}.file-dropzone span,.file-dropzone small{font-size:10px;color:#75879b}
.visually-hidden-file{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important}
.historic-check{accent-color:#207c5b;width:17px;height:17px;cursor:pointer}
/* dashboard first: pending rules, never falsely claim actual delivery */
.dashboard-inbox{background:#fff;border:1px solid #bcd5ec;border-radius:14px;overflow:hidden;margin-bottom:18px;box-shadow:var(--shadow)}
.inbox-header{padding:15px 20px;display:flex;align-items:center;justify-content:space-between;gap:12px;background:#edf6ff}
.inbox-title{font-size:16px;font-weight:800;color:#1e446b}.inbox-header p{font-size:11px;margin:5px 0 0;color:#72859b}
.inbox-count{background:#af3541;color:#fff;padding:2px 9px;border-radius:12px;font-size:11px}
.inbox-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0}.inbox-item{display:grid;gap:3px;padding:12px 18px;border-top:1px solid #e3eaf1;font-size:11px}
.inbox-item:nth-child(odd){border-right:1px solid #e3eaf1}.inbox-item span{color:#34536d}.inbox-item small{color:#71889d}.inbox-item small strong{color:#a13c45}
.inbox-empty{padding:13px 20px;color:#677e91;font-size:12px}.inbox-disclaimer{padding:10px 20px;background:#f8fafc;margin:0;font-size:10.5px;color:#8494a5;border-top:1px solid #e4ebf2}
@media(max-width:1120px){.nc-table{min-width:880px}.inbox-list{grid-template-columns:1fr}.inbox-item:nth-child(odd){border-right:0}}
/* v0.5: campos editables antes de registrar cualquier importación */
.preview-edit-callout{padding:12px 14px;border:1px solid #c4dff0;background:#eff8ff;color:#214e6e;border-radius:9px;font-size:12px;margin-bottom:16px}
.preview-edit-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}
.preview-edit-grid .wide{grid-column:1/-1}
.preview-edit-grid label,.draft-item label{display:flex;flex-direction:column;gap:5px;font-size:11px;font-weight:600;color:#547087}
.preview-edit-grid input,.preview-edit-grid textarea,.draft-item input,.draft-item textarea,.preview-table input,.preview-table textarea,.preview-table select{max-width:100%;box-sizing:border-box;border:1px solid #ccd9e7;border-radius:7px;padding:9px;background:white;color:#163857;font-family:inherit;font-size:12px}
.preview-edit-grid textarea,.draft-item textarea{width:100%;resize:vertical}
.preview-edit-grid input{width:100%}
.preview-main h4{margin:19px 0 8px}
.plan-pick-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;max-height:245px;overflow:auto;padding:4px}
.plan-pick{display:flex;align-items:center;gap:8px;border:1px solid #e1e9f1;border-radius:8px;padding:9px;font-size:11px;color:#48627d;cursor:pointer}
.plan-pick.suggested{background:#edf7ff;border-color:#b9d7ef}
.plan-pick input{width:auto;margin:0;accent-color:#2073b3}
.draft-item{border:1px solid #dbe6f0;border-radius:10px;padding:13px;margin:9px 0;background:#fafdff;display:grid;gap:9px}
.preview-table{min-width:720px}
.preview-table td{vertical-align:top}
.preview-table input[type=checkbox]{width:18px;height:18px;accent-color:#2073b3}
.preview-table input:not([type=checkbox]){min-width:100px;width:100%}
.preview-table textarea{min-width:180px;width:100%;resize:vertical}
@media(max-width:800px){.preview-edit-grid,.plan-pick-grid{grid-template-columns:1fr}.preview-edit-grid .wide{grid-column:auto}}

/* v0.7: fecha real de cierre visible en el registro principal */
.nc-table td:nth-child(6),.nc-table th:nth-child(6){width:9%}
.nc-table td:nth-child(7),.nc-table th:nth-child(7){width:14%}
.nc-table .nc-closure{font-weight:600}

/* v0.8 · Revisión editable del F-EXT-A-06, sin alterar el plan aprobado */
.plan-draft-area{margin:22px 0 28px}
.draft-history{display:grid;gap:7px}.draft-history-item{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:9px;border-bottom:1px solid #e9eff6;font-size:12px}.draft-history-item:last-child{border:0}.draft-history-item .muted{margin-right:auto}
.modal-panel:has(.plan-draft-scroll){width:min(1280px,97vw);max-width:1280px}
.plan-draft-scroll{max-width:100%;overflow-x:auto;border:1px solid #cfdae6;border-radius:11px;background:#fff;margin:14px 0}
.plan-draft-table{min-width:1050px;width:100%;table-layout:fixed;border-collapse:collapse}
.plan-draft-table th:first-child,.plan-draft-table td:first-child{width:128px;min-width:128px}
.plan-draft-table th:not(:first-child){padding:6px 0;font-size:8px}
.plan-draft-table td{padding:3px 1px;height:45px;vertical-align:middle}
.plan-draft-drop{background:#f7faff;cursor:crosshair;min-width:0;text-align:center}
.plan-draft-drop:hover,.plan-draft-drop.drag-over{background:#ddecfc!important;outline:2px dashed #5a90c1;outline-offset:-2px}
.plan-draft-chip{display:inline-flex;align-items:center;justify-content:center;min-width:22px;max-width:95%;padding:3px 4px;font-weight:800;font-size:9px;border:1px solid #9ebfe0;background:#deecfb;color:#205b8b;border-radius:5px;margin:2px;cursor:grab;user-select:none}
.plan-draft-chip.locked{background:#cdeedc;border-color:#a3cfb3;color:#247748;cursor:not-allowed}
.plan-draft-chip.selected{box-shadow:0 0 0 3px #fbbf24}
.plan-draft-table .draft-deadline{text-align:center;font-size:14px;color:#a6b1bb;cursor:pointer;background:#f3f6fa}
.plan-draft-table .draft-deadline:hover{background:#fce7d5}
.plan-draft-table .draft-deadline.has-deadline{background:#ffede2;color:#be5530;font-weight:900}
.draft-modal-actions{display:grid;grid-template-columns:200px 1fr;gap:14px;margin-top:15px}
.draft-modal-actions label,.draft-editor-footer label,.draft-approve-box>label:not(.checkline){display:flex;flex-direction:column;gap:6px;color:#4d6680;font-size:11px;font-weight:600}
.draft-modal-actions input,.draft-editor-footer select,.draft-approve-box input[type=text],#draft-approval-note{padding:9px 10px;border:1px solid #cad8e8;border-radius:8px;background:white;color:#193e5d;max-width:100%}
.draft-editor-footer{display:grid;gap:12px;background:#f6f9fe;padding:15px;border-radius:9px}
.draft-editor-footer>div:first-child{display:flex;flex-wrap:wrap;align-items:end;gap:11px}
.draft-editor-buttons{display:flex;flex-wrap:wrap;gap:9px}
.draft-approve-box{display:grid;gap:10px;margin:16px 0 0;padding:15px;border:1px solid #d3dfec;border-radius:9px}
.draft-approve-box small{color:#6f849b;font-size:11px}
@media(max-width:760px){.draft-modal-actions{grid-template-columns:1fr}.draft-editor-buttons{display:grid}}

/* v0.9 — resultados contra programación vigente, sin falsos verdes */
.plan-event{display:block;line-height:1.25;padding:2px 0}
.plan-event + .plan-event{border-top:1px solid rgba(55,93,119,.2)}
.plan-event-issue{color:#9c2636}
.calendar td.event.missing,.calendar-deadline td.event.missing,
.calendar td.event.missing:hover,.calendar-deadline td.event.missing:hover{background:#ffe3e6;color:#992d38}
.plan-incidents{border-left:4px solid #c44452;background:#fff0f1;color:#80303a;line-height:1.75}
.plan-draft-chip.retroactive{background:#ffecdf;border-color:#e8a478;color:#a14418;cursor:grab}
.dashboard-inbox .inbox-item:has(small:first-child){border-radius:7px}
/* Una celda puede contener simultáneamente A realizada en mes e I tardía. */
.calendar-deadline .prog-cell.missing .plan-event:not(.plan-event-issue){background:#dcf4e7;color:#22754c;border-radius:4px;padding:3px 1px}
.calendar-deadline .prog-cell.missing .plan-event.plan-event-issue{background:#ffe1e5;color:#a6323c;border-radius:4px;padding:3px 1px}


/* v0.10 branding + dashboard stats */
.brand-logo{display:block;object-fit:contain;background:#fff;border-radius:10px;padding:4px}.side-logo{width:92px;max-height:44px}.auth-logo{width:132px;max-height:62px;border-radius:12px;padding:6px}.auth-brand{align-items:center}.brand{align-items:center}.brand b{display:block;letter-spacing:1.8px;font-size:13px}.stats-mini-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:-6px 0 22px}.stat-mini{background:#fff;border:1px solid var(--line);border-radius:12px;padding:12px 14px;box-shadow:var(--shadow)}.stat-mini .label{display:block;font-size:11px;color:#6d7f92;font-weight:700;line-height:1.35}.stat-mini .value{display:block;font-size:22px;font-weight:800;color:#183452;margin-top:8px;letter-spacing:-.6px}.stat-mini .sub{display:block;font-size:10px;color:#8192a3;margin-top:4px;line-height:1.35}@media (max-width:1100px){.stats-mini-grid{grid-template-columns:1fr}}

/* CTM v0.11: indicador porcentual compacto y administración segura */
.plan-completion{padding:13px 13px 2px;margin-top:17px;border-top:1px solid #e4eaf0}
.plan-completion .row-between{align-items:baseline}.plan-completion b{font-size:13px;color:#1f6349}
.plan-completion strong{font-size:19px;line-height:1;color:#187c51}
.plan-completion .completion-track{height:12px;border-radius:20px;background:#e1f4e8;overflow:hidden;margin:11px 0 7px}
.plan-completion .completion-fill{height:100%;background:#2a9a69;border-radius:20px;transition:width .2s ease}
.user-table select,.user-table input{max-width:210px}.manager-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}
.manager-form label{display:flex;flex-direction:column;gap:7px;font-weight:650;font-size:11px;color:#576d82}
.manager-form input,.manager-form select{width:100%}.manager-form .full{grid-column:1/-1}.manager-form .form-actions{grid-column:1/-1}
.manager-tip{margin:12px 0;font-size:11px;color:#677b92}.member-status{font-size:11px}
@media(max-width:780px){.manager-form{grid-template-columns:1fr}.manager-form .full,.manager-form .form-actions{grid-column:auto}}


/* CTM v0.12 — selector y menú contextual por organización */
.sidebar{overflow-y:auto;scrollbar-width:thin;scrollbar-color:#496481 transparent}
.org-picker-section{margin:2px 0 4px}
.org-picker-title{font-size:10px;font-weight:800;letter-spacing:1.45px;color:#9bb6d2;margin:0 12px 10px}
.org-picker{display:grid;gap:7px}
.org-item{border:1px solid #365473;border-radius:11px;background:#173656;overflow:hidden}
.org-item.active{background:#204363;border-color:#6c9ac8;box-shadow:inset 3px 0 #76b9eb}
.org-choice{display:flex;align-items:center;justify-content:space-between;width:100%;text-align:left;padding:10px 11px;border:0;color:#f6fafe;background:transparent;gap:8px;min-height:51px}
.org-choice:hover{background:#284c70}.org-choice:focus-visible{outline:2px solid #9cccf8;outline-offset:-3px}
.org-name{min-width:0;display:flex;flex-direction:column;gap:4px}
.org-name strong{font-size:12px;letter-spacing:.3px;white-space:nowrap}.org-name small{font-size:10px;color:#b6c8d8}
.org-actions{display:flex;gap:8px;align-items:center;flex-shrink:0}.org-chevron{font-size:15px;color:#d5e5f1}
.org-alert{display:inline-flex;align-items:center;justify-content:center;gap:3px;min-width:23px;height:23px;padding:2px 5px;background:#d7434c;border:1px solid #f3b8bd;border-radius:16px;font-size:12px;font-weight:900;color:#fff}
.org-alert-count{font-size:9px;font-weight:800}
.org-submenu{display:grid;gap:1px;background:#0e2d4d;padding:6px 6px 9px 8px;border-top:1px solid #466386}
.org-submenu .nav-btn{padding:8px 7px 8px 9px;font-size:12px;gap:7px;min-height:34px}
.org-submenu .nav-icon{width:18px;font-size:15px}.org-submenu .nav-btn.selected{background:#315b83}
.org-future-dot{margin-left:auto;height:6px;width:6px;border-radius:50%;background:#9db3c8}
.global-nav{display:grid;gap:3px;margin-bottom:10px}.global-nav .nav-btn{padding:11px 12px;font-size:12px}
.org-placeholder{max-width:1100px;margin:14px auto}.org-placeholder-top{display:flex;align-items:center;gap:18px;border:1px solid var(--line);background:#fff;border-radius:14px;padding:23px;margin-bottom:20px}
.org-placeholder-top h2{font-size:23px;color:#193657;margin:4px 0}.org-placeholder-top p{font-size:12px;color:#71869b;margin:0}
.org-placeholder-symbol{display:grid;place-items:center;min-width:77px;height:65px;background:#eaf2fc;border-radius:12px;color:#285d91;font-size:14px;font-weight:800}
.placeholder-modules{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:21px 0}
.placeholder-module{border:1px solid var(--line);border-radius:12px;background:#fff;padding:17px;display:flex;flex-direction:column;gap:8px}
.placeholder-module span{font-size:20px;color:#6388ad}.placeholder-module b{font-size:12px;color:#2c4665}.placeholder-module small{font-size:10px;color:#9aa8b6}
@media(max-width:850px){.placeholder-modules{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){.placeholder-modules{grid-template-columns:1fr}.org-placeholder-top{padding:16px}}
