/* Focused release polish: Account appearance and in-rail onboarding progress. */
.acct-theme-state{margin-left:auto;padding:2px 8px;border-radius:var(--r-pill);background:var(--surface-3);color:var(--text-3);font-size:10.5px;font-weight:750;letter-spacing:.02em}
.acct-menu{position:absolute;left:0;right:0;bottom:calc(100% + 8px);z-index:320;margin:0;max-height:min(470px,calc(100vh - 110px));overflow-y:auto;box-shadow:0 18px 50px rgba(0,0,0,.28)}
.acct-menu .acct-btn{gap:10px;min-height:40px}
.acct-menu .acct-btn .label{flex:1;min-width:0;white-space:nowrap}
.acct-menu .acct-theme-state{flex:none;white-space:nowrap}
.acct-btn[aria-pressed="true"] .acct-theme-state{background:rgba(43,208,197,.14);color:var(--brand-cyan)}
.rail-setup-progress{width:100%;min-height:52px;margin:4px 0 8px;padding:8px 10px;display:flex;align-items:center;gap:9px;border:1px solid var(--border);border-radius:var(--r-md);background:var(--surface-2);color:var(--text-2);font-family:inherit;text-align:left;cursor:pointer;transition:border-color var(--dur-fast),background var(--dur-fast)}
.rail-setup-progress:hover{border-color:rgba(43,208,197,.4);background:var(--surface-3)}
.rail-setup-ring{width:32px;height:32px;flex:0 0 32px;border-radius:50%;display:grid;place-items:center;background:conic-gradient(var(--brand-cyan) var(--setup-progress,0%),var(--surface-3) 0);color:var(--text-1);font-size:9px;font-weight:800;position:relative;isolation:isolate}
.rail-setup-ring::before{content:"";position:absolute;inset:4px;border-radius:50%;background:var(--surface-2);z-index:-1}
.rail-setup-copy{display:flex;flex:1;min-width:0;flex-direction:column;gap:2px}.rail-setup-copy b{font-size:12px;color:var(--text-1)}.rail-setup-copy small{font-size:10.5px;color:var(--text-3)}
.app-layout.rail-collapsed .acct-menu .acct-theme-state{display:inline-flex!important}
.app-layout.rail-collapsed .rail-setup-progress{justify-content:center;padding:8px 0}.app-layout.rail-collapsed .rail-setup-copy,.app-layout.rail-collapsed .rail-setup-progress>span:last-child{display:none}

/* account-row.css — the account row at the foot of the rail: the account trigger and the
   feedback control that sits beside it.

   Feedback used to be a text item inside the account menu, which meant reporting a problem
   required first finding the menu that hides it. It is now a permanent icon on the row itself.
   That is also why the collapsed rail stacks rather than hiding the icon: a way to report a
   fault has to stay reachable in every state, or the state it is missing from is exactly the
   one someone is stuck in. */
.acct-row{display:flex;align-items:center;gap:6px;}
.acct-row .acct-btn{flex:1;min-width:0;}
.acct-icon-btn{display:flex;align-items:center;justify-content:center;flex:none;width:34px;height:34px;border-radius:var(--r-md);color:var(--text-2);background:none;border:none;cursor:pointer;}
.acct-icon-btn:hover{background:var(--surface-2);color:var(--text-1);}
.acct-icon-btn:focus-visible{outline:2px solid var(--brand-cyan,#2BD0C5);outline-offset:2px;}
.acct-icon-btn svg{width:18px;height:18px;flex:none;}
.app-layout.rail-collapsed .acct-row{flex-direction:column;align-items:center;gap:2px;}
.app-layout.rail-collapsed .acct-row > .acct-btn{width:100%;}

/* The account row. The label used to be one span that grew with its contents, so a long identity ran
   underneath the feedback icon beside it. It is now a fixed-width column that truncates, with the
   plan on a second line, and the chevron is a sibling that cannot be overlapped. */
.acct-row .acct-btn .acct-id{display:flex;flex-direction:column;align-items:flex-start;gap:1px;min-width:0;flex:1;overflow:hidden;}
.acct-row .acct-btn .acct-name{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;line-height:1.25;}
.acct-row .acct-btn .acct-plan{font-size:10.5px;line-height:1.2;color:var(--text-dim);letter-spacing:.04em;}
.acct-row .acct-btn .acct-plan:empty{display:none;}
.acct-row .acct-btn .acct-chev{width:16px;height:16px;flex:none;margin-left:6px;opacity:.7;}
.app-layout.rail-collapsed .acct-row .acct-btn .acct-id{display:none;}
.app-layout.rail-collapsed .acct-row .acct-btn .acct-chev{display:none;}

/* The active company stays identifiable in both rail widths. The old generic building glyph became
   an empty-looking grey box when its label was hidden; initials keep the control recognisable. */
.org-switch{padding:0 12px 8px}
.org-switch-btn{width:100%;display:flex;align-items:center;gap:9px;background:var(--surface-2);border:1px solid var(--border);border-radius:var(--r-md);padding:8px 10px;cursor:pointer;color:var(--text-1);font-family:inherit;transition:background var(--dur-fast),border-color var(--dur-fast)}
.org-switch-btn:hover{background:var(--surface-3);border-color:var(--border-strong)}
.org-switch-btn:focus-visible{outline:2px solid var(--brand-cyan);outline-offset:2px}
.org-current-mark,.org-menu-mark{display:grid;place-items:center;flex:none;border-radius:9px;background:var(--gradient-brand);color:#fff;font-family:var(--font-head);font-weight:800;letter-spacing:.02em}
.org-current-mark{width:26px;height:26px;font-size:9px}
.org-menu{display:none;margin-top:6px;background:var(--surface-2);border:1px solid var(--border);border-radius:var(--r-md);padding:6px;max-height:320px;overflow:auto;box-shadow:0 14px 34px rgba(0,0,0,.22)}
.org-menu-item,.org-menu-add{width:100%;text-align:left;display:flex;align-items:center;gap:9px;border:none;border-radius:8px;padding:8px 9px;cursor:pointer;color:var(--text-2);font:inherit;font-size:12px;background:transparent}
.org-menu-item:hover,.org-menu-add:hover{background:var(--surface-3);color:var(--text-1)}
.org-menu-item[aria-current="true"]{background:rgba(43,208,197,.12);color:var(--text-1)}
.org-menu-mark{width:24px;height:24px;font-size:8px;border-radius:8px}
.org-menu-name{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.org-menu-check{color:var(--success,#2BD66F);font-weight:800}
.org-menu-add{margin-top:5px;padding-top:10px;border-top:1px solid var(--border);border-radius:0 0 8px 8px;color:var(--brand-cyan);font-weight:700}
.app-layout.rail-collapsed .rail-head{flex-direction:column}
.app-layout.rail-collapsed .rail-bell{display:grid}
.app-layout.rail-collapsed .fc-mascot{display:none}
.app-layout.rail-collapsed .org-switch{padding:0 2px 8px}
.outreach-control-level{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 16px;margin:-5px 0 18px;border:1px solid var(--border);border-radius:14px;background:var(--surface)}
@media(max-width:640px){.outreach-control-level{align-items:stretch;flex-direction:column}.outreach-control-level .btn-secondary{width:100%}}
.app-layout.rail-collapsed #orgSwitchBtn{width:46px;padding:9px}
.app-layout.rail-collapsed .org-current-mark{width:26px;height:26px}

/* Setup > Team on a phone. Each member row carries a name, a role description and an email beside a
   badge and three action buttons. The row is a flex pair with a 24px desktop gap, and the buttons
   cannot shrink below their own labels, so at phone widths the identity column was squeezed narrow
   enough for the email to run underneath the buttons and read as overlapping text. Stack the row:
   identity on its own line, actions on the next, each button sized by its label rather than by
   whatever width is left over. */
@media(max-width:640px){
  #teamMembersList>.settings-row{display:flex!important;flex-direction:column;align-items:stretch!important;}
  #teamMembersList>.settings-row>.settings-info{width:100%;min-width:0;}
  #teamMembersList>.settings-row .settings-name,
  #teamMembersList>.settings-row .settings-desc{min-width:0;overflow-wrap:break-word;word-break:normal;}
  #teamMembersList>.settings-row>div:last-child{width:100%;justify-content:flex-start;row-gap:8px;}
}

/* An unreadable pipeline, said out loud. The board keeps whatever it last knew behind this banner:
   the failure mode being guarded against is an owner reading an empty board and concluding their
   customers are gone. Opaque colours per theme, because the notice sits on the workspace surface. */
.pipe-unavailable{
  display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px;
  margin:0 0 14px;padding:11px 13px;border-radius:8px;
  font-size:13px;line-height:1.5;
  border:1px solid #fcd34d;background:#fffbeb;color:#78350f;
}
.pipe-unavailable strong{color:#7c2d12;}
.pipe-unavailable-retry{
  border:1px solid #b45309;background:transparent;color:#78350f;
  font:inherit;font-weight:600;padding:3px 10px;border-radius:6px;cursor:pointer;
}
.pipe-unavailable-retry:hover{background:#fde68a;}
.pipe-unavailable-retry:focus-visible{outline:2px solid #b45309;outline-offset:2px;}
.pipe-unavailable-why{flex-basis:100%;font-size:11.5px;opacity:.8;}
[data-theme="dark"] .pipe-unavailable{border-color:rgba(251,191,36,.4);background:rgba(120,53,15,.35);color:#fde68a;}
[data-theme="dark"] .pipe-unavailable strong{color:#fef3c7;}
[data-theme="dark"] .pipe-unavailable-retry{border-color:rgba(251,191,36,.55);color:#fde68a;}
[data-theme="dark"] .pipe-unavailable-retry:hover{background:rgba(120,53,15,.6);}
