/* Novedades: componentes aislados para no alterar inventario ni configuracion. */
#shiftReportsScreen .news-machine{padding:24px;min-width:0;margin-bottom:20px}
#shiftReportsScreen .news-machine-header{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:22px;padding-bottom:16px;border-bottom:1px solid #e4e9f1}
#shiftReportsScreen .news-machine-index{font-weight:700;font-size:12px;letter-spacing:.07em;color:#546982}
#shiftReportsScreen .news-remove{color:#a54b58;border-color:#ead6da;background:#fff;padding:8px 12px}
#shiftReportsScreen .news-machine-controls{display:grid;grid-template-columns:minmax(0,1fr) minmax(120px,.35fr);gap:20px}
#shiftReportsScreen .news-field{display:flex;flex-direction:column;gap:9px;min-width:0;font-size:12px;line-height:1.5;font-weight:600;color:#53677e;margin:0}
#shiftReportsScreen .news-field select,#shiftReportsScreen .news-field textarea{width:100%;min-width:0;max-width:100%;font-size:14px;line-height:1.6;border:1px solid #d9e2ed;border-radius:9px;padding:12px;background:#fff;color:#26394f}
#shiftReportsScreen .news-field textarea{min-height:104px;resize:vertical;overflow-wrap:anywhere}
#shiftReportsScreen .news-procedure{margin-top:22px;padding:20px;background:#f8fafc;border:1px solid #e4e9f1;border-radius:12px}
#shiftReportsScreen .news-procedure[hidden]{display:none!important}
#shiftReportsScreen .news-procedure>.news-field{max-width:100%;display:grid;grid-template-columns:minmax(0,1fr) 150px;align-items:center;gap:16px}
#shiftReportsScreen .news-details{display:grid;grid-template-columns:1fr;gap:18px;margin-top:20px}
#shiftReportsScreen .news-tasks{margin-top:22px}
#shiftReportsScreen .news-add-machine{width:100%;border-style:dashed;padding:15px;min-height:48px}
#shiftReportsScreen .sr-summary #srSave{color:#364c65;background:#fff;border:1px solid #d9e2ed}
#shiftReportsScreen .sr-summary #srFinalize{background:#5364cf;color:#fff;border-color:#5364cf;margin-top:10px}
#shiftReportsScreen .sr-summary #srSave,#shiftReportsScreen .sr-summary #srFinalize{width:100%;min-height:46px;font-size:12px;font-weight:600}
#shiftReportsScreen [data-report-tab="mail"]{display:none!important}
#shiftReportsScreen .sr-history-wrap table{table-layout:fixed;width:100%}
#shiftReportsScreen .sr-history-wrap th:nth-child(1){width:14%}
#shiftReportsScreen .sr-history-wrap th:nth-child(2){width:22%}
#shiftReportsScreen .sr-history-wrap th:nth-child(3){width:28%}
#shiftReportsScreen .sr-history-wrap th:nth-child(4){width:36%}
#shiftReportsScreen .sr-history-wrap td:nth-child(2){white-space:normal}
#shiftReportsScreen .sr-turn-pill{display:inline-block;margin:3px 4px 3px 0;white-space:nowrap}
#shiftReportsScreen .news-stopped{font-weight:600;color:#7a4b24;padding:12px;background:#fff8ed;border-radius:8px}
@media(min-width:1500px){#shiftReportsScreen .news-details{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){#shiftReportsScreen .news-machine{padding:18px}#shiftReportsScreen .news-machine-controls{grid-template-columns:minmax(0,1fr)}#shiftReportsScreen .news-procedure{padding:16px}#shiftReportsScreen .news-procedure>.news-field{display:flex;align-items:stretch}#shiftReportsScreen .sr-summary{display:flex;flex-direction:column;align-items:stretch}#shiftReportsScreen .sr-history-wrap td:last-child{display:block;width:100%}#shiftReportsScreen .sr-history-wrap td:last-child:before{content:none}#shiftReportsScreen .sr-history-wrap td:nth-child(2):before{content:'NOVEDADES';display:block;margin-bottom:10px}#shiftReportsScreen .sr-day-actions{flex-wrap:wrap}#shiftReportsScreen .news-field select{font-size:16px}}
@media(prefers-reduced-motion:reduce){#shiftReportsScreen *{scroll-behavior:auto}}

#srNightNote{display:none!important}
#portalConfirmation[data-kind]:not([data-kind="delete"]) .portal-confirm-symbol{background:#eef1fc;color:#5364cf;border-color:#dee3f8}
#portalConfirmation[data-kind]:not([data-kind="delete"]) #portalConfirmationAccept{background:#5364cf;border-color:#5364cf}
@media(max-width:760px){
 #shiftReportsScreen #srHistory table[data-mobile-cards] td:last-child{display:block!important;grid-template-columns:none!important;width:100%!important}
 #shiftReportsScreen #srHistory table[data-mobile-cards] td:last-child>.sr-day-actions{width:100%!important;max-width:none!important;grid-column:1/-1;display:flex!important;flex-wrap:wrap!important}
 #shiftReportsScreen #srHistory table[data-mobile-cards] .sr-day-actions>button{flex:1 1 110px!important;min-width:0}
 #shiftReportsScreen #srHistory table[data-mobile-cards] .sr-day-actions>.portal-day-delete{flex:0 0 44px!important}
}

/* La narracion conserva exactamente las mayusculas y minusculas ingresadas. */
#shiftReportsScreen .news-machine textarea,.sr-read-content .sr-read-machine p{ text-transform:none!important; }
#shiftReportsScreen .sr-day-actions .news-continue{background:#eef1ff;border-color:#d9dffc;color:#4255b5;font-weight:600;white-space:normal}

/* Maquinas y busqueda de contenido: filtros alineados y columnas que se adaptan. */
#shiftReportsScreen .portal-history-filters{grid-template-columns:minmax(130px,.6fr) minmax(130px,.6fr) minmax(180px,.9fr) minmax(110px,.5fr) minmax(240px,1.4fr)}
#shiftReportsScreen .portal-history-filters>label{min-width:0}
#shiftReportsScreen .portal-history-filters select{display:block;width:100%;min-width:0;max-width:100%;height:46px;margin-top:8px;padding:11px 13px;border:1px solid #d2dde6;border-radius:8px;background:#fff;color:#2e475b;font-size:14px}
#shiftReportsScreen .news-history-machine-list{display:flex;flex-wrap:wrap;gap:6px;min-width:0}
#shiftReportsScreen .news-history-machine{display:inline-block;border-radius:6px;padding:5px 8px;background:#f0f3f7;color:#52677c;font-size:11px;line-height:1.5;overflow-wrap:anywhere;white-space:normal;max-width:100%}
#shiftReportsScreen .news-history-machine.selected{color:#4255b5;background:#edf0ff}
#shiftReportsScreen #srHistory .sr-day-actions{display:flex;flex-wrap:wrap;min-width:0;gap:8px}
#shiftReportsScreen #srHistory .sr-day-actions button{max-width:100%;white-space:normal}
@media(max-width:1100px){#shiftReportsScreen .portal-history-filters{grid-template-columns:repeat(2,minmax(0,1fr))}#shiftReportsScreen .portal-history-search{grid-column:1/-1}}
@media(max-width:760px){
 #shiftReportsScreen .portal-history-machine,#shiftReportsScreen .portal-history-search{grid-column:1/-1}
 #shiftReportsScreen .portal-history-filters select{font-size:16px;height:44px}
 #shiftReportsScreen #srHistory table[data-mobile-cards] td.news-history-machines{display:grid;grid-template-columns:90px minmax(0,1fr);width:100%;min-width:0}
 #shiftReportsScreen #srHistory table[data-mobile-cards] td.news-history-machines:before{content:attr(data-mobile-label);display:block}
 #shiftReportsScreen #srHistory .news-history-machine-list{justify-content:flex-end}
}

#shiftReportsScreen .news-history-machine-list{display:grid;grid-template-columns:minmax(0,1fr);width:100%}
#shiftReportsScreen .news-history-machine{display:flex;align-items:center;justify-content:space-between;gap:10px;text-transform:uppercase}
#shiftReportsScreen .news-history-machine-name{min-width:0;overflow-wrap:anywhere}
#shiftReportsScreen .news-history-stop{flex-shrink:0;font-weight:650;font-size:10px;padding:3px 6px;border:1px solid #dce3eb;border-radius:5px;background:#fff;color:#52677c;white-space:nowrap}
#shiftReportsScreen .news-history-stop.stopped{border-color:#ebd2c1;background:#fff5eb;color:#945221}
@media(max-width:760px){#shiftReportsScreen #srHistory table[data-mobile-cards] td.news-history-machines{display:block!important}#shiftReportsScreen #srHistory table[data-mobile-cards] td.news-history-machines:before{margin-bottom:8px}#shiftReportsScreen #srHistory td.news-history-machines>.mobile-turns,#shiftReportsScreen #srHistory .news-history-machine-list{width:100%}}

#shiftReportsScreen .news-history-machine-info{display:flex;flex-direction:column;align-items:flex-end;gap:5px;flex-shrink:0}
#shiftReportsScreen .news-history-state{display:inline-flex;align-items:center;justify-content:center;min-width:33px;padding:3px 7px;border:1px solid #dce3eb;border-radius:5px;background:#fff;color:#52677c;font-size:11px;font-weight:700;line-height:1.5}
#shiftReportsScreen .news-history-state.ok{background:#eaf6ef;border-color:#c9e4d4;color:#216c44}
#shiftReportsScreen .news-history-state.not-ok{background:#fff0f0;border-color:#edcbce;color:#ab3444}

@media(max-width:760px){#shiftReportsScreen .portal-history-detention{grid-column:1/-1}}
/* Acciones compactas: el numero de turnos pendientes no aumenta los botones de la fila. */
#shiftReportsScreen .sr-history-wrap th:nth-child(1){width:14%}
#shiftReportsScreen .sr-history-wrap th:nth-child(2){width:24%}
#shiftReportsScreen .sr-history-wrap th:nth-child(3){width:32%}
#shiftReportsScreen .sr-history-wrap th:nth-child(4){width:30%}
#shiftReportsScreen #srHistory .sr-day-actions{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;gap:8px;max-width:310px;align-items:stretch}
#shiftReportsScreen #srHistory .sr-day-actions .news-continue{grid-column:1/-1;min-height:38px;background:#eef1fb;border-color:#dce2f4;color:#42577d}
#shiftReportsScreen #srHistory .sr-day-actions>button{min-height:38px;margin:0;font-size:11px;padding:9px 10px}
#shiftReportsScreen #srHistory .sr-day-actions>.portal-day-delete{width:38px;height:38px;align-self:center;font-size:20px}
#shiftReportsScreen .news-history-machine[hidden]{display:none!important}
#shiftReportsScreen #srHistory .news-machines-toggle{background:transparent;border:0;box-shadow:none;color:#526b94;font-size:10px;padding:7px 0 0;min-height:28px;text-align:left}
#newsContinueDialog{width:min(480px,calc(100vw - 32px));padding:0;max-height:calc(100dvh - 32px);border:1px solid #dce4ed;border-radius:16px;box-shadow:0 24px 80px #152a4130;overflow:auto;color:#26394f;font-family:system-ui,-apple-system,"Segoe UI",sans-serif}
#newsContinueDialog::backdrop{background:#162a3d66;backdrop-filter:blur(3px)}
.news-continue-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;padding:25px 26px 15px}
.news-dialog-eyebrow{font-size:10px;letter-spacing:1.3px;font-weight:600;color:#78899b}
#newsContinueTitle{margin:10px 0;font-size:21px;line-height:1.3}
#newsContinueDate{margin:0;color:#61758a;font-size:14px}
#newsContinueClose{border:0;background:transparent;font-size:25px;color:#738497;min-width:36px;height:36px;padding:0}
.news-continue-choices{display:grid;gap:12px;padding:8px 26px 25px}
#newsContinueDialog .news-continue-choice{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:16px 18px;border:1px solid #dce4ed;background:#fff;border-radius:10px;min-height:86px;text-align:left;color:#2e465b;font:inherit;cursor:pointer}
#newsContinueDialog .news-continue-choice:hover{background:#f5f7fc;border-color:#a8b7d3}
#newsContinueDialog button:focus-visible{outline:3px solid #8ca0e0;outline-offset:3px}
.news-continue-choice-text{display:grid;gap:4px;min-width:0}
.news-continue-choice-text strong{font-size:14px;letter-spacing:.3px}
.news-continue-hours{font-size:13px;color:#60758c}
.news-continue-people{font-size:10px;color:#8593a4;line-height:1.6;overflow-wrap:anywhere}
.news-continue-arrow{font-size:22px;color:#687da3}
.news-continue-foot{display:flex;justify-content:flex-end;padding:16px 26px;background:#f7f9fc;border-top:1px solid #e5ebf1}
#newsContinueCancel{background:#fff;border:1px solid #d7e0eb;border-radius:8px;padding:11px 18px;color:#455e73;font-size:12px;min-height:42px;cursor:pointer}
@media(max-width:760px){
 #shiftReportsScreen #srHistory table[data-mobile-cards] td:last-child>.sr-day-actions{display:grid!important;max-width:none;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto}
 #shiftReportsScreen #srHistory table[data-mobile-cards] .sr-day-actions>button{min-height:44px}
 #shiftReportsScreen #srHistory .sr-turn-pill{font-size:10px}
 .news-continue-head{padding:22px 20px 14px}.news-continue-choices{padding:8px 20px 22px}.news-continue-foot{padding:14px 20px}
 #newsContinueTitle{font-size:20px}
}
#shiftReportsScreen #srHistory .sr-history-turn{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:70px;padding:7px 9px;margin:3px 4px 3px 0;line-height:1.3}
#shiftReportsScreen #srHistory .sr-history-turn strong{font-size:10px;font-weight:650}
#shiftReportsScreen #srHistory .sr-history-turn small{font-size:9px;font-weight:500;letter-spacing:.1px}
@media(max-width:760px){
 #shiftReportsScreen .sr-header .sr-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 #shiftReportsScreen .sr-header .sr-actions button{min-width:0;font-size:11px!important;padding:10px 8px;line-height:1.4}
 #shiftReportsScreen #srHistoryRows td:nth-child(2) .mobile-turns{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;gap:5px}
 #shiftReportsScreen #srHistory .sr-history-turn{width:100%;min-width:0;max-width:none;margin:0;padding:7px 4px;white-space:normal}
}

.news-read-tools{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 22px;padding-bottom:16px;border-bottom:1px solid #e7edf3}
.news-read-tools button{font-size:12px;min-height:42px;padding:10px 15px}
@media(max-width:760px){.news-read-tools button{flex:1;min-height:44px;white-space:normal}}
