/* Canonical mail workspace styles. One definition per component, no versioned override layers. */

.thread-list-card,
.manager-queue,
.contact-review-list {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
}
.thread-rows,
.queue-rows,
.contact-review-rows {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding: 4px;
  background: var(--surface-inset);
  scrollbar-gutter: stable;
}
.reader-card,
.desk-main,
.desk-side,
.allocation-side { min-height: 0; }
.incoming-head-actions { display: flex; align-items: center; gap: 5px; }
.incoming-head-actions .mini-button { min-height: 28px; height: 28px; padding: 0 8px; font-size: 10px; }
.incoming-head-actions select { width: 92px; height: 28px; font-size: 10.5px; }
.reader-empty {
  min-height: 120px;
  display: grid;
  place-items: center;
  padding: 18px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.filters,
.allocation-filters {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 3px;
  margin: 6px 6px 2px;
  padding: 3px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-inset);
  scrollbar-width: none;
}
.filters::-webkit-scrollbar,
.allocation-filters::-webkit-scrollbar { display: none; }
.filters button,
.allocation-filters button {
  flex: 0 0 auto;
  min-height: 25px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 7px;
  border-radius: 6px;
  background: transparent;
  color: var(--text-2);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.filters button:hover,
.allocation-filters button:hover { background: var(--surface-3); }
.filters button.on,
.allocation-filters button.on { background: var(--accent-soft); color: var(--accent); }
.filters button em,
.allocation-filters button em {
  min-width: 16px;
  height: 16px;
  display: inline-grid;
  place-items: center;
  padding: 0 4px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  font-size: 10.5px;
  font-style: normal;
}

.bulk-toolbar {
  position: sticky;
  top: 0;
  z-index: 4;
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 1px 4px;
  padding: 5px 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.bulk-toolbar > span { min-width: 0; color: var(--muted); font-size: 11px; }
.bulk-toolbar select,
.bulk-toolbar .button,
.bulk-assign-disabled { min-height: 25px; height: 25px; border-radius: 6px; padding: 0 7px; font-size: 11px; }
.bulk-assign-disabled { border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); }
.bulk-check { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); font-size: 11px; font-weight: 750; white-space: nowrap; }
.bulk-check input, .select-cell input { width: 13px; height: 13px; }

.thread-row,
.queue-row {
  position: relative;
  width: calc(100% - 2px);
  margin: 1px;
  display: grid;
  align-items: start;
  color: var(--text);
  text-align: left;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  transition: background .12s ease, border-color .12s ease, transform .12s ease;
}
.thread-row {
  gap: 7px;
  min-height: 78px;
  padding: 8px 9px;
}
.thread-row.single-mode { grid-template-columns: 32px minmax(0, 1fr); }
.thread-row.bulk-mode { grid-template-columns: 18px 32px minmax(0, 1fr); }
.queue-row {
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 8px;
  min-height: 82px;
  padding: 9px 9px;
}
.thread-row:hover, .queue-row:hover { background: var(--surface); border-color: var(--line); }
.thread-row.active, .queue-row.active {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 32%, var(--line));
  box-shadow: inset 3px 0 0 var(--accent);
}
.thread-row.sla-overdue, .queue-row.sla-overdue { box-shadow: inset 2px 0 0 var(--danger); }
.thread-row.sla-risk, .queue-row.sla-risk { box-shadow: inset 2px 0 0 var(--warning); }
.thread-row.active.sla-overdue, .queue-row.active.sla-overdue { box-shadow: inset 3px 0 0 var(--danger); }
.thread-row.active.sla-risk, .queue-row.active.sla-risk { box-shadow: inset 3px 0 0 var(--warning); }
.queue-row.attention-critical:not(.active) { border-color: color-mix(in srgb, var(--danger) 38%, var(--line)); background: color-mix(in srgb, var(--danger-soft) 45%, var(--surface-2)); }
.queue-row.attention-high:not(.active), .queue-row.attention-soon:not(.active) { border-color: color-mix(in srgb, var(--warning) 32%, var(--line)); background: color-mix(in srgb, var(--warning-soft) 38%, var(--surface-2)); }
.queue-row.attention-critical .thread-subject { color: color-mix(in srgb, var(--danger) 78%, var(--text)); }

.select-cell { height: 30px; display: grid; place-items: center; }
.avatar-cell { position: relative; width: 32px; height: 32px; display: grid; place-items: center; }
.sender-avatar {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.sender-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.unread-dot,
.priority-dot {
  position: absolute;
  left: -2px;
  bottom: 0;
  width: 7px;
  height: 7px;
  border: 1.5px solid var(--surface);
  border-radius: 50%;
  background: var(--accent);
}
.priority-dot.high { background: var(--danger); }
.priority-dot.medium { background: var(--warning); }
.priority-dot.low { background: var(--success); }
.thread-main { min-width: 0; }
.thread-line { min-width: 0; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: start; gap: 6px; }
.thread-line strong,
.queue-row .thread-main > strong { min-width: 0; overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; font-size: 12px; line-height: 1.25; }
.thread-line strong { font-weight: 820; }
.thread-subject { display: block; min-width: 0; margin-top: 2px; overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; color: var(--text-2); font-size: 11.5px; line-height: 1.28; font-weight: 720; }
.queue-snippet { display: -webkit-box; margin-top: 3px; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; color: var(--muted); font-size: 10.5px; line-height: 1.32; font-weight: 520; }
.queue-row .queue-badges { margin-top: 5px; }
.queue-row[hidden] { display: none; }
.crm-queue-label { border-color: color-mix(in srgb, var(--accent) 22%, var(--line)); background: color-mix(in srgb, var(--accent-soft) 55%, var(--surface-2)); }
.thread-main p { margin: 3px 0 5px; display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; color: var(--muted); font-size: 10.8px; line-height: 1.28; }
.thread-badges,
.queue-badges,
.operational-badges { min-width: 0; display: flex; align-items: center; align-content: flex-start; gap: 4px; }
.thread-badges, .queue-badges { flex-wrap: wrap; max-height: none; overflow: visible; }
.thread-badges .chip,
.queue-badges .chip,
.operational-badges .chip,
.thread-fact,
.gmail-label,
.moved-badge {
  flex: 0 0 auto;
  max-width: 168px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.thread-fact { max-width: 100%; white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; line-height: 1.2; }
.thread-fact,
.gmail-label,
.moved-badge {
  min-height: 18px;
  display: inline-flex;
  align-items: center;
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 10.5px;
  font-weight: 750;
}
.chip.contact-missing { background: var(--warning-soft); color: var(--warning); }
.thread-meta { color: var(--muted); font-size: 10.5px; line-height: 1.2; text-align: right; white-space: nowrap; }
.thread-line .thread-meta { align-self: start; }
.paperclip-svg { display: inline-block; vertical-align: middle; }

/* Allocation */
.allocation-reader { display: flex; flex-direction: column; overflow: hidden; }
.allocation-local-search { display: none; }
.allocation-mobile-back, .allocation-side-mobile-head { display: none; }
.allocation-mail-head {
  flex: 0 0 auto;
  min-height: 58px;
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.reader-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.reader-title-row > div:first-child { min-width: 0; }
.reader-title-row h2 { margin: 0 0 3px; font-size: 14px; line-height: 1.28; letter-spacing: -.015em; overflow-wrap: anywhere; }
.reader-title-row p { margin: 0; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.reader-title-row .operational-badges { flex: 0 0 auto; justify-content: flex-end; }
.allocation-messages,
#deskMain > .messages {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  background: var(--surface-inset);
  scrollbar-gutter: stable;
}
.allocation-messages { flex: 1 1 auto; padding: 18px 20px 28px; }
#deskMain > .messages { flex: 1 1 auto; padding: 16px clamp(12px, 2vw, 24px) 24px; }

.message {
  width: min(100%, 920px);
  min-width: 0;
  margin: 0 0 9px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  transition: background-color .14s ease, border-color .14s ease, box-shadow .14s ease, opacity .14s ease;
}
.message.out { margin-left: auto; }
.allocation-messages .message { width: min(100%, 1180px); margin: 0 0 12px; }
#deskMain > .messages .message { width: min(94%, 1020px); }
#deskMain > .messages .message.out { background: color-mix(in srgb, var(--accent-soft) 34%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 22%, var(--line)); }
#deskMain > .messages .message.in { margin-right: auto; }
.message-meta-panel { border-bottom: 1px solid var(--line); padding: 9px 11px; background: color-mix(in srgb, var(--surface-2) 55%, var(--surface)); }
.message-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.message-head-main { min-width: 0; display: flex; align-items: center; gap: 7px; }
.message-head-main b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.message-avatar { width: 27px; height: 27px; font-size: 10px; }
.message-date { flex: 0 0 auto; color: var(--muted); font-size: 10.5px; }
.message-subject { margin-top: 4px; color: var(--text-2); font-size: 11px; font-weight: 750; }
.message-recipients { margin-top: 4px; display: grid; gap: 2px; color: var(--muted); font-size: 10.5px; }
.message-content { padding: 15px 16px 17px; color: var(--text); font-size: 12.5px; line-height: 1.62; overflow-wrap: anywhere; }
.message-body-text { white-space: pre-wrap; }
.email-frame { width: 100%; min-height: 44px; display: block; overflow: hidden; border: 1px solid color-mix(in srgb, var(--line) 75%, transparent); border-radius: 7px; background: var(--surface-2); }
html[data-theme="light"] .email-frame { background: #fff; }
.quoted-block { margin-top: 8px; border-top: 1px solid var(--line); color: var(--text-2); }
.quoted-block > summary { padding: 7px 0 0; cursor: pointer; color: var(--muted); font-size: 11px; font-weight: 750; }
.quote-body { max-height: 320px; overflow: auto; padding-top: 7px; white-space: pre-wrap; }
.quoted-frame { width: 100%; max-height: 320px; border: 0; }
.attachment-list { display: flex; flex-wrap: wrap; gap: 5px; padding: 0 9px 9px; }
.attachment-pill { max-width: 100%; display: inline-flex; align-items: center; gap: 5px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); font-size: 11px; }
.attachment-pill a { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.attachment-pill.disabled { color: var(--muted); }
.download-link { flex: 0 0 auto; }

.allocation-side,
.desk-side {
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  background: var(--surface-inset);
}
.allocation-side { padding: 8px; }
.allocation-section { margin-bottom: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow-card); }
.allocation-section-head { display: flex; align-items: center; justify-content: space-between; gap: 7px; margin-bottom: 7px; }
.allocation-section-head span { color: var(--text-2); font-size: 11px; font-weight: 820; }
.allocation-section-head b { padding: 2px 6px; border-radius: 999px; background: var(--surface-3); color: var(--muted); font-size: 10px; font-weight: 780; }
.contact-check.missing { background: color-mix(in srgb, var(--warning-soft) 72%, var(--surface)); border-color: color-mix(in srgb, var(--warning) 24%, var(--line)); }
.contact-check.missing .allocation-section-head b { color: var(--warning); }
.contact-check.matched .allocation-section-head b { color: var(--success); }
.allocation-contact {
  min-width: 0;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 7px;
  color: var(--text);
  text-decoration: none;
}
.allocation-contact-avatar { width: 30px; height: 30px; }
.allocation-contact span { min-width: 0; }
.allocation-contact strong, .allocation-contact small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.allocation-contact strong { font-size: 12px; }
.allocation-contact small { color: var(--muted); font-size: 10.5px; }
.allocation-contact i { color: var(--muted); font-style: normal; }
.allocation-fields { display: grid; gap: 9px; }
.request-summary-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
.request-summary-item { min-width: 0; display: grid; gap: 2px; padding: 8px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-inset); }
.request-summary-item span { color: var(--muted); font-size: 10px; font-weight: 820; text-transform: uppercase; letter-spacing: .04em; }
.request-summary-item b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10.5px; }
.request-summary-item:first-child { grid-column: 1/-1; }
.request-summary-item.missing { border-color: color-mix(in srgb, var(--warning) 34%, var(--line)); background: color-mix(in srgb, var(--warning-soft) 55%, var(--surface-inset)); }
.request-summary-item.missing span, .request-summary-item.missing b { color: var(--warning); }
.allocation-section-actions { display: flex; align-items: center; gap: 4px; }
.review-state { padding: 2px 6px; border-radius: 999px; font-size: 10px; font-weight: 850; }
.review-state.ready { background: var(--success-soft); color: var(--success); }
.review-state.needs-check { background: var(--warning-soft); color: var(--warning); }
.request-summary-empty { grid-column: 1/-1; padding: 10px; color: var(--muted); font-size: 10.5px; text-align: center; }
.section-edit-button { min-height: 26px; padding: 0 7px; border-radius: 6px; background: transparent; color: var(--accent); font-size: 10.5px; font-weight: 800; }
.section-edit-button:hover { background: var(--accent-soft); }
.parsed-request-card.editing { border-color: color-mix(in srgb,var(--accent) 32%,var(--line)); }
.allocation-fields label,
.allocation-control-label,
.side-form > label,
.date-row > label { min-width: 0; display: grid; gap: 3px; color: var(--text-2); font-size: 10.5px; font-weight: 800; }
.allocation-fields input,
.allocation-fields select,
.allocation-control-label > select,
.side-form input,
.side-form select { height: 34px; border-color: transparent; background: var(--surface-inset); font-size: 11px; }
.allocation-fields input:hover,
.allocation-fields select:hover,
.allocation-control-label > select:hover,
.side-form input:hover,
.side-form select:hover { border-color: var(--line); }
.allocation-date-row,
.allocation-two-col,
.date-row { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.date-control {
  position: relative;
  min-width: 0;
}
.date-control input:not(.native-date-picker) {
  min-width: 0;
  padding-right: 34px;
}
.calendar-button {
  position: absolute;
  z-index: 2;
  top: 3px;
  right: 3px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
}
.calendar-button:hover { background: var(--surface-3); color: var(--text); }
.calendar-button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.native-date-picker { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.allocation-assignment { display: grid; gap: 8px; border-color: color-mix(in srgb, var(--accent) 22%, var(--line)); background: color-mix(in srgb, var(--accent-soft) 42%, var(--surface)); }
.allocation-junk { min-height: 26px; padding: 0 6px; border-radius: 5px; background: transparent; color: var(--danger); font-size: 11px; font-weight: 750; }
.allocation-junk:hover { background: var(--danger-soft); }
.allocation-source { margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.allocation-source summary { cursor: pointer; color: var(--muted); font-size: 11px; font-weight: 750; }
.allocation-source > div { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }

.manager-picker { position: relative; min-width: 0; }
.manager-picker-toggle {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-inset);
  color: var(--text);
  text-align: left;
  transition: border-color .12s ease, background .12s ease;
}
.manager-picker-toggle:hover { border-color: var(--line-strong); background: var(--surface-3); }
.manager-picker-selection { min-width: 0; flex: 1 1 auto; display: grid; gap: 1px; }
.manager-picker-selection b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10.8px; line-height: 1.2; }
.manager-picker-selection small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 8.8px; font-weight: 650; line-height: 1.2; }
.manager-picker-chevron { flex: 0 0 auto; width: 16px; height: 16px; margin-left: auto; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.manager-option-avatar { width: 28px; height: 28px; flex: 0 0 28px; font-size: 9px; }
.manager-picker-empty-avatar { width: 28px; height: 28px; flex: 0 0 28px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-3); color: var(--muted); font-size: 10px; font-weight: 850; }
.manager-picker-menu {
  position: absolute;
  z-index: 80;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  max-height: 330px;
  display: none;
  grid-template-rows: auto minmax(0,1fr);
  gap: 5px;
  overflow: hidden;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
  box-shadow: var(--shadow-pop);
}
.manager-picker.open .manager-picker-menu { display: grid; }
.manager-picker-search { padding: 0 0 2px; }
.manager-picker-search input { width: 100%; height: 32px; font-size: 10.5px; }
.manager-picker-options { min-height: 0; overflow-y: auto; display: grid; gap: 2px; }
.manager-picker-option { width: 100%; min-height: 46px; display: flex; align-items: center; gap: 8px; padding: 6px 7px; border-radius: 8px; background: transparent; color: var(--text); font-size: 11px; text-align: left; }
.manager-picker-copy { min-width: 0; flex: 1 1 auto; display: grid; gap: 2px; }
.manager-picker-copy b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10.8px; }
.manager-picker-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 10px; }
.manager-load { min-width: 28px; padding: 3px 6px; border-radius: 999px; background: var(--surface-3); color: var(--muted); font-size: 10px; font-style: normal; text-align: center; }
.manager-picker-option:hover { background: var(--surface-3); }
.manager-picker.disabled { opacity: .65; pointer-events: none; }
.transfer-picker .manager-picker-toggle { min-height: 44px; background: var(--surface-2); }
.transfer-picker .manager-picker-menu { left: auto; right: 0; width: min(360px, calc(100vw - 32px)); }
.desk-more-actions[open] { position: relative; z-index: 35; overflow: visible; }

/* Sales desk queue */
.manager-queue .card-head select { width: 132px; height: 30px; font-size: 11.5px; }
.queue-tools { position: sticky; z-index: 5; top: 0; flex: 0 0 auto; margin: 5px; padding: 7px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.desk-queue-search { min-width: 0; height: 32px; display: grid; grid-template-columns: 18px minmax(0,1fr) 24px; align-items: center; gap: 3px; margin-bottom: 6px; padding: 0 5px 0 7px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-inset); color: var(--muted); }
.desk-queue-search input { width: 100%; min-width: 0; height: 28px; padding: 0; border: 0; background: transparent; box-shadow: none; color: var(--text); font-size: 11.5px; }
.desk-queue-search button { width: 22px; height: 22px; padding: 0; border-radius: 5px; background: transparent; color: var(--muted); font-size: 15px; line-height: 1; }
.desk-queue-search button:hover { background: var(--surface-3); color: var(--text); }
.queue-section-label,
.queue-section-head { color: var(--muted); font-size: 10px; font-weight: 850; text-transform: uppercase; letter-spacing: .05em; }
.queue-section-head { margin-top: 8px; }
.queue-filter-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
.queue-tab {
  min-width: 0;
  height: 30px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 11px;
  font-weight: 750;
  text-align: left;
}
.queue-tab span { min-width: 0; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-tab em { font-size: 10px; font-style: normal; color: var(--muted); }
.queue-tab.on { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); background: var(--accent-soft); color: var(--accent); }
.queue-tab i { color: var(--muted); font-style: normal; }
.queue-secondary-filters { display: flex; gap: 4px; margin-top: 5px; }
.queue-more-filters { margin-top: 5px; border-top: 1px solid var(--line); }
.queue-more-filters > summary { min-height: 28px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; color: var(--muted); font-size: 9.5px; font-weight: 750; }
.queue-more-filters > summary::-webkit-details-marker { display: none; }
.queue-more-filters > summary span { color: var(--warning); font-size: 8.5px; }
.personal-tabs-inline { margin-top: 4px; padding-top: 5px; border-top: 1px solid var(--line); }
.personal-tabs-title { display: flex; justify-content: space-between; margin-bottom: 4px; color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.queue-tab.compact { flex: 1 1 0; height: 26px; border-color: transparent; background: transparent; font-size: 10.5px; }
.queue-tab.compact:hover { background: var(--surface-3); }
.personal-tabs-box { margin-top: 7px; border-top: 1px solid var(--line); padding-top: 5px; }
.personal-tabs-box > summary { min-height: 26px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; color: var(--muted); font-size: 10.5px; font-weight: 800; }
.personal-tabs-box > summary::-webkit-details-marker { display: none; }
.personal-tabs-box > summary em { min-width: 18px; height: 18px; display: grid; place-items: center; border-radius: 999px; background: var(--surface-3); font-size: 10px; font-style: normal; }
.personal-tab-list { margin-top: 4px; display: grid; gap: 3px; }
.empty-personal-tabs { color: var(--muted); font-size: 10.5px; }
.desk-tab-form { display: grid; grid-template-columns: minmax(0, 1fr) 28px; gap: 4px; margin-top: 5px; }
.desk-tab-form input { height: 27px; font-size: 11px; }
.desk-tab-form .mini-button { min-height: 27px; width: 28px; padding: 0; }
.desk-resizer { cursor: col-resize; display: grid; place-items: center; touch-action: none; user-select: none; border-radius: 6px; }
.desk-resizer:hover, body.resizing-desk-queue .desk-resizer { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.desk-resizer span { width: 2px; height: 46px; border-radius: 999px; background: var(--line-strong); transition: background .12s ease, height .12s ease; }
.desk-resizer:hover span, body.resizing-desk-queue .desk-resizer span { height: 64px; background: var(--accent); }

/* Sales desk conversation */
.desk-main { display: flex; flex-direction: column; overflow: hidden; padding: 0; background: var(--surface-inset); }
.desk-thread-head {
  flex: 0 0 auto;
  display: grid;
  gap: 7px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.desk-primary-head { min-width: 0; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: start; gap: 10px; }
.desk-mobile-back { display: none; }
.desk-head-actions { min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.desk-details-toggle { min-width: 68px; }
.desk-details-toggle.on { background: var(--accent-soft); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }
.desk-title-copy { min-width: 0; }
.desk-title-copy h2 { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; line-height: 1.28; letter-spacing: -.015em; }
.desk-title-copy p { margin: 4px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 9px; color: var(--muted); font-size: 10.8px; }
.desk-title-copy p b { color: var(--text-2); }
.desk-status-rail { min-width: 0; display: flex; align-items: center; gap: 7px; }
.desk-status-rail > .operational-badges { min-width: 0; flex: 1 1 auto; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 1px; scrollbar-width: none; }
.desk-status-rail > .operational-badges::-webkit-scrollbar { display: none; }
.desk-fact-strip { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.desk-fact-strip > span { min-width: 110px; max-width: 260px; display: grid; gap: 1px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); }
.desk-fact-strip small { color: var(--muted); font-size: 8.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.desk-fact-strip b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10.5px; }

.desk-pipeline { flex: 0 0 auto; position: relative; z-index: 14; }
.desk-pipeline > summary { min-height: 30px; display: grid; grid-template-columns: auto minmax(90px,auto) auto 16px; align-items: center; gap: 6px; padding: 0 9px; cursor: pointer; list-style: none; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--muted); white-space: nowrap; transition: border-color .14s ease, background .14s ease; }
.desk-pipeline > summary::-webkit-details-marker { display: none; }
.desk-pipeline > summary:hover { border-color: color-mix(in srgb, var(--accent) 34%, var(--line)); }
.desk-pipeline > summary > span { font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.desk-pipeline > summary > b { overflow: hidden; text-overflow: ellipsis; color: var(--text-2); font-size: 10.5px; }
.desk-pipeline > summary > em { padding-left: 2px; color: var(--muted); font-size: 9px; font-style: normal; }
.desk-pipeline-chevron, .desk-context-chevron { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; color: var(--muted); transition: transform .14s ease; }
.desk-pipeline[open] > summary { border-color: color-mix(in srgb, var(--accent) 42%, var(--line)); background: color-mix(in srgb, var(--accent) 7%, var(--surface-2)); }
.desk-pipeline[open] > summary .desk-pipeline-chevron { transform: rotate(180deg); }
.desk-pipeline[open] .desk-pipeline-panel { animation: crm-pop-in .12s ease-out; }
.desk-pipeline-panel { position: absolute; z-index: 30; top: calc(100% + 6px); right: 0; width: min(930px, calc(100vw - 48px)); display: flex; align-items: stretch; gap: 5px; padding: 8px; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow-pop); }
.pipeline-step { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--muted); cursor: pointer; white-space: nowrap; transition: background .12s ease, border-color .12s ease, color .12s ease; }
.pipeline-step:hover:not(:disabled) { border-color: color-mix(in srgb, var(--accent) 36%, var(--line)); color: var(--text-2); }
.pipeline-step span { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--surface-3); font-size: 9px; font-weight: 800; }
.pipeline-step b { font-size: 10.5px; font-weight: 690; }
.pipeline-step.done { opacity: .76; }
.pipeline-step.done span { background: color-mix(in srgb, var(--success) 16%, var(--surface-2)); color: var(--success); }
.pipeline-step.current { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); color: var(--text); }
.pipeline-step.current span { background: var(--accent); color: var(--accent-contrast, #fff); }
.pipeline-step.terminal.current { border-color: color-mix(in srgb, var(--danger) 55%, var(--line)); background: color-mix(in srgb, var(--danger) 10%, var(--surface)); }
.pipeline-step:disabled { cursor: default; }

.desk-context-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); transition: background-color .14s ease, border-color .14s ease, box-shadow .14s ease; }
.desk-context-panel > summary { min-height: 30px; display: flex; align-items: center; gap: 7px; padding: 0 8px; cursor: pointer; list-style: none; color: var(--text-2); }
.desk-context-panel > summary::-webkit-details-marker { display: none; }
.desk-context-panel > summary span { font-size: 10.5px; font-weight: 800; }
.desk-context-panel > summary b { min-width: 0; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 9.5px; font-weight: 650; }
.desk-context-panel[open] > summary .desk-context-chevron { transform: rotate(180deg); }
.desk-context-panel[open] > summary { border-bottom: 1px solid var(--line); }
.desk-thread-labels { margin: 8px 8px 0; }
.desk-thread-labels .crm-tag-editor { grid-template-columns: minmax(0,1fr) minmax(170px,260px); align-items: start; }
.desk-context-panel .desk-fact-strip { margin: 7px 8px 8px; }

.desk-thread-tools { min-width: 0; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 5px; }
.conversation-tabs { min-width: 0; flex: 1 1 320px; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: thin; }
.conversation-tab { min-width: 128px; max-width: 210px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 1px 5px; padding: 5px 7px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--text-2); text-align: left; }
.conversation-tab b, .conversation-tab span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation-tab b { font-size: 11px; }
.conversation-tab span { grid-column: 1 / -1; color: var(--muted); font-size: 10px; }
.conversation-tab em { font-size: 10px; font-style: normal; }
.conversation-tab.on { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: var(--accent-soft); color: var(--accent); }
.thread-notes-popover, .thread-files-strip { flex: 0 0 auto; margin: 0; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); }
.thread-notes-popover { position: relative; overflow: visible; z-index: 16; }
.thread-files-strip { overflow: hidden; }
.thread-files-strip[open] { flex: 1 0 100%; }
.thread-notes-popover > summary, .thread-files-strip > summary { min-height: 30px; display: flex; align-items: center; gap: 6px; padding: 0 8px; cursor: pointer; list-style: none; color: var(--text-2); font-size: 10.5px; font-weight: 780; transition: background-color .14s ease, border-color .14s ease, color .14s ease; }
.thread-notes-popover > summary::-webkit-details-marker, .thread-files-strip > summary::-webkit-details-marker { display: none; }
.thread-notes-popover[open] > summary { border-color: color-mix(in srgb, var(--accent) 36%, var(--line)); background: var(--accent-soft); color: var(--accent); }
.thread-notes-title { font-size: 10.5px; font-weight: 800; }
.thread-notes-popover > summary b, .thread-files-strip > summary b { min-width: 18px; height: 18px; display: inline-grid; place-items: center; padding: 0 4px; border-radius: 999px; background: var(--surface-3); font-size: 9px; }
.thread-notes-popover > summary em, .thread-files-strip > summary em { min-width: 0; max-width: 180px; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 9.5px; font-style: normal; font-weight: 600; }
.thread-files-strip > summary i { color: var(--accent); font-size: 9.5px; font-style: normal; }
.thread-notes-popover[open] .thread-notes-popover-panel { animation: crm-pop-in .12s ease-out; }
.thread-notes-popover[open] { z-index: 70; }
.thread-notes-popover-panel { position: fixed; z-index: 96; left: 10px; top: 72px; right: auto; bottom: auto; width: min(560px, calc(100vw - 20px)); max-height: min(500px, calc(100vh - 84px)); display: grid; grid-template-rows: auto minmax(0,1fr) auto; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 11px; background: var(--surface); box-shadow: var(--shadow-pop); }
.thread-notes-popover-head { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 9px 7px 11px; border-bottom: 1px solid var(--line); }
.thread-notes-popover-head > div { min-width: 0; display: grid; gap: 1px; }
.thread-notes-popover-head b { font-size: 11.5px; }
.thread-notes-popover-head span { color: var(--muted); font-size: 9.5px; }
.thread-notes-close svg, .desk-side-close svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.thread-note-list { max-height: 320px; display: grid; align-content: start; gap: 6px; overflow-y: auto; padding: 8px; scrollbar-gutter: stable; }
.thread-note-item { max-height: 180px; overflow: auto; padding: 8px 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); font-size: 11.5px; }
.thread-note-item header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 5px; color: var(--muted); font-size: 10px; }
.thread-note-item header > div { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex: 1 1 auto; }
.thread-note-delete { width: 24px; height: 24px; flex: 0 0 auto; display: inline-grid; place-items: center; padding: 0; border: 0; border-radius: 5px; background: transparent; color: var(--muted); opacity: .58; transition: opacity .12s ease, background-color .12s ease, color .12s ease, width .12s ease; }
.thread-note-item:hover .thread-note-delete, .thread-note-delete:focus-visible { opacity: 1; }
.thread-note-delete:hover { background: var(--danger-soft); color: var(--danger); }
.thread-note-delete svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }
.thread-note-delete.confirm-delete { width: auto; min-width: 52px; padding: 0 7px; background: var(--danger-soft); color: var(--danger); opacity: 1; font-size: 9.5px; font-weight: 800; }
.note-add-button[aria-busy="true"] { opacity: .65; cursor: wait; }
.thread-note-item p { margin: 0; line-height: 1.45; overflow-wrap: anywhere; }
.thread-note-compose-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 6px; padding: 8px; border-top: 1px solid var(--line); background: var(--surface-2); }
.thread-note-compose-row textarea { min-height: 64px; max-height: 150px; resize: vertical; font-size: 11.5px; }
.note-add-button { min-width: 72px; min-height: 30px; align-self: end; }
.thread-files-panel { max-height: 300px; overflow-y: auto; padding: 7px; border-top: 1px solid var(--line); }
.thread-files-panel .section-title { display: none; }

@keyframes crm-pop-in { from { opacity: 0; transform: translateY(-3px) scale(.995); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* Reply composer */
.reply-box { flex: 0 0 auto; margin: 0 10px 10px; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); box-shadow: var(--shadow-card); }
.reply-mode-tabs { height: 28px; display: flex; align-items: end; padding: 0 10px; border-bottom: 1px solid var(--line); }
.reply-mode-tabs button { height: 28px; padding: 0 6px; border-bottom: 2px solid var(--accent); background: transparent; color: var(--accent); font-size: 11px; font-weight: 800; }
.reply-envelope { border-bottom: 1px solid var(--line); }
.reply-envelope > summary { min-height: 32px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 10px; cursor: pointer; list-style: none; color: var(--text-2); font-size: 10.5px; }
.reply-envelope > summary::-webkit-details-marker { display: none; }
.reply-envelope > summary b { color: var(--text); }
.reply-envelope > summary em { color: var(--muted); font-size: 9.5px; font-style: normal; }
.reply-envelope[open] > summary { background: var(--surface-2); }
.reply-mail-fields { padding: 5px 10px 0; }
.reply-address-line,
.recipient-row,
.reply-subject-row { min-width: 0; display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 5px; min-height: 30px; border-bottom: 1px solid var(--line); }
.reply-subject-row { grid-template-columns: 42px minmax(0,1fr); }
.address-label,
.reply-subject-row > span { color: var(--muted); font-size: 11px; }
.reply-recipients { display: grid; }
.reply-subject { height: 29px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; font-size: 11px; font-weight: 650; }
.reply-recipient-actions { display: inline-flex; align-items: center; gap: 2px; }
.mini-pill { min-height: 22px; padding: 0 5px; border-radius: 4px; background: transparent; color: var(--muted); font-size: 10.5px; font-weight: 750; }
.mini-pill:hover { background: var(--surface-3); color: var(--text); }
.field-close { margin-left: 2px; padding: 0; background: transparent; color: var(--muted); }
.recipient-editor { min-width: 0; min-height: 28px; display: flex; align-items: center; flex-wrap: wrap; gap: 3px; padding: 2px 0; border: 0; background: transparent; }
.recipient-chips { display: contents; }
.recipient-chip { max-width: 220px; display: inline-flex; align-items: center; gap: 3px; padding: 2px 5px; border-radius: 4px; background: var(--surface-3); color: var(--text-2); font-size: 10.5px; }
.recipient-chip i { width: 16px; height: 16px; display: grid; place-items: center; color: var(--muted); font-style: normal; }
.recipient-chip i .ui-close-icon { width: 10px; height: 10px; }
.recipient-entry { min-width: 80px; flex: 1 1 110px; height: 24px; padding: 0 2px; border: 0; background: transparent; box-shadow: none; font-size: 11px; }
.rich-reply-editor {
  min-height: 104px;
  max-height: 260px;
  overflow-y: auto;
  margin: 6px 10px 0;
  padding: 7px 0;
  outline: none;
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.56;
}
.rich-reply-editor:empty::before { content: attr(data-placeholder); color: var(--muted); pointer-events: none; }
.rich-reply-editor[contenteditable="false"] { opacity: .6; }
.reply-actions { min-height: 36px; display: flex; align-items: center; gap: 6px; padding: 4px 8px 6px 10px; }
.reply-format-toolbar { display: flex; align-items: center; gap: 1px; }
.format-tool,
.attach-icon-button {
  width: 27px;
  height: 27px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
}
.format-tool:hover, .attach-icon-button:hover { background: var(--surface-3); color: var(--text); }
.format-tool svg, .attach-icon-button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.attach-icon-button { position: relative; overflow: hidden; cursor: pointer; }
.hidden-file-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.toolbar-divider { width: 1px; height: 18px; margin: 0 2px; background: var(--line); }
.selected-files { min-width: 0; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 10.5px; }
.send-split { position: relative; display: inline-flex; }
.send-options-menu { position: absolute; right: 0; bottom: calc(100% + 6px); z-index: 35; width: 190px; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow-pop); }
.send-options-menu button { width: 100%; min-height: 34px; display: flex; align-items: center; padding: 0 9px; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--text-2); font-size: 10.5px; font-weight: 700; text-align: left; }
.send-options-menu button:last-child { border-bottom: 0; }
.send-options-menu button:hover { background: var(--surface-3); color: var(--text); }
.send-split .button { min-height: 28px; height: 28px; border-radius: 6px 0 0 6px; font-size: 11px; }
.send-split .send-caret { width: 25px; padding: 0; border-left: 1px solid rgba(255,255,255,.28); border-radius: 0 6px 6px 0; }
.send-caret-icon { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.reply-emoji-picker,
.reply-link-popover {
  position: fixed;
  z-index: 80;
  width: min(320px, calc(100vw - 24px));
  max-height: 320px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-pop);
}
.emoji-picker-head,
.link-popover-head { min-height: 32px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 8px; border-bottom: 1px solid var(--line); font-size: 11px; font-weight: 800; }
.emoji-picker-head > button, .link-popover-head > button { width: 24px; height: 24px; display: grid; place-items: center; padding: 0; border-radius: 6px; background: transparent; color: var(--muted); }
.emoji-picker-head > button:hover, .link-popover-head > button:hover { background: var(--surface-3); color: var(--text); }
.emoji-scroll { max-height: 250px; overflow: auto; padding: 7px; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; }
.emoji-art { min-height: 30px; display: grid; place-items: center; border-radius: 5px; background: transparent; font-size: 17px; }
.emoji-art:hover { background: var(--surface-3); }
.reply-link-popover { padding-bottom: 8px; }
.reply-link-popover input { width: calc(100% - 16px); margin: 7px 8px 0; }
.link-popover-actions { display: flex; justify-content: flex-end; gap: 5px; padding: 7px 8px 0; }

.side-action-separator { height: 1px; margin: 1px 0; background: var(--line); }

/* Right side details */
.desk-side { padding: 0 8px 8px; }
.side-separator { height: 1px; margin: 10px 0; border: 0; background: var(--line); }
.side-form { display: grid; gap: 8px; }
.side-two-col { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 6px; }
.desk-side-head { position: sticky; z-index: 4; top: 0; min-height: 50px; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 -8px 8px; padding: 7px 10px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(12px); }
.desk-side-head b { font-size: 12px; }
.desk-side-close { width: 30px; height: 30px; flex: 0 0 auto; padding: 0; border-radius: 7px; font-size: 17px; }
.side-panel-card { margin-bottom: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow-card); transition: background-color .14s ease, border-color .14s ease, box-shadow .14s ease; }
.side-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.side-panel-head b { display: block; font-size: 12px; }
.side-panel-head span { display: block; color: var(--muted); font-size: 10px; margin-top: 1px; }
.side-panel-head .section-edit-button { flex: 0 0 auto; }
.desk-request-summary .request-summary-item:first-child { grid-column: 1/-1; }
.request-summary-item.missing { border-color: color-mix(in srgb, var(--warning) 34%, var(--line)); background: color-mix(in srgb, var(--warning-soft) 55%, var(--surface-inset)); }
.request-summary-item.missing span, .request-summary-item.missing b { color: var(--warning); }
.allocation-section-actions { display: flex; align-items: center; gap: 4px; }
.review-state { padding: 2px 6px; border-radius: 999px; font-size: 10px; font-weight: 850; }
.review-state.ready { background: var(--success-soft); color: var(--success); }
.review-state.needs-check { background: var(--warning-soft); color: var(--warning); }
.linked-records.compact .linked-record, .linked-records.compact .tracker-link-row { min-height: 34px; padding: 4px 6px; }
.linked-manager-avatar { width: 28px; height: 28px; font-size: 9px; }
.request-snapshot-card.editing { border-color: color-mix(in srgb,var(--accent) 30%,var(--line)); }
.desk-more-actions { border-style: dashed; }
.side-collapsible { margin-bottom: 8px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.side-collapsible > summary { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 10px; cursor: pointer; list-style: none; font-size: 11px; font-weight: 800; }
.side-collapsible > summary::-webkit-details-marker { display: none; }
.side-collapsible > summary em { color: var(--muted); font-size: 10px; font-style: normal; font-weight: 650; }
.side-collapsible-body { padding: 0 10px 10px; }
.side-collapsible-body > .section-title { display: none; }
.linked-records { display: grid; gap: 5px; }
.linked-record,
.tracker-link-row {
  min-width: 0;
  min-height: 36px;
  display: grid;
  grid-template-columns: 28px minmax(0,1fr) auto;
  align-items: center;
  gap: 6px;
  padding: 6px 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
}
.linked-record-icon { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 5px; background: var(--surface-3); color: var(--accent); }
.linked-record-icon svg, .record-open svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.linked-record > span:nth-child(2) { min-width: 0; }
.linked-record b, .linked-record small { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.linked-record b { font-size: 11px; }
.linked-record small { color: var(--muted); font-size: 10px; }
.tracker-link-row label { min-width: 0; display: grid; gap: 2px; color: var(--muted); font-size: 10px; }
.tracker-link-row input { height: 25px; padding: 0; border: 0; background: transparent; box-shadow: none; font-size: 11px; }
.record-open { color: var(--muted); }
.gmail-label-cloud { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }

.thread-file-list { display: grid; gap: 5px; }
.thread-file-card { min-width: 0; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 5px; padding: 5px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); }
.thread-file-main { min-width: 0; display: flex; align-items: center; gap: 6px; color: var(--text); text-decoration: none; }
.file-type-icon { width: 30px; height: 28px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 5px; background: var(--surface-3); color: var(--text-2); font-size: 10px; font-weight: 850; }
.thread-file-copy { min-width: 0; }
.thread-file-copy b, .thread-file-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-file-copy b { font-size: 11px; }
.thread-file-copy small { color: var(--muted); font-size: 9.5px; }
.thread-file-download { color: var(--muted); text-decoration: none; }

/* Attachment preview */
.preview-dialog { width: min(1040px, calc(100vw - 28px)); height: min(820px, calc(100vh - 28px)); padding: 0; border: 0; border-radius: var(--radius-lg); background: var(--surface); color: var(--text); box-shadow: var(--shadow-pop); }
.preview-dialog::backdrop { background: rgba(8, 15, 26, .58); }
.preview-shell { width: 100%; height: 100%; display: grid; grid-template-rows: 42px minmax(0, 1fr); }
.preview-shell header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 10px; border-bottom: 1px solid var(--line); }
.preview-shell header b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#previewFrame { width: 100%; height: 100%; border: 0; background: var(--surface-2); }

@media (max-width: 1380px) {
  .allocation-date-row, .date-row { grid-template-columns: 1fr; }
  .thread-row.single-mode { grid-template-columns: 30px minmax(0,1fr) 50px; }
  .thread-row.bulk-mode { grid-template-columns: 18px 30px minmax(0,1fr) 50px; }
}
@media (max-width: 1120px) {
  .allocation-date-row, .allocation-two-col, .date-row { grid-template-columns: 1fr 1fr; }
  .reader-card, .allocation-side { overflow: visible; }
  .allocation-messages { max-height: 560px; }
  #deskMain > .messages .message { width: 100%; }
}

/* Contact-backed recipient autocomplete */
.recipient-editor { position: relative; }
.recipient-suggestions { position: absolute; z-index: 120; top: calc(100% + 3px); left: 0; min-width: min(420px, 90vw); max-width: 520px; max-height: 260px; overflow-y: auto; padding: 4px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow-pop); }
.recipient-suggestion { width: 100%; min-height: 42px; display: grid; grid-template-columns: 28px minmax(0,1fr); align-items: center; gap: 7px; padding: 5px 7px; border-radius: 6px; background: transparent; color: var(--text); text-align: left; }
.recipient-suggestion:hover { background: var(--surface-2); }
.recipient-suggestion-avatar { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 10px; font-weight: 850; }
.recipient-suggestion > span:last-child { min-width: 0; display: grid; gap: 1px; }
.recipient-suggestion b, .recipient-suggestion small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recipient-suggestion b { font-size: 10.5px; }
.recipient-suggestion small { color: var(--muted); font-size: 9px; }

/* Request workspace and SAMO pricing */
.price-check-card { padding: 0; background: var(--surface-inset); }
.price-context-kicker, .price-section-kicker { color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .055em; text-transform: uppercase; }
.price-check-workspace { display: grid; grid-template-columns: minmax(320px,348px) minmax(0,1fr); gap: 14px; align-items: start; padding: 14px; }
.price-check-controls { min-width: 0; display: grid; gap: 10px; align-self: start; }
.price-check-results { min-width: 0; display: grid; gap: 12px; }

.request-workspace-context, .price-search-section, .price-hotel-brief, .price-live-result, .price-rooms-section, .price-transfer-block { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-card); }
.request-workspace-context { display: grid; gap: 10px; padding: 12px; border-color: color-mix(in srgb,var(--accent) 16%,var(--line)); background: linear-gradient(150deg,color-mix(in srgb,var(--accent-soft) 12%,var(--surface)),var(--surface) 52%); }
.request-workspace-context > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.request-workspace-context > header > div:first-child { min-width: 0; }
.request-workspace-context > header > div:first-child b { display: block; font-size: 13px; }
.request-workspace-context > header > div:first-child span { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }
.request-workspace-context > header > div:last-child { display: flex; align-items: center; gap: 6px; }
.request-workspace-state { display: inline-flex; align-items: center; min-height: 22px; padding: 2px 8px; border-radius: 999px; font-size: 10px; font-weight: 800; }
.request-workspace-state.ready { background: var(--success-soft); color: var(--success); }
.request-workspace-state.needs-check { background: var(--warning-soft); color: var(--warning); }
.request-workspace-context .request-summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
.request-workspace-context .request-summary-item { min-height: 50px; padding: 8px 9px; border: 1px solid color-mix(in srgb,var(--line) 88%,transparent); border-radius: 8px; background: color-mix(in srgb,var(--surface-raised) 94%,transparent); }
.request-workspace-context .request-summary-item span { font-size: 9.5px; }
.request-workspace-context .request-summary-item b { font-size: 11.5px; }
.request-workspace-context .request-summary-item.missing { border-color: color-mix(in srgb,var(--warning) 34%,var(--line)); background: color-mix(in srgb,var(--warning-soft) 68%,var(--surface)); }
.request-workspace-editor { display: grid; gap: 8px; }
.request-workspace-editor > label { display: grid; gap: 4px; color: var(--text-2); font-size: 10.5px; font-weight: 760; }
.request-workspace-editor input, .request-workspace-editor select { width: 100%; min-width: 0; height: 35px; background: var(--surface-inset); font-size: 11.5px; }
.request-workspace-editor .hotel-picker { margin-top: 0; }
.request-workspace-missing { padding: 7px 9px; border-radius: 7px; background: var(--warning-soft); color: var(--warning); font-size: 10.5px; }

.price-search-section { overflow: hidden; }
.price-search-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 12px 8px; }
.price-search-heading > div { min-width: 0; display: grid; gap: 2px; }
.price-search-heading b { font-size: 13px; }
.price-search-heading small { color: var(--muted); font-size: 10px; line-height: 1.4; }
.request-reset-button { min-height: 28px; padding-inline: 9px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text-2); font-size: 10px; }
.request-reset-button:hover { border-color: var(--line-strong); background: var(--surface-3); color: var(--text); }
.requested-hotel-choices { display: grid; gap: 6px; padding: 2px 12px 9px; }
.requested-hotel-choices > span { color: var(--muted); font-size: 9.5px; font-weight: 760; text-transform: uppercase; letter-spacing: .04em; }
.requested-hotel-choices > div { display: flex; flex-wrap: wrap; gap: 5px; }
.requested-hotel-chip { min-width: 0; min-height: 29px; display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); color: var(--text-2); font-size: 10.5px; }
.requested-hotel-chip b { max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: inherit; }
.requested-hotel-chip i { width: 15px; height: 15px; display: inline-grid; place-items: center; border-radius: 50%; background: var(--success-soft); color: var(--success); font-size: 8px; font-style: normal; font-weight: 900; }
.requested-hotel-chip:hover, .requested-hotel-chip.on { border-color: color-mix(in srgb,var(--accent) 48%,var(--line)); background: var(--accent-soft); color: var(--accent); }
.requested-hotel-chip.checked:not(.on) { border-color: color-mix(in srgb,var(--success) 25%,var(--line)); }
.price-source-tabs { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 3px; margin: 0 12px 9px; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.price-source-tabs button { min-height: 31px; border-radius: 6px; background: transparent; color: var(--muted); font-size: 10.5px; font-weight: 780; }
.price-source-tabs button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-card); }
.price-check-form { display: grid; gap: 8px; padding: 0 12px 11px; }
.price-check-form > label, .price-guest-grid label, .price-child-ages label { min-width: 0; display: grid; gap: 4px; color: var(--text-2); font-size: 10.5px; font-weight: 760; }
.price-check-form input, .price-check-form select { width: 100%; height: 35px; min-width: 0; background: var(--surface-inset); font-size: 11.5px; }
.price-hotel-picker { position: relative; min-width: 0; }
.price-hotel-combo { position: relative; min-width: 0; height: 35px; display: flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-inset); transition: border-color .12s ease, box-shadow .12s ease, background .12s ease; }
.price-hotel-picker.open .price-hotel-combo, .price-hotel-combo:focus-within { border-color: color-mix(in srgb,var(--accent) 72%,var(--line)); background: var(--surface); box-shadow: 0 0 0 2px color-mix(in srgb,var(--accent) 13%,transparent); }
.price-check-form .price-hotel-combo > input { height: 33px; padding: 0 58px 0 9px; border: 0; background: transparent; box-shadow: none; font-weight: 720; }
.price-check-form .price-hotel-combo > input:focus { outline: 0; box-shadow: none; }
.price-check-form .price-hotel-combo > input::-webkit-search-cancel-button { display: none; }
.price-hotel-clear, .price-hotel-toggle { position: absolute; top: 4px; width: 27px; height: 27px; display: grid; place-items: center; padding: 0; border-radius: 6px; background: transparent; color: var(--muted); }
.price-hotel-clear { right: 29px; }
.price-hotel-toggle { right: 2px; }
.price-hotel-clear:hover, .price-hotel-toggle:hover { background: var(--surface-3); color: var(--text); }
.price-hotel-clear svg, .price-hotel-chevron { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.price-hotel-chevron { transition: transform .14s ease; }
.price-hotel-picker.open .price-hotel-chevron { transform: rotate(180deg); }
.price-hotel-menu { position: absolute; z-index: 120; top: calc(100% + 5px); left: 0; right: 0; max-height: min(360px, 48vh); overflow-y: auto; padding: 5px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface-raised); box-shadow: var(--shadow-pop); scrollbar-width: thin; }
.price-hotel-options { display: grid; gap: 2px; }
.price-hotel-option { width: 100%; min-height: 32px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px; border-radius: 6px; background: transparent; color: var(--text-2); font-size: 10.8px; line-height: 1.25; text-align: left; }
.price-hotel-option > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.price-hotel-option > em { flex: 0 0 auto; padding: 2px 5px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 8.5px; font-style: normal; font-weight: 780; }
.price-hotel-option:hover, .price-hotel-option:focus { background: var(--surface-3); color: var(--text); outline: 0; }
.price-hotel-option.active { background: color-mix(in srgb,var(--accent-soft) 72%,transparent); color: var(--accent); font-weight: 760; }
.price-hotel-no-results { min-height: 42px; display: grid; place-items: center; padding: 8px; color: var(--muted); font-size: 10px; text-align: center; }
.price-guest-grid, .price-child-ages { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
.price-child-ages label:last-child:nth-child(3) { grid-column: 1 / -1; }
.price-check-actionbar { display: grid; gap: 5px; padding: 10px 12px 11px; border-top: 1px solid var(--line); background: linear-gradient(180deg,color-mix(in srgb,var(--accent-soft) 8%,var(--surface)),var(--surface)); }
.price-check-actionbar > span { color: var(--muted); font-size: 9.5px; line-height: 1.3; text-align: center; }
.price-check-submit { width: 100%; min-height: 39px; border-radius: 8px; font-size: 11.5px; font-weight: 820; box-shadow: 0 6px 16px color-mix(in srgb,var(--accent) 16%,transparent); }
.price-check-submit:disabled { box-shadow: none; opacity: .48; }
.price-check-submit.is-loading { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.price-check-submit.is-loading::before { content: ''; width: 12px; height: 12px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: price-check-spin .7s linear infinite; }
@keyframes price-check-spin { to { transform: rotate(360deg); } }
.price-check-error, .price-check-notice { margin: 0; padding: 8px 9px; border-radius: 7px; font-size: 10.5px; line-height: 1.4; }
.price-check-error { background: var(--danger-soft); color: var(--danger); }
.price-check-notice { background: var(--warning-soft); color: var(--warning); }
.price-check-notice.results-notice { margin: 0; }
.price-match-line { display: grid; grid-template-columns: auto minmax(0,1fr) auto auto minmax(0,1fr); align-items: center; gap: 5px; padding: 7px 8px; border-radius: 7px; background: var(--surface-2); color: var(--muted); font-size: 10px; }
.price-match-line b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); font-size: 10.5px; }
.price-match-line i { font-style: normal; }

.price-section-title { display: grid; grid-template-columns: 32px minmax(0,1fr) auto; align-items: center; gap: 10px; }
.price-section-title > div { min-width: 0; display: grid; gap: 2px; }
.price-section-title b { font-size: 12.5px; }
.price-section-title small { color: var(--muted); font-size: 10px; line-height: 1.4; }
.price-section-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: var(--accent-soft); color: var(--accent); }
.price-section-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.price-section-icon.info { background: color-mix(in srgb,var(--accent-soft) 82%,transparent); }
.price-section-icon.transfer { background: var(--success-soft); color: var(--success); }
.price-section-icon.room { background: color-mix(in srgb,var(--purple) 13%,transparent); color: var(--purple); }
.price-section-icon.spo { width: 30px; height: 30px; background: color-mix(in srgb,var(--purple) 14%,transparent); color: var(--purple); }
.price-section-value { justify-self: end; padding: 5px 8px; border-radius: 7px; background: var(--success-soft); color: var(--success); font-size: 10.5px; white-space: nowrap; }

.price-hotel-brief { display: grid; gap: 10px; padding: 12px; border-color: color-mix(in srgb,var(--accent) 18%,var(--line)); background: linear-gradient(150deg,color-mix(in srgb,var(--accent-soft) 8%,var(--surface)),var(--surface) 48%); }
.price-hotel-brief.loading, .price-hotel-brief.error { color: var(--muted); font-size: 10.5px; }
.price-hotel-brief.error { color: var(--danger); background: var(--danger-soft); border-color: transparent; }
.price-dashboard-facts { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 6px; }
.price-dashboard-facts > span { min-width: 0; display: grid; gap: 2px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: color-mix(in srgb,var(--surface-2) 92%,transparent); }
.price-dashboard-facts small { color: var(--muted); font-size: 9.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.price-dashboard-facts b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10.8px; }
.price-reference-contracts { overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); }
.price-reference-contracts > summary { min-height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 9px; cursor: pointer; list-style: none; font-size: 10.5px; font-weight: 780; }
.price-reference-contracts > summary::-webkit-details-marker, .price-dashboard-item > summary::-webkit-details-marker { display: none; }
.price-reference-contracts > summary::after { content: '›'; color: var(--muted); font-size: 16px; transition: transform .14s ease; }
.price-reference-contracts[open] > summary::after { transform: rotate(90deg); }
.price-reference-contracts > summary em { margin-left: auto; min-width: 21px; height: 21px; display: grid; place-items: center; border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 9px; font-style: normal; }
.price-reference-contracts > div { display: grid; border-top: 1px solid var(--line); }
.price-dashboard-item { border-bottom: 1px solid var(--line); background: var(--surface); }
.price-dashboard-item:last-child { border-bottom: 0; }
.price-dashboard-item > summary { min-height: 42px; display: grid; grid-template-columns: 60px minmax(0,1fr) auto; align-items: center; gap: 8px; padding: 7px 9px; cursor: pointer; list-style: none; }
.price-dashboard-kind { min-height: 20px; display: inline-flex; align-items: center; justify-content: center; padding: 2px 6px; border-radius: 999px; background: color-mix(in srgb,var(--purple) 13%,transparent); color: var(--purple); font-size: 9px; font-weight: 820; }
.price-dashboard-item-copy { min-width: 0; display: grid; gap: 2px; }
.price-dashboard-item-copy b, .price-dashboard-item-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.price-dashboard-item-copy b { font-size: 10.5px; }
.price-dashboard-item-copy small { color: var(--muted); font-size: 9.5px; }
.price-dashboard-item > summary em { color: var(--accent); font-size: 9.5px; font-style: normal; font-weight: 780; }
.price-dashboard-description { padding: 9px; border-top: 1px solid var(--line); color: var(--text-2); font-size: 10.5px; line-height: 1.45; white-space: pre-wrap; }

.price-result-history { display: flex; align-items: center; gap: 8px; padding: 8px 9px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.price-result-history > span { flex: 0 0 auto; color: var(--muted); font-size: 9.5px; font-weight: 780; text-transform: uppercase; }
.price-result-history > div { min-width: 0; display: flex; gap: 5px; overflow-x: auto; scrollbar-width: thin; }
.price-result-history-tab { min-width: 120px; display: grid; gap: 2px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); text-align: left; }
.price-result-history-tab b { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.price-result-history-tab small { color: var(--muted); font-size: 9px; }
.price-result-history-tab.on { border-color: color-mix(in srgb,var(--accent) 38%,var(--line)); background: var(--accent-soft); color: var(--accent); }
.price-result-layout { display: grid; gap: 12px; }
.price-live-result { display: grid; gap: 12px; padding: 12px; border-color: color-mix(in srgb,var(--success) 16%,var(--line)); background: linear-gradient(165deg,color-mix(in srgb,var(--success-soft) 7%,var(--surface)),var(--surface) 34%); }
.price-result-overview { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 2px 1px 1px; }
.price-result-overview > div:first-child { min-width: 0; }
.price-result-overview h3 { margin: 2px 0 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-size: 16px; letter-spacing: -.012em; }
.price-result-overview p { margin: 0; color: var(--muted); font-size: 10.5px; }
.price-best-total { flex: 0 0 auto; min-width: 178px; display: grid; grid-template-columns: 30px minmax(0,1fr); align-items: center; gap: 8px; padding: 7px 9px; border: 1px solid color-mix(in srgb,var(--success) 20%,var(--line)); border-radius: 10px; background: linear-gradient(135deg,color-mix(in srgb,var(--success-soft) 62%,var(--surface)),var(--surface)); text-align: right; }
.price-best-total-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: color-mix(in srgb,var(--success) 14%,transparent); color: var(--success); }
.price-best-total-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.price-best-total > span:last-child { min-width: 0; display: grid; gap: 0; }
.price-best-total small { color: var(--success); font-size: 8.7px; font-weight: 780; text-transform: uppercase; letter-spacing: .045em; }
.price-best-total strong { margin-top: 1px; color: var(--text); font-size: 14px; line-height: 1.15; white-space: nowrap; }
.price-best-total em { margin-top: 2px; color: var(--muted); font-size: 8.8px; font-style: normal; font-weight: 650; }

.price-transfer-block { overflow: hidden; border-color: color-mix(in srgb,var(--success) 25%,var(--line)); box-shadow: none; }
.price-transfer-block > .price-section-title { padding: 10px 11px; background: linear-gradient(90deg,color-mix(in srgb,var(--success-soft) 62%,var(--surface)),var(--surface)); }
.price-transfer-routes { display: grid; gap: 6px; padding: 0 9px 9px; }
.price-transfer-route { overflow: hidden; border: 1px solid color-mix(in srgb,var(--success) 16%,var(--line)); border-radius: 9px; background: var(--surface); }
.price-transfer-route-title { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 9px; background: color-mix(in srgb,var(--success-soft) 24%,var(--surface-2)); }
.price-transfer-route-title > span { min-width: 0; display: grid; gap: 2px; }
.price-transfer-route-title b, .price-transfer-route-title small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.price-transfer-route-title b { font-size: 10.5px; }
.price-transfer-route-title small { color: var(--muted); font-size: 9.5px; }
.price-transfer-route-title em { min-width: 22px; height: 22px; display: grid; place-items: center; border-radius: 999px; background: var(--success-soft); color: var(--success); font-size: 9px; font-style: normal; font-weight: 820; }
.price-transfer-options { display: grid; }
.price-transfer-option { min-height: 52px; display: grid; grid-template-columns: 30px minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 8px 9px; border-top: 1px solid var(--line); }
.price-transfer-option:first-child { border-top: 0; }
.price-transfer-option.recommended { background: color-mix(in srgb,var(--success-soft) 18%,transparent); }
.price-transfer-icon { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 8px; background: var(--success-soft); color: var(--success); }
.price-transfer-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.price-transfer-copy { min-width: 0; display: grid; gap: 2px; }
.price-transfer-copy b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10.8px; }
.price-transfer-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 9.5px; }
.price-transfer-option > strong { padding-left: 8px; color: var(--text); font-size: 11px; white-space: nowrap; }
.price-transfer-error { padding: 8px 10px; border-top: 1px solid var(--line); color: var(--danger); background: var(--danger-soft); font-size: 10.5px; }

.price-rooms-section { overflow: hidden; box-shadow: none; }
.price-rooms-section > .price-section-title { padding: 10px 11px; border-bottom: 1px solid var(--line); background: color-mix(in srgb,var(--purple) 4%,var(--surface)); }
.price-room-list { display: grid; gap: 7px; padding: 9px; }
.price-room-group { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.price-room-group[open] { border-color: color-mix(in srgb,var(--accent) 30%,var(--line)); box-shadow: 0 0 0 1px color-mix(in srgb,var(--accent) 5%,transparent); }
.price-room-group > summary { min-height: 56px; display: grid; grid-template-columns: 14px minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 9px 11px; cursor: pointer; list-style: none; }
.price-room-group > summary::-webkit-details-marker, .price-rate-card > summary::-webkit-details-marker { display: none; }
.price-room-group > summary::before, .price-rate-card > summary::before { content: '›'; color: var(--muted); font-size: 17px; line-height: 1; transition: transform .14s ease; }
.price-room-group[open] > summary::before, .price-rate-card[open] > summary::before { transform: rotate(90deg); }
.price-room-name { min-width: 0; display: grid; gap: 2px; }
.price-room-name b, .price-room-name small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.price-room-name b { font-size: 12px; }
.price-room-name small { color: var(--muted); font-size: 10px; }
.price-room-summary { display: grid; justify-items: end; gap: 2px; }
.price-room-summary em { color: var(--muted); font-size: 9.5px; font-style: normal; }
.price-room-summary strong { color: var(--text-2); font-size: 10.5px; white-space: nowrap; }
.price-rate-list { border-top: 1px solid var(--line); background: var(--surface-inset); }
.price-rate-card { border-bottom: 1px solid var(--line); background: var(--surface-inset); }
.price-rate-card:last-child { border-bottom: 0; }
.price-rate-card > summary { min-height: 60px; display: grid; grid-template-columns: 14px minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 9px 11px; cursor: pointer; list-style: none; }
.price-rate-card > summary:hover { background: color-mix(in srgb,var(--surface-3) 55%,transparent); }
.price-rate-card[open] > summary { background: color-mix(in srgb,var(--accent-soft) 22%,var(--surface)); }
.price-rate-card.is-loading-details > summary { cursor: progress; background: color-mix(in srgb,var(--accent-soft) 14%,var(--surface)); }
.price-rate-loading-state { grid-column: 2 / -1; display: inline-flex; align-items: center; justify-self: start; gap: 7px; margin-top: -2px; color: var(--accent); font-size: 9.8px; font-weight: 720; }
.price-rate-loading-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 0 color-mix(in srgb,currentColor 28%,transparent); animation: price-rate-pulse 1s ease-in-out infinite; }
@keyframes price-rate-pulse { 50% { opacity: .45; box-shadow: 0 0 0 5px color-mix(in srgb,currentColor 0%,transparent); } }
.price-rate-copy { min-width: 0; display: grid; gap: 3px; }
.price-rate-copy > b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; }
.price-rate-copy > small { color: var(--muted); font-size: 10px; line-height: 1.35; }
.price-rate-copy > i { display: flex; flex-wrap: wrap; gap: 4px; font-style: normal; }
.price-rate-total { min-width: 124px; display: grid; justify-items: end; gap: 2px; }
.price-rate-total > strong { white-space: nowrap; font-size: 12px; }
.price-rate-badge { display: inline-flex; align-items: center; min-height: 19px; padding: 2px 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-size: 9px; font-weight: 760; }
.price-rate-badge.ok { color: var(--success); background: var(--success-soft); border-color: transparent; }
.price-rate-badge.warn { color: var(--warning); background: var(--warning-soft); border-color: transparent; }
.price-rate-badge.danger { color: var(--danger); background: var(--danger-soft); border-color: transparent; }
.price-rate-badge.spo { color: var(--purple); background: color-mix(in srgb,var(--purple) 13%,transparent); border-color: transparent; }
.price-rate-badge.code { color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.price-rate-transfer-hint { color: var(--success); font-size: 9px; font-weight: 720; white-space: nowrap; }
.price-rate-details { display: grid; gap: 10px; padding: 10px 11px 12px; border-top: 1px solid var(--line); background: var(--surface); }
.price-rate-metrics { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 6px; }
.price-rate-metrics > span { min-width: 0; display: grid; gap: 2px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.price-rate-metrics > span.with-transfer { border-color: color-mix(in srgb,var(--success) 25%,var(--line)); background: color-mix(in srgb,var(--success-soft) 55%,var(--surface)); }
.price-rate-metrics small { color: var(--muted); font-size: 9px; }
.price-rate-metrics strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10.8px; }
.price-rate-detail-grid { display: grid; grid-template-columns: minmax(320px,.92fr) minmax(0,1.08fr); gap: 10px; align-items: start; }
.price-rate-pricing { display: grid; gap: 8px; }
.price-breakdown-card, .price-nightly-card { overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.price-breakdown-card > header, .price-nightly-head { min-height: 40px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 9px; background: var(--surface-2); }
.price-breakdown-card > header > b, .price-nightly-head > div > b { display: block; font-size: 10.8px; }
.price-breakdown-card > header > small, .price-nightly-head > div > small { display: block; color: var(--muted); font-size: 9.2px; }
.price-nightly-summary { flex: 0 0 auto; display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.price-nightly-summary > span { display: grid; justify-items: end; gap: 1px; }
.price-nightly-summary small { color: var(--muted); font-size: 8.8px; }
.price-nightly-summary strong { font-size: 10.5px; }
.price-night-checkout-meta { padding-left: 8px; border-left: 1px solid var(--line); }
.price-night-checkout-meta strong { color: var(--text-2); }
.price-nightly-card.loading, .price-nightly-card.pending, .price-nightly-card.empty { border-style: dashed; }
.price-night-carousel { position: relative; border-top: 1px solid var(--line); background: var(--line); }
.price-night-calendar { display: flex; gap: 1px; overflow-x: auto; overflow-y: hidden; scroll-behavior: smooth; scroll-snap-type: x mandatory; scrollbar-width: none; background: var(--line); }
.price-night-calendar::-webkit-scrollbar { display: none; }
.price-night-day { flex: 0 0 calc((100% - 3px) / 4); min-width: 0; min-height: 112px; display: grid; grid-template-rows: auto 1fr auto; gap: 8px; padding: 10px; background: var(--surface); scroll-snap-align: start; }
.price-night-arrow { position: absolute; z-index: 5; top: 50%; width: 32px; height: 42px; display: grid; place-items: center; padding: 0; transform: translateY(-50%); border: 1px solid var(--line-strong); border-radius: 10px; background: color-mix(in srgb,var(--surface) 94%,transparent); box-shadow: var(--shadow-popover); color: var(--text-2); opacity: .96; transition: background .16s ease,color .16s ease,opacity .16s ease,transform .16s ease; }
.price-night-arrow svg { width: 17px; height: 17px; display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.price-night-arrow:hover:not(:disabled) { background: var(--surface-3); color: var(--text); transform: translateY(-50%) scale(1.03); }
.price-night-arrow:disabled { opacity: .28; cursor: default; }
.price-night-arrow.prev { left: 7px; }
.price-night-arrow.next { right: 7px; }
.price-night-day header { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.price-night-day header span { color: var(--muted); font-size: 8.8px; font-weight: 800; letter-spacing: .08em; }
.price-night-day header b { color: var(--text-2); font-size: 10.2px; }
.price-night-day-price { display: grid; align-content: center; gap: 2px; }
.price-night-day-price strong { color: var(--text); font-size: 11.4px; white-space: nowrap; }
.price-night-day-price small { color: var(--muted); font-size: 8.8px; }
.price-night-day footer { min-height: 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.price-night-chip { display: inline-flex; align-items: center; min-height: 18px; padding: 2px 5px; border-radius: 999px; font-size: 8.4px; font-weight: 800; line-height: 1; }
.price-night-chip.spo { color: var(--purple); background: color-mix(in srgb,var(--purple) 13%,transparent); }
.price-night-chip.stop { color: #ffb7b7; background: color-mix(in srgb,var(--danger) 24%,transparent); border: 1px solid color-mix(in srgb,var(--danger) 40%,transparent); }
.price-night-day.is-stop-sale { background: linear-gradient(180deg,color-mix(in srgb,var(--danger) 14%,var(--surface)),color-mix(in srgb,var(--danger) 6%,var(--surface))); box-shadow: inset 3px 0 0 color-mix(in srgb,var(--danger) 78%,transparent); }
.price-night-day.is-stop-sale header span, .price-night-day.is-stop-sale header b, .price-night-day.is-stop-sale .price-night-day-price strong { color: color-mix(in srgb,var(--danger) 80%,white 20%); }
.price-night-day.is-stop-sale .price-night-day-price small { color: color-mix(in srgb,var(--danger) 58%,var(--muted)); font-weight: 760; }
.price-night-chip.checkout { color: var(--text-2); background: var(--surface-3); border: 1px solid var(--line-strong); }
@media (max-width: 1180px) {
  .price-night-day { flex-basis: calc((100% - 2px) / 3); }
}

.price-breakdown { display: grid; }
.price-breakdown-line { min-height: 34px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 6px 8px; border-top: 1px solid var(--line); font-size: 10.5px; }
.price-breakdown-line:first-child { border-top: 0; }
.price-breakdown-line > span { min-width: 0; display: grid; gap: 1px; }
.price-breakdown-line small { color: var(--muted); font-size: 9px; }
.price-breakdown-line > b { white-space: nowrap; font-size: 10.8px; }
.price-breakdown-line.hotel-total { background: var(--surface-2); font-weight: 800; }
.price-breakdown-line.hotel-total > b { font-size: 11.5px; }
.price-rules { display: grid; gap: 8px; align-content: start; }
.price-rule-block { display: grid; gap: 4px; padding: 8px 9px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); }
.price-rule-block > b { color: var(--text-2); font-size: 10.5px; }
.price-rule-block > span { position: relative; padding-left: 10px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.price-rule-block > span::before { content: '·'; position: absolute; left: 1px; top: 0; }
.price-rules-empty { align-self: start; padding: 10px; border: 1px dashed var(--line); border-radius: 9px; color: var(--muted); font-size: 10px; }
.price-b2b-offers { display: grid; gap: 8px; padding: 9px; border: 1px solid color-mix(in srgb,var(--purple) 26%,var(--line)); border-radius: 9px; background: color-mix(in srgb,var(--purple) 7%,var(--surface)); }
.price-b2b-offers > header { display: grid; grid-template-columns: 30px minmax(0,1fr); align-items: center; gap: 8px; }
.price-b2b-offers > header > div { display: grid; gap: 1px; }
.price-b2b-offers > header b { font-size: 10.8px; }
.price-b2b-offers > header small { color: var(--muted); font-size: 9.2px; }
.price-b2b-offers.compact { padding: 9px; color: var(--text-2); font-size: 10px; }
.price-b2b-offers.compact > div { display: grid; gap: 2px; }
.price-b2b-offers.compact span { color: var(--muted); }
.price-b2b-offers.error { border-color: color-mix(in srgb,var(--danger) 25%,var(--line)); background: var(--danger-soft); }
.price-b2b-offer-list { display: grid; gap: 6px; }
.price-b2b-offer { display: grid; gap: 4px; padding: 8px; border-radius: 8px; background: var(--surface); }
.price-b2b-offer-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.price-b2b-offer-head strong { color: var(--purple); font-size: 10.5px; }
.price-book-code { display: inline-flex; min-height: 20px; align-items: center; padding: 2px 6px; border-radius: 999px; background: color-mix(in srgb,var(--purple) 12%,transparent); color: var(--purple); font-size: 9.5px; font-weight: 780; }
.price-code-help { position: relative; cursor: help; outline: none; }
.price-code-help::after { content: ''; position: absolute; inset: -4px; }
.price-code-popover { display: none; }
.price-code-floating-popover { position: fixed; z-index: 2147483000; width: min(460px, calc(100vw - 24px)); display: grid; gap: 4px; padding: 9px 10px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface); box-shadow: var(--shadow-popover); color: var(--text-2); white-space: normal; font-size: 10px; line-height: 1.45; font-weight: 600; pointer-events: none; }
.price-code-floating-popover[hidden] { display: none; }
.price-code-floating-popover b { color: var(--text); font-size: 9.5px; text-transform: uppercase; letter-spacing: .04em; }
.price-code-floating-popover > small { color: var(--muted); font-size: 9px; line-height: 1.35; }
.price-code-floating-popover > span { white-space: pre-line; line-height: 1.55; }
.price-offer-hint { color: var(--muted); }
.price-b2b-offer > small { color: var(--muted); font-size: 9.2px; }
.price-b2b-offer > p { margin: 0; color: var(--text-2); font-size: 10px; line-height: 1.45; }
.price-check-empty { padding: 20px 14px; color: var(--muted); font-size: 11px; text-align: center; }
.price-check-placeholder { min-height: 260px; display: grid; place-items: center; border: 1px dashed var(--line); border-radius: 12px; background: color-mix(in srgb,var(--surface) 74%,transparent); }
.price-check-placeholder > div { max-width: 410px; display: grid; gap: 6px; text-align: center; }
.price-check-placeholder b { color: var(--text-2); font-size: 13px; }
.price-check-placeholder span { color: var(--muted); font-size: 10.5px; line-height: 1.45; }
.price-placeholder-icon { width: 40px; height: 40px; margin: 0 auto 3px; display: grid; place-items: center; border-radius: 11px; background: var(--accent-soft); color: var(--accent); font-size: 18px; }

.price-check-dialog { width: min(1560px, calc(100vw - 32px)); height: min(960px, calc(100dvh - 32px)); max-width: none; max-height: calc(100dvh - 32px); margin: auto; }
.price-check-dialog-shell { width: 100%; height: 100%; max-height: none; }
.price-check-dialog-shell > header { min-height: 52px; }
.price-check-dialog-body { min-height: 0; height: auto; max-height: none; flex: 1 1 auto; padding: 0; overflow-y: auto; overflow-x: hidden; background: var(--surface-inset); scrollbar-gutter: stable; }
.price-check-dialog-body .price-check-card { min-height: 100%; margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; }
.price-check-dialog-body .price-check-controls { position: sticky; top: 14px; }

@media (max-width: 1180px) {
  .price-check-workspace { grid-template-columns: 310px minmax(0,1fr); gap: 10px; padding: 10px; }
  .price-dashboard-facts { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .price-rate-metrics { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .price-rate-detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .price-check-dialog { width: calc(100vw - 12px); height: calc(100dvh - 12px); max-height: calc(100dvh - 12px); }
  .price-night-day { flex-basis: calc((100% - 1px) / 2); }
  .price-check-workspace { grid-template-columns: 1fr; }
  .price-check-dialog-body .price-check-controls { position: static; }
  .price-result-overview { align-items: flex-start; }
}
@media (max-width: 620px) {
  .price-check-dialog { width: 100vw; height: 100dvh; max-height: none; margin: 0; border: 0; border-radius: 0; }
  .price-check-dialog::backdrop { background: var(--bg); }
  .price-check-dialog-shell { height: 100dvh; max-height: none; border-radius: 0; }
  .price-check-dialog-shell > header { min-height: 52px; padding-inline: 12px; }
  .price-check-workspace { padding: 7px; }
  .request-workspace-context .request-summary-grid, .price-dashboard-facts, .price-check-form .date-row, .price-guest-grid, .price-child-ages, .price-rate-metrics, .price-nightly-grid { grid-template-columns: 1fr; }
  .price-child-ages label:last-child:nth-child(3) { grid-column: auto; }
  .price-result-overview { flex-direction: column; }
  .price-best-total { width: 100%; text-align: left; }
  .price-section-title { grid-template-columns: 32px minmax(0,1fr); }
  .price-section-value { grid-column: 2; justify-self: start; }
  .price-room-group > summary, .price-rate-card > summary { grid-template-columns: 12px minmax(0,1fr); }
  .price-room-summary, .price-rate-total { grid-column: 2; justify-items: start; }
  .price-night-row:nth-child(odd) { border-right: 0; }
  .price-result-history-tab { min-width: 120px; max-width: 180px; }
}

/* 4.43.0 workspace Gmail reconnect */
.workspace-gmail-actions { display:flex; align-items:center; gap:8px; margin-top:2px; }
.workspace-gmail-actions .button { min-width:132px; }

/* Responsive conversation polish, contact context and wide price workspace */
.reader-head-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; min-width: 0; }
.allocation-details-toggle.on, .desk-details-toggle.on { background: var(--accent-soft); color: var(--accent); }
.contact-inline-details { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.contact-inline-details > span { min-width: 0; display: grid; gap: 1px; }
.contact-inline-details small { color: var(--muted); font-size: 8.8px; }
.contact-inline-details b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); font-size: 10px; }
.price-check-open { color: var(--accent); background: var(--accent-soft); }

.live-deadline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.live-deadline small { font-size: 10px; font-weight: 700; opacity: .72; text-transform: uppercase; letter-spacing: .04em; }
.live-deadline b { font-size: 12px; font-weight: 760; }
.live-deadline.warning { border-color: color-mix(in srgb, var(--warning) 55%, var(--line)); background: color-mix(in srgb, var(--warning) 10%, var(--surface)); }
.live-deadline.danger { border-color: color-mix(in srgb, var(--danger) 64%, var(--line)); background: color-mix(in srgb, var(--danger) 12%, var(--surface)); }
.live-deadline.ok { opacity: .9; }

.reminder-card { position: relative; overflow: hidden; }
.reminder-card.due::before { content: ''; position: absolute; z-index: 2; inset: 0 auto 0 0; width: 3px; background: var(--danger); }
.reminder-card > summary { list-style: none; }
.reminder-card > summary::-webkit-details-marker { display: none; }
.reminder-summary { min-height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; cursor: pointer; }
.reminder-summary > div:first-child { min-width: 0; display: grid; gap: 2px; }
.reminder-summary b { font-size: 11px; }
.reminder-summary > div:first-child span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 9.5px; }
.reminder-summary-state { display: flex; align-items: center; gap: 5px; }
.reminder-chevron { color: var(--muted); font-size: 18px; line-height: 1; transition: transform .14s ease; }
.reminder-card[open] .reminder-chevron { transform: rotate(90deg); }
.reminder-controls { display: grid; gap: 9px; padding: 0 12px 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.reminder-date-time { display: grid; grid-template-columns: minmax(0,1fr) minmax(110px,.55fr); gap: 6px; }
.reminder-controls label { display: grid; gap: 5px; font-size: 10px; font-weight: 700; color: var(--muted); }
.reminder-controls input { width: 100%; min-width: 0; }
.reminder-note-field { display: grid; gap: 5px; margin-top: 2px; color: var(--muted); font-size: 9.5px; font-weight: 700; }
.reminder-note-field input { width: 100%; }
.reminder-quick-actions { display: grid; grid-template-columns: 1.35fr repeat(4, minmax(0, 1fr)); gap: 6px; }
.reminder-quick-actions .mini-button { min-width: 0; padding-inline: 6px; }
.reminder-quick-actions .primary-soft { background: var(--accent-soft); color: var(--accent); }
.reminder-hint { margin: 0; font-size: 11px; line-height: 1.45; color: var(--muted); }

@media (max-width: 760px) {
  .allocation-local-search {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 7px;
    margin: 7px 8px 2px;
    padding: 0 9px;
    min-height: 34px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--muted);
  }
  .allocation-local-search input { width: 100%; min-width: 0; border: 0; padding: 0; background: transparent; color: var(--text); font-size: 12px; outline: 0; }
  .allocation-local-search input::placeholder { color: var(--muted); }
  .allocation-mobile-back { min-height: 30px; display: inline-flex; align-items: center; align-self: flex-start; gap: 4px; margin-bottom: 5px; padding: 0 7px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); color: var(--text-2); }
  .allocation-mobile-back b { font-size: 10.5px; }
  .allocation-mail-head { padding: 8px; }
  .allocation-side { padding-top: 0; }
  .allocation-side-mobile-head { position: sticky; z-index: 4; top: 0; display: flex; align-items: center; justify-content: space-between; min-height: 44px; margin: 0 -8px 8px; padding: 0 10px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface-inset) 94%, transparent); backdrop-filter: blur(8px); }
  .allocation-side-mobile-head b { font-size: 12px; }
  .desk-thread-head { gap: 6px; padding: 8px; }
  .desk-primary-head { grid-template-columns: auto minmax(0,1fr); align-items: start; gap: 7px; }
  .desk-mobile-back { min-height: 30px; display: inline-flex; align-items: center; gap: 4px; padding: 0 7px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); color: var(--text-2); }
  .desk-mobile-back b { font-size: 10.5px; }
  .desk-title-copy h2 { white-space: normal; display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 13px; }
  .desk-title-copy p { font-size: 9.8px; }
  .desk-title-copy p > span:not(.desk-coverage-meta) { display: none; }
  .desk-head-actions { grid-column: 1 / -1; width: 100%; display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 5px; }
  .desk-head-actions .mini-button { min-height: 32px; }
  .desk-details-toggle { min-width: 60px; }
  .desk-status-rail { align-items: stretch; flex-direction: column; gap: 5px; }
  .desk-status-rail > .operational-badges { width: 100%; }
  .desk-pipeline { width: 100%; }
  .desk-pipeline > summary { grid-template-columns: auto minmax(0,1fr) auto 14px; }
  .desk-context-panel > summary { min-height: 32px; }
  .desk-thread-labels .crm-tag-editor { grid-template-columns: 1fr; }
  .desk-thread-tools { gap: 4px; }
  .conversation-tabs { flex-basis: 100%; }
  .thread-notes-popover, .thread-files-strip { flex: 1 1 calc(50% - 2px); }
  .thread-notes-popover-panel { position: fixed; z-index: 90; left: 8px; right: 8px; top: auto; bottom: 8px; width: auto; max-height: min(560px, 72vh); }
  .thread-files-strip[open] { flex-basis: 100%; }
  #deskMain > .messages { padding: 10px 7px 14px; }
  #deskMain > .messages .message { width: 100%; margin-bottom: 7px; border-radius: 9px; }
  .message-meta-panel { padding: 8px 9px; }
  .message-content { padding: 12px 10px 14px; font-size: 12px; }
  .reply-box { margin: 0 6px 6px; border-radius: 9px; }
  .reply-envelope > summary { min-height: 30px; padding-inline: 8px; }
  .rich-reply-editor { min-height: 92px; max-height: 190px; margin-inline: 8px; font-size: 12.5px; }
  .reply-actions { min-width: 0; gap: 4px; padding: 4px 6px 5px 8px; }
  .reply-format-toolbar { min-width: 0; flex: 1 1 auto; overflow-x: auto; scrollbar-width: none; }
  .reply-format-toolbar::-webkit-scrollbar { display: none; }
  .selected-files { display: none; }
  .send-split { flex: 0 0 auto; }
  .reminder-quick-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .desk-side { padding-bottom: 8px; }
}


.desk-coverage-meta { display:inline-flex; align-items:center; gap:4px; max-width:100%; padding:2px 7px; border:1px solid var(--line); border-radius:999px; background:var(--surface-2); color:var(--text-2); font-size:10px; line-height:1.25; }
.desk-coverage-meta b { color:var(--text); font-size:inherit; }
.desk-coverage-meta.duty { border-color:color-mix(in srgb,var(--accent) 34%,var(--line)); background:var(--accent-soft); color:var(--accent); }
.desk-coverage-meta.substitution { border-color:color-mix(in srgb,var(--accent) 34%,var(--line)); background:color-mix(in srgb,var(--accent) 9%,var(--surface)); }

.action-center-view { min-height: 0; }
.action-center-shell {
  width: min(1180px, 100%);
  height: 100%;
  min-height: 0;
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
}
.action-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.action-summary-card {
  min-width: 0;
  min-height: 72px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text-2);
  text-align: left;
  box-shadow: var(--shadow-card);
}
.action-summary-card:hover { background: var(--surface-raised); }
.action-summary-card.on { border-color: color-mix(in srgb, var(--accent) 44%, var(--line)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 16%, transparent), var(--shadow-card); }
.action-summary-card span { min-width: 0; font-size: 10.5px; font-weight: 760; }
.action-summary-card b { flex: 0 0 auto; color: var(--text); font-size: 24px; line-height: 1; letter-spacing: -.04em; }
.action-summary-card.critical b { color: var(--danger); }
.action-summary-card.reply b { color: var(--warning); }
.action-summary-card.followup b { color: var(--accent); }
.action-summary-card.reminder b { color: var(--purple); }
.action-summary-card.soon b { color: var(--warning); }
.action-center-card { min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.action-center-head { flex: 0 0 auto; }
.action-filters { display: flex; align-items: center; gap: 4px; }
.action-filter {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  border-radius: 7px;
  background: transparent;
  color: var(--text-2);
  font-size: 10.5px;
  font-weight: 760;
}
.action-filter:hover { background: var(--surface-3); }
.action-filter.on { background: var(--accent-soft); color: var(--accent); }
.action-filter em { min-width: 18px; min-height: 17px; display: inline-grid; place-items: center; padding: 0 4px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 74%, transparent); font-size: 9.5px; font-style: normal; }
.action-rows { min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 6px; }
.action-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  margin-bottom: 5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-raised);
  overflow: hidden;
}
.action-row:last-child { margin-bottom: 0; }
.action-row:hover { border-color: var(--line-strong); }
.action-row.critical { border-color: color-mix(in srgb, var(--danger) 34%, var(--line)); background: color-mix(in srgb, var(--danger) 4%, var(--surface-raised)); }
.action-row.high { border-color: color-mix(in srgb, var(--warning) 34%, var(--line)); }
.action-row.soon { border-color: color-mix(in srgb, var(--warning) 22%, var(--line)); }
.action-row-main {
  min-width: 0;
  display: grid;
  grid-template-columns: 4px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px 10px 8px;
  background: transparent;
  color: inherit;
  text-align: left;
}
.action-row-main:hover { background: color-mix(in srgb, var(--surface-3) 54%, transparent); }
.action-severity { width: 4px; height: 100%; min-height: 58px; border-radius: 999px; background: var(--line-strong); }
.action-row.critical .action-severity { background: var(--danger); }
.action-row.high .action-severity { background: var(--warning); }
.action-row.soon .action-severity { background: color-mix(in srgb, var(--warning) 72%, var(--line)); }
.action-row.waiting .action-severity { background: var(--accent); opacity: .55; }
.action-row-copy { min-width: 0; display: grid; gap: 3px; }
.action-row-person { min-width: 0; display: flex; align-items: baseline; gap: 8px; }
.action-row-person b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; }
.action-row-person small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 10.5px; }
.action-row-person small span { color: var(--text-2); }
.action-row-copy > strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; font-weight: 760; }
.action-reason { min-width: 0; display: flex; align-items: baseline; gap: 6px; color: var(--text-2); font-size: 10.5px; }
.action-reason b { flex: 0 0 auto; color: var(--text); font-size: 10.5px; }
.action-reason span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.action-row-meta { min-width: 0; display: flex; align-items: center; gap: 5px; overflow: hidden; color: var(--muted); font-size: 10.5px; }
.action-row-meta em { flex: 0 0 auto; padding: 1px 5px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); font-style: normal; font-weight: 700; }
.action-row-meta small { margin-left: auto; white-space: nowrap; font-size: 10px; }
.action-tag { flex: 0 1 auto; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.action-row-time { min-width: 106px; display: grid; justify-items: end; gap: 3px; }
.action-row-time > small { color: var(--muted); font-size: 10px; white-space: nowrap; }
.action-deadline { justify-self: end; }
.action-deadline.none { color: var(--muted); font-size: 10px; }
.action-row-tools { display: flex; align-items: center; gap: 4px; padding: 8px 8px 8px 0; border-left: 1px solid color-mix(in srgb, var(--line) 72%, transparent); }
.action-row-tools .mini-button { min-height: 27px; padding-inline: 7px; }
.action-empty { min-height: 240px; display: grid; place-items: center; align-content: center; gap: 7px; padding: 24px; text-align: center; color: var(--muted); }
.action-empty-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--success-soft); color: var(--success); font-size: 18px; font-weight: 850; }
.action-empty b { color: var(--text); font-size: 13px; }
.action-empty p { max-width: 360px; margin: 0; font-size: 10.5px; }
.action-empty .mini-button { margin-top: 2px; }

@media (max-width: 980px) {
  .action-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .action-row { grid-template-columns: 1fr; }
  .action-row-tools { justify-content: flex-end; padding: 0 10px 8px 10px; border-left: 0; }
}

@media (max-width: 700px) {
  .action-center-shell { gap: 7px; }
  .action-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
  .action-summary-card { min-height: 58px; padding: 8px 9px; }
  .action-summary-card b { font-size: 20px; }
  .action-center-head { align-items: flex-start; flex-direction: column; }
  .action-filters { width: 100%; overflow-x: auto; padding-bottom: 1px; }
  .action-filter { flex: 0 0 auto; }
  .action-row-main { grid-template-columns: 3px minmax(0, 1fr); gap: 8px; padding: 9px 8px 9px 6px; }
  .action-severity { grid-row: 1 / span 2; }
  .action-row-time { grid-column: 2; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  .action-row-time .live-deadline { justify-self: start; }
  .action-reason { align-items: flex-start; flex-direction: column; gap: 1px; }
  .action-reason span { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .action-row-meta small { display: none; }
  .action-tag { display: none; }
}

.thread-attention-banner {
  min-height: 38px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
  transition: background-color .14s ease, border-color .14s ease, box-shadow .14s ease;
}
.thread-attention-banner.critical { border-color: color-mix(in srgb, var(--danger) 48%, var(--line)); background: var(--danger-soft); }
.thread-attention-banner.high { border-color: color-mix(in srgb, var(--warning) 42%, var(--line)); background: var(--warning-soft); }
.thread-attention-banner.soon { border-color: color-mix(in srgb, var(--warning) 28%, var(--line)); background: color-mix(in srgb, var(--warning-soft) 54%, var(--surface)); }
.thread-attention-icon { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-raised); color: var(--text); font-size: 11px; font-weight: 900; }
.thread-attention-banner.critical .thread-attention-icon { color: var(--danger); }
.thread-attention-banner.high .thread-attention-icon,
.thread-attention-banner.soon .thread-attention-icon { color: var(--warning); }
.thread-attention-banner > div { min-width: 0; display: grid; gap: 0; }
.thread-attention-banner > div b { font-size: 10.8px; }
.thread-attention-banner > div span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); font-size: 10.5px; }
.thread-attention-banner .live-deadline { min-height: 24px; background: color-mix(in srgb, var(--surface-raised) 78%, transparent); }

@media (max-width: 760px) {
  .thread-attention-banner { grid-template-columns: 20px minmax(0, 1fr); gap: 6px; }
  .thread-attention-banner .live-deadline { grid-column: 2; justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  .thread-row, .queue-row, .message, .side-panel-card, .desk-context-panel, .thread-attention-banner, .thread-notes-popover > summary, .thread-note-delete { transition: none; }
}

/* Native file drop targets for reply / compose */
.reply-box, #composeForm { position: relative; }
.reply-box.mail-drop-active::after, #composeForm.mail-drop-active::after { content: 'Drop files to attach'; position: absolute; z-index: 30; inset: 6px; display: grid; place-items: center; border: 1px dashed color-mix(in srgb, var(--accent) 65%, var(--line)); border-radius: 10px; background: color-mix(in srgb, var(--accent-soft) 92%, transparent); color: var(--accent); font-size: 11px; font-weight: 820; pointer-events: none; backdrop-filter: blur(4px); }


/* Thread files live in the right context rail, never in the message toolbar. */
.desk-files-card { padding: 0; overflow: hidden; }
.desk-files-card .side-panel-head { margin: 0; padding: 9px 10px; }
.side-files-panel { max-height: 230px; overflow-y: auto; padding: 6px; border-top: 1px solid var(--line); }
.side-files-panel .attachment-list, .side-files-panel .thread-attachment-list { display: grid; gap: 5px; }
.side-files-panel .attachment-card, .side-files-panel .thread-attachment-row { min-width: 0; }
.shared-thread-banner { margin: 0 0 8px; padding: 7px 9px; border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); border-radius: 8px; background: var(--accent-soft); color: var(--text-2); font-size: 9.5px; line-height: 1.4; }
@media (max-width: 760px) { .price-workspace-head { align-items: flex-start; } .price-workspace-actions { flex-wrap: wrap; justify-content: flex-end; } }

/* Departure is a calendar day too. Stop-sale styling always wins when both apply. */
.price-night-day.is-checkout:not(.is-stop-sale) { background: color-mix(in srgb,var(--accent-soft) 28%,var(--surface)); }
.price-night-day.is-checkout:not(.is-stop-sale) .price-night-day-price strong { color: var(--muted); }
.price-night-day.is-stop-sale .price-night-chip.checkout { color: color-mix(in srgb,var(--danger) 35%,white); background: color-mix(in srgb,var(--danger) 12%,var(--surface)); border-color: color-mix(in srgb,var(--danger) 35%,var(--line)); }

