/* Shared button presentation; navigation keeps native anchor semantics. */
:root{--action-height:48px;--action-gap:12px;--action-pad:10px 16px}
button,.button-link{align-items:center;justify-content:center;min-height:var(--action-height);max-width:100%;min-width:0;padding:var(--action-pad);border:1px solid transparent;text-align:center;white-space:normal;overflow-wrap:anywhere;line-height:1.5;gap:8px}
a.button-link.action-link{display:inline-flex;width:auto;max-width:100%;margin:0;padding:var(--action-pad);border:1px solid transparent;border-radius:9px;font:inherit;font-weight:700;line-height:1.5;background:#527082;color:#fff;text-decoration:none;vertical-align:middle;white-space:normal}
a.button-link.action-link[href$="/end"]{background:#a32222}
button[name="operation"][value="unset"]{background:#a32222}
a.button-link.action-link[href="/members/create"]{background:#138a72}
a.button-link.action-link[aria-current]{border:2px solid #17324d;text-decoration:underline;text-underline-offset:4px}
button:not(:disabled):hover,.button-link:hover{filter:brightness(.92)}
button:not(:disabled):active,.button-link:active{filter:brightness(.84)}
button:focus-visible,.button-link:focus-visible,a.interactive-card:focus-visible{outline:3px solid #17324d;outline-offset:3px;box-shadow:0 0 0 6px #fff}
button:disabled,.button-link[aria-disabled="true"]{opacity:.65;cursor:not-allowed}
a.interactive-card{cursor:pointer;text-decoration:none}
a.interactive-card:hover{box-shadow:0 0 0 2px #527082}
a.interactive-card:active{box-shadow:inset 0 0 0 2px #17324d}
.quick-filters{flex-wrap:wrap;overflow-x:visible}
.filter-actions,.member-filter-actions,.pagination,.member-pagination{flex-wrap:wrap;align-items:center}
.dashboard-section-head{flex-wrap:wrap;gap:12px}
.section-heading{flex-wrap:wrap;gap:12px}
button[name="action"][value="reset"]{background:#527082}
.dashboard-actions a.button-link[href="/members"],.dashboard-actions a.button-link[href="/course-classes"]{background:#527082}
/* AJ UI: common groups override screen-specific margins, not action semantics. */
.ui-actions,.dashboard-actions,.detail-nav,.report-list-head-actions,.report-created-actions,.filter-actions,.member-filter-actions,.master-actions,.master-nav{display:flex;flex-wrap:wrap;align-items:stretch;gap:var(--action-gap)}
:is(.ui-actions,.dashboard-actions,.detail-nav,.report-list-head-actions,.report-created-actions,.filter-actions,.member-filter-actions,.master-actions,.master-nav)>:is(button,.button-link,details){margin:0;min-width:0;flex:1 1 180px;width:auto}
:is(.member-shell,.master-shell,.report-detail-shell,.report-list-shell,.manage-shell) :is(button,.button-link){min-height:var(--action-height);padding:var(--action-pad)}
:is(.manage-head,.report-list-head,.dashboard-header,.section-heading){flex-wrap:wrap;gap:var(--action-gap)}
:is(.manage-head,.report-list-head,.dashboard-header,.section-heading)>*{min-width:0;max-width:100%}
.workflow-grid form{display:flex;flex-direction:column;min-width:0}.workflow-grid form button{margin-top:auto}.workflow-grid form label,.workflow-grid form p{margin-bottom:12px}
.master-item{display:flex;flex-direction:column;min-width:0}.master-item>.button-link{margin-top:auto}
.dashboard-management{align-self:start}.dashboard-management>summary.button-link{margin:0;width:100%;cursor:pointer;list-style:none;border:1px solid transparent}
.dashboard-actions>.button-link{align-self:start}
.dashboard-management>summary::-webkit-details-marker{display:none}.dashboard-management>summary::after{content:'＋';margin-left:8px}.dashboard-management[open]>summary::after{content:'−'}
.dashboard-management>.ui-actions{margin-top:12px;padding:12px;border:1px solid #d9e6e7;border-radius:9px;background:#fff}
summary:focus-visible{outline:3px solid #17324d;outline-offset:3px}
.button-link svg,.button-link img,button svg,button img{flex-shrink:0;max-width:1.5em;max-height:1.5em}
.filter-grid,.member-filters,.workflow-grid,.master-time{min-width:0}.filter-grid>*,.member-filters>*,.workflow-grid>*{min-width:0}
@media(max-width:420px){
 .ui-actions,.dashboard-actions,.detail-nav,.report-list-head-actions,.report-created-actions,.filter-actions,.member-filter-actions,.master-actions,.master-nav{display:grid;grid-template-columns:minmax(0,1fr);width:100%}
 :is(.ui-actions,.dashboard-actions,.detail-nav,.report-list-head-actions,.report-created-actions,.filter-actions,.member-filter-actions,.master-actions,.master-nav)>:is(button,.button-link,details){width:100%;min-width:0;margin:0;grid-column:auto}
 .summary-grid,.member-filters,.master-time{grid-template-columns:minmax(0,1fr)}
 .section-heading{align-items:stretch;flex-direction:column}.section-heading>.button-link{width:100%;margin:0}
}
@media(max-width:600px){
 a.button-link.action-link{min-height:var(--action-height);max-width:100%;margin-right:0}
 .member-filter-actions{gap:12px}
 .member-filter-actions button{min-width:0;flex:1 1 130px}
 .pagination,.member-pagination{gap:12px}
 .manage-shell .table-wrap{overflow:visible}
 .manage-shell .table-wrap table{min-width:0;width:100%}
 .manage-shell .table-wrap thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 .manage-shell .table-wrap tbody,.manage-shell .table-wrap tr{display:block}
 .manage-shell .table-wrap tr{margin:16px 0;padding:12px;border:1px solid #d9e7e4;border-radius:12px;background:#fff}
 .manage-shell .table-wrap td{display:flex;align-items:center;justify-content:space-between;gap:12px;white-space:normal;overflow-wrap:anywhere}
 .manage-shell .table-wrap td::before{content:attr(data-label);font-weight:700;flex-shrink:0}
}
