.account-dropdown { position:relative; max-width:100%; }
.account-trigger { max-width:100%; border-color:transparent; background:transparent; gap:8px; min-height:44px; }
.account-trigger .user-pill { border:0; padding:0; background:transparent; color:var(--ink); min-width:0; white-space:normal; overflow-wrap:anywhere; text-align:left; }
.account-trigger svg { width:20px; height:20px; flex:none; }
.account-menu { position:absolute; z-index:30; right:0; top:calc(100% + 6px); width:280px; max-width:calc(100vw - 32px); background:var(--surface); border:1px solid #aebbc7; border-radius:6px; padding:6px; box-shadow:0 8px 24px #14203326; }
.account-menu-identity { padding:10px; margin:0 0 4px; border-bottom:1px solid var(--line); font-size:13px; color:var(--muted); overflow-wrap:anywhere; }
.account-menu button,.account-menu a { display:flex; width:100%; align-items:center; justify-content:flex-start; gap:12px; text-decoration:none; color:var(--ink); background:transparent; border:0; border-radius:4px; padding:10px 12px; min-height:42px; text-align:left; }
.account-menu button:hover,.account-menu a:hover { background:#edf3f5; }
.account-menu svg { width:18px; height:18px; flex:none; }
.account-menu .account-logout { border-top:1px solid var(--line); border-radius:0; margin-top:4px; }
.portal-workspace { min-width:0; }
.portal-workspace .wg-views { display:none; }
.portal-mobile-agenda { display:none; }
.portal-heading { display:flex; justify-content:space-between; align-items:center; gap:16px; padding-bottom:16px; }
.portal-heading h2,.account-security h2 { margin:0; font-size:20px; line-height:1.35; overflow-wrap:anywhere; }
.portal-heading p { color:var(--muted); margin:4px 0 0; font-size:14px; }
.portal-heading-tools { display:flex; gap:12px; align-items:flex-end; min-width:0; }
.portal-heading-tools label { display:grid; gap:4px; margin:0; font-size:13px; }
.portal-heading-tools select { max-width:280px; min-height:40px; }
.portal-workspace svg,.portal-profile svg { width:18px; height:18px; flex:none; }
.portal-heading .icon-button,.portal-toolbar .icon-button { width:40px; height:40px; padding:8px; flex:none; }
.portal-tabs { display:flex; gap:4px; border-bottom:1px solid #aebbc7; flex-wrap:wrap; margin-bottom:18px; }
.portal-tabs button { border:0; border-bottom:3px solid transparent; background:transparent; border-radius:0; padding:10px 14px; min-height:44px; white-space:normal; }
.portal-tabs button[aria-selected="true"] { border-bottom-color:#087f8c; font-weight:650; color:#075c66; background:#edf7f7; }
#portal-panel { min-width:0; outline-offset:3px; }
.portal-toolbar { display:flex; align-items:flex-end; gap:12px; flex-wrap:wrap; margin:0 0 12px; }
.portal-toolbar label { margin:0; font-size:13px; min-width:140px; display:grid; gap:5px; }
.portal-toolbar input,.portal-toolbar select { min-height:40px; }
.portal-period { display:flex; flex-wrap:wrap; align-items:flex-end; gap:8px; }
.portal-segments { display:inline-flex; flex:none; }
.portal-segments button { border-radius:0; min-height:40px; min-width:80px; }
.portal-segments button:first-child { border-radius:4px 0 0 4px; }
.portal-segments button:last-child { border-radius:0 4px 4px 0; margin-left:-1px; }
.portal-segments button[aria-pressed="true"] { background:#e1f0f0; color:#075c66; border-color:#087f8c; z-index:1; }
.portal-result-count { font-size:13px; color:var(--muted); padding:10px 0; margin-left:auto; }
.portal-agenda-count { margin:0 0 12px; font-size:13px; color:var(--muted); }
.portal-feedback { min-height:200px; display:flex; gap:12px; flex-wrap:wrap; justify-content:center; align-content:center; align-items:center; text-align:center; }
.portal-feedback p { flex-basis:100%; margin:0 0 8px; }
.portal-empty { padding:24px 12px; text-align:center; background:#f5f7f8; border-bottom:1px solid var(--line); color:var(--muted); }
.portal-status { display:inline-flex; padding:3px 8px; border-radius:4px; font-size:12px; line-height:1.5; font-weight:600; white-space:nowrap; }
.portal-status-neutral { background:#edf0f3; color:#384555; }
.portal-status-success { background:#e1f2e8; color:#145b37; }
.portal-status-danger { background:#fce7e5; color:#94221b; }
.portal-status-pending { background:#fff3cf; color:#6b4900; }
.portal-details { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px 24px; margin:0 0 20px; }
.portal-details div { min-width:0; }
.portal-details dt { color:var(--muted); font-size:13px; margin-bottom:4px; }
.portal-details dd { margin:0; overflow-wrap:anywhere; white-space:pre-wrap; }
.portal-detail-actions { display:flex; gap:8px; flex-wrap:wrap; padding:20px 0 0; }
.portal-history { border-top:1px solid var(--line); margin-top:20px; padding-top:4px; }
.portal-history h3 { font-size:16px; margin:16px 0 10px; }
.portal-timeline { list-style:none; padding:4px 0 0 16px; margin:12px 0; border-left:2px solid #b7c9ce; }
.portal-timeline li { padding:4px 0 12px; display:flex; flex-wrap:wrap; justify-content:space-between; gap:6px 16px; font-size:14px; }
.portal-timeline time { color:var(--muted); }
.portal-multiline { white-space:pre-wrap; overflow-wrap:anywhere; }
.portal-note { margin:0; padding:12px; border-left:3px solid #087f8c; background:#edf7f7; font-size:14px; line-height:1.6; }
.portal-profile { max-width:740px; padding-top:8px; }
.portal-profile input[readonly] { background:#eef1f4; color:#475362; }
.portal-form-error { color:#a61f17; margin:0; }
.portal-form-status { color:#145b37; margin:0; }
.portal-profile .form-actions { justify-content:flex-start; }
.account-security { max-width:740px; }
.account-security h2 { margin-bottom:24px; }
.portal-calendar { overflow-x:auto; padding:3px; background:var(--surface); }
.portal-calendar .fc { min-width:760px; font-size:13px; }
.portal-calendar .fc-event { background:#146e79; border-color:#146e79; cursor:pointer; }
.portal-calendar .fc-event:focus-visible { outline:3px solid #913f09; outline-offset:2px; }
.portal-calendar .fc-col-header-cell-cushion { color:var(--ink); }
.portal-calendar .fc-timegrid-slot { height:28px; }
.portal-calendar .fc-timegrid-event .fc-event-main { padding:3px; }
.portal-documents { list-style:none; padding:0; margin:12px 0; }
.portal-documents li { display:flex; gap:8px; align-items:center; padding:8px 0; border-bottom:1px solid var(--line); }
.portal-documents a { color:#075c66; overflow-wrap:anywhere; }
.portal-documents small { margin-left:auto; color:var(--muted); flex:none; }
.portal-sr-only { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
@media (max-width:700px) {
  #appView .topbar { display:grid; grid-template-columns:40px minmax(0,1fr); align-items:center; gap:8px 12px; }
  #appView .topbar > div:not(.topbar-actions) { grid-column:2; grid-row:1; min-width:0; }
  #appView .topbar-actions { grid-column:1 / -1; justify-content:flex-end; max-width:100%; min-width:0; }
  .account-trigger { max-width:240px; }
  .portal-heading { flex-wrap:wrap; }
  .portal-heading-tools { max-width:100%; }
  .portal-heading-tools label { min-width:0; }
  .portal-heading-tools select { max-width:100%; }
  .portal-tabs { gap:0; }
  .portal-tabs button { flex:1 1 auto; font-size:14px; padding:10px; }
  .portal-toolbar,.portal-period { gap:8px; }
  .portal-period label { min-width:0; flex:1 1 130px; }
  .portal-period input { width:100%; min-width:0; }
  .portal-details { grid-template-columns:minmax(0,1fr); }
  .portal-detail-actions > button { flex:1 1 180px; }
  .portal-profile { grid-template-columns:minmax(0,1fr); }
  .portal-profile .span-2 { grid-column:auto; }
  .portal-calendar { max-height:65vh; }
  .portal-agenda-grid { display:none; }
  .portal-mobile-agenda { display:block; list-style:none; padding:0; margin:0; }
  .portal-mobile-agenda li { display:flex; gap:12px; align-items:center; justify-content:space-between; border-top:1px solid var(--line); padding:16px 0; }
  .portal-mobile-agenda li > div { display:grid; gap:6px; min-width:0; }
  .portal-mobile-agenda strong,.portal-mobile-agenda span { overflow-wrap:anywhere; }
  .portal-mobile-agenda time,.portal-mobile-agenda div > span:not(.portal-status) { color:var(--muted); font-size:13px; }
  .portal-mobile-agenda .portal-status { justify-self:start; }
  .portal-mobile-agenda .icon-button { width:40px; height:40px; flex:none; }
}
