/* Shared action geometry. Content cards and calendar slots keep their own layout. */
body.workspace-shell {
 --workspace-blue:#347d70;
 --control-height:44px;
 --control-font:14px;
 --control-padding-y:11px;
 --control-padding-x:12px;
 --control-gap:8px;
 --control-radius:9px;
}
body.workspace-shell button.secondary,
body.workspace-shell .button.secondary,
body.workspace-shell .btn-secondary,
body.workspace-shell .btn-info {
 border-color:#dcdde2;
}
body.workspace-shell .today-page {--today-accent:var(--workspace-blue)}
body.workspace-shell .today-search {min-height:calc(var(--control-height) + 12px)}
body.workspace-shell .today-search input,
body.workspace-shell .today-search button {
 min-height:var(--control-height);
 height:var(--control-height);
 padding-block:var(--control-padding-y);
 font-size:var(--control-font);
 margin:0;
}
body.workspace-shell .event-tabs > button {
 margin:0;
 min-height:var(--control-height);
 height:var(--control-height);
 padding:6px;
 line-height:20px;
}
body.workspace-shell #patient-mode-switch > button {min-height:var(--control-height);margin:0}
@media(max-width:780px),(pointer:coarse) {
 body.workspace-shell #close-visit {width:44px;height:44px;min-width:44px;min-height:44px;flex:none}
}
@media(min-width:781px) and (pointer:fine) {
 body.workspace-shell {--control-height:36px;--control-padding-y:7px}
}
body.workspace-shell :where(button,.button,.btn) {
 min-height:var(--control-height);
 padding:var(--control-padding-y) var(--control-padding-x);
 font-size:var(--control-font);
 line-height:20px;
 border-radius:var(--control-radius);
}
/* Gap belongs to a group, never to whichever button happens to follow another. */
body.workspace-shell :is(.action-row,.patient-form-actions,.group-save-actions,
 .staff-room-actions,.tasks-form-actions,.tasks-form-head,.task-actions,
 .drawer-foot,.booking-slot-nav,.staff-actions,.list-toolbar) {
 gap:var(--control-gap);
}
body.workspace-shell :is(.action-row,.patient-form-actions,.group-save-actions,
 .staff-room-actions,.tasks-form-actions,.tasks-form-head,.task-actions,
 .drawer-foot,.booking-slot-nav,.staff-actions,.list-toolbar,
 .patient-detail-tabs,.tasks-filters,.calendar-toolbar) > :where(button,.button,.btn) {
 margin:0;
}
body.workspace-shell :is(.group-save-actions,.staff-room-actions,.tasks-form-actions,.action-row) {
 flex-wrap:wrap;
}
body.workspace-shell :is(.group-save-actions,.staff-room-actions,.tasks-form-actions,.action-row) > :where(button,.button,.btn) {
 max-width:100%;
 white-space:normal;
 overflow-wrap:break-word;
}
body.workspace-shell :where(button,.button,.btn):focus-visible {
 outline:3px solid #347d70;
 outline-offset:3px;
}
body.workspace-shell :where(button,.button,.btn):disabled,
body.workspace-shell :where(button,.button,.btn)[aria-disabled="true"] {
 cursor:not-allowed;
 opacity:.55;
}
/* Explicit action groups override older screen-specific large padding. */
body.workspace-shell :is(.group-save-actions,.staff-room-actions,.tasks-form-actions,
 .drawer-foot,.list-toolbar,.tasks-heading,.task-actions,.patient-detail-tabs,.staff-actions) > button {
 min-height:var(--control-height);
 height:auto;
 padding:var(--control-padding-y) var(--control-padding-x);
 font-size:var(--control-font);
 line-height:20px;
}
body.workspace-shell .staff-heading .staff-actions > button:not([hidden]) {
 margin:0;
 min-height:var(--control-height);
 height:auto;
 padding:var(--control-padding-y) var(--control-padding-x);
 font-size:var(--control-font);
 line-height:20px;
}
body.workspace-shell .tasks-filters button {
 min-height:var(--control-height);
 padding:var(--control-padding-y) 12px;
 font-size:var(--control-font);
 line-height:20px;
 margin:0;
}
body.workspace-shell .tasks-heading #tasks-new,
body.workspace-shell .task-actions .task-complete,
body.workspace-shell .task-actions .task-edit {
 min-height:var(--control-height);
 height:auto;
 padding:var(--control-padding-y) var(--control-padding-x);
 font-size:var(--control-font);
 line-height:20px;
}
body.workspace-shell .tasks-heading #tasks-new {background:#347d70;border-radius:var(--control-radius)}
body.workspace-shell .tasks-heading #tasks-new:hover {background:#29685d}
body.workspace-shell .tasks-refinements .task-filter-control select,
body.workspace-shell .tasks-refinements input {
 min-height:var(--control-height);
 height:var(--control-height);
 padding-block:var(--control-padding-y);
 font-size:var(--control-font);
}
@media(max-width:780px),(pointer:coarse) {
 body.workspace-shell :is(.task-actions,.patient-form-actions,.staff-actions,
 .staff-room-actions,.group-save-actions,.tasks-form-actions,.list-toolbar,
 .drawer-foot,.booking-slot-nav,.patient-detail-tabs) > :where(button,.button,.btn) {
  min-height:44px;
 }
}
@media(max-width:760px) {
 body.workspace-shell .staff-heading .staff-actions {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-flow:row;gap:8px}
 body.workspace-shell .staff-heading .staff-actions #practitioner-archive {grid-column:1/-1}
 body.workspace-shell .staff-heading .staff-actions > button {min-width:0;white-space:normal;overflow-wrap:break-word}
 body.workspace-shell .tasks-filters {display:grid;grid-template-columns:minmax(0,1.4fr) repeat(2,minmax(0,1fr));width:100%}
 body.workspace-shell .tasks-filters button {min-width:0;display:flex;align-items:center;justify-content:center;gap:4px;white-space:normal;padding-inline:4px}
 body.workspace-shell .tasks-filters button span {margin-left:0;padding:2px 5px;font-size:12px}
}
@media(max-width:360px) {
 body.workspace-shell .tasks-filters button {font-size:13px}
}
@media(max-width:420px) {
 body.workspace-shell .tasks-refinements {grid-template-columns:minmax(0,1fr)}
 body.workspace-shell .tasks-refinements input {grid-column:1}
}

