/* Scoped staff-grant forms. Desktop controls 26px; mobile touch controls 40px. */
#modal-content .staff-grant-form>.staff-demo-choice{grid-column:1/-1;border-top:1px solid #e8d9ce;padding:4px 0 0}
#modal-content .staff-grant-form .staff-demo-choice>label{display:flex!important;flex-direction:row!important;align-items:flex-start!important;gap:5px;min-height:26px}
#modal-content .staff-grant-form .staff-demo-choice span{min-width:0;display:block!important}
#modal-content .staff-grant-form .staff-demo-choice b{display:block!important;font-size:10px;line-height:1.2;font-weight:600}
#modal-content .staff-grant-form .staff-demo-choice small{display:block!important;margin-top:2px;font-size:8px;line-height:1.2;color:#7b7068}
#modal-content .staff-grant-form .staff-demo-choice input[type=checkbox]{flex:none!important;width:13px!important;height:13px!important;min-height:13px!important;margin-top:1px}
html[data-theme=dark] #modal-content .staff-grant-form>.staff-demo-choice{border-color:#5c4c42}
html[data-theme=dark] #modal-content .staff-grant-form .staff-demo-choice small{color:#c8b7aa}
#modal-backdrop .modal-card:has(.staff-grant-form){width:min(670px,calc(100vw - 20px))!important;padding:10px 12px;max-height:calc(100dvh - 20px);box-sizing:border-box;overflow-x:hidden}
#modal-content:has(.staff-grant-form)>h2{font-size:18px;line-height:1.15;margin:3px 32px 7px 0;padding:0}
#modal-content:has(.staff-grant-form)>.modal-label{font-size:8px;line-height:1.2;margin:0 0 2px;padding:3px 5px}
#modal-content .staff-grant-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px 7px;font-size:10px;line-height:1.2;min-width:0;margin:0}
#modal-content .staff-grant-form>*{min-width:0;max-width:100%;box-sizing:border-box}
#modal-content .staff-grant-form>label{grid-column:auto}
#modal-content .staff-grant-form>:is(.form-grid,.modal-form-grid,.staff-preset-field,.staff-grant-review,.modal-actions,.owner-access-summary,p,button,[data-partner-fields],[data-staff-permission-details],[data-trainer-section],.account-type-note){grid-column:1/-1}
#modal-content .staff-grant-form>label:has([name=accountType]),#modal-content .staff-grant-form>label:has([name=password]){grid-column:1/-1}
#modal-content .staff-grant-form :is(.form-grid,.modal-form-grid){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px 7px;margin:0}
#modal-content .staff-grant-form label{display:flex;flex-direction:column;gap:2px;font-size:10px;line-height:1.2;min-width:0;margin:0}
#modal-content .staff-grant-form :is(input:not([type=checkbox]),select){width:100%;min-width:0;box-sizing:border-box;height:26px;min-height:26px;padding:3px 6px;margin:0;font-size:10px;line-height:1.2;border-radius:6px}
#modal-content .staff-grant-form button{min-height:26px;height:auto;padding:4px 8px;margin:0;font-size:10px;line-height:1.2;border-radius:6px;white-space:normal}
#modal-content .staff-grant-form :is(p,small){font-size:9px;line-height:1.2;margin:0;overflow-wrap:anywhere}
#modal-content .staff-grant-form .staff-preset-field{padding:5px 6px;margin:0;border-radius:6px}
#modal-content .staff-grant-form .staff-preset-field>small{display:none}
#modal-content .staff-grant-form .account-type-note{padding:4px 6px;display:flex;align-items:baseline;gap:5px;font-size:9px}
#modal-content .staff-grant-form .account-type-note :is(b,span){font-size:9px;line-height:1.2}
#modal-content .staff-grant-form .generated-password-field{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:4px}
#modal-content .staff-grant-form .generated-password-field button{min-width:0}
#modal-content .staff-grant-form .generated-password-hint{margin-top:1px}
#modal-content .staff-grant-form [data-staff-permission-details]{border:1px solid #e8d9ce;border-radius:6px;background:#fdfaf7;overflow:hidden}
#modal-content .staff-grant-form [data-staff-permission-details]>summary{font-size:10px;line-height:1.2;min-height:26px;padding:6px;box-sizing:border-box;cursor:pointer;color:#613b29;font-weight:600}
#modal-content .staff-grant-form [data-staff-permission-details]:not([open])>fieldset{display:none!important}
#modal-content .staff-grant-form .staff-sections{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px 6px;padding:4px 6px 6px;margin:0;border:0;min-width:0}
#modal-content .staff-grant-form .staff-sections>legend{display:none}
#modal-content .staff-grant-form .staff-sections>label{display:flex;flex-direction:row;align-items:center;gap:4px;font-size:10px;line-height:1.2;min-height:22px}
#modal-content .staff-grant-form input[type=checkbox]{width:13px;height:13px;min-height:13px;flex:none;margin:0;accent-color:#f46c36}
#modal-content .staff-grant-form .staff-sections>:is(p,.permission-group-title,.permission-extra,.permission-preview-choice,.permission-select-all){grid-column:1/-1;margin:0}
#modal-content .staff-grant-form .permission-group-note{font-size:9px;line-height:1.2}
#modal-content .staff-grant-form .permission-group-title{font-size:9px;padding:3px 0 0}
#modal-content .staff-grant-form .permission-preview-choice{padding:4px 5px;border-radius:5px}
#modal-content .staff-grant-form .permission-preview-choice>label,#modal-content .staff-grant-form .permission-group-items>label{flex-direction:row;align-items:center;gap:4px}
#modal-content .staff-grant-form .permission-extra>summary{font-size:10px;padding:4px 0}
#modal-content .staff-grant-form .permission-group-items{display:flex;flex-wrap:wrap;gap:5px 12px;padding:3px 0}
#modal-content .staff-grant-form .staff-grant-review{border:1px solid #e5d5c8;background:#fff8f0;padding:5px 6px;border-radius:6px}
#modal-content .staff-grant-form .staff-grant-review>strong{font-size:9px;line-height:1.2}
#modal-content .staff-grant-form .staff-grant-review>p{margin-top:2px;color:#543d2f;font-size:10px;line-height:1.25}
#modal-content .staff-grant-form .staff-system-confirm{margin-top:4px;border-top:1px solid #e9c9b6;padding-top:4px}
#modal-content .staff-grant-form .staff-system-confirm>p{font-size:9px;line-height:1.2;color:#8b3e1d}
#modal-content .staff-grant-form .staff-system-confirm>label{display:flex;flex-direction:row;align-items:flex-start;gap:5px;margin-top:4px;font-size:10px;line-height:1.25;font-weight:600}
#modal-content .staff-grant-form .modal-actions{display:flex;gap:5px;margin:0;padding:0}
#modal-content .staff-grant-form .modal-actions>button{flex:1}
#modal-content .staff-grant-form [hidden]{display:none!important}
html[data-theme=dark] #modal-content .staff-grant-form [data-staff-permission-details]{background:#27221e;border-color:#5c4c42}
html[data-theme=dark] #modal-content .staff-grant-form [data-staff-permission-details]>summary{color:#f5c6ab}
html[data-theme=dark] #modal-content .staff-grant-form .staff-grant-review{background:#31271f;border-color:#73533e}
html[data-theme=dark] #modal-content .staff-grant-form .staff-grant-review>p{color:#f1dfd2}
html[data-theme=dark] #modal-content .staff-grant-form .staff-system-confirm{border-color:#73533e}
html[data-theme=dark] #modal-content .staff-grant-form .staff-system-confirm>p{color:#ffbe9b}
@media(max-width:680px){
  #modal-content .staff-grant-form .staff-demo-choice>label{min-height:40px;gap:5px}
  #modal-content .staff-grant-form .staff-demo-choice input[type=checkbox]{width:18px!important;height:18px!important;min-height:18px!important}
  #modal-content .staff-grant-form .staff-demo-choice b{font-size:11px;line-height:1.2}
  #modal-content .staff-grant-form .staff-demo-choice small{font-size:9px}
  #modal-content .staff-grant-form :is([data-staff-country-note],.generated-password-hint){display:none!important}
  #modal-backdrop .modal-card:has(.staff-grant-form){width:calc(100vw - 10px)!important;max-height:calc(100dvh - 10px);padding:8px;min-width:0;border-radius:10px}
  #modal-content:has(.staff-grant-form)>h2{font-size:18px;margin-bottom:5px}
  #modal-content .staff-grant-form{gap:4px 5px}
  #modal-content .staff-grant-form label{font-size:10px;gap:2px}
  #modal-content .staff-grant-form :is(input:not([type=checkbox]),select){height:40px;min-height:40px;font-size:16px;padding:5px 6px}
  #modal-content .staff-grant-form button{min-height:40px;font-size:11px;padding:5px 6px}
  #modal-content .staff-grant-form .account-type-note{padding:3px 5px;display:block}
  #modal-content .staff-grant-form .account-type-note>span{display:none}
  #modal-content .staff-grant-form :is(.form-grid,.modal-form-grid){gap:4px 5px}
  #modal-content .staff-grant-form .generated-password-field{grid-template-columns:minmax(0,1fr) auto auto;gap:3px}
  #modal-content .staff-grant-form .generated-password-field button{font-size:9px;padding:4px;max-width:78px}
  #modal-content .staff-grant-form [data-staff-permission-details]>summary{min-height:40px;padding:12px 6px;font-size:11px}
  #modal-content .staff-grant-form .staff-sections{grid-template-columns:repeat(2,minmax(0,1fr));gap:3px 5px}
  #modal-content .staff-grant-form .staff-sections>label{min-height:40px;font-size:11px;line-height:1.2}
  #modal-content .staff-grant-form input[type=checkbox]{width:18px;height:18px;min-height:18px}
  #modal-content .staff-grant-form .permission-preview-choice>label,#modal-content .staff-grant-form .permission-group-items>label{min-height:40px;font-size:11px}
  #modal-content .staff-grant-form .permission-extra>summary{min-height:40px;padding:12px 0;box-sizing:border-box}
  #modal-content .staff-grant-form .staff-grant-review{padding:4px 5px}
  #modal-content .staff-grant-form .staff-system-confirm>label{min-height:40px;align-items:center;font-size:11px}
  #modal-content .staff-grant-form>.modal-actions,#modal-content .staff-grant-form>button[type=submit]{position:sticky;bottom:-8px;z-index:2;padding-top:4px}
  #modal-content .staff-grant-form>.modal-actions{background:#fff}
  html[data-theme=dark] #modal-content .staff-grant-form>.modal-actions{background:#24201d}
}
