/* AngelCRM v1.321 — project timeline + interactive relation graph */
.projectTimelinePanel{max-width:1100px;margin:0 auto;padding-bottom:30px}.projectTimelineFilters{display:flex;gap:8px;overflow:auto;padding:2px 0 14px;scrollbar-width:none}.projectTimelineFilters::-webkit-scrollbar{display:none}.timelineFilter{border:1px solid var(--line);background:#fff;border-radius:999px;padding:8px 11px;font-size:12px;font-weight:850;white-space:nowrap;color:#475569}.timelineFilter span{margin-left:5px;color:#94a3b8}.timelineFilter.active{background:#0f172a;color:#fff;border-color:#0f172a}.timelineFilter.active span{color:#bae6fd}.projectTimelineList{position:relative;padding-left:8px}.projectTimelineList:before{content:"";position:absolute;left:25px;top:10px;bottom:12px;width:2px;background:#e2e8f0}.projectTimelineItem{position:relative;display:grid;grid-template-columns:36px minmax(0,1fr);gap:12px;padding:8px 0 12px}.projectTimelineIcon{position:relative;z-index:1;width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:#dbeafe;color:#1d4ed8;border:4px solid #fff;font-weight:1000;box-shadow:0 0 0 1px #dbeafe}.projectTimelineItem.green .projectTimelineIcon{background:#dcfce7;color:#15803d;box-shadow:0 0 0 1px #bbf7d0}.projectTimelineItem.orange .projectTimelineIcon{background:#ffedd5;color:#c2410c;box-shadow:0 0 0 1px #fed7aa}.projectTimelineItem.red .projectTimelineIcon{background:#fee2e2;color:#b91c1c;box-shadow:0 0 0 1px #fecaca}.projectTimelineItem.violet .projectTimelineIcon{background:#ede9fe;color:#6d28d9;box-shadow:0 0 0 1px #ddd6fe}.projectTimelineItem.cyan .projectTimelineIcon{background:#cffafe;color:#0e7490;box-shadow:0 0 0 1px #a5f3fc}.projectTimelineContent{min-width:0;border:1px solid var(--line);border-radius:17px;padding:11px 14px;background:linear-gradient(180deg,#fff,#fbfdff);box-shadow:0 5px 14px rgba(15,23,42,.035);position:relative;overflow:hidden}.projectTimelineContent:before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:#60a5fa}.projectTimelineItem.violet .projectTimelineContent:before{background:#8b5cf6}.projectTimelineItem.green .projectTimelineContent:before{background:#22c55e}.projectTimelineItem.orange .projectTimelineContent:before{background:#f59e0b}.projectTimelineItem.red .projectTimelineContent:before{background:#ef4444}.projectTimelineItem.cyan .projectTimelineContent:before{background:#06b6d4}.projectTimelineItem.clickable .projectTimelineContent{cursor:pointer}.projectTimelineItem.clickable .projectTimelineContent:hover{border-color:#bfdbfe;background:#f8fbff}.projectTimelineTop{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.projectTimelineTop b{font-size:14px}.projectTimelineTop time{white-space:nowrap;font-size:11px;color:#64748b}.projectTimelineKind{font-size:10px;text-transform:uppercase;letter-spacing:.07em;font-weight:1000;color:#2563eb;margin-top:3px}.projectTimelineActor{margin-left:8px;text-transform:none;letter-spacing:0;color:#64748b;font-weight:700}.projectTimelineContent p{margin:7px 0 0;color:#475569;font-size:12px;line-height:1.4;white-space:pre-wrap;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.projectTimelineOpen{display:block;margin-top:7px;color:#2563eb;font-weight:900}.projectTimelineChanges{display:flex;align-items:center;gap:6px;margin-top:7px;min-width:0;overflow:hidden;white-space:nowrap}.projectTimelineChange{display:inline-flex;align-items:center;gap:5px;min-width:0;max-width:310px;height:27px;padding:0 8px;border:1px solid #e2e8f0;border-radius:9px;background:#f8fafc;color:#475569;font-size:10.5px}.projectTimelineChange em{font-style:normal;font-weight:900;color:#64748b}.projectTimelineChange>span,.projectTimelineChange>b{max-width:94px;overflow:hidden;text-overflow:ellipsis}.projectTimelineChange>b{color:#0f172a}.projectTimelineChange i{font-style:normal;color:#8b5cf6;font-weight:1000}.projectTimelineChangeMore{height:27px;min-width:31px;padding:0 7px;border-radius:9px;background:#ede9fe;color:#6d28d9;display:inline-grid;place-items:center;font-size:10px;font-weight:1000}

.relationExplorer{padding-bottom:24px}.relationExplorerToolbar{display:flex;justify-content:flex-end;align-items:center;margin-bottom:10px}.relationModeSwitch{display:flex;border:1px solid var(--line);border-radius:13px;padding:3px;background:#f8fafc}.relationModeBtn{border:0;background:transparent;border-radius:10px;padding:8px 13px;font-weight:900;font-size:12px;color:#64748b}.relationModeBtn.active{background:#fff;color:#0f172a;box-shadow:0 3px 10px rgba(15,23,42,.08)}.relationGraphView.hidden,.relationListView.hidden{display:none!important}.relationGraphLayout{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(250px,.6fr);gap:14px;align-items:stretch}.relationGraphCanvas{position:relative;border:1px solid var(--line);border-radius:24px;background:radial-gradient(circle at 50% 46%,#fff 0,#f8fbff 44%,#f1f6fc 100%);min-height:470px;height:clamp(470px,56vh,620px);overflow:hidden;touch-action:none;user-select:none;-webkit-user-select:none}.relationGraphCanvas svg{display:block;width:100%;height:100%;min-height:0;cursor:grab;touch-action:none}.relationGraphCanvas svg:active{cursor:grabbing}.relationGraphViewport{transform-origin:0 0}.relationGraphControls{position:absolute;right:12px;top:12px;z-index:3;display:flex;gap:5px;padding:4px;border:1px solid rgba(148,163,184,.28);border-radius:13px;background:rgba(255,255,255,.88);backdrop-filter:blur(8px);box-shadow:0 7px 20px rgba(15,23,42,.08)}.relationGraphControls button{width:34px;height:34px;border:0;border-radius:9px;background:transparent;color:#334155;font-size:18px;font-weight:900;display:grid;place-items:center}.relationGraphControls button:hover{background:#eef4fb;color:#2563eb}.relationGraphEdges line{stroke:#bdd0e5;stroke-width:1.6;stroke-dasharray:5 7}.relationGraphCenter circle{fill:#0f172a;stroke:#38bdf8;stroke-width:4;filter:drop-shadow(0 12px 18px rgba(15,23,42,.18))}.relationGraphCenter text{fill:#fff;font-size:13px;font-weight:900}.relationGraphCenter text.count{fill:#bae6fd;font-size:11px}.relationGraphNode{cursor:pointer;outline:none}.relationGraphNode circle{fill:#fff;stroke:#bfdbfe;stroke-width:2.2;filter:drop-shadow(0 8px 14px rgba(15,23,42,.10));transition:fill .15s,stroke .15s,stroke-width .15s}.relationGraphNode text{fill:#334155;font-size:11px;font-weight:850;pointer-events:none}.relationGraphNode text.count{fill:#2563eb;font-size:15px;font-weight:1000}.relationGraphNode:hover circle,.relationGraphNode.selected circle,.relationGraphNode:focus circle{fill:#eff6ff;stroke:#2563eb;stroke-width:4}.relationGraphDetail{border:1px solid var(--line);border-radius:22px;background:#fff;overflow:hidden;min-width:0}.relationGraphDetailHead{padding:16px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:10px}.relationGraphDetailHead span{font-size:10px;text-transform:uppercase;letter-spacing:.12em;color:#2563eb;font-weight:1000}.relationGraphDetailHead h4{margin:3px 0 0;font-size:17px}.relationGraphDetailHead>b{font-size:22px;color:#2563eb}.relationGraphItems{max-height:510px;overflow:auto;padding:8px}.relationGraphItems button{width:100%;border:0;background:#fff;border-radius:13px;padding:10px;display:grid;grid-template-columns:minmax(0,1fr) 16px;grid-template-rows:auto auto;text-align:left}.relationGraphItems button:hover{background:#f8fafc}.relationGraphItems button span{font-weight:850;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.relationGraphItems button small{color:var(--muted);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.relationGraphItems button i{grid-row:1/3;grid-column:2;align-self:center;font-style:normal;color:#94a3b8}.relationGraphMore{font-size:11px;color:var(--muted);padding:9px 14px 14px}.relationGraphEmpty{min-height:470px;display:grid;place-items:center;color:var(--muted);border:1px dashed var(--line);border-radius:22px}

@media(max-width:900px){.relationGraphLayout{grid-template-columns:1fr}.relationGraphCanvas{min-height:450px;height:min(58vh,560px)}.relationGraphDetail{max-height:340px}.relationGraphItems{max-height:270px}}
@media(max-width:760px){.projectTimelineFilters{padding-top:0}.projectTimelineTop{display:block}.projectTimelineTop time{display:block;margin-top:3px}.projectTimelineList{padding-left:0}.projectTimelineList:before{left:18px}.projectTimelineItem{grid-template-columns:36px minmax(0,1fr)}.projectTimelineContent{padding:10px 11px}.projectTimelineChanges{gap:5px}.projectTimelineChange{max-width:225px}.projectTimelineChange:nth-child(n+3){display:none}.relationExplorerToolbar{margin-bottom:8px}.relationModeSwitch{width:max-content}.relationGraphCanvas{min-height:430px;height:min(62vh,530px);border-radius:20px}.relationGraphControls{right:8px;top:8px}.relationGraphControls button{width:32px;height:32px}.relationGraphDetail{max-height:none}.relationGraphItems{max-height:320px}}

/* v1.321 — independently draggable relation nodes with soft motion */
.relationGraphCanvas svg{cursor:grab}
.relationGraphCanvas svg.viewportDragging{cursor:grabbing}
.relationGraphCanvas svg.nodeDragging{cursor:default}
.relationGraphDraggable{cursor:move}
.relationGraphDraggable circle{transform-box:fill-box;transform-origin:center;transition:stroke .18s ease,stroke-width .18s ease,filter .2s ease,fill .18s ease;animation:relationNodeReveal .38s cubic-bezier(.2,.8,.2,1) backwards;animation-delay:var(--graph-delay,0ms)}
.relationGraphDraggable text{pointer-events:none;animation:relationTextReveal .3s ease backwards;animation-delay:calc(var(--graph-delay,0ms) + 70ms)}
.relationGraphDraggable.is-dragging circle{stroke:#0ea5e9!important;stroke-width:4.5!important;filter:drop-shadow(0 14px 20px rgba(14,165,233,.24));transform:scale(1.055)}
.relationGraphDraggable.is-settling circle{animation:relationNodeSettle .34s cubic-bezier(.16,1,.3,1)}
.relationGraphEdges line{animation:relationEdgeFlow 8s linear infinite;transition:x1 .06s linear,y1 .06s linear,x2 .06s linear,y2 .06s linear,stroke .18s ease}
.relationGraphCanvas svg.nodeDragging .relationGraphEdges line{stroke:#93c5fd}
@keyframes relationNodeReveal{0%{opacity:0;transform:scale(.86)}100%{opacity:1;transform:scale(1)}}
@keyframes relationTextReveal{0%{opacity:0}100%{opacity:1}}
@keyframes relationNodeSettle{0%{transform:scale(1.055)}45%{transform:scale(.985)}72%{transform:scale(1.012)}100%{transform:scale(1)}}
@keyframes relationEdgeFlow{to{stroke-dashoffset:-120}}
@media(prefers-reduced-motion:reduce){.relationGraphDraggable circle,.relationGraphDraggable text,.relationGraphEdges line{animation:none!important;transition:none!important}}

/* v1.323 — mobile graph viewport is a bit shorter for better balance */
@media(max-width:900px){.relationGraphCanvas{min-height:390px!important;height:min(50vh,470px)!important}.relationGraphItems{max-height:240px!important}}
@media(max-width:760px){.relationGraphCanvas{min-height:360px!important;height:min(46vh,420px)!important}.relationGraphItems{max-height:220px!important}}

/* v1.350 — wrapped graph labels stay inside draggable nodes */
.relationGraphCenter text.label{font-size:11.5px!important}.relationGraphNode text.label{font-size:10px!important}.relationGraphCenter text.label tspan,.relationGraphNode text.label tspan{pointer-events:none}
