/* Socios Pro / responsive and dual theme harmonization / v1.1.0
   Applies only to presentation; does not override business logic. */
:root,[data-theme="light"]{color-scheme:light}
[data-theme="dark"]{color-scheme:dark}
html,body,#root{max-width:100%;min-width:0}
*,*::before,*::after{box-sizing:border-box}
body{overflow-x:clip}
body :is(.containerSection,.containerGrid,.containerMain,.reportsContainer,.modal-content,.profesionales-container){min-width:0;max-width:100%}
body :is(.containerSection,.containerMain,.modal-content,.cardText,.cardProdcutSelected,.cardProdcutmasVendido) :is(h1,h2,h3,h4,h5,h6,p,span,label,small){overflow-wrap:break-word}
body :is(.containerSection,.modal-content) :is(h1,h2,h3,h4,h5,h6,label,legend,p){white-space:normal!important;height:auto!important;min-height:0;line-height:1.42}
body :is(.containerSection,.modal-content,.profesionales-container) :is(.gastosHeader,.evaluacionesHeader,.paymentMethodsHeader,.profesionales-header,.pacientes-header,.headerActions,.gastosHeaderActions,.deFlexContent,.deFlexBtnsModal,.actions,.filters,.filterRow){flex-wrap:wrap;gap:12px;min-width:0}
/* Consistent, accessible buttons. Exclude toggles, icon-only controls and close buttons from forced dimensions. */
body :is(.containerSection,.modal-content,.profesionales-container) :is(button,[role="button"],input[type="button"],input[type="submit"],.btnPost,.btnSave,.btnAgregar,.btnGuardar,.btn-add){
 box-sizing:border-box;min-height:42px;max-width:100%;border-radius:10px;line-height:1.35;vertical-align:middle;
 white-space:normal;overflow-wrap:break-word;align-items:center;justify-content:center;gap:8px;
}
body :is(.containerSection,.modal-content,.profesionales-container) :is(button,[role="button"],.btnPost,.btnSave,.btnAgregar,.btnGuardar,.btn-add):not(.close):not(.eliminar):not(.editar):not(.theme-toggle-button){padding-block:10px}
body :is(.containerSection,.modal-content) :is(button,.btnPost,.btnSave,.btnAgregar,.btnGuardar,.btn-add) :is(svg,i){flex:0 0 auto}
body :is(.containerSection,.modal-content) :is(input,select,textarea){max-width:100%;min-width:0;line-height:1.4}
body :is(.containerSection,.modal-content) :is(input:not([type=checkbox]):not([type=radio]),select,textarea){color:var(--sp-ink)!important;caret-color:var(--sp-ink);background:var(--sp-soft)!important;border-color:var(--sp-line)!important}
body :is(.containerSection,.modal-content) :is(input,textarea)::placeholder{color:var(--sp-muted)!important;opacity:1}
html[data-theme] body :is(.containerSection,.modal-content,.profesionales-container) :is(.card,.panel,.statsCard,.configCard,.reservaCard,.metricCard,.form-group,.tableWrapper){border-color:var(--sp-line)}
html[data-theme] body :is(.containerSection,.modal-content,.profesionales-container) :is(.subtitle,.muted,.helper-text,.description,.placeholder,.empty-state){color:var(--sp-muted)!important}
html[data-theme] body .navbarDashboard,html[data-theme] body .navbarDashboard a{color:var(--sp-on-nav)!important}
html[data-theme] body .navbarDashboard a[data-ec-appearance]{display:flex;align-items:center;min-height:46px;gap:14px;white-space:normal;overflow-wrap:break-word;padding:10px 16px}
html[data-theme] body .navbarDashboard a[data-ec-appearance]:focus-visible{outline:2px solid var(--sp-on-nav);outline-offset:-3px}
html[data-theme] body .containerSection :is(.btnPost,.btnSave,.btnAgregar,.btnGuardar,.btn-add):not(:disabled),html[data-theme] body .modal-content :is(.btnPost,.btnSave,.btnAgregar,.btnGuardar,.btn-add):not(:disabled){background:var(--sp-action)!important;color:var(--sp-on-action)!important;border-color:var(--sp-action)!important}
html[data-theme] body .containerSection :is(.btnPost,.btnSave,.btnAgregar,.btnGuardar,.btn-add) :is(span,i,svg),html[data-theme] body .modal-content :is(.btnPost,.btnSave,.btnAgregar,.btnGuardar,.btn-add) :is(span,i,svg){color:inherit!important}
html[data-theme] body .containerSection :is(.editar,.editar2,.duplicar,.btnEditar,.btn-editar,.btn-historial,.btnRecargar,.btnLimpiarFiltros){background:var(--sp-soft)!important;color:var(--sp-ink)!important;border-color:var(--sp-line)!important}
html[data-theme] body .containerSection :is(.eliminar,.btnEliminar,.btn-eliminar){background:var(--sp-soft)!important;color:var(--sp-danger)!important;border-color:var(--sp-line)!important}
body :is(.containerSection,.modal-content,.profesionales-container) :is(table,.table){max-width:100%;border-collapse:collapse}
body :is(.containerSection,.modal-content,.profesionales-container) :is(.table-container,.table-responsive,.tablaReservasContainer,.tableWrapper,.paymentMethodsTableContainer){max-width:100%;overflow-x:auto;overscroll-behavior-x:contain}
body :is(.containerSection,.modal-content) :is(td,th){overflow-wrap:anywhere;vertical-align:middle;line-height:1.5}
body :is(.containerSection,.modal-content) table td:last-child :is(button,a){margin:3px;vertical-align:middle}
body :is(.modal,.overlay-horarios){max-width:100vw;overflow-y:auto}
body .modal .modal-content{width:min(100%,1100px);max-height:calc(100dvh - 32px);overflow-y:auto;overscroll-behavior:contain}
body :is(img,video,canvas,svg){max-width:100%}
body img{height:auto}
@media(max-width:900px){
 body :is(.containerSection,.containerMain,.profesionales-container){padding-inline:clamp(10px,3vw,22px)}
 body :is(.containerSection,.modal-content) :is(.gastosHeader,.evaluacionesHeader,.paymentMethodsHeader,.profesionales-header,.pacientes-header,.headerActions){align-items:stretch}
}
@media(max-width:640px){
 html,body{width:100%;overflow-x:clip}
 body :is(.containerSection,.containerMain,.profesionales-container){padding-inline:10px}
 body :is(.containerSection,.modal-content,.profesionales-container) :is(.headerActions,.gastosHeaderActions,.paymentMethodsHeader,.gastosHeader,.evaluacionesHeader){flex-direction:column;align-items:stretch;gap:12px}
 body :is(.containerSection,.modal-content,.profesionales-container) :is(.headerActions,.gastosHeaderActions) > :is(button,a,input,select){max-width:100%}
 body .modal{padding:8px!important}
 body .modal .modal-content{width:100%!important;max-height:calc(100dvh - 16px)!important;padding:16px!important}
 body :is(.containerSection,.modal-content) :is(.form-row,.formRow,.filterRow,.filtros-grid){min-width:0;max-width:100%;gap:10px}
 body :is(.containerSection,.modal-content) :is(input,select,textarea){font-size:16px}
 body .containerSection :is(.table-container,.tableWrapper,.tablaReservasContainer){overflow-x:auto}
}
@media(prefers-reduced-motion:reduce){html:focus-within{scroll-behavior:auto}}
