/* Live feed, the bell, notifications, profile and Settings → Workflows (ui/views/feed.ts, notifications.ts, workflows.ts). */
.feed .ev{padding:var(--sp-12) var(--sp-16);border-bottom:1px solid var(--line)}
.feed .ev:last-of-type{border-bottom:0}
.ev-hd{display:flex;gap:var(--sp-12);align-items:flex-start}
.ev-hd p{margin:0;flex:1;min-width:0;overflow-wrap:anywhere}
.ev-hd small{color:var(--text-2);font-size:var(--fs-sm)}
.ev-ic{width:var(--avatar);height:var(--avatar);border-radius:50%;display:grid;place-items:center;flex-shrink:0;background:var(--hover);color:var(--text-2)}
.ev-ic .icon{width:var(--icon-sm);height:var(--icon-sm)}
.ev-hd .status{flex-shrink:0}
.cm{margin:var(--sp-8) 0 0 calc(var(--avatar) + var(--sp-12));padding-left:var(--sp-12);border-left:2px solid var(--line);font-size:var(--fs-md)}
.cm p{margin:0;overflow-wrap:anywhere}
.cm small{color:var(--text-2);font-size:var(--fs-xs)}
.cm-acts{display:flex;flex-wrap:wrap;align-items:flex-start;gap:var(--sp-8);margin-top:var(--sp-4)}
.cm-edit[open]{flex:1 1 100%}
.cm-edit summary{list-style:none;cursor:pointer}
.cm-edit summary::-webkit-details-marker{display:none}
.ev-form{display:flex;gap:var(--sp-8);margin:var(--sp-8) 0 0}
.ev-form input{flex:1;min-width:0}
.ev-form .btn{flex:0 0 auto}
.ev-add{margin-left:calc(var(--avatar) + var(--sp-12))}
@media (max-width:899px){.ev-add{margin-left:0}.cm{margin-left:var(--sp-12)}}

/* The bell sits in the desktop top bar; phones show the same count on the More tab. */
.bell{position:relative;display:inline-grid;place-items:center;width:var(--tap);height:var(--tap);border-radius:var(--r-md);color:var(--text);flex-shrink:0}
.bell:hover,.bell.on{background:var(--hover)}
.bell .icon{width:var(--icon-lg);height:var(--icon-lg)}
/* Only the bell's and the More tab's count float; the Filters count stays in its button. */
.bell .badge,nav.bottom .badge{position:absolute;top:2px;right:2px;min-width:var(--sp-16);height:var(--sp-16);padding:0 5px;border-radius:var(--r-pill);background:var(--danger);color:var(--on-danger);font-size:var(--fs-xs);font-weight:var(--fw-semi);line-height:var(--sp-16);text-align:center}
nav.bottom a .badge{right:calc(50% - var(--sp-24))}

/* Notifications: the whole row opens the record and marks it read; unread rows say so and are bold. */
ul.nts{list-style:none;margin:0;padding:0}
.nt{display:flex;align-items:center;gap:var(--sp-12);padding-right:var(--sp-16);border-bottom:1px solid var(--line)}
.nt:last-child{border-bottom:0}
.nt-open{flex:1;min-width:0;margin:0}
.nt-open button{display:flex;flex-direction:column;align-items:flex-start;gap:2px;width:100%;min-height:56px;padding:var(--sp-12) var(--sp-16);background:none;border:0;font:inherit;color:var(--text);text-align:left;cursor:pointer;overflow-wrap:anywhere}
.nt-open button:hover{background:var(--hover)}
.nt.unread .nt-body{font-weight:var(--fw-semi)}
.nt-tags{display:flex;flex-wrap:wrap;align-items:center;gap:var(--sp-8)}
.nt-tags:empty{display:none}
.nt-open small{color:var(--text-2);font-size:var(--fs-sm)}

/* Workflows: the list with its switches, and an editor that hides fields the chosen trigger and action do not use. */
.wfl-row{display:flex;flex-wrap:wrap;align-items:center;gap:var(--sp-8) var(--sp-12);padding:var(--sp-8) var(--sp-16);border-bottom:1px solid var(--line)}
ul.rows.wfl li:last-child .wfl-row{border-bottom:0}
ul.rows li a.wfl-main{flex:1 1 220px;min-width:0;border-bottom:0;padding:var(--sp-8) 0}
.wf-notify,.wf-task{display:contents}
.wf-channels{grid-column:1/-1}
.wf-form:has(#f-trigger option[value=stage_changed]:not(:checked)) .wf-stage{display:none}
.wf-form:has(#f-trigger option[value=quote_expiring]:not(:checked)) .wf-days{display:none}
.wf-form:has(#f-trigger option[value=account_created]:checked) .wf-deal{display:none}
.wf-form:has(#f-notify_kind option[value=role]:not(:checked)) .wf-notify-role{display:none}
.wf-form:has(#f-notify_kind option[value=user]:not(:checked)) .wf-notify-user{display:none}
.wf-form:has(#f-notify_kind option[value=none]:checked) .wf-channels{display:none}
.wf-form:has(#f-task_kind option[value=role]:not(:checked)) .wf-task-role{display:none}
.wf-form:has(#f-task_kind option[value=user]:not(:checked)) .wf-task-user{display:none}
.wf-ph{margin:0 0 var(--sp-12)}
.wf-ph summary{display:flex;align-items:center;min-height:var(--tap);cursor:pointer;text-decoration:underline;text-underline-offset:2px}
.wf-ph ul{margin:0 0 var(--sp-8);padding-left:var(--sp-24);font-size:var(--fs-sm)}
.wf-ph code{font-family:var(--mono)}
ul.wf-runs li>div{gap:2px;overflow-wrap:anywhere}
ul.wf-runs li b{font-weight:400}
