/* Phone layout only. Keep the same light tokens as desktop — never recolor the
   workspace from white/gray into a dark green shell. Loaded last. */

html{overflow-x:clip;color-scheme:light;background:var(--page)}
body{overflow-x:clip}

/* The header needs its own intrinsic row. A flexible first row collapses it
   when a tall dashboard or form occupies the implicit second row. */
#app:not([hidden])>.shell{grid-template-rows:auto minmax(0,1fr);overflow:visible}
#app:not([hidden])>.shell:has(.assistant-view:not([hidden])){grid-template-rows:minmax(0,1fr)}
#app:not([hidden])>.shell:has(.ops-demo-banner){grid-template-rows:auto auto minmax(0,1fr)}
#app:not([hidden])>.shell:has(.ops-demo-banner):has(.assistant-view:not([hidden])){grid-template-rows:auto minmax(0,1fr)}
#app .assistant-view{height:100%;min-height:0}
#app .topbar{min-width:0;min-height:64px}
#app #main{min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
.search{min-width:0}

.tabbar{display:none}

@media (max-width:820px){
 #app:not([hidden]){height:var(--sf-vh,100dvh);padding:10px 10px calc(66px + env(safe-area-inset-bottom,0px))}
 #app .topbar{padding:10px;gap:8px}
 #app .search{flex:1}
 #app .search input{padding-inline:42px 12px;font-size:16px}
 #app .search__kbd,#app .profile__text{display:none}
 #app .topbar__actions{gap:4px;flex-shrink:0}
 #app .topbar__menu{flex-shrink:0}
 #app #main{scrollbar-gutter:auto}
 .board__actions{width:100%;flex-wrap:wrap}
 .board__actions .btn{min-width:0;font-size:13px;padding-inline:14px}
 .set-nav__tabs{display:flex;flex-wrap:wrap}
 .set-nav__tab{flex:1;min-width:0}
 .set-body{min-width:0}
 input,select,textarea{font-size:16px}
 .app{
  padding-bottom:calc(60px + env(safe-area-inset-bottom,0px));
  height:var(--sf-vh,auto);
  min-height:100dvh;
 }
 #app:not([hidden])>.shell{scrollbar-gutter:auto}
 .board{overflow:auto;-webkit-overflow-scrolling:touch}
 .board__title{font-size:clamp(22px,7vw,32px)}
 .board__head{gap:12px}
 .toast{bottom:calc(68px + env(safe-area-inset-bottom,0px))}
 body:has(#app:not([hidden])) .sf-pwa-dock{bottom:calc(68px + env(safe-area-inset-bottom,0px))}
 body:has(#app:not([hidden])) .sf-pwa-update{bottom:calc(68px + env(safe-area-inset-bottom,0px))}
 body:has(.chat-workspace.chat-show-thread) .sf-pwa-dock,
 body:has(.chat-workspace.chat-show-thread) .sf-pwa-update,
 html.sf-keyboard .sf-pwa-dock,
 html.sf-keyboard .sf-pwa-update{display:none}

 .tabbar{
  position:fixed;bottom:0;inset-inline:0;z-index:45;display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  height:calc(56px + env(safe-area-inset-bottom,0px));
  padding:4px 2px calc(6px + env(safe-area-inset-bottom,0px));
  background:var(--panel);border-top:1px solid var(--hair);
  backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);
 }
 .tabbar__item{
  position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:2px;border:0;border-radius:12px;background:transparent;color:var(--muted);
  font:inherit;font-size:10px;font-weight:600;line-height:1.2;text-decoration:none;cursor:pointer;
  min-width:0;min-height:44px;padding:2px 0;
 }
 .tabbar__item>span:not(.tabbar__ai):not(.tabbar__badge){max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .tabbar__item svg{width:22px;height:22px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
 .tabbar__item.is-active{color:var(--g-700);background:transparent}
 .tabbar__item:focus-visible{outline:2px solid var(--g-600);outline-offset:-2px}
 .tabbar__badge{position:absolute;top:1px;inset-inline-end:calc(50% - 16px);min-width:16px;height:16px;padding:0 4px;border-radius:8px;background:#c14453;color:#fff;font-size:9px;display:grid;place-items:center}
 .tabbar__badge[hidden]{display:none}
 .tabbar__item--ai{color:var(--muted)}
 .tabbar__ai{
  display:grid;place-items:center;width:34px;height:34px;margin:0;border-radius:50%;
  background:var(--g-700);color:#fff;box-shadow:0 4px 10px color-mix(in srgb,var(--g-700) 35%,transparent);
 }
 .tabbar__item--ai svg{width:18px;height:18px;stroke-width:1.6}
 .tabbar__item--ai.is-active{color:var(--g-700)}
 .tabbar__item--ai.is-active .tabbar__ai{box-shadow:0 0 0 3px var(--panel),0 0 0 5px color-mix(in srgb,var(--g-600) 45%,transparent)}
 #app:has(.chat-workspace.chat-show-thread),html.sf-keyboard #app:not([hidden]){padding-bottom:10px}
 .app:has(.chat-workspace.chat-show-thread) .tabbar,
 html.sf-keyboard .tabbar{display:none}

 /* Messenger: list or thread, never both. Colors stay on the shared light theme. */
 .chat-view:not([hidden]){display:flex;flex-direction:column;min-height:0;height:100%}
 .chat-view .board__head{margin-bottom:10px}
 .chat-view:has(.chat-show-thread) .board__head{display:none}
 .chat-workspace{
  display:grid!important;grid-template-columns:minmax(0,1fr);flex:1;
  height:auto!important;min-height:0!important;
  border-radius:18px;overflow:hidden;
 }
 .chat-conversation__preview{max-width:100%}
 .chat-sidebar{display:flex;border:0;padding:14px 10px 10px}
 .chat-thread{display:none}
 .chat-workspace.chat-show-thread .chat-sidebar{display:none!important}
 .chat-workspace.chat-show-thread .chat-thread{display:flex!important;flex-direction:column;min-width:0;min-height:0}
 .chat-mobile-back{display:grid}
 .chat-mobile-back svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
 .chat-thread__body,.chat-empty{height:100%;min-height:0}
 .chat-view .chat-composer{padding:8px 10px calc(10px + env(safe-area-inset-bottom,0px))}
 .chat-file-draft--image{flex-direction:column;align-items:stretch;max-width:180px}
 .chat-file-draft--image img{display:block;max-width:160px;max-height:120px;object-fit:cover;border-radius:10px}

 .shell:has(.assistant-view:not([hidden])) #main{padding:0 0 8px;min-height:0}
 .assistant-view{height:100%;min-height:0}
}

@media (prefers-reduced-motion:reduce){.tabbar,.tabbar__ai{backdrop-filter:none;-webkit-backdrop-filter:none;transition:none}}

/* Desktop messenger: conversation list on the right, selected thread on the left. */
@media (min-width:821px){
 html[dir=rtl] .chat-workspace{
  display:grid!important;grid-template-columns:minmax(0,1fr) 320px;direction:ltr;
 }
 html[dir=rtl] .chat-sidebar{
  order:2;direction:rtl;border-inline-end:0;border-inline-start:1px solid var(--hair);
  display:flex!important;
 }
 html[dir=rtl] .chat-thread{order:1;direction:rtl;display:flex!important;min-width:0;flex-direction:column}
 .chat-mobile-back{display:none}
}

@media (max-width:720px){
 .chat-view .board__title{font-size:22px}
 .chat-sidebar__head{padding-top:8px}
 .chat-message{max-width:92%}
}

@media (max-width:480px){
 .tabbar__item{font-size:9px;gap:1px}
 .tabbar__ai{width:32px;height:32px}
 .chat-view .board__actions .btn{font-size:11px;padding:0 12px;height:44px}
 .chat-workspace{border-radius:14px}
 .chat-file-list img{max-height:210px}
 .grid{grid-template-columns:1fr;grid-template-areas:"s1""s2""s3""s4""an""re""pr""tm""pg""tr"}
 .stat{min-height:0;padding:16px}
 .stat__num{font-size:32px;padding-top:8px}
}
@media (min-width:360px) and (max-width:480px){
 .grid{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-areas:"s1 s2""s3 s4""an an""re re""pr pr""tm tm""pg pg""tr tr"}
 .stat{padding:14px;min-height:140px}
 .stat__title{font-size:12px;line-height:1.7}
 .stat .arrow{width:26px;height:26px}
 .stat__note{font-size:10px;line-height:1.8;overflow-wrap:anywhere}
 .stat__num{margin-bottom:6px}
}
.set-body:has(#pane-company-account:not([hidden])){min-height:0}

/* Mixed Persian/English bubbles keep their own direction. */
.chat-message__bubble>p,.chat-reply span,.chat-conversation__preview,.chat-conversation__top b{unicode-bidi:plaintext}
.chat-file-draft--image img{display:block;max-width:160px;max-height:120px;object-fit:cover;border-radius:10px}
.chat-file-drafts>div.chat-file-draft--image{max-width:180px;align-items:flex-start}
.chat-status.is-error{color:var(--rose,#c23b3b)}
.chat-composer textarea::placeholder{color:var(--muted)}

/* A calm floating navigation with one moving selection, including all five targets. */
.tabbar__indicator{display:none}
@media(max-width:820px){
 #app:not([hidden]){padding-bottom:calc(88px + env(safe-area-inset-bottom,0px))}
 .tabbar{inset-inline:12px;bottom:calc(9px + env(safe-area-inset-bottom,0px));height:64px;padding:5px;border:1px solid #e0e7e5;border-radius:24px;background:#fffffff5;box-shadow:0 8px 30px #20393d14;isolation:isolate;overflow:hidden}
 .tabbar__indicator{display:block;position:absolute;left:0;top:5px;height:54px;background:color-mix(in srgb,var(--g-100) 70%,#fff);border-radius:18px;z-index:-1;transition:transform .34s cubic-bezier(.2,.8,.2,1),width .2s}
 .tabbar__item{font-size:10px;gap:4px;min-height:54px;line-height:1.25;transition:color .2s}
 .tabbar__item svg{width:21px;height:21px;transition:transform .25s}
 .tabbar__item.is-active>svg{transform:translateY(-2px)}
 .tabbar__item.is-active{color:var(--g-800)}
 .tabbar__ai{width:29px;height:29px;box-shadow:none;background:var(--g-700);transition:transform .25s}
 .tabbar__item--ai.is-active .tabbar__ai{transform:translateY(-1px);box-shadow:none}
 .tabbar__item--ai>span:last-child{font-size:9px;line-height:1}
 .tabbar__badge{inset-inline-end:calc(50% - 22px);top:2px}
 .tabbar__item:active svg,.tabbar__item:active .tabbar__ai{transform:scale(.9)}
 body:has(#app:not([hidden])) .sf-pwa-dock{bottom:calc(92px + env(safe-area-inset-bottom,0px))}
 body:has(#app:not([hidden])) .sf-pwa-install{background:#fff;color:var(--g-800);border:1px solid var(--hair);box-shadow:0 4px 18px #20393d12}
 body:has(#app:not([hidden])) .sf-pwa-install svg{color:currentColor}
 .toast{bottom:calc(90px + env(safe-area-inset-bottom,0px))}
 .ops-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));padding:5px;border:1px solid var(--hair);border-radius:16px;background:var(--card);gap:5px}
 .ops-tabs button{min-width:0;min-height:44px;padding:9px 6px;border-radius:12px;white-space:normal}
 .work-task-stages{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin:14px 0 10px}
 .work-task-stages button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-height:64px;padding:8px 3px;border:1px solid var(--hair);border-radius:14px;background:var(--card);color:var(--muted);font-size:10px;line-height:1.6;transition:background .2s,border-color .2s}
 .work-task-stages b{font-size:16px;font-weight:600}
 .work-task-stages button[aria-pressed=true]{background:var(--g-100);border-color:color-mix(in srgb,var(--g-600) 45%,var(--hair));color:var(--g-800)}
 .kanban[data-mobile-stage]{display:block;overflow:visible;padding-bottom:6px}
 .kanban[data-mobile-stage]>.col{display:none;min-width:0;width:100%;border:1px solid var(--hair);background:var(--card);border-radius:18px;padding:14px}
 .kanban[data-mobile-stage=todo]>.col[data-status=todo],.kanban[data-mobile-stage=progress]>.col[data-status=progress],.kanban[data-mobile-stage=review]>.col[data-status=review],.kanban[data-mobile-stage=done]>.col[data-status=done]{display:flex;flex-direction:column}
 .kanban .task{box-shadow:0 2px 8px #20393d06;border:1px solid var(--hair);border-radius:14px;padding:16px;touch-action:pan-y}
 .task__title{font-size:14px;line-height:1.9;overflow-wrap:anywhere}
 .product-task-actions{gap:10px}.product-task-button{min-height:40px;font-size:11px}
 .work-task-tools{border:1px solid var(--hair);background:var(--card);border-radius:16px;margin-block:14px;overflow:hidden}
 .work-task-tools>summary{display:flex;align-items:center;justify-content:space-between;min-height:48px;padding:13px 15px;font-size:12px;cursor:pointer;list-style:none}
 .work-task-tools>summary::-webkit-details-marker{display:none}
 .work-task-tools .product-tools{margin:0;border:0;border-top:1px solid var(--hair);border-radius:0}
 .product-tools-head{flex-wrap:wrap}.product-view-row .product-action{padding:10px;min-height:40px;background:var(--panel);border-radius:10px}
 .product-insights{padding:15px;border-radius:18px}
 .product-insight-metrics button{border:1px solid var(--hair);background:var(--panel);min-height:70px;border-radius:14px;flex-direction:column;align-items:flex-start;gap:5px;padding:12px}
 .product-insight-metrics span{font-size:11px;line-height:1.7}
}
@media(min-width:821px){.work-task-stages{display:none}.work-task-tools>summary{display:none}}
@media(prefers-reduced-motion:reduce){.tabbar__indicator,.tabbar__item svg,.tabbar__ai,.work-task-stages button{transition:none!important}}

.work-report-panel,.work-backup-panel{border:1px solid var(--hair);background:var(--card);border-radius:22px;padding:24px;margin-bottom:20px;min-width:0}
.work-report-controls{display:flex;align-items:flex-end;gap:14px;flex-wrap:wrap}
.work-report-controls label{display:grid;gap:8px;color:var(--muted);font-size:12px;min-width:0;flex:1}
.work-report-controls select{font:inherit;color:var(--ink);border:1px solid var(--hair);border-radius:12px;padding:12px;background:var(--panel);min-width:0;width:100%;height:46px}
.work-report-controls .btn{height:46px;font-size:13px;flex-shrink:0}
.work-week-nav{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;border-block:1px solid var(--hair);padding-block:16px;margin-block:22px}
.work-week-nav>div{display:grid;gap:6px;text-align:center;flex:1;min-width:180px}.work-week-nav b{font-size:13px;font-weight:600}.work-week-nav span{font-size:10px;color:var(--muted)}
.work-week-nav button{padding:10px 12px;border:1px solid var(--hair);border-radius:12px;min-height:44px;font-size:11px;background:var(--panel);color:var(--g-800)}
.work-report-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.work-report-metrics>div{border:1px solid var(--hair);border-radius:16px;padding:18px;display:grid;gap:12px;background:var(--panel)}.work-report-metrics span{font-size:11px;color:var(--muted)}.work-report-metrics b{font-size:30px;font-weight:650;color:var(--g-800)}.work-report-metrics [data-report-metric=overdue] b{color:var(--rose)}
.work-report-note{font-size:12px;line-height:2;color:var(--muted);margin-block:16px}.work-report-error{font-size:12px;line-height:2;color:var(--rose);padding:12px 0}
.work-report-list{display:grid;gap:10px}.work-report-row{display:grid;grid-template-columns:minmax(0,1fr) auto 135px 44px auto;align-items:center;gap:16px;padding:16px;border:1px solid var(--hair);border-radius:15px;min-width:0}.work-report-row h3{font-size:13px;font-weight:600;line-height:1.9;overflow-wrap:anywhere}.work-report-row p{font-size:11px;line-height:1.9;color:var(--muted);margin-top:4px}.work-report-row time,.work-report-progress{font-size:11px;color:var(--muted)}.work-report-row .is-late{color:var(--rose)}
.work-report-state{border-radius:8px;background:var(--panel);font-size:10px;padding:7px 10px;white-space:nowrap}.work-report-state[data-status=done]{background:#e8f4ed;color:#28754a}.work-report-state[data-status=progress]{background:#eaf0fc;color:#3b6099}.work-report-state[data-status=review]{background:#fcf3e4;color:#976319}
.work-report-open{font-size:11px;color:var(--g-800);padding:10px;min-height:44px;border-radius:10px;background:var(--panel)}
.work-report-empty{display:grid;justify-items:center;text-align:center;gap:14px;padding:44px 16px;color:var(--muted)}.work-report-empty svg{width:30px;height:30px;color:var(--g-600)}.work-report-empty h3{font-size:15px;color:var(--ink)}.work-report-empty p{font-size:12px;line-height:2}
.work-backup-panel{display:flex;align-items:center;gap:20px}.work-backup-icon{display:grid;place-items:center;border-radius:16px;background:var(--g-100);color:var(--g-800);width:56px;height:56px;flex:none}.work-backup-icon svg{width:26px;height:26px}.work-backup-copy{flex:1;min-width:0}.work-backup-copy h2{font-size:17px;font-weight:650;margin:0 0 9px}.work-backup-copy p,.work-backup-copy small{font-size:12px;line-height:2;color:var(--muted)}.work-backup-copy small{font-size:10px;display:block;margin-top:8px}.work-backup-actions{display:grid;gap:8px;flex-shrink:0}.work-backup-actions .btn{font-size:12px;height:44px}.work-restore-counts{display:flex;gap:10px;flex-wrap:wrap}.work-restore-counts span{padding:12px;border-radius:12px;background:var(--panel);font-size:13px}
@media(max-width:900px){.work-report-row{grid-template-columns:minmax(0,1fr) auto auto;gap:12px}.work-report-row>div{grid-column:1/3}.work-report-row>time{grid-column:1}.work-report-row>.work-report-open{grid-column:3}.work-backup-panel{flex-wrap:wrap}.work-backup-actions{width:100%;display:flex}.work-backup-actions>.btn{flex:1}}
@media(max-width:600px){.work-report-panel,.work-backup-panel{padding:16px;border-radius:18px}.work-report-controls{gap:10px}.work-report-controls label{flex-basis:calc(50% - 10px);font-size:10px}.work-report-controls select{font-size:13px;padding-inline:9px}.work-report-controls>.btn{width:100%}.work-week-nav{gap:8px;margin-block:17px}.work-week-nav>div{order:-1;width:100%;flex:auto}.work-week-nav button{flex:1;font-size:10px;padding-inline:7px}.work-report-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.work-report-metrics>div{padding:14px;gap:8px}.work-report-metrics b{font-size:26px}.work-report-row{padding:13px;gap:10px}.work-report-row h3{font-size:12px}.work-report-row p{font-size:10px}.work-report-state{font-size:9px;padding:6px}.work-backup-copy h2{font-size:15px}.work-backup-copy p{font-size:11px}.work-backup-icon{width:44px;height:44px}.work-backup-panel{gap:14px}.work-report-shortcut{font-size:12px}}
@media(max-width:820px){
 .board__actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
 .board__actions .btn{font-size:11px;line-height:1.8;padding:9px 10px;min-height:46px;height:auto;white-space:normal;gap:6px;text-align:center}
 .board__actions .btn svg{width:17px;height:17px}
 .board__actions .work-report-shortcut{grid-column:1/-1;font-size:12px;background:var(--card);border-color:var(--hair);color:var(--g-800)}
 [data-view=tasks]:not([hidden]){display:flex;flex-direction:column}
 [data-view=tasks]>.board__head{order:0}
 [data-view=tasks]>.ops-tabs{order:1}
 [data-view=tasks]>.toolbar{order:2}
 [data-view=tasks]>.work-task-stages{order:3}
 [data-view=tasks]>.kanban{order:4}
 [data-view=tasks]>.product-insights{order:5}
 [data-view=tasks]>.work-task-tools{order:6}
 [data-view=tasks]>.toolbar .seg{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;border-radius:16px;direction:rtl;gap:5px;box-shadow:none;border:1px solid var(--hair)}
 [data-view=tasks]>.toolbar .seg__pill{display:none}
 [data-view=tasks]>.toolbar .seg__btn{font-size:11px;padding:0 8px;height:38px;border-radius:10px}
 [data-view=tasks]>.toolbar .seg__btn[aria-pressed=true]{background:var(--g-700);color:#fff}
 .product-insight-metrics{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
 .product-insight-metrics button{padding:10px 5px;align-items:center;text-align:center;min-height:76px;gap:7px}
 .product-insight-metrics strong{font-size:20px}
 .product-insight-metrics span{font-size:9px;line-height:1.8}
}
@media(max-width:600px){.work-report-controls select{font-size:16px}}

/* Messenger occupies its own app surface, without the dashboard toolbar. */
#app:not([hidden])>.shell:has(.chat-view:not([hidden])){grid-template-rows:minmax(0,1fr)}
.shell:has(.chat-view:not([hidden]))>.topbar{display:none!important}
#app .shell:has(.chat-view:not([hidden])) #main{padding:0;overflow:hidden;border-radius:22px}
.chat-view:not([hidden]){height:100%;min-height:0}
.chat-view .chat-workspace{border:0;border-radius:0;box-shadow:none;padding:0;flex:1;min-height:0!important;height:auto!important}
.chat-view .chat-sidebar{background:#fff;padding:0;border-color:#e5ebef}
.chat-view .chat-sidebar__head{display:flex;gap:6px;align-items:center;padding:14px 12px 10px;min-height:66px;border-bottom:0}
.chat-view .chat-sidebar__head h2{font-size:18px;font-weight:700;color:#243746;flex:1;margin:0}
.chat-view .chat-sidebar__head .icon-btn{width:36px;height:36px;min-width:36px;color:#7792a5;background:transparent;border:0;border-radius:50%}
.chat-view .chat-sidebar__head .icon-btn:hover{background:#edf5fb;color:#2789c5}
.chat-view .chat-sidebar__head [data-chat-count]{display:none}
.chat-view .chat-search{margin:4px 14px 12px;border:0;border-radius:24px;background:#f1f3f5;padding:0 13px}
.chat-view .chat-search input{height:42px;background:transparent;font-size:14px;border:0}
.chat-view .chat-lenses{margin:0;padding:0 14px;border-bottom:1px solid #e9eef2;order:3;gap:14px}
.chat-view .chat-lenses button{background:transparent!important;border-radius:0;border:0;border-bottom:3px solid transparent;padding:11px 6px;color:#8193a2;font-size:12px}
.chat-view .chat-lenses button[aria-pressed=true]{color:#248ac7;border-bottom-color:#248ac7}
.chat-view .chat-search{order:2}.chat-view .chat-conversations{order:4;padding:6px 0;flex:1;overflow:auto}.chat-view .chat-sidebar__foot{order:5;font-size:10px;border-top:1px solid #edf1f4;margin:0;padding:12px 16px;text-align:center;color:#91a0ac}
.chat-view .chat-conversation{border-radius:0;padding:13px 16px;gap:12px;min-height:80px;border:0;border-bottom:1px solid #f1f4f7;background:#fff}
.chat-view .chat-conversation:hover{background:#f4f8fb}.chat-view .chat-conversation.is-active{background:#e7f3fc;box-shadow:none}
.chat-view .chat-avatar{width:50px;height:50px;border-radius:50%;font-size:17px}
.chat-view .chat-conversation__top b{font-size:14px;color:#243746}.chat-view .chat-conversation__top time{font-size:10px;color:#91a0ad}.chat-view .chat-conversation__preview{font-size:12px;color:#8899a6;line-height:1.9;margin-top:5px}.chat-view .chat-unread{background:#48a0d4;color:#fff;border-radius:14px;min-width:22px;height:22px;font-size:11px}
.chat-view .chat-thread{background:#dce7e4}
.chat-view .chat-thread__head{background:#fff;border-bottom:1px solid #e5ecef;padding:10px 18px;gap:12px;min-height:68px}
.chat-view .chat-thread__head .chat-avatar{width:42px;height:42px;font-size:15px}
.chat-view .chat-thread__identity h2{font-size:15px;color:#243746}.chat-view .chat-thread__identity p{font-size:11px;color:#91a0ad}
.chat-view .chat-message-scroll{background-color:#dce7e4;background-image:radial-gradient(#b6c9c233 .8px,transparent .8px);background-size:15px 15px;padding:24px}
.chat-view .chat-messages{gap:7px}
.chat-view .chat-message{max-width:min(80%,620px)}
.chat-view .chat-message__bubble{background:#fff;border-radius:16px 16px 16px 4px;box-shadow:0 1px 2px #223e4012;padding:9px 12px 5px}
.chat-view .chat-message--own .chat-message__bubble{background:#e3ffc9;color:#243a2c;border-radius:16px 16px 4px 16px}
.chat-view .chat-message__bubble>p{font-size:14px;line-height:1.85}
.chat-view .chat-message--own .chat-message__meta{color:#75a765}.chat-view .chat-message__meta{color:#8d9da8;font-size:10px}
.chat-view .chat-message--own .chat-reply{background:#d2efb9;border-color:#72ae54}.chat-view .chat-message--own .chat-reply span,.chat-view .chat-message--own .chat-file-list a,.chat-view .chat-message--own .chat-file-list small{color:#4d7950}
.chat-view .chat-message--own .chat-reactions button{background:#ccebb5;color:#4c7f38}.chat-view .chat-message--own .chat-reactions button[aria-pressed=true]{background:#bade9e;box-shadow:none}
.chat-view .chat-day{background:#a0b4a885;color:#fff;border-radius:12px;font-size:10px;align-self:center;padding:4px 13px}
.chat-view .chat-composer{background:#dce7e4;padding:9px 14px 12px}
.chat-view .chat-compose-box{border-radius:23px;background:#fff;padding:6px 7px}
.chat-view .chat-tool{color:#91a0ac;width:36px;height:40px}.chat-view .chat-send-icon{background:#3394ce;color:#fff;width:42px;height:42px}.chat-view .chat-send-icon:hover{background:#2585bf}
.chat-view .chat-compose-line textarea{font-size:16px;line-height:1.7;min-height:40px;padding-block:7px}
.chat-view .chat-status:empty{display:none}.chat-view .chat-status:not(:empty){background:#fff;padding:7px 12px;margin:0;font-size:11px}
.chat-view .chat-empty{background:#dce7e4}.chat-view .chat-empty h2{font-size:20px;color:#52736c}.chat-view .chat-start-actions .btn{font-size:12px;background:#fff;color:#2789c5;border:1px solid #c4d8d1}
.chat-view .chat-message--own .chat-audio-player{--voice-idle:#b1d49a;--voice-played:#69a34b;--voice-button:#78b858;--voice-button-ink:#fff;--voice-text:#67924f}
@media(max-width:820px){
 #app .shell:has(.chat-view:not([hidden])) #main{border-radius:18px}
 .chat-view .chat-message-scroll{padding:14px 10px}
 .chat-view .chat-message{max-width:88%}
 .chat-view .chat-composer{padding:8px 8px calc(8px + env(safe-area-inset-bottom,0px))}
 .chat-view .chat-sidebar__head{padding-top:14px}
 body:has(.chat-view:not([hidden])) .sf-pwa-dock{display:none}
 /* AI uses the same unfilled icon treatment as the other mobile destinations. */
 .tabbar__ai,.tabbar__item--ai.is-active .tabbar__ai{background:transparent!important;color:inherit;box-shadow:none!important;width:23px;height:23px;border-radius:0;transform:none}
 .tabbar__item--ai svg{width:22px;height:22px}
 .tabbar__item--ai>span:last-child{font-size:10px;line-height:1.25}
}
@media(max-width:820px){.tabbar:has(.tabbar__item--ai.is-active) .tabbar__indicator{background:transparent}}
.chat-view .chat-status:not(.is-error){position:absolute;width:1px;height:1px;min-height:0;padding:0;margin:0;overflow:hidden;clip-path:inset(50%)}

/* Shared light-blue brand, with readable selected labels. */
:root,:root[data-accent]{--g-950:#123650;--g-800:#18547e;--g-700:#247bb3;--g-600:#3496d2;--g-400:#8ac8ed;--g-100:#e5f3fd;--deep:#143951;--swirl:#8ac8ed38}
button,input[type=checkbox],input[type=radio]{accent-color:var(--g-600)}
.seg__pill{background:#deeffb!important}
.seg__btn[aria-pressed=true],.sf-dept-filters [aria-pressed=true],.ops-tabs button[aria-pressed=true]{color:#175782!important;background:#deeffb!important;border-color:#a8d4ef!important}
.sidebar .nav__link[aria-current=page],.sidebar .nav__link[aria-current=page] .sf-nav-label{color:#175782!important}
.sidebar .nav__link[aria-current=page]{background:#e5f3fd}
.sf-team-views{display:flex;align-items:center;gap:4px;border:1px solid #c6dfef;background:#f7fbfe;padding:4px;border-radius:12px}
.sf-team-views button{font:inherit;font-size:12px;border:0;border-radius:8px;background:transparent;padding:8px 14px;color:#526b7c;cursor:pointer}
.sf-team-views button[aria-pressed=true]{background:#deeffb;color:#175782;box-shadow:0 1px 3px #18547e12}
[data-view=team][data-team-layout=rows] [data-people]{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
[data-view=team][data-team-layout=rows] .member{display:grid;grid-template-columns:52px minmax(125px,1fr) minmax(80px,.7fr) minmax(120px,.8fr) auto;gap:5px 18px;align-items:center;padding:18px 20px;min-height:94px}
[data-team-layout=rows] .member .member__av{grid-column:1;grid-row:1/3;margin:0}
[data-team-layout=rows] .member .member__name{grid-column:2;grid-row:1;margin:0;text-align:start;font-size:15px}
[data-team-layout=rows] .member .member__role{grid-column:2;grid-row:2;margin:0;text-align:start}
[data-team-layout=rows] .member .member__dept{grid-column:3;grid-row:1/3;margin:0;justify-self:start}
[data-team-layout=rows] .member .member__stats{grid-column:4;grid-row:1/3;margin:0;padding:0;border:0;display:flex;gap:16px}
[data-team-layout=rows] .member .member__load{display:none}
[data-team-layout=rows] .member .member__actions{grid-column:5;grid-row:1/3;margin:0;display:flex;gap:6px}
.sf-table-scroll{max-width:100%;overflow:auto;margin-top:16px;border:1px solid #dce7ee;border-radius:14px;background:#fff}
.sf-work-table{width:100%;border-collapse:collapse;text-align:start;font-size:12px;line-height:1.8;min-width:620px}
.sf-work-table th,.sf-work-table td{padding:13px 15px;border-bottom:1px solid #e8eef2;text-align:start;vertical-align:middle}
.sf-work-table thead th{font-size:11px;white-space:nowrap;background:#f0f7fc;color:#476879;font-weight:600}
.sf-work-table tbody th{font-weight:550;min-width:170px;max-width:320px;overflow-wrap:anywhere}
.sf-work-table tbody tr:last-child>*{border-bottom:0}.sf-work-table tbody tr:hover{background:#f8fcff}
.sf-work-table time,.sf-work-table .sf-state{white-space:nowrap}.sf-work-table .sf-text-button{color:#216e9f;white-space:normal;text-align:start}
.sf-work-table .sf-table-empty{text-align:center;color:var(--muted);padding:24px}
.sf-member-work-table{min-width:520px}.sf-member-work-table ul{list-style:none;padding:0;margin:0;display:grid;gap:8px}
.sf-member-work-table li{display:flex;align-items:baseline;justify-content:space-between;gap:20px;padding:0;border:0}
.sf-member-work-table li>span{font-size:10px;color:var(--muted);white-space:nowrap}
.work-reports-section{border-top:1px solid #dce7ee;margin-top:28px;padding-top:24px;min-width:0}
.work-reports-section .sf-section-heading h2{font-size:20px}.work-reports-section .sf-section-heading p{font-size:12px;color:var(--muted)}
.chat-view .chat-avatar,#dlg-chat-profile .chat-avatar,#dlg-chat-directory .chat-avatar,#dlg-chat-new .chat-avatar{border-radius:50%!important;aspect-ratio:1;flex-shrink:0;padding:0;overflow:hidden;display:grid;place-items:center}
.chat-view .chat-message__avatar{width:32px;height:32px;min-width:32px;min-height:32px;font-size:11px}
.chat-directory-trigger{border-radius:50%!important;background:#e7f3fc!important;color:#2786bf!important;flex:none}
.chat-sidebar__head{flex-wrap:wrap;gap:6px}.chat-sidebar__head h2{flex:1;min-width:65px}
.chat-view .chat-message--own .chat-message__bubble{background:#3394d6;color:#fff;--voice-idle:#9ccef1;--voice-played:#fff}
.chat-view .chat-message--own .chat-message__author{color:#f4faff}.chat-view .chat-message--own .chat-message__meta{color:#dfedfa}
.chat-view .chat-message--own .chat-message__sent{color:#e3f3ff}.chat-view .chat-message--own .chat-reply{border-color:#b9def7;background:#ffffff14;color:#fff}
.chat-view .chat-message--own .chat-audio-player{--voice-idle:#9ccef1;--voice-played:#fff;--voice-button:#fff;--voice-button-ink:#247bb3;--voice-text:#dfedfa}
.chat-view .chat-compose-box:focus-within{border-color:#89bee1}.chat-view .chat-composer textarea:focus{outline-color:#62ade0}
.chat-view .chat-conversation.is-active{background:#deeffb;color:#175782}
.chat-view .chat-thread,.chat-view .chat-empty,.chat-view .chat-composer{background-color:#edf4f9}
.chat-voice--ready{background:#edf6fd!important;border:1px solid #d4e9f8!important;border-radius:18px!important;min-height:66px;padding:8px 10px!important;gap:10px!important}
.chat-voice__preview .chat-audio-player{--voice-idle:#b5d7ed;--voice-played:#2786bf;--voice-button:#3394d6;--voice-button-ink:#fff;--voice-text:#4e7f9c;min-height:48px}
.chat-audio-player .chat-audio-play{display:grid!important;grid-template-columns:1fr;grid-template-rows:1fr;place-items:center;align-self:center;line-height:1;padding:0!important}
.chat-audio-player .chat-audio-play svg{grid-area:1/1!important;align-self:center;justify-self:center;margin:0!important;width:22px!important;height:22px!important;fill:currentColor!important;stroke:none!important}
.chat-audio-player .chat-audio-icon-play{transform:translateX(1px)}
.chat-audio-player .chat-audio-play .chat-audio-icon-pause{display:none!important}
.chat-audio-player.is-playing .chat-audio-play .chat-audio-icon-play{display:none!important}
.chat-audio-player.is-playing .chat-audio-play .chat-audio-icon-pause{display:block!important}
.chat-voice:not(.chat-voice--ready){background:#edf6fd;border-color:#c5e1f3;color:#326783}.chat-voice__remove{color:#527c99;box-shadow:inset 0 0 0 1px #d4e9f8}
#dlg-chat-directory{width:min(620px,calc(100vw - 28px));max-height:90dvh;overflow:auto;border-radius:22px}
.chat-directory-note{font-size:12px;line-height:1.9;color:var(--muted)}.chat-directory-list{display:grid;gap:6px;max-height:40dvh;overflow:auto;margin:16px 0}
.chat-directory-row{display:flex;align-items:center;gap:10px;padding:10px;border:1px solid #dce7ee;border-radius:12px;background:#fff}
.chat-directory-row[hidden]{display:none}.chat-directory-row:has(input:checked){background:#edf7fe;border-color:#8fc4e6}
.chat-directory-row input{width:17px;min-height:17px;margin:0;flex:none}.chat-directory-row .chat-avatar{width:40px;height:40px;min-width:40px;font-size:14px}
.chat-directory-name{border:0;background:transparent;flex:1;min-width:0;text-align:start;padding:0;cursor:pointer;font:inherit;color:var(--ink)}.chat-directory-name b,.chat-directory-name small{display:block;overflow-wrap:anywhere}.chat-directory-name b{font-size:13px}.chat-directory-name small{font-size:10px;color:var(--muted);margin-top:4px}
.chat-directory-row .btn{padding:7px 12px;min-height:34px;font-size:11px}.chat-directory-group>span{font-size:12px;color:#247bb3}.chat-profile-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:center}
#dlg-chat-new .chat-peer:has(input:checked){border-color:#8fc4e6;background:#edf7fe}#dlg-chat-new .chat-peer input{accent-color:#3496d2}
@media(max-width:680px){
 [data-view=team][data-team-layout=rows] .member{grid-template-columns:44px minmax(0,1fr) auto;gap:5px 12px;padding:14px}
 [data-team-layout=rows] .member .member__av{grid-row:1/3}.member__av .avatar{max-width:100%}
 [data-team-layout=rows] .member .member__dept{grid-column:2;grid-row:3;font-size:10px}
 [data-team-layout=rows] .member .member__stats{grid-column:2;grid-row:4;gap:12px;font-size:10px}
 [data-team-layout=rows] .member .member__actions{grid-column:3;grid-row:1/5;flex-direction:column}
 [data-team-layout=rows] .member .member__actions .btn{padding:6px 10px;font-size:11px}
 .sf-team-views button{padding:7px 12px}.sf-member-work-table li{flex-direction:column;gap:2px}
 .chat-sidebar__head{padding-inline:9px}.chat-sidebar__head .icon-btn{width:32px;height:32px;min-width:32px}
 .chat-voice--ready{padding:7px 8px!important}.chat-directory-row{gap:8px;padding:9px 7px}
}
/* A legacy flex-basis must not squeeze circular avatars into ovals. */
.chat-view .chat-conversation .chat-avatar{width:50px;height:50px;min-width:50px;flex:0 0 50px}
.chat-view .chat-message__avatar{flex:0 0 32px}
.chat-view .chat-message-scroll{background-color:#edf4f9;background-image:radial-gradient(#94b8cf22 1px,transparent 1px);background-size:18px 18px}
[data-team-layout=rows] .member .member__av{width:48px;height:48px;min-width:48px;justify-self:start}
[data-team-layout=rows] .member .member__av .avatar{width:48px;height:48px;font-size:16px}
[data-team-layout=rows] .member .member__av .status{width:10px;height:10px;right:0;bottom:0}

/* Compact controls leave the work itself in view. Native disclosures support keyboard use. */
details.product-tools{padding:0;overflow:hidden}
.product-tools-summary{display:flex;align-items:center;gap:14px;padding:15px 20px;cursor:pointer;list-style:none;min-height:56px;font-size:14px;font-weight:600;color:var(--ink)}
.product-tools-summary::-webkit-details-marker{display:none}
.product-tools-summary small{font-size:11px;font-weight:400;color:var(--muted)}
.product-tools-chevron{margin-inline-start:auto;font-size:20px;line-height:1;transition:transform .2s}
.product-tools[open] .product-tools-chevron{transform:rotate(180deg)}
.product-tools[open] .product-tools-summary{border-bottom:1px solid #e0eaf1;background:#f7fbfe}
.product-tools-content{padding:20px}
.product-tools-content .product-tools-head{margin-bottom:16px}
.product-tools-summary:focus-visible,.sf-category-more summary:focus-visible{outline:3px solid #79b9e2;outline-offset:-3px;border-radius:10px}
[data-sf-work-team]{margin-block-start:36px;padding:26px}
[data-sf-work-team]>h2{margin:0 0 18px;font-size:19px}
.sf-table-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.sf-work-table .sf-table-actions{margin-top:8px}
.sf-work-table .sf-table-actions .btn{font-size:11px;min-height:34px;height:auto;padding:7px 12px;white-space:nowrap}
.sf-review-section{margin-block:28px 36px}
.sf-category-directory{margin-block:22px 32px}
.sf-category-directory .sf-table-scroll{margin-top:0}
.sf-category-table{min-width:660px}
.sf-category-table tbody th{width:32%;min-width:180px;max-width:360px;vertical-align:top}
.sf-category-table tbody td{vertical-align:top}
.sf-category-description{font-size:12px;font-weight:400;line-height:1.9;color:var(--muted);margin:7px 0 0;overflow-wrap:anywhere}
.sf-category-jobs{list-style:none;display:flex;flex-wrap:wrap;gap:6px;margin:0;padding:0}
.sf-category-jobs li{padding:5px 9px;border:1px solid #e0eaf2;border-radius:7px;background:#f7fbfe;font-size:11px;line-height:1.7;overflow-wrap:anywhere}
.sf-category-more{margin-top:9px}
.sf-category-more summary{cursor:pointer;color:#247cb3;font-size:11px;padding:4px 0;width:fit-content}
.sf-category-more[open] .sf-category-jobs{margin-top:8px}
/* Shared form sizing applies to both existing and dynamically created dialogs. */
body dialog.dlg{width:min(900px,calc(100vw - 48px));max-width:calc(100vw - 48px);max-height:90dvh;overflow:auto;border-radius:22px;scrollbar-gutter:stable}
body dialog.dlg .dlg__form{padding:32px;gap:20px;max-height:none;overflow:visible}
body dialog.dlg .dlg__title{font-size:24px;line-height:1.6;margin:0 0 4px}
body dialog.dlg .field{min-width:0;gap:9px}
body dialog.dlg :is(input:not([type=checkbox]):not([type=radio]),select,textarea){font-size:14px;line-height:1.8;padding:12px 14px;min-height:46px;max-width:100%;box-sizing:border-box}
body dialog.dlg textarea{min-height:140px;resize:vertical}
body dialog.dlg .dlg__cols{gap:20px;grid-template-columns:repeat(2,minmax(0,1fr))}
body dialog.dlg .dlg__row{position:sticky;bottom:-32px;background:var(--card,#fff);padding:18px 0 6px;border-top:1px solid #e1eaf0;margin-top:8px;z-index:2;flex-wrap:wrap}
body dialog.dlg--sm{width:min(600px,calc(100vw - 48px))}
#dlg-chat-new,#dlg-chat-profile{width:min(900px,calc(100vw - 48px));max-width:calc(100vw - 48px)}
@media(max-width:680px){
 .product-tools-summary{padding:13px 15px;gap:8px;font-size:12px}.product-tools-summary small{display:none}.product-tools-content{padding:16px}
 [data-sf-work-team]{margin-block-start:28px;padding:18px}
 body dialog.dlg,body dialog.dlg--sm,#dlg-chat-new,#dlg-chat-profile{width:calc(100vw - 24px);max-width:calc(100vw - 24px);max-height:94dvh;border-radius:16px}
 body dialog.dlg .dlg__form{padding:20px;gap:17px}body dialog.dlg .dlg__title{font-size:21px}body dialog.dlg .dlg__cols{grid-template-columns:1fr;gap:17px}
 body dialog.dlg .dlg__row{bottom:-20px}body dialog.dlg .dlg__row .btn{flex:1;min-width:110px}
}
@media(prefers-reduced-motion:reduce){.product-tools-chevron{transition:none}}
[data-view=decisions] [data-ops-inbox] .ops-empty{padding:18px 22px;text-align:start;display:flex;align-items:center;gap:16px;flex-wrap:wrap}
[data-view=decisions] [data-ops-inbox] .ops-empty h3{margin:0;font-size:14px}
[data-view=decisions] [data-ops-inbox] .ops-empty p{margin:0;font-size:12px}
