/* Usuários — Pessoas (DEV), padrão compacto Pronto Flux */
.staff-users-page{display:grid;gap:13px;min-width:0}
.staff-page-head{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:4px 2px}
.staff-page-head small{color:var(--red);font-size:10px;font-weight:850;letter-spacing:.08em}
.staff-page-head h1{font-size:26px;margin:2px 0 4px;color:var(--text)}
.staff-page-head p{margin:0;color:var(--muted);font-size:11px}
.staff-page-head .btn{flex-shrink:0;font-size:11px!important;min-height:38px!important}
.staff-filters{display:grid;gap:12px;border:1px solid var(--border);border-radius:13px;padding:14px;background:var(--panel)}
.staff-filter-title,.staff-list-head,.staff-filter-actions,.staff-view-tools,.staff-footer,.staff-pager{display:flex;align-items:center;gap:9px}
.staff-filter-title{justify-content:space-between;flex-wrap:wrap}
.staff-filter-title>b{font-size:14px}
.staff-view-tools .select{font-size:10px;min-height:32px;height:32px;width:auto}
.staff-toggle{display:grid;place-items:center;min-width:32px;height:32px;border-radius:8px;color:var(--muted);background:var(--panel2);border:1px solid var(--border);font-size:16px;cursor:pointer}
.staff-toggle.active{color:var(--red);border-color:color-mix(in srgb,var(--red) 45%,var(--border))}
.staff-filter-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.staff-filter-fields label,.staff-person-inputs label,.staff-pane>label,.staff-pass-row label,.staff-discount label,.staff-photo-field>label:first-child{display:flex;flex-direction:column;gap:6px;color:var(--text);font-size:11px;font-weight:750;min-width:0}
.staff-filter-fields .input,.staff-filter-fields .select{width:100%;height:38px}
.staff-filter-actions{justify-content:flex-end}
.staff-filter-actions .btn{min-height:33px!important;font-size:10px!important}
.staff-list-head{justify-content:space-between;flex-wrap:wrap;padding:1px 2px}
.staff-list-head>b{font-size:12px}
.staff-list-head>span{font-size:10px;color:var(--muted)}
.staff-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.staff-card{display:flex;align-items:flex-start;gap:11px;border:1px solid var(--border);border-radius:12px;background:var(--panel);padding:13px;min-width:0;min-height:112px}
.staff-card.disabled{opacity:.7}
.staff-card-photo,.staff-avatar-small{flex-shrink:0;display:grid;place-items:center;width:46px;height:46px;border-radius:50%;overflow:hidden;border:1px solid var(--border);background:var(--panel2);font-size:23px;color:var(--muted)}
.staff-card-photo img,.staff-avatar-small img{width:100%;height:100%;object-fit:cover}
.staff-card-details{display:flex;flex:1;flex-direction:column;gap:4px;min-width:0}
.staff-card-details>b{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.staff-card-details>small{font-size:10px;color:var(--muted);word-break:break-all}
.staff-card-details .staff-card-last{font-size:9px;color:var(--muted);margin-top:7px}
.staff-card-actions{display:grid;justify-items:end;gap:12px;position:relative}
.staff-card-actions .tag{font-size:9px}
.staff-menu-btn{width:30px;height:30px;border:1px solid var(--border);border-radius:8px;background:var(--panel2);color:var(--text);cursor:pointer}
.staff-menu-btn:hover{color:var(--red)}
.staff-popup{position:absolute;z-index:50;right:0;top:100%;width:210px;display:grid;gap:2px;padding:7px;border:1px solid var(--border);border-radius:10px;background:var(--panel);box-shadow:0 12px 35px #0005}
.staff-popup>b{font-size:10px;padding:7px;color:var(--muted);border-bottom:1px solid var(--border)}
.staff-popup button{text-align:left;border:0;background:transparent;color:var(--text);font-size:11px;border-radius:7px;padding:9px;cursor:pointer}
.staff-popup button:hover{background:var(--panel2);color:var(--red)}
.staff-table-wrap{overflow:auto;border:1px solid var(--border);background:var(--panel);border-radius:12px}
.staff-table{width:100%;border-collapse:collapse;text-align:left;font-size:11px}
.staff-table th{font-size:10px;color:var(--muted);background:var(--panel2);padding:11px}
.staff-table td{padding:9px 11px;border-top:1px solid var(--border);position:relative}
.staff-table-person{display:flex;align-items:center;gap:9px}
.staff-avatar-small{width:32px;height:32px;font-size:16px}
.staff-table-person>div{display:flex;flex-direction:column;gap:3px;min-width:0}
.staff-table-person b{font-size:11px}
.staff-table-person small{font-size:9px;color:var(--muted)}
.staff-table td:last-child{text-align:right}
.staff-empty{border:1px dashed var(--border);border-radius:12px;background:var(--panel);padding:28px;text-align:center;color:var(--muted);font-size:12px}
.staff-footer{justify-content:space-between;flex-wrap:wrap}
.staff-footer>small{color:var(--muted);font-size:10px}
.staff-pager span{font-size:11px;font-weight:750}
.staff-pager .btn{padding:5px 10px!important;min-height:30px!important}
.staff-editor{display:grid;gap:0}
.staff-editor .staff-tabs{display:grid;grid-template-columns:1fr 1fr;gap:5px;margin-bottom:12px}
.staff-tabs button{border:1px solid var(--border);border-radius:8px 8px 0 0;background:var(--panel2);color:var(--muted);padding:10px;font-size:11px;font-weight:850;cursor:pointer}
.staff-tabs button.active{background:var(--red);color:#fff;border-color:var(--red)}
.staff-editor-inner{max-height:min(58vh,570px);overflow-y:auto;overflow-x:hidden;padding:5px 4px 15px;scrollbar-width:thin}
.staff-pane[hidden]{display:none!important}
.staff-pane{display:grid;gap:13px;min-width:0}
.staff-section-title{display:grid;gap:3px;padding:3px 1px;border-bottom:1px solid var(--border)}
.staff-section-title>b{font-size:12px}
.staff-section-title>small,.staff-help{color:var(--muted);font-size:10px;line-height:1.45}
.staff-personal{display:grid;grid-template-columns:minmax(170px,1fr) minmax(0,1fr);gap:12px;align-items:start}
.staff-person-inputs{display:grid;gap:10px;min-width:0}
.staff-photo-field{display:grid;gap:8px;min-width:0}
.staff-photo-drop{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:7px;cursor:pointer;border:1px dashed var(--border);border-radius:10px;background:var(--panel2);height:185px}
.staff-photo-drop #staffPhotoPreview{font-size:38px;display:grid;place-items:center}
.staff-photo-drop img{width:100px;height:100px;border-radius:50%;object-fit:cover}
.staff-photo-drop small{font-size:10px;color:var(--muted)}
.staff-photo-field .btn{justify-self:start}
.staff-pane .input,.staff-pane .select{min-height:38px;width:100%}
.staff-pass-row{grid-template-columns:1fr 1fr}
.staff-permission-lead{border-left:3px solid var(--red);background:var(--panel2);border-radius:7px;padding:10px;font-size:11px}
.staff-permission-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.staff-permission-module{border:1px solid var(--border);border-radius:11px;background:var(--panel);min-width:0;overflow:hidden}
.staff-permission-top{display:flex;align-items:center;gap:5px;padding:9px 10px}
.staff-permission-group{display:flex;align-items:center;gap:8px;flex:1;min-width:0;cursor:pointer}
.staff-permission-group>input,.staff-permission-child input{accent-color:var(--red);width:17px;height:17px;flex-shrink:0;cursor:pointer}
.staff-permission-group>b{font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.staff-permission-group>span{display:none}
.staff-permission-top>button{border:0;background:transparent;color:var(--muted);padding:4px 7px;cursor:pointer;font-size:18px}
.staff-permission-children{display:grid;border-top:1px solid var(--border);padding:5px 10px 8px;gap:2px}
.staff-permission-children[hidden]{display:none!important}
.staff-permission-child{display:flex;align-items:center;justify-content:space-between;gap:9px;padding:7px 0;font-size:10px;border-bottom:1px solid color-mix(in srgb,var(--border) 55%,transparent)}
.staff-permission-child:last-child{border-bottom:0}
.staff-discount{border:1px solid var(--border);border-radius:11px;padding:11px;display:grid;gap:8px}
.staff-discount>small{color:var(--muted);font-size:10px}
.staff-discount .input{max-width:190px}
@media(max-width:1170px){.staff-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:750px){.staff-grid{grid-template-columns:1fr}.staff-filter-fields{grid-template-columns:1fr}.staff-page-head{align-items:flex-start}.staff-page-head h1{font-size:22px}.staff-personal,.staff-permission-list{grid-template-columns:1fr}.staff-editor-inner{max-height:60vh}.staff-filter-title{align-items:start}}
@media(max-width:470px){.staff-view-tools{flex-wrap:wrap}.staff-page-head{flex-wrap:wrap}.staff-filter-actions .btn{flex:1}.staff-card{padding:10px}.staff-card-last{font-size:9px}}

/* Ajustes 09/10: seletores legíveis e modal compacto de usuários */
.staff-users-page .staff-view-tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.staff-users-page .staff-view-tools .select{
  flex:0 0 auto!important;display:block!important;
  width:152px!important;min-width:152px!important;max-width:152px!important;
  min-height:38px!important;height:38px!important;
  font-size:11px!important;font-weight:700!important;line-height:normal!important;
  padding:7px 31px 7px 11px!important;
  color:var(--text)!important;overflow:visible!important;
  border-radius:9px!important;text-overflow:clip!important;
}
.staff-users-page .staff-view-tools #staffSize{width:158px!important;min-width:158px!important;max-width:158px!important}
.staff-users-page .staff-view-tools .staff-toggle{height:38px;min-width:38px;font-size:15px}
.staff-users-dialog{padding:10px!important;align-items:center!important;justify-content:center!important}
.staff-users-dialog>.modal,
.staff-users-dialog .modal{
  width:min(900px,calc(100vw - 24px))!important;
  max-height:min(92vh,790px)!important;
  min-height:0!important;
  overflow:hidden!important;
  border-radius:16px!important;
  display:grid!important;
  grid-template-rows:auto minmax(0,1fr) auto;
}
.staff-users-dialog .modal-head{padding:13px 17px!important;min-height:55px;background:var(--panel)}
.staff-users-dialog .modal-head h2{font-size:17px!important;line-height:1.3}
.staff-users-dialog .modal-body{
  padding:12px 15px!important;min-height:0!important;
  display:flex;flex-direction:column;overflow:hidden!important;
  background:color-mix(in srgb,var(--bg) 24%,var(--panel));
}
.staff-users-dialog .modal-foot{
  min-height:60px;padding:9px 15px!important;
  background:var(--panel);box-shadow:0 -7px 18px rgba(0,0,0,.08);
}
.staff-users-dialog .modal-foot .btn{
  min-height:36px!important;font-size:10px!important;padding:7px 13px!important;border-radius:8px!important;
}
.staff-users-dialog .staff-editor{display:grid;grid-template-rows:auto minmax(0,1fr);min-height:0;height:100%;gap:0}
.staff-users-dialog .staff-tabs{position:relative;margin:0 0 9px!important;gap:6px}
.staff-users-dialog .staff-tabs button{
  padding:10px!important;border-radius:9px!important;font-size:11px!important;
  border:1px solid var(--border);
}
.staff-users-dialog .staff-tabs button.active{
  background:color-mix(in srgb,var(--red) 12%,var(--panel2))!important;
  border-color:var(--red)!important;color:var(--red)!important;
  box-shadow:inset 0 -2px 0 var(--red);
}
.staff-users-dialog .staff-editor-inner{
  min-height:0!important;max-height:none!important;height:auto!important;
  overflow-y:auto!important;overflow-x:hidden!important;
  scrollbar-width:thin;overscroll-behavior:contain;
  padding:3px 5px 12px 1px!important;
}
.staff-users-dialog .staff-pane{gap:10px!important}
.staff-users-dialog .staff-section-title{
  border-bottom:1px solid var(--border);padding:4px 0 8px;margin-top:2px;
}
.staff-users-dialog .staff-section-title b{font-size:12px}
.staff-users-dialog .staff-personal{gap:10px;grid-template-columns:220px minmax(0,1fr)}
.staff-users-dialog .staff-pass-row{grid-template-columns:1fr 1fr}
.staff-users-dialog .staff-photo-field{display:flex;flex-direction:column;gap:6px}
.staff-users-dialog .staff-photo-drop{
  height:144px!important;min-height:144px!important;
  background:var(--panel2);
  border:1px dashed var(--border);padding:12px;
  display:flex;align-items:center;justify-content:center;
}
.staff-users-dialog .staff-photo-drop:hover{border-color:var(--red)}
.staff-users-dialog #staffPhotoPreview{font-size:31px}
.staff-users-dialog .staff-photo-drop img{width:80px!important;height:80px!important;object-fit:cover}
.staff-users-dialog .staff-photo-drop small{font-size:9px}
.staff-users-dialog #staffPhotoRemove{
  font-size:10px!important;align-self:flex-start;padding:4px 0!important;
  background:transparent!important;border:0!important;color:var(--red)!important;
  min-height:24px!important;
}
.staff-users-dialog #staffPhotoRemove[hidden]{display:none!important}
.staff-users-dialog .staff-person-inputs{gap:8px}
.staff-users-dialog .staff-pane .input,.staff-users-dialog .staff-pane .select{
  min-height:37px!important;height:37px!important;
  padding:8px 10px!important;border-radius:8px!important;font-size:12px!important;
}
.staff-users-dialog .staff-pane label{font-size:11px;font-weight:680}
.staff-users-dialog .staff-permission-list{gap:7px}
.staff-users-dialog .staff-permission-module{border-radius:9px}
.staff-users-dialog .staff-permission-top{padding:8px 10px}
.staff-users-dialog .staff-permission-lead{font-size:11px;padding:9px}
.staff-users-dialog #staffGroup{margin-top:5px}
.staff-group-hint{
  margin:-4px 0 2px;padding:9px 11px;border-radius:8px;
  border:1px solid color-mix(in srgb,var(--red) 19%,var(--border));
  background:color-mix(in srgb,var(--red) 6%,var(--panel));
  font-size:10px;color:var(--muted);line-height:1.45;
}
@media(max-width:850px){
  .staff-users-dialog .staff-personal{grid-template-columns:190px minmax(0,1fr)}
  .staff-users-dialog .staff-pass-row{grid-template-columns:1fr 1fr}
}
@media(max-width:600px){
  .staff-users-page .staff-filter-title{gap:10px}
  .staff-users-page .staff-view-tools{width:100%;justify-content:flex-start;gap:6px}
  .staff-users-page .staff-view-tools .select{width:132px!important;min-width:132px!important;max-width:132px!important;font-size:10px!important}
  .staff-users-page .staff-view-tools #staffSize{width:143px!important;min-width:143px!important;max-width:143px!important}
  .staff-users-dialog{padding:5px!important}
  .staff-users-dialog .modal{width:calc(100vw - 10px)!important;max-height:96vh!important}
  .staff-users-dialog .modal-head{padding:10px 12px!important}
  .staff-users-dialog .modal-body{padding:9px!important}
  .staff-users-dialog .staff-personal{grid-template-columns:1fr;gap:8px}
  .staff-users-dialog .staff-pass-row{grid-template-columns:1fr}
  .staff-users-dialog .staff-photo-drop{height:110px!important;min-height:110px!important;flex-direction:row;gap:14px}
  .staff-users-dialog .staff-photo-drop img{height:69px!important;width:69px!important}
  .staff-users-dialog .staff-permission-list{grid-template-columns:1fr}
  .staff-users-dialog .modal-foot .btn{flex:1;min-width:0}
}
