/* Shared action dimensions, independent of action color/classification. */
:root{--arkhe-control-height:32px}
body button:not(.passo):not(.patient):not(.appointment-card):not(.time-slot):not(.time-heading):not(.mini-date):not(.month-date):not(.month-add):not([data-control-size="custom"]):not([data-corner]):not(.report-floating-signature button),
body a:is(.button,.button-link,.btn,.return-link,[data-arkhe-action]),
body input:is([type=submit],[type=button],[type=reset]){
 box-sizing:border-box!important;height:var(--arkhe-control-height)!important;min-height:var(--arkhe-control-height)!important;max-height:var(--arkhe-control-height)!important;
 padding-top:0!important;padding-bottom:0!important;line-height:18px!important;
 display:inline-flex;align-items:center;justify-content:center;
}
body button:not(.passo):not(.patient):not(.appointment-card):not(.time-slot):not(.time-heading):not(.mini-date):not(.month-date):not(.month-add):not([data-control-size="custom"]):not([data-corner]):not(.report-floating-signature button){display:inline-flex}
body button.arkhe-trash:empty,body button[data-icon-only]{width:32px!important;min-width:32px!important;padding:0!important}

/* Scan metadata fields align with adjacent standard actions. */
body #scan-details input:is([type=date],[type=text]){box-sizing:border-box;height:var(--arkhe-control-height)!important;min-height:var(--arkhe-control-height)!important;padding-top:0!important;padding-bottom:0!important;line-height:18px}

/* Single-line form controls share the same height across all pages. */
body input:not([type]):not([data-control-size="custom"]),
body input:is([type=text],[type=date],[type=datetime-local],[type=time],[type=number],[type=email],[type=password],[type=search],[type=tel],[type=url]):not([data-control-size="custom"]),
body select:not([multiple]):not([size]):not([data-control-size="custom"]){
 box-sizing:border-box!important;height:32px!important;min-height:32px!important;
 padding-top:0!important;padding-bottom:0!important;
}
body input[type=date]:not([data-control-size="custom"]),body #scan-details #a-data{
 width:calc(10ch + 46px)!important;max-width:100%!important;min-width:0!important;
 justify-self:start;flex:0 0 auto!important;padding-left:8px!important;padding-right:8px!important;
}

/* Date column follows compact field instead of retaining its former 190px track. */
body #scan-details{grid-template-columns:calc(10ch + 46px) minmax(0,510px);column-gap:12px}
@media(max-width:650px){body #scan-details{grid-template-columns:minmax(0,1fr)}}

body #scan-details > div:first-child > label{font-size:10px;letter-spacing:0;white-space:nowrap}

/* Approved system action shadow. Functional overlays and menu rows opt out. */
:root{--arkhe-action-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 3px 12px rgba(121,80,179,.106)}
body :is(button,a.button,a.button-link,a.btn,a.return-link,a[data-arkhe-action],input[type=submit],input[type=button],input[type=reset]):not([role=menuitem]):not([data-corner]):not([data-action-shadow=none]):not(.report-floating-signature button):not([contenteditable=true] button):not(.report-image-resize button){box-shadow:var(--arkhe-action-shadow)!important}

/* Patient records and scheduled events are content cards, not 32px action buttons. */
body .patient-list-row > button.patient,body button.patient{display:block;box-sizing:border-box;height:auto!important;max-height:none!important;min-height:0!important;text-align:left;justify-content:initial;align-items:initial;white-space:normal;padding:16px!important}
body button.patient strong,body button.patient small{display:block}
body button.patient strong{line-height:1.3;margin-bottom:4px}
body button.patient small{line-height:1.5;font-weight:400}

/* Filled actions need a slightly denser external shadow for equal visual presence. */
body :is([data-arkhe-action=save],[data-arkhe-action=download-pdf],[data-arkhe-action=document],[data-arkhe-action=new-exam],[data-arkhe-action=upload-scan]):not([data-action-shadow=none]){--arkhe-action-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 3px 12px rgba(121,80,179,.18)!important}

body #p-nome,body .patient-fields input[name="nome"],body #registration input[name="nome"]{text-transform:uppercase}
