/* Three connected panes, using the portal's typography and company header. */
.chat-workspace { display: grid; grid-template-columns: 218px minmax(270px, 30%) minmax(0, 1fr); height: max(600px, calc(100dvh - var(--topbar-height, 80px) - 80px)); max-height: 1000px; min-width: 0; border: 1px solid #dce5ef; border-radius: 14px; overflow: hidden; background: #fff; color: #172744; }
.chat-workspace * { box-sizing: border-box; }
.chat-workspace { grid-template-rows: minmax(0,1fr); }
.chat-folders { background: #f2f8fd; padding: 24px 14px; overflow-y: auto; }
.chat-folders h2 { font-size: 23px; line-height: 1.2; margin: 0 6px 26px; }
.chat-folders h4 { font-size: 13px; font-weight: 600; margin: 20px 6px 10px; }
.chat-folders h4:not(:first-of-type) { padding-top: 20px; border-top: 1px solid #dce5ef; }
.chat-nav-button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px; padding: 8px; margin: 3px 0; background: transparent; border: 0; border-radius: 8px; text-align: left; color: #233656; font: inherit; font-size: 14px; cursor: pointer; }
.chat-nav-button:hover { background: #e6effb; }
.chat-nav-button[aria-pressed=true] { background: #dbeaff; color: #123a74; font-weight: 600; }
.chat-count { margin-left: auto; min-width: 25px; padding: 2px 7px; border-radius: 20px; background: #e4eefb; font-size: 12px; text-align: center; }
.chat-count--unread, .chat-nav-button[aria-pressed=true] .chat-count { background: #2563eb; color: #fff; }
.chat-conversations { min-width: 0; min-height: 0; display: flex; flex-direction: column; border-left: 1px solid #dce5ef; border-right: 1px solid #dce5ef; }
.chat-list-header { padding: 20px 18px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 18px 8px; border-bottom: 1px solid #e3eaf2; }
.chat-list-header input { width: 100%; min-width: 0; padding: 12px 14px; border: 1px solid #d7e1ef; border-radius: 9px; font: inherit; font-size: 14px; background: #f6f8fc; color: #243752; }
.chat-list-header h3 { font-size: 20px; margin: 0; }
.chat-list-header > span { margin-left: auto; color: #596b84; font-size: 13px; }
.chat-list { overflow-y: auto; flex: 1; min-height: 0; }
.chat-list-empty { padding: 24px; line-height: 1.6; color: #596b84; }
.chat-row { display: flex; position: relative; gap: 12px; width: 100%; min-height: 110px; padding: 16px; border: 0; border-bottom: 1px solid #e3eaf2; border-radius: 0; background: white; color: #172744; text-align: left; font: inherit; cursor: pointer; }
.chat-row:hover { background: #f3f7fc; }
.chat-row[aria-current=true] { background: #e8f1ff; box-shadow: inset 3px 0 #2563eb; }
.chat-avatar { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; flex: 0 0 48px; background: #c9e2ff; color: #143756; border-radius: 50%; font-size: 18px; font-weight: 700; }
.chat-row:nth-child(3n+2) .chat-avatar { background: #c0eadf; }
.chat-row:nth-child(3n) .chat-avatar { background: #dfd5fb; }
.chat-row-copy { display: grid; gap: 5px; min-width: 0; flex: 1; }
.chat-row-labels { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.chat-row-priority, .chat-row-status { display: inline-block; width: fit-content; max-width: 100%; padding: 4px 8px; border-radius: 6px; font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
.chat-row-priority { font-weight: 700; letter-spacing: .02em; }
.chat-row-priority--urgente { color: #a11520; background: #ffe3e6; }
.chat-row-priority--alta { color: #795000; background: #fff0c2; }
.chat-row-priority--normal { color: #536174; background: #f0f3f7; font-weight: 500; }
.chat-row-status { color: #334b68; background: #edf2f8; }
.chat-row-status--overdue { color: #a11520; background: #fff0f1; font-weight: 600; }
.chat-row-title { display: flex; gap: 8px; align-items: baseline; }
.chat-row-title strong { font-size: 16px; line-height: 1.3; overflow-wrap: anywhere; flex: 1; }
.chat-row-title time { flex-shrink: 0; font-size: 11px; font-weight: 400; color: #61738e; }
.chat-snippet { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 15px; line-height: 1.45; color: #556985; overflow-wrap: anywhere; }
.chat-row-copy small { color: #62738a; font-size: 11px; }
.chat-row > .chat-count { position: absolute; right: 14px; bottom: 12px; }
.chat-row:has(.chat-count) .chat-row-copy small { padding-right: 30px; }
.mensajeria-chat { min-width: 0; min-height: 0; background: #f5f9fc; overflow: hidden; }
.chat-empty { display: flex; align-items: center; justify-content: center; flex-direction: column; padding: 36px; text-align: center; }
.chat-empty h3 { font-size: 24px; margin: 0 0 12px; }
.chat-empty p { color: #62738a; max-width: 300px; line-height: 1.6; }
.chat-detail { height: 100%; min-width: 0; display: flex; flex-direction: column; }
.chat-detail-header { display: grid; grid-template-columns: 48px minmax(0,1fr) auto; align-items: center; gap: 16px; padding: 20px 24px; border-bottom: 1px solid #dce5ef; background: #f8fbfe; flex-shrink: 0; }
.chat-identity h3:focus { outline: none; }
.chat-identity { min-width: 0; flex: 1; }
.chat-identity h3 { font-size: 19px; line-height: 1.3; margin: 0 0 8px; overflow-wrap: anywhere; outline: none; }
.chat-identity p { font-size: 13px; margin: 4px 0 0; color: #596b84; }
.chat-header-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; max-width: 180px; }
.chat-header-actions button { background: #2563eb; color: #fff; border-radius: 8px; padding: 10px 16px; min-height: 42px; border: 0; cursor: pointer; }
.chat-state { font-size: 12px; background: #e2f5db; padding: 5px 10px; border-radius: 7px; }
.chat-tools { padding: 10px 24px; border-bottom: 1px solid #dce5ef; font-size: 13px; background: #f8fbfe; flex: 0 0 auto; }
.chat-tools[open] { max-height: 45%; overflow-y: auto; }
.chat-tools summary, .chat-attachments summary { cursor: pointer; min-height: 28px; padding: 4px 0; }
.chat-tools details { margin: 12px 0; }
.chat-detail .mensajeria-timeline { flex: 1; min-height: 100px; max-height: none; border-radius: 0; display: flex; flex-direction: column; gap: 22px; padding: 26px 24px; background: #f5f9fc; overflow-y: auto; }
.chat-detail .mensajeria-bubble { flex-shrink: 0; max-width: min(85%, 420px); align-self: flex-start; border: 1px solid #e5eaf0; border-radius: 12px 12px 12px 2px; box-shadow: 0 2px 6px #263e5710; padding: 14px 16px; font-size: 15px; line-height: 1.5; }
.chat-detail .mensajeria-bubble--own { align-self: flex-end; background: #e0f7d5; border-color: #d8efcb; border-radius: 12px 12px 2px 12px; }
.chat-detail .mensajeria-bubble strong { font-size: 12px; color: #3b536d; }
.chat-detail .mensajeria-bubble small { font-size: 12px; color: #63728b; text-align: right; }
.chat-detail .mensajeria-bubble--own strong { display: none; }
.chat-detail .mensajeria-bubble p { margin: 7px 0 0; }
.chat-composer { padding: 14px 20px; border-top: 1px solid #dce5ef; background: #f8fbfe; max-height: 45%; overflow-y: auto; flex-shrink: 0; }
.chat-reply { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px 12px; max-width: none; padding: 0; }
.chat-reply .mensajeria-field { font-size: 0; font-weight: 400; gap: 0; }
.chat-reply .mensajeria-field textarea { min-height: 52px; height: 56px; max-height: 140px; font-size: 15px; font-weight: 400; }
.chat-reply > button { align-self: end; min-height: 52px; border: 0; border-radius: 9px; padding: 10px 16px; background: #2563eb; color: white; cursor: pointer; }
.chat-reply > p { grid-column: 1 / -1; margin: 0; font-size: 13px; }
.chat-reply > p:empty { display: none; }
.chat-attachments { font-size: 12px; color: #526880; margin-top: 6px; }
.chat-utility { padding: 24px; height: 100%; overflow: auto; }
.chat-back { display: none; }
.chat-workspace button:focus-visible, .chat-workspace input:focus-visible, .chat-workspace summary:focus-visible { outline: 3px solid #3978df; outline-offset: -3px; }
.chat-workspace .mensajeria-form input, .chat-workspace .mensajeria-form select { min-width: 0; }
@media(max-width:1200px) {
  .chat-workspace { grid-template-columns: 155px minmax(240px, 32%) minmax(0,1fr); }
  .chat-folders { padding: 20px 8px; }
  .chat-detail-header { padding: 16px; grid-template-columns: 38px minmax(0,1fr); }
  .chat-header-actions { max-width: none; grid-column: 1 / -1; justify-self: end; }
  .chat-row { padding: 18px 12px; gap: 8px; }
  .chat-avatar { width: 38px; height: 38px; flex-basis: 38px; font-size: 15px; }
  .chat-row-title { flex-wrap: wrap; }
}
@media(max-width:1000px) and (min-width:761px) {
  .chat-workspace { grid-template-columns: minmax(245px, 36%) minmax(0,1fr); grid-template-rows: auto minmax(0,1fr); }
  .chat-folders { grid-column: 1 / -1; display: flex; overflow-x: auto; padding: 8px; gap: 6px; }
  .chat-folders h2, .chat-folders h4 { display: none; }
  .chat-folders .chat-nav-button { width: auto; white-space: nowrap; flex-shrink: 0; }
}
@media(max-width:760px) {
  .chat-workspace { display: flex; flex-direction: column; height: max(540px, calc(100dvh - var(--topbar-height,132px) - 32px)); border-radius: 10px; }
  .chat-folders { display: flex; overflow-x: auto; padding: 8px; gap: 6px; flex-shrink: 0; }
  .chat-folders h2, .chat-folders h4 { display: none; }
  .chat-folders .chat-nav-button { width: auto; white-space: nowrap; flex-shrink: 0; min-height: 44px; }
  .chat-conversations { flex: 1; min-height: 0; border: 0; }
  .mensajeria-chat { display: none; }
  .chat-workspace--detail .chat-folders, .chat-workspace--detail .chat-conversations { display: none; }
  .chat-workspace--detail .mensajeria-chat { display: block; height: 100%; }
  .chat-back { display: block; grid-column: 1 / -1; width: 100%; min-height: 44px; text-align: left; border: 0; background: transparent; color: #245bb3; }
  .chat-detail-header { gap: 8px; padding: 8px 14px 12px; }
  .chat-identity h3 { font-size: 17px; }
  .chat-header-actions { gap: 5px; }
  .chat-detail .mensajeria-timeline { padding: 18px 12px; gap: 16px; }
  .chat-detail .mensajeria-bubble { max-width: 92%; font-size: 14px; }
  .chat-composer { padding: 10px 12px; }
  .chat-reply { gap: 8px; }
  .chat-reply > button { padding: 8px 10px; max-width: 95px; }
  .chat-tools { padding: 6px 14px; }
}

/* Global message window: the working view stays mounted and visible beneath it. */
.message-modal { width:min(780px,calc(100vw - 32px)); max-height:calc(100dvh - 32px); padding:0; border:1px solid #dce5ef; border-radius:14px; color:#172744; background:#fff; box-shadow:0 20px 70px #17274440; }
.message-modal::backdrop { background:#17274466; }
.message-modal[open] { display:flex; flex-direction:column; }
.message-modal-header { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; padding:24px 28px 12px; flex-shrink:0; }
.message-modal-header h2 { margin:0; font-size:25px; line-height:1.25; }
.message-modal-header p { margin:8px 0 0; color:#596b84; font-size:14px; }
.message-modal-close { border:0; background:transparent; padding:8px; color:#172744; cursor:pointer; }
.message-modal-body { overflow-y:auto; padding:0 28px 20px; }
.message-modal-form { display:grid; gap:16px; font-size:14px; }
.message-modal-form .mensajeria-field { display:grid; gap:8px; margin:0; font-size:13px; font-weight:600; }
.message-modal-form input,.message-modal-form select,.message-modal-form textarea { width:100%; box-sizing:border-box; min-height:44px; padding:10px 12px; border:1px solid #cbd8e9; border-radius:7px; background:#fff; color:#172744; font:inherit; font-weight:400; }
.message-modal-form textarea { min-height:110px; resize:vertical; }
.message-modal-form input:focus-visible,.message-modal-form select:focus-visible,.message-modal-form textarea:focus-visible,.message-modal button:focus-visible { outline:2px solid #2563eb; outline-offset:2px; }
.message-sender { margin:0; padding-bottom:12px; border-bottom:1px solid #e3eaf2; font-size:13px; }
.message-modal-top { display:grid; grid-template-columns:1fr 1fr; gap:24px; }
.message-priority { border:0; padding:0; margin:0; display:flex; gap:6px; min-width:0; }
.message-priority legend { font-size:13px; font-weight:600; margin-bottom:8px; }
.message-priority label { flex:1; cursor:pointer; }
.message-priority input { position:absolute; opacity:0; width:1px; min-height:0; }
.message-priority span { display:flex; min-height:44px; box-sizing:border-box; align-items:center; justify-content:center; background:#f0f3f8; border:1px solid transparent; border-radius:7px; }
.message-priority input:checked+span { background:#e3edfc; border-color:#123a74; color:#123a74; font-weight:600; }
.message-priority-urgente input:checked+span { background:#ffeded; border-color:#dc2626; color:#b91c1c; }
.message-priority input:focus-visible+span { outline:2px solid #2563eb; outline-offset:2px; }
.message-people-selected { display:flex; flex-wrap:wrap; gap:8px; margin-top:8px; }
.message-people-selected:empty { display:none; }
.message-people-owner .message-people-selected { margin-top:8px; }
.message-people-owner .message-people-selected button { width:100%; min-height:44px; text-align:left; border:1px solid #cbd8e9; background:white; }
.message-people-selected button { border:0; background:#e3edfc; color:#123a74; padding:8px 12px; border-radius:7px; cursor:pointer; }
.message-people-results { max-height:170px; overflow:auto; border:1px solid #dce5ef; margin-top:6px; border-radius:7px; }
.message-people-results button { display:block; width:100%; border:0; border-bottom:1px solid #e3eaf2; border-radius:0; padding:10px 12px; background:white; text-align:left; cursor:pointer; }
.message-people-results button:hover { background:#e8f1ff; }
.message-people-feedback { margin:5px 0 0; font-size:12px; color:#596b84; }
.message-people-feedback:empty { display:none; }
.message-departments { font-size:13px; border-radius:7px; background:#f3f6fa; padding:12px; }
.message-departments summary { cursor:pointer; }
.message-departments p { line-height:1.5; }
.message-modal-footer { display:flex; gap:12px; align-items:center; padding-top:16px; border-top:1px solid #e3eaf2; position:sticky; bottom:-20px; background:#fff; padding-bottom:12px; }
.message-modal-footer small { flex:1; color:#596b84; font-size:11px; text-align:center; }
.message-modal-footer button { min-height:44px; white-space:nowrap; }
.message-modal-footer .btn-primary { background:#123a74; color:white; }
.message-draft-choice { padding:16px 28px; border-top:1px solid #dce5ef; background:#f3f6fa; }
.message-draft-choice button { margin:4px; }
@media(max-width:600px) { .message-modal { width:calc(100vw - 16px); max-height:calc(100dvh - 16px); } .message-modal-header { padding:18px 18px 12px; } .message-modal-body { padding:0 18px 16px; } .message-modal-top { grid-template-columns:1fr; gap:16px; } .message-modal-footer small { display:none; } .message-modal-footer { justify-content:space-between; } }

.chat-attention-reason{display:block;font-weight:600;color:#06346b;margin-top:4px}
.nv-host{display:flex;flex-direction:column;gap:6px}

.mensajeria-team-editor[hidden]{display:none}
.mensajeria-team-list{display:grid;gap:12px}
.mensajeria-team-list h4{margin:8px 0;font-size:1.05rem}
.mensajeria-team-list ul{padding-left:20px;margin:10px 0}
.mensajeria-team-list li{margin:6px 0;overflow-wrap:anywhere}

/* All routine notices share one bounded column instead of fixed coordinates. */
.soec-notification-stack{position:fixed;right:16px;bottom:16px;z-index:1100;display:flex;flex-direction:column;gap:8px;width:min(420px,calc(100vw - 32px));max-height:calc(100dvh - 100px);overflow:auto;overscroll-behavior:contain;pointer-events:none;padding:4px;box-sizing:border-box}
.soec-notification-item{display:flex;flex-direction:column;gap:2px;flex-shrink:0;pointer-events:none}
.soec-notification-item > button,.soec-notification-item > .soec-notification-content{pointer-events:auto}
.soec-notification-item:has(> .soec-notification-content[hidden]){display:none}
.soec-notification-stack .soec-notification-content{position:static;float:none;inset:auto;width:100%;max-width:none;box-sizing:border-box;white-space:normal;overflow-wrap:anywhere;text-align:left;margin:0}
.soec-notification-stack .soec-notification-content[hidden],.soec-notification-item[data-minimized=true] > .soec-notification-content{display:none}
.soec-notification-toggle{align-self:flex-end;border:1px solid #b3c9e3;border-radius:8px;background:#fff;color:#163e71;padding:4px 10px;min-height:28px;cursor:pointer;font:inherit;font-size:12px}
.soec-notification-toggle:focus-visible{outline:3px solid #3679d2;outline-offset:2px}
@media(max-width:600px){.soec-notification-stack{right:8px;bottom:8px;width:calc(100vw - 16px);max-height:45dvh}.soec-notification-toggle{min-height:36px}}

/* Sender and current owner stay visible in every inbox and conversation. */
.chat-parties { display: grid; gap: 5px; min-width: 0; margin: 3px 0; }
.chat-party { display: flex; align-items: baseline; gap: 7px; font-size: 14px; line-height: 1.45; color: #243752; min-width: 0; }
.chat-party > strong { flex: 0 0 38px; color: #143756; }
.chat-party > span { min-width: 0; overflow-wrap: anywhere; }
.chat-party-department { font-size: 13px; line-height: 1.45; color: #405674; overflow-wrap: anywhere; }
.chat-identity .chat-party { font-size: 15px; }

/* Explicit preview dimensions prevent intrinsic shrink-to-fit image sizing. */
.message-image-preview { display: block; width: min(360px, 100%); max-width: 100%; height: 220px; padding: 4px; margin-top: 8px; border: 1px solid #cbd8e6; border-radius: 8px; background: #eef3f7; cursor: zoom-in; box-sizing: border-box; }
.mensajeria-bubble .message-image-preview img { display: block; width: 100%; height: 100%; max-width: 100%; max-height: none; object-fit: contain; }
.message-image-preview:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }
.message-image-viewer { width: min(1200px, 96vw); max-width: 96vw; height: 90dvh; max-height: 94dvh; box-sizing: border-box; padding: 16px; border: 0; border-radius: 12px; color: #172744; background: white; }
.message-image-viewer::backdrop { background: rgb(12 27 48 / 80%); }
.message-image-viewer[open] { display: flex; flex-direction: column; gap: 12px; }
.message-image-toolbar { display: flex; align-items: center; gap: 16px; flex-shrink: 0; flex-wrap: wrap; }
.message-image-toolbar strong { flex: 1; overflow-wrap: anywhere; min-width: 0; }
.message-image-toolbar button, .message-image-toolbar a { min-height: 44px; padding: 10px 16px; box-sizing: border-box; }
.message-image-stage { flex: 1; min-height: 0; overflow: auto; display: flex; align-items: center; justify-content: center; background: #eef3f7; }
.message-image-stage img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
@media(max-width:600px) { .message-image-preview { height: 180px; } .message-image-viewer { padding: 10px; } }

.message-image-stage.is-original { display: block; }
.message-image-stage.is-original img { max-width: none; max-height: none; width: auto; height: auto; }
/* Approved messaging composition: navy title, identity strip, 60/40 conversation and action. */
.message-attention-dialog { width:min(1230px,96vw); max-width:96vw; height:min(920px,94dvh); max-height:94dvh; padding:0; overflow:hidden; border:1px solid #bbd1e9; border-radius:18px; font-family:'Segoe UI',Arial,sans-serif; box-shadow:0 22px 65px #10233b55; }
.message-attention-dialog::backdrop { background:#13233ac4; }
.message-attention-dialog > h2 { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.message-attention-dialog > .mensajeria-toolbar:has(button) { margin:0; padding:8px; }
.message-attention-dialog > .mensajeria-toolbar[hidden] { display:none; }
.message-attention-dialog > p:empty { display:none; }
.message-attention-dialog > p { position:absolute; bottom:0; left:16px; font-size:10px; }
.message-attention-dialog > .chat-detail { height:100%; }
.message-redesign { display:flex; flex-direction:column; min-height:0; overflow:hidden; background:white; color:#102d50; font-family:'Segoe UI',Arial,sans-serif; }
.message-titlebar { display:flex; align-items:center; gap:22px; padding:14px 32px; min-height:62px; box-sizing:border-box; flex-shrink:0; color:white; background:#0a345e; }
.message-titlebar h3 { margin:0; font-size:28px; font-weight:750; line-height:1.2; overflow-wrap:anywhere; }
.message-priority { padding:6px 16px; font-size:19px; font-weight:700; border-radius:7px; background:#e6edf4; color:#17365b; }
.message-priority--urgente { background:#dc1537; color:white; }
.message-priority--alta { background:#fff0bd; color:#734e00; }
.message-company { margin-left:auto; font-size:21px; white-space:nowrap; }
.message-close { width:40px; height:38px; border:0; border-left:1px solid #9ab3cf; background:transparent; color:white; font-size:0; cursor:pointer; }
.message-close svg { width:24px; height:24px; }
.message-close:disabled { opacity:.45;cursor:default; }
.message-people { display:flex; gap:36px; flex-wrap:wrap; padding:10px 42px; border-bottom:1px solid #d4e1ef; background:#edf4fc; flex-shrink:0; }
.message-person { display:flex; align-items:center; gap:12px; color:#0c203a; font-size:18px; }
.message-person strong { font-weight:750; }
.message-person svg { padding:5px; border-radius:50%; background:#d6e8fa; }
.message-columns { flex:1; min-height:0; display:grid; grid-template-columns:60% 40%; }
.message-conversation { display:flex; flex-direction:column; min-width:0; min-height:0; border-right:1px solid #c8d9ed; }
.message-redesign .mensajeria-timeline { flex:1; min-height:140px; overflow:auto; background:white; padding:32px 42px; gap:20px; }
.message-redesign .mensajeria-bubble { padding:0; box-shadow:none; border:0; background:none; max-width:100%; width:100%; border-radius:0; font-size:18px; }
.message-redesign .mensajeria-bubble strong { display:block; font-size:18px; font-weight:700; color:#101b2d; }
.message-redesign .mensajeria-bubble > p { padding:14px 18px 4px; margin:7px 0 0; background:#edf1f6; color:#101b2d; border-radius:12px 12px 0 0; line-height:1.5; }
.message-redesign .mensajeria-bubble small { margin:0; padding:0 18px 10px; background:#edf1f6; border-radius:0 0 12px 12px; font-size:14px; }
.message-redesign .mensajeria-bubble--own { width:85%; margin-left:auto; }
.message-redesign .mensajeria-bubble--own strong { text-align:right; }
.message-redesign .mensajeria-bubble--own > p,.message-redesign .mensajeria-bubble--own small { background:#e0f3da; }
.message-redesign .chat-composer { padding:12px 22px; background:white; border:0; max-height:35%; }
.message-redesign .chat-reply { display:flex; border:1px solid #cad7e5; padding:6px; border-radius:9px; gap:10px; align-items:center; }
.message-redesign .chat-reply label { flex:1; min-width:0; }
.message-redesign .chat-reply textarea { min-height:40px; height:40px; padding:6px 12px; border:1px solid #a4b5ca; }
.message-redesign .chat-reply > button { font-size:0; width:48px; min-height:40px; height:40px; padding:8px; background:#0b3e72; }
.message-redesign .chat-reply > button svg { width:24px;height:24px; }
.message-redesign .chat-reply > p:empty { display:none; }
.message-actionbar { display:flex; flex-wrap:wrap; gap:10px; padding:12px 18px 24px; flex-shrink:0; align-items:center; }
.message-action-button { display:flex; align-items:center; justify-content:center; gap:8px; padding:11px 14px; border:1px solid #06346b; border-radius:7px; color:#06346b; background:white; font-size:15px; font-weight:650; cursor:pointer; }
.message-action-button[aria-pressed=true] { background:#0a345e;color:white; }
.message-more { position:relative; font-size:14px; color:#064499; }
.message-more summary { cursor:pointer; padding:8px; }
.message-more-menu { position:absolute; bottom:100%; left:0; width:250px; max-height:380px; overflow:auto; background:white; padding:10px; border:1px solid #c4d5e8; border-radius:8px; box-shadow:0 5px 20px #19385b25; z-index:5; }
.message-more-menu button { width:100%; margin:3px 0; text-align:left; }
.message-action-panel { padding:0 16px 24px 26px; min-width:0; overflow:auto; }
.message-redesign .message-action-form { display:flex; flex-direction:column; gap:10px; padding:0; max-width:none; height:100%; }
.message-action-form h4 { background:#e1edfc; border-radius:7px; font-size:23px; font-weight:750; margin:0 -9px 0 -16px; padding:8px 16px; color:#0a345e; }
.message-action-form .mensajeria-field { font-size:16px; font-weight:650; gap:2px; color:#101b2d; }
.message-action-form textarea { height:56px; min-height:56px; padding:7px 10px; font:16px 'Segoe UI',Arial,sans-serif; font-weight:400; line-height:1.3; border:1px solid #a4b5ca; border-radius:6px; }
.message-action-form > .btn-primary { background:#0a345e; color:white; font-size:19px; font-weight:700; border:0; border-radius:6px; min-height:46px; margin-top:auto; }
.message-action-form .mensajeria-feedback:empty { display:none; }
.message-footer { margin:0 24px; padding:12px 0; border-top:1px solid #c4d5e8; text-align:center; font-size:14px; color:#526983; flex-shrink:0; }
.schedule-picker { display:grid; gap:12px; }
.schedule-picker > strong { color:#101b2d; font-size:16px; }
.schedule-shortcuts { display:flex; gap:12px; }
.schedule-shortcuts button { flex:1; border:1px solid #9aadc6; border-radius:14px; background:white; color:#101b2d; font:600 15px 'Segoe UI',Arial,sans-serif; min-height:36px; cursor:pointer; padding:4px 8px; }
.schedule-shortcuts button[aria-pressed=true] { background:#0a345e; color:white;border-color:#0a345e; }
.schedule-fields { display:grid; grid-template-columns:1.2fr .8fr; gap:20px; }
.schedule-fields label { display:flex; flex-direction:column; gap:4px; color:#101b2d; font-weight:700; font-size:16px; }
.schedule-fields input { width:100%; box-sizing:border-box; height:40px; border:1px solid #9aadc6; border-radius:5px; padding:6px 12px; font:18px 'Segoe UI',Arial,sans-serif; background:white; color:#101b2d; }
.schedule-fields small { font-size:12px; font-weight:400; text-align:center; }
.schedule-calendar { border:1px solid #c9d6e6; border-radius:7px; overflow:hidden; margin-top:2px; }
.schedule-month { display:flex; align-items:center; justify-content:space-between; background:#e8f0fb; min-height:44px; font-size:20px; color:#101b2d; }
.schedule-month button { border:0; background:transparent; min-width:44px; height:44px; color:#0a345e; cursor:pointer; }
.schedule-days { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); }
.schedule-days > * { min-height:30px; padding:4px; box-sizing:border-box; display:flex; align-items:center; justify-content:center; font:16px 'Segoe UI',Arial,sans-serif; border:0; border-right:1px solid #e1e7f0; border-bottom:1px solid #e1e7f0; background:white; color:#101b2d; }
.schedule-days button { cursor:pointer; }
.schedule-days button:hover { background:#edf4fc; }
.schedule-days button[aria-pressed=true] { background:#0d4780; color:white; border-radius:5px; font-weight:700; }
.schedule-days .schedule-weekday { background:#f6f8fb;color:#405674; }
.schedule-summary { display:flex; flex-direction:column; gap:4px; background:#e5eefb; padding:12px 16px; border-radius:7px; color:#0d203a; }
.schedule-summary strong { font-size:17px; }
.schedule-summary small { font-size:14px; color:#3e5673; }
@media(max-height:850px) and (min-width:1001px) { .message-titlebar { min-height:52px;padding-top:8px;padding-bottom:8px; } .message-redesign .mensajeria-timeline { padding:22px; } .message-action-panel { padding-bottom:10px; } .message-action-form h4 { font-size:20px; } .schedule-picker {gap:7px;} .schedule-calendar { margin-top:0; } .schedule-days > * { min-height:25px;font-size:14px; } .message-footer {padding:8px;} }
@media(max-width:1000px) { .message-columns { grid-template-columns:1fr;overflow:auto;display:block; } .message-conversation {border-right:0;min-height:360px;} .message-action-panel {border-top:1px solid #c8d9ed;padding:16px;} .message-action-form {min-height:600px;} .message-titlebar {gap:10px;padding:12px 16px;} .message-titlebar h3 {font-size:20px;} .message-company {font-size:15px;} .message-priority {font-size:13px;padding:5px 8px;} .message-people {gap:12px;padding:10px 16px;} .message-person {font-size:15px;} .message-redesign .mensajeria-timeline {max-height:380px;padding:20px;}.message-actionbar {padding:10px;gap:8px;} .message-action-button {font-size:13px;padding:10px;} .message-footer {font-size:12px;margin:0 12px;} }
.message-titlebar h3 { font-size:30px; }
.message-redesign .mensajeria-timeline { padding:48px 38px 24px 88px; outline:none; }
.message-redesign .mensajeria-timeline:focus { outline:none; }
.message-redesign .mensajeria-bubble { position:relative; }
.message-initials { position:absolute; top:0; left:-54px; display:flex; align-items:center; justify-content:center; width:42px; height:42px; border-radius:50%; font-size:18px; font-weight:700; color:#173d6b; background:#d0e4fb; }
.message-redesign .mensajeria-bubble--own { margin-right:48px; width:90%; margin-top:22px; }
.message-redesign .mensajeria-bubble--own .message-initials { left:auto; right:-54px; }
.message-redesign .mensajeria-bubble > p {font-size:19px;}
.message-has-attachment > .message-initials,.message-has-attachment > strong {display:none!important;}
.message-attachment-card { display:grid; grid-template-columns:42% 58%; padding:14px 12px; margin-top:0; border:1px solid #cfdbed; border-radius:10px; background:#f5f7fb; gap:10px; box-sizing:border-box; }
.message-attachment-meta {display:grid;align-content:start;grid-template-columns:32px minmax(0,1fr);gap:8px 10px;}
.message-attachment-meta svg {grid-row:1/3;color:#0c477b;}
.message-redesign .message-attachment-meta strong {font-size:15px;line-height:1.3;}
.message-redesign .message-attachment-meta small {background:none;padding:0;text-align:left;font-size:13px;}
.message-attachment-meta button {grid-column:2;border:0;background:none;text-decoration:underline;padding:6px 0;text-align:left;color:#064499;font-size:14px;cursor:pointer;}
.message-redesign .message-attachment-card .message-image-preview {height:130px;max-width:100%;width:100%;padding:0;margin:0;background:white;box-shadow:0 3px 8px #19385b12;}
.message-redesign .message-has-attachment > small {background:none;padding:3px 12px 0;}
.message-redesign .mensajeria-bubble--own strong {display:block;}
@media(max-width:1000px){.message-redesign .mensajeria-timeline{padding:24px 20px 20px 64px}.message-titlebar h3{font-size:20px}.message-redesign .mensajeria-bubble--own{margin-right:36px;width:85%}.message-attachment-card{grid-template-columns:1fr}.message-attachment-meta{grid-template-columns:30px 1fr}.message-redesign .message-attachment-card .message-image-preview{height:150px}.message-initials{left:-46px;width:34px;height:34px}.message-redesign .mensajeria-bubble--own .message-initials{right:-42px}.message-redesign .mensajeria-bubble>p{font-size:16px}}
.message-action-form h4 { line-height:28px;padding-top:7px;padding-bottom:7px; }
.schedule-picker { gap:10px; }
.schedule-picker > strong { font-size:17px; }
.schedule-days > * { min-height:32px; }
.message-redesign button:focus-visible { outline:3px solid #5a94d8;outline-offset:2px; }
@media(max-height:850px) and (min-width:1001px){.schedule-days>*{min-height:25px}.schedule-picker{gap:7px}}
.message-action-form h4 {display:flex;align-items:center;gap:12px;}
.schedule-date {position:relative;}
.schedule-date > svg {position:absolute;right:10px;top:33px;pointer-events:none;color:#173d6b;}
.schedule-summary {position:relative;padding-left:56px;}
.schedule-summary > svg {position:absolute;left:18px;top:18px;}
.message-redesign .chat-reply > .message-attach-toggle {background:transparent;color:#173d6b;width:30px;padding:2px;align-self:center;}
.message-redesign .chat-attachments:not([open]) {display:none;}
.message-redesign .message-action-button {font-size:16px;}
@media(max-width:1000px){
 .message-conversation {display:block;}
 .message-redesign .mensajeria-timeline {max-height:none;overflow:visible;flex:none;}
 .message-redesign .chat-composer {max-height:none;overflow:visible;}
 .message-redesign .chat-reply {flex-wrap:wrap;}
 .message-redesign .chat-reply>p:not(:empty){width:100%;font-size:13px;}
 .message-action-form {height:auto!important;min-height:0;}
 .message-action-form > .btn-primary{margin-top:14px;}
}
@media(max-width:600px){
 .message-titlebar {display:grid;grid-template-columns:minmax(0,1fr) auto 28px;gap:8px;}
 .message-titlebar h3 {font-size:18px;}
 .message-company {grid-column:1/3;margin:0;font-size:13px;}
 .message-close {grid-column:3;grid-row:1/3;width:28px;padding:0;}
 .message-priority {font-size:12px;padding:5px 7px;}
 .schedule-fields {gap:12px;}
}
.message-columns {grid-template-columns:60.6% 39.4%;}
.message-person > span {font-weight:700;}
.message-redesign {container-type:inline-size;}
@container(max-width:850px){
 .message-columns {display:block;overflow:auto;}
 .message-conversation {display:block;border-right:0;}
 .message-redesign .mensajeria-timeline {max-height:none;overflow:visible;flex:none;padding:20px 18px 20px 64px;}
 .message-action-panel {border-top:1px solid #c8d9ed;padding:16px;}
 .message-redesign .message-action-form {height:auto;}
 .message-titlebar {padding:12px;gap:10px;flex-wrap:wrap;}
 .message-titlebar h3 {font-size:20px;}
 .message-priority {font-size:13px;}
 .message-company {font-size:15px;}
 .message-people {padding:10px 16px;gap:12px;}
 .message-person {font-size:15px;}
 .message-redesign .chat-composer {max-height:none;overflow:visible;}
 .message-attachment-card {grid-template-columns:1fr;}
 .message-redesign .mensajeria-bubble--own {margin-right:36px;width:85%;}
 .message-initials{left:-46px;width:34px;height:34px;}
 .message-redesign .mensajeria-bubble--own .message-initials{right:-42px;}
}
.message-person {min-width:0;max-width:100%;}
.message-person > span {overflow-wrap:anywhere;min-width:0;}
.message-titlebar .message-priority {flex-shrink:0;}
/* Approved soft finish: keep the portal chrome and compact option-one inbox. */
.chat-workspace { grid-template-columns:175px minmax(270px,300px) minmax(0,1fr); }
.chat-folders {padding:20px 12px;}
.chat-folders h2 {font-size:21px;margin-bottom:22px;}
.chat-list-header {padding:16px 14px;gap:12px 8px;}
.chat-list-header h3 {font-size:17px;}
.chat-list-header > span {font-size:11px;}
.chat-row {padding:14px 10px;gap:10px;border-radius:12px;margin:3px 5px;width:calc(100% - 10px);border-bottom:1px solid #e3eaf2;}
.chat-row[aria-current=true] {background:#edf2f7;box-shadow:inset 3px 0 #718ba5;}
.chat-row-title {flex-wrap:wrap;}
.chat-row-title strong {font-size:14px;}
.chat-avatar {width:38px;height:38px;flex-basis:38px;font-size:15px;}
.chat-snippet {font-size:13px;}
.chat-count--unread,.chat-nav-button[aria-pressed=true] .chat-count {background:#466581;}
.chat-nav-button[aria-pressed=true] {background:#e5edf5;color:#29445e;}
.message-redesign {padding:12px;gap:10px;box-sizing:border-box;color:#29445e;}
.message-redesign .message-titlebar {color:#29445e;background:#edf2f7;border:1px solid #dce4ed;border-radius:18px;padding:14px 20px;min-height:62px;gap:16px;}
.message-redesign .message-titlebar h3 {font-size:24px;font-weight:700;}
.message-redesign .message-priority {border-radius:30px;font-size:14px;padding:7px 14px;}
.message-redesign .message-priority--urgente {background:#f4e1e5;color:#8b3044;}
.message-redesign .message-company {font-size:17px;}
.message-redesign .message-close {color:#29445e;border-left-color:#c6d2df;}
.message-redesign .message-people {background:#f4f6f8;border:0;border-radius:16px;padding:12px 22px;gap:28px;}
.message-redesign .message-person {font-size:15px;color:#29445e;}
.message-redesign .message-person svg {background:#e3eaf1;}
.message-redesign .message-action-panel {border-radius:16px;background:#f8fafc;padding:16px;}
.message-redesign .message-action-panel[hidden] {display:none;}
.message-redesign .message-action-form {height:auto;min-height:100%;}
.message-redesign .message-action-form h4 {margin:0;background:#edf2f7;color:#29445e;border-radius:12px;font-size:20px;}
.message-redesign .message-action-form textarea,.message-redesign .schedule-fields input {border-radius:10px;}
.message-redesign .schedule-calendar,.message-redesign .schedule-summary {border-radius:12px;}
.message-redesign .schedule-month,.message-redesign .schedule-summary {background:#edf2f7;}
.message-redesign .schedule-shortcuts button {border-radius:18px;}
.message-redesign .schedule-shortcuts button[aria-pressed=true],.message-redesign .schedule-days button[aria-pressed=true] {background:#466581;border-color:#466581;}
.message-redesign .message-action-button {border-color:#bac9d8;color:#29445e;border-radius:10px;font-size:14px;padding:10px 12px;}
.message-redesign .message-action-button[aria-pressed=true] {background:#e5edf5;color:#29445e;border-color:#8198ae;}
.message-redesign .message-action-form > .btn-primary {background:#365873;border-radius:10px;font-size:16px;margin-top:14px;}
.message-redesign .message-actionbar {padding:8px 10px;gap:8px;}
.message-redesign .message-more {color:#365873;}
.message-redesign .message-action-dismiss {display:none;border:0;background:none;color:#365873;padding:4px 0 12px;cursor:pointer;text-align:left;}
.message-redesign .message-footer {font-size:12px;margin:0 10px;padding:6px 0;}
.message-redesign .mensajeria-bubble > p {border-radius:16px 16px 0 0;background:#edf0f4;font-size:16px;}
.message-redesign .mensajeria-bubble > small {border-radius:0 0 16px 16px;background:#edf0f4;font-size:12px;}
.message-redesign .mensajeria-bubble strong {font-size:15px;}
.message-redesign .mensajeria-bubble--own > p,.message-redesign .mensajeria-bubble--own > small {background:#e4f1df;}
.message-redesign .message-attachment-card {border-radius:14px;grid-template-columns:minmax(0,1fr) minmax(130px,45%);max-width:620px;background:#f7f9fb;}
.message-redesign .message-attachment-card .message-image-preview {height:125px;border-radius:10px;}
.message-redesign .chat-reply {border-radius:12px;}
.message-redesign .chat-reply textarea {border-radius:9px;}
.message-redesign .chat-reply > button {border-radius:10px;background:#365873;}
/* Inline detail has one full-width conversation until an action is selected. */
.message-inline .message-columns {display:grid;grid-template-columns:minmax(0,1fr);overflow:hidden;}
.message-inline .message-conversation {display:flex;border:0;min-height:0;overflow:hidden;}
.message-inline .mensajeria-timeline {overflow:auto;flex:1;min-height:70px;max-height:none;padding:24px 66px;gap:18px;}
.message-inline .mensajeria-bubble {max-width:100%;}
.message-inline .mensajeria-bubble--own {width:85%;margin-top:10px;margin-right:0;}
.message-inline .mensajeria-bubble--own .message-initials {right:-48px;}
.message-inline .message-initials {width:34px;height:34px;left:-46px;font-size:15px;}
.message-inline .chat-composer {flex:none;max-height:40%;overflow:auto;padding:8px 10px;}
.message-inline .chat-reply {flex-wrap:wrap;}
.message-inline .chat-reply > button[type=submit] {width:auto;font-size:14px;display:flex;align-items:center;gap:8px;}
.message-inline .message-titlebar h3 {font-size:22px;}
.message-inline .message-people {gap:18px;}
.message-inline.message-action-open .message-columns {grid-template-columns:minmax(0,1fr) minmax(310px,40%);gap:12px;}
.message-inline .message-action-dismiss {display:block;}
.message-inline .message-action-panel {min-height:0;overflow:auto;}
.message-inline .message-action-form {min-height:0;}
@media(min-width:1001px) and (max-width:1350px){.chat-workspace{grid-template-columns:155px 270px minmax(0,1fr)}}
@container(max-width:850px){
 .message-inline.message-action-open .message-columns {display:block;overflow:auto;}
 .message-inline.message-action-open .message-conversation {display:flex;min-height:400px;max-height:550px;}
 .message-inline .message-attachment-card {grid-template-columns:minmax(0,1fr) minmax(110px,40%);}
}
@media(max-width:1000px){
 .chat-workspace {grid-template-columns:minmax(245px,32%) minmax(0,1fr);}
 .message-redesign .message-titlebar {padding:12px;min-height:54px;}
 .message-redesign .message-titlebar h3 {font-size:19px;}
 .message-redesign .message-company {font-size:14px;}
 .message-inline .message-conversation {display:flex;}
 .message-inline .mensajeria-timeline {overflow:auto;flex:1;min-height:70px;padding:20px 54px;}
}
@media(max-width:760px){
 .message-redesign {padding:6px;gap:6px;}
 .message-redesign .message-titlebar {border-radius:14px;}
 .message-redesign .message-titlebar h3 {font-size:17px;}
 .message-redesign .message-priority {font-size:11px;padding:5px 8px;}
 .message-redesign .message-people {padding:8px 12px;gap:8px;}
 .message-redesign .message-person {font-size:13px;gap:6px;}
 .message-inline .message-attachment-card {grid-template-columns:1fr;}
 .message-inline .message-attachment-card .message-image-preview {height:100px;}
 .message-inline .chat-reply > button[type=submit] {font-size:0;width:40px;}
 .message-inline .message-action-button {font-size:12px;padding:8px;gap:4px;}
 .message-inline .message-action-button svg {width:16px;height:16px;}
}
/* Queue and detail share the available dialog height; actions never fall below it. */
.message-attention-dialog[open] {display:flex;flex-direction:column;}
.message-attention-dialog > .mensajeria-toolbar {flex:0 0 auto;max-height:64px;overflow:auto;}
.message-attention-dialog > .chat-detail {height:auto;flex:1;min-height:0;}
.message-redesign .message-action-form > .btn-primary {position:sticky;bottom:0;flex-shrink:0;box-shadow:0 -6px 0 6px #f8fafc;}
.message-redesign .message-has-attachment > small {background:transparent;}
.chat-folders .chat-nav-button {font-size:13px;gap:8px;padding:7px 4px;}
.chat-folders .chat-count {min-width:20px;padding:2px 5px;}
.chat-attention-reason {font-size:12px;line-height:1.35;}
.chat-row-copy {gap:4px;}
@media(min-width:1001px) and (max-height:1000px){
 .message-attention-dialog > .mensajeria-toolbar {max-height:44px;display:flex;gap:6px;padding:4px 8px;}
 .message-attention-dialog > .mensajeria-toolbar button {padding:5px 10px;min-height:32px;}
 .message-attention-dialog .message-titlebar {min-height:54px;padding:10px 18px;}
 .message-attention-dialog .message-people {padding:8px 20px;}
 .message-attention-dialog .message-action-panel {padding:10px 14px;}
 .message-attention-dialog .message-action-form {gap:6px;}
 .message-attention-dialog .message-action-form h4 {font-size:18px;line-height:22px;padding:6px 10px;}
 .message-attention-dialog .message-action-form .mensajeria-field {font-size:14px;line-height:18px;margin:0;}
 .message-attention-dialog .message-action-form textarea {height:44px;min-height:44px;font-size:14px;}
 .message-attention-dialog .schedule-picker {gap:6px;}
 .message-attention-dialog .schedule-picker > strong {font-size:14px;line-height:18px;}
 .message-attention-dialog .schedule-shortcuts button {min-height:30px;font-size:13px;}
 .message-attention-dialog .schedule-fields label {font-size:14px;line-height:16px;gap:2px;}
 .message-attention-dialog .schedule-fields input {height:34px;font-size:15px;}
 .message-attention-dialog .schedule-fields small {font-size:11px;line-height:14px;}
 .message-attention-dialog .schedule-date > svg {top:26px;}
 .message-attention-dialog .schedule-month {min-height:34px;font-size:17px;}
 .message-attention-dialog .schedule-month button {height:34px;}
 .message-attention-dialog .schedule-days > * {min-height:24px;font-size:14px;padding:2px;}
 .message-attention-dialog .schedule-summary {padding:8px 12px 8px 48px;gap:2px;}
 .message-attention-dialog .schedule-summary strong {font-size:14px;line-height:20px;}
 .message-attention-dialog .schedule-summary small {font-size:12px;line-height:18px;}
 .message-attention-dialog .schedule-summary > svg {top:12px;left:14px;}
 .message-attention-dialog .message-action-form > .btn-primary {margin-top:6px;min-height:40px;font-size:14px;}
}

.message-columns:not(:has(.message-action-panel:not([hidden]))) {grid-template-columns:minmax(0,1fr);}
.message-attention-dialog > .mensajeria-toolbar {overflow-x:auto;overflow-y:hidden;flex-wrap:nowrap;}
.message-attention-dialog > .mensajeria-toolbar button {margin:0;flex-shrink:0;}

.message-person-avatar {display:flex;align-items:center;justify-content:center;flex:0 0 28px;width:28px;height:28px;border-radius:50%;background:#e5e1f2;color:#43516b;font-size:11px;}
.message-person:nth-child(2) .message-person-avatar {background:#dceee7;color:#345f51;}

/* The active company owns floating notices too; no database color is changed. */
.soec-notification-stack .soec-notification-content {
  background:var(--company-accent-soft, #e6ebf1);
  color:color-mix(in srgb, var(--company-accent, #06346B) 30%, #13233B);
  border:1px solid color-mix(in srgb, var(--company-accent, #06346B) 30%, white);
  border-inline-start:4px solid var(--company-accent, #06346B);
  box-shadow:0 2px 8px #13233b14;
}
.soec-notification-stack .soec-notification-content:hover {
  background:color-mix(in srgb, var(--company-accent, #06346B) 18%, white);
}
.soec-notification-stack .soec-notification-toggle {
  color:color-mix(in srgb, var(--company-accent, #06346B) 30%, #13233B);
  border-color:color-mix(in srgb, var(--company-accent, #06346B) 30%, white);
}
.soec-notification-stack :is(.soec-notification-content,.soec-notification-toggle):focus-visible {
  outline:2px solid color-mix(in srgb, var(--company-accent, #06346B) 30%, #13233B); outline-offset:2px;
}

/* Settings keep notices in document flow, below the workspace, never over fields. */
.soec-notification-stack[data-inline=true]{position:static;grid-column:2;grid-row:3;width:auto;max-height:none;margin:16px;flex-direction:row;flex-wrap:wrap;justify-content:flex-end;overflow:visible}
.soec-notification-stack[data-inline=true] .soec-notification-item{max-width:420px;flex:0 1 auto}
@media(max-width:760px){.soec-notification-stack[data-inline=true]{grid-column:1/-1;margin:8px}.soec-notification-stack[data-inline=true] .soec-notification-item{max-width:100%}}

/* One private conversation per person; tasks retain their source records. */
.chat-workspace--people {grid-template-columns:minmax(245px,280px) minmax(0,1fr);background:white;height:calc(100dvh - var(--topbar-height,80px) - 42px);max-height:none;min-height:540px;}
.chat-workspace--people .mensajeria-chat {background:white;}
.chat-workspace--people .chat-list-header {padding:16px 12px;gap:10px;}
.chat-workspace--people .chat-list-header h2 {font-size:20px;margin:0 0 6px;}
.chat-workspace--people .chat-row {border:0;border-bottom:1px solid #e2e9f1;border-radius:0;min-height:100px;padding:18px 12px;}
.chat-workspace--people .chat-row[aria-current=true] {border:1px solid #91a9bd;border-radius:14px;background:#edf2f6;}
.chat-workspace--people .chat-row-copy {gap:9px;}
.person-list-controls {display:flex;gap:6px;width:100%;align-items:center;}
.person-list-controls select {min-width:0;flex:1;width:100%;padding:7px 6px;border:1px solid #dce5ef;border-radius:8px;background:#fff;font:inherit;font-size:12px;color:#173550;}
.person-list-controls button {width:auto;min-height:34px;flex-shrink:0;padding:6px;border:1px solid #dce5ef;font-size:11px;margin:0;gap:4px;}
.person-list-controls button .icon {width:16px;height:16px;}
.person-tools-dialog {width:min(380px,calc(100vw - 32px));max-height:80dvh;overflow:auto;border:1px solid #cbd8e6;border-radius:14px;padding:18px;color:#173550;}
.person-tools-dialog::backdrop {background:#17355055;}
.person-tools-dialog>button {margin-left:auto;width:auto;border:1px solid #b5c7d8;}
.person-tools-list {display:flex;flex-direction:column;gap:4px;margin-top:12px;}
.person-tools-list .chat-nav-button {width:100%;white-space:normal;}
.person-unread,.person-pending-count {padding:4px 8px;border-radius:12px;font-size:12px;background:#e4f0db;color:#294935;}
.person-pending-count {background:#f8e1e5;color:#923743;}
.person-chat {height:100%;min-height:0;display:flex;flex-direction:column;color:#173550;background:white;}
.person-header {margin:10px 0;padding:14px 16px;border-radius:16px;border:1px solid #dce5ef;background:#edf2f6;display:flex;align-items:center;gap:14px;flex-shrink:0;}
.person-header h3 {font-size:20px;margin:0 0 3px;}
.person-header>div {flex:1;min-width:0;}
.person-header>button:last-child {padding:8px;flex-shrink:0;}
.person-header>button:first-child {display:none;}
.person-chat button {border-radius:9px;min-height:36px;font:inherit;cursor:pointer;}
.person-chat .btn-primary {background:#3e6078;color:white;border:1px solid #3e6078;}
.person-chat .btn-secondary {background:white;color:#173550;border:1px solid #b5c7d8;}
.person-chat button:disabled {opacity:.6;cursor:wait;}
.person-columns {display:grid;grid-template-columns:minmax(300px,1fr) minmax(300px,350px);flex:1;min-height:0;}
.person-columns.person-without-pending {grid-template-columns:minmax(0,1fr);}
.person-without-pending>.person-pending {display:none;}
.person-conversation {display:flex;flex-direction:column;min-width:0;min-height:0;padding:0 12px 12px;}
.person-timeline {flex:1;overflow:auto;min-height:0;display:flex;flex-direction:column;gap:12px;padding:12px;overscroll-behavior:contain;}
.person-day {align-self:center;border:1px solid #dce5ef;border-radius:20px;background:#f8fafc;font-size:12px;text-align:center;padding:4px 16px;margin:4px 0;}
.person-message {position:relative;align-self:flex-start;width:94%;flex-shrink:0;padding-left:42px;}
.person-message--own {align-self:flex-end;padding-left:0;padding-right:42px;width:88%;}
.person-message-author {display:flex;gap:8px;align-items:center;min-height:22px;font-size:14px;margin:0 0 4px;}
.person-message-author .chat-avatar {position:absolute;left:0;top:0;width:32px;height:32px;font-size:11px;}
.person-message--own .person-message-author {justify-content:flex-end;}
.person-message--own .chat-avatar {left:auto;right:0;}
.person-bubble {width:100%;padding:9px 14px;border-radius:14px;background:#ecf0f4;font-size:14px;overflow-wrap:anywhere;}
.person-bubble--own {background:#e4f1dc;}
.person-message-company {font-size:11px;color:#526980;font-weight:400;}
.person-bubble p {white-space:pre-wrap;margin:0;line-height:1.45;}
.person-bubble time {display:block;text-align:right;font-size:11px;color:#526980;margin-top:3px;}
.person-chat .person-message>button {display:block;background:transparent;border:0;color:#345c7c;padding:3px 0;text-decoration:underline;font-size:12px;min-height:20px;}
.person-bubble .message-image-preview img {width:100%;height:100%;object-fit:contain;}
.person-bubble .message-image {max-width:100%;}
.person-bubble img {max-width:100%;max-height:220px;object-fit:contain;}
.person-resolution {align-self:center;text-align:center;border:1px solid #dce5ef;border-radius:20px;padding:5px 14px;margin:4px 0;font-size:12px;color:#47664c;}
.person-feedback:empty {display:none;}
.person-feedback {font-size:13px;margin:4px 0;}
.person-feedback[role=alert] {color:#a12b39;}
.person-send-context {font-size:12px;display:flex;align-items:center;gap:6px;margin:4px 0 7px;}
.person-send-context select {font:inherit;max-width:220px;padding:4px;border:1px solid #dce5ef;border-radius:6px;background:#fff;}
.person-composer {display:flex;align-items:center;gap:8px;padding:8px;border:1px solid #c7d7e5;border-radius:12px;flex-shrink:0;}
.person-composer textarea {flex:1;min-width:0;min-height:40px;resize:vertical;max-height:150px;border:1px solid #b5c7d8;border-radius:8px;padding:9px;font:inherit;font-size:14px;}
.person-composer>button {padding:8px 12px;}
.person-hint {display:block;font-size:11px;color:#526980;text-align:center;padding:8px;}
.person-pending {border-left:1px solid #dce5ef;margin:10px 8px 10px 0;padding:0 12px 12px;overflow:auto;min-height:0;}
.person-pending>h3 {font-size:20px;margin:0 -4px 12px;padding:16px 12px;background:#edf2f6;border-radius:14px;}
.person-pending-back {display:none;}
.person-task-tabs {display:flex;gap:8px;margin:12px 0 18px;}
.person-task-tabs button {flex:1;font-size:13px;}
.person-task-tabs [aria-pressed=true] {background:#e5eef6;}
.person-task {border:1px solid #e0e8f0;border-radius:14px;padding:14px;margin:12px 0;}
.person-task h4 {margin:0 0 9px;font-size:16px;}
.person-task p {font-size:13px;margin:8px 0;}
.person-task-status {font-size:12px;background:#eef2f6;padding:4px 7px;border-radius:8px;}
.person-task-actions {display:flex;flex-wrap:wrap;gap:7px;margin-top:12px;}
.person-task-actions button {padding:6px 10px;font-size:12px;flex:1 0 auto;}
.person-task-dialog {width:min(1100px,95vw);max-width:95vw;max-height:92dvh;overflow:auto;}
.person-pending .schedule-days>* {min-height:32px;}
@media(max-width:1200px) and (min-width:761px){
 .chat-workspace--people {grid-template-columns:220px minmax(0,1fr);}
 .person-columns {grid-template-columns:minmax(0,1fr);position:relative;}
 .person-pending {display:none;}
 .person-pending--visible {display:block;position:absolute;inset:0 0 0 auto;width:min(350px,100%);background:white;z-index:5;box-shadow:-6px 0 20px #17355012;}
 .person-pending-back {display:block;margin-bottom:12px;}
}
@media(max-width:760px){
 .chat-workspace--people {display:flex;}
 .person-columns {grid-template-columns:minmax(0,1fr);position:relative;}
 .person-pending {display:none;}
 .person-pending--visible {display:block;position:absolute;inset:0;background:white;z-index:5;margin:0;}
 .person-pending-back {display:block;margin-bottom:12px;}
 .person-header {padding:10px;gap:8px;}
 .person-header h3 {font-size:16px;}
 .person-header small {font-size:11px;}
 .person-header>button:first-child {display:block;font-size:12px;}
 .person-header>.chat-avatar {display:none;}
 .person-header button {font-size:12px;}
 .person-composer>button {font-size:12px;padding:7px;}
 .person-message,.person-message--own {width:100%;}
 .person-header {gap:5px;}
 .person-header>button:first-child {padding:5px;}
 .person-header>button:last-child {padding:5px;}
}
