/* CARE / Fluent workspace — visual layer, no workflow changes. */
:root {
  --care-nav:#102c48; --care-nav-muted:#aac1d7;
  --care-line:#dce5ef; --care-soft:#edf4fb; --care-surface:#fff;
  --border:var(--ca-border); --muted:var(--ca-muted);
  --care-radius:8px; --care-shadow:0 2px 10px rgb(16 44 72 / 5%);
}
body { background:#f2f5f9; color:var(--ca-ink); font-size:13px; line-height:1.45; }
button,input,select,textarea { font-family:"Segoe UI Variable Text","Segoe UI",system-ui,sans-serif; }
button { -webkit-tap-highlight-color:transparent; }
::selection { background:#cde5fa; color:#102c48; }
:focus-visible { outline:2px solid var(--ca-blue); outline-offset:3px; }
input[type=checkbox],input[type=radio] { accent-color:var(--ca-blue); }

/* Brand and primary navigation. The logo keeps its original colours. */
.sidebar {
  background:var(--care-nav) !important; border-right:1px solid #0d2339;
  padding:18px 14px 14px; box-shadow:3px 0 16px rgb(16 44 72 / 5%);
}
.sidebar .brand-wrap {
  height:98px; margin:0 2px 18px; padding:14px;
  background:#fff; border:1px solid #e4edf5; border-bottom:3px solid var(--ca-red);
  border-radius:12px; justify-content:center;
}
.sidebar .side-logo { width:100%; max-width:190px; max-height:72px; object-fit:contain; object-position:center; }
.sidebar .nav-section { color:var(--care-nav-muted); font-size:10px; font-weight:600; letter-spacing:.1em; padding:18px 12px 7px; }
.sidebar .nav {
  min-height:42px; padding:10px 12px; margin:3px 0;
  background:transparent; color:#dce9f5; border:1px solid transparent;
  font-size:13px; font-weight:500; border-radius:8px; gap:11px;
}
.sidebar .nav:hover { color:#fff; background:#1b3c5c; }
.sidebar .nav.active { color:#fff; background:var(--ca-blue); border-color:#3786c8; box-shadow:0 3px 8px rgb(0 0 0 / 8%); }
.sidebar .nav.active:before { left:0; height:22px; width:3px; background:var(--ca-red); border-radius:3px; }
.sidebar .nav-icon { background:transparent; color:#a8cde9; width:22px; height:22px; border-radius:5px; }
.sidebar .nav.active .nav-icon { background:transparent; color:#fff; }
.sidebar .nav-count { font-size:10px; box-shadow:0 0 0 2px var(--care-nav); }
.sidebar #mainNav .solicitacoes-hub-nav { background:transparent; border:1px solid #365570; box-shadow:none; }
.sidebar #mainNav .solicitacoes-hub-nav.active { background:var(--ca-blue); border-color:#3786c8; }
.sidebar #mainNav .solicitacoes-hub-nav-label { font-size:12px; font-weight:600; letter-spacing:.03em; }
.sidebar #mainNav .solicitacoes-hub-nav .nav-icon { background:transparent; }
.sidebar .side-bottom { border-top-color:#36516d; padding-top:14px; }
.sidebar .version { color:#adc2d7; line-height:1.7; font-size:10px; }
.sidebar .side-bottom .btn { background:#1b3c5c; color:#fff; border:1px solid #365570; }
.sidebar nav { scrollbar-color:#52728f transparent; }

/* Workspace heading and account. */
.topbar { height:80px; background:#fff; padding:0 28px; border-bottom:1px solid var(--care-line); }
.topbar .eyebrow { font-size:10px; letter-spacing:.12em; color:#64788d; }
.topbar h2 { font-size:25px; font-weight:600; line-height:1.2; letter-spacing:-.025em; margin-top:4px; }
.top-actions { gap:16px; }
.health-pill { background:#f0f8f3; border-color:#d7eadf; color:#24643d; font-size:12px; padding:7px 11px; }
.health-dot { background:#21804b; box-shadow:none; }
.account-trigger { border:1px solid var(--care-line); background:#fafcfe; border-radius:10px; }
.account-trigger:hover,.account-trigger[aria-expanded=true] { background:#edf4fb; border-color:#b9d4e9; }
.account-trigger-text strong { font-size:13px; font-weight:600; }
.account-trigger-text span { font-size:11px; }
.avatar { background:var(--ca-blue); border-radius:9px; font-weight:600; }
.account-menu { border:1px solid var(--care-line); border-radius:12px; box-shadow:0 12px 36px rgb(16 44 72 / 16%); }
.content { max-width:1920px; padding:24px 28px 30px; }
.page-head { align-items:center; gap:16px; margin-bottom:20px; flex-wrap:wrap; }
.page-head h3 { font-size:23px; font-weight:600; letter-spacing:-.02em; }
.page-head p { font-size:13px; color:#66788b; line-height:1.5; }

/* Shared controls. */
.btn { min-height:38px; padding:8px 15px; font-size:13px; font-weight:600; border-radius:8px; }
.btn.sm { min-height:32px; font-size:12px; padding:6px 11px; }
.btn.primary { background:var(--ca-blue); border:1px solid rgb(0 0 0 / 8%); box-shadow:0 2px 4px rgb(13 99 173 / 13%); }
.btn.primary:hover:not(:disabled) { background:#105d9c; }
.btn.ghost { background:#fff; color:#29415a; border-color:#d1dce7; }
.btn.ghost:hover:not(:disabled),.btn.secondary:hover:not(:disabled) { background:#edf4fb; border-color:#a9c5dd; }
.btn.secondary { background:#eff4f9; color:#29415a; border-color:#d4e0ec; }
.btn.danger { background:#fff2f3; color:#b32130; border:1px solid #f1c9ce; }
.btn:disabled { opacity:.55; box-shadow:none; filter:none; }
.icon-btn { min-width:32px; min-height:32px; border-radius:8px; }
input:not([type=checkbox]):not([type=radio]):not([type=file]),select,textarea {
  border:1px solid #cdd9e5; border-bottom-color:#aebdcb;
  border-radius:7px; padding:10px 12px; font-size:13px;
}
input:focus,select:focus,textarea:focus { border-color:#72a9d3; border-bottom-color:var(--ca-blue); box-shadow:0 0 0 2px rgb(13 99 173 / 10%); }
label { color:#3c5065; font-size:12px; font-weight:600; }
.form-grid { gap:16px; }
.actions { gap:10px; }
.badge,.status-pill { font-size:11px; font-weight:600; border-radius:6px; padding:4px 8px; }
.note { font-size:12px; line-height:1.6; border-radius:8px; background:#f1f6fc; padding:12px 14px; }

/* Cards, metrics and tables throughout the application. */
.card,.settings-card,.session-card,.ticket-conversation-panel { border:1px solid var(--care-line); border-radius:12px; box-shadow:var(--care-shadow); }
.card-head { padding:17px 20px; border-bottom:1px solid #e9eef4; }
.card-head h4 { font-size:15px; font-weight:600; }
.card-body { padding:20px; }
.kpi-grid { gap:16px; }
.kpi { padding:20px; border-top:3px solid #86b9df; }
.kpi:first-child { border-top-color:var(--ca-blue); }
.kpi:last-child { border-top-color:var(--ca-red); }
.kpi strong { font-size:31px; font-weight:600; line-height:1.1; margin:16px 0 7px; }
.kpi span { font-size:12px; color:#62768a; }
.kpi-icon { background:#e8f2fc; color:var(--ca-blue); width:36px; height:36px; border-radius:9px; }
.dashboard-grid { gap:18px; }
.table-wrap { border-radius:10px; scrollbar-color:#b8c8d8 transparent; }
.data-table th { background:#f3f6fa; padding:13px 16px; color:#526b83; font-size:11px; font-weight:600; letter-spacing:.03em; border-bottom:1px solid #dce5ef; }
.data-table td { padding:13px 16px; font-size:13px; border-bottom:1px solid #edf1f6; }
.data-table tbody tr:nth-child(even) { background:#fbfcfe; }
.data-table tbody tr:hover { background:#edf5fc; }
.data-table td .btn { white-space:nowrap; }
.detail-box { background:#f7f9fc; border-color:#e1e8f0; border-radius:8px; padding:12px; }
.detail-box strong { font-size:13px; }
.detail-box span { color:#63798e; font-size:10px; }
.timeline-item p { font-size:13px; }
.timeline-item span { font-size:11px; }
.timeline-dot { background:var(--ca-blue); }

/* Dialogs and notifications. */
.modal-backdrop { background:rgb(11 30 49 / 42%); backdrop-filter:blur(3px); }
.modal { border:1px solid #dce5ef; border-radius:14px; box-shadow:0 24px 80px rgb(9 30 52 / 24%); }
.modal-head { padding:20px 22px; background:#fff; }
.modal-head h3 { font-size:21px; font-weight:600; letter-spacing:-.02em; }
.modal-body { padding:22px; }
.modal-actions { padding:16px 22px; background:#f5f8fb; border-top:1px solid #e1e9f1; }
.toast { font-size:13px; border-radius:10px; box-shadow:0 8px 24px rgb(16 44 72 / 18%); }
.empty { padding:42px 24px; color:#718397; }
.empty h4 { font-size:18px; font-weight:600; color:#334d65; }
.empty p { font-size:13px; line-height:1.6; }

/* Requests and channel navigation. */
.solicitacoes-hub-shell { padding:12px 16px; border-radius:12px; border-color:var(--care-line); box-shadow:var(--care-shadow); }
.solicitacoes-channel-tab { min-height:40px; font-size:13px; font-weight:600; border-radius:8px; background:#f3f6fa; }
.solicitacoes-channel-tab.active { background:var(--ca-blue); box-shadow:0 2px 5px rgb(13 99 173 / 12%); }
.solicitacoes-subtab { min-height:34px; font-size:12px; border-radius:7px; }
.solicitacoes-subtab.active { background:#e8f2fb; border-color:#9dc5e4; }

/* WhatsApp: quieter queues, readable conversation rows and bubbles. */
.whatsapp-inbox-v2 .inbox-filters { background:#f6f8fb; border-right:1px solid var(--care-line); padding:12px 10px; }
.whatsapp-inbox-v2 .inbox-filters h4 { background:transparent; color:#6a7f93 !important; padding:12px 10px 8px; border:0; box-shadow:none; border-radius:0; font-size:10px; letter-spacing:.09em; }
.whatsapp-inbox-v2 .queue-btn { border:1px solid transparent; border-radius:8px; color:#465e75; padding:10px; font-size:12px; font-weight:500; min-height:40px; }
.whatsapp-inbox-v2 .queue-btn:hover { background:#eaf1f8; }
.whatsapp-inbox-v2 .queue-btn.active { background:#e1effb; color:#125c96; border-color:#bdd7eb; box-shadow:none; font-weight:600; }
.whatsapp-inbox-v2 .queue-btn span { border-radius:5px; background:#e8eef5; color:#57718a; font-size:10px; min-width:22px; text-align:center; }
.whatsapp-inbox-v2 .queue-btn.active span { background:#cee3f5; color:#124f80; }
.whatsapp-inbox-v2 .conversation-list { border-color:var(--care-line); background:white; }
.whatsapp-inbox-v2 .conversation-item { padding:14px 12px; border:0; border-bottom:1px solid #edf1f5; border-left:3px solid transparent; border-radius:0; gap:10px; background:#fff; }
.whatsapp-inbox-v2 .conversation-item:hover { background:#f2f7fc; }
.whatsapp-inbox-v2 .conversation-item.active { background:#eaf3fc; border-left-color:var(--ca-blue); }
.whatsapp-inbox-v2 .conv-name { color:#213b53; font-size:13px; font-weight:600; }
.whatsapp-inbox-v2 .conv-preview { font-size:12px; line-height:1.5; color:#697e90; }
.whatsapp-inbox-v2 .conv-time { font-size:10px; color:#8191a1; }
.whatsapp-inbox-v2 .conv-meta { margin-top:7px; gap:5px; }
.whatsapp-inbox-v2 .conv-store { font-size:10px; color:#718497; }
.whatsapp-inbox-v2 .conv-request-label,.whatsapp-inbox-v2 .conv-counter-response-label,.whatsapp-inbox-v2 .conv-reply-label { font-size:10px; border-radius:5px; padding:3px 6px; }
#conversationPane .conv-header { background:#fff; border-bottom-color:var(--care-line); }
#conversationPane .conv-header-customer h4 { font-size:15px; font-weight:600; }
#conversationPane .context-chip { font-size:11px; border-radius:7px; background:white; }
#conversationPane .bubble-row:not(.outbound) .bubble { background:#fff !important; border-color:#dfe7ee !important; box-shadow:0 2px 4px rgb(16 44 72 / 3%) !important; }
#conversationPane .bubble-row.outbound .bubble { background:#e3f2e7 !important; border-color:#c5e1cd !important; box-shadow:0 2px 4px rgb(27 94 46 / 3%) !important; }
#conversationPane .bubble { border-radius:12px !important; }
#conversationPane .bubble p { font-size:13px !important; line-height:1.55 !important; }
#conversationPane .bubble .when { font-size:10px; color:#6e8576; }
#conversationPane .bubble .who { font-size:11px; }
#conversationPane .care-composer { border-radius:12px 12px 0 0; }

/* Entry screen uses the same brand palette. */
.login-shell { background:radial-gradient(ellipse at 20% 10%,#224d73 0,transparent 60%),#102c48; padding:32px; }
.login-card { border-radius:16px; border:1px solid #d9e5ef; border-top:4px solid var(--ca-red); box-shadow:0 24px 70px rgb(0 0 0 / 22%); padding:36px; }
.login-card h1 { font-size:30px; font-weight:600; }
.login-card p { font-size:13px; }
.login-card label { margin-top:20px; }
.login-card input { min-height:44px; }
.login-card .btn { min-height:44px; }

/* Preserve the compact rail and mobile navigation without scaling the page. */
@media(max-width:1200px) {
  .content { padding:20px 20px 26px; }
  .topbar { padding:0 20px; }
  .kpi { padding:16px; }
  .kpi strong { font-size:27px; }
  .card-head,.card-body { padding:16px; }
}
@media(max-width:980px) {
  .sidebar { padding:14px 10px; }
  .sidebar .brand-wrap { height:64px; margin:0 0 14px; padding:5px; border-radius:9px; }
  .sidebar .side-logo { width:48px; height:auto; object-fit:contain; }
  .sidebar .nav { padding:9px; justify-content:center; }
  .topbar h2 { font-size:22px; }
}
@media(max-width:700px) {
  .sidebar { padding:6px; border-top:1px solid #385570; box-shadow:0 -4px 14px rgb(16 44 72 / 8%); }
  .sidebar .brand-wrap { display:none; }
  .sidebar .nav { margin:0; min-height:46px; }
  .topbar { height:70px; padding:0 14px; }
  .topbar h2 { font-size:20px; }
  .topbar .eyebrow { font-size:8px; letter-spacing:.08em; }
  .top-actions { gap:6px; }
  .content { padding:16px 12px 84px; }
  .page-head h3 { font-size:21px; }
  .page-head p { font-size:12px; }
  .page-head { gap:12px; margin-bottom:16px; }
  .card-head,.card-body { padding:14px; }
  .data-table td,.data-table th { padding:11px 12px; }
  .kpi-grid { gap:10px; }
  .kpi { padding:14px; }
  .kpi strong { font-size:25px; }
  .modal-head,.modal-body,.modal-actions { padding:16px; }
  .login-shell { padding:18px; }
  .login-card { padding:26px; }
}

/* Keep section headings quiet and separate labels from counters. */
.sidebar .nav-section { background:transparent !important; border:0 !important; box-shadow:none !important; border-radius:0; }
.whatsapp-inbox-v2 .inbox-filters .inbox-store-heading { background:transparent !important; color:#6a7f93 !important; border:0 !important; box-shadow:none !important; line-height:1.5; }
.whatsapp-inbox-v2 .queue-btn .queue-label { background:transparent !important; color:inherit !important; border:0 !important; box-shadow:none !important; padding:0; border-radius:0; font-size:12px; text-align:left; white-space:normal; flex:1; }

/* r6 — Windows typography: regular body/control text, semibold headings. */
:root { --care-font:"Segoe UI Variable Text","Segoe UI",system-ui,sans-serif; }
body,button,input,select,textarea { font-family:var(--care-font); }
body { font-size:13px; font-weight:400; }
.sidebar #mainNav .nav,
.sidebar #mainNav .solicitacoes-hub-nav-label { font-size:13px !important; font-weight:400 !important; letter-spacing:normal !important; }
.sidebar #mainNav .nav.active,
.sidebar #mainNav .nav.active .solicitacoes-hub-nav-label { font-weight:600 !important; }
.sidebar .nav-section,.topbar .eyebrow { font-size:11px; font-weight:600; letter-spacing:.04em; }
.topbar h2,.page-head h3,.modal-head h3 { font-weight:600; letter-spacing:normal; }
.btn,.btn.sm,.solicitacoes-channel-tab,.solicitacoes-subtab { font-size:13px; font-weight:400; }
.btn.sm { font-size:13px; }
.solicitacoes-channel-tab.active,.solicitacoes-subtab.active { font-weight:600; }
label,.login-card label { font-size:13px; font-weight:400; }
input:not([type=checkbox]):not([type=radio]):not([type=file]),select,textarea { font-size:13px; font-weight:400; }
.page-head p,.empty p,.note,.timeline-item p { font-size:13px; font-weight:400; }
.data-table th { font-size:12px; font-weight:600; letter-spacing:normal; }
.data-table td { font-size:13px; font-weight:400; }
.ca-grid-column-filter { font-size:12px !important; font-weight:400 !important; }
.badge,.status-pill { font-size:12px; font-weight:400; }
.account-trigger-text strong { font-size:13px; font-weight:400; }
.account-trigger-text span,.detail-box span,.timeline-item span { font-size:12px; }
.whatsapp-inbox-v2 .inbox-filters h4 { font-size:11px; font-weight:600 !important; letter-spacing:.03em; }
.whatsapp-inbox-v2 .queue-btn,.whatsapp-inbox-v2 .queue-btn .queue-label { font-size:13px; font-weight:400; }
.whatsapp-inbox-v2 .queue-btn.active { font-weight:600; }
.whatsapp-inbox-v2 .queue-btn > span:last-child { font-size:11px; font-weight:400; }
.whatsapp-inbox-v2 .conv-name { font-size:13px; font-weight:400; }
.whatsapp-inbox-v2 .conversation-item.active .conv-name { font-weight:600; }
.whatsapp-inbox-v2 .conv-preview { font-size:13px; font-weight:400; }
.whatsapp-inbox-v2 .conv-time,.whatsapp-inbox-v2 .conv-store { font-size:11px; }
.whatsapp-inbox-v2 .conv-request-label,.whatsapp-inbox-v2 .conv-counter-response-label,.whatsapp-inbox-v2 .conv-reply-label { font-size:11px; font-weight:400; }
#conversationPane .bubble p { font-size:13px !important; font-weight:400; }
#conversationPane .bubble .when { font-size:11px; }
#conversationPane .bubble .who,#conversationPane .context-chip { font-size:12px; font-weight:400; }
#conversationPane .care-composer .btn,#conversationPane #composerText,#conversationPane .care-attachment-caption { font-size:13px !important; font-weight:400 !important; }

/* r7: visible section dividers in the WhatsApp queue navigation. */
.whatsapp-inbox-v2 .inbox-filters h4,
.whatsapp-inbox-v2 .inbox-filters h4.inbox-store-heading {
  background:#eceef2 !important;
  color:#435064 !important;
  border:0 !important;
  border-left:3px solid var(--ca-red) !important;
  border-radius:0 6px 6px 0;
  box-shadow:none !important;
  padding:10px 9px;
  margin:0 0 8px;
  font-size:12px !important;
  font-weight:600 !important;
  line-height:1.4;
  letter-spacing:.025em;
}

/* Users: keep all actions inside the cell, with readable identity fields. */
.care-users-grid { overflow-x:auto; }
.care-users-grid .data-table { min-width:1100px; }
.care-users-grid .data-table td { white-space:normal !important; overflow-wrap:anywhere; }
.care-users-grid .data-table td:last-child { overflow:visible; }
.care-users-grid .row-actions { display:flex; flex-wrap:wrap !important; gap:6px; min-width:0; }
.care-users-grid .row-actions .btn { flex:0 1 auto; max-width:100%; white-space:normal; }
.care-users-grid .data-table th:last-child { min-width:180px; }

/* r12: shared conversation styling for internal chat. */
.chat-layout.chat-layout-v2 { display:grid; grid-template-columns:300px minmax(0,1fr); gap:0; height:max(420px,calc(100dvh - 190px)); min-height:0; border:1px solid var(--care-line); border-radius:12px; overflow:hidden; background:#fff; box-shadow:var(--care-shadow); }
.chat-layout-v2 .chat-rooms-panel { display:flex; flex-direction:column; min-height:0; border:0; border-right:1px solid var(--care-line); border-radius:0; box-shadow:none; }
.chat-layout-v2 .chat-rooms-toolbar { padding:12px; flex:none; }
.chat-layout-v2 .chat-rooms-toolbar input { height:42px; font-size:13px; background:#f6f8fb; }
.chat-layout-v2 .chat-rooms-panel #rooms { flex:1; min-height:0; max-height:none; overflow:auto; }
.chat-layout-v2 .chat-directory-title { margin:10px; padding:10px 9px; border-left:3px solid var(--ca-red); border-radius:0 6px 6px 0; background:#eceef2; color:#435064; font-size:12px; font-weight:600; letter-spacing:.025em; }
.chat-layout-v2 .chat-directory-title b { font-size:11px; font-weight:400; background:#fff; }
.chat-layout-v2 .chat-directory-list { padding:0; }
.chat-layout-v2 .chat-room-v2,.chat-layout-v2 .chat-peer { padding:14px 12px; margin:0; border-radius:0; border-bottom:1px solid #edf1f5; border-left:3px solid transparent; }
.chat-layout-v2 .chat-room-v2.active,.chat-layout-v2 .chat-peer.active { background:#eaf3fc; border-left-color:var(--ca-blue); box-shadow:none; }
.chat-layout-v2 .chat-room-v2:hover,.chat-layout-v2 .chat-peer:hover { background:#f2f7fc; }
.chat-layout-v2 .chat-room-name,.chat-layout-v2 .chat-peer-name { font-size:13px; font-weight:400; color:#213b53; }
.chat-layout-v2 .has-unread .chat-room-name,.chat-layout-v2 .has-unread .chat-peer-name,.chat-layout-v2 .active .chat-peer-name,.chat-layout-v2 .active .chat-room-name { font-weight:600; }
.chat-layout-v2 .chat-room-preview { font-size:13px; line-height:1.5; }
.chat-layout-v2 .chat-peer-meta,.chat-layout-v2 .chat-room-meta,.chat-layout-v2 .chat-peer-time { font-size:11px; }
.chat-layout-v2 .chat-peer-avatar { width:42px; height:42px; flex-basis:42px; font-size:13px; font-weight:600; }
.chat-layout-v2 .chat-room-unread { font-size:11px; font-weight:600; }
.chat-layout-v2 .chat-conversation-card { min-height:0; border:0; border-radius:0; }
.chat-layout-v2 .chat-conversation-head { min-height:66px; padding:14px 18px; flex:none; }
.chat-layout-v2 .chat-conversation-head strong { font-size:15px; font-weight:600; }
.chat-layout-v2 .chat-conversation-head span { font-size:12px; }
.chat-layout-v2 .chat-messages-v2 { flex:1; min-height:0; overflow:auto; padding:20px; background:#f6f8fb; }
.chat-layout-v2 .chat-msg-v2 { background:transparent; }
.chat-layout-v2 .chat-msg-bubble { border-radius:12px; padding:10px 12px; background:#fff; border-color:#dfe7ee; box-shadow:0 2px 4px rgb(16 44 72 / 3%); }
.chat-layout-v2 .chat-msg-v2.mine .chat-msg-bubble { background:#e3f2e7; border-color:#c5e1cd; }
.chat-layout-v2 .chat-msg-author { font-size:12px; font-weight:600; }
.chat-layout-v2 .chat-msg-body { font-size:13px; line-height:1.55; }
.chat-layout-v2 .chat-msg-time { font-size:11px; color:#6e8576; }
.chat-layout-v2 .chat-form-v2 { display:flex; gap:10px; flex:none; padding:12px; border-top:1px solid var(--care-line); }
.chat-layout-v2 .chat-form-v2 input { flex:1; min-width:0; height:42px; font-size:13px; }
.chat-layout-v2 .chat-form-v2 .btn { flex:none; height:42px; min-width:80px; font-size:13px; font-weight:400; }
@media(max-width:980px) { .chat-layout.chat-layout-v2 { grid-template-columns:260px minmax(0,1fr); } }
@media(max-width:700px) {
 .chat-layout.chat-layout-v2 { grid-template-columns:minmax(0,1fr); grid-template-rows:210px minmax(0,1fr); height:max(560px,calc(100dvh - 230px)); }
 .chat-layout-v2 .chat-rooms-panel { margin:0; border-right:0; border-bottom:1px solid var(--care-line); }
 .chat-layout-v2 .chat-messages-v2 { padding:14px; }
 .chat-layout-v2 .chat-msg-bubble { max-width:90%; }
}

/* r14: internal messages use plain rows rather than conversation bubbles. */
.chat-layout-v2 .chat-messages-v2 { background:#fff; }
.chat-layout-v2 .chat-msg-v2,
.chat-layout-v2 .chat-msg-v2.mine { justify-content:flex-start; margin:0; padding:14px 0; border-bottom:1px solid #edf1f5; }
.chat-layout-v2 .chat-msg-bubble,
.chat-layout-v2 .chat-msg-v2.mine .chat-msg-bubble { display:grid; grid-template-columns:minmax(0,1fr) auto; column-gap:14px; row-gap:5px; width:100%; max-width:none; padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; }
.chat-layout-v2 .chat-msg-author { grid-column:1; grid-row:1; margin:0; }
.chat-layout-v2 .chat-msg-time { grid-column:2; grid-row:1; margin:0; align-self:center; color:#718397; }
.chat-layout-v2 .chat-msg-body { grid-column:1 / -1; grid-row:2; color:#213b53; }
@media(max-width:700px) { .chat-layout-v2 .chat-msg-time { font-size:10px; } }

/* r15: aligned ticket header controls. */
.ticket-workspace-header { align-items:flex-start; flex-wrap:wrap; gap:20px; }
.ticket-workspace-header > div:first-child { flex:1 1 320px; min-width:0; }
.ticket-workspace-subject { overflow-wrap:anywhere; }
.ticket-workspace .ticket-workspace-actions { display:grid; grid-template-columns:minmax(135px,1fr) minmax(180px,1.4fr) auto minmax(130px,1fr); align-items:end; gap:10px; width:min(100%,650px); max-width:100%; flex:0 1 650px; }
.ticket-workspace-actions .ticket-assignee-display,.ticket-workspace-actions .ticket-state-field { display:flex; flex-direction:column; align-items:stretch; text-align:left; gap:6px; min-width:0; }
.ticket-workspace-actions .ticket-assignee-display > span,.ticket-workspace-actions .ticket-state-field > label { margin:0; font-size:12px; font-weight:400; line-height:18px; text-transform:none; letter-spacing:normal; color:#63798e; }
.ticket-workspace-actions #ticketWorkspaceAssignee { display:none; }
.ticket-workspace .ticket-workspace-actions select,.ticket-workspace-actions #ticketAssignMe { height:42px; min-height:42px; width:100%; min-width:0; margin:0; font-size:13px; font-weight:400; border-radius:7px; }
.ticket-workspace-actions #ticketAssignMe { width:auto; padding:0 16px; white-space:nowrap; }
@media(max-width:700px) {
 .ticket-workspace .ticket-workspace-actions { grid-template-columns:minmax(0,1fr) minmax(0,1fr); flex-basis:100%; width:100%; }
 .ticket-workspace-actions #ticketAssignMe { grid-column:2; grid-row:2; width:100%; }
 .ticket-workspace-actions .ticket-state-field { grid-column:1; grid-row:2; }
}

.email-thread-body .care-email-inline-image { display:block; margin:10px 0; width:fit-content; max-width:100%; }
.email-thread-body .care-email-inline-image img { display:block; max-width:100%; height:auto; max-height:620px; object-fit:contain; border:1px solid #dce5ef; border-radius:5px; }

.care-request-owner { display:flex; flex-wrap:wrap; align-items:center; gap:6px 12px; padding:8px 10px; margin-top:8px; border-radius:6px; font-size:13px; border-left:3px solid var(--ca-blue); background:#eaf3fc; color:#234e73; }
.care-request-owner.unassigned { background:#fff6e7; color:#855311; border-left-color:#c88b20; }
.care-request-owner small { font-size:11px; color:inherit; }

/* r21: bounded Windows typography and compact spacing for smaller work areas.
   CSS pixels preserve native DPI rendering and browser accessibility zoom. */
.topbar h2,.page-head h3 { font-size:22px; line-height:1.25; }
.modal-head h3,.login-card h1 { font-size:22px; line-height:1.3; }
.kpi strong { font-size:28px; }
.email-thread-body { font-size:13px; line-height:1.55; overflow-wrap:anywhere; }
.ticket-workspace-title { font-size:22px; }
@media(max-width:1366px), (max-height:800px) {
 .topbar { height:70px; }
 .topbar h2,.page-head h3,.modal-head h3 { font-size:20px; }
 .content { padding-top:16px; }
 .data-table td,.data-table th { padding:10px 12px; }
 .whatsapp-inbox-v2 .conversation-item { padding-top:11px; padding-bottom:11px; }
 .sidebar .nav { min-height:38px; padding-top:8px; padding-bottom:8px; }
 .card-head,.card-body { padding:14px 16px; }
 .chat-layout-v2 .chat-room-v2,.chat-layout-v2 .chat-peer { padding-top:11px; padding-bottom:11px; }
}

/* r22: inset grid tools and direct card tables from the outer border. */
.ca-grid-tools { box-sizing:border-box; min-width:0; max-width:100%; padding:8px 16px; margin:0 0 8px; flex-wrap:wrap; }
.ca-grid-tools .ca-grid-hint { min-width:0; flex:1 1 220px; }
.ca-grid-tools .ca-grid-tools-right { min-width:0; max-width:100%; margin-left:auto; flex-wrap:wrap; justify-content:flex-end; }
.card > .ca-grid-tools { margin-top:8px; }
.card > .table-wrap { box-sizing:border-box; width:calc(100% - 32px); max-width:calc(100% - 32px); margin:0 16px 16px; }
.ca-grid-wrap .data-table th,.ca-grid-wrap .data-table td { box-sizing:border-box; }
.ca-grid-wrap .data-table .row-actions { flex-wrap:wrap; gap:6px; }
@media(max-width:700px) {
 .ca-grid-tools { padding-left:12px; padding-right:12px; }
 .card > .table-wrap { width:calc(100% - 24px); max-width:calc(100% - 24px); margin-left:12px; margin-right:12px; margin-bottom:12px; }
}
