.sc-shell {
  --sc-ink: #202d40;
  --sc-muted: #59687d;
  --sc-blue: #254fb2;
  --sc-accent: #295ac7;
  --sc-line: #dce2e9;
  --sc-pale: #edf3fd;
  --sc-paper: #fffefa;
  width: 100%;
  max-width: 880px;
  min-width: 0;
  margin: clamp(20px, 3.2vw, 42px) auto clamp(32px, 5vw, 65px);
  color: var(--sc-ink);
  font: inherit;
  overflow-wrap: anywhere;
}
.sc-shell *, .sc-shell *::before, .sc-shell *::after { box-sizing: border-box; }
.sc-shell [hidden] { display: none !important; }
.sc-shell h1, .sc-shell h2, .sc-shell p, .sc-shell form, .sc-shell ul, .sc-shell ol { margin: 0; }
.sc-shell h1 { font-size: clamp(25px, 4.6vw, 40px); line-height: 1.12; letter-spacing: -.035em; font-weight: 750; }
.sc-shell h2 { font-size: clamp(18px, 2.4vw, 23px); line-height: 1.22; letter-spacing: -.018em; }
.sc-shell a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
.sc-shell a:focus-visible, .sc-shell button:focus-visible, .sc-shell input:focus-visible,
.sc-shell textarea:focus-visible, .sc-shell select:focus-visible, .sc-shell summary:focus-visible, .sc-shell [tabindex]:focus-visible {
  outline: 3px solid #6385d2; outline-offset: 3px;
}
.sc-shell .sc-pagehead, .sc-shell .sc-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px;
}
.sc-shell .sc-head > div:first-child { min-width: 0; }
.sc-shell .sc-head-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 15px; justify-content: flex-end; }
.sc-shell .sc-head-actions .sc-back { margin: 0; }
.sc-shell .sc-pagehead .sc-back { margin: 0; }
.sc-shell .sc-back {
  display: inline-flex; align-items: center; gap: 5px; margin: 0 0 17px; min-height: 28px;
  color: var(--sc-blue); font-size: 14px; font-weight: 650; text-decoration: none;
}
.sc-shell .sc-back:hover { text-decoration: underline; }
.sc-shell svg { width: 19px; height: 19px; flex-shrink: 0; }
.sc-shell .sc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 43px; width: auto; margin: 0; padding: 10px 17px; border: 1px solid transparent;
  border-radius: 10px; color: white; background: var(--sc-accent);
  font: inherit; font-size: 14px; font-weight: 650; line-height: 1.25; text-decoration: none; cursor: pointer;
}
.sc-shell .sc-btn:hover { background: #2048a3; color: white; }
.sc-shell .sc-btn > span[aria-hidden] { font-size: 21px; line-height: .85; }
.sc-shell .sc-plain { background: #fff; color: var(--sc-blue); border-color: #becce3; }
.sc-shell .sc-plain:hover { color: #173e92; background: var(--sc-pale); }
.sc-shell .sc-kicker, .sc-shell .sc-row-tags { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.sc-shell .sc-kicker { margin-bottom: 8px; font-size: 13px; color: var(--sc-muted); font-weight: 600; }
.sc-shell .sc-customer { margin-top: 8px; color: var(--sc-muted); font-size: 14px; }
.sc-shell .sc-customer a, .sc-shell .sc-endnote a, .sc-shell .sc-state-change a { color: var(--sc-blue); }
.sc-shell .sc-status {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 20px;
  background: #edf3ff; color: #284e96; font-size: 12px; line-height: 1.45; font-weight: 650;
}
.sc-shell .sc-status::before { content: ""; width: 6px; height: 6px; flex: none; border-radius: 50%; background: #5376bd; }
.sc-shell .sc-status--closed { color: #535d6a; background: #eff0ef; }
.sc-shell .sc-status--closed::before { background: #7e8792; }
.sc-shell .sc-filters { display: inline-flex; flex-wrap: wrap; gap: 3px; margin: 0 0 15px; padding: 3px; border-radius: 10px; background: #eaeef4; }
.sc-shell .sc-filters a { padding: 7px 13px; border-radius: 7px; color: #526176; font-size: 14px; text-decoration: none; }
.sc-shell .sc-filters a[aria-current] { background: #fff; color: #193d84; font-weight: 650; box-shadow: 0 1px 3px #22365416; }
.sc-shell .sc-card, .sc-shell .sc-empty, .sc-shell .sc-list {
  background: var(--sc-paper); border: 1px solid var(--sc-line); border-radius: 17px;
}
.sc-shell .sc-list { padding: 0; list-style: none; }
.sc-shell .sc-list > li { margin: 0; padding: 0; }
.sc-shell .sc-list > li + li { border-top: 1px solid var(--sc-line); }
.sc-shell .sc-row { display: grid; grid-template-columns: auto minmax(0,1fr) auto auto; align-items: center; gap: 14px; padding: 16px 19px; color: var(--sc-ink); text-decoration: none; }
.sc-shell .sc-list > li:first-child .sc-row { border-radius: 16px 16px 0 0; }
.sc-shell .sc-list > li:last-child .sc-row { border-radius: 0 0 16px 16px; }
.sc-shell .sc-list > li:only-child .sc-row { border-radius: 16px; }
.sc-shell .sc-row:hover { background: #f5f8ff; }
.sc-shell .sc-row-icon, .sc-shell .sc-empty-icon { display: inline-grid; place-items: center; flex-shrink: 0; color: #325eae; background: #eaf1fe; }
.sc-shell .sc-row-icon { width: 43px; height: 43px; border-radius: 13px; }
.sc-shell .sc-row-icon svg { width: 22px; height: 22px; }
.sc-shell .sc-row-copy { display: grid; gap: 3px; min-width: 0; }
.sc-shell .sc-category-chip {
  display: inline-block; justify-self: start; width: fit-content; max-width: 100%;
  padding: 3px 8px; border-radius: 6px; background: #eaf0fb; color: #304d80;
  font-size: 12px; font-weight: 650; line-height: 1.35;
}
.sc-shell .sc-head .sc-category-chip { margin-bottom: 6px; }
.sc-shell .sc-row-sub, .sc-shell .sc-excerpt, .sc-shell .sc-row-side time, .sc-shell .sc-meta time { color: var(--sc-muted); }
.sc-shell .sc-row-sub, .sc-shell .sc-row-side time, .sc-shell .sc-meta { font-size: 12px; line-height: 1.5; }
.sc-shell .sc-excerpt, .sc-shell .sc-row-sub { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sc-shell .sc-excerpt { font-size: 14px; line-height: 1.45; }
.sc-shell .sc-row-copy > strong { font-size: 16px; line-height: 1.35; }
.sc-shell .sc-row-side { display: grid; justify-items: end; gap: 6px; }
.sc-shell .sc-row-chevron { display: grid; place-items: center; color: #7b8fae; }
.sc-shell .sc-unread { display: inline-grid; place-items: center; min-width: 23px; height: 23px; padding: 0 5px; border-radius: 16px; background: #2858bc; color: white; font-size: 12px; font-weight: 720; }
.sc-shell .sc-empty { display: grid; justify-items: center; text-align: center; padding: 48px 22px; gap: 12px; }
.sc-shell .sc-empty-icon { width: 55px; height: 55px; border-radius: 17px; margin-bottom: 3px; }
.sc-shell .sc-empty-icon svg { width: 29px; height: 29px; }
.sc-shell .sc-empty p { max-width: 43ch; color: var(--sc-muted); font-size: 15px; line-height: 1.55; }
.sc-shell .sc-dialog { overflow: hidden; }
.sc-shell .sc-transcript { max-height: min(66vh,630px); min-height: 130px; overflow: auto; scrollbar-color: #b9c8df transparent; scrollbar-width: thin; }
.sc-shell .sc-messages { display: grid; gap: 15px; padding: clamp(15px,3.5vw,31px); list-style: none; }
.sc-shell .sc-msg { display: flex; min-width: 0; margin: 0; padding: 0; }
.sc-shell .sc-msg.sc-own { justify-content: flex-end; }
.sc-shell .sc-bubble { min-width: min(160px,100%); max-width: min(84%,580px); padding: 11px 15px 13px; background: #f0f1ef; border-radius: 14px 14px 14px 4px; }
.sc-shell .sc-own .sc-bubble { background: #e7efff; border-radius: 14px 14px 4px 14px; }
.sc-shell .sc-bubble p { line-height: 1.55; font-size: 15px; color: #223148; white-space: pre-wrap; overflow-wrap: anywhere; }
.sc-shell .sc-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; justify-content: space-between; margin-bottom: 3px; }
.sc-shell .sc-meta strong { color: #475364; font-weight: 690; }
.sc-shell .sc-own .sc-meta strong { color: var(--sc-blue); }
.sc-shell .sc-edited { margin-left: 7px; color: var(--sc-muted); }
.sc-shell .sc-edit { margin-top: 4px; }
.sc-shell .sc-edit summary, .sc-shell [data-sc-edit-cancel] {
  width: fit-content; color: var(--sc-blue); font-size: 13px; text-decoration: underline;
  text-underline-offset: 2px; cursor: pointer;
}
.sc-shell .sc-edit summary { padding: 2px 0; list-style: none; }
.sc-shell .sc-edit summary::-webkit-details-marker { display: none; }
.sc-shell .sc-edit[open] { border-top: 1px solid #cbd8ed; padding-top: 7px; margin-top: 9px; }
.sc-shell .sc-edit[open] summary { margin-bottom: 7px; }
.sc-shell .sc-bubble:has(.sc-edit[open]) { width: min(100%, 430px); }
.sc-shell [data-sc-editor] { display: grid; gap: 8px; }
.sc-shell [data-sc-editor] textarea { min-height: 76px; }
.sc-shell .sc-edit-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.sc-shell .sc-edit-actions .sc-btn { min-height: 36px; padding: 5px 12px; }
.sc-shell [data-sc-edit-notice] { color: #68431d; font-size: 13px; }
.sc-shell [data-sc-edit-notice]:empty { display: none; }
.sc-shell .sc-composer, .sc-shell .sc-endnote, .sc-shell .sc-state-change { border-top: 1px solid var(--sc-line); }
.sc-shell .sc-composer { padding: clamp(15px,3vw,24px); background: #fff; }
.sc-shell .sc-field { display: grid; gap: 7px; margin: 0; color: var(--sc-ink); min-width: 0; font-weight: 650; font-size: 14px; }
.sc-shell .sc-field > input, .sc-shell .sc-field > textarea, .sc-shell .sc-select-wrap > select { box-sizing: border-box; width: 100%; min-width: 0; margin: 0; padding: 11px 13px; border: 1px solid #bdc9d8; background: white; color: var(--sc-ink); border-radius: 9px; font: inherit; font-size: 16px; font-weight: 400; line-height: 1.45; }
.sc-shell .sc-select-wrap { display: block; position: relative; }
.sc-shell .sc-select-wrap > select { appearance: none; padding-right: 38px; cursor: pointer; }
.sc-shell .sc-select-wrap::after {
  content: ""; pointer-events: none; position: absolute; top: 50%; right: 17px;
  width: 7px; height: 7px; border: solid currentColor; border-width: 0 1.5px 1.5px 0;
  color: #536882; transform: translateY(-70%) rotate(45deg);
}
.sc-shell .sc-field > textarea { resize: vertical; min-height: 72px; }
.sc-shell .sc-field > input::placeholder, .sc-shell .sc-field > textarea::placeholder { color: #68768a; opacity: 1; }
.sc-shell .sc-compose-actions, .sc-shell .sc-form-foot { display: flex; align-items: center; justify-content: flex-end; margin-top: 11px; gap: 10px 16px; }
.sc-shell .sc-form-foot { justify-content: space-between; flex-wrap: wrap; }
.sc-shell .sc-form-foot > span, .sc-shell .sc-hint, .sc-shell .sc-endnote, .sc-shell .sc-state-change { font-size: 14px; color: var(--sc-muted); }
.sc-shell .sc-endnote, .sc-shell .sc-state-change { padding: 16px 20px; }
.sc-shell .sc-state-change { background: #f2f6fd; }
.sc-shell .sc-new, .sc-shell .sc-bind { display: grid; gap: 18px; padding: clamp(18px,3.5vw,32px); }
.sc-shell .sc-new .sc-form-foot { margin: 0; }
.sc-shell .sc-topic-option summary { width: fit-content; color: var(--sc-blue); cursor: pointer; font-size: 14px; }
.sc-shell .sc-topic-option[open] summary { margin-bottom: 10px; }
.sc-shell .sc-bind { margin-top: 17px; gap: 12px; }
.sc-shell .sc-bind > p { font-size: 14px; color: var(--sc-muted); }
.sc-shell .sc-bind .sc-contact { color: var(--sc-ink); }
.sc-shell .sc-search { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; align-items: end; margin-top: 4px; }
.sc-shell .sc-bindform { display: grid; justify-items: start; gap: 12px; border-top: 1px solid var(--sc-line); padding-top: 18px; }
.sc-shell .sc-bindform fieldset { display: grid; width: 100%; min-width: 0; margin: 0; padding: 0; border: 0; gap: 7px; }
.sc-shell .sc-bindform legend { padding: 0 0 7px; font-weight: 650; font-size: 14px; }
.sc-shell .sc-choice, .sc-shell .sc-confirm { display: flex; align-items: start; gap: 9px; margin: 0; font-size: 14px; color: var(--sc-ink); cursor: pointer; line-height: 1.45; }
.sc-shell .sc-choice { border: 1px solid var(--sc-line); border-radius: 8px; padding: 10px 12px; background: #fff; }
.sc-shell .sc-choice input, .sc-shell .sc-confirm input { min-width: 0; width: 17px; height: 17px; margin: 2px 0 0; flex: none; accent-color: var(--sc-accent); }
.sc-shell .sc-choice span { display: grid; gap: 2px; }
.sc-shell .sc-choice small { color: var(--sc-muted); }
.sc-shell .sc-error { margin: 0 0 15px; padding: 12px 15px; border-radius: 9px; color: #77282b; background: #fff0ed; border: 1px solid #e9bcb8; font-size: 14px; }
@media (max-width: 580px) {
  .sc-shell .sc-pagehead, .sc-shell .sc-head { align-items: flex-start; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
  .sc-shell .sc-head-actions { justify-content: flex-start; }
  .sc-shell .sc-head-actions .sc-btn { min-height: 38px; }
  .sc-shell .sc-row { grid-template-columns: minmax(0,1fr) auto; gap: 8px; padding: 13px; }
  .sc-shell .sc-row-icon, .sc-shell .sc-row-chevron { display: none; }
  .sc-shell .sc-row-side { gap: 5px; }
  .sc-shell .sc-row-side time { font-size: 11px; }
  .sc-shell .sc-bubble { max-width: 91%; min-width: min(135px,100%); padding: 9px 12px 11px; }
  .sc-shell .sc-messages { gap: 12px; }
  .sc-shell .sc-transcript { max-height: 55vh; }
  .sc-shell .sc-search { grid-template-columns: minmax(0,1fr); justify-items: start; }
  .sc-shell .sc-search .sc-field { width: 100%; }
}
/* The staff shell sits inside the operator dashboard's dark navigation. */
body:has(.admin-navigation) .sc-shell, .s-app .sc-shell {
  color-scheme: light;
  background: #f8f9fa;
  color: var(--sc-ink);
  border: 1px solid #dce2e9;
  border-radius: 18px;
  padding: clamp(15px, 2.5vw, 30px);
}
body:has(.admin-navigation) .sc-shell h1, body:has(.admin-navigation) .sc-shell h2 { color: var(--sc-ink); }

.sc-pagination { display:flex; align-items:center; flex-wrap:wrap; justify-content:center; gap:12px; margin:12px auto 24px; font-size:14px; }
.sc-pagination a { color:#284fa1; text-decoration:underline; text-underline-offset:3px; }
.s-app .sc-pagination a,body:has(.admin-navigation) .sc-pagination a { color:#b9ceff; }
.sc-shell .sc-btn:disabled { color:#626b78; background:#e2e5e9; cursor:default; }

.s-page:has(> .sc-shell) > .s-page-title { display:none; }

/* Inbox uses the same dark surfaces as the owner’s Studio navigation. */
.s-app .sc-shell.sc-rooms, body:has(.admin-navigation) .sc-shell.sc-rooms, .sc-shell.sc-rooms {
  color-scheme: dark; max-width: 840px; margin: 14px auto 38px; padding: 0;
  border: 0; border-radius: 0; background: transparent; color: #f4f5f8;
}
.sc-rooms .sc-rooms-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.sc-rooms .sc-rooms-head h1 { margin: 0; color: #f7f8fa; font-size: clamp(29px,4vw,41px); line-height: 1.12; }
.sc-rooms .sc-room-cards { flex: none; color: #a8bcee; font-size: 13px; text-decoration: none; padding: 7px 0; }
.sc-rooms .sc-room-cards:hover { text-decoration: underline; }
.sc-rooms .sc-room-filters { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 16px; }
.sc-rooms .sc-room-filters a { color: #b8bdc8; text-decoration: none; font-size: 13px; line-height: 20px; font-weight: 600; border-radius: 18px; padding: 6px 13px; }
.sc-rooms .sc-room-filters [aria-current] { background: #283751; color: #dce8ff; }
.sc-rooms .sc-room-list, .sc-rooms .sc-room-empty { margin: 0; padding: 0; border: 1px solid #32343c; border-radius: 17px; background: #1b1d24; }
.sc-rooms .sc-room-list { list-style: none; }
.sc-rooms .sc-room-list li { margin: 0; padding: 0; }
.sc-rooms .sc-room-list li + li { border-top: 1px solid #32343c; }
.sc-rooms .sc-room-list .sc-room-frame { position:relative; display: flex; align-items: center; gap: 13px; min-height: 91px; padding: 15px 18px; text-decoration: none; color: #f2f3f7; }
.sc-rooms .sc-room-list li:first-child .sc-room-frame { border-radius: 16px 16px 0 0; }
.sc-rooms .sc-room-list li:last-child .sc-room-frame { border-radius: 0 0 16px 16px; }
.sc-rooms .sc-room-list li:only-child .sc-room-frame { border-radius: 16px; }
.sc-rooms .sc-room-frame:has(.sc-row:hover), .sc-rooms .sc-room-frame:focus-within { background: #252832; }
.sc-rooms .sc-room-avatar { width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; font-size: 19px; font-weight: 650; }
.sc-rooms .sc-tone-0 { background: #303641; color: #cdd2dd; }
.sc-rooms .sc-tone-1 { background: #49303b; color: #ffcadc; }
.sc-rooms .sc-tone-2 { background: #2b3c55; color: #c4deff; }
.sc-rooms .sc-tone-3 { background: #30433b; color: #c6ebdc; }
.sc-rooms .sc-tone-4 { background: #413748; color: #e9d5f4; }
.sc-rooms .sc-room-content { display: grid; gap: 2px; flex: 1; min-width: 0; }
.sc-rooms .sc-room-line, .sc-rooms .sc-room-last, .sc-rooms .sc-room-who { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.sc-rooms .sc-room-line { justify-content: space-between; }
.sc-rooms .sc-room-line strong, .sc-rooms .sc-room-contact, .sc-rooms .sc-room-topic, .sc-rooms .sc-room-last > :first-child {
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.sc-rooms .sc-room-line strong { color: #f5f6f9; font-size: 16px; line-height: 1.4; font-weight: 650; }
.sc-rooms .sc-room-line time, .sc-rooms .sc-room-contact, .sc-rooms .sc-room-closed { color: #b2b8c5; font-size: 11px; line-height: 1.4; }
.sc-rooms .sc-room-line time, .sc-rooms .sc-room-closed { flex: none; }
.sc-rooms .sc-room-who { flex: 1; }
.sc-rooms .sc-room-who strong { flex-shrink: 0; max-width: 100%; }
.sc-rooms .sc-room-contact { min-width: 20px; }
.sc-rooms .sc-room-topic { color: #c4cee1; font-size: 12px; line-height: 1.45; }
.sc-rooms .sc-room-last { align-items: center; min-height: 19px; }
.sc-rooms .sc-room-last > :first-child { flex: 1; color: #b4bac6; font-size: 14px; line-height: 1.35; }
.sc-rooms .sc-room-unread .sc-room-last > :first-child { color: #ebedf4; }
.sc-rooms .sc-room-unread .sc-room-line time { color: #acc8ff; }
.sc-rooms .sc-counter { display: grid; place-items: center; flex: none; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 12px; color: #111b31; background: #a1beff; font-size: 11px; font-weight: 750; }
.sc-rooms .sc-room-empty { padding: 39px 18px; text-align: center; color: #c4cee0; }
.sc-rooms .sc-room-empty h2 { margin: 9px 0 0; color: inherit; font-size: 17px; }
.sc-rooms .sc-pagination a { color: #b9ceff; }
@media (max-width: 580px) {
  .s-app .sc-shell.sc-rooms, .sc-shell.sc-rooms { margin-top: 6px; }
  .sc-rooms .sc-rooms-head { gap: 8px; margin-bottom: 12px; }
  .sc-rooms .sc-room-filters { gap: 2px; margin-bottom: 13px; }
  .sc-rooms .sc-room-filters a { padding: 6px 11px; }
  .sc-rooms .sc-room-list .sc-room-frame { gap: 9px; padding: 13px 11px; min-height: 84px; }
  .sc-rooms .sc-room-avatar { width: 35px; height: 35px; font-size: 15px; }
  .sc-rooms .sc-room-line { gap: 6px; }
  .sc-rooms .sc-room-who { gap: 5px; }
  .sc-rooms .sc-room-line strong { font-size: 15px; }
  .sc-rooms .sc-room-line time { font-size: 10px; }
}

.sc-rooms .sc-room-frame .sc-row { display:grid; gap:2px; min-width:0; padding:0; border:0; background:none; color:inherit; text-decoration:none; }
.sc-rooms .sc-room-frame .sc-row::after { content:""; position:absolute; inset:0; border-radius:inherit; }
.sc-rooms .sc-room-frame .sc-row:focus-visible::after { outline:2px solid #aac2fc; outline-offset:-3px; }
.sc-shell .sc-person-profile { color:var(--sc-blue,#3f77c4); text-decoration:underline; text-decoration-thickness:1px; text-underline-offset:3px; }
.sc-rooms .sc-room-frame .sc-person-profile { color:#b9ceff; }
.sc-rooms .sc-room-frame .sc-person-profile { position:relative; z-index:1; display:inline-block; max-width:100%; overflow:hidden; text-overflow:ellipsis; vertical-align:top; }
.sc-shell .sc-person-profile:focus-visible { outline:2px solid currentColor; outline-offset:3px; border-radius:3px; }
.sc-shell .sc-buyer-heading { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 10px; }
.sc-shell .sc-buyer-heading .sc-person-profile { font-size:16px; font-weight:650; }
.sc-shell .sc-buyer-heading span { font-size:12px; }
