/* Profile cleanup v7 — identity first, canonical tree second, no duplicate detail cards. */
.profile-center-page .profile-primary-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;align-items:stretch}
.profile-center-page .profile-primary-grid>#profile-center,.profile-center-page .profile-primary-grid>#profile-owner{height:100%;margin:0}
.profile-center-page .profile-primary-grid .panel__head{min-height:72px}
.profile-center-page #profile-structure .profile-tree{display:grid!important;grid-template-columns:minmax(0,1fr) 240px!important;grid-template-areas:"branches center"!important;gap:18px!important;align-items:start!important;direction:ltr!important}
.profile-center-page #profile-structure .profile-tree__center{grid-area:center!important;direction:rtl!important;position:sticky!important;top:82px!important;display:flex!important;align-items:center!important;gap:12px!important;padding:18px!important;border:1px solid #ddd6fe!important;border-radius:18px!important;background:linear-gradient(145deg,#fff,#f8f5ff)!important;box-shadow:0 8px 24px rgba(124,58,237,.06)!important;text-align:right!important}
.profile-center-page #profile-structure .profile-tree__center>div{width:100%;text-align:right!important}
.profile-center-page #profile-structure .profile-tree__branches{grid-area:branches!important;direction:rtl!important;display:grid!important;gap:14px!important}
.profile-center-page #profile-structure .profile-tree__department{overflow:hidden!important;padding:0!important;border:1px solid #e7e2ef!important;border-radius:18px!important;background:#fff!important;box-shadow:0 6px 18px rgba(15,23,42,.035)!important}
.profile-center-page #profile-structure .profile-tree__department.is-active{border-color:#c4b5fd!important;box-shadow:0 8px 24px rgba(124,58,237,.08)!important}
.profile-center-page #profile-structure .profile-tree__department-head{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:14px!important;padding:15px 16px!important;margin:0!important;border-bottom:1px solid #eee9f5!important;background:#faf9fc!important;border-radius:0!important}
.profile-center-page #profile-structure .profile-tree__department.is-active>.profile-tree__department-head{background:#f7f3ff!important}
.profile-center-page #profile-structure .profile-tree__department-title{display:flex!important;align-items:center!important;gap:11px!important}
.profile-center-page #profile-structure .profile-tree__department-title .profile-tree__node-icon{width:42px!important;height:42px!important;border-radius:12px!important;background:#ede9fe!important;color:#6d28d9!important;font-size:17px!important}
.profile-center-page #profile-structure .profile-tree__department-title>div{display:grid!important;gap:2px!important}
.profile-center-page #profile-structure .profile-tree__department-title>div::before{content:"بخش"!important;font-size:11px!important;font-weight:900!important;color:#7c3aed!important;line-height:1.2!important}
.profile-center-page #profile-structure .profile-tree__department-title b{font-size:16px!important;font-weight:950!important;color:#20162f!important}
.profile-center-page #profile-structure .profile-tree__department-title small{font-size:11px!important;color:#7b7484!important;margin:0!important}
.profile-center-page #profile-structure .profile-tree__groups{display:grid!important;gap:0!important;padding:0!important;background:#fff!important}
.profile-center-page #profile-structure .profile-tree__groups::before{content:"گروه‌های پرسنلی"!important;display:block!important;padding:10px 16px!important;border-bottom:1px solid #f0edf4!important;background:#fff!important;color:#6f6878!important;font-size:12px!important;font-weight:900!important}
.profile-center-page #profile-structure .profile-tree__group{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:center!important;gap:14px!important;margin:0!important;padding:12px 14px!important;border:0!important;border-bottom:1px solid #f1eef5!important;border-radius:0!important;background:#fff!important}
.profile-center-page #profile-structure .profile-tree__group:last-child{border-bottom:0!important}
.profile-center-page #profile-structure .profile-tree__group.is-active{background:#faf7ff!important;box-shadow:inset -3px 0 0 #8b5cf6!important}
.profile-center-page #profile-structure .profile-tree__group--recovered{background:#fffdf8!important}
.profile-center-page #profile-structure .profile-tree__group-main{display:flex!important;align-items:center!important;gap:10px!important;min-width:0!important}
.profile-center-page #profile-structure .profile-tree__group-main .profile-tree__node-icon{width:38px!important;height:38px!important;border-radius:11px!important;background:#f2f6fb!important;color:#486b8c!important}
.profile-center-page #profile-structure .profile-tree__group-main>div::before{content:none!important}
.profile-center-page #profile-structure .profile-tree__group-main b{font-size:14px!important;font-weight:900!important;color:#272132!important}
.profile-center-page #profile-structure .profile-tree__group-main small{font-size:11px!important;color:#81798b!important;margin-top:2px!important}
.profile-center-page #profile-structure .profile-tree__actions{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:6px!important;flex-wrap:wrap!important}
.profile-center-page #profile-structure .profile-tree__actions .btn{min-height:34px!important;padding:6px 9px!important;font-size:11px!important;white-space:nowrap!important}
.profile-center-page #profile-structure .profile-tree__scope-badge,.profile-center-page #profile-structure .profile-tree__active{font-size:11px!important;font-weight:900!important}
.profile-center-page .profile-backup-dialog{max-width:520px!important}
.profile-backup-dialog__head{display:flex;align-items:center;gap:12px;margin-bottom:16px}.profile-backup-dialog__icon{width:46px;height:46px;border-radius:13px;display:grid;place-items:center;background:#ecfdf5;color:#047857;font-size:18px}.profile-backup-dialog__head h3{margin:0 0 4px;font-size:18px}.profile-backup-dialog__head p{margin:0;color:#7b7484;font-size:12px}.profile-backup-dialog__actions{display:flex;gap:8px;justify-content:flex-start;margin-top:16px;flex-wrap:wrap}
@media(max-width:1180px){.profile-center-page .profile-primary-grid{grid-template-columns:1fr}.profile-center-page #profile-structure .profile-tree{grid-template-columns:1fr!important;grid-template-areas:"center" "branches"!important}.profile-center-page #profile-structure .profile-tree__center{position:static!important}}
@media(max-width:760px){.profile-center-page #profile-structure .profile-tree__group{grid-template-columns:1fr!important}.profile-center-page #profile-structure .profile-tree__actions{justify-content:flex-start!important}.profile-center-page #profile-structure .profile-tree__actions .btn{flex:1 1 calc(50% - 6px)!important}.profile-backup-dialog__actions{display:grid;grid-template-columns:1fr}.profile-backup-dialog__actions .btn{width:100%}}
