/* Shared small-screen behavior. Tables retain every business field. */
body.team-dialog-open{overflow:hidden}
body.team-layout :is(main,section,article,form,.form-grid>*,.org-grid>*,.detail-content>*){min-width:0}
body.team-layout :is(input,select,textarea){max-width:100%;min-width:0}
body.team-layout :is(button,a,input,select,textarea,summary):focus-visible{outline:3px solid #467ba8;outline-offset:3px}
.team-toggle{align-items:center;gap:8px;min-height:44px}
.team-toggle svg{flex-shrink:0}
.team-mobile-topbar{display:none}
.table-scroll-hint{font-size:12px;line-height:1.5;color:#62666e;margin:8px 0}
.table-scroll-hint[hidden]{display:none}
:is(.instructor-table-wrap,.ledger-wrap,.org-table-wrap,.school-table-wrap,.bom-table-wrap,.profile-table-wrap,.org-detail-table){overscroll-behavior-x:contain;scrollbar-width:thin}
body.team-layout :is(.org-detail-head,.detail-header,.tablet-dialog-header,.certificate-dialog-header,.bom-image-head){gap:12px}
body.team-layout :is(.org-detail-head,.detail-header,.tablet-dialog-header,.certificate-dialog-header,.bom-image-head)>button{flex-shrink:0;min-width:44px;min-height:44px}
body.team-layout :is(.org-detail-head,.detail-header,.tablet-dialog-header,.certificate-dialog-header,.bom-image-head) h2{overflow-wrap:anywhere}
body.team-layout :is(dialog,.profile-body,.certificate-editor-body,#loan-content,#editor){overscroll-behavior:contain}
.team-layout dialog{max-height:calc(100dvh - 24px)}
@media(min-width:801px){body.account-page.team-layout>main{padding:32px}}
body.team-layout .bom-image-head{position:sticky;top:0;background:white;z-index:3;padding-block:8px}
:is(.account-security,.org-sources,.profile-evidence)>summary{list-style:none;display:flex;align-items:center;gap:9px;min-height:44px}
:is(.account-security,.org-sources,.profile-evidence)>summary::-webkit-details-marker{display:none}
:is(.account-security,.org-sources,.profile-evidence)>summary::before{content:'';width:7px;height:7px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(-45deg);flex-shrink:0;transition:transform .15s}
:is(.account-security,.org-sources,.profile-evidence)[open]>summary::before{transform:rotate(45deg)}
@media(max-width:800px){
 html{scroll-padding-top:calc(76px + env(safe-area-inset-top))}
 .team-mobile-topbar{display:flex;align-items:center;justify-content:space-between;gap:12px;position:fixed;inset:0 0 auto;height:calc(64px + env(safe-area-inset-top));box-sizing:border-box;padding:env(safe-area-inset-top) max(12px,env(safe-area-inset-right)) 0 max(12px,env(safe-area-inset-left));background:#fff;border-bottom:1px solid #e6e6e9;z-index:101}
 .team-mobile-topbar .team-toggle{display:flex;position:static;flex-shrink:0;margin:0}
 .team-mobile-brand{font-size:12px;color:#62666e;white-space:nowrap}
 .team-menu-open #team-sidebar{padding-top:calc(76px + env(safe-area-inset-top))}
 body.team-layout{padding-top:calc(64px + env(safe-area-inset-top))}
 #team-sidebar{max-width:calc(100vw - 44px);padding-bottom:max(20px,env(safe-area-inset-bottom))}
 body.team-layout>main{padding-bottom:max(28px,env(safe-area-inset-bottom))}
 body.team-layout :is(input:not([type=checkbox]):not([type=radio]),select,textarea),body.login-page :is(input,select){font-size:16px!important;min-height:44px}
 body.team-layout :is(button,.file-download,.org-links a){min-height:44px}
 body.team-layout :is(.team-ledger-heading,.section-heading,.calendar-heading,.calendar-selection-head,.map-heading){flex-wrap:wrap;min-width:0}
 body.team-layout :is(.team-ledger-toolbar,.toolbar,.ledger-toolbar,.picker-toolbar,.picker-bulk,.calendar-number-toggle){flex-wrap:wrap;max-width:100%}
 body.team-layout :is(.actions,.team-ledger-actions){flex-wrap:wrap;gap:8px}
 body.team-layout .team-ledger-toolbar>select{flex:1 1 145px;min-width:0}
 body.team-layout :is(.org-tabs,.profile-tabs,.certificate-views){gap:6px}
 body.team-layout .profile-header{flex-wrap:wrap;padding-right:64px}
 body.team-layout .profile-contact{display:flex;text-align:left;overflow-wrap:anywhere;font-size:13px;width:100%;padding-left:0}
 body.team-layout .profile-contact a{overflow-wrap:anywhere}
 body.team-layout :is(.profile-file,.memo-form-footer){flex-wrap:wrap}
 body.team-layout .directory-page #detail>.close,.directory-page #detail>.close{width:44px;height:44px}
 body.team-layout .certificate-form-actions>button{flex:1 1 130px}
 body.team-layout .calendar-number-toggle>button{white-space:normal}
 body.team-layout .picker-number>small{font-size:11px}
 body.team-layout .picker-number-grid{grid-template-columns:repeat(auto-fill,minmax(64px,1fr))}
 body.team-layout .school-table-wrap{max-height:none}
 body.team-layout :is(.org-grid dl,.detail-content dl){grid-template-columns:repeat(2,minmax(0,1fr))}
 body.team-layout :is(.certificate-dialog-header,.tablet-dialog-header,.org-detail-head,.detail-header){padding:14px 16px}
}
@media(max-width:650px){
 body.team-layout .management-overview:has(>.overview-item:nth-child(3):last-child){grid-template-columns:repeat(3,minmax(0,1fr))}
 body.team-layout .management-overview:has(>.overview-item:nth-child(3):last-child)>.overview-item{grid-column:auto;padding:16px 10px;border-top:0}
 body.team-layout .management-overview:has(>.overview-item:nth-child(3):last-child)>.overview-item+.overview-item{border-left:1px solid #dddeda}
 body.team-layout .management-overview:has(>.overview-item:nth-child(3):last-child) h2{font-size:12px;line-height:1.5;min-height:36px;margin-bottom:8px}
 body.team-layout .management-overview:has(>.overview-item:nth-child(3):last-child) h2::before{display:none}
 body.team-layout .management-overview:has(>.overview-item:nth-child(3):last-child) .overview-number{gap:3px;flex-wrap:wrap}
 body.team-layout .management-overview:has(>.overview-item:nth-child(3):last-child) strong{font-size:26px;letter-spacing:-1px}
 body.team-layout .tablet-dashboard>section{padding:14px 16px}
 body.team-layout .tablet-legend{grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 12px}
 body.team-layout .tablet-legend button{display:grid;grid-template-columns:10px minmax(0,1fr) auto;gap:5px;font-size:12px;min-height:52px}
 body.team-layout .tablet-legend button>span:last-child{display:none}
 body.team-layout .tablet-legend button>strong{font-size:15px;white-space:nowrap}
 body.team-layout .tablet-followup #followup{grid-template-columns:repeat(2,minmax(0,1fr));gap:0 16px}
 body.team-layout .tablet-followup-item{min-height:48px;padding:8px 0;font-size:12px;gap:5px}
}
@media(prefers-reduced-motion:reduce){summary::before{transition:none!important}}
@media(max-width:400px){
 body.team-layout :is(.profile-fields,.certificate-full-fields,.org-grid dl,.detail-content dl){grid-template-columns:1fr}
 body.team-layout .team-ledger-toolbar>label{min-width:0;flex-basis:100%}
 body.team-layout .calendar-number-head,body.team-layout .calendar-number-row{grid-template-columns:64px minmax(0,1fr) 32px;gap:4px}
 body.team-layout .calendar-number-chips{gap:4px}
 body.team-layout .calendar-number-chips span{padding:3px 4px}
}
@media(max-height:550px){
 body.team-layout dialog{max-height:calc(100dvh - 12px);margin:6px auto}
 body.team-layout .directory-page #detail,.directory-page #detail{height:calc(100dvh - 12px)}
 body.team-layout .profile-header{padding-block:12px}
 body.team-layout .profile-photo{width:40px;height:48px}
 body.team-layout .profile-header h2{font-size:20px}
 body.team-layout .profile-tabs button{padding-block:9px}
}
