@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap');

:root {
  color-scheme: light;
  font-family: 'DM Sans', system-ui, sans-serif;
  color: #1d2925;
  background: #f5f7f5;
  font-synthesis: none;
  --ink: #1d2925;
  --muted: #5f6c66;
  --border: #dce4de;
  --green: #1b7255;
  --dark: #173b32;
  --mint: #e8f3eb;
  --white: #fff;
  --radius: 13px;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 320px; font-size: 15px; }
button, input, textarea, select { color: inherit; font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .52; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible {
  outline: 3px solid #4b9879; outline-offset: 2px;
}
button, input, textarea, select { -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p { margin: 0; }
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.loading-screen, .login-screen { min-height: 100dvh; display: grid; place-items: center; padding: 20px; color: var(--muted); }
.login-card { width: min(100%, 420px); padding: 32px; border: 1px solid var(--border); border-radius: 22px; background: white; box-shadow: 0 20px 65px #253f3310; }
.login-card h1 { font: 800 27px 'Manrope', system-ui, sans-serif; margin: 20px 0 6px; color: var(--ink); }
.login-card p { margin-bottom: 24px; }
.login-card .button { width: 100%; margin-top: 10px; }
.login-card .logo { margin: 0; }

.shell { display: grid; grid-template-columns: 72px minmax(0, 1fr); height: 100dvh; min-height: 540px; }
.rail { background: var(--dark); color: #e5f0e9; display: flex; flex-direction: column; align-items: center; min-height: 0; }
.logo { display: grid; place-items: center; background: #d5f1d9; color: #173c31; width: 39px; height: 39px; border-radius: 10px 10px 10px 3px; margin: 21px 0 29px; font: 800 22px/1 'Manrope', sans-serif; letter-spacing: -.1em; padding-right: 2px; }
.rail-action { display: grid; place-items: center; position: relative; color: #dceae2; background: none; border: 0; border-radius: 10px; width: 44px; height: 44px; margin: 0 0 10px; }
.rail-action:hover, .rail-action.active { background: #ffffff26; color: #fff; }
.rail-action.active::before { content: ''; width: 3px; height: 22px; background: #a7dfb8; position: absolute; left: -14px; border-radius: 0 6px 6px 0; }
.rail-action .icon { width: 21px; height: 21px; }
.rail-bottom { margin-top: auto; padding: 16px 0; }
.rail-bottom .rail-action { margin-bottom: 0; }
.main { min-width: 0; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); }
.topbar { min-height: 87px; display: flex; align-items: center; justify-content: space-between; padding: 15px 28px; background: #fff; border-bottom: 1px solid var(--border); gap: 16px; }
.topbar h1 { font: 800 27px/1.15 'Manrope', system-ui, sans-serif; letter-spacing: -.055em; margin-bottom: 4px; }
.topbar p, .top-date { color: var(--muted); font-size: 13px; }
.top-actions { display: flex; align-items: center; gap: 17px; }
.top-date { white-space: nowrap; }
.connection { white-space: nowrap; display: flex; align-items: center; gap: 7px; background: #f1f6f1; border: 1px solid var(--border); border-radius: 999px; color: #3a5847; font-size: 12px; font-weight: 700; padding: 6px 10px; }
.connection .dot { width: 7px; height: 7px; border-radius: 50%; background: #449567; }
.connection.off { color: #8a5f23; background: #fff6e5; border-color: #ebdfc9; }
.connection.off .dot { background: #be893e; }
.profile { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.profile .avatar { width: 32px; height: 32px; font-size: 12px; }
.panel-profile-menu { position: relative; }
.panel-profile-menu summary { cursor: pointer; list-style: none; border-radius: 8px; padding: 4px; }
.panel-profile-menu summary::-webkit-details-marker { display: none; }
.panel-profile-menu summary::after { content: "⌄"; color: var(--muted); }
.panel-profile-actions { position: absolute; z-index: 5; right: 0; top: calc(100% + 6px); display: grid; min-width: 148px;
  padding: 5px; background: white; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 24px #18342b18; }
.panel-profile-menu:not([open]) .panel-profile-actions { display: none; }
.panel-profile-actions .text-button { padding: 9px 10px; text-align: left; border-radius: 6px; }
.panel-profile-actions .text-button:hover { background: var(--wash,#f4f7f5); }
.workspace { position: relative; min-width: 0; min-height: 0; display: grid; grid-template-columns: minmax(240px, 320px) minmax(0, 1fr) clamp(320px, 27vw, 440px); }
.inbox, .thread { min-width: 0; min-height: 0; }
.summary-pane { display: grid; grid-template-rows: auto minmax(0, 1fr); min-width: 0; min-height: 0; background: #fff; border-left: 1px solid #e1ebec; }
.summary-heading { display: flex; align-items: stretch; justify-content: space-between; gap: 10px; min-height: 68px; padding: 0 17px; border-bottom: 1px solid #e1ebec; }
.summary-heading .summary-toggle { align-self: center; }
.summary-heading-tools { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
[data-conversation-actions]:empty { display: none; }
.summary-tabs { display: flex; align-items: stretch; gap: 14px; }
.summary-tabs button { background: transparent; padding: 0 5px; border: 0; border-bottom: 3px solid transparent; font-weight: 800; font-size: .95rem; color: #4e6267; }
.summary-tabs button:hover { color: #0c4a54; }
.summary-tabs button[aria-selected="true"] { border-bottom-color: #17736c; color: #0c4a54; }
.button.summary-toggle { display: none; }
.summary-body { overflow: auto; padding: 16px 17px 24px; color: #234049; scrollbar-width: thin; }
.summary-body:focus-visible { outline: 2px solid #4b9879; outline-offset: -2px; }
.summary-coverage, .summary-status { font-size: .82rem; line-height: 1.45; color: #4e6267; }
.summary-coverage { flex: 1 1 120px; }
.summary-status { margin-bottom: 12px; }
.summary-status[role="alert"] { color: #8a332a; }
.summary-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.summary-toolbar:empty { display: none; }
.summary-project { padding: 14px 0; border-block-start: 1px solid #ecf1f2; overflow-wrap: anywhere; }
.summary-project h3 { color: #0c4a54; font-size: 1rem; line-height: 1.35; }
.summary-current { margin-top: 6px; font-size: .9rem; line-height: 1.52; white-space: pre-wrap; }
.summary-facts { margin-top: 14px; }
.summary-facts h4 { color: #0c4a54; font-size: .84rem; margin: 0; }
.summary-facts ul { margin: 5px 0 0; padding-inline-start: 17px; }
.summary-facts li { margin-top: 5px; font-size: .84rem; line-height: 1.4; }
.summary-deadline, .note-origin { display: inline-block; border-radius: 5px; padding: 1px 5px; font-size: .7rem; font-weight: 800; }
.summary-deadline { margin-inline-end: 5px; color: #4e6267; background: #f0f3f3; }
.summary-deadline[data-kind="prometido"], .note-origin { color: #195c4f; background: #e4f3ef; }
.summary-deadline[data-kind="a_confirmar"] { color: #795514; background: #fbf3da; }
.summary-references { margin-top: 13px; font-size: .81rem; color: #38565b; }
.summary-references summary { cursor: pointer; font-weight: 700; width: fit-content; }
.summary-references ul { margin: 5px 0 0; padding-inline-start: 17px; }
.summary-references .text-button { color: #0a6766; font-size: .77rem; text-align: left; overflow-wrap: anywhere; }
.summary-period { margin-top: 4px; }
.summary-notes-list { border-top: 1px solid #e8eee9; margin-top: 15px; padding-top: 13px; }
.summary-notes-list h3 { margin-bottom: 8px; font-size: .85rem; }
.summary-notes-list [data-note-id]:focus { outline: 2px solid #6bac9e; }
.inbox { display: flex; flex-direction: column; background: #fff; border-right: 1px solid var(--border); }
.inbox-top { padding: 21px 17px 14px; flex: none; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 9px; margin-bottom: 14px; }
.section-head h2 { font: 800 18px/1.25 'Manrope', system-ui, sans-serif; letter-spacing: -.035em; }
.number { border: 1px solid var(--border); border-radius: 999px; min-width: 26px; text-align: center; padding: 2px 7px; font-size: 12px; color: var(--muted); font-weight: 700; }
.search { display: flex; align-items: center; height: 38px; border: 1px solid var(--border); border-radius: 9px; padding: 0 10px; gap: 8px; color: var(--muted); background: #f8faf8; }
.search:focus-within { border-color: #519475; }
.search .icon { width: 16px; height: 16px; }
.search input { width: 100%; min-width: 0; border: 0; background: transparent; outline: none; font-size: 13px; }
.search input:focus-visible { outline: none; }
.filters { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 12px; }
.filter { border: 1px solid transparent; background: transparent; padding: 5px 8px; border-radius: 7px; font-size: 12px; white-space: nowrap; color: #50615a; font-weight: 600; }
.filter:hover { background: #f0f4f1; }
.filter.selected { background: #e9f3ec; border-color: #d6eadc; color: #24543d; font-weight: 700; }
.list-toolbar { height: 33px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; border-top: 1px solid #ecf0ed; color: var(--muted); font-size: 12px; }
.list-toolbar button { display: flex; align-items: center; gap: 3px; background: none; border: 0; padding: 2px 0; color: #53635b; font-size: 12px; }
.list-toolbar .icon { width: 14px; height: 14px; }
.list { padding: 0 8px 12px; min-height: 0; overflow: auto; scrollbar-width: thin; }
.chat-item { border: 1px solid transparent; border-bottom: 1px solid #ebefeb; border-radius: 0; background: #fff; text-align: left; width: 100%; padding: 11px 8px; display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 9px; position: relative; min-height: 83px; }
.chat-item:hover { background: #f7faf7; border-radius: 9px; }
.chat-item.selected { background: #edf5ed; border: 1px solid #dbeade; border-radius: 9px; }
.avatar { flex: none; width: 37px; height: 37px; border-radius: 50%; display: grid; place-items: center; font: 800 12px 'Manrope', sans-serif; background: #e0efe3; color: #295843; letter-spacing: -.025em; }
.avatar[data-tone="0"] { background: #dceee2; color: #295843; }
.avatar[data-tone="1"] { background: #e7e7f7; color: #594f79; }
.avatar[data-tone="2"] { background: #f3ebd9; color: #785d29; }
.avatar[data-tone="3"] { background: #dceaf2; color: #365b6e; }
.avatar[data-tone="4"] { background: #f2e5e4; color: #7e504b; }
.avatar.group .icon { width: 17px; height: 17px; }
.chat-copy { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.chat-line { display: flex; justify-content: space-between; align-items: center; gap: 5px; min-width: 0; }
.chat-name, .subject, .chat-preview { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.chat-name { font-size: 13px; font-weight: 800; }
.chat-line time, .chat-preview { font-size: 12px; color: var(--muted); }
.chat-line time { white-space: nowrap; }
.subject { color: #40544a; font-size: 12px; }
.chat-preview { color: #65746c; }
.small-status { flex: none; display: inline-block; font-size: 11px; font-weight: 700; color: #35644c; padding: 1px 5px; background: #edf3ec; border-radius: 5px; white-space: nowrap; }
.small-status.overdue { background: #fae8e1; color: #9c4433; }
.small-status.scheduled { color: #6d5829; background: #f8f0dd; }
.small-status.client { color: #585687; background: #eeedf6; }
.small-status.resolved { color: #55635b; background: #ecefec; }

.thread { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: #f4f7f3; }
.thread-head { padding: 14px 23px; min-height: 68px; display: flex; align-items: center; gap: 11px; justify-content: space-between; background: #fff; border-bottom: 1px solid var(--border); }
.thread-title { display: flex; gap: 11px; align-items: center; min-width: 0; }
.thread-head h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 800 16px 'Manrope', system-ui, sans-serif; }
.thread-head p { color: var(--muted); font-size: 12px; margin-top: 2px; }
.thread-actions { display: flex; align-items: center; gap: 6px; }
.thread-scroll { overflow-y: auto; scrollbar-width: thin; min-width: 0; padding: 16px 24px 20px; }
.day-separator { display: flex; align-items: center; justify-content: center; margin: 10px 0 16px; gap: 10px; color: #5b6a63; font-size: 12px; font-weight: 700; }
.day-separator::before, .day-separator::after { content: ''; width: 44px; height: 1px; background: #dbe4dc; }
.bubble-row { display: flex; justify-content: flex-start; margin-bottom: 9px; }
.bubble-row.outbound { justify-content: flex-end; }
.bubble { min-width: 100px; max-width: min(86%, 540px); border: 1px solid #e1e8e1; background: white; border-radius: 2px 13px 13px; padding: 10px 12px 7px; box-shadow: 0 2px 4px #183d3307; overflow-wrap: anywhere; }
.outbound .bubble { background: #e3f0e4; border-color: #d8e9da; border-radius: 13px 2px 13px 13px; }
.bubble .sender { display: block; color: #24654b; font-size: 12px; font-weight: 800; margin-bottom: 3px; }
.bubble p { white-space: pre-wrap; line-height: 1.49; font-size: 14px; }
.bubble time { display: block; margin-top: 4px; color: #596a60; text-align: right; font-size: 11px; }
.whatsapp-text { font-size: 14px; line-height: 1.49; overflow-wrap: anywhere; }
.whatsapp-text ul, .whatsapp-text ol { margin: 4px 0; padding-inline-start: 20px; }
.whatsapp-text blockquote { margin: 4px 0; padding-inline-start: 7px; border-inline-start: 2px solid #78a494; }
.whatsapp-text code { background: #cbded56b; border-radius: 3px; padding-inline: 2px; }
.message-media { display: grid; gap: 5px; }
.message-media + p { margin-top: 6px; }
.message-media-label { color: #234f48; font-size: .8rem; font-weight: 800; }
.message-media .message-media-feedback, .message-image-full .message-media-feedback { color: #546662; font-size: .8rem; }
.message-media audio { display: block; width: min(18rem, 68vw); max-width: 100%; height: 2.5rem; }
.message-transcript { margin-top: 3px; }
.message-transcript summary { width: fit-content; cursor: pointer; color: #235e53; font-size: .8rem; font-weight: 800; }
.message-transcript p { margin-top: 6px; padding-top: 5px; border-top: 1px solid #d8e6e0; }
.message-transcript-action { margin-top: 7px; }
.message-image-preview { position: relative; display: block; width: min(270px, 65vw); max-width: 100%; overflow: hidden; padding: 0; border: 1px solid #d8e6e0; border-radius: 8px; background: #eff5f3; }
.message-image-preview img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; }
.message-image-preview span { position: absolute; right: 6px; bottom: 6px; border-radius: 5px; padding: 3px 6px; background: #193d3bed; color: #fff; font-size: .74rem; font-weight: 800; }
.message-image-preview:hover span { background: #0a4a48; }
.message-image-dialog { width: min(970px, calc(100% - 20px)); max-width: none; max-height: calc(100% - 20px); padding: 14px; border: 1px solid var(--border); border-radius: 13px; color: var(--ink); }
.message-image-dialog::backdrop { background: #102323bf; }
.message-image-heading { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.message-image-heading h2 { font: 800 1rem 'Manrope', system-ui, sans-serif; }
.message-image-full { display: grid; justify-items: center; }
.message-image-full img { display: block; max-width: 100%; max-height: calc(100dvh - 106px); object-fit: contain; border-radius: 7px; }
.message-media [hidden], .message-image-full [hidden] { display: none; }
.composer { padding: 12px 21px 16px; background: #f4f7f3; }
.compose-card { background: #fff; border: 1px solid #d8e3da; border-radius: 12px; padding: 10px 11px; }
.compose-card:focus-within { border-color: #69a587; }
.compose-actions { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.reply-context { display: flex; align-items: baseline; flex-wrap: wrap; justify-content: space-between; gap: 5px 12px; margin-bottom: 7px; }
.reply-identity { display: flex; align-items: center; flex-wrap: wrap; gap: 3px 9px; }
.reply-recipient { color: #48615a; font-size: 12px; overflow-wrap: anywhere; }
.reply-operator-change { font-size: .75rem; }
.reply-sender { display: flex; align-items: center; gap: 5px; color: #48615a; font-size: .76rem; }
.reply-sender select { min-height: 31px; padding: 2px 5px; border: 1px solid #d6e5df; border-radius: 5px; background-color: #fff; color: #24584c; font-size: .78rem; }
.reply-signature-preview { padding: 2px 4px 0; color: #23443c; font-size: .85rem; }
.reply-editor { position: relative; min-height: 58px; max-height: 160px; overflow-y: auto; padding: 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
.reply-editor:focus { outline: none; }
.reply-editor:is(:empty,:has(> p:only-child > br:only-child))::before { position: absolute; inset: 4px 5px auto; content: attr(data-placeholder); color: #60716b; pointer-events: none; }
.reply-editor p { min-height: 1.4em; }
.reply-editor li { padding-inline-start: 1px; }
.reply-formatting { display: flex; align-items: center; flex-wrap: wrap; gap: 3px; padding: 3px 0; border-block: 1px solid #edf2ef; margin-bottom: 5px; }
.reply-format-button { display: inline-flex; align-items: center; justify-content: center; min-width: 33px; min-height: 30px; border-radius: 5px; border: 0; color: #28594e; background: transparent; font-size: .79rem; padding-inline: 5px; }
.reply-format-button:hover { background: #eef6f1; color: #134b3a; }
.reply-format-button[aria-pressed="true"] { background: #dff0e8; color: #134b3a; }
.reply-send-status { color: #855f1c; font-size: .76rem; margin: 2px 0 5px; }
#send-form .compose-actions { justify-content: flex-end; }
#send-form .compose-actions:has(.reply-draft-actions) { justify-content: space-between; flex-wrap: wrap; }
.reply-draft-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.reply-draft-dialog [hidden] { display: none; }
.reply-draft-instruction, .reply-draft-status { margin-bottom: 12px; }
.reply-draft-status { color: #45625c; font-size: .88rem; }
.reply-draft-status.is-error { color: #883b2b; }
.reply-draft-buttons { margin-top: 14px; }
.reply-draft-chat { display: grid; gap: 8px; max-height: min(42vh, 360px); overflow: auto; padding: 4px 5px; margin: 0 0 13px; }
.reply-draft-chat article { max-width: 93%; padding: 9px 11px; border: 1px solid #e2ece7; border-radius: 9px 9px 9px 3px; background: #f5f9f7; }
.reply-draft-chat .reply-draft-operator { justify-self: end; border-radius: 9px 9px 3px 9px; background: #edf5ef; }
.reply-draft-chat strong { display: block; margin-bottom: 3px; color: #315f52; font-size: .77rem; }
.reply-draft-chat p { font-size: .86rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
#select-operator-form .field { max-width: 360px; margin-top: 9px; }

.thread-history { text-align: center; color: var(--muted); font-size: .83rem; margin: 4px 0 12px; }
.message-highlight .bubble { border-color: #0d8280; box-shadow: 0 0 0 2px #bce4e1; }
.thread-tools { width: min(580px, calc(100% - 28px)); max-height: calc(100dvh - 36px); overflow: auto; padding: 18px; border: 1px solid var(--border); border-radius: 14px; color: var(--ink); }
.thread-tools::backdrop { background: #163b4380; }
.thread-tools-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 16px; }
.thread-tools-head h2 { font-size: 1.16rem; }
.ai-card { border: 1px solid #dce8dd; border-radius: 11px; background: #f3f8f2; padding: 13px; margin-bottom: 16px; }
.ai-card h3 { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 800; color: #245440; margin-bottom: 6px; }
.ai-card p { color: #4b6256; font-size: 13px; line-height: 1.52; margin-bottom: 9px; white-space: pre-wrap; overflow-wrap: anywhere; }
.ai-card .asked-question { color: var(--ink); font-weight: 700; }
#ask-form { margin-bottom: 14px; }
.ai-card .icon { width: 16px; height: 16px; }
.text-button { display: inline-flex; align-items: center; gap: 5px; color: #23634b; font-size: 13px; font-weight: 800; border: 0; background: none; padding: 2px 0; }
.text-button:hover { text-decoration: underline; text-underline-offset: 3px; }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; font-size: 12px; color: #43534b; font-weight: 700; }
.field input, .field select, .field textarea { min-width: 0; width: 100%; border: 1px solid var(--border); border-radius: 8px; min-height: 34px; padding: 7px 9px; font-size: 13px; font-weight: 500; color: var(--ink); background: #fff; }
.field textarea { min-height: 68px; resize: vertical; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid transparent; border-radius: 8px; font-size: 13px; font-weight: 700; padding: 8px 11px; min-height: 34px; line-height: 1.12; white-space: nowrap; }
.button .icon { width: 16px; height: 16px; }
.button.primary { color: #fff; background: #1d7255; }
.button.primary:hover:not(:disabled) { background: #155942; }
.button.secondary { color: #285642; background: #fff; border-color: #d6e3d9; }
.button.secondary:hover:not(:disabled), .button.ghost:hover { background: #edf5ef; }
.button.ghost { background: none; color: #436352; }
.button.icon-only { padding: 8px; }
.note { margin-bottom: 9px; padding: 8px 9px; background: #f7f8f5; border-radius: 8px; overflow-wrap: anywhere; }
.note p { font-size: 13px; line-height: 1.45; white-space: pre-wrap; }
.note time { color: var(--muted); font-size: 11px; }
.note-author { font-size: 12px; font-weight: 800; color: #43564b; }
.sources { margin: 8px 0 0; padding-left: 16px; color: var(--muted); font-size: 12px; }
.sources li { margin: 4px 0; }
.empty { height: 100%; min-height: 60px; display: grid; place-content: center; padding: 15px; text-align: center; color: var(--muted); line-height: 1.5; font-size: 14px; }
.hint { color: var(--muted); font-size: 12px; line-height: 1.5; }
.notice { color: #775626; background: #fff8e9; border: 1px solid #eee2c7; border-radius: 8px; padding: 8px 10px; font-size: 13px; }
.toast { position: fixed; z-index: 5; bottom: 15px; right: 15px; max-width: min(420px, calc(100vw - 30px)); background: var(--dark); color: white; border-radius: 10px; padding: 11px 14px; box-shadow: 0 6px 26px #183d3329; }
.toast[data-error="true"] { background: #86372b; }
.mobile-only { display: none; }

@media (min-width: 1500px) { .workspace { grid-template-columns: 350px minmax(0, 1fr) clamp(390px, 27vw, 440px); } }
@media (max-width: 1140px) {
  .workspace { grid-template-columns: minmax(228px, 290px) minmax(0, 1fr); }
  .summary-pane { display: none; position: absolute; z-index: 2; inset: 0 0 0 auto; width: min(420px, 100%); box-shadow: -8px 0 26px #1239431a; }
  .workspace[data-summary-open="true"] .summary-pane { display: grid; }
  .button.summary-toggle { display: inline-flex; }
}
@media (max-width: 1020px) {
  .shell { grid-template-columns: 57px minmax(0, 1fr); }
  .rail-action.active::before { left: -7px; }
  .workspace { grid-template-columns: minmax(228px, 280px) minmax(0, 1fr); }
  .topbar { padding-left: 18px; padding-right: 18px; }
  .thread-scroll { padding-left: 14px; padding-right: 14px; }
}
@media (max-width: 590px) {
  .shell { display: flex; height: 100dvh; min-height: 380px; }
  .rail { display: none; }
  .main { width: 100%; }
  .topbar { min-height: 65px; padding: 11px 13px; }
  .topbar h1 { font-size: 22px; margin-bottom: 2px; }
  .topbar p { font-size: 11px; }
  .top-actions { gap: 7px; }
  .top-date, .profile span:last-child { display: none; }
  .connection { font-size: 10px; padding: 5px 7px; }
  .workspace { display: block; min-height: 0; }
  .inbox, .thread { height: 100%; }
  .inbox { border: 0; }
  .workspace[data-view="inbox"] .thread, .workspace[data-view="thread"] .inbox { display: none; }
  .workspace[data-view="thread"] .thread { display: grid; }
  .thread-head { min-height: 58px; padding: 7px 11px; }
  .thread-title { gap: 7px; }
  .thread-head { flex-wrap: wrap; }
  .thread-title { flex: 1 1 135px; }
  .thread-actions { justify-content: end; flex: 0 1 auto; margin-left: auto; }
  .thread-head [data-action="back-inbox"] { display: inline-flex; }
  .composer { padding: 8px 10px 12px; }
  .inbox-top { padding-top: 15px; }
  .topbar .mobile-only { display: inline-flex; }
}
