.chat-dialog{width:min(1120px,96vw);height:min(760px,92dvh);padding:0;overflow:hidden;border-radius:16px}.chat-dialog .modalhead{padding:22px 25px}.chat-dialog .modalhead h2{font-size:23px;margin-bottom:5px}.chat-dialog .modalhead p{font-size:12px}.chat-dialog::backdrop{background:#071b3899}.chat-layout{display:grid;grid-template-columns:290px minmax(0,1fr);height:calc(100% - 108px);min-height:0}.chat-dialog:has(#chat-error:not([hidden])) .chat-layout{height:calc(100% - 175px)}.chat-dialog #chat-error{margin:8px 20px;padding:10px;max-height:60px;overflow:auto}.chat-people{border-right:1px solid #dfe7f1;background:#fbfcff;overflow:auto}.chat-search{display:grid;gap:8px;padding:20px;font-size:12px;color:#526c8e}.chat-search input{min-width:0;width:100%;padding:11px;border:1px solid #d4dfed;border-radius:8px;background:white}.chat-contact{width:100%;display:flex;align-items:center;gap:11px;padding:16px;border:0;border-bottom:1px solid #eaf0f7;background:transparent;text-align:left;color:#173858}.chat-contact:hover,.chat-contact.active{background:#eaf2ff}.chat-contact.active{box-shadow:inset 3px 0 #2563eb}.chat-contact-avatar{display:grid;place-items:center;flex:0 0 37px;height:37px;border-radius:11px;background:#e3edfc;color:#2459ad;font-weight:750}.chat-contact-info{min-width:0;flex:1}.chat-contact-info b,.chat-contact-info small,.chat-contact-info>span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-contact-info b{font-size:13px}.chat-contact-info small{font-size:12px;color:#627b99;margin-top:5px}.chat-contact-info>span{font-size:10px;color:#74869d;margin-top:5px}.chat-unread{border-radius:8px;background:#2563eb;color:white;font-size:11px;padding:5px 7px}.chat-thread{display:flex;flex-direction:column;min-height:0;min-width:0;background:#f3f6fb}.chat-peer-title{padding:19px 22px;background:#fff;border-bottom:1px solid #e2eaf4;font-size:14px;font-weight:700;color:#173858}.chat-messages{flex:1;overflow:auto;padding:23px;display:flex;flex-direction:column;align-items:flex-start;gap:13px;overscroll-behavior:contain}.chat-empty{font-size:13px;padding:24px;line-height:1.7;color:#627995}.chat-bubble{max-width:85%;padding:13px 16px;border:1px solid #e0e8f4;border-radius:13px 13px 13px 3px;background:#fff;box-shadow:0 2px 8px #10244504}.chat-bubble p{color:#203e61;font-size:13px;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.7}.chat-bubble small{display:block;font-size:10px;color:#71859e;margin-top:8px}.chat-bubble.mine{align-self:flex-end;background:#e7f0ff;border-color:#d1e2ff;border-radius:13px 13px 3px 13px}.chat-bubble.mine p{color:#173c6f}.chat-compose{padding:16px 20px;background:#fff;border-top:1px solid #dfe7f1}.chat-compose>label{font-size:11px;color:#627995;font-weight:600;display:block;margin-bottom:7px}.chat-compose textarea{width:100%;resize:vertical;max-height:150px;min-height:65px;box-sizing:border-box;border:1px solid #d1deed;border-radius:9px;padding:11px;font:inherit;color:#203e61}.chat-compose>div{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-top:9px}.chat-compose>div>span{font-size:10px;color:#6a809d}.chat-older{align-self:center;flex-shrink:0}.chat-shortcut{background:#edf4ff;color:#204d89}.chat-shortcut strong{background:#fff;color:#2459ad}@media(max-width:700px){.chat-dialog{height:94dvh;width:98vw}.chat-dialog .modalhead{padding:16px}.chat-dialog .modalhead h2{font-size:20px}.chat-layout{grid-template-columns:130px minmax(0,1fr);height:calc(100% - 110px)}.chat-search{padding:12px;font-size:11px}.chat-contact{padding:13px 9px;gap:7px;flex-wrap:wrap}.chat-contact-avatar{display:none}.chat-contact-info b{font-size:12px}.chat-contact-info small{font-size:11px}.chat-contact-info{flex-basis:80px}.chat-unread{font-size:10px;padding:3px 6px}.chat-messages{padding:12px;gap:10px}.chat-bubble{max-width:96%;padding:11px}.chat-bubble p{font-size:12px}.chat-bubble small{font-size:9px}.chat-peer-title{padding:15px 12px;font-size:12px;overflow-wrap:anywhere}.chat-compose{padding:12px}.chat-compose>div{align-items:flex-end}.chat-compose>div>span{font-size:9px}.chat-shortcut{flex:1;min-width:110px}.chat-empty{padding:16px;font-size:12px}}@media print{.chat-dialog,#chat-button{display:none!important}}
.chat-attachment{display:flex;align-items:center;gap:10px;border:1px solid #d4e2f4;border-radius:9px;padding:11px;margin-top:9px;background:#f8fbff;color:#2459ad;overflow-wrap:anywhere;font-size:12px}.chat-attachment>span:first-child{font-size:23px}.chat-attachment small{margin-top:5px;color:#5b769b}.chat-file-label{margin-top:9px}.chat-file-label input{display:block;max-width:100%;font-size:11px;margin-top:7px}#chat-file-info{display:flex;align-items:center;gap:12px;overflow-wrap:anywhere;font-size:11px;color:#2459ad;margin-top:7px}.chat-settings-panel{margin-top:20px;margin-bottom:20px}.chat-settings-form{display:grid;gap:17px;padding:23px}.chat-settings-form p{font-size:12px;line-height:1.8}.chat-settings-form label{display:grid;gap:7px;color:#526c8e;font-size:12px}.chat-settings-form .chat-retention-toggle{display:flex;align-items:center;gap:10px;font-size:13px;font-weight:650}.chat-retention-toggle input{width:18px;height:18px;accent-color:#2563eb}.chat-retention-fields{display:grid;grid-template-columns:1fr 1fr;gap:15px;max-width:480px}.chat-retention-fields input,.chat-retention-fields select{min-width:0;padding:11px;border:1px solid #d1deed;border-radius:8px;background:white;color:#203e61;font:inherit}.chat-retention-fields :disabled{opacity:.6;background:#f0f4f9}.chat-retention-note{padding:15px;border:1px solid #f1dfa9;border-radius:9px;background:#fffaf0;color:#775819}.chat-retention-summary{font-size:12px;color:#526c8e}.chat-settings-form>[type=submit]{justify-self:start}.chat-compose{max-height:52%;overflow:auto;flex-shrink:0}@media(max-width:700px){.chat-retention-fields{grid-template-columns:1fr}.chat-settings-form{padding:17px}.chat-file-label input{width:100%}}
.chat-settings-form .chat-size-setting{max-width:260px}.chat-size-setting input{padding:11px;border:1px solid #d1deed;border-radius:8px;background:white;color:#203e61;font:inherit}
/* Soft turquoise chat, aligned with the upper-right toolbar. */
.topbar #chat-button{order:100;margin-left:auto;flex:0 0 auto;background:#eafaf8;border-color:#b7e4df;color:#246c68}
.topbar #chat-button:hover{background:#ddf5f1;border-color:#85c9c1;box-shadow:0 3px 12px #246c6814}
.topbar #chat-button strong{background:#cceee8;color:#205c58}
.topbar #chat-button:focus-visible,.chat-dialog button:focus-visible,.chat-dialog input:focus-visible,.chat-dialog textarea:focus-visible{outline:3px solid #4eaaa0;outline-offset:3px}
.chat-dialog{position:fixed;inset:16px 16px auto auto;margin:0;width:min(1120px,calc(100vw - 32px));height:min(760px,calc(100dvh - 32px));max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);border:1px solid #b9ded9;background:#f7fdfc;box-shadow:0 18px 65px #215b5726}
.chat-dialog .modalhead{background:#eafaf8;border-bottom-color:#c5e8e3}
.chat-dialog .modalhead h2,.chat-dialog .task-center-kicker{color:#256b65}
.chat-dialog .chat-people{background:#f2fbf9;border-right-color:#cce9e4}
.chat-dialog .chat-contact:hover,.chat-dialog .chat-contact.active{background:#dff4ef}
.chat-dialog .chat-contact.active{box-shadow:inset 3px 0 #43988e}
.chat-dialog .chat-contact-avatar{background:#d5eee9;color:#246c68}
.chat-dialog .chat-unread{background:#24796f;color:#fff}
.chat-dialog .chat-thread{background:#eef9f6}
.chat-dialog .chat-peer-title{background:#f7fdfc;border-bottom-color:#cce9e4}
.chat-dialog .chat-bubble{border-color:#cce5de}
.chat-dialog .chat-bubble.mine{background:#d6eee7;border-color:#afd9cd}
.chat-dialog .chat-bubble.mine p{color:#205e53}
.chat-dialog .chat-compose{background:#f7fdfc;border-top-color:#cce9e4}
.chat-dialog .chat-compose textarea,.chat-dialog .chat-search input{border-color:#badcd3}
.chat-dialog .chat-compose .btn.primary{background:#24796f;border-color:#24796f;color:#fff}
.chat-dialog .chat-compose .btn.primary:hover{background:#1c625b;border-color:#1c625b}
.chat-dialog .chat-attachment{background:#edfaf6;border-color:#b9ded3;color:#256b65}
@media(max-width:700px){.topbar #chat-button{min-width:0;flex:0 0 auto}.chat-dialog{inset:8px 8px auto auto;width:calc(100vw - 16px);height:calc(100dvh - 16px);max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px)}}
