:root {
  color-scheme: light;
  --ink: #192338;
  --muted: #53617a;
  --navy: #151f34;
  --navy-hover: #23314c;
  --steel: #f4f6fa;
  --steel-pale: #f8fafd;
  --selected: #e7eeff;
  --paper: #fff;
  --rule: #dce2ec;
  --field: #7c899f;
  --blue: #284fbf;
  --blue-hover: #2143a4;
  --blue-soft: #edf2ff;
  --green: #246447;
  --green-soft: #eaf5ee;
  --amber: #85520d;
  --amber-soft: #fff3dc;
  --red: #a0273c;
  --r-control: 7px;
  --r-panel: 15px;
  --text-meta: .82rem;
  --text-small: .9rem;
  --text-label: .95rem;
  --text-section: 1.1rem;
  --text-title: 1.57rem;
  --bar: 58px;
  --rail: 20px;
  --motion-fast: 120ms;
  --motion-panel: 220ms;
  --motion-out: cubic-bezier(.16, 1, .3, 1);
  font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  accent-color: var(--blue);
  scrollbar-color: #aab8cf transparent;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
a { color: var(--blue); text-underline-offset: .19em; }
a:hover { color: var(--blue-hover); }
::selection { background: #dae5ff; color: var(--navy); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.023em; }
h1 { font-size: 1.95rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: var(--text-section); }
small { font-size: var(--text-meta); }
.muted { color: var(--muted); }
.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; }
.button, .icon-button, .top-button {
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  border-radius: var(--r-control);
  font-weight: 600;
  padding: 7px 12px;
  white-space: nowrap;
  text-decoration: none;
  background: none;
}
.button { min-height: 40px; }
.button, .icon-button, .launcher {
  transition: background-color var(--motion-fast), border-color var(--motion-fast),
    color var(--motion-fast), scale var(--motion-fast) var(--motion-out);
}
.button:active:enabled, .icon-button:active:enabled, .launcher:active:enabled { scale: .97; }
.button.primary { background: var(--blue); color: white; }
.button.primary:hover:enabled, .button.primary:active:enabled { background: var(--blue-hover); }
.button.secondary { background: var(--paper); border-color: var(--rule); color: var(--ink); }
.button.secondary:hover:enabled, .icon-button:hover { background: var(--steel); border-color: var(--rule); color: var(--blue); }
.icon-button { width: 38px; padding: 0; color: var(--muted); }
.button svg, .icon-button svg, .top-button svg, .status svg { flex: none; }
.text-link { color: var(--blue); text-decoration: underline; text-underline-offset: .19em; }
button.text-link { font: inherit; padding: 0; border: 0; background: none; }
input:not([type=checkbox], [type=range], [type=hidden]), textarea, select {
  display: block;
  width: 100%;
  border: 1px solid var(--field);
  border-radius: var(--r-control);
  color: var(--ink);
  background: var(--paper);
  padding: 9px 11px;
  min-height: 41px;
  caret-color: var(--blue);
  font-weight: 400;
}
input::placeholder, textarea::placeholder { color: var(--muted); }
input:focus, textarea:focus, select:focus { border-color: var(--blue); }
textarea { resize: vertical; line-height: 1.45; }
label, .reply-label { display: block; font-size: var(--text-small); font-weight: 650; }
label > :is(input:not([type=checkbox], [type=range]), textarea, select) { margin-top: 5px; }
.stack { display: grid; gap: 14px; }
.form-error { color: var(--red); font-size: var(--text-small); }
.dot { display: inline-block; width: 7px; height: 7px; flex: none; border-radius: 50%; background: #8290a6; }
.dot.online { background: #329a68; }
.avatar { display: inline-grid; flex: none; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-weight: 700; font-size: var(--text-meta); }
.customer-avatar { color: #3e5180; background: #e5ebf7; }
.staff-avatar, .agent-avatar { color: #284ba4; background: #dbe6ff; }
.brand { display: inline-flex; gap: 10px; align-items: center; text-decoration: none; color: inherit; white-space: nowrap; }
.brand:hover { color: inherit; }
.brand strong { font-size: 1.15rem; letter-spacing: -.027em; }
.brand-divider { height: 21px; width: 1px; background: #3c4962; margin: 0 3px; }
.brand-context { color: #c7d4ef; font-weight: 530; font-size: var(--text-label); }

.topbar {
  background: var(--navy);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  height: var(--bar);
  padding: 0 var(--rail);
}
.topbar :focus-visible { outline-color: #b7caff; }
.top-button { color: #f3f6ff; border-color: #42506a; min-height: 35px; font-size: var(--text-small); padding: 6px 10px; }
.top-button:hover:enabled, a.top-button:hover { color: white; background: var(--navy-hover); }

.desk-page { overflow: hidden; }
.desk, .login-view, .website, .login-mail {
  --ink: #222420;
  --muted: #5e625c;
  --rule: #e5e7e2;
  --steel: #f7f8f5;
  --steel-pale: #f9f9f7;
  --desk-ground: #edefe9;
  --desk-accent: #e6743b;
  --desk-action: #242623;
  --desk-hover: #343833;
  --desk-bubble: #f5f6f3;
}
.desk {
  --thread-gutter: clamp(15px, 1.7vw, 30px);
  --desk-header: 60px;
  height: 100dvh;
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  background: var(--desk-ground);
  color: var(--ink);
  padding: 8px 9px;
  overflow: hidden;
}
.workbench {
  position: relative; min-width: 0; min-height: 0; display: grid; gap: 7px; overflow: clip;
  grid-template-columns: clamp(240px, 21%, 318px) minmax(0, 1fr) clamp(214px, 18%, 270px);
}
.inbox-panel, .conversation, .contact {
  min-width: 0; min-height: 0; border-radius: var(--r-panel); overflow: hidden;
  border: 1px solid var(--rule);
}
.inbox-panel, .conversation, .contact { display: flex; flex-direction: column; }
.inbox-panel { background: var(--steel); }
.inbox-heading, .thread-header, .contact-heading {
  min-height: var(--desk-header); flex: none;
  display: flex; align-items: center; border-bottom: 1px solid var(--rule);
}
.inbox-heading {
  container-type: inline-size;
  justify-content: space-between; gap: 8px;
  padding: 5px 10px 5px 13px; border-bottom: 0;
}
.inbox-heading h1, .thread-title h2 { font-size: 1.37rem; font-weight: 700; }
.queue-tabs {
  --picker-track: #eeefeb;
  display: flex; flex: none;
  gap: 3px; padding: 3px;
  border: 1px solid var(--rule); border-radius: 11px; background: var(--picker-track);
}
.queue-tabs button {
  position: relative; display: grid; place-items: center;
  width: 44px; min-height: 38px; padding: 0; border-radius: 8px;
  border: 1px solid transparent; background: transparent; color: var(--ink);
}
.queue-tabs button, .queue-filters button, .queue-row, .agent-profile, .reply-tool summary,
.reply-emojis button, .language-toggle button, .mail-row {
  transition: background-color var(--motion-fast), border-color var(--motion-fast), color var(--motion-fast);
}
@container (max-width: 275px) {
  .inbox-heading h1 { font-size: var(--text-section); }
}
.queue-tabs button:hover { background: var(--steel); }
.queue-tabs button:focus-visible { outline-offset: 1px; }
.queue-tabs button[aria-pressed=true] {
  background: var(--paper); border-color: var(--rule);
  box-shadow: 0 1px 2px rgb(34 36 32 / .09);
}
.queue-tabs button.attention svg { color: var(--amber); }
.tab-count {
  position: absolute; inset-block-start: -4px; inset-inline-end: -2px;
  display: grid; place-items: center; min-width: 18px; height: 18px; padding-inline: 4px;
  border-radius: 999px; background: #c52c24; color: white;
  box-shadow: 0 0 0 2px var(--picker-track); pointer-events: none;
  font-size: .75rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums;
}
.inbox-footer { flex: none; border-top: 1px solid var(--rule); container-type: inline-size; }
.inbox-agent {
  display: flex; align-items: center; justify-content: space-between; gap: 5px 9px;
  position: relative; padding: 8px 12px;
}
.agent-menu-links { display: grid; gap: 2px; padding: 5px; border-bottom: 1px solid var(--rule); }
.agent-menu-links a, .agent-menu-links .button {
  display: flex; align-items: center; justify-content: flex-start; gap: 8px;
  min-height: 34px; padding: 5px 8px; border-radius: var(--r-control);
  color: var(--ink); font-size: var(--text-small); font-weight: 600; text-decoration: none; text-align: left;
}
.agent-menu-links a:hover, .agent-menu-links .button:hover { background: var(--steel); }
.agent-menu { min-width: 0; }
.agent-profile {
  display: flex; align-items: center; gap: 7px; min-width: 0; min-height: 34px;
  margin-inline-start: -4px; padding: 3px 5px; border-radius: var(--r-control);
  cursor: pointer; list-style: none; font-weight: 600; font-size: var(--text-small);
}
.agent-profile::-webkit-details-marker { display: none; }
.agent-profile:hover, .agent-menu[open] .agent-profile { background: #e9ebe5; }
.agent-profile svg { flex: none; color: var(--muted); transform: rotate(-90deg); transition: transform var(--motion-panel) var(--motion-out); }
.agent-menu[open] .agent-profile svg { transform: rotate(90deg); }
.agent-actions {
  position: absolute; z-index: 2; inset-inline-start: 8px; inset-block-end: calc(100% + 6px);
  width: min(320px, calc(100% - 16px)); max-height: calc(100dvh - 104px);
  overflow-y: auto; overscroll-behavior: contain;
  background: var(--paper); border: 1px solid var(--rule);
  border-radius: 12px; box-shadow: 0 6px 18px rgb(34 36 32 / .13);
}
.agent-actions .setting { padding: 11px 13px; border-bottom: 1px solid var(--rule); }
.agent-actions .setting p { font-size: var(--text-meta); margin-top: 4px; }
.agent-actions select { min-height: 35px; margin-top: 5px; padding: 5px 8px; }
.setting-title, .checkbox-setting { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.setting-title output { color: var(--blue); font-weight: 650; font-variant-numeric: tabular-nums; }
.volume-control { display: flex; align-items: center; gap: 8px; margin-top: 7px; }
.volume-control input { flex: 1; min-width: 0; min-height: 34px; }
.volume-control .button { min-height: 34px; padding: 5px 8px; font-size: var(--text-meta); }
.checkbox-setting { cursor: pointer; min-height: 26px; }
.checkbox-setting input { width: 18px; height: 18px; margin: 0; flex: none; }
.agent-actions-footer { padding: 4px; }
.agent-actions-footer > .button {
  justify-content: flex-start; width: 100%; min-height: 35px; padding: 5px 8px;
  font-size: var(--text-small);
}
.agent-actions-footer .sign-out { color: var(--red); }
.agent-actions-footer .sign-out:hover:enabled { background: var(--red-soft); }
.logout-confirmation { padding: 7px 8px 6px; font-size: var(--text-small); }
.logout-confirmation p { margin-bottom: 8px; font-weight: 650; }
.logout-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.logout-actions .button { min-height: 34px; padding: 4px 9px; font-size: var(--text-small); }
.agent-actions :focus-visible { outline-offset: 1px; }
.agent-profile .avatar { width: 26px; height: 26px; color: #34473e; background: #dce8df; }
#agent-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.availability { display: flex; align-items: center; flex: none; gap: 5px 7px; }
.availability .button { min-height: 30px; padding: 4px 7px; gap: 5px; border-color: var(--rule); background: var(--paper); font-size: var(--text-meta); }
.availability .button:hover { background: #eeefeb; }
.team-online { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: var(--text-meta); white-space: nowrap; }
.team-online .dot { width: 5px; height: 5px; }
@container (max-width: 330px) {
  .availability { flex-direction: column; align-items: flex-end; gap: 2px; }
}
@container (max-width: 280px) {
  .inbox-agent { column-gap: 6px; padding-inline: 9px; }
}
.switch-track { width: 22px; height: 13px; border-radius: 16px; position: relative; background: #687167; transition: background-color var(--motion-panel); }
.switch-track::after { content: ""; position: absolute; width: 9px; height: 9px; top: 2px; left: 2px; border-radius: 50%; background: white; transition: transform var(--motion-panel) var(--motion-out); }
[aria-checked=true] .switch-track { background: #248451; }
[aria-checked=true] .switch-track::after { transform: translateX(9px); }

.queue-search { position: relative; margin: 0 9px; flex: none; }
.queue-search svg { position: absolute; top: 50%; left: 9px; translate: 0 -50%; color: var(--muted); pointer-events: none; }
.queue-search input[type=search] { margin: 0; min-height: 34px; padding: 5px 8px 5px 31px; border-color: var(--rule); }
.queue-filters { display: flex; flex: none; gap: 5px; padding: 6px 11px 4px; }
.queue-filters button { background: transparent; border: 1px solid transparent; padding: 4px 6px; border-radius: 5px; color: var(--muted); font-size: var(--text-small); }
.queue-filters button:hover { background: #eeefeb; }
.queue-filters button[aria-pressed=true] { color: var(--ink); font-weight: 700; }
.queue-list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 8px 8px; }
.queue-row {
  display: flex; align-items: flex-start; text-align: left; gap: 8px; width: 100%;
  border: 1px solid transparent; border-radius: 12px; padding: 7px 8px; margin-bottom: 2px;
  min-height: 49px; background: transparent;
}
.queue-row:hover { background: #eeefeb; }
.queue-row[aria-current=true] {
  background: var(--paper); border-color: var(--rule);
  box-shadow: 0 1px 3px rgb(34 36 32 / .1);
}
.queue-row:focus-visible { outline-offset: -2px; }
.desk .customer-avatar { color: #263d2d; background: #c4e8ca; }
.desk .customer-avatar[data-tone=lilac] { color: #3e3155; background: #dfd6f2; }
.desk .customer-avatar[data-tone=sky] { color: #294563; background: #cce0f5; }
.desk .customer-avatar[data-tone=peach] { color: #54392b; background: #f2d7c7; }
.desk .customer-avatar[data-tone=rose] { color: #542f3a; background: #f1d1da; }
.desk .staff-avatar { color: #324339; background: #dde7df; }
.queue-row .avatar { width: 25px; height: 25px; margin-top: 1px; }
.queue-text { display: grid; gap: 2px; flex: 1; min-width: 0; }
.queue-line { display: flex; gap: 5px; min-width: 0; align-items: baseline; }
.queue-meta { justify-content: space-between; }
.queue-person, .queue-preview { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-person { font-weight: 670; }
.queue-preview { color: var(--muted); font-size: var(--text-small); }
.queue-identity time, .queue-deadline { flex: none; white-space: nowrap; color: var(--muted); font-size: var(--text-meta); font-variant-numeric: tabular-nums; }
.queue-identity time { margin-inline-start: auto; }
.queue-deadline { color: var(--amber); font-weight: 680; }
.status, .demo-tag, .reference { display: inline-flex; align-items: center; gap: 5px; font-size: var(--text-meta); line-height: 1.45; font-weight: 600; white-space: nowrap; }
.status.open { color: var(--green); }
.status.open .dot { background: #3a9467; }
.status.waiting { color: var(--amber); }
.status.waiting .dot { background: #bb7b21; }
.status.closed, .demo-tag, .reference { color: var(--muted); }
.demo-tag { flex: none; }
.reference { font-weight: 680; font-variant-numeric: tabular-nums; letter-spacing: .015em; }
.status .dot { width: 6px; height: 6px; }
.queue-empty { display: grid; gap: 6px; justify-items: start; padding: 17px 9px; color: var(--muted); }
.queue-empty strong { color: var(--ink); }

.conversation, .contact { background: var(--paper); }
.thread-header { padding: 8px var(--thread-gutter); justify-content: space-between; gap: 9px; }
.thread-heading { min-width: 0; display: flex; align-items: center; gap: 6px; }
.thread-title { min-width: 0; }
.thread-title h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-controls { display: flex; align-items: center; gap: 4px; flex: none; }
.desk-action { border-radius: 999px; background: var(--desk-action); color: white; min-height: 34px; padding: 6px 13px; font-size: var(--text-small); }
.desk-action:hover:enabled { background: var(--desk-hover); }
.thread-log { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 22px var(--thread-gutter); }
.thread-log:focus-visible { outline-offset: -3px; }
.day-rule { display: flex; align-items: center; gap: 9px; margin: 12px 0; color: var(--muted); font-size: var(--text-meta); white-space: nowrap; }
.day-rule::before, .day-rule::after { content: ""; background: var(--rule); height: 1px; flex: 1; }
.thread-message { display: flex; align-items: flex-end; gap: 7px; margin-bottom: 11px; }
.thread-message.staff { flex-direction: row-reverse; }
.thread-message-content { min-width: 0; max-width: min(600px, 88%); padding: 10px 13px; background: var(--desk-bubble); border-radius: 12px; }
.thread-message.staff .thread-message-content { background: #ebf0e9; }
.thread-message .avatar { width: 24px; height: 24px; }
.message-meta { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: var(--text-meta); }
.message-meta strong { color: var(--ink); font-size: var(--text-label); }
.message-meta time { white-space: nowrap; font-variant-numeric: tabular-nums; }
.thread-message .message-meta { margin-top: 7px; gap: 6px; }
.thread-message .message-meta strong { color: inherit; font-size: inherit; font-weight: 600; }
.thread-message p, .widget-message p, .mail-body { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 4px; line-height: 1.54; max-width: 69ch; }
.thread-message p { margin-top: 0; }
.thread-notice { display: flex; align-items: flex-start; justify-content: center; gap: 7px; color: var(--muted); font-size: var(--text-small); margin: 0 auto 13px; padding: 6px; }
.thread-notice svg { flex: none; }
.thread-footer { flex: none; padding: 5px 10px 10px; background: var(--paper); }
.reply-box {
  --reply-inset: 14px;
  background: var(--paper); border: 1px solid #b9bdb5; border-radius: 15px;
  box-shadow: 0 3px 9px rgb(34 36 32 / .08);
  transition: border-color var(--motion-fast);
}
.reply-box:has(textarea:focus) { border-color: #70756d; }
.reply-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px var(--reply-inset) 0; }
.reply-label { display: flex; align-items: center; gap: 7px; font-size: var(--text-label); }
.reply-channel {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px; border-radius: 6px;
  background: var(--steel); color: var(--muted); font-size: var(--text-meta);
}
.reply-box textarea {
  resize: none; field-sizing: content; min-height: clamp(78px, 15dvh, 135px); max-height: min(280px, 38dvh);
  border: 0; border-radius: 0; padding: 11px var(--reply-inset); font-size: inherit; line-height: 1.55;
}
.reply-box:has(textarea:focus-visible) { outline: 2px solid var(--blue); outline-offset: 1px; }
.reply-box textarea:focus-visible { outline: none; }
.reply-actions, .thread-action { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.reply-actions { position: relative; padding: 3px var(--reply-inset) 10px; }
.reply-actions .desk-action { min-height: 38px; }
.reply-connection { color: var(--muted); font-size: var(--text-meta); padding: 0 var(--reply-inset) 6px; }
.reply-tools { display: flex; align-items: center; gap: 2px; }
.reply-tool summary { width: 36px; min-height: 36px; list-style: none; cursor: pointer; color: var(--ink); }
.reply-tool summary::-webkit-details-marker { display: none; }
.reply-tool[open] summary { background: var(--steel); border-color: var(--rule); }
.reply-tool-panel {
  position: absolute; z-index: 2; bottom: calc(100% + 4px); left: var(--reply-inset);
  width: min(270px, calc(100% - 2 * var(--reply-inset))); max-height: min(240px, 36dvh);
  overflow: auto; padding: 9px; background: var(--paper); border: 1px solid var(--rule);
  border-radius: 12px; box-shadow: 0 6px 20px rgb(34 36 32 / .14);
}
.reply-tool-title { display: block; padding: 2px 4px 7px; font-size: var(--text-small); }
.reply-emojis button { border: 0; background: transparent; border-radius: 7px; }
.reply-emojis button:hover { background: var(--steel); }
.reply-emojis { display: flex; flex-wrap: wrap; gap: 3px; }
.reply-emojis button { width: 36px; height: 36px; font-size: 18px; }
.attach-image { width: 36px; min-height: 36px; color: var(--ink); }
.reply-box.image-drop-active { border-color: var(--blue); outline: 2px dashed var(--blue); outline-offset: 1px; }
.image-drop-active textarea { background: var(--blue-soft); }
.image-drafts { display: flex; gap: 6px; overflow-x: auto; padding: 3px 10px 7px; }
.image-error { padding: 0 var(--reply-inset) 7px; }
.image-draft {
  display: flex; align-items: center; gap: 6px; flex: none; max-width: min(170px, 100%);
  padding: 3px; border: 1px solid var(--rule); border-radius: var(--r-control);
  background: var(--steel-pale); font-size: var(--text-meta);
}
.image-draft img { width: 28px; height: 28px; flex: none; border-radius: 4px; object-fit: cover; }
.image-draft span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.image-draft button { width: 26px; min-height: 26px; flex: none; }
.image-draft button:focus-visible { outline-offset: 0; }
.message-images { display: flex; flex-wrap: wrap; gap: 7px; margin-block: 6px; }
.message-images a {
  display: grid; place-items: center; width: min(160px, 100%); height: 108px;
  border: 1px solid var(--rule); border-radius: var(--r-control); overflow: hidden; background: var(--paper);
}
.message-images img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.waiting-action { background: var(--amber-soft); border-radius: 11px; padding: 11px 12px; }
.waiting-context { display: flex; align-items: flex-start; gap: 8px; }
.waiting-context svg { flex: none; color: var(--amber); margin-top: 1px; }
.thread-action p { color: var(--muted); font-size: var(--text-meta); }
.thread-action p { margin-top: 3px; }
.thread-action.quiet { padding: 8px 10px; border-top: 1px solid var(--rule); }
.timer { color: var(--amber); font-weight: 720; font-variant-numeric: tabular-nums; }
.pane-empty { margin: auto; padding: 24px; text-align: center; color: var(--muted); display: grid; justify-items: center; gap: 8px; }
.pane-empty h2 { color: var(--ink); }
.pane-empty svg { color: var(--blue); }
.mobile-back, .details-trigger { display: none; }

.contact-heading { justify-content: space-between; padding: 0 18px; }
.contact-heading h2 { align-self: stretch; display: flex; align-items: center; border-bottom: 2px solid var(--desk-accent); margin-bottom: -1px; font-size: var(--text-label); }
.contact-scroll { overflow-y: auto; min-height: 0; overscroll-behavior: contain; }
.detail-section, .history { border-bottom: 1px solid var(--rule); padding: 15px 14px; }
.detail-section h3, .history h3 { font-size: var(--text-label); }
.customer-identity { display: flex; align-items: center; gap: 8px; margin-bottom: 11px; }
.customer-identity .avatar { width: 28px; height: 28px; }
.customer-identity h3 { overflow-wrap: anywhere; }
.contact-fields { margin: 11px 0 0; display: grid; gap: 11px; }
.contact-fields > div { display: grid; grid-template-columns: minmax(56px, 36%) minmax(0, 1fr); align-items: baseline; gap: 7px; min-width: 0; }
.contact-fields dt { color: var(--muted); font-size: var(--text-small); }
.contact-fields dd { margin: 0; font-size: var(--text-small); overflow-wrap: anywhere; }
.contact-fields dd.reference { display: block; white-space: normal; }
.contact-fields dd .demo-tag { margin-left: 4px; }
.contact-fields a { color: var(--ink); text-decoration-color: #a7aba4; }
.contact-fields a:hover { text-decoration-color: currentColor; }
.contact-empty { padding: 16px 18px; color: var(--muted); }
.history h3 { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-bottom: 8px; }
.history h3 span { color: var(--muted); font-size: var(--text-meta); }
.history p { color: var(--muted); font-size: var(--text-small); }
.history-row {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 6px;
  text-align: left; background: transparent; border: 0; border-top: 1px solid var(--rule); padding: 9px 0;
}
.history-row:hover strong { text-decoration: underline; text-underline-offset: .19em; }
.history-row span { min-width: 0; }
.history-row strong, .history-row small { display: block; }
.history-row strong { font-size: var(--text-small); overflow-wrap: anywhere; }
.history-row small { color: var(--muted); margin-top: 3px; font-size: var(--text-meta); }
.history-row svg { color: var(--muted); flex: none; }

.login-view {
  min-height: 100dvh; max-height: 100dvh; overflow-y: auto; padding: 24px 16px;
  display: grid; align-items: safe center; background: var(--desk-ground); color: var(--ink);
}
.login-inner {
  width: min(100%, 420px); margin: auto; border: 1px solid var(--rule);
  border-radius: var(--r-panel); background: var(--paper);
}
.login-brand { display: flex; padding: 15px 23px; border-bottom: 1px solid var(--rule); }
.login-brand img { width: 155px; height: auto; }
.login-main { padding: 22px 23px 24px; }
.login-main h1 { font-size: var(--text-title); margin-bottom: 6px; }
.login-main form { margin-top: 18px; }
.login-main button[type=submit] { justify-self: start; }
.login-sent { padding: 10px 12px; background: var(--steel); border-radius: var(--r-control); }
.login-sent a { display: inline-block; margin-top: 6px; }
.login-mail { max-width: 440px; margin: 0 auto; padding: 22px; border: 1px solid var(--rule); border-radius: var(--r-panel); background: var(--paper); color: var(--ink); }
.login-mail p { margin: 10px 0 14px; overflow-wrap: anywhere; color: var(--muted); }
.access-dialog {
  width: min(480px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0;
  color: var(--ink); background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r-panel);
}
.access-dialog::backdrop { background: rgb(34 36 32 / .28); }
.access-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--rule); }
.access-heading h2 { font-size: var(--text-section); }
.access-form { padding: 14px 16px; gap: 10px; }
.access-form button { justify-self: start; }
.access-users { list-style: none; margin: 0; padding: 0 16px 12px; }
.access-users li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 9px 0; border-top: 1px solid var(--rule); }
.access-users small, .access-users strong { display: block; overflow-wrap: anywhere; }
.access-users small { color: var(--muted); font-size: var(--text-meta); }
.access-revoke { color: var(--red); justify-self: start; font-size: var(--text-small); }
.access-revoke:hover:enabled { background: var(--red-soft); }
.access-confirmation { grid-column: 2 / -1; padding: 8px 0; font-size: var(--text-small); }
.access-confirm-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.agent-avatar { position: relative; overflow: hidden; }
.agent-portrait { display: none; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.agent-portrait.portrait-ready { display: block; }
.typing-status { flex: none; padding: 5px 13px; color: var(--muted); font-size: var(--text-meta); }
.typing-status p { margin: 3px 0; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 3.7em; overflow: auto; }
.mobile-thread-menu { display: none; }
.desk-toast { position: fixed; z-index: 5; bottom: 14px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 24px); padding: 10px 13px; background: #fff1f2; border: 1px solid #e7b7be; border-radius: var(--r-control); color: var(--red); }

.website { min-height: 100dvh; background: var(--paper); color: var(--ink); --field: #9da398; }
.language-toggle {
  position: fixed; right: 24px; top: 20px; display: flex; gap: 2px;
  border: 1px solid var(--rule); padding: 2px; border-radius: 8px; background: var(--paper);
}
.language-toggle button { min-height: 36px; min-width: 42px; border: 0; border-radius: 5px; color: var(--muted); background: none; font-size: var(--text-meta); font-weight: 690; }
.language-toggle button:hover, .language-toggle button[aria-pressed=true] { color: var(--blue); background: var(--blue-soft); }
.launcher {
  position: fixed; right: 24px; bottom: max(22px, env(safe-area-inset-bottom)); min-height: 48px; padding: 0 15px;
  border: 0; border-radius: 999px; display: flex; align-items: center; gap: 9px;
  background: var(--desk-action); color: var(--paper); font-weight: 680;
}
.launcher:hover { background: var(--desk-hover); }
.launcher svg { color: #b7caff; }
.widget {
  position: fixed; right: 24px; bottom: max(22px, env(safe-area-inset-bottom));
  z-index: 1;
  width: min(382px, calc(100vw - 32px)); max-height: calc(100dvh - 88px);
  border: 1px solid var(--rule); border-radius: var(--r-panel); box-shadow: 0 10px 32px rgb(34 36 32 / .14);
  overflow: hidden; background: var(--paper); display: flex; flex-direction: column;
  transition: opacity var(--motion-panel) var(--motion-out), translate var(--motion-panel) var(--motion-out),
    display var(--motion-panel) allow-discrete;
}
.widget[hidden] {
  opacity: 0; translate: 0 8px; pointer-events: none;
  transition-duration: var(--motion-fast);
}
@starting-style {
  .widget:not([hidden]) { opacity: 0; translate: 0 8px; }
}
.widget-header {
  flex: none; display: flex; align-items: center; gap: 10px;
  padding: 12px 12px 12px 17px; border-bottom: 1px solid var(--rule);
}
.widget-header h1 { font-size: var(--text-section); letter-spacing: -.014em; }
.widget-header .icon-button { flex: none; margin-left: auto; }
.widget-content { display: flex; flex-direction: column; min-height: 0; }
.widget-form { overflow-y: auto; overscroll-behavior: contain; padding: 17px 17px 18px; gap: 12px; }
.widget-intro { padding-bottom: 5px; }
.widget-intro h2 { font-size: 1.24rem; }
.widget-intro p { color: var(--muted); font-size: var(--text-small); margin-top: 5px; }
.optional { color: var(--muted); font-weight: 450; }
.widget-form > button { justify-content: space-between; justify-self: end; min-height: 40px; margin-top: 3px; }
.widget-thread { height: min(256px, 42dvh); min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 16px; }
.widget-thread:focus-visible { outline-offset: -3px; }
.widget-welcome { display: grid; align-content: safe center; justify-items: center; gap: 8px; text-align: center; }
.widget-welcome > button { min-height: 32px; font-size: var(--text-meta); }
.widget-message { width: fit-content; max-width: 90%; padding: 9px 12px; border-radius: 12px; margin-bottom: 10px; background: var(--desk-bubble); }
.widget-message.visitor { margin-left: auto; background: var(--blue-soft); }
.widget-message.system { background: var(--steel); }
.widget-message .message-meta strong { color: inherit; font-size: inherit; font-weight: 600; }
.widget-message p { margin-top: 3px; font-size: var(--text-label); }
.widget-message.system p { font-size: 1rem; }
.widget-notice { display: flex; align-items: flex-start; gap: 8px; color: var(--muted); font-size: var(--text-small); padding: 9px 10px; margin: 4px 0 10px; border-radius: var(--r-control); background: var(--steel-pale); }
.widget-notice svg { flex: none; color: var(--blue); }
.widget-footer { flex: none; padding: 8px 10px 10px; border-top: 1px solid var(--rule); background: var(--paper); }
.widget-footer .form-error { margin-bottom: 7px; }
.widget-unavailable {
  margin-bottom: 7px; padding: 6px 8px; border-radius: var(--r-control);
  background: var(--steel); color: var(--muted); font-size: var(--text-meta);
}
.widget-reply {
  border: 1px solid var(--field); border-radius: 12px; box-shadow: 0 3px 9px rgb(34 36 32 / .08);
}
.widget-reply .reply-connection { padding: 7px 11px 0; }
.widget-reply:has(textarea:focus-visible) { outline: 2px solid var(--blue); outline-offset: 1px; }
.widget-reply textarea { resize: none; border: 0; border-radius: 12px; padding: 9px 11px; }
.widget-reply textarea:focus-visible { outline: none; }
.widget-reply-actions { display: flex; justify-content: space-between; padding: 0 6px 6px; }
.send-icon { width: 36px; height: 36px; flex: none; padding: 0; }
.widget-new { width: 100%; justify-content: space-between; }

.mail-page { background: var(--steel); min-height: 100dvh; }
.mail-view { max-width: 1160px; padding: 27px 22px; margin: 0 auto; }
.mail-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; margin-bottom: 20px; }
.mail-heading h1 { margin-bottom: 6px; }
.mail-content { display: grid; grid-template-columns: minmax(250px, 32%) minmax(0, 1fr); min-height: 424px; border: 1px solid var(--rule); border-radius: var(--r-panel); background: var(--paper); overflow: hidden; }
.mail-list-pane { border-right: 1px solid var(--rule); background: var(--steel-pale); }
.mail-list-pane h2 { font-size: var(--text-section); padding: 15px 18px; border-bottom: 1px solid var(--rule); }
#mail-list { max-height: 66dvh; overflow-y: auto; }
.mail-row { width: 100%; display: flex; align-items: flex-start; gap: 9px; text-align: left; padding: 11px 18px; border: 0; border-bottom: 1px solid var(--rule); background: transparent; }
.mail-row:hover { background: var(--steel); }
.mail-row[aria-current=true] { background: var(--selected); box-shadow: inset 1px 0 var(--blue); }
.mail-row:focus-visible { outline-offset: -3px; }
.mail-row svg { color: var(--muted); flex: none; margin-top: 1px; }
.mail-row[aria-current=true] svg { color: var(--blue); }
.mail-row > span { min-width: 0; }
.mail-row strong, .mail-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-row small { color: var(--muted); }
.mail-row .mail-row-meta { margin-top: 3px; font-size: var(--text-meta); font-variant-numeric: tabular-nums; }
.mail-empty { padding: 15px; }
.mail-detail { display: flex; min-width: 0; }
.mail-message, .mail-compose { padding: 24px; width: 100%; min-width: 0; }
.mail-message h2 { font-size: 1.45rem; margin-bottom: 6px; overflow-wrap: anywhere; }
.mail-message-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: var(--text-meta); }
.mail-message dl { display: grid; gap: 5px; margin: 18px 0 14px; padding: 12px 0; border-block: 1px solid var(--rule); }
.mail-message dl > div { display: grid; grid-template-columns: 48px minmax(0, 1fr); }
.mail-message dt { color: var(--muted); font-weight: 600; }
.mail-message dd { margin: 0; overflow-wrap: anywhere; }
.mail-message button { margin-top: 17px; }
.mail-compose { align-self: start; max-width: 610px; }
.mail-compose-heading p { margin-top: 4px; }
.mail-compose input[readonly] { background: var(--steel-pale); }
.mail-compose-actions { display: flex; flex-wrap: wrap; gap: 8px; }
#mail-error { margin-top: 10px; }

.agent-menu[open] .agent-actions, .reply-tool[open] .reply-tool-panel {
  animation: popover-open 180ms var(--motion-out);
}
.message-arrival { animation: message-arrive 180ms var(--motion-out); }
.reply-ready { animation: reply-ready 280ms var(--motion-out); }
.mail-message, .mail-compose, .thread-selected { animation: content-change 160ms ease-out; }

@keyframes popover-open {
  from { opacity: 0; translate: 0 6px; }
}
@keyframes message-arrive {
  from { opacity: .55; translate: 0 4px; }
}
@keyframes reply-ready {
  from { opacity: .55; translate: 0 9px; }
}
@keyframes content-change {
  from { opacity: .72; }
}
@keyframes mobile-pane-open {
  from { opacity: .72; translate: var(--pane-enter-offset) 0; }
}

@media (min-width: 1600px) {
  .desk {
    --desk-header: clamp(60px, 4.2vw, 90px);
    --text-meta: clamp(.82rem, .7vw, 1rem);
    --text-small: clamp(.9rem, .79vw, 1.16rem);
    --text-label: clamp(.95rem, .84vw, 1.22rem);
    padding-block: clamp(8px, .65vw, 14px);
    font-size: clamp(14px, .87vw, 19px);
  }
  .contact-heading { padding-inline: 24px; }
  .inbox-heading h1, .thread-title h2 { font-size: clamp(1.37rem, 1.29vw, 1.9rem); }
  .queue-filters, .queue-list { padding-inline: 13px; }
  .queue-row { min-height: 58px; padding: 8px 9px; }
  .queue-row .avatar, .thread-message .avatar { width: 33px; height: 33px; }
  .thread-log { padding-top: 30px; }
  .thread-message { gap: 9px; margin-bottom: 14px; }
  .thread-message-content { padding: 13px 17px; max-width: min(710px, 88%); }
  .detail-section, .history { padding: 17px 16px; }
  .contact-fields { gap: 14px; }
  .desk-action { min-height: 41px; padding-inline: 16px; }
  .reply-box { --reply-inset: 18px; }
}
@media (max-width: 1100px) {
  .workbench { grid-template-columns: clamp(225px, 29%, 290px) minmax(0, 1fr); }
  .details-trigger { display: inline-flex; }
  .contact {
    position: absolute; inset: 0 0 0 auto; width: min(270px, 100%); z-index: 2;
    box-shadow: -10px 0 24px rgb(34 36 32 / .12);
    visibility: hidden; opacity: 0; translate: 16px 0; pointer-events: none;
    transition: opacity var(--motion-fast) ease-in, translate var(--motion-fast) ease-in,
      visibility 0s linear var(--motion-fast);
  }
  .details-open .contact {
    visibility: visible; opacity: 1; translate: 0 0; pointer-events: auto;
    transition: opacity var(--motion-panel) var(--motion-out), translate var(--motion-panel) var(--motion-out);
  }
}
@media (max-width: 680px) {
  :root { --bar: 55px; --rail: 16px; }
  .topbar { padding: 0 10px; gap: 7px; }
  .brand-divider, .brand-context { display: none; }
  .brand { gap: 7px; }
  .brand strong { font-size: var(--text-section); }
  .top-button { padding: 5px 8px; }
  .desk { padding: 5px; --desk-header: 48px; --thread-gutter: 11px; }
  .workbench { grid-template-columns: minmax(0, 1fr); }
  .inbox-heading h1, .thread-title h2 { font-size: var(--text-section); }
  .workbench:not(.mobile-thread) .conversation, .mobile-thread .inbox-panel { display: none; }
  .mobile-thread .conversation {
    --pane-enter-offset: 12px;
    animation: mobile-pane-open var(--motion-panel) var(--motion-out);
  }
  .workbench:not(.mobile-thread):has(.thread-log) .inbox-panel {
    --pane-enter-offset: -12px;
    animation: mobile-pane-open var(--motion-panel) var(--motion-out);
  }
  .thread-selected { animation: none; }
  .mobile-back { display: inline-flex; }
  .thread-header { padding: 6px 8px 6px 4px; }
  .thread-header .icon-button { width: 30px; }
  .thread-heading { gap: 3px; }
  .thread-controls > button { display: none; }
  .mobile-thread-menu { display: block; position: relative; }
  .mobile-thread-menu summary { list-style: none; cursor: pointer; }
  .mobile-thread-menu summary::-webkit-details-marker { display: none; }
  .mobile-thread-actions {
    position: absolute; z-index: 3; top: calc(100% + 4px); right: 0; width: max-content;
    max-width: calc(100vw - 32px); padding: 4px; border: 1px solid var(--rule);
    border-radius: var(--r-control); background: var(--paper); box-shadow: 0 4px 14px rgb(34 36 32 / .12);
  }
  .mobile-thread-actions .button { display: flex; width: 100%; justify-content: flex-start; min-height: 38px; }
  .mobile-thread-actions .button:hover { background: var(--steel); }
  .close-conversation { padding-inline: 8px; font-size: var(--text-meta); gap: 4px; }
  .close-conversation svg { width: 13px; }
  .thread-log { padding-top: 13px; }
  .thread-message-content { max-width: 86%; }
  .thread-footer { padding: 4px 7px 7px; }
  .reply-box { --reply-inset: 10px; }
  .reply-box textarea { font-size: 16px; }
  .waiting-context svg { display: none; }
  .waiting-action { align-items: flex-start; flex-direction: column; }
  .waiting-action .desk-action { align-self: flex-end; }
  .login-inner { width: min(100%, 410px); grid-template-columns: minmax(0, 1fr); }
  .login-brand { padding: 13px 19px; }
  .login-main { padding: 21px 19px 22px; }
  .login-main form { margin-top: 16px; }
  .login-main button[type=submit] { width: 100%; }
  .mail-view { padding: 18px 12px; }
  .mail-heading { align-items: flex-start; flex-direction: column; }
  .mail-content { grid-template-columns: minmax(0, 1fr); }
  .mail-list-pane { border-right: 0; border-bottom: 1px solid var(--rule); }
  #mail-list { max-height: 174px; }
  .mail-message, .mail-compose { padding: 16px; }
  .mail-view:has(.mail-compose) .mail-list-pane, .mail-view:has(.mail-compose) #new-mail { display: none; }
  .mail-content:has(.mail-compose) { min-height: 0; }
  input:not([type=checkbox], [type=range], [type=hidden]), select, textarea { font-size: 16px; }
}
@media (max-width: 440px) {
  .access-users li { grid-template-columns: auto minmax(0, 1fr); row-gap: 2px; }
  .access-users li:has(> .access-revoke) .avatar { grid-row: span 2; align-self: start; }
  .access-users li > .access-revoke { grid-column: 2; }
  .language-toggle { top: 12px; right: 12px; }
  .launcher { right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); }
}
@media (max-width: 680px), (max-width: 960px) and (max-height: 500px) and (pointer: coarse) {
  .website:has(.widget:not([hidden])) { overflow: hidden; }
  .website > .language-toggle { top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); }
  .launcher { right: max(12px, env(safe-area-inset-right)); }
  .widget {
    inset: var(--widget-top, 0px) 0 auto;
    width: 100%; height: var(--widget-height, 100dvh); max-height: none;
    border: 0; border-radius: 0; box-shadow: none;
  }
  .widget-header {
    padding: max(8px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left));
    gap: 8px;
  }
  .widget-header .language-toggle { position: static; flex: none; margin-left: auto; }
  .widget-header .language-toggle + .icon-button { margin-left: 0; }
  .widget-header .language-toggle button, .widget-header .icon-button,
  .widget-reply-actions :is(.icon-button, .send-icon) { width: 44px; min-height: 44px; }
  .widget-content, .widget-thread, .widget-form { flex: 1; }
  .widget-thread, .widget-form {
    height: auto;
    padding-inline: max(16px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-right));
  }
  .widget-form { align-content: start; }
  .widget-form input, .widget-reply textarea, .widget-message p, .widget-message.system p { font-size: 16px; }
  .widget-footer {
    max-height: 65%; overflow-y: auto; overscroll-behavior: contain;
    padding-inline: max(12px, env(safe-area-inset-left)) max(12px, env(safe-area-inset-right));
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .button:active:enabled, .icon-button:active:enabled, .launcher:active:enabled { scale: none; }
}
