/* Stitch cards retain Clinic data, actions and module permissions. */
.stitch-lab-card>header.stitch-lab-overview{display:grid;grid-template-columns:minmax(0,1fr) minmax(300px,1fr);align-items:start;gap:16px 24px}
.stitch-lab-case,.stitch-lab-logistics{min-width:0}
.stitch-lab-logistics{display:flex;flex-direction:column;align-items:flex-end;gap:8px;text-align:right}
.stitch-lab-logistics .stitch-lab-meta,.stitch-lab-logistics .stitch-order-dates{justify-content:flex-end;text-align:right;width:100%}
.stitch-lab-logistics .stitch-state{align-items:flex-end;text-align:right}
.stitch-lab-logistics .stitch-order-dates{margin-top:0}
@media(max-width:650px){.stitch-lab-card>header.stitch-lab-overview{grid-template-columns:minmax(0,1fr)}.stitch-lab-logistics{width:100%}}
/* The card opens the same receipt dialog as the patient dossier. */
dialog.patient-olab-review-dialog{position:fixed;inset:0;margin:auto!important;box-sizing:border-box;width:min(520px,calc(100vw - 28px));max-width:calc(100vw - 28px);max-height:calc(100dvh - 28px)}
.patient-olab-review-dialog .btn{min-height:44px;padding:10px 14px;border-radius:10px;font:600 12px/1.4 inherit;cursor:pointer;white-space:normal}
.patient-olab-review-dialog .btn-primary{background:#1d72c9;color:#fff;border:1px solid #1d72c9}
.patient-olab-review-dialog .btn-ghost{background:#fff;color:#185a92;border:1px solid #cbdce5}
html[data-theme="dark"] .patient-olab-review-dialog{background:#182635;color:#e6eef7}
html[data-theme="dark"] .patient-olab-review-shell>header{background:#203148;border-color:#364c60}
html[data-theme="dark"] .patient-olab-review-shell>header :is(p,small){color:#adc1d6}
html[data-theme="dark"] .patient-olab-review-state{background:#203148;border-color:#364c60}
html[data-theme="dark"] .patient-olab-review-state :is(span,strong,small),html[data-theme="dark"] .patient-olab-review-body>p:not(.patient-olab-review-error){color:#dce8f5}
html[data-theme="dark"] .patient-olab-review-shell>footer{border-color:#364c60}
html[data-theme="dark"] .patient-olab-review-dialog :is(.btn-ghost,.patient-olab-review-close){background:#203148;color:#dce8f5;border-color:#48617a}
:root{--stitch-card:var(--white,#fff);--stitch-soft:#eff4ff;--stitch-track:#d3e4fe;--stitch-primary:#00685f;--stitch-active:#4648d4}
[data-theme="dark"]{--stitch-soft:#203148;--stitch-track:#304964;--stitch-primary:#6bd8cb;--stitch-active:#b1afff}
.stitch-patient-list{display:grid;grid-template-columns:minmax(0,1fr);gap:11px;padding:12px;background:var(--surface)}
#page-patients.patient-directory .stitch-patient-card{display:grid;align-items:center;min-width:0}
.stitch-patient-card .pd-person{min-width:0;gap:10px}.stitch-patient-card .pd-person>div{min-width:0}.stitch-patient-card .pd-name{font-size:15px;line-height:1.4;text-align:left;overflow-wrap:anywhere}
.stitch-patient-card .pd-avatar{border-radius:10px;background:var(--stitch-soft);color:var(--stitch-primary);width:38px;height:38px;flex-shrink:0}
.stitch-patient-card .pd-person small{display:block;font-size:11px;color:var(--ink3)}
.stitch-patient-contact>small,.stitch-patient-place>small{display:block;text-transform:uppercase;font:10px var(--mono);color:var(--ink3);margin-bottom:5px}
.stitch-patient-contact>span,.stitch-patient-place>span,.stitch-patient-place>b{display:block;font-size:12px;line-height:1.6;overflow-wrap:anywhere}.stitch-patient-place>b{font-weight:500;color:var(--ink3)}
.stitch-patient-card .pd-contact{margin-top:5px;gap:6px}.stitch-patient-processes{display:flex;align-items:center;gap:7px;flex-wrap:wrap;min-width:0}
.stitch-summary{border:0;background:var(--stitch-soft);color:var(--ink3);border-radius:6px;padding:5px 8px;font:11px inherit;cursor:pointer}
.stitch-patient-card .stitch-open-patient,.stitch-open-olab{border:0;border-radius:10px;background:#00685f;color:white;padding:10px 13px;font:600 12px inherit;cursor:pointer;white-space:nowrap;min-height:40px;width:auto;height:auto;display:inline-flex;align-items:center;justify-content:center}
.stitch-patient-details{width:100%;border:0;border-collapse:collapse}.stitch-patient-details td{padding:0!important;border:0!important}.stitch-patient-details:has(tr[style*="display:none"]),.stitch-patient-details:has(tr[style*="display: none"]){display:none}
.stitch-lab-list{display:grid;gap:14px;grid-template-columns:minmax(0,1fr)}
.stitch-lab-card{padding:18px;background:var(--stitch-card);color:var(--ink);border-radius:15px;box-shadow:0 2px 5px #0b1c3008;min-width:0}
.stitch-lab-card>header,.stitch-lab-identity{display:flex;align-items:center;gap:12px}.stitch-lab-card>header{justify-content:space-between;flex-wrap:wrap}.stitch-lab-identity{min-width:0}.stitch-lab-identity>div{min-width:0}.stitch-lab-identity small{font:11px var(--mono);color:var(--ink3);overflow-wrap:anywhere}.stitch-lab-card h3{font-size:16px!important;line-height:1.5;margin:3px 0!important;overflow-wrap:anywhere}
.stitch-teeth{background:var(--stitch-soft);color:var(--stitch-primary);border-radius:10px;padding:10px;max-width:210px;font:12px var(--mono);overflow-wrap:anywhere}
.stitch-status{font:11px var(--mono);border-radius:18px;padding:6px 10px;background:var(--stitch-soft);color:var(--stitch-primary);line-height:1.5}
.stitch-work{font-size:13px;line-height:1.7;margin:12px 0;overflow-wrap:anywhere}.stitch-lab-meta{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;font-size:11px;color:var(--ink3)}
.stitch-lab-card>footer{display:flex;justify-content:flex-end;align-items:center;gap:9px;flex-wrap:wrap;margin-top:14px}.stitch-lab-card .patient-olab-quick-actions{margin:0}
.stitch-olab-flow{background:var(--stitch-soft);border-radius:11px;padding:13px;margin-top:14px}.stitch-flow-heading{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;font:11px var(--mono);line-height:1.6}.stitch-flow-heading span{color:var(--stitch-active)}
.stitch-flow-track{display:flex;gap:3px;border-radius:6px;overflow:hidden;height:8px;margin-top:12px}.stitch-flow-track span{flex:1;background:var(--stitch-track)}.stitch-flow-track .is-done{background:var(--stitch-primary)}.stitch-flow-track .is-current{background:var(--stitch-active)}
.stitch-flow-labels{display:flex;gap:5px;margin-top:8px}.stitch-flow-labels span{flex:1;text-align:center;color:var(--ink3);font:10px var(--mono);line-height:1.5;overflow-wrap:anywhere}.stitch-flow-labels .is-current{color:var(--stitch-active)}.stitch-olab-flow>small{display:block;margin-top:8px;font-size:11px;color:var(--ink3)}
.stitch-lab-group{font-size:13px;padding:10px;color:var(--ink3)}
.stitch-completed-heading{padding:16px 4px 10px;font-size:13px;color:var(--ink3)}

@media(max-width:900px){#page-patients.patient-directory .stitch-patient-card{grid-template-columns:minmax(0,1fr) auto;padding:14px}.stitch-patient-contact,.stitch-patient-place{grid-column:1;display:flex;align-items:center;gap:8px;flex-wrap:wrap}.stitch-patient-contact>small,.stitch-patient-place>small{margin:0}.stitch-patient-contact .pd-contact{margin:0}.stitch-patient-processes{grid-column:1/-1}.stitch-open-patient{grid-column:2;grid-row:1/4}.stitch-patient-list{padding:10px}.stitch-lab-card{padding:14px}}
@media(pointer:coarse){.stitch-summary,.stitch-open-olab,.stitch-patient-card .stitch-open-patient{min-height:44px}}
/* Exact compact arrangement approved in the exploration preview. */
#page-patients.patient-directory .stitch-patient-card{grid-template-columns:minmax(210px,1.8fr) minmax(100px,.85fr) minmax(100px,.85fr) minmax(150px,1.3fr) auto;gap:17px;padding:15px 18px;border-radius:13px;background:#fff;color:#0b1c30;box-shadow:0 2px 4px #0b1c3008;font-family:'Plus Jakarta Sans',sans-serif}
#page-patients .stitch-patient-card .pd-person{gap:10px;align-items:center}
#page-patients .stitch-patient-card .pd-avatar{width:37px;height:37px;border-radius:10px;background:#e5eeff;color:#00685f;font:600 12px 'JetBrains Mono',monospace}
#page-patients .stitch-patient-card .pd-name{font:700 15px/1.4 'Space Grotesk',sans-serif;color:#0b1c30;text-decoration:none;padding:0;border:0;background:none}
#page-patients .stitch-patient-card .pd-person small{font:10px/1.6 'Plus Jakarta Sans',sans-serif;color:#565e74;margin-top:4px}
#page-patients .stitch-patient-card .patient-document-copy{font:inherit!important;color:inherit!important;background:none!important;border:0!important;border-radius:0!important;padding:0!important;box-shadow:none!important;min-height:0!important;display:inline!important;text-decoration:none!important}
#page-patients .stitch-patient-card :is(.stitch-patient-contact,.stitch-patient-place,.stitch-patient-processes)>small{display:block;font:9px 'JetBrains Mono',monospace;letter-spacing:.5px;color:#6d7a77;text-transform:uppercase;margin:0 0 6px}
#page-patients .stitch-patient-card :is(.stitch-patient-contact,.stitch-patient-place)>b{display:block;font:500 12px 'Plus Jakarta Sans',sans-serif;color:#0b1c30}
#page-patients .stitch-patient-card .stitch-patient-contact>span{display:block;font:11px 'Plus Jakarta Sans',sans-serif;color:#565e74;margin-top:4px}
#page-patients .stitch-patient-card .stitch-patient-processes{display:block}
#page-patients .stitch-patient-card .stitch-summary{display:block;padding:0;border:0;background:none;color:#565e74;font:11px 'Plus Jakarta Sans',sans-serif;text-align:left;min-height:0}
#page-patients .stitch-patient-card .stitch-open-patient{justify-self:end;min-height:38px;height:auto;width:auto;padding:9px 13px;font:600 11px 'Plus Jakarta Sans',sans-serif;background:var(--teal2,#1D72C9);border-radius:11px;color:white;box-shadow:none;border:0}
@media(max-width:1250px){#page-patients.patient-directory .stitch-patient-card{grid-template-columns:minmax(195px,1.5fr) minmax(90px,1fr) minmax(95px,1fr) auto;gap:11px}.stitch-patient-processes{grid-column:1/4;grid-row:2}.stitch-open-patient{grid-column:4;grid-row:1/3}}
@media(max-width:1000px){#page-patients.patient-directory .stitch-patient-card{grid-template-columns:minmax(0,1fr) auto;padding:14px;gap:10px}#page-patients .stitch-patient-card :is(.stitch-patient-contact,.stitch-patient-place){grid-column:1;display:flex;align-items:center;gap:7px;flex-wrap:wrap}#page-patients .stitch-patient-card :is(.stitch-patient-contact,.stitch-patient-place)>small{margin:0}#page-patients .stitch-patient-card .stitch-patient-contact>span{margin:0}.stitch-patient-processes{grid-column:1;grid-row:auto}.stitch-open-patient{grid-column:2;grid-row:1/5}}
@media(max-width:650px){.stitch-patient-processes{grid-column:1/-1}.stitch-open-patient{grid-row:1/4}}/* Keep approved Stitch fonts scoped against Clinic's global font reset. */
#screen-app .stitch-patient-card *, #screen-app .stitch-lab-card *{font-family:'Plus Jakarta Sans',sans-serif!important}
#page-patients .stitch-patient-card .pd-name,#screen-app .stitch-lab-card h3,.stitch-lab-in-patient .stitch-work{font-family:'Space Grotesk',sans-serif!important}
#screen-app .stitch-lab-card h3{font-weight:600!important}
#page-patients .stitch-patient-card .pd-avatar,#page-patients .stitch-patient-card :is(.stitch-patient-contact,.stitch-patient-place,.stitch-patient-processes)>small,.stitch-lab-card :is(.stitch-teeth,.stitch-status,.stitch-teeth-list span,.stitch-lab-facts small,.stitch-due-date,.stitch-flow-heading *,.stitch-flow-labels span){font-family:'JetBrains Mono',monospace!important}
.stitch-lab-in-patient{border-radius:16px;color:#0b1c30;background:#fff;box-shadow:0 2px 4px #0b1c300a}
.stitch-lab-in-patient>header{align-items:flex-start}
.stitch-lab-in-patient h3{font-size:18px!important;margin:0!important}
.stitch-lab-in-patient .stitch-lab-identity small{display:block;font:12px/1.7 'Plus Jakarta Sans',sans-serif!important;color:#565e74;margin-top:5px}
.stitch-lab-in-patient .stitch-teeth{white-space:nowrap;background:#e5eeff}
.stitch-lab-in-patient .stitch-work{font-size:14px;font-weight:500;padding-top:15px;margin:0}
.stitch-teeth-list{display:flex;flex-wrap:wrap;gap:5px;margin-top:10px}
.stitch-teeth-list span{font-size:11px;padding:5px 8px;border-radius:6px;background:#e5eeff;color:#00685f}
.stitch-lab-facts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;background:#eff4ff;padding:13px;border-radius:10px;margin:15px 0}
.stitch-lab-facts small{display:block;font-size:10px;color:#6d7a77;margin-bottom:4px;text-transform:uppercase}
.stitch-lab-facts b{font-size:12px;font-weight:500;overflow-wrap:anywhere}
.stitch-lab-in-patient .stitch-olab-flow{margin-top:12px;padding:14px}
.stitch-lab-in-patient>footer{margin-top:15px}
.stitch-due-date{font-size:11px;line-height:1.7;margin-right:auto;color:#565e74}
.stitch-open-olab{background:var(--teal2,#1D72C9)}
.stitch-lab-in-patient .stitch-open-olab{font-size:12px;font-weight:600;padding:11px 15px;min-height:42px;border-radius:11px}
@media(max-width:1000px){.stitch-lab-facts{grid-template-columns:repeat(2,minmax(0,1fr))}}
.stitch-olab-flow>.stitch-flow-current{margin-top:11px;font-size:12px;line-height:1.7;color:#4648d4}
#screen-app.screen.active .main .stitch-lab-card h3{font-family:'Space Grotesk',sans-serif!important;font-weight:600!important}
#screen-app.screen.active .main .stitch-lab-card :is(.stitch-flow-heading *,.stitch-flow-labels span,.stitch-lab-facts small,.stitch-teeth,.stitch-teeth-list span,.stitch-status,.stitch-due-date){font-family:'JetBrains Mono',monospace!important}
#screen-app.screen.active .main .stitch-lab-card .stitch-work{font-family:'Space Grotesk',sans-serif!important}
.stitch-state{display:flex;flex-direction:column;gap:3px;max-width:48%;min-width:0}
.stitch-state>small{font-size:9px;color:#617789;text-transform:uppercase;letter-spacing:.4px}
.stitch-state .stitch-status{padding:3px 8px;line-height:1.35;border-radius:7px;font-size:10px;overflow-wrap:anywhere}
.stitch-state.is-sent .stitch-status{background:#e5f3fb;color:#08739b}
.stitch-state.is-production .stitch-status{background:#fff1d6;color:#946215}
.stitch-state.is-dispatch .stitch-status{background:#ede7ff;color:#6842a4}
.stitch-state.is-received .stitch-status{background:#dff5ef;color:#087a63}
.stitch-state.is-completed .stitch-status{background:#e4f5e6;color:#277c36}
.stitch-order-dates{display:flex;gap:10px 24px;flex-wrap:wrap;margin-top:8px}
.stitch-order-dates small{display:block;font-size:9px;color:#617789;text-transform:uppercase;margin-bottom:3px}
.stitch-order-dates b{font-size:11px;font-weight:500;color:#17394d}
.stitch-countdown b{color:#176fc1}
@media(max-width:650px){.stitch-state{max-width:100%}.stitch-order-dates{gap:10px 16px}}
.stitch-work-group+.stitch-work-group{margin-top:10px}
.stitch-work-group>b{font-weight:600}
/* Directory flow stays compact while allowing long work and tooth lists to wrap. */
.stitch-lab-card:not(.stitch-lab-in-patient){padding:10px 14px}
.stitch-lab-card:not(.stitch-lab-in-patient) .stitch-work{margin:5px 0;line-height:1.45}
.stitch-lab-card:not(.stitch-lab-in-patient) .stitch-teeth-list{margin-top:5px;gap:4px}
.stitch-lab-card:not(.stitch-lab-in-patient) .stitch-teeth-list span{padding:3px 6px}
.stitch-lab-card:not(.stitch-lab-in-patient) .stitch-order-dates{margin-top:6px;gap:6px 20px}
.stitch-lab-card:not(.stitch-lab-in-patient) .stitch-olab-flow{padding:8px 10px;margin-top:8px}
.stitch-lab-card:not(.stitch-lab-in-patient) .stitch-flow-track{margin-top:6px;height:6px}
.stitch-lab-card:not(.stitch-lab-in-patient) .stitch-flow-labels{margin-top:4px}
.stitch-lab-card:not(.stitch-lab-in-patient) .stitch-flow-current{margin-top:5px;font-size:11px;line-height:1.4}
.stitch-lab-card:not(.stitch-lab-in-patient)>footer{margin-top:6px}
.stitch-lab-card:not(.stitch-lab-in-patient) .stitch-open-olab{padding:7px 12px;min-height:36px}
@media(pointer:coarse){.stitch-lab-card:not(.stitch-lab-in-patient) .stitch-open-olab{min-height:44px}}
/* Shared primary action for patient and OLAB cards. */
#screen-app :is(.stitch-patient-card,.stitch-lab-card) :is(.stitch-open-patient,.stitch-open-olab){font-family:'Plus Jakarta Sans',sans-serif!important;font-size:12px!important;font-weight:600!important;line-height:1.25!important;min-height:38px!important;height:auto!important;width:auto!important;padding:9px 13px!important;border-radius:10px!important;border:0!important;background:var(--teal2,#1D72C9)!important;color:#fff!important;box-shadow:none!important;display:inline-flex!important;align-items:center;justify-content:center;white-space:nowrap}
@media(pointer:coarse){#screen-app :is(.stitch-patient-card,.stitch-lab-card) :is(.stitch-open-patient,.stitch-open-olab){min-height:44px!important}}
/* Coordination directories share the compact horizontal patient-card layout. */
.stitch-coordination-list{display:grid;grid-template-columns:minmax(0,1fr);gap:11px;padding:12px;background:var(--surface)}
#screen-app .stitch-coordination-card{display:grid;grid-template-columns:minmax(220px,1.7fr) minmax(140px,1fr) minmax(150px,1fr) minmax(150px,1fr) auto;align-items:center;gap:17px;padding:15px 18px;background:#fff;color:#0b1c30;border-radius:13px;box-shadow:0 2px 4px #0b1c3008;min-width:0}
#screen-app .stitch-coordination-card *{font-family:'Plus Jakarta Sans',sans-serif!important;min-width:0}
.stitch-coordination-person{display:flex;align-items:center;gap:10px}
#screen-app .stitch-coordination-person>div>b{font-family:'Space Grotesk',sans-serif!important;font-size:15px;font-weight:700;line-height:1.4;overflow-wrap:anywhere}
#screen-app .stitch-coordination-avatar{display:grid;place-items:center;width:37px;height:37px;flex-shrink:0;background:#e5eeff;color:#00685f;border-radius:10px;font:600 12px 'JetBrains Mono',monospace!important}
.stitch-coordination-person small{display:block;font-size:10px;line-height:1.6;color:#565e74;margin-top:3px;overflow-wrap:anywhere}
#screen-app .stitch-coordination-field>small{display:block;font:9px 'JetBrains Mono',monospace!important;letter-spacing:.5px;text-transform:uppercase;color:#6d7a77;margin-bottom:6px}
.stitch-coordination-field>span{font-size:12px;line-height:1.5;overflow-wrap:anywhere}
.stitch-coordination-field>em{display:block;font-style:normal;font-size:11px;line-height:1.5;color:#565e74;overflow-wrap:anywhere}
#screen-app .stitch-coordination-card .stitch-open-coordination{font:600 12px/1.25 'Plus Jakarta Sans',sans-serif!important;min-height:38px;height:auto;width:auto;padding:9px 13px;border-radius:10px;border:0;background:var(--teal2,#1D72C9);color:#fff;display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;cursor:pointer}
.stitch-coordination-state :is(.rad-status,.remision-dispatch-state){max-width:100%;font-size:11px;overflow-wrap:anywhere}
@media(max-width:1200px){#screen-app .stitch-coordination-card{grid-template-columns:minmax(200px,1.5fr) 1fr 1fr auto;gap:12px}.stitch-coordination-state{grid-column:2/4}.stitch-open-coordination{grid-column:4;grid-row:1/3}}
@media(max-width:800px){#screen-app .stitch-coordination-card{grid-template-columns:minmax(0,1fr) auto;padding:14px;gap:10px}.stitch-coordination-person{grid-column:1/-1}.stitch-coordination-field{grid-column:1}.stitch-coordination-state{grid-column:1}.stitch-open-coordination{grid-column:2;grid-row:2/5}.stitch-coordination-list{padding:10px}}
@media(pointer:coarse){#screen-app .stitch-coordination-card .stitch-open-coordination{min-height:44px}}
.stitch-purchase-group{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:8px 4px;font-size:12px;color:#565e74}
.stitch-coordination-state .supply-list-stage{max-width:100%;min-width:0}
#screen-app .stitch-coordination-state .supply-list-stage{display:inline-flex;align-items:center;padding:6px 9px;border-radius:8px;background:#edf2f7;color:#486579;line-height:1.4}
#screen-app .stitch-coordination-state .supply-stage-copy{display:flex;flex-direction:column;gap:3px}
#screen-app .stitch-coordination-state .supply-stage-copy strong{font-size:11px;font-weight:600}
#screen-app .stitch-coordination-state .supply-stage-copy time{font-size:10px}
#screen-app .stitch-coordination-state :is(.supply-list-stage-enviado,.supply-list-stage-recibido_proveedor){background:#e7f5fb;color:#176a8c}
#screen-app .stitch-coordination-state .supply-list-stage-en_camino{background:#ede7ff;color:#6842a4}
#screen-app .stitch-coordination-state :is(.supply-list-stage-completo,.supply-list-stage-pagado){background:#e7f7ef;color:#1b7550}
#screen-app .stitch-coordination-state :is(.supply-list-stage-en_revision,.supply-list-stage-inconsistencia){background:#fff1d6;color:#946215}
#screen-app .stitch-coordination-state .supply-list-stage-cancelado{background:#ffdad6;color:#93000a}
#orders-table>.clinic-order-grid-summary{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:12px 16px;font-size:12px;color:#565e74}

/* ORAD, OREM and OLAB share the same search-to-record spacing. */
#screen-app.screen :is(#page-radiology-orders,#page-referrals,#page-lab-orders).page :is(.rad-toolbar,.referrals-toolbar,#lab-directory-toolbar){display:flex!important;align-items:center!important;flex-wrap:wrap!important;box-sizing:border-box;width:100%;min-width:0;gap:10px!important;padding:14px!important;margin:0 0 12px!important;border:1px solid var(--border,#d9e5ed)!important;border-radius:14px!important;background:var(--card,#fff)!important}
#screen-app.screen :is(#page-radiology-orders,#page-referrals,#page-lab-orders).page :is(.rad-toolbar,.referrals-toolbar,#lab-directory-toolbar)>:is(.rad-search,input[type=search]){order:0!important;flex:1 1 280px!important;min-width:0!important;margin:0!important}
#screen-app.screen :is(#page-radiology-orders,#page-referrals,#page-lab-orders).page :is(.rad-toolbar,.referrals-toolbar,#lab-directory-toolbar) :is(input[type=search],select){box-sizing:border-box;height:44px!important;min-height:44px!important;padding:9px 12px!important;font-size:14px!important;border:1px solid var(--border,#d9e5ed)!important;border-radius:9px!important}
#screen-app.screen :is(#page-radiology-orders,#page-referrals,#page-lab-orders).page :is(.rad-toolbar,.referrals-toolbar,#lab-directory-toolbar)>:is(button,a,details>summary){min-height:44px!important;box-sizing:border-box}
#screen-app.screen :is(#page-radiology-orders,#page-referrals,#page-lab-orders).page :is(#rad-table-host,#remglobal-table,#lab-orders-table){padding:0!important;margin:0!important;border:0!important;border-radius:14px!important;background:transparent!important;min-width:0;max-width:100%}
#screen-app.screen #page-lab-orders.page #lab-panel-lista>.card{padding:0!important;margin:0!important;border:0!important;border-radius:14px!important;background:transparent!important;box-shadow:none!important}
#screen-app.screen :is(#page-radiology-orders,#page-referrals,#page-lab-orders).page :is(#rad-table-host,#remglobal-table,#lab-orders-table)>:is(.stitch-coordination-list,.stitch-lab-list){display:grid;grid-template-columns:minmax(0,1fr);box-sizing:border-box;gap:12px!important;padding:12px!important;margin:0!important;background:var(--surface,#f4f7fa);border-radius:14px}
#screen-app.screen :is(#page-radiology-orders,#page-referrals,#page-lab-orders).page :is(.stitch-coordination-card,.stitch-lab-card){margin:0!important;border-radius:14px!important}
#screen-app.screen #page-lab-orders #lab-orders-count-label:empty{display:none}
@media(max-width:700px){
 #screen-app.screen :is(#page-radiology-orders,#page-referrals,#page-lab-orders).page :is(.rad-toolbar,.referrals-toolbar,#lab-directory-toolbar)>:is(.rad-search,input[type=search]){flex-basis:100%!important;width:100%!important}
 #screen-app.screen :is(#page-radiology-orders,#page-referrals,#page-lab-orders).page :is(.rad-toolbar,.referrals-toolbar,#lab-directory-toolbar)>:is(button,a){width:auto!important}
}
#screen-app.screen #page-referrals #remglobal-kpis:empty{display:none!important;margin:0!important;padding:0!important}
#screen-app.screen #page-radiology-orders.page .rad-toolbar>label.rad-search{padding:0!important;border:0!important;background:transparent!important;height:auto!important;min-height:0!important}

.admin-overview{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:0 0 18px}
.admin-overview-card{min-width:0;display:flex;flex-direction:column;gap:8px;padding:18px;border:1px solid var(--border,#d9e5ed);border-radius:14px;background:var(--card,#fff)}
.admin-overview-card small{font-size:13px;font-weight:600;color:var(--ink3)}
.admin-overview-card strong{font-size:25px;line-height:1.3;overflow-wrap:anywhere;color:var(--ink)}
.admin-overview-card span{font-size:12px;line-height:1.4;color:var(--ink3)}
.admin-list-filters{display:flex;align-items:center;flex-wrap:wrap;gap:10px;padding:14px;margin-bottom:12px;border:1px solid var(--border,#d9e5ed);border-radius:14px;background:var(--card,#fff)}
.admin-list-filters>input[type=search]{flex:1 1 260px;min-width:0}
.admin-list-filters :is(input:not([type=checkbox]),select,.btn){box-sizing:border-box;min-height:44px;max-width:100%;border-radius:9px;padding:9px 12px;border:1px solid var(--border,#d9e5ed);font:inherit;font-size:14px;background:var(--card,#fff);color:var(--ink)}
.admin-list-filters>label{display:flex;align-items:center;gap:7px;font-size:13px}
#eq-panel-equipos>.tbl-toolbar,#page-waste .management-record-card>.card-head{display:none!important}
@media(max-width:800px){.admin-overview{grid-template-columns:repeat(2,minmax(0,1fr))}.admin-list-filters>input[type=search]{flex-basis:100%}.admin-list-filters>select{flex:1 1 140px;min-width:0}}

/* Seguimiento OLAB: etapas legibles y estado explícito, también sin color. */
.stitch-lab-card .stitch-olab-flow{background:transparent;border-top:1px solid var(--border,#dce5ed);border-radius:0;padding:16px 0 4px}
.stitch-lab-card .stitch-olab-flow .stitch-flow-heading b{font:600 13px/1.5 Roboto,Arial,sans-serif!important;color:var(--ink3,#526b80)}
.stitch-flow-stages{display:flex;list-style:none;padding:0;margin:16px 0 12px;gap:0}
.stitch-flow-stages>li{position:relative;flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;text-align:center;gap:6px;color:var(--ink3,#64788b)}
.stitch-flow-stages>li:not(:last-child)::after{content:'';position:absolute;height:2px;background:var(--border,#dce5ed);top:17px;left:calc(50% + 22px);right:calc(-50% + 22px)}
.stitch-flow-stages>li.is-done::after{background:#008b80}
.stitch-flow-node{display:grid;place-items:center;width:36px;height:36px;border:2px solid var(--border,#dce5ed);border-radius:50%;background:var(--white,#fff);color:var(--ink3,#64788b);font:700 14px/1 Roboto,Arial,sans-serif;box-sizing:border-box}
.is-done>.stitch-flow-node{background:#008577;border-color:#008577;color:white}
.is-current>.stitch-flow-node{background:#1975ce;border-color:#1975ce;color:white;box-shadow:0 0 0 4px rgba(25,117,206,.13)}
.stitch-flow-stage-label{font:600 13px/1.4 Roboto,Arial,sans-serif;padding:0 8px;color:var(--ink,#183b56)}
.stitch-flow-stage-state{font:400 11px/1.4 Roboto,Arial,sans-serif}
.is-current>.stitch-flow-stage-label,.is-current>.stitch-flow-stage-state{color:#1975ce}
.stitch-flow-caption{margin:10px 0 0;color:var(--ink3,#526b80);font:400 12px/1.5 Roboto,Arial,sans-serif}
@media(max-width:600px){.stitch-flow-stages{flex-direction:column;gap:0}.stitch-flow-stages>li{display:grid;grid-template-columns:36px minmax(0,1fr);column-gap:12px;row-gap:2px;text-align:left;align-items:center;padding-bottom:18px}.stitch-flow-stages>li:last-child{padding-bottom:0}.stitch-flow-node{grid-row:1/3}.stitch-flow-stage-label{padding:0}.stitch-flow-stages>li:not(:last-child)::after{top:40px;bottom:4px;left:17px;right:auto;width:2px;height:auto}}

/* Un traslado confirmado no equivale a recepción: vehículo entre los hitos. */
.stitch-flow-stages>li.has-transit::after{background:linear-gradient(90deg,#1975ce 50%,var(--border,#dce5ed) 50%)}
.stitch-flow-courier{position:absolute;left:100%;top:18px;transform:translate(-50%,-50%);z-index:1;display:grid;place-items:center;width:30px;height:30px;border:1px solid #9fc8e9;border-radius:50%;color:#1975ce;background:var(--white,#fff)}
.stitch-flow-courier svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7}
@media(max-width:600px){.stitch-flow-stages>li.has-transit{padding-bottom:46px}.stitch-flow-courier{left:18px;top:calc(100% - 25px)}.stitch-flow-stages>li.has-transit::after{background:linear-gradient(180deg,#1975ce 50%,var(--border,#dce5ed) 50%)}}
