.chat-layout{display:grid;grid-template-columns:270px minmax(0,1fr);height:min(760px,calc(100vh - 170px));min-height:520px;background:#fff;border:1px solid var(--line);border-radius:18px;overflow:hidden;box-shadow:0 12px 42px rgba(28,63,47,.06)}
.chat-channel-panel{display:flex;flex-direction:column;border-right:1px solid var(--line);background:#fbfcf8}.chat-panel-head{padding:26px 22px 15px}.chat-panel-head h1{font-size:31px;margin:8px 0 0}.chat-channel-list{padding:5px 10px;display:grid;gap:4px}.chat-channel{width:100%;border:0;background:transparent;text-align:left;display:flex;align-items:center;gap:12px;padding:13px 11px;border-radius:12px;color:var(--ink)}.chat-channel.selected{background:#e9f0e6}.chat-channel:hover{background:#f0f4ed}.chat-avatar{width:40px;height:40px;border-radius:50%;background:#dce8d8;color:#24553e;display:grid;place-items:center;font-size:19px;flex:none}.chat-avatar.big{width:42px;height:42px}.chat-channel-copy{min-width:0;flex:1}.chat-channel-copy b,.chat-thread-head strong{font-size:14px;font-weight:650;display:block}.chat-channel-copy small,.chat-thread-head small{font-size:11px;color:var(--muted);display:block;margin-top:5px}.chat-count{background:#2b624a;color:#fff;font-size:11px;min-width:21px;height:21px;border-radius:12px;display:grid;place-items:center;padding:0 4px}.chat-report-link{margin:auto 20px 22px;text-align:left;background:none;border:0;color:var(--green);font-size:12px;font-weight:600;padding:10px 0}.chat-thread{min-width:0;min-height:0;display:flex;flex-direction:column;background:#f6f8f3}.chat-thread-head{height:73px;padding:0 25px;display:flex;align-items:center;gap:12px;border-bottom:1px solid var(--line);background:#fff}.chat-thread-head strong{font-size:15px}.chat-scroll{flex:1;min-height:0;overflow-y:auto;padding:22px 26px 25px;display:flex;flex-direction:column;gap:13px}.chat-empty{margin:auto;text-align:center;color:var(--muted);max-width:280px}.chat-empty-symbol{font-size:26px;background:#e8eee4;width:62px;height:62px;display:grid;place-items:center;border-radius:50%;margin:0 auto 16px;color:var(--green)}.chat-empty h2{color:var(--ink);margin:0}.chat-empty p{font-size:13px;line-height:1.6}.chat-line{display:flex;flex-direction:column;max-width:min(76%,560px)}.chat-line.incoming{align-self:flex-start;align-items:flex-start}.chat-line.outgoing{align-self:flex-end;align-items:flex-end}.chat-bubble{position:relative;min-width:92px;max-width:100%;padding:11px 13px 9px;border:1px solid #e0e7df;border-radius:15px 15px 15px 5px;background:#fff;box-shadow:0 2px 7px rgba(30,52,36,.04)}.outgoing .chat-bubble{background:#dcebd5;border-color:#d2e2c9;border-radius:15px 15px 5px 15px}.chat-author{font-size:11px;font-weight:650;color:#35644d}.chat-bubble p{margin:5px 0 3px;font-size:14px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere}.chat-time{display:block;text-align:right;font-size:10px;color:#789081}.chat-reaction-row{display:flex;align-items:center;gap:4px;margin:3px 3px 0;min-height:26px}.reaction-chip{border:1px solid #dae4d8;border-radius:13px;background:#fff;padding:2px 7px;font-size:12px;color:var(--ink)}.reaction-chip.mine{background:#e5f1dd;border-color:#b9d6ae}.reaction-open{border:0;background:none;color:#83958a;font-size:17px;padding:0 5px;opacity:.35}.chat-line:hover .reaction-open,.reaction-open:focus-visible,.reaction-open:active{opacity:1}.reaction-picker{display:inline-flex;gap:2px;background:#fff;border:1px solid var(--line);border-radius:18px;padding:3px;box-shadow:0 4px 14px #0001}.reaction-picker button{border:0;border-radius:50%;background:transparent;padding:2px 4px;font-size:17px}.reaction-picker button:hover{background:#eaf0e7}.chat-task-event{align-self:center;width:min(88%,420px);display:flex;gap:12px;padding:15px 16px;border-radius:14px;border:1px solid #d9e4d4;background:#fff;box-shadow:0 3px 14px #1e3c2c0b}.chat-task-icon{background:#e7eee0;color:#2b634a;display:grid;place-items:center;width:30px;height:30px;flex:none;border-radius:9px;font-size:17px}.chat-task-copy{min-width:0}.chat-task-copy>small{display:block;letter-spacing:1px;font-size:10px;color:#67806b;font-weight:700}.chat-task-copy strong{display:block;font-size:14px;margin:6px 0;overflow-wrap:anywhere}.chat-task-copy>span{font-size:11px;color:var(--muted)}.chat-task-actions{display:flex;gap:10px;align-items:center;margin-top:10px}.chat-task-actions small,.chat-seen{font-size:11px;color:var(--muted)}.chat-composer{display:flex;align-items:flex-end;gap:10px;padding:13px 18px;border-top:1px solid var(--line);background:#fff}.chat-composer textarea{flex:1;min-height:44px;max-height:120px;border:1px solid #d5dfd2;border-radius:16px;padding:11px 14px;resize:vertical;font-size:14px}.chat-send{border:0;border-radius:13px;width:44px;height:44px;background:var(--green);color:#fff;font-size:19px;display:grid;place-items:center}.chat-send:hover{filter:brightness(1.1)}
@media(max-width:850px){.chat-layout{grid-template-columns:1fr;height:min(720px,calc(100vh - 170px));min-height:490px}.chat-channel-panel{border-right:0;border-bottom:1px solid var(--line);display:block}.chat-panel-head{display:none}.chat-channel-list{display:flex;gap:5px;padding:8px;overflow-x:auto}.chat-channel{width:auto;min-width:120px;padding:8px 11px}.chat-channel-copy small,.chat-report-link{display:none}.chat-avatar{width:31px;height:31px;font-size:15px}.chat-thread-head{height:61px;padding:0 15px}.chat-scroll{padding:17px 13px}.chat-line{max-width:88%}.chat-composer{padding:10px}.reaction-open{opacity:1}}

.chat-layout.chat-inbox,.chat-layout.chat-thread{display:flex;flex-direction:column;max-width:760px;margin:auto;height:min(760px,calc(100dvh - 170px));min-height:420px}
.chat-inbox{background:#fff}.chat-inbox-head{display:flex;align-items:center;gap:15px;justify-content:space-between;padding:22px 25px;border-bottom:1px solid var(--line)}.chat-inbox-head h1{margin:3px 0;font-size:31px}.chat-inbox-head p:not(.eyebrow){font-size:12px;color:var(--muted);margin:3px 0}.chat-new{border:0;background:var(--green);color:#fff;border-radius:12px;padding:10px 14px;font-size:13px;font-weight:650;white-space:nowrap}.chat-inbox-list{flex:1;min-height:0;overflow:auto}.chat-inbox-row{display:flex;align-items:center;gap:14px;width:100%;text-align:left;background:#fff;border:0;border-bottom:1px solid #ebefea;padding:16px 24px;color:var(--ink)}.chat-inbox-row:hover{background:#f7f9f4}.chat-inbox-row .chat-avatar{width:46px;height:46px}.chat-row-copy{min-width:0;flex:1}.chat-row-copy strong{display:block;font-size:15px}.chat-row-copy small{display:block;color:var(--muted);font-size:12px;margin-top:5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-row-end{display:flex;flex-direction:column;align-items:flex-end;gap:6px;min-width:22px}.chat-row-end small{color:var(--muted);font-size:10px}.chat-chevron{font-size:25px;color:#a4b3a8;line-height:1}.chat-list-divider{font-size:10px;letter-spacing:1.4px;font-weight:700;color:var(--muted);background:#f7f9f4;padding:10px 24px}.chat-list-empty{padding:24px;color:var(--muted);font-size:13px}.chat-inbox .chat-report-link{display:block;margin:0;padding:15px 24px;border-top:1px solid var(--line);width:100%}.chat-back{border:0;background:transparent;color:var(--green);font-size:32px;line-height:1;width:32px;height:42px;flex:none;display:grid;place-items:center}.chat-thread-title{min-width:0}.chat-thread-title strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-unavailable{margin:0;padding:17px;text-align:center;color:var(--muted);background:#fff;font-size:12px}.chat-inbox .chat-avatar{font-size:19px}
@media(max-width:800px){
 .sidebar{position:static;width:100%;padding:13px 18px 9px;border-right:0;border-bottom:0;background:transparent}
 .sidebar nav{position:fixed;left:0;right:0;bottom:0;z-index:30;display:flex;gap:2px;margin:0;padding:6px 5px calc(7px + env(safe-area-inset-bottom));background:rgba(255,255,255,.96);border-top:1px solid var(--line);box-shadow:0 -4px 18px #1e3c2c10;overflow:visible}
 .sidebar nav button{position:relative;flex:1;min-width:0;min-height:48px;justify-content:center;text-align:center;font-size:11px;padding:7px 2px;white-space:normal;display:flex;flex-direction:column;gap:2px}
 .sidebar nav button[data-page=today]::before{content:'◉'}.sidebar nav button[data-page=routines]::before{content:'☑'}.sidebar nav button[data-page=chat]::before{content:'▤'}.sidebar nav button[data-page=reports]::before{content:'⚑'}.sidebar nav button[data-page=employees]::before{content:'♙'}
 .sidebar nav button::before{font-size:19px;line-height:1}.sidebar nav button .badge{margin:0;position:absolute;transform:translate(19px,-31px)}
 .topbar{display:none}.workspace{margin:0;width:100%}main{padding:8px 14px calc(92px + env(safe-area-inset-bottom));min-height:0}
 .chat-layout.chat-inbox,.chat-layout.chat-thread{height:calc(100dvh - 176px - env(safe-area-inset-bottom));min-height:350px;border-radius:16px}
 .chat-inbox-head{padding:14px 17px}.chat-inbox-head h1{font-size:27px}.chat-inbox-row{padding:14px 17px}.chat-inbox-row .chat-avatar{width:42px;height:42px}.chat-inbox .chat-report-link{padding:13px 17px}
}
