/* Operator workspace v3 */
body.is-dashboard {
  --operator-bg: #f3f5f7;
  --operator-panel: #ffffff;
  --operator-soft: #f6f8fa;
  --operator-soft-strong: #edf2f4;
  --operator-border: #e1e6eb;
  --operator-border-strong: #d4dce3;
  --operator-text: #172033;
  --operator-muted: #697586;
  --operator-faint: #94a0af;
  --operator-accent: #087f74;
  --operator-accent-hover: #066b63;
  --operator-accent-soft: #e8f5f3;
  --operator-danger: #c2414b;
  --operator-warning: #b66a14;
  --operator-radius: 8px;
  color: var(--operator-text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.is-dashboard *,
body.is-dashboard *::before,
body.is-dashboard *::after {
  letter-spacing: 0;
}

body.is-dashboard button,
body.is-dashboard input,
body.is-dashboard textarea,
body.is-dashboard select {
  font: inherit;
}

body.is-dashboard button:focus-visible,
body.is-dashboard a:focus-visible,
body.is-dashboard input:focus-visible,
body.is-dashboard textarea:focus-visible,
body.is-dashboard select:focus-visible {
  outline: 3px solid rgba(8, 127, 116, 0.2);
  outline-offset: 2px;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  clip-path: inset(50%) !important;
}

body.is-dashboard .dashboard-view.is-section-inbox {
  min-height: 680px;
  background: var(--operator-bg);
}

body.is-dashboard .dashboard-view.is-section-inbox .app-shell {
  grid-template-columns: 216px minmax(0, 1fr);
  background: var(--operator-bg);
}

body.is-dashboard .app-sidebar {
  z-index: 210;
  display: flex;
  overflow: visible;
  flex-direction: column;
  border-right: 1px solid var(--operator-border);
  background: var(--operator-panel);
  padding: 16px 12px 12px;
  box-shadow: none;
}

body.is-dashboard .sidebar-title {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  color: var(--operator-text);
  font-size: 15px;
  font-weight: 700;
  padding: 0 6px;
}

body.is-dashboard .sidebar-brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: var(--operator-radius);
  background: var(--operator-accent);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

body.is-dashboard .sidebar-collapse-toggle {
  min-height: 36px;
  border: 0;
  border-radius: var(--operator-radius);
  background: transparent;
  color: var(--operator-muted);
  font-size: 12px;
  font-weight: 600;
  margin: 6px 0 8px;
}

body.is-dashboard .sidebar-collapse-toggle:hover {
  background: var(--operator-soft);
  color: var(--operator-text);
}

body.is-dashboard .sidebar-collapse-toggle svg,
body.is-dashboard .sidebar-link svg,
body.is-dashboard .sidebar-logout svg,
body.is-dashboard .chat-head svg,
body.is-dashboard .reply-tool svg,
body.is-dashboard .reply-send-button svg,
body.is-dashboard .chat-audio-message svg,
body.is-dashboard .client-contact-actions svg,
body.is-dashboard .inbox-search svg,
body.is-dashboard .inbox-project-select svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

body.is-dashboard .sidebar-operator-control {
  margin: 4px 0 12px;
}

body.is-dashboard .sidebar-operator-status {
  min-height: 48px;
  grid-template-columns: 10px minmax(0, 1fr) 16px;
  gap: 8px;
  border: 1px solid var(--operator-border);
  border-radius: var(--operator-radius);
  background: var(--operator-panel);
  padding: 7px 9px;
}

body.is-dashboard .sidebar-operator-status:hover {
  border-color: var(--operator-border-strong);
  background: var(--operator-soft);
}

body.is-dashboard .sidebar-operator-status strong {
  color: var(--operator-text);
  font-size: 12px;
  font-weight: 700;
}

body.is-dashboard .sidebar-operator-status small {
  color: var(--operator-muted);
  font-size: 10px;
  font-weight: 500;
}

body.is-dashboard .sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 0;
}

body.is-dashboard .sidebar-link {
  position: relative;
  min-height: 44px;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 8px;
  border: 0;
  border-radius: var(--operator-radius);
  background: transparent;
  color: var(--operator-muted);
  font-size: 13px;
  font-weight: 600;
  padding: 4px 8px;
}

body.is-dashboard .sidebar-link:hover {
  background: var(--operator-soft);
  color: var(--operator-text);
}

body.is-dashboard .sidebar-link.is-active {
  background: var(--operator-accent-soft);
  color: var(--operator-accent);
}

body.is-dashboard .sidebar-link.is-active::before {
  position: absolute;
  left: -12px;
  width: 3px;
  height: 24px;
  border-radius: 0 3px 3px 0;
  background: var(--operator-accent);
  content: "";
}

body.is-dashboard .sidebar-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
}

body.is-dashboard .sidebar-icon svg {
  width: 19px;
  height: 19px;
}

body.is-dashboard .sidebar-link > small {
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  background: var(--operator-soft-strong);
  color: var(--operator-muted);
  font-size: 10px;
  font-weight: 700;
  padding: 0 6px;
}

body.is-dashboard .sidebar-link.is-active > small {
  background: var(--operator-accent);
  color: #ffffff;
}

body.is-dashboard .sidebar-projects {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--operator-border);
}

body.is-dashboard .sidebar-account {
  gap: 6px;
  border-top: 1px solid var(--operator-border);
  padding: 10px 0 0;
}

body.is-dashboard .sidebar-account > span {
  color: var(--operator-faint);
  font-size: 10px;
  font-weight: 600;
  padding: 0 8px;
}

body.is-dashboard .sidebar-user,
body.is-dashboard .sidebar-logout {
  min-height: 40px;
  border: 0;
  border-radius: var(--operator-radius);
  background: transparent;
  color: var(--operator-muted);
  font-size: 11px;
  font-weight: 600;
}

body.is-dashboard .sidebar-logout:hover {
  background: #fff3f3;
  color: var(--operator-danger);
}

body.is-dashboard .dashboard-view.is-section-inbox .app-content {
  padding: 0;
}

body.is-dashboard .dashboard-view.is-section-inbox .inbox-view,
body.is-dashboard .dashboard-view.is-section-inbox .inbox-shell {
  height: 100%;
  min-height: 0;
  margin: 0;
}

body.is-dashboard .dashboard-view.is-section-inbox .inbox-shell {
  grid-template-columns: 360px minmax(0, 1fr);
  border: 0;
  border-radius: 0;
  background: var(--operator-panel);
  box-shadow: none;
}

body.is-dashboard .dashboard-view.is-section-inbox .inbox-list {
  z-index: 2;
  display: flex;
  min-width: 0;
  flex-direction: column;
  border-right: 1px solid var(--operator-border);
  background: var(--operator-panel);
  padding: 0;
}

body.is-dashboard .inbox-list-head {
  min-height: 70px;
  align-items: center;
  border-bottom: 1px solid var(--operator-border);
  padding: 12px 14px;
}

body.is-dashboard .inbox-list-head strong {
  color: var(--operator-text);
  font-size: 17px;
  font-weight: 750;
}

body.is-dashboard .inbox-list-head span {
  margin-top: 2px;
  color: var(--operator-muted);
  font-size: 11px;
  font-weight: 500;
}

body.is-dashboard .inbox-refresh {
  width: 36px;
  height: 36px;
  border: 1px solid var(--operator-border);
  border-radius: var(--operator-radius);
  background: var(--operator-panel);
  color: var(--operator-muted);
}

body.is-dashboard .inbox-refresh:hover {
  border-color: var(--operator-border-strong);
  background: var(--operator-soft);
  color: var(--operator-accent);
}

body.is-dashboard .inbox-conversation-tabs {
  display: grid;
  min-height: 44px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
  border-bottom: 1px solid var(--operator-border);
  background: var(--operator-panel);
  padding: 5px 8px;
}

body.is-dashboard .inbox-conversation-tabs button {
  min-width: 0;
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--operator-muted);
  font-size: 11px;
  font-weight: 650;
  padding: 0 7px;
}

body.is-dashboard .inbox-conversation-tabs button:hover {
  background: var(--operator-soft);
  color: var(--operator-text);
}

body.is-dashboard .inbox-conversation-tabs button.is-active {
  background: var(--operator-soft-strong);
  color: var(--operator-text);
  box-shadow: none;
}

body.is-dashboard .inbox-conversation-tabs small {
  color: inherit;
  font-size: 10px;
  font-weight: 700;
}

body.is-dashboard .inbox-search-box {
  border-bottom: 1px solid var(--operator-border);
  background: var(--operator-panel);
  padding: 10px 10px 8px;
}

body.is-dashboard .inbox-search {
  position: relative;
  display: block;
  padding: 0;
  border: 0;
}

body.is-dashboard .inbox-search > svg {
  position: absolute;
  top: 50%;
  left: 12px;
  z-index: 1;
  width: 18px;
  height: 18px;
  color: var(--operator-faint);
  pointer-events: none;
  transform: translateY(-50%);
}

body.is-dashboard .inbox-search input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--operator-border);
  border-radius: var(--operator-radius);
  background: var(--operator-soft);
  color: var(--operator-text);
  font-size: 13px;
  padding: 0 38px 0 38px;
}

body.is-dashboard .inbox-search input::placeholder {
  color: var(--operator-faint);
}

body.is-dashboard .inbox-search input:focus {
  border-color: rgba(8, 127, 116, 0.5);
  background: var(--operator-panel);
}

body.is-dashboard .inbox-search-clear {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--operator-muted);
  transform: translateY(-50%);
}

body.is-dashboard .inbox-search-scopes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 3px;
  overflow: visible;
  margin-top: 7px;
  padding: 3px;
  border-radius: var(--operator-radius);
  background: var(--operator-soft);
}

body.is-dashboard .inbox-search-scopes button {
  min-width: 0;
  min-height: 28px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--operator-muted);
  font-size: 10px;
  font-weight: 600;
  padding: 0 4px;
}

body.is-dashboard .inbox-search-scopes button.is-active {
  background: var(--operator-panel);
  color: var(--operator-accent);
  box-shadow: 0 1px 3px rgba(23, 32, 51, 0.08);
}

body.is-dashboard .inbox-project-select {
  position: relative;
  display: block;
  border-bottom: 1px solid var(--operator-border);
  background: var(--operator-panel);
  padding: 8px 10px;
}

body.is-dashboard .inbox-project-select > svg {
  position: absolute;
  top: 50%;
  left: 20px;
  z-index: 1;
  width: 16px;
  height: 16px;
  color: var(--operator-muted);
  pointer-events: none;
  transform: translateY(-50%);
}

body.is-dashboard .inbox-project-select select {
  width: 100%;
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: var(--operator-soft);
  color: var(--operator-muted);
  font-size: 11px;
  font-weight: 650;
  padding: 0 30px 0 34px;
}

body.is-dashboard .conversation-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 0;
  scrollbar-gutter: stable;
}

body.is-dashboard .conversation-card {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 82px;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  border: 0;
  border-bottom: 1px solid #edf0f3;
  border-radius: 0;
  background: var(--operator-panel);
  color: var(--operator-text);
  padding: 10px 11px;
  text-align: left;
}

body.is-dashboard .conversation-card:hover {
  background: #f8fafb;
}

body.is-dashboard .conversation-card.is-active {
  background: #eff8f6;
}

body.is-dashboard .conversation-card.is-active::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--operator-accent);
  content: "";
}

body.is-dashboard .conversation-card.has-unread:not(.is-active) {
  background: #fbfdfd;
}

body.is-dashboard .conversation-avatar {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  align-self: start;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: linear-gradient(145deg, var(--avatar-from), var(--avatar-to));
  box-shadow: 0 0 0 1px rgba(23, 32, 51, 0.08);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
}

body.is-dashboard .conversation-avatar::after {
  position: absolute;
  right: -1px;
  bottom: 1px;
  width: 9px;
  height: 9px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: #2daf70;
  content: "";
}

body.is-dashboard .conversation-main {
  display: grid;
  min-width: 0;
  gap: 3px;
}

body.is-dashboard .conversation-row,
body.is-dashboard .conversation-preview-row {
  min-width: 0;
}

body.is-dashboard .conversation-row > strong {
  overflow: hidden;
  color: var(--operator-text);
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.is-dashboard .conversation-meta {
  display: flex;
  align-items: center;
  gap: 5px;
}

body.is-dashboard .conversation-meta time {
  color: var(--operator-faint);
  font-size: 10px;
  font-weight: 600;
}

body.is-dashboard .conversation-unread {
  display: grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 9px;
  background: var(--operator-accent);
  color: #ffffff;
  font-size: 9px;
  font-weight: 750;
  padding: 0 5px;
}

body.is-dashboard .conversation-preview-row p {
  overflow: hidden;
  color: #4f5d70;
  font-size: 12px;
  font-weight: 450;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.is-dashboard .conversation-sent {
  color: var(--operator-accent);
  font-size: 10px;
  font-weight: 700;
}

body.is-dashboard .conversation-context {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  color: var(--operator-faint);
  font-size: 10px;
  font-weight: 550;
  white-space: nowrap;
}

body.is-dashboard .conversation-context > span:not(.conversation-wait):not(.conversation-related) {
  overflow: hidden;
  text-overflow: ellipsis;
}

body.is-dashboard .conversation-context i {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: var(--project-color);
}

body.is-dashboard .conversation-related {
  display: none;
}

body.is-dashboard .conversation-wait {
  flex: 0 0 auto;
  margin-left: auto;
  color: var(--operator-warning);
  font-size: 9px;
  font-weight: 700;
}

body.is-dashboard .conversation-wait.is-urgent {
  color: var(--operator-danger);
}

body.is-dashboard .dashboard-view.is-section-inbox .inbox-chat {
  min-width: 0;
  border: 0;
  background: var(--operator-soft);
}

body.is-dashboard .chat-workspace {
  display: grid;
  height: 100%;
  min-height: 0;
  grid-template-rows: 70px minmax(0, 1fr) auto auto;
  overflow: hidden;
  background: #f5f7f9;
  background-image: none;
}

body.is-dashboard .chat-head {
  z-index: 4;
  display: grid;
  min-height: 70px;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--operator-border);
  background: rgba(255, 255, 255, 0.98);
  padding: 10px 14px;
  backdrop-filter: none;
}

body.is-dashboard .chat-back-button {
  display: none;
}

body.is-dashboard .chat-title-block {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

body.is-dashboard .chat-title-block .conversation-avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
}

body.is-dashboard .chat-title-block > div {
  min-width: 0;
}

body.is-dashboard .chat-title-block h2 {
  overflow: hidden;
  margin: 0;
  color: var(--operator-text);
  font-size: 16px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.is-dashboard .chat-title-block p {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  margin: 3px 0 0;
  color: var(--operator-muted);
  font-size: 11px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.is-dashboard .chat-presence-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: #2daf70;
}

body.is-dashboard .chat-client-context {
  overflow: hidden;
  margin-left: 3px;
  color: var(--operator-faint);
  text-overflow: ellipsis;
}

body.is-dashboard .chat-head-actions {
  display: flex;
  width: auto;
  max-width: none;
  align-items: center;
  gap: 6px;
  overflow: visible;
}

body.is-dashboard .conversation-status-control {
  display: block;
}

body.is-dashboard .conversation-status-select {
  min-height: 36px;
  border: 1px solid var(--operator-border);
  border-radius: var(--operator-radius);
  background: var(--operator-panel);
  color: var(--operator-muted);
  font-size: 11px;
  font-weight: 650;
  padding: 0 28px 0 10px;
}

body.is-dashboard .chat-source-link,
body.is-dashboard .chat-client-toggle {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border: 1px solid var(--operator-border);
  border-radius: var(--operator-radius);
  background: var(--operator-panel);
  color: var(--operator-muted);
}

body.is-dashboard .chat-source-link:hover,
body.is-dashboard .chat-client-toggle:hover {
  border-color: var(--operator-border-strong);
  background: var(--operator-soft);
  color: var(--operator-accent);
}

body.is-dashboard .chat-messages {
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: 3px;
  overflow-y: auto;
  background: #f5f7f9;
  padding: 18px clamp(16px, 5vw, 64px) 22px;
  scrollbar-gutter: stable;
}

body.is-dashboard .chat-date-divider {
  display: flex;
  width: 100%;
  justify-content: center;
  margin: 7px 0 10px;
}

body.is-dashboard .chat-date-divider span {
  border: 1px solid var(--operator-border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--operator-muted);
  font-size: 10px;
  font-weight: 600;
  padding: 4px 9px;
}

body.is-dashboard .chat-message {
  position: relative;
  width: fit-content;
  min-width: 72px;
  max-width: min(66%, 680px);
  border: 1px solid var(--operator-border);
  border-radius: 14px 14px 14px 4px;
  background: var(--operator-panel);
  box-shadow: 0 1px 2px rgba(23, 32, 51, 0.04);
  color: var(--operator-text);
  padding: 8px 11px 6px;
}

body.is-dashboard .chat-message.is-manager {
  align-self: flex-end;
  border-color: #cfe7e3;
  border-radius: 14px 14px 4px 14px;
  background: #e6f4f1;
}

body.is-dashboard .chat-message.is-grouped {
  margin-top: 0;
}

body.is-dashboard .chat-message.is-tail {
  margin-top: 8px;
}

body.is-dashboard .chat-message-author {
  display: block;
  margin: 0 0 4px;
  color: var(--operator-muted);
  font-size: 10px;
  font-weight: 600;
}

body.is-dashboard .chat-message p {
  margin: 0;
  color: var(--operator-text);
  font-size: 14px;
  font-weight: 430;
  line-height: 1.42;
}

body.is-dashboard .chat-message time {
  display: block;
  margin-top: 4px;
  color: var(--operator-faint);
  font-size: 9px;
  font-weight: 550;
  text-align: right;
}

body.is-dashboard .chat-message-reply {
  top: 50%;
  right: -34px;
  bottom: auto;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--operator-panel);
  box-shadow: 0 2px 8px rgba(23, 32, 51, 0.12);
  color: var(--operator-muted);
  opacity: 0;
  transform: translateY(-50%);
}

body.is-dashboard .chat-message.is-manager .chat-message-reply {
  right: auto;
  left: -34px;
}

body.is-dashboard .chat-message:hover .chat-message-reply,
body.is-dashboard .chat-message-reply:focus-visible {
  opacity: 1;
}

body.is-dashboard .chat-message-reply svg {
  width: 15px;
  height: 15px;
}

body.is-dashboard .chat-audio-message {
  display: grid;
  width: min(360px, 60vw);
  min-width: 280px;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 0;
  background: transparent;
  padding: 3px 0 1px;
}

body.is-dashboard .chat-audio-toggle {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--operator-accent);
  color: #ffffff;
  padding: 0;
}

body.is-dashboard .chat-audio-toggle:hover {
  background: var(--operator-accent-hover);
}

body.is-dashboard .audio-icon-pause,
body.is-dashboard .chat-audio-message.is-playing .audio-icon-play {
  display: none;
}

body.is-dashboard .chat-audio-message.is-playing .audio-icon-pause {
  display: block;
}

body.is-dashboard .chat-audio-body {
  display: grid;
  min-width: 0;
  gap: 3px;
}

body.is-dashboard .chat-audio-waveform {
  position: relative;
  height: 28px;
}

body.is-dashboard .chat-audio-waveform::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(
    90deg,
    var(--operator-accent) 0 var(--audio-progress, 0%),
    var(--operator-border-strong) var(--audio-progress, 0%) 100%
  );
  content: "";
  pointer-events: none;
}

body.is-dashboard .chat-audio-bars {
  position: absolute;
  inset: 3px 0;
  display: flex;
  align-items: center;
  gap: 2px;
  overflow: hidden;
  color: #9aa7b4;
  pointer-events: none;
}

body.is-dashboard .chat-audio-bars span {
  width: 3px;
  height: var(--audio-bar);
  flex: 1 1 3px;
  max-width: 4px;
  border-radius: 2px;
  background: currentColor;
  margin: 0;
}

body.is-dashboard .chat-audio-progress {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 28px;
  cursor: pointer;
  margin: 0;
  opacity: 0.01;
}

body.is-dashboard .chat-audio-message audio[hidden] {
  display: none !important;
}

body.is-dashboard .chat-audio-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--operator-muted);
  font-size: 9px;
  font-weight: 550;
}

body.is-dashboard .dashboard-view.is-section-inbox .chat-audio-meta span {
  display: inline;
  width: auto;
  margin: 0;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  white-space: nowrap;
}

body.is-dashboard .dashboard-view.is-section-inbox .chat-audio-meta > span {
  flex: 0 1 auto;
}

body.is-dashboard .chat-audio-meta b {
  color: var(--operator-text);
  font-weight: 650;
}

body.is-dashboard .chat-audio-speed {
  min-width: 30px;
  height: 22px;
  border: 0;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--operator-text);
  font-size: 9px;
  font-weight: 700;
  padding: 0 5px;
}

body.is-dashboard .chat-audio-download {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  margin-left: auto;
  color: var(--operator-muted);
}

body.is-dashboard .chat-audio-download svg {
  width: 15px;
  height: 15px;
}

body.is-dashboard .chat-audio-message.is-error .chat-audio-bars,
body.is-dashboard .chat-audio-message.is-error .chat-audio-meta {
  color: var(--operator-danger);
}

body.is-dashboard .quick-replies {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  overflow: visible;
  border-top: 1px solid var(--operator-border);
  background: var(--operator-panel);
  padding: 7px 12px;
}

body.is-dashboard .quick-replies-more {
  display: inline-flex;
  min-width: 0;
  min-height: 34px;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--operator-border);
  border-radius: var(--operator-radius);
  background: var(--operator-panel);
  color: var(--operator-muted);
  font-size: 11px;
  font-weight: 650;
  padding: 0 10px;
}

body.is-dashboard .quick-replies-more:hover,
body.is-dashboard .quick-replies-more[aria-expanded="true"] {
  border-color: rgba(8, 127, 116, 0.35);
  background: var(--operator-accent-soft);
  color: var(--operator-accent);
}

body.is-dashboard .quick-replies-more svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

body.is-dashboard .quick-replies-track {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  gap: 6px;
  overflow: hidden;
  padding: 0;
}

body.is-dashboard .quick-reply {
  display: block;
  min-width: 0;
  min-height: 34px;
  max-width: 240px;
  flex: 1 1 180px;
  overflow: hidden;
  border: 1px solid var(--operator-border);
  border-radius: var(--operator-radius);
  background: var(--operator-soft);
  color: #465568;
  font-size: 11px;
  font-weight: 550;
  padding: 0 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.is-dashboard .quick-reply:hover {
  border-color: rgba(8, 127, 116, 0.32);
  background: var(--operator-accent-soft);
  color: var(--operator-accent);
}

body.is-dashboard .quick-reply:nth-child(n + 3) {
  display: none;
}

body.is-dashboard .quick-replies.is-expanded .quick-replies-track {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 12px;
  z-index: 30;
  display: grid;
  width: min(360px, calc(100% - 24px));
  gap: 5px;
  overflow: visible;
  border: 1px solid var(--operator-border);
  border-radius: var(--operator-radius);
  background: var(--operator-panel);
  box-shadow: 0 14px 36px rgba(23, 32, 51, 0.16);
  padding: 7px;
}

body.is-dashboard .quick-replies.is-expanded .quick-reply {
  display: block;
  width: 100%;
  max-width: none;
  text-align: left;
}

body.is-dashboard .manager-reply-form {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 44px;
  gap: 8px;
  align-items: end;
  border-top: 1px solid var(--operator-border);
  background: var(--operator-panel);
  padding: 9px 12px 11px;
}

body.is-dashboard .manager-reply-context,
body.is-dashboard .reply-pending {
  grid-column: 1 / -1;
}

body.is-dashboard .manager-reply-context {
  border: 0;
  border-left: 3px solid var(--operator-accent);
  border-radius: 0;
  background: var(--operator-soft);
  padding: 7px 9px;
}

body.is-dashboard .reply-tool,
body.is-dashboard .manager-reply-form .reply-send-button {
  display: grid;
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  place-items: center;
  border: 0;
  border-radius: var(--operator-radius);
  background: var(--operator-soft-strong);
  color: var(--operator-muted);
  padding: 0;
}

body.is-dashboard .reply-tool:hover {
  background: var(--operator-accent-soft);
  color: var(--operator-accent);
}

body.is-dashboard .reply-input-shell {
  display: grid;
  min-height: 40px;
  grid-template-columns: minmax(0, 1fr) 38px;
  align-items: end;
  border: 1px solid var(--operator-border);
  border-radius: var(--operator-radius);
  background: var(--operator-soft);
}

body.is-dashboard .reply-input-shell:focus-within {
  border-color: rgba(8, 127, 116, 0.5);
  background: var(--operator-panel);
  box-shadow: 0 0 0 3px rgba(8, 127, 116, 0.08);
}

body.is-dashboard .reply-input-shell textarea {
  min-height: 40px;
  max-height: 132px;
  border: 0;
  background: transparent;
  color: var(--operator-text);
  font-size: 14px;
  line-height: 1.4;
  padding: 10px 6px 8px 12px;
}

body.is-dashboard .reply-input-shell textarea::placeholder {
  color: var(--operator-faint);
}

body.is-dashboard .reply-input-shell .reply-emoji-button {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  margin: 3px;
  background: transparent;
}

body.is-dashboard .manager-reply-form .reply-send-button {
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  background: #d8dee5;
  color: #ffffff;
}

body.is-dashboard .manager-reply-form .reply-send-button.is-active {
  background: var(--operator-accent);
  box-shadow: none;
}

body.is-dashboard .manager-reply-form .reply-send-button.is-active:hover {
  background: var(--operator-accent-hover);
}

body.is-dashboard .reply-send-button svg {
  width: 19px;
  height: 19px;
}

body.is-dashboard .reply-emoji-panel {
  right: 60px;
  bottom: calc(100% + 8px);
  left: auto;
  z-index: 40;
  grid-template-columns: repeat(4, 38px);
  border: 1px solid var(--operator-border);
  border-radius: var(--operator-radius);
  background: var(--operator-panel);
  box-shadow: 0 14px 36px rgba(23, 32, 51, 0.16);
}

body.is-dashboard .dashboard-view.is-section-inbox .inbox-client {
  position: absolute;
  inset: 0 0 0 auto;
  z-index: 25;
  display: block;
  width: 330px;
  height: 100%;
  overflow: hidden;
  border: 0;
  border-left: 1px solid var(--operator-border);
  background: var(--operator-panel);
  box-shadow: -18px 0 40px rgba(23, 32, 51, 0.12);
  opacity: 0;
  pointer-events: none;
  transform: translateX(100%);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

body.is-dashboard .dashboard-view.is-section-inbox .inbox-view.show-client .inbox-client {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

body.is-dashboard .client-card {
  display: grid;
  height: 100%;
  align-content: start;
  gap: 12px;
  overflow-y: auto;
  background: var(--operator-panel);
  padding: 14px;
  text-align: left;
}

body.is-dashboard .client-card-head {
  min-height: 34px;
  align-items: center;
  border-bottom: 1px solid var(--operator-border);
  color: var(--operator-muted);
  font-size: 11px;
  font-weight: 650;
  padding-bottom: 10px;
}

body.is-dashboard .client-card-close {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 6px;
  background: var(--operator-soft);
  color: var(--operator-muted);
}

body.is-dashboard .client-profile-hero {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 3px 0;
}

body.is-dashboard .client-profile-hero .conversation-avatar {
  width: 48px;
  height: 48px;
}

body.is-dashboard .client-profile-hero h3 {
  margin: 0;
  color: var(--operator-text);
  font-size: 15px;
  font-weight: 720;
}

body.is-dashboard .client-profile-hero p {
  margin: 3px 0 0;
  color: var(--operator-muted);
  font-size: 10px;
  font-weight: 500;
}

body.is-dashboard .client-contact-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

body.is-dashboard .client-contact-actions a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--operator-border);
  border-radius: var(--operator-radius);
  background: var(--operator-panel);
  color: var(--operator-accent);
  font-size: 11px;
  font-weight: 650;
  text-decoration: none;
}

body.is-dashboard .client-contact-actions a:hover {
  background: var(--operator-accent-soft);
}

body.is-dashboard .client-contact-actions svg {
  width: 15px;
  height: 15px;
}

body.is-dashboard .client-manager-label,
body.is-dashboard .client-panel-section {
  display: grid;
  gap: 7px;
  border: 1px solid var(--operator-border);
  border-radius: var(--operator-radius);
  background: var(--operator-panel);
  padding: 11px;
}

body.is-dashboard .client-manager-label > span,
body.is-dashboard .client-note > span,
body.is-dashboard .conversation-source-card > strong {
  color: var(--operator-text);
  font-size: 11px;
  font-weight: 700;
}

body.is-dashboard .client-manager-label input,
body.is-dashboard .client-note textarea {
  border: 1px solid var(--operator-border);
  border-radius: 6px;
  background: var(--operator-soft);
  color: var(--operator-text);
  font-size: 12px;
}

body.is-dashboard .client-manager-label small,
body.is-dashboard .conversation-source-card > span {
  color: var(--operator-faint);
  font-size: 9px;
  font-weight: 500;
}

body.is-dashboard .conversation-source-grid {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 7px 9px;
  font-size: 10px;
}

body.is-dashboard .conversation-source-grid span,
body.is-dashboard .client-card dt {
  color: var(--operator-faint);
  font-weight: 500;
}

body.is-dashboard .conversation-source-grid strong,
body.is-dashboard .client-card dd {
  overflow-wrap: anywhere;
  color: var(--operator-text);
  font-weight: 600;
}

body.is-dashboard .client-card dl {
  margin: 0;
}

body.is-dashboard .client-card dl > div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 8px;
  border-bottom: 1px solid #edf0f3;
  padding: 7px 0;
}

body.is-dashboard .client-card dl > div:last-child {
  border-bottom: 0;
}

body.is-dashboard .client-card dt,
body.is-dashboard .client-card dd {
  margin: 0;
  font-size: 10px;
}

body.is-dashboard .client-card a {
  color: var(--operator-accent);
}

/* Match the legacy inbox selector specificity so this layer remains authoritative. */
body.is-dashboard .dashboard-view.is-section-inbox .chat-workspace {
  grid-template-rows: 70px minmax(0, 1fr) auto auto;
}

body.is-dashboard .dashboard-view.is-section-inbox .chat-head {
  min-height: 70px;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  border-bottom: 1px solid var(--operator-border);
  background: rgba(255, 255, 255, 0.98);
  padding: 10px 14px;
  backdrop-filter: none;
}

body.is-dashboard .dashboard-view.is-section-inbox .chat-back-button {
  display: none;
}

body.is-dashboard .dashboard-view.is-section-inbox .chat-title-block {
  display: flex;
  grid-template-columns: none;
  gap: 10px;
}

body.is-dashboard .dashboard-view.is-section-inbox .chat-title-block .conversation-avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  font-size: 11px;
}

body.is-dashboard .dashboard-view.is-section-inbox .chat-title-block h2 {
  font-size: 16px;
  font-weight: 720;
  line-height: 1.2;
}

body.is-dashboard .dashboard-view.is-section-inbox .chat-title-block p {
  gap: 5px;
  margin-top: 3px;
  font-size: 11px;
  font-weight: 500;
}

body.is-dashboard .dashboard-view.is-section-inbox .chat-source-link,
body.is-dashboard .dashboard-view.is-section-inbox .chat-client-toggle {
  display: grid;
  width: 36px;
  height: 36px;
  border: 1px solid var(--operator-border);
  border-radius: var(--operator-radius);
  background: var(--operator-panel);
  color: var(--operator-muted);
  font-size: inherit;
}

body.is-dashboard .dashboard-view.is-section-inbox .chat-messages {
  gap: 3px;
  background: #f5f7f9;
  padding: 18px clamp(16px, 5vw, 64px) 22px;
}

body.is-dashboard .dashboard-view.is-section-inbox .chat-message {
  display: block;
  width: fit-content;
  min-width: 72px;
  max-width: min(66%, 680px);
  border: 1px solid var(--operator-border);
  border-radius: 14px 14px 14px 4px;
  background: var(--operator-panel);
  box-shadow: 0 1px 2px rgba(23, 32, 51, 0.04);
  padding: 8px 11px 6px;
}

body.is-dashboard .dashboard-view.is-section-inbox .chat-message.is-manager {
  border-color: #cfe7e3;
  border-radius: 14px 14px 4px 14px;
  background: #e6f4f1;
}

body.is-dashboard .dashboard-view.is-section-inbox .chat-message-author {
  margin: 0 0 4px;
  color: var(--operator-muted);
  font-size: 10px;
  font-weight: 600;
  padding: 0;
}

body.is-dashboard .dashboard-view.is-section-inbox .chat-message p,
body.is-dashboard .dashboard-view.is-section-inbox .chat-message.is-manager p,
body.is-dashboard .dashboard-view.is-section-inbox .chat-message.is-grouped p,
body.is-dashboard .dashboard-view.is-section-inbox .chat-message.is-manager.is-grouped p {
  margin: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--operator-text);
  font-size: 14px;
  font-weight: 430;
  line-height: 1.42;
  padding: 0;
}

body.is-dashboard .dashboard-view.is-section-inbox .chat-message time,
body.is-dashboard .dashboard-view.is-section-inbox .chat-message.is-manager time {
  display: block;
  justify-self: auto;
  margin-top: 4px;
  color: var(--operator-faint);
  font-size: 9px;
  font-weight: 550;
  padding: 0;
  text-align: right;
}

body.is-dashboard .dashboard-view.is-section-inbox .quick-replies {
  display: flex;
  grid-template-columns: none;
  gap: 8px;
  border-top: 1px solid var(--operator-border);
  background: var(--operator-panel);
  padding: 7px 12px;
}

body.is-dashboard .dashboard-view.is-section-inbox .quick-replies-more {
  display: inline-flex;
  width: auto;
  min-width: 0;
  height: auto;
  min-height: 34px;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--operator-border);
  border-radius: var(--operator-radius);
  background: var(--operator-panel);
  color: var(--operator-muted);
  font-size: 11px;
  font-weight: 650;
  padding: 0 10px;
}

body.is-dashboard .dashboard-view.is-section-inbox .quick-replies-track {
  display: flex;
  flex: 1 1 auto;
  gap: 6px;
  overflow: hidden;
  padding: 0;
}

body.is-dashboard .dashboard-view.is-section-inbox .quick-reply {
  min-width: 0;
  min-height: 34px;
  max-width: 240px;
  flex: 1 1 180px;
  overflow: hidden;
  border: 1px solid var(--operator-border);
  border-radius: var(--operator-radius);
  background: var(--operator-soft);
  color: #465568;
  font-size: 11px;
  font-weight: 550;
  padding: 0 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.is-dashboard .dashboard-view.is-section-inbox .quick-replies.is-expanded .quick-replies-track {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 12px;
  display: grid;
  width: min(360px, calc(100% - 24px));
  gap: 5px;
  overflow: visible;
  border: 1px solid var(--operator-border);
  border-radius: var(--operator-radius);
  background: var(--operator-panel);
  box-shadow: 0 14px 36px rgba(23, 32, 51, 0.16);
  padding: 7px;
}

body.is-dashboard .dashboard-view.is-section-inbox .quick-replies.is-expanded .quick-reply {
  display: block;
  width: 100%;
  max-width: none;
  text-align: left;
}

body.is-dashboard .dashboard-view.is-section-inbox .manager-reply-form {
  grid-template-columns: 40px minmax(0, 1fr) 44px !important;
  gap: 8px;
  border-top: 1px solid var(--operator-border);
  background: var(--operator-panel);
  padding: 9px 12px 11px;
}

body.is-dashboard .dashboard-view.is-section-inbox .reply-input-shell {
  grid-template-columns: minmax(0, 1fr) 38px;
  min-height: 40px;
  border: 1px solid var(--operator-border);
  border-radius: var(--operator-radius);
  background: var(--operator-soft);
  padding: 0;
}

body.is-dashboard .dashboard-view.is-section-inbox .manager-reply-form textarea {
  min-height: 40px;
  max-height: 132px;
  border: 0;
  background: transparent;
  color: var(--operator-text);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  overflow-y: hidden;
  padding: 10px 6px 8px 12px;
  text-overflow: clip;
  white-space: pre-wrap;
}

@media (min-width: 1520px) {
  body.is-dashboard .dashboard-view.is-section-inbox .inbox-view.show-client .inbox-shell {
    grid-template-columns: 348px minmax(0, 1fr) 304px;
  }

  body.is-dashboard .dashboard-view.is-section-inbox .inbox-view.show-client .inbox-client {
    position: static;
    width: 304px;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    box-shadow: none;
  }
}

@media (min-width: 981px) {
  body.is-dashboard.dashboard-sidebar-collapsed .dashboard-view.is-section-inbox .app-shell {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  body.is-dashboard.dashboard-sidebar-collapsed .app-sidebar {
    align-items: center;
    padding: 14px 10px 10px;
  }

  body.is-dashboard.dashboard-sidebar-collapsed .sidebar-title {
    display: grid !important;
    width: 44px;
    place-items: center;
    padding: 0;
  }

  body.is-dashboard.dashboard-sidebar-collapsed .sidebar-title strong,
  body.is-dashboard.dashboard-sidebar-collapsed .sidebar-operator-status div,
  body.is-dashboard.dashboard-sidebar-collapsed .sidebar-operator-status svg,
  body.is-dashboard.dashboard-sidebar-collapsed .sidebar-link > span:not(.sidebar-icon),
  body.is-dashboard.dashboard-sidebar-collapsed .sidebar-link > small,
  body.is-dashboard.dashboard-sidebar-collapsed .sidebar-projects,
  body.is-dashboard.dashboard-sidebar-collapsed .sidebar-account > span,
  body.is-dashboard.dashboard-sidebar-collapsed .sidebar-user,
  body.is-dashboard.dashboard-sidebar-collapsed .sidebar-logout-label {
    display: none !important;
  }

  body.is-dashboard.dashboard-sidebar-collapsed .sidebar-brand-mark {
    width: 36px;
    height: 36px;
  }

  body.is-dashboard.dashboard-sidebar-collapsed .sidebar-collapse-toggle,
  body.is-dashboard.dashboard-sidebar-collapsed .sidebar-link,
  body.is-dashboard.dashboard-sidebar-collapsed .sidebar-logout {
    width: 44px;
    min-width: 44px;
    min-height: 40px;
    margin: 0 auto;
    border-radius: var(--operator-radius);
    padding: 0;
  }

  body.is-dashboard.dashboard-sidebar-collapsed .sidebar-collapse-toggle {
    height: 36px;
    margin: 4px auto 8px;
  }

  body.is-dashboard.dashboard-sidebar-collapsed .sidebar-operator-control {
    margin: 3px auto 10px;
  }

  body.is-dashboard.dashboard-sidebar-collapsed .sidebar-operator-status {
    width: 40px;
    min-height: 40px;
    grid-template-columns: 1fr;
    place-items: center;
    margin: 0;
    border-radius: var(--operator-radius);
    padding: 0;
  }

  body.is-dashboard.dashboard-sidebar-collapsed .sidebar-nav,
  body.is-dashboard.dashboard-sidebar-collapsed .sidebar-account {
    width: 100%;
  }

  body.is-dashboard.dashboard-sidebar-collapsed .sidebar-link {
    display: grid;
    grid-template-columns: 1fr;
    height: 44px;
    place-items: center;
  }

  body.is-dashboard.dashboard-sidebar-collapsed .sidebar-link.is-active::before {
    left: -10px;
  }

  body.is-dashboard.dashboard-sidebar-collapsed .sidebar-icon {
    width: 32px;
    height: 32px;
  }

  body.is-dashboard.dashboard-sidebar-collapsed .sidebar-link::after {
    left: calc(100% + 9px);
    min-width: max-content;
    border: 1px solid var(--operator-border);
    border-radius: 6px;
    background: var(--operator-text);
    box-shadow: 0 8px 24px rgba(23, 32, 51, 0.16);
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    padding: 6px 8px;
  }

  body.is-dashboard.dashboard-sidebar-collapsed .sidebar-logout {
    height: 44px;
  }
}

@media (max-width: 1180px) and (min-width: 981px) {
  body.is-dashboard .dashboard-view.is-section-inbox .inbox-shell {
    grid-template-columns: 330px minmax(0, 1fr);
  }
}

@media (max-width: 980px) {
  body.is-dashboard .dashboard-view.is-section-inbox .app-shell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  }

  body.is-dashboard .app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(86vw, 310px);
    max-width: 310px;
    padding: 0 12px calc(14px + env(safe-area-inset-bottom, 0px));
    box-shadow: 18px 0 42px rgba(23, 32, 51, 0.18);
    transform: translateX(-105%);
  }

  body.is-dashboard .app-sidebar.is-open {
    inset: 0 auto 0 0;
    z-index: 220;
    display: flex;
    width: min(86vw, 310px);
    max-width: 310px;
    max-height: 100dvh;
    margin: 0;
    overflow-y: auto;
    border: 0;
    border-right: 1px solid var(--operator-border);
    border-radius: 0 12px 12px 0;
    background: var(--operator-panel);
    padding: 0 12px calc(14px + env(safe-area-inset-bottom, 0px));
    box-shadow: 18px 0 42px rgba(23, 32, 51, 0.18);
    transform: translateX(0);
  }

  body.is-dashboard.dashboard-menu-open::before {
    display: none;
  }

  body.is-dashboard.dashboard-menu-open .dashboard-view::before {
    z-index: 190;
    background: rgba(15, 23, 42, 0.28);
    backdrop-filter: blur(2px);
  }

  body.is-dashboard .sidebar-mobile-head {
    display: flex;
    min-height: 64px;
    border-bottom: 1px solid var(--operator-border);
    background: var(--operator-panel);
  }

  body.is-dashboard .sidebar-title,
  body.is-dashboard .sidebar-collapse-toggle {
    display: none !important;
  }

  body.is-dashboard .dashboard-mobile-toolbar {
    min-height: 64px;
    border-bottom: 1px solid var(--operator-border);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
  }

  body.is-dashboard .dashboard-mobile-nav {
    min-height: 64px;
    border-top: 1px solid var(--operator-border);
    background: rgba(255, 255, 255, 0.98);
  }

  body.is-dashboard .dashboard-mobile-nav button {
    border-radius: 6px;
    color: var(--operator-muted);
  }

  body.is-dashboard .dashboard-mobile-nav button.is-active {
    background: var(--operator-accent-soft);
    color: var(--operator-accent);
  }

  body.is-dashboard .dashboard-view.is-section-inbox .app-content {
    height: 100%;
  }

  body.is-dashboard .dashboard-view.is-section-inbox .inbox-view,
  body.is-dashboard .dashboard-view.is-section-inbox .inbox-shell,
  body.is-dashboard .dashboard-view.is-section-inbox .inbox-list,
  body.is-dashboard .dashboard-view.is-section-inbox .inbox-chat {
    min-height: calc(100dvh - 128px - env(safe-area-inset-bottom, 0px));
    height: calc(100dvh - 128px - env(safe-area-inset-bottom, 0px));
  }

  body.is-dashboard .dashboard-view.is-section-inbox .inbox-shell {
    grid-template-columns: 330px minmax(0, 1fr);
  }

  body.is-dashboard .dashboard-view.is-section-inbox .inbox-client {
    position: fixed;
    top: 64px;
    bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    width: min(360px, 92vw);
    height: auto;
  }
}

@media (max-width: 720px) {
  body.is-dashboard .dashboard-view.is-section-inbox .inbox-shell {
    display: block;
  }

  body.is-dashboard .dashboard-view.is-section-inbox .inbox-list,
  body.is-dashboard .dashboard-view.is-section-inbox .inbox-chat {
    width: 100%;
  }

  body.is-dashboard .dashboard-view.is-section-inbox .inbox-view:not(.has-active-chat) .inbox-list {
    display: flex;
  }

  body.is-dashboard .dashboard-view.is-section-inbox .inbox-view:not(.has-active-chat) .inbox-chat,
  body.is-dashboard .dashboard-view.is-section-inbox .inbox-view.has-active-chat .inbox-list {
    display: none;
  }

  body.is-dashboard .dashboard-view.is-section-inbox .inbox-view.has-active-chat .inbox-chat {
    display: block;
  }

  body.is-dashboard .inbox-list-head {
    min-height: 60px;
    padding: 9px 12px;
  }

  body.is-dashboard .inbox-search-scopes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.is-dashboard .dashboard-view.is-section-inbox .inbox-search-scopes {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2px;
    padding: 3px;
  }

  body.is-dashboard .dashboard-view.is-section-inbox .inbox-search-scopes button {
    min-height: 32px;
    font-size: 10px;
    padding: 0 2px;
  }

  body.is-dashboard .conversation-card {
    min-height: 78px;
  }

  body.is-dashboard .chat-workspace {
    grid-template-rows: 60px minmax(0, 1fr) auto auto;
  }

  body.is-dashboard .dashboard-view.is-section-inbox .chat-workspace {
    grid-template-rows: 60px minmax(0, 1fr) auto auto;
  }

  body.is-dashboard .chat-head {
    min-height: 60px;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    gap: 7px;
    padding: 7px 8px;
  }

  body.is-dashboard .chat-back-button {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 0;
    border-radius: var(--operator-radius);
    background: var(--operator-soft);
    color: var(--operator-text);
  }

  body.is-dashboard .dashboard-view.is-section-inbox .chat-head {
    min-height: 60px;
    grid-template-columns: 36px minmax(0, 1fr) 36px;
    gap: 6px;
    padding: 7px 8px;
  }

  body.is-dashboard .dashboard-view.is-section-inbox .chat-back-button {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 0;
    border-radius: var(--operator-radius);
    background: var(--operator-soft);
    color: var(--operator-text);
    font-size: inherit;
  }

  body.is-dashboard .chat-title-block .conversation-avatar {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  body.is-dashboard .chat-title-block h2 {
    font-size: 14px;
  }

  body.is-dashboard .chat-title-block p {
    font-size: 10px;
  }

  body.is-dashboard .chat-client-context,
  body.is-dashboard .chat-source-link,
  body.is-dashboard .conversation-status-control {
    display: none;
  }

  body.is-dashboard .dashboard-view.is-section-inbox .chat-client-context,
  body.is-dashboard .dashboard-view.is-section-inbox .chat-source-link,
  body.is-dashboard .dashboard-view.is-section-inbox .conversation-status-control {
    display: none;
  }

  body.is-dashboard .chat-head-actions {
    gap: 0;
  }

  body.is-dashboard .dashboard-view.is-section-inbox .chat-head-actions {
    gap: 0;
  }

  body.is-dashboard .chat-messages {
    padding: 10px 10px 16px;
  }

  body.is-dashboard .dashboard-view.is-section-inbox .chat-messages {
    padding: 10px 10px 16px;
  }

  body.is-dashboard .chat-message {
    max-width: 86%;
  }

  body.is-dashboard .dashboard-view.is-section-inbox .chat-message {
    max-width: 86%;
  }

  body.is-dashboard .chat-message p {
    font-size: 14px;
  }

  body.is-dashboard .chat-message-reply {
    right: 3px;
    bottom: -14px;
    top: auto;
    opacity: 0.75;
    transform: none;
  }

  body.is-dashboard .chat-message.is-manager .chat-message-reply {
    right: auto;
    left: 3px;
  }

  body.is-dashboard .chat-audio-message {
    width: min(280px, 74vw);
    min-width: 230px;
  }

  body.is-dashboard .quick-replies {
    padding: 6px 8px;
  }

  body.is-dashboard .dashboard-view.is-section-inbox .quick-replies {
    gap: 7px;
    overflow: visible;
    padding: 6px 8px;
  }

  body.is-dashboard .quick-replies-more {
    width: 36px;
    min-width: 36px;
    padding: 0;
  }

  body.is-dashboard .dashboard-view.is-section-inbox .quick-replies-more {
    width: 36px;
    min-width: 36px;
    height: 36px;
    min-height: 36px;
    justify-content: center;
    padding: 0;
  }

  body.is-dashboard .quick-replies-more span {
    display: none;
  }

  body.is-dashboard .quick-reply {
    max-width: none;
  }

  body.is-dashboard .quick-reply:nth-child(n + 2) {
    display: none;
  }

  body.is-dashboard .quick-replies.is-expanded .quick-reply {
    display: block;
  }

  body.is-dashboard .manager-reply-form {
    grid-template-columns: 38px minmax(0, 1fr) 42px;
    gap: 6px;
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom, 0px));
  }

  body.is-dashboard .dashboard-view.is-section-inbox .manager-reply-form {
    grid-template-columns: 38px minmax(0, 1fr) 42px !important;
    gap: 6px;
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom, 0px));
  }

  body.is-dashboard .reply-input-shell textarea,
  body.is-dashboard .inbox-search input,
  body.is-dashboard .client-manager-label input,
  body.is-dashboard .client-note textarea,
  body.is-dashboard .conversation-status-select {
    font-size: 16px !important;
  }

  body.is-dashboard .reply-tool {
    width: 38px;
    min-width: 38px;
  }

  body.is-dashboard .manager-reply-form .reply-send-button {
    width: 42px;
    min-width: 42px;
  }

  body.is-dashboard .dashboard-view.is-section-inbox .inbox-client {
    top: 64px;
    bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    width: 100%;
    max-width: 100%;
    height: auto;
  }

  body.is-dashboard.dashboard-search-active .inbox-view,
  body.is-dashboard.dashboard-search-active .inbox-shell,
  body.is-dashboard.dashboard-search-active .inbox-list {
    min-height: calc(var(--visible-viewport-height, 100dvh) - 8px);
    height: calc(var(--visible-viewport-height, 100dvh) - 8px);
  }

  body.is-dashboard.dashboard-search-active .dashboard-mobile-toolbar,
  body.is-dashboard.dashboard-search-active .dashboard-mobile-nav {
    display: none;
  }
}

@media (max-width: 420px) {
  body.is-dashboard .chat-title-block p > span:nth-last-child(-n + 2) {
    display: none;
  }

  body.is-dashboard .chat-message {
    max-width: 90%;
  }

  body.is-dashboard .conversation-context .conversation-wait {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.is-dashboard .app-sidebar,
  body.is-dashboard .inbox-client,
  body.is-dashboard button {
    transition: none !important;
  }
}
