/* Profile audit v8 — responsive hardening for desktop, tablet, and mobile. */
.profile-center-page{--profile-gap:18px}
.profile-center-page .profile-primary-grid{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:var(--profile-gap)!important;align-items:stretch!important}
.profile-center-page .profile-primary-grid>#profile-center,.profile-center-page .profile-primary-grid>#profile-owner{height:100%!important;max-width:none!important;margin:0!important}
.profile-center-page #profile-center .profile-entity-form{grid-template-columns:repeat(12,minmax(0,1fr))!important;gap:13px!important}
.profile-center-page #profile-center .profile-entity-form>.field{min-width:0!important}
.profile-center-page #profile-center .profile-entity-form>.profile-province-field{grid-column:span 3!important}
.profile-center-page #profile-center .profile-entity-form>.field .input,.profile-center-page #profile-center .profile-entity-form>.field .select,.profile-center-page #profile-center .profile-entity-form>.field .profile-file-control{min-height:46px!important;height:46px!important;width:100%!important;box-sizing:border-box!important}
.profile-center-page .profile-logo-hint{display:block!important;margin-top:6px!important;color:#8b8492!important}
.profile-center-page #profile-structure .profile-tree{direction:rtl!important;grid-template-columns:240px minmax(0,1fr)!important;grid-template-areas:"center branches"!important}
.profile-center-page #profile-structure .profile-tree__center{grid-area:center!important;text-align:right!important;direction:rtl!important;align-self:start!important}
.profile-center-page #profile-structure .profile-tree__branches{grid-area:branches!important;min-width:0!important}
.profile-center-page #profile-structure .profile-tree__group-main{min-width:220px!important}
.profile-center-page #profile-structure .profile-tree__actions{gap:7px!important}
.profile-center-page #profile-structure .profile-tree__actions .btn{white-space:nowrap!important;min-height:36px!important}
.profile-center-page #profile-structure .profile-tree__actions .workspace-backup-action{background:#f5f3ff!important;color:#6d28d9!important;border-color:#ddd6fe!important}
.profile-center-page #profile-structure .profile-tree__actions .workspace-delete{margin-inline-start:2px!important}
.profile-center-page #profile-structure .profile-tree__department-title .profile-tree__node-icon{background:#f1edff!important;color:#6d28d9!important}
.profile-center-page #profile-structure .profile-tree__group.is-active{background:#faf8ff!important}
.profile-center-page #profile-center .profile-entity-save .btn:disabled,.profile-center-page #profile-owner .btn:disabled{opacity:.66!important;cursor:wait!important}
.profile-center-page input:focus,.profile-center-page select:focus,.profile-center-page button:focus-visible{outline:2px solid rgba(124,58,237,.24)!important;outline-offset:2px!important}

@media (max-width:1180px){
  .profile-center-page .profile-primary-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important}
  .profile-center-page #profile-structure .profile-tree{grid-template-columns:210px minmax(0,1fr)!important}
  .profile-center-page #profile-structure .profile-tree__group{grid-template-columns:1fr!important;gap:10px!important}
  .profile-center-page #profile-structure .profile-tree__actions{justify-content:flex-start!important}
}

@media (max-width:900px){
  .profile-center-page .profile-primary-grid{grid-template-columns:1fr!important}
  .profile-center-page #profile-center{order:1!important}.profile-center-page #profile-owner{order:2!important}
  .profile-center-page #profile-structure .profile-tree{grid-template-columns:1fr!important;grid-template-areas:"center" "branches"!important;gap:14px!important}
  .profile-center-page #profile-structure .profile-tree__center{position:static!important;width:100%!important}
  .profile-center-page #profile-structure .profile-structure-head{align-items:stretch!important}
  .profile-center-page #profile-structure .profile-structure-head .toolbar{width:100%!important;display:grid!important;grid-template-columns:1fr 1fr!important}
  .profile-center-page #profile-structure .profile-tree__actions{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;width:100%!important}
  .profile-center-page #profile-structure .profile-tree__actions .btn,.profile-center-page #profile-structure .profile-tree__active{width:100%!important;justify-content:center!important}
}

@media (max-width:680px){
  .profile-center-page{--profile-gap:12px}
  .profile-center-page .page-head h2{font-size:22px!important}
  .profile-center-page #profile-center .profile-entity-form{grid-template-columns:1fr!important}
  .profile-center-page #profile-center .profile-entity-form>[class*=span-],.profile-center-page #profile-center .profile-entity-form>.profile-province-field{grid-column:1/-1!important}
  .profile-center-page #profile-structure .profile-structure-head .toolbar{grid-template-columns:1fr!important}
  .profile-center-page #profile-structure .profile-tree__department-head{align-items:flex-start!important;flex-direction:column!important}
  .profile-center-page #profile-structure .profile-tree__group{padding:12px!important}
  .profile-center-page #profile-structure .profile-tree__group-main{min-width:0!important}
  .profile-center-page #profile-structure .profile-tree__actions{grid-template-columns:1fr 1fr!important}
  .profile-center-page #profile-structure .profile-tree__actions .workspace-delete{grid-column:1/-1!important}
  .profile-center-page #profile-center .profile-entity-save,.profile-center-page #profile-owner .profile-save-row{align-items:stretch!important;flex-direction:column!important}
  .profile-center-page #profile-center .profile-entity-save .btn,.profile-center-page #profile-owner .profile-save-row .btn{width:100%!important;min-height:46px!important}
}

@media (max-width:420px){
  .profile-center-page #profile-structure .profile-tree__actions{grid-template-columns:1fr!important}
  .profile-center-page #profile-structure .profile-tree__actions .workspace-delete{grid-column:auto!important}
  .profile-center-page #profile-structure .profile-tree__department-title b{font-size:15px!important}
  .profile-center-page #profile-structure .profile-tree__group-main b{font-size:13px!important}
}
