/* Aromika CRM · organisation chart 03. All selectors are isolated from other screens. */
.page.page-org-chart{max-width:none;padding:22px 24px 18px}
.oc-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:20px}
.oc-eyebrow{font-size:11px;letter-spacing:.1em;text-transform:uppercase;color:var(--accent);font-weight:700;margin-bottom:5px}
.oc-heading h1{font-size:29px;font-weight:720;letter-spacing:-.7px;margin:0 0 5px}
.oc-heading p{font-size:13px;color:var(--muted);margin:0;line-height:1.5}
.oc-head-actions{display:flex;gap:8px;flex-shrink:0}
.oc-head-actions button{height:40px;font-size:13px;padding:0 13px}
.oc-icon{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex:0 0 auto;display:block}
.oc-workspace{--oc-node:#fff;--oc-canvas:#f6f7fa;--oc-edge:#cad1dc;--oc-dot:#d6dce5;--oc-slate:#5d7190;--oc-blue:#497db3;--oc-teal:#278779;--oc-purple:#8865b5;--oc-text:#242a38;--oc-muted:#778092;--oc-card-border:#e1e5ed;--oc-muted-bg:#f8f9fc;--oc-elevation:0 5px 20px #343f5810;display:flex;flex-direction:column;height:calc(100dvh - 189px);min-height:540px;border:1px solid var(--line);border-radius:18px;background:var(--surface);overflow:hidden;box-shadow:0 8px 36px #343f5806;position:relative;color:var(--ink);isolation:isolate}
:root[data-theme=dark] .oc-workspace{--oc-node:#222630;--oc-canvas:#191d25;--oc-edge:#454e60;--oc-dot:#343d4e;--oc-slate:#a0b1cf;--oc-blue:#8eb9e7;--oc-teal:#7dccbd;--oc-purple:#bea4e7;--oc-text:#f0f2f6;--oc-muted:#a8b2c3;--oc-card-border:#3b4351;--oc-muted-bg:#282e39;--oc-elevation:0 5px 20px #0002}
.oc-workspace [hidden]{display:none!important}
.oc-workspace button{font-weight:500}
.oc-workspace :is(button,input,select):focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.oc-workspace .oc-icon-btn{width:34px;height:34px;padding:7px;border:0;background:transparent;border-radius:9px;flex-shrink:0}
.oc-workspace .oc-icon-btn:hover{background:var(--soft);color:var(--accent)}
.oc-toolbar{display:flex;gap:10px;align-items:center;padding:12px 14px;border-bottom:1px solid var(--line);flex-shrink:0;z-index:6;background:var(--surface);position:relative;flex-wrap:wrap}
.oc-tabs{display:flex;padding:3px;border:1px solid var(--line);border-radius:11px;gap:2px;background:var(--surface2);flex:0 0 auto}
.oc-tabs button{display:flex;align-items:center;gap:7px;border:0;border-radius:8px;background:transparent;padding:8px 11px;color:var(--muted);font-size:13px;white-space:nowrap}
.oc-tabs button.active{color:var(--accent);background:var(--surface);box-shadow:0 2px 7px #252f490c;font-weight:650}
.oc-search{flex:1;min-width:170px;max-width:430px;position:relative;margin-left:auto}
.oc-search-box{display:flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:10px;padding:0 10px;min-height:38px;color:var(--muted);background:var(--surface)}
.oc-search-box input{font-size:13px;border:0;padding:8px 0;background:none;box-shadow:none;outline-offset:0}
.oc-search-box:focus-within{border-color:var(--accent)}
.oc-search-box input:focus-visible{outline:none}
.oc-search-results{position:absolute;left:0;right:0;top:calc(100% + 9px);min-width:280px;max-height:360px;overflow:auto;background:var(--surface);border:1px solid var(--line);border-radius:12px;box-shadow:0 18px 46px #202c4525;z-index:12;padding:5px}
.oc-search-results>button{display:flex;align-items:center;gap:10px;width:100%;text-align:left;justify-content:flex-start;border:0;border-radius:8px;background:transparent;padding:10px}
.oc-search-results>button:hover,.oc-search-results>button:focus{background:var(--soft)}
.oc-search-results>button>span:nth-child(2){min-width:0;flex:1}
.oc-result-icon{padding:8px;background:var(--surface2);border-radius:9px;color:var(--muted)}
.oc-search-results b{display:block;font-size:13px;font-weight:600}
.oc-search-results small{display:block;font-size:11px;margin-top:3px;line-height:1.4}
.oc-search-empty{font-size:13px;padding:16px 12px;color:var(--muted);line-height:1.5}
#oc-scope{width:auto;max-width:172px;font-size:12px;height:38px;padding:6px 9px;background:var(--surface)}
.oc-toolbar>[data-oc=overview]{border:0;padding:7px 9px;font-size:12px;white-space:nowrap}
.oc-context{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:9px 16px;min-height:42px;flex-shrink:0;border-bottom:1px solid var(--line);background:var(--surface2)}
.oc-breadcrumb{display:flex;gap:8px;align-items:center;flex:1;overflow:auto;white-space:nowrap;scrollbar-width:thin;min-width:0;font-size:12px;color:var(--muted)}
.oc-breadcrumb button{font-size:12px;padding:0;border:0;background:transparent;flex-shrink:0;color:var(--muted)}
.oc-breadcrumb button[aria-current]{color:var(--accent);font-weight:600}
.oc-server-badge{display:flex;align-items:center;gap:6px;font-size:11px;color:var(--muted);white-space:nowrap}
.oc-server-badge i{width:6px;height:6px;background:#37a58e;border-radius:50%}
.oc-body{display:flex;min-height:0;flex:1;position:relative;overflow:hidden}
.oc-canvas-wrap{position:relative;flex:1;min-width:0;min-height:0;overflow:hidden;background:var(--oc-canvas)}
.oc-canvas{position:absolute;inset:0;overflow:hidden;background:radial-gradient(circle,var(--oc-dot) .9px,transparent 1.2px);background-size:22px 22px;touch-action:none;cursor:grab;outline-offset:-3px!important}
.oc-canvas.is-panning,.oc-canvas.is-panning *{cursor:grabbing!important;user-select:none}
.oc-world{position:absolute;left:0;top:0;transform-origin:0 0;will-change:transform}
.oc-edges{position:absolute;left:0;top:0;pointer-events:none;overflow:visible}
.oc-edges path{stroke:var(--oc-edge);stroke-width:1.65;stroke-linecap:round;fill:none}
.oc-edges path.is-virtual{stroke-dasharray:5 5}
.oc-edges path.is-highlighted{stroke:var(--accent);stroke-width:2.2}
.oc-nodes{position:absolute;inset:0}
.oc-node{position:absolute;box-sizing:border-box;--oc-tint:var(--oc-slate);border:1px solid var(--oc-card-border);border-radius:13px;background:var(--oc-node);box-shadow:var(--oc-elevation);color:var(--oc-text);cursor:default;transition:box-shadow .16s,border-color .16s}
.oc-node:before{content:'';position:absolute;left:13px;right:13px;top:-1px;height:3px;border-radius:0 0 6px 6px;background:var(--oc-tint)}
.oc-node[data-kind=company]{--oc-tint:var(--accent)}
.oc-node[data-kind=region]{--oc-tint:var(--oc-blue)}
.oc-node[data-kind=branch]{--oc-tint:var(--oc-teal)}
.oc-node[data-kind=department]{--oc-tint:var(--oc-purple)}
.oc-node[data-kind=team]{--oc-tint:var(--oc-slate)}
.oc-node[data-kind=person]{--oc-tint:var(--oc-purple)}
.oc-node.is-virtual{border-style:dashed;box-shadow:none;background:var(--oc-muted-bg)}
.oc-node.is-virtual:before{display:none}
.oc-node.is-selected{border-color:var(--accent);box-shadow:0 0 0 4px color-mix(in srgb,var(--accent) 15%,transparent),0 7px 26px #252f4910}
.oc-node.is-context{border-style:dashed}
.oc-node:hover{border-color:var(--oc-tint);box-shadow:0 6px 24px #252f4915}
.oc-card-main{display:block!important;width:100%;height:133px;text-align:left!important;border:0!important;background:transparent!important;padding:14px 15px 6px!important;border-radius:13px 13px 0 0!important;outline-offset:-4px!important;color:var(--oc-text)!important}
.oc-node-top{display:flex;align-items:center;justify-content:space-between;min-height:18px;padding-right:18px;margin-bottom:9px}
.oc-kind{display:flex;align-items:center;gap:6px;font-size:11px;color:var(--oc-tint);font-weight:650}
.oc-kind .oc-icon{width:14px;height:14px;stroke-width:1.65}
.oc-warning-dot{width:7px;height:7px;background:#cc9637;border-radius:50%}
.oc-card-name{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:16px;font-weight:680;line-height:1.23;letter-spacing:-.15px;color:var(--oc-text)}
.oc-lead-line{display:flex;align-items:center;gap:9px;margin-top:11px;min-width:0}
.oc-avatar{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;flex-shrink:0;font-size:10px;letter-spacing:0;font-weight:650;background:color-mix(in srgb,var(--oc-tint,var(--accent)) 10%,var(--oc-node,var(--surface)));color:var(--oc-tint,var(--accent));overflow:hidden}
.oc-avatar img{width:100%;height:100%;object-fit:cover}
.oc-lead-line>div{flex:1;min-width:0}
.oc-lead-line strong{display:block;font-size:12px;line-height:1.3;font-weight:600;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--oc-text)}
.oc-lead-line span:not(.oc-avatar,.oc-more-leads){display:block;color:var(--oc-muted);font-size:10px;line-height:1.35;margin-top:2px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.oc-more-leads{font-size:10px;color:var(--oc-muted);border:1px solid var(--oc-card-border);border-radius:6px;padding:3px 4px;flex-shrink:0}
.oc-vacancy{display:flex;align-items:center;gap:8px;margin-top:12px;min-height:31px;color:var(--oc-muted)}
.oc-vacancy>.oc-icon{width:18px;height:18px;opacity:.65}
.oc-vacancy>span{font-size:11px;line-height:1.35;max-width:164px}
.oc-card-description{font-size:12px;line-height:1.4;color:var(--oc-muted);margin:9px 0 0}
.oc-person-line{display:flex;gap:9px;align-items:center;min-height:46px}
.oc-person-line .oc-avatar{width:36px;height:36px;font-size:11px}
.oc-person-line>div{min-width:0}
.oc-person-line strong{font-size:14px;font-weight:650;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.3}
.oc-person-line span:not(.oc-avatar){font-size:11px;color:var(--oc-muted);display:block;line-height:1.35;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-top:3px}
.oc-unit-label{display:flex;align-items:center;gap:5px;font-size:11px;color:var(--oc-muted);margin-top:10px;min-width:0}
.oc-unit-label .oc-icon{width:14px;height:14px}
.oc-unit-label span{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.oc-node-bottom{height:38px;border-top:1px solid var(--oc-card-border);padding:0 12px;display:flex;justify-content:space-between;align-items:center;gap:9px;border-radius:0 0 13px 13px;background:var(--oc-muted-bg)}
.oc-node-bottom>span:first-child{display:flex;align-items:center;gap:5px;font-size:12px;color:var(--oc-muted);font-weight:600}
.oc-node-bottom>span:first-child .oc-icon{width:15px;height:15px}
.oc-node-bottom .oc-expand{display:flex;align-items:center;gap:5px;border:0;border-radius:7px;background:transparent;font-size:11px;color:var(--oc-tint);padding:5px 4px;min-height:30px;font-weight:600}
.oc-node-bottom .oc-expand:hover{background:var(--soft);color:var(--accent)}
.oc-expand .oc-icon{width:14px;height:14px;transition:transform .18s}
.oc-expand.is-open .oc-icon{transform:rotate(180deg)}
.oc-leaf{font-size:10px;color:var(--oc-muted)}
.oc-card-edit{position:absolute;right:7px;top:7px;width:27px;height:27px;padding:6px!important;border:0!important;background:transparent!important;color:var(--oc-muted);border-radius:7px}
.oc-card-edit .oc-icon{width:14px;height:14px}
.oc-card-edit:hover{background:var(--soft)!important;color:var(--accent)}
.oc-add-child{position:absolute;left:calc(50% - 15px);bottom:-39px;width:30px;height:30px;display:grid!important;place-items:center;padding:5px!important;border:1px solid var(--oc-card-border)!important;border-radius:50%!important;background:var(--oc-node)!important;color:var(--accent);z-index:3;box-shadow:0 4px 10px #252f490c}
.oc-add-child .oc-icon{width:16px;height:16px}
.oc-zoom{position:absolute;left:18px;bottom:16px;display:flex;align-items:center;padding:5px;gap:2px;border:1px solid var(--oc-card-border);background:var(--oc-node);border-radius:13px;box-shadow:0 6px 18px #252f4910;z-index:4}
.oc-zoom>span{width:1px;height:19px;background:var(--line);margin:0 4px}
.oc-workspace .oc-zoom-value{font-size:12px;min-width:49px;padding:7px 5px;border:0;background:transparent;font-variant-numeric:tabular-nums}
.oc-pan-tip{position:absolute;right:17px;bottom:26px;color:var(--oc-muted);font-size:11px;pointer-events:none;background:var(--oc-canvas);padding:3px 5px;border-radius:4px}
.oc-inspector{width:326px;flex:0 0 326px;background:var(--surface);border-left:1px solid var(--line);display:flex;flex-direction:column;min-height:0;z-index:5}
.oc-inspector-head{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid var(--line);flex-shrink:0;color:var(--muted);font-size:12px}
.oc-inspector-scroll{padding:20px 18px;overflow:auto;flex:1;min-height:0}
.oc-inspector-badge{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:650;text-transform:uppercase;letter-spacing:.06em;color:var(--accent);margin-bottom:12px}
.oc-inspector-badge .oc-icon{width:15px;height:15px}
.oc-inspector h2{font-size:23px;line-height:1.2;letter-spacing:-.5px;margin-bottom:7px;overflow-wrap:anywhere}
.oc-inspector-sub{font-size:12px;color:var(--muted);line-height:1.5;margin-bottom:18px}
.oc-info-grid{display:grid;grid-template-columns:1fr 1fr;border:1px solid var(--line);border-radius:11px;margin-bottom:20px;overflow:hidden}
.oc-info-grid>div{padding:12px;background:var(--surface2)}
.oc-info-grid>div+div{border-left:1px solid var(--line)}
.oc-info-grid span{display:block;color:var(--muted);font-size:11px;line-height:1.4}
.oc-info-grid b{display:block;margin-top:6px;font-size:21px;font-weight:650}
.oc-field{margin-bottom:16px}
.oc-field>span{display:block;font-size:11px;color:var(--muted);margin-bottom:6px}
.oc-field>strong{font-size:13px;font-weight:500}
.oc-field button{font-size:13px;padding:0;display:flex;gap:8px;justify-content:flex-start;color:var(--accent);background:transparent;border:0;text-align:left}
.oc-field .oc-icon{width:16px;height:16px}
.oc-side-actions{display:flex;flex-wrap:wrap;gap:7px;margin:20px 0}
.oc-side-actions button{font-size:12px;min-height:36px;padding:7px 9px}
.oc-side-actions .oc-icon{width:16px;height:16px}
.oc-inspector h3{font-size:13px;margin:24px 0 10px;display:flex;align-items:center;justify-content:space-between;gap:7px}
.oc-inspector h3>span{font-size:11px;font-weight:500;color:var(--muted);background:var(--surface2);border:1px solid var(--line);padding:3px 6px;border-radius:6px}
.oc-child-list{display:flex;flex-direction:column;gap:3px}
.oc-child-list>button{padding:10px 7px;border:0;background:var(--surface2);border-radius:8px;font-size:12px;display:flex;justify-content:space-between;gap:10px;text-align:left}
.oc-child-list>button:hover{background:var(--soft)}
.oc-child-list .oc-icon{width:15px;height:15px;color:var(--muted)}
.oc-person-row{display:flex;align-items:center;gap:4px;border-bottom:1px solid var(--line);min-height:59px}
.oc-person-row>button:first-child{min-width:0;flex:1;display:flex;text-align:left;align-items:center;justify-content:flex-start;gap:9px;padding:10px 0;border:0;background:transparent}
.oc-person-row>button>span:not(.oc-avatar){min-width:0;display:block}
.oc-person-row strong{display:block;font-size:12px;font-weight:600;line-height:1.4}
.oc-person-row small{display:block;font-size:10px;line-height:1.4;margin-top:2px;color:var(--muted)}
.oc-person-row .oc-icon-btn{padding:5px;width:27px}
.oc-person-row .oc-icon-btn .oc-icon{width:15px;height:15px}
.oc-person-search{font-size:12px;margin-bottom:6px}
.oc-no-people{font-size:12px;color:var(--muted);line-height:1.5}
.oc-inline-note{font-size:11px;line-height:1.55;color:var(--muted);padding:11px 12px;border:1px solid var(--line);border-radius:9px;background:var(--surface2);margin:20px 0 0}
.oc-inline-note.warn{margin:0 0 16px;border-color:#cb99496b;color:#9b6921}
.oc-workspace .oc-full-profile{width:100%;font-size:13px;display:flex;justify-content:space-between;margin-top:14px}
.oc-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 16px;border-top:1px solid var(--line);background:var(--surface);font-size:11px;color:var(--muted);line-height:1.4;flex-shrink:0;flex-wrap:wrap}
.oc-workspace.is-fullscreen{position:fixed;inset:12px;z-index:900;height:auto;min-height:0;box-shadow:0 0 0 100vmax #1116,0 12px 50px #0003}
@media(min-width:1680px){.page.page-org-chart{padding:26px 30px 18px}.oc-heading{margin-bottom:23px}.oc-workspace{height:calc(100dvh - 204px)}}
@media(max-width:1320px){.oc-pan-tip{display:none}.oc-search{max-width:none}.oc-toolbar{gap:6px}.oc-tabs button{font-size:12px;padding:8px}.oc-inspector{flex-basis:302px;width:302px}}
@media(max-width:1120px){.oc-head-actions>[data-oc=refresh]{display:none}.oc-workspace{height:calc(100dvh - 186px)}.oc-search{order:2;flex:1 1 calc(100% - 210px)}#oc-scope{order:2}.oc-toolbar{justify-content:space-between}.oc-toolbar>.oc-tabs{margin-right:auto}.oc-footer span:last-child{display:none}.oc-heading p{max-width:580px}}
@media(max-width:760px){.page.page-org-chart{padding:16px 10px}.oc-heading{align-items:flex-start;margin-bottom:14px}.oc-heading h1{font-size:24px}.oc-heading p{font-size:12px}.oc-head-actions .primary{font-size:0;padding:9px;width:39px}.oc-head-actions .primary .oc-icon{width:20px;height:20px}.oc-workspace{height:calc(100dvh - 195px);min-height:510px;border-radius:13px}.oc-toolbar{padding:8px;gap:4px}.oc-tabs{padding:2px}.oc-tabs button{font-size:12px;gap:4px;padding:8px}.oc-tabs .oc-icon{width:16px;height:16px}.oc-toolbar>[data-oc=overview]{font-size:11px;padding:7px}.oc-toolbar>[data-oc=my-branch]{display:none}.oc-search{min-width:140px}.oc-search-box input{font-size:12px}#oc-scope{max-width:136px;font-size:11px}.oc-context{padding:8px 10px}.oc-server-badge{display:none}.oc-breadcrumb{font-size:11px}.oc-inspector{position:absolute;right:0;top:0;bottom:0;width:min(326px,100%);box-shadow:-12px 0 34px #19223718;border-left:1px solid var(--line)}.oc-footer{padding:10px;font-size:10px}.oc-zoom{left:10px;bottom:10px;padding:3px}.oc-workspace.is-fullscreen{inset:5px}}
@media(prefers-reduced-motion:reduce){.oc-workspace *, .oc-workspace *:before{transition:none!important}}
