:root{--ink:#203a35;--muted:#65736d;--green:#28624e;--line:#dfe5de;--paper:#f5f6f1;--white:#fff;--soft:#eaf2e9;--amber:#886121;--amber-bg:#faf2df}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font:15px/1.55 "Segoe UI",Arial,sans-serif}button,input,select,textarea{font:inherit}button,a,input,select,textarea{outline-offset:4px}button{border:1px solid var(--green);border-radius:8px;background:var(--green);color:#fff;padding:9px 16px;font-weight:600;cursor:pointer}button:hover{filter:brightness(.94)}button:disabled{opacity:.5;cursor:wait}.secondary{background:#fff;color:var(--ink);border-color:#cad5ce}.danger{color:#9d362b;border-color:#e4c3be;background:#fff}.topbar{height:86px;border-bottom:1px solid var(--line);background:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 max(4vw,24px)}.brand{display:flex;align-items:center;gap:12px;text-decoration:none;color:var(--ink);font-size:22px;font-weight:700;line-height:1.1}.brand small{font-size:9px;letter-spacing:1.9px;display:block;margin-top:7px;font-weight:600;color:var(--muted)}.brand-icon{background:var(--ink);color:white;border-radius:12px;display:grid;place-items:center;width:42px;height:42px;font-size:23px}.local-badge{font-size:12px;color:var(--muted);display:flex;align-items:center;gap:8px}.dot{width:7px;height:7px;background:#4c9464;border-radius:100%}main{max-width:1480px;margin:auto;padding:38px max(4vw,24px) 24px}.intro{display:flex;align-items:center;justify-content:space-between;margin-bottom:25px;gap:15px}.eyebrow{font-size:10px;font-weight:700;letter-spacing:1.7px;color:#758579;margin:0 0 8px}h1{font-size:32px;letter-spacing:-.7px;line-height:1.2;margin:0 0 10px;font-weight:650}h2{font-size:18px;line-height:1.4;margin:0 0 8px;font-weight:650}h3{font-size:17px;margin:0 0 8px}p{margin:0 0 12px}.muted,.hint{color:var(--muted)}.small,.hint{font-size:12px}.hint{margin-top:8px;overflow-wrap:anywhere}nav{border-bottom:1px solid var(--line);display:flex;gap:28px;margin-bottom:26px}.tab{color:var(--muted);border:0;border-radius:0;background:transparent;padding:12px 4px 14px;border-bottom:3px solid transparent;font-size:14px}.tab.selected{color:var(--ink);border-color:var(--green)}.notice{padding:20px 23px;border:1px solid #d5e2d3;background:var(--soft);border-radius:12px;margin-bottom:20px}.notice strong{font-size:14px;font-weight:600}.notice p{margin:8px 0 0;font-size:12px;color:#5e725d}.pill{display:inline-block;background:#e6ece7;color:#526857;padding:3px 9px;border-radius:20px;font-size:11px;font-weight:650;margin-right:10px;white-space:nowrap}.pill.active{background:#eaf2e9;color:#28624e}.pill.pending{background:var(--amber-bg);color:var(--amber)}.pill.inactive{background:#eeefed;color:#727971}.metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:24px}.metric{border:1px solid var(--line);border-radius:12px;padding:20px 22px;background:#fff}.metric .value{font-size:31px;font-weight:650;letter-spacing:-1px;margin:9px 0 1px}.metric .label{font-size:12px;color:var(--muted)}.metric .foot{font-size:11px;color:var(--muted)}.columns{display:grid;grid-template-columns:minmax(0,2.35fr) minmax(260px,1fr);gap:22px;align-items:start}.columns.equal{grid-template-columns:1fr 1fr}.card{background:#fff;border:1px solid var(--line);border-radius:12px;padding:22px;margin-bottom:20px;min-width:0}.card-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.count{font-size:12px;background:var(--paper);padding:3px 9px;border-radius:20px}.table-scroll{overflow:auto;max-height:500px}table{width:100%;border-collapse:collapse;text-align:left;font-size:12px}th{font-size:10px;text-transform:uppercase;letter-spacing:.7px;color:#7c8780;font-weight:650;background:#fbfcf9;position:sticky;top:0;z-index:1}th,td{padding:12px 10px;border-bottom:1px solid #edf0eb;vertical-align:top}td:first-child{font-weight:600}tr:last-child td{border-bottom:0}.version{overflow-wrap:anywhere;font-size:11px;font-family:Consolas,monospace;display:block;background:var(--paper);padding:8px;border-radius:6px;margin:5px 0 12px}.section-heading,.toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px}.toolbar{justify-content:flex-start}.search-label{flex:1;max-width:380px}label{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:600}input,select,textarea{width:100%;border:1px solid #ccd7ce;border-radius:6px;padding:9px 10px;background:#fff;color:var(--ink);min-width:0;font-size:13px}input:focus,select:focus,textarea:focus{outline:2px solid #85a692;border-color:transparent}input[type=checkbox]{width:17px;height:17px;flex:none}label.check{display:flex;flex-direction:row;align-items:flex-start;gap:10px;font-weight:400;margin:15px 0}textarea{min-height:70px;resize:vertical}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin:18px 0}.form-grid.thirds{grid-template-columns:repeat(3,minmax(0,1fr))}.form-grid .full{grid-column:1/-1}.people-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:20px}.people-layout.has-detail{grid-template-columns:minmax(350px,1.25fr) minmax(410px,1fr)}.people-list{padding:8px}.people-list .table-scroll{max-height:720px}.row-button{font-size:12px;padding:5px 9px;background:#fff;color:var(--green);border:1px solid #d8e3da}.route-small{font-size:11px;font-weight:400;max-width:210px;overflow-wrap:anywhere}.selected-row{background:#f0f6ee}.detail{padding:23px}.detail-head{display:flex;justify-content:space-between;gap:15px}.detail-id{font-size:10px;color:var(--muted);overflow-wrap:anywhere;margin:0 0 16px}.detail hr{border:0;border-top:1px solid var(--line);margin:22px 0}details{border-top:1px solid var(--line);padding:17px 0 0;margin-top:18px}summary{font-weight:650;cursor:pointer;font-size:14px}.schedule-text{padding:9px 12px;background:var(--paper);border-radius:6px;margin:8px 0;font-size:12px;white-space:pre-line}.assignment{border-left:2px solid #a6bfa9;padding:0 0 0 14px;margin:17px 0}.assignment p{font-size:12px;margin:3px 0;overflow-wrap:anywhere}.assignment .date{font-weight:700}.save-row,.button-row{display:flex;align-items:center;gap:12px;margin-bottom:24px;flex-wrap:wrap}.message{padding:12px 16px;background:#e6f3e6;border:1px solid #cadfc6;border-radius:8px;margin-bottom:20px;font-size:13px}.message.error{color:#8f342d;background:#fff0ed;border-color:#edcec7}.change{display:flex;justify-content:space-between;gap:16px;padding:9px 0;border-bottom:1px solid #edf0eb;font-size:12px}.change:last-child{border-bottom:0}.empty{padding:20px 0;color:var(--muted);font-size:13px}.rule-note{font-size:12px;border-top:1px solid var(--line);padding-top:9px;margin-top:10px}footer{display:flex;justify-content:space-between;gap:15px;border-top:1px solid var(--line);padding-top:20px;margin-top:28px;font-size:10px;color:#8b968d}[hidden]{display:none!important}@media(max-width:1100px){.people-layout.has-detail{grid-template-columns:1fr}.columns{grid-template-columns:minmax(0,1.8fr) minmax(230px,1fr)}}@media(max-width:760px){main{padding:25px 18px}.topbar{padding:0 18px;height:74px}h1{font-size:26px}.intro{align-items:flex-start}.intro button{font-size:11px;padding:8px}.metrics{grid-template-columns:1fr 1fr;gap:10px}.columns,.columns.equal{grid-template-columns:1fr}.metric{padding:16px}.card{padding:17px}.section-heading{align-items:flex-start}.section-heading button{font-size:12px}.form-grid,.form-grid.thirds{grid-template-columns:1fr}.local-badge{font-size:10px}.toolbar{flex-wrap:wrap}.toolbar .search-label{max-width:none}footer{flex-direction:column;gap:2px}.notice strong{display:block;margin-top:9px}.people-layout.has-detail{grid-template-columns:minmax(0,1fr)}}
.scan-actions{display:flex;align-items:center;gap:15px;margin-top:16px;flex-wrap:wrap}.scan-totals{display:flex;gap:25px;flex-wrap:wrap;font-size:13px}.scan-totals strong{font-size:21px;margin-right:5px}
.package-entry{border-top:1px solid var(--line,#e3e7ed);padding:16px 0}
.package-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.cloud-form{max-width:620px;margin-top:12px}
.package-entry>button{margin-top:12px}
#gpt-message-box{margin:16px 0;padding:14px;background:var(--soft,#f5f7fa);border-radius:10px}
#gpt-followup{border-left:4px solid var(--accent,#467254)}
#gpt-followup h2{overflow-wrap:anywhere}
#gpt-tracking-list td{font-size:12px;vertical-align:top}
#gpt-tracking-list td:first-child{white-space:nowrap}
#gpt-message-box .button-row{margin-bottom:0}

.progress-cell{min-width:225px;font-size:12px;font-weight:400;vertical-align:top}.progress-cell strong{font-variant-numeric:tabular-nums}.progress-cell details{margin-top:8px;padding-top:6px}.progress-cell summary{font-size:12px}.people-layout.has-detail{grid-template-columns:minmax(330px,.85fr) minmax(520px,1.4fr)}.people-layout.has-detail .people-list .table-scroll{max-height:80vh}.detail{scroll-margin-top:18px}.detail-head{position:sticky;top:0;background:white;z-index:2;padding:10px 0}.detail #assignment-editor{background:#f5f8f4;padding:16px;border-radius:8px}.detail input,.detail select{min-height:42px}.people-layout.has-detail .route-small{display:none}@media(max-width:1100px){.people-layout.has-detail{grid-template-columns:1fr}.people-layout.has-detail .detail{grid-row:1}}

.people-layout.has-detail .people-list th:nth-child(n+2):nth-child(-n+8),.people-layout.has-detail .people-list td:nth-child(n+2):nth-child(-n+8){display:none}

.progress-category{min-width:112px;max-width:190px;vertical-align:top;font-size:12px;font-weight:400}.progress-category>strong{font-size:18px;font-variant-numeric:tabular-nums}.progress-category details{margin:7px 0 0;padding:7px 0 0}.progress-category summary{font-size:11px}.progress-category p{font-size:12px;overflow-wrap:anywhere}.people-list th{white-space:normal;vertical-align:middle}

/* Principal: controles compactos, pendientes y una sola propuesta vigente. */
.topbar{height:68px}main{padding-top:22px}.intro{margin-bottom:10px}.intro h1{font-size:26px;margin:0}nav{margin-bottom:18px}
#scheduler-card{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:16px 20px;background:#f0f5ef}
#scheduler-card h2{display:inline-block;margin:0 0 0 12px;font-size:18px}#scheduler-status{margin:4px 0 0;color:var(--muted)}
#scheduler-card .button-row,.gpt-action .button-row{margin:0}#scheduler-status.attention{color:#8a4b12}
#flow-card h2{margin-bottom:14px}#flow-counts{gap:10px;margin-bottom:18px}#flow-counts .metric{padding:10px 14px;background:var(--paper);border:0;border-radius:8px}#flow-counts .value{font-size:25px;margin:0 0 2px}
.gpt-action{display:flex;align-items:center;justify-content:space-between;gap:16px}.gpt-action h3{font-size:15px;margin:0}.gpt-action p{font-size:13px;margin:4px 0 0;color:var(--muted)}
#flow-card details,.excel-help{margin-top:12px;padding-top:10px}#flow-card summary,.excel-help summary{font-size:12px;color:var(--muted)}#flow-message-label{margin-top:12px}
#excel-card .card-heading{margin-bottom:8px}#excel-status{font-size:14px;margin-top:12px}#excel-current h3{font-size:15px}#excel-current details{margin-top:14px;padding-top:12px}
#flow-details{padding:16px 20px}#flow-details>summary{color:var(--muted);font-size:13px}#flow-details[open]>summary{margin-bottom:18px}
#ocr-waiting-list .source-details{max-width:520px;margin:5px 0 0;padding:4px 0 0}#ocr-waiting-list .source-details p{overflow-wrap:anywhere;font-weight:400}
@media(max-width:760px){#scheduler-card,.gpt-action{align-items:flex-start;flex-direction:column;gap:12px}#scheduler-card h2{margin-left:8px}.card{margin-bottom:14px}#excel-card .card-heading{flex-wrap:wrap}#flow-counts .metric{padding:10px}.intro h1{font-size:24px}}

.pending-access{display:block;margin-top:8px}#person-pending{width:min(780px,90vw);max-height:85vh;overflow:auto;border:1px solid var(--line);border-radius:16px;padding:24px;color:var(--ink)}#person-pending::backdrop{background:rgba(20,40,35,.4)}.pending-item{padding:18px 0;border-bottom:1px solid #dde5df}.pending-item h3{font-size:16px}.pending-source{margin:10px 0}.pending-source p{overflow-wrap:anywhere}.pending-source button{margin-left:10px}#person-pending .detail-head{top:-24px;padding-top:18px}

.excel-days td{vertical-align:top}.excel-cell-ref{display:block;font-size:11px;color:var(--muted);margin-top:4px}.excel-days td:nth-child(2){white-space:nowrap}.excel-day-comment p{white-space:pre-wrap;overflow-wrap:anywhere}.excel-days td:last-child{min-width:220px;max-width:420px}
.excel-count-red{color:#ff0000}.excel-count-cyan{color:#abe9ff;background:#263d39;border-radius:4px;padding:1px 5px}

.period-detail{grid-column:1 / -1;min-width:0}.people-layout.has-detail:has(.period-detail){display:block}.table-wrap{overflow-x:auto}.period-detail th,.period-detail td{min-width:90px}.period-detail td:nth-child(3){max-width:260px;overflow-wrap:anywhere}#period-editor,#text-report-editor{width:min(960px,94vw);max-height:90vh;overflow:auto;border:1px solid #d8dfdc;border-radius:16px;padding:24px}#period-editor::backdrop,#text-report-editor::backdrop{background:#193c354f}.condition-field{display:flex;flex-direction:column;gap:6px}.condition-field label{font-weight:600}

#reading-notice{border-left:5px solid #b47816;background:#fff8e8}#reading-notice h2{color:#794b0b;margin-top:0}

.extras-alert{border-left:4px solid #d99b29;padding:12px 16px;margin:12px 0;background:#fffbf2}.extras-alert>summary{font-weight:600}.condition-field>.hint{margin:6px 0 12px;line-height:1.4}

.excel-count-orange{color:#a85b00;}

.route-equipment-editor{border-block:1px solid #d8dfdc;margin:18px 0;padding:12px 0}.route-equipment-editor .form-grid>*{min-width:0}.route-equipment-editor textarea{resize:vertical;overflow-wrap:anywhere;min-height:76px}.route-equipment-editor select{max-width:100%}.dialog-error{padding:12px;background:#fff0ed;color:#9b241c;border:1px solid #eab3ad;border-radius:8px}
/* Compact history grouped by execution state. */
.excel-history-columns{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.excel-history-group{min-width:0}
.excel-history-group h3{font-size:14px;margin:0 0 8px;display:flex;justify-content:space-between}
.excel-history-group h3 span{font-weight:400;color:var(--muted)}
.excel-request-row{padding:0;margin:0 0 4px;border:1px solid #dce4df;border-left:4px solid #6b7280;border-radius:6px;background:#f3f4f6;color:#374151}
.excel-request-row summary{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:3px 8px;line-height:1.4;cursor:pointer;font-size:13px}
.excel-request-task{font-weight:600;min-width:0}
.excel-request-row time{font-size:12px;white-space:nowrap}
.excel-request-row p{padding:0 10px 10px;margin:0;font-size:13px;overflow-wrap:anywhere}
.excel-request-row[data-state="done"]{background:#edf8ef;color:#205c32;border-left-color:#258344}
.excel-request-row[data-state="failed"]{background:#fff3e5;color:#83410b;border-left-color:#bc6514}
.excel-request-row[data-state="running"]{background:#edf5ff;color:#204f8e;border-left-color:#3274c7}
.excel-history-empty{color:var(--muted);font-size:13px;margin:8px 0}
@media(max-width:900px){.excel-history-columns{grid-template-columns:1fr;gap:12px}}
