
/* Enzalada Collaboration Layer — preview shell */
.collab-tools{display:flex;align-items:center;gap:6px;margin-left:auto;flex:0 0 auto}
.collab-btn{position:relative;width:34px;height:34px;border:1px solid #e7e9ee;background:rgba(255,255,255,.9);border-radius:11px;display:inline-flex;align-items:center;justify-content:center;padding:0;color:#20242b;font:700 12px/1 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;cursor:pointer;transition:.16s ease;box-shadow:0 1px 2px rgba(15,23,42,.035)}
.collab-btn:hover{background:#fff;border-color:#d9dde5;transform:translateY(-1px)}
.collab-btn:focus-visible{outline:2px solid #111827;outline-offset:2px}
.collab-icon{font-size:14px;line-height:1}
.collab-badge{position:absolute;top:-5px;right:-5px;min-width:18px;height:18px;padding:0 5px;border-radius:99px;background:#111827;color:#fff;display:none;align-items:center;justify-content:center;font-size:10px;font-weight:800;border:2px solid #fff}
.collab-badge.is-visible{display:flex}
.collab-presence-stack{display:flex;align-items:center}
.collab-avatar{width:28px;height:28px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-size:10px;font-weight:800;color:#27303f;background:#f2f4f7;border:2px solid #fff;box-shadow:0 0 0 1px #dfe3e9;margin-left:-6px;position:relative}
.collab-avatar:first-child{margin-left:0}
.collab-avatar::after{content:"";position:absolute;right:-1px;bottom:-1px;width:8px;height:8px;background:#26a269;border:2px solid #fff;border-radius:50%}
.collab-avatar.more::after{display:none}
.collab-popover{position:absolute;right:18px;top:58px;width:320px;background:rgba(255,255,255,.98);border:1px solid #e4e7ec;border-radius:18px;box-shadow:0 18px 48px rgba(15,23,42,.14);z-index:2000;overflow:hidden}
.collab-popover[hidden]{display:none}
.collab-popover-head{padding:15px 16px 12px;border-bottom:1px solid #eef0f3;display:flex;align-items:center;justify-content:space-between}
.collab-popover-head strong{font-size:13px}
.collab-popover-head small{color:#7a8392}
.collab-user-list{padding:8px}
.collab-user-row{display:flex;align-items:center;gap:10px;padding:10px;border-radius:12px}
.collab-user-row:hover{background:#f7f8fa}
.collab-user-row .collab-avatar{margin:0;width:32px;height:32px}
.collab-user-copy{min-width:0;flex:1}
.collab-user-copy strong{display:block;font-size:12px;color:#20242b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.collab-user-copy small{display:block;margin-top:3px;color:#7a8392;font-size:11px}
.collab-user-action{border:0;background:#f2f4f7;border-radius:9px;height:30px;padding:0 10px;font-size:11px;font-weight:700;cursor:pointer}
.collab-empty{padding:20px;text-align:center;color:#8b94a3;font-size:12px}
.chat-launcher-panel{position:fixed;right:22px;bottom:22px;width:min(365px,calc(100vw - 28px));background:rgba(255,255,255,.985);border:1px solid #e1e5eb;border-radius:20px;box-shadow:0 24px 70px rgba(15,23,42,.18);z-index:2200;overflow:hidden;transform-origin:bottom right}
.chat-launcher-panel[hidden]{display:none}
.chat-launcher-panel.is-minimized{width:238px}
.chat-launcher-panel.is-minimized .chat-body,.chat-launcher-panel.is-minimized .chat-composer{display:none}
.chat-head{height:58px;padding:0 14px;display:flex;align-items:center;gap:10px;border-bottom:1px solid #edf0f3;background:linear-gradient(180deg,#fff,#fbfcfd)}
.chat-head .collab-avatar{margin:0;width:32px;height:32px}
.chat-head-copy{min-width:0;flex:1}
.chat-head-copy strong{display:block;font-size:13px}
.chat-head-copy small{display:block;color:#7b8491;font-size:10px;margin-top:2px}
.chat-head-actions{display:flex;gap:4px}
.chat-head-actions button{border:0;background:transparent;width:30px;height:30px;border-radius:9px;cursor:pointer;color:#667085}
.chat-head-actions button:hover{background:#f2f4f7;color:#111827}
.chat-body{height:330px;padding:16px;overflow:auto;background:#fbfbfc}
.chat-placeholder{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:#8a93a1;gap:7px}
.chat-placeholder b{font-size:13px;color:#3a424d}
.chat-placeholder span{font-size:11px;max-width:240px;line-height:1.5}
.chat-composer{padding:10px;border-top:1px solid #e8ebef;background:#fff;display:flex;gap:8px}
.chat-composer textarea{resize:none;flex:1;min-height:38px;max-height:90px;border:1px solid #dfe3e8;border-radius:12px;padding:10px 11px;font:13px/1.35 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;outline:none}
.chat-composer textarea:focus{border-color:#aab2bd;box-shadow:0 0 0 3px rgba(17,24,39,.05)}
.chat-composer button{width:38px;height:38px;border:0;border-radius:12px;background:#111827;color:#fff;font-size:15px;cursor:pointer}
.home-collab-grid{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:14px;margin-top:14px}
.home-collab-card{background:#fff;border:1px solid #e6e9ee;border-radius:18px;padding:16px;min-width:0}
.home-collab-title{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
.home-collab-title strong{font-size:13px}
.home-collab-title small{color:#89919d;font-size:10px}
.home-action-item,.home-feed-item{display:flex;gap:10px;padding:11px 0;border-top:1px solid #f0f2f4}
.home-action-item:first-child,.home-feed-item:first-child{border-top:0}
.home-action-dot{width:8px;height:8px;border-radius:50%;margin-top:5px;background:#d97706;flex:0 0 auto}
.home-feed-avatar{width:30px;height:30px;border-radius:10px;background:#f2f4f7;display:flex;align-items:center;justify-content:center;font-size:10px;font-weight:800;color:#44505f;flex:0 0 auto}
.home-collab-copy{min-width:0;flex:1}
.home-collab-copy strong{display:block;font-size:12px;color:#252b34}
.home-collab-copy span{display:block;font-size:11px;color:#697386;margin-top:3px;line-height:1.4}
.home-collab-copy small{display:block;font-size:10px;color:#9aa2ad;margin-top:4px}
.live-cursor-tag{position:absolute;z-index:1200;pointer-events:none;display:flex;align-items:center;gap:5px;padding:3px 6px;border-radius:7px 7px 7px 2px;background:#20242b;color:#fff;font-size:9px;font-weight:800;box-shadow:0 4px 10px rgba(15,23,42,.16)}
.collab-cell-active{outline:2px solid #20242b!important;outline-offset:-2px;position:relative}
@media(max-width:900px){.collab-btn .collab-label{display:none}.home-collab-grid{grid-template-columns:1fr}.collab-popover{right:10px;width:min(320px,calc(100vw - 20px))}}
@media(max-width:640px){.collab-presence-stack{display:none}.chat-launcher-panel{right:10px;bottom:10px;width:calc(100vw - 20px)}}

.collab-presence-button{height:34px;min-width:34px;padding:0 5px;border:0;background:transparent;border-radius:11px;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:.16s ease}
.collab-presence-button:hover{background:#f4f6f8}
.collab-presence-button:focus-visible{outline:2px solid #111827;outline-offset:2px}
.collab-icon-only{flex:0 0 34px}
.global-bar .presence-preview:empty{display:none}


/* Shared Team Tasks — Home rail */
.home-page{
  max-width:1760px!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 360px;
  column-gap:18px;
  align-items:start;
  margin:0 auto;
}
.home-page>.home-hero,
.home-page>.home-grid,
.home-page>.system-card{grid-column:1}
.home-page>.home-hero{grid-row:1}
.home-page>.home-top-grid{grid-row:2}
.home-page>.home-middle-grid{grid-row:3}
.home-page>.system-card{grid-row:4}
.team-task-rail{
  grid-column:2;
  grid-row:1 / span 4;
  position:sticky;
  top:94px;
  min-width:0;
  max-height:calc(100vh - 116px);
  display:flex;
  flex-direction:column;
  background:rgba(255,255,255,.94);
  border:1px solid #e5e8ed;
  border-radius:18px;
  box-shadow:0 12px 36px rgba(30,41,59,.055);
  overflow:hidden;
}
.team-task-head{
  padding:16px 16px 12px;
  border-bottom:1px solid #edf0f3;
}
.team-task-head-top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.team-task-title-wrap{min-width:0}
.team-task-title-wrap h2{margin:0;font-size:15px;letter-spacing:-.02em;color:#171a1f}
.team-task-title-wrap p{margin:4px 0 0;font-size:10px;color:#8a93a1}
.team-task-add{
  width:32px;height:32px;border:0;border-radius:10px;background:#171a1f;color:#fff;
  display:grid;place-items:center;font-size:19px;font-weight:400;cursor:pointer;flex:0 0 auto;
  transition:.16s ease
}
.team-task-add:hover{transform:translateY(-1px);background:#000}
.team-task-toolbar{display:flex;align-items:center;gap:7px;margin-top:13px}
.team-task-tabs{display:inline-flex;padding:3px;background:#f3f4f6;border-radius:10px}
.team-task-tab{height:28px;padding:0 10px;border:0;border-radius:8px;background:transparent;color:#7a8390;font-size:10px;font-weight:700;cursor:pointer}
.team-task-tab.active{background:#fff;color:#20242b;box-shadow:0 1px 4px rgba(15,23,42,.08)}
.team-task-count{margin-left:auto;min-width:24px;height:24px;border-radius:999px;background:#f2f3f5;color:#5d6673;display:grid;place-items:center;padding:0 7px;font-size:9px;font-weight:800}
.team-task-done-toggle{display:flex;align-items:center;gap:6px;font-size:9px;color:#7e8794;cursor:pointer;white-space:nowrap}
.team-task-done-toggle input{accent-color:#20242b}
.team-task-list{padding:7px 9px 10px;overflow:auto;min-height:180px}
.team-task-card{display:grid;grid-template-columns:minmax(0,1fr) 30px;gap:7px;align-items:center;border-bottom:1px solid #f0f1f3}
.team-task-card:last-child{border-bottom:0}
.team-task-main{position:relative;display:grid;grid-template-columns:8px minmax(0,1fr);gap:10px;align-items:start;width:100%;padding:13px 5px;border:0;background:transparent;text-align:left;cursor:pointer;color:inherit}
.team-task-main:hover .team-task-copy strong{color:#000}
.team-task-priority{width:7px;height:7px;border-radius:50%;margin-top:5px;background:#c8cdd5}
.team-task-priority.important{background:#d79b32}
.team-task-priority.urgent{background:#d65353}
.team-task-copy{min-width:0}
.team-task-copy strong{display:block;font-size:11px;line-height:1.35;color:#2b3139;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.team-task-meta{display:flex!important;align-items:center;gap:5px;margin-top:6px!important;font-size:9px!important;color:#7f8895!important;white-space:nowrap;overflow:hidden}
.team-task-meta b{display:inline-grid;place-items:center;width:20px;height:20px;border-radius:7px;background:#f1f3f5;color:#525d6b;font-size:7px;flex:0 0 auto}
.team-task-meta i{font-style:normal;color:#c0c5cc}
.team-task-meta em{font-style:normal;color:#8a93a1;overflow:hidden;text-overflow:ellipsis}
.team-task-meta em.overdue{color:#c64c4c;font-weight:700}
.team-task-copy small{display:block;margin-top:5px;font-size:8px;color:#a0a6af;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.team-task-check{width:25px;height:25px;border-radius:9px;border:1px solid #dfe3e8;background:#fff;color:#fff;cursor:pointer;font-size:11px;font-weight:800}
.team-task-check:hover{border-color:#aeb6c0}
.team-task-check.is-done{background:#20242b;border-color:#20242b}
.team-task-card.is-done{opacity:.58}
.team-task-card.is-done .team-task-copy strong{text-decoration:line-through}
.task-rail-empty{padding:34px 16px;text-align:center;color:#929aa5}
.task-rail-empty b{display:block;color:#555f6c;font-size:11px}
.task-rail-empty span{display:block;margin-top:5px;font-size:9px;line-height:1.5}

/* Task editor */
.team-task-dialog{border:0;padding:0;background:transparent;max-width:none}
.team-task-dialog::backdrop{background:rgba(15,23,42,.24);backdrop-filter:blur(4px)}
.team-task-editor{width:min(620px,calc(100vw - 30px));max-height:calc(100vh - 38px);overflow:auto;background:#fff;border:1px solid rgba(0,0,0,.06);border-radius:22px;box-shadow:0 30px 90px rgba(15,23,42,.22)}
.team-task-editor-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding:20px 22px 15px;border-bottom:1px solid #edf0f3}
.team-task-editor-head span{display:block;font-size:8px;font-weight:800;letter-spacing:.11em;text-transform:uppercase;color:#9aa1ab}
.team-task-editor-head h3{margin:4px 0 0;font-size:18px;letter-spacing:-.03em}
.team-task-x{width:30px;height:30px;border:0;border-radius:10px;background:#f3f4f6;color:#636c78;font-size:18px;cursor:pointer}
.team-task-form{padding:18px 22px 20px}
.team-task-field{display:grid;gap:6px;margin-bottom:13px}
.team-task-field label{font-size:9px;font-weight:750;color:#737c89}
.team-task-field input,.team-task-field select,.team-task-field textarea{
  width:100%;box-sizing:border-box;border:1px solid #dfe3e8;border-radius:11px;background:#fff;color:#20242b;
  padding:10px 11px;font:12px/1.4 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;outline:none
}
.team-task-field textarea{resize:vertical;min-height:74px}
.team-task-field input:focus,.team-task-field select:focus,.team-task-field textarea:focus{border-color:#aeb6c1;box-shadow:0 0 0 3px rgba(31,41,55,.05)}
.team-task-grid{display:grid;grid-template-columns:1.15fr .85fr .85fr;gap:10px}
.team-task-editor-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-top:17px}
.team-task-editor-actions button{height:34px;border-radius:10px;padding:0 13px;border:1px solid #e0e3e7;background:#fff;font-size:10px;font-weight:750;cursor:pointer}
.team-task-editor-actions .task-danger{margin-right:auto;border-color:#f0dddd;background:#fffafa;color:#a44b4b}
.team-task-editor-actions .task-primary{background:#171a1f;border-color:#171a1f;color:#fff}
.team-task-updates-section{border-top:1px solid #edf0f3;padding:17px 22px 20px}
.team-task-updates-head{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin-bottom:10px}
.team-task-updates-head strong{font-size:12px}
.team-task-updates-head small{font-size:8px;color:#9aa2ad}
.team-task-updates{max-height:180px;overflow:auto;padding-right:3px}
.task-update-row{display:grid;grid-template-columns:28px minmax(0,1fr);gap:9px;padding:9px 0;border-top:1px solid #f0f1f3}
.task-update-row:first-child{border-top:0}
.task-update-row>span{width:28px;height:28px;border-radius:9px;background:#f1f3f5;display:grid;place-items:center;font-size:8px;font-weight:800;color:#596474}
.task-update-row b{font-size:9px}.task-update-row p{margin:3px 0;font-size:10px;line-height:1.45;color:#4d5662;white-space:pre-wrap}.task-update-row small{font-size:8px;color:#a0a6ae}
.task-update-empty{padding:16px;text-align:center;font-size:9px;color:#9aa2ad}
.team-task-update-form{display:flex;gap:8px;margin-top:10px}
.team-task-update-form input{flex:1;min-width:0;height:36px;border:1px solid #dfe3e8;border-radius:11px;padding:0 11px;font-size:11px;outline:none}
.team-task-update-form input:focus{border-color:#aeb6c1}
.team-task-update-form button{width:36px;height:36px;border:0;border-radius:11px;background:#20242b;color:#fff;cursor:pointer}

@media(max-width:1280px){
  .home-page{grid-template-columns:minmax(0,1fr) 320px}
}
@media(max-width:1080px){
  .home-page{display:block!important;max-width:1320px!important}
  .team-task-rail{position:relative;top:auto;max-height:none;margin-top:18px}
  .team-task-list{max-height:420px}
}
@media(max-width:680px){
  .team-task-grid{grid-template-columns:1fr}
  .team-task-editor{border-radius:18px}
}

.app-main > .home-page.route-active{display:grid!important}

/* Keep Home task rail layout stable whether sidebar is expanded or collapsed. */
body.sidebar-collapsed .app-main > #home-page.app-page.route-active{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 360px!important;
}
@media(max-width:1280px){
  body.sidebar-collapsed .app-main > #home-page.app-page.route-active{
    grid-template-columns:minmax(0,1fr) 320px!important;
  }
}
@media(max-width:1080px){
  body.sidebar-collapsed .app-main > #home-page.app-page.route-active,
  body:not(.sidebar-collapsed) .app-main > #home-page.app-page.route-active{
    display:block!important;
  }
}


/* Collaboration v2 */
.collab-avatar{border-color:#fff}
.collab-avatar::before{content:"";position:absolute;inset:-2px;border-radius:inherit;border:1.5px solid var(--collab-user-color,#dfe3e9);opacity:.78;pointer-events:none}
.collab-avatar.more::before{display:none}
.collab-notif-list,.collab-action-list{padding:7px 8px 9px;max-height:360px;overflow:auto}
.collab-notif-row{display:grid;grid-template-columns:28px minmax(0,1fr);gap:9px;padding:9px;border-radius:11px}
.collab-notif-row:hover{background:#f7f8fa}
.collab-notif-row>span{width:28px;height:28px;border-radius:9px;background:#f1f3f5;display:grid;place-items:center;font-size:11px}
.collab-notif-row strong,.collab-action-row strong{display:block;font-size:10px;color:#2d333b;line-height:1.35}
.collab-notif-row small,.collab-action-row small{display:block;margin-top:3px;font-size:9px;color:#8a93a1;line-height:1.35}
.collab-action-row{width:100%;border:0;background:transparent;display:grid;grid-template-columns:8px minmax(0,1fr);gap:9px;text-align:left;padding:10px;border-radius:11px;cursor:pointer}
.collab-action-row:hover{background:#f7f8fa}
.collab-action-row>span{width:7px;height:7px;border-radius:50%;background:#c9ced5;margin-top:4px}
.collab-action-row>span.important{background:#d79b32}.collab-action-row>span.urgent{background:#d65353}
.collab-feed-row{cursor:default!important}
.chat-contact-list{display:grid;gap:2px}
.chat-contact{width:100%;border:0;background:transparent;display:grid;grid-template-columns:36px minmax(0,1fr) 18px;gap:10px;align-items:center;text-align:left;padding:10px;border-radius:12px;cursor:pointer}
.chat-contact:hover{background:#f2f4f6}
.chat-contact .collab-avatar{margin:0;width:32px;height:32px}
.chat-contact span:nth-child(2){min-width:0}
.chat-contact strong{display:block;font-size:11px;color:#292f37;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-contact small{display:block;margin-top:3px;font-size:9px;color:#8b94a1}
.chat-contact em{font-style:normal;color:#a5acb5;font-size:18px}
.chat-message-list{display:flex;flex-direction:column;gap:10px}
.chat-message{display:flex;flex-direction:column;max-width:82%}
.chat-message.own{align-self:flex-end;align-items:flex-end}
.chat-message.other{align-self:flex-start;align-items:flex-start}
.chat-bubble{padding:9px 11px;border-radius:14px;background:#eceff2;color:#313943;font-size:12px;line-height:1.42;white-space:pre-wrap;word-break:break-word}
.chat-message.own .chat-bubble{background:#20242b;color:#fff;border-bottom-right-radius:5px}
.chat-message.other .chat-bubble{border-bottom-left-radius:5px}
.chat-message small{margin-top:4px;padding:0 3px;font-size:8px;color:#9aa2ad}
.chat-composer[hidden]{display:none!important}
.collab-remote-focus{position:relative!important;outline:2px solid var(--collab-user-color,#566b80)!important;outline-offset:-2px!important;z-index:2}
.live-cursor-tag{top:-18px;left:0;background:var(--collab-user-color,#20242b)!important;border-radius:6px 6px 6px 1px!important;padding:3px 6px!important;white-space:nowrap}

/* Home dashboard: responsive navigation and aligned cards */
body .app-main{box-sizing:border-box;min-width:0;width:auto;max-width:none}
body.sidebar-collapsed .app-main{margin-left:var(--sidebar-collapsed,64px)!important}
body:not(.sidebar-collapsed) .app-main{margin-left:var(--sidebar-expanded,230px)!important}
body .app-main>#home-page.app-page.route-active{
  width:100%!important;max-width:1760px!important;min-width:0;
  margin:0 auto!important;padding:0 0 24px!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) clamp(260px,24%,340px)!important;
  grid-template-rows:auto auto auto auto;
  gap:16px 18px;align-items:start;align-content:start;
}
body .app-main>#home-page>.home-hero{grid-column:1 / -1;grid-row:1;margin:8px 0 0!important;min-height:0}
body .app-main>#home-page>.home-top-grid{grid-column:1;grid-row:2}
body .app-main>#home-page>.home-middle-grid{grid-column:1;grid-row:3}
body .app-main>#home-page>.system-card{grid-column:1;grid-row:4}
body .app-main>#home-page>.home-grid{margin:0!important;min-width:0;gap:14px}
body .app-main>#home-page>.home-card{min-width:0}
body .app-main>#home-page>.team-task-rail{
 grid-column:2;grid-row:2 / span 3;align-self:start;
 position:sticky;top:94px;margin:0!important;min-width:0;
 max-height:calc(100vh - 110px);
}
body .app-main>#home-page .home-top-grid{grid-template-columns:minmax(0,1.35fr) minmax(0,.95fr)}
body .app-main>#home-page .home-middle-grid{grid-template-columns:minmax(0,1.55fr) minmax(0,.75fr)}
body .app-main>#home-page .quick-actions{grid-template-columns:repeat(4,minmax(0,1fr))}
body .app-main>#home-page .quick-actions button{min-width:0;padding:10px 5px}
body .app-main>#home-page .today-metrics{grid-template-columns:repeat(4,minmax(0,1fr))}
body .app-main>#home-page .today-metrics div{min-width:0;padding:4px 8px}
@media(max-width:1240px){
 body .app-main>#home-page.app-page.route-active{grid-template-columns:minmax(0,1fr) 270px!important;gap:14px}
 body .app-main>#home-page .home-top-grid,body .app-main>#home-page .home-middle-grid{grid-template-columns:minmax(0,1fr)}
}
@media(max-width:960px){
 body .app-main>#home-page.app-page.route-active{grid-template-columns:minmax(0,1fr)!important}
 body .app-main>#home-page>.team-task-rail{grid-column:1;grid-row:5;position:relative;top:auto;max-height:none}
 body .app-main>#home-page .home-top-grid{grid-template-columns:minmax(0,1fr)}
 body .app-main>#home-page .home-middle-grid{grid-template-columns:minmax(0,1fr)}
}

/* Override legacy collapsed-only and narrow viewport layout switches. */
body.sidebar-collapsed .app-main>#home-page.app-page.route-active,
body:not(.sidebar-collapsed) .app-main>#home-page.app-page.route-active{
 display:grid!important;grid-template-columns:minmax(0,1fr) clamp(260px,24%,340px)!important;
}
@media(max-width:1240px){
 body.sidebar-collapsed .app-main>#home-page.app-page.route-active,
 body:not(.sidebar-collapsed) .app-main>#home-page.app-page.route-active{grid-template-columns:minmax(0,1fr) 270px!important}
}
@media(max-width:960px){
 body.sidebar-collapsed .app-main>#home-page.app-page.route-active,
 body:not(.sidebar-collapsed) .app-main>#home-page.app-page.route-active{grid-template-columns:minmax(0,1fr)!important}
}

/* Chat contact presence overrides the generic always-online avatar dot. */
.chat-contact .chat-contact-avatar::after{display:none!important}
.chat-contact .chat-contact-avatar .chat-presence-dot{display:block!important;position:absolute;right:-1px;bottom:-1px;width:10px;height:10px;border-radius:50%;border:2px solid #fff;box-sizing:border-box;z-index:2}
.chat-contact .chat-contact-avatar.is-online .chat-presence-dot{background:#26a269!important}
.chat-contact .chat-contact-avatar.is-offline .chat-presence-dot{background:#d94b4b!important}

/* Home layout: explicit CSS grid placement. Fulfillment must not auto-flow after System Status. */
.home-page>.home-fulfillment-board{grid-column:1;grid-row:3;margin:0!important;width:100%;min-width:0}
.home-page>.home-middle-grid{grid-row:4}
.home-page>.system-card{grid-row:5}
.home-page>.team-task-rail{grid-row:2 / span 4}
body .app-main>#home-page>.home-fulfillment-board{grid-column:1;grid-row:3;margin:0!important;width:100%;min-width:0}
body .app-main>#home-page>.home-middle-grid{grid-row:4}
body .app-main>#home-page>.system-card{grid-row:5}
body .app-main>#home-page>.team-task-rail{grid-row:2 / span 4}
@media(max-width:960px){body .app-main>#home-page>.team-task-rail{grid-column:1;grid-row:6;position:relative;top:auto;max-height:none}}
