:root {
  color-scheme: light;
  --bg: #eef2f6;
  --surface: #fff;
  --surface-soft: #f9fbfd;
  --surface-strong: #101828;
  --line: #dce3eb;
  --line-strong: #c6d0dc;
  --text: #172033;
  --muted: #627085;
  --muted-2: #8a97aa;
  --primary: #1767e8;
  --primary-dark: #0d4fba;
  --teal: #0f9f8f;
  --amber: #d98b15;
  --rose: #d44242;
  --violet: #6750c8;
  --danger-bg: #fff0f0;
  --danger-line: #ffc4c4;
  --danger-text: #9a1c1c;
  --success-bg: #eefaf2;
  --success-line: #bbe5c8;
  --success-text: #176334;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

a {
  color: var(--primary);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  padding: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 34px rgba(23, 32, 51, 0.06);
}

.topbar-branding {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.brand {
  display: inline-flex;
  flex: 0 1 auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.brand span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--teal));
  color: #fff;
  font-size: 13px;
}

.workspace-label {
  flex: 0 0 auto;
  border-left: 1px solid var(--line);
  padding-left: 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.topbar-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  flex: 1 1 auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.nav-links {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.nav-link {
  flex: 0 0 auto;
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.nav-link:hover {
  background: #edf3fb;
  color: var(--primary);
}

.nav-link-active {
  background: #e8f1ff;
  color: var(--primary);
}

.nav-link-notifications {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.has-pending-notifications .nav-link-notifications {
  background: #fff7df;
  color: #70500f;
  box-shadow: inset 0 0 0 1px #f0cf8a;
}

.nav-badge {
  display: inline-grid;
  min-width: 22px;
  min-height: 22px;
  place-items: center;
  border-radius: 999px;
  padding: 2px 7px;
  background: var(--danger-text);
  color: #fff;
  font-size: 12px;
  line-height: 1;
}

.nav-badge.is-alerting {
  animation: notification-badge-pulse 1.1s ease-in-out infinite;
}

.admin-notification-toasts {
  position: fixed;
  top: 82px;
  right: 24px;
  z-index: 120;
  display: grid;
  gap: 10px;
  width: min(420px, calc(100vw - 32px));
  pointer-events: none;
}

.admin-notification-toast {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid #b9d1ff;
  border-left: 5px solid var(--primary);
  border-radius: 8px;
  padding: 13px 14px;
  background: #fff;
  box-shadow: 0 18px 46px rgba(23, 32, 51, 0.2);
  pointer-events: auto;
  animation: admin-notification-toast-in 180ms ease-out;
}

.admin-notification-toast.is-leaving {
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.admin-notification-toast-copy {
  min-width: 0;
}

.admin-notification-toast strong,
.admin-notification-toast p {
  display: block;
  margin: 0;
}

.admin-notification-toast strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1.25;
}

.admin-notification-toast p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.admin-notification-toast-actions {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 8px;
}

@keyframes admin-notification-toast-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes notification-badge-pulse {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.12);
  }
}

.signed-user {
  overflow: hidden;
  max-width: 150px;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
  border-left: 1px solid var(--line);
  padding-left: 14px;
  min-width: 0;
  justify-self: end;
}

.user-avatar,
.person-avatar,
.chat-avatar {
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #182235, #1767e8);
  color: #fff;
  font-weight: 800;
  line-height: 1;
  flex: 0 0 auto;
}

.user-avatar {
  width: 34px;
  height: 34px;
  font-size: 13px;
}

.page {
  width: min(2460px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.dashboard-head,
.workspace-head,
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.dashboard-head > *,
.workspace-head > *,
.panel-head > *,
.head-actions > *,
.topbar-branding > *,
.topbar-actions > * {
  min-width: 0;
}

.dashboard-head,
.workspace-head {
  margin-bottom: 18px;
}

.workspace-head {
  min-height: 88px;
}

.workspace-lead {
  max-width: 820px;
  margin: 8px 0 0;
  color: var(--muted);
}

.head-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 30px;
  line-height: 1.2;
}

h2 {
  margin-bottom: 0;
  font-size: 18px;
  line-height: 1.25;
}

.eyebrow {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.status-pill {
  border: 1px solid #b7d8c2;
  border-radius: 999px;
  padding: 5px 10px;
  background: #eff9f2;
  color: #146133;
  font-size: 13px;
  font-weight: 700;
}

.status-pill-success {
  border-color: var(--success-line);
  background: var(--success-bg);
  color: var(--success-text);
}

.status-pill-warning {
  border-color: #f0cf8a;
  background: #fff7df;
  color: #70500f;
}

.status-resolved,
.status-closed {
  border-color: #cbd5e1;
  background: #f3f6fa;
  color: #435063;
}

.status-pending {
  border-color: #f0cf8a;
  background: #fff7df;
  color: #70500f;
}

.status-spam {
  border-color: var(--danger-line);
  background: var(--danger-bg);
  color: var(--danger-text);
}

.mode-badge,
.priority-badge,
.identity-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-width: 0;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  background: #f8fafc;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.conversation-card-badges .mode-badge,
.conversation-card-badges .priority-badge,
.conversation-card-badges .identity-badge,
.headline-meta .identity-badge {
  white-space: normal;
}

.identity-badge {
  width: fit-content;
  border-color: #b7d8c5;
  background: #effaf2;
  color: #176334;
  font-size: 12px;
}

.identity-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
}

.identity-badge-google {
  border-color: #b8cff7;
  background: #eff5ff;
  color: #174a8f;
}

.identity-badge-facebook {
  border-color: #bcd4fa;
  background: #edf5ff;
  color: #1453a8;
}

.mode-work_request {
  border-color: #aac7f5;
  background: #edf5ff;
  color: #174a8f;
}

.priority-low {
  color: var(--muted);
}

.priority-high {
  border-color: #f0cf8a;
  background: #fff7df;
  color: #70500f;
}

.priority-urgent {
  border-color: var(--danger-line);
  background: var(--danger-bg);
  color: var(--danger-text);
}

.headline-subject {
  max-width: 780px;
  margin: 8px 0 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.headline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.mobile-conversation-actions {
  display: none;
}

.notice,
.alert {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  background: var(--surface);
}

.notice {
  margin-bottom: 18px;
}

.notice-success {
  border-color: #9ed8ad;
  background: #edf9f0;
}

.alert {
  margin-bottom: 14px;
}

.alert-error {
  border-color: var(--danger-line);
  background: var(--danger-bg);
  color: var(--danger-text);
}

.alert-success {
  border-color: var(--success-line);
  background: var(--success-bg);
  color: var(--success-text);
}

.is-hidden {
  display: none !important;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.metric,
.panel,
.auth-box,
.install-box {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(22, 32, 51, 0.06);
}

.metric {
  min-height: 96px;
  padding: 16px;
}

.metric span {
  display: block;
  min-height: 42px;
  color: var(--muted);
  font-size: 13px;
}

.metric strong {
  display: block;
  font-size: 30px;
  line-height: 1;
}

.split-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

.sites-management-layout {
  grid-template-columns: minmax(520px, 0.95fr) minmax(560px, 1.05fr);
}

.side-stack {
  display: grid;
  align-content: start;
  gap: 18px;
  min-width: 0;
}

.panel {
  padding: 18px;
}

.command-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric-grid > *,
.queue-metrics > *,
.command-grid > *,
.dashboard-grid > *,
.split-layout > *,
.queue-layout > *,
.conversation-layout > *,
.live-visitors-layout > *,
.analytics-grid > *,
.form-grid > *,
.form-grid-3 > *,
.welcome-link-row > *,
.notification-browser-diagnostics > * {
  min-width: 0;
}

.kpi-card {
  position: relative;
  min-height: 132px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(22, 32, 51, 0.06);
}

.kpi-card::after {
  content: "";
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 54px;
  height: 54px;
  border: 8px solid rgba(23, 103, 232, 0.14);
  border-radius: 50%;
}

.kpi-card span,
.kpi-card em {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
}

.kpi-card strong {
  display: block;
  margin: 10px 0 8px;
  font-size: 38px;
  line-height: 1;
}

.kpi-primary {
  border-color: #b9d2fb;
  background: linear-gradient(180deg, #fff, #eef5ff);
}

.kpi-success::after {
  border-color: rgba(15, 159, 143, 0.18);
}

.kpi-warning {
  border-color: #f1cf93;
  background: linear-gradient(180deg, #fff, #fff8eb);
}

.kpi-warning::after {
  border-color: rgba(217, 139, 21, 0.2);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(430px, 0.42fr);
  gap: 18px;
  align-items: start;
}

.dashboard-column {
  display: grid;
  gap: 18px;
  align-content: start;
}

.dashboard-main-panel,
.conversations-panel {
  grid-column: auto;
}

.dashboard-live-panel {
  overflow: hidden;
}

.site-activity,
.timeline-list,
.conversation-strip,
.breakdown-list,
.dashboard-live-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.live-snapshot-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.live-snapshot-grid div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--surface-soft);
}

.live-snapshot-grid span,
.dashboard-live-section-head span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.live-snapshot-grid strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
  line-height: 1;
}

.dashboard-live-section {
  margin-top: 16px;
}

.dashboard-live-section-head,
.dashboard-live-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.dashboard-live-section-head a {
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.dashboard-live-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface-soft);
}

.dashboard-live-row span {
  min-width: 0;
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-live-row strong {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.dashboard-live-row em {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  font-style: normal;
}

.dashboard-live-dot {
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.dashboard-live-dot-incoming {
  background: #df3d4a;
}

.dashboard-live-dot-active {
  background: #42c7df;
}

.dashboard-live-dot-idle {
  background: #a7afba;
}

.site-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) minmax(140px, 1fr) minmax(150px, 0.65fr);
  gap: 14px;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-soft);
}

.site-row-main {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.site-row-main strong,
.site-row-main span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-row-main span {
  color: var(--muted);
  font-size: 13px;
}

.site-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--muted-2);
}

.site-dot-on {
  background: var(--teal);
  box-shadow: 0 0 0 5px rgba(15, 159, 143, 0.12);
}

.site-dot-off {
  background: var(--rose);
}

.activity-bar,
.breakdown-row i {
  display: block;
  overflow: hidden;
  height: 12px;
  border-radius: 999px;
  background: #e8edf4;
}

.activity-bar i,
.breakdown-row b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--teal));
}

.site-row-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.site-row-stats div {
  border-left: 1px solid var(--line);
  padding-left: 10px;
}

.site-row-stats dt,
.profile-facts dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.site-row-stats dd,
.profile-facts dd {
  margin: 2px 0 0;
  font-weight: 800;
  min-width: 0;
  overflow-wrap: anywhere;
}

.profile-facts a,
.meta-list a,
.compact-link {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  overflow: hidden;
  color: var(--primary);
  font-weight: 800;
  text-decoration: none;
  text-overflow: ellipsis;
  vertical-align: bottom;
  white-space: nowrap;
}

.profile-facts a:hover,
.meta-list a:hover,
.compact-link:hover {
  text-decoration: underline;
}

.donut-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.breakdown-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) 34px;
  gap: 10px;
  align-items: center;
}

.breakdown-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.timeline-item {
  position: relative;
  border-left: 3px solid #c9d8eb;
  padding: 0 0 12px 14px;
}

.timeline-item strong,
.timeline-item small,
.timeline-item p {
  display: block;
}

.timeline-item small,
.timeline-item p {
  color: var(--muted);
}

.timeline-item p {
  margin: 6px 0 0;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.channel-badge {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 5px;
  border-radius: 999px;
  padding: 3px 8px;
  background: #eef4fb;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
}

.conversation-strip-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-soft);
}

.person-avatar {
  width: 42px;
  height: 42px;
  font-size: 14px;
}

.person-avatar img,
.user-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.person-avatar-image {
  background: #dce6f2;
}

.person-avatar-large {
  width: 64px;
  height: 64px;
  font-size: 22px;
}

.conversation-strip-top,
.conversation-card-head,
.conversation-card-foot,
.conversation-strip-meta,
.conversation-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.conversation-strip-top {
  justify-content: space-between;
}

.conversation-strip-top span,
.conversation-strip-meta,
.conversation-card-head span,
.conversation-card-head time,
.conversation-card-foot {
  color: var(--muted);
  font-size: 13px;
}

.conversation-strip-item p,
.conversation-card p {
  margin: 5px 0;
  color: var(--text);
  overflow-wrap: anywhere;
}

.table-wrap {
  width: 100%;
  margin-top: 14px;
  overflow-x: auto;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 150px 150px 150px auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}

.filter-actions {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.queue-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.queue-metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(22, 32, 51, 0.05);
}

.queue-metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.queue-metric strong {
  display: block;
  margin-top: 5px;
  font-size: 30px;
  line-height: 1;
}

.queue-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.queue-filters {
  position: sticky;
  top: 88px;
}

.filter-stack {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.conversation-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr));
  gap: 12px;
  margin-top: 14px;
}

.conversation-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  min-height: 188px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface-soft);
}

.conversation-card.is-unread-card {
  border-color: #a7c6f5;
  background: #f2f7ff;
}

.conversation-card-person {
  position: relative;
}

.unread-dot {
  position: absolute;
  right: 4px;
  top: 0;
  width: 12px;
  height: 12px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--primary);
}

.conversation-card-body {
  min-width: 0;
}

.conversation-card-head {
  justify-content: space-between;
}

.conversation-card-head strong,
.conversation-card-head span {
  display: block;
}

.conversation-card h3 {
  margin: 9px 0 0;
  font-size: 16px;
  line-height: 1.25;
}

.conversation-card p {
  display: -webkit-box;
  min-height: 44px;
  overflow: hidden;
  color: var(--muted);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.conversation-card-badges {
  margin-top: 9px;
}

.conversation-card-badges > span:first-child {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.conversation-card-foot {
  justify-content: space-between;
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.operator-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.operator-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-soft);
}

.operator-card-main {
  min-width: 0;
}

.operator-card-main strong,
.operator-card-main > span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operator-card-main > span,
.operator-card .conversation-card-badges {
  color: var(--muted);
  font-size: 13px;
}

.avatar-editor {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

.avatar-preview {
  display: grid;
  width: 84px;
  height: 84px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #b8c9dc;
  border-radius: 8px;
  background: linear-gradient(135deg, #182235, #1767e8);
  color: #fff;
  font-size: 28px;
  font-weight: 800;
}

.avatar-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-dropzone {
  position: relative;
  display: grid;
  min-height: 84px;
  align-content: center;
  border: 1px dashed #9fb2cb;
  border-radius: 8px;
  padding: 13px 14px;
  background: #f8fbff;
  cursor: pointer;
}

.avatar-dropzone:hover,
.avatar-dropzone.is-dragover {
  border-color: var(--primary);
  background: #eef5ff;
  outline: 3px solid #d7e5ff;
}

.avatar-dropzone-title,
.avatar-dropzone-text {
  display: block;
}

.avatar-dropzone-title {
  margin-bottom: 4px;
  color: var(--text);
  font-weight: 800;
}

.avatar-dropzone-text {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.avatar-dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  opacity: 0;
  pointer-events: none;
}

.avatar-remove-row {
  grid-column: 2;
}

.quick-replies {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-soft);
}

.quick-replies-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  justify-content: space-between;
}

.quick-replies-head span {
  color: var(--text);
  font-weight: 800;
}

.quick-replies-head small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.quick-reply-list {
  display: grid;
  gap: 8px;
}

.quick-reply-button {
  display: grid;
  gap: 4px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.quick-reply-button:hover,
.quick-reply-button.is-selected {
  border-color: var(--primary);
  background: #eef5ff;
}

.quick-reply-button span {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

table {
  width: 100%;
  border-collapse: collapse;
}

.table-wrap table {
  min-width: min(720px, 100%);
}

.table-wrap .live-visitors-table {
  min-width: min(590px, 100%);
}

.sites-table-wrap table {
  min-width: 0;
}

.sites-table th,
.sites-table td {
  white-space: normal;
}

.sites-table td:last-child,
.sites-table th:last-child {
  width: 1%;
  white-space: nowrap;
}

.notification-devices-table {
  min-width: min(640px, 100%);
}

.notification-devices-table th,
.notification-devices-table td {
  white-space: normal;
}

.responsive-card-table td[data-label] {
  min-width: 0;
}

.responsive-card-table td[data-label] > a,
.responsive-card-table td[data-label] > strong,
.responsive-card-table td[data-label] > span,
.responsive-card-table td[data-label] > .table-subtext {
  max-width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.list-item {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-soft);
}

.list-item strong,
.list-item span {
  display: block;
}

.list-item span,
.muted {
  color: var(--muted);
}

.list-item p {
  margin: 8px 0 0;
  overflow-wrap: anywhere;
}

.auth-panel {
  /* Odecita se skutecna vyska nad panelem i pod nim: topbar 68 + .page 24/48.
     Puvodnich 96px odecetlo o 44px min, takze prihlasovaci stranka mela na
     desktopu a tabletu svisly posuv o prazdnou plochu. */
  min-height: calc(100vh - 140px);
  display: grid;
  place-items: center;
}

.auth-box,
.install-box {
  width: min(440px, 100%);
  padding: 28px;
}

.oauth-login {
  display: grid;
  gap: 10px;
  margin: 20px 0 16px;
}

.oauth-button {
  display: inline-grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 44px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 12px;
  background: #fff;
  color: var(--text);
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.oauth-button:hover {
  border-color: #9fb2cb;
  background: #f8fafc;
}

.oauth-button span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-weight: 800;
}

.oauth-google span {
  background: #1a73e8;
}

.oauth-facebook span {
  background: #1877f2;
}

.oauth-divider {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin: 2px 0 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.oauth-divider::before,
.oauth-divider::after {
  content: "";
  height: 1px;
  background: var(--line);
}

.install-box {
  width: min(720px, 100%);
}

.form-stack {
  display: grid;
  gap: 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.form-fieldset {
  display: grid;
  gap: 12px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface-soft);
}

.form-fieldset legend {
  padding: 0 6px;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.welcome-links-editor {
  display: grid;
  gap: 10px;
}

.welcome-link-row {
  display: grid;
  grid-template-columns: minmax(140px, 0.7fr) minmax(180px, 1.3fr);
  gap: 12px;
}

.embed-snippet {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.embed-snippet textarea {
  min-height: 88px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
}

.widget-preview-panel {
  overflow: hidden;
}

.widget-preview-shell {
  display: grid;
  justify-items: end;
  gap: 10px;
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background:
    linear-gradient(90deg, rgba(226, 232, 240, 0.7) 1px, transparent 1px),
    linear-gradient(180deg, rgba(226, 232, 240, 0.7) 1px, transparent 1px),
    #f8fafc;
  background-size: 26px 26px;
}

.widget-preview-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(100%, 360px);
  min-height: 430px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 18px 48px rgba(25, 34, 52, 0.18);
}

.widget-preview-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 82px;
  padding: 12px 14px;
  background: var(--primary);
  color: #fff;
}

.widget-preview-avatar,
.widget-preview-launcher span:first-child {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 8px;
  font-weight: 800;
}

.widget-preview-avatar {
  width: 42px;
  height: 42px;
  background: #fff;
  color: var(--primary);
  font-size: 13px;
}

.widget-preview-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.widget-preview-head > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.widget-preview-head strong,
.widget-preview-message {
  overflow-wrap: anywhere;
}

.widget-preview-availability {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 11px;
  font-weight: 800;
}

.widget-preview-availability i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #54e38d;
  box-shadow: 0 0 0 3px rgba(84, 227, 141, 0.2);
}

.widget-preview-availability.is-offline i {
  background: #d4dce8;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.18);
}

.widget-preview-message {
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  line-height: 1.25;
}

.widget-preview-body {
  padding: 14px;
  background: var(--surface-soft);
}

.widget-preview-empty {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: #fff;
}

.widget-preview-empty strong,
.widget-preview-empty span {
  overflow-wrap: anywhere;
}

.widget-preview-empty span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.widget-preview-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 5px;
}

.widget-preview-links[hidden] {
  display: none;
}

.widget-preview-links a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid color-mix(in srgb, var(--primary) 24%, var(--line));
  border-radius: 8px;
  padding: 6px 9px;
  background: color-mix(in srgb, var(--primary) 8%, #fff);
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
}

.widget-preview-form {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding: 12px;
}

.widget-preview-identity {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.widget-preview-identity span,
.widget-preview-textarea,
.widget-preview-consent {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
}

.widget-preview-identity span {
  min-height: 38px;
  padding: 9px 10px;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.widget-preview-identity span[hidden] {
  display: none;
}

.widget-preview-textarea {
  min-height: 74px;
  padding: 10px;
  color: var(--muted);
  font-size: 13px;
}

.widget-preview-consent {
  padding: 8px 10px;
  color: var(--muted);
  font-size: 12px;
}

.widget-preview-form button,
.widget-preview-launcher {
  border: 0;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
}

.widget-preview-form button {
  min-height: 42px;
  border-radius: 8px;
}

.widget-preview-success {
  color: var(--success-text);
  font-size: 12px;
  font-weight: 800;
}

.widget-preview-launcher {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 56px;
  border-radius: 999px;
  padding: 9px 17px 9px 10px;
  box-shadow: 0 10px 24px rgba(23, 103, 232, 0.28);
}

.widget-preview-launcher span:first-child {
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 12px;
}

label span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--text);
  font: inherit;
}

textarea {
  width: 100%;
  min-height: 130px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 10px;
  color: var(--text);
  font: inherit;
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: var(--primary);
  outline: 3px solid #d7e5ff;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 14px;
  font: 700 14px/1 Arial, Helvetica, sans-serif;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

.button-primary {
  background: var(--primary);
  color: #fff;
}

.button-primary:hover {
  background: var(--primary-dark);
}

.button-ghost {
  border-color: var(--line);
  background: var(--surface);
  color: var(--text);
}

.button:disabled {
  opacity: 0.68;
  cursor: progress;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.action-row form {
  margin: 0;
}

.notification-tools {
  margin-bottom: 18px;
}

.notification-tools .action-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: stretch;
}

.notification-tools .action-row form,
.notification-tools .action-row .button {
  width: 100%;
}

.notification-tools .action-row .button {
  white-space: normal;
}

.notification-browser-advice + .notification-browser-advice {
  margin-top: 10px;
}

.technical-cell {
  max-width: 360px;
  overflow-wrap: anywhere;
}

.technical-cell .details-block {
  max-width: 100%;
}

.technical-cell .details-block pre {
  max-width: 100%;
}

.notification-error-detail {
  margin-top: 8px;
}

.text-error {
  color: #a32121;
}

.text-success {
  color: var(--success-text);
}

.result-list {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.result-list div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-soft);
}

.result-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.result-list dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
}

.notification-health {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 8px;
  padding: 16px;
  background: var(--surface);
}

.notification-health-ready {
  border-left-color: var(--success-text);
}

.notification-health-attention {
  border-left-color: #c57a1f;
}

.notification-health-main p {
  margin: 8px 0 0;
  color: var(--muted);
}

.health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.health-card {
  display: grid;
  gap: 10px;
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-soft);
}

.health-ok {
  border-color: var(--success-line);
  background: var(--success-bg);
}

.health-warning {
  border-color: #f0cf8a;
  background: #fff8e8;
}

.health-danger {
  border-color: var(--danger-line);
  background: var(--danger-bg);
}

.health-card-head {
  display: grid;
  gap: 6px;
}

.health-card h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.25;
}

.health-card-head span {
  justify-self: start;
  border: 1px solid rgba(23, 32, 51, 0.12);
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.health-card p {
  margin: 0;
  color: var(--text);
  font-size: 13px;
}

.health-card dl {
  display: grid;
  gap: 6px;
  margin: 0;
}

.health-card dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.health-card dd {
  margin: 2px 0 0;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.notification-proof {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.notification-proof-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.notification-proof-item {
  display: grid;
  gap: 6px;
  min-height: 142px;
  border: 1px solid var(--line);
  border-top: 4px solid #f0cf8a;
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-soft);
}

.notification-proof-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.notification-proof-item strong {
  font-size: 18px;
}

.notification-proof-item p,
.notification-proof-item em {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
}

.notification-proof-item p {
  color: var(--text);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.notification-proof-item em {
  color: var(--muted);
  font-style: normal;
}

.notification-proof-ok {
  border-color: var(--success-line);
  border-top-color: var(--success-text);
  background: var(--success-bg);
}

.notification-proof-warning {
  border-color: #f0cf8a;
  border-top-color: #c57a1f;
  background: #fff8e8;
}

.notification-proof-danger {
  border-color: var(--danger-line);
  border-top-color: #b42318;
  background: var(--danger-bg);
}

.notification-onboarding {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.notification-browser-diagnostics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.notification-browser-diagnostics article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-soft);
}

.notification-browser-diagnostics span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.notification-browser-diagnostics strong {
  display: block;
  margin-top: 6px;
  overflow-wrap: anywhere;
}

.notification-browser-advice {
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 8px;
  padding: 12px 14px;
  background: var(--surface-soft);
  color: var(--text);
}

.notification-browser-advice.is-ok {
  border-left-color: var(--success-text);
  background: var(--success-bg);
}

.notification-browser-advice.is-warning {
  border-left-color: #c57a1f;
  background: #fff8e8;
}

.notification-browser-advice.is-error {
  border-left-color: #b42318;
  background: var(--danger-bg);
  color: #6f1d1b;
}

.notification-audio-controls {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #f8fafc;
}

.notification-audio-controls strong,
.notification-audio-controls p {
  display: block;
  margin: 0;
}

.notification-audio-controls p {
  margin-top: 4px;
  color: var(--muted);
}

.notification-step-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.notification-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  min-height: 118px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface);
}

.notification-step-index {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 999px;
  background: #e8eef8;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.notification-step strong {
  display: block;
  line-height: 1.25;
}

.notification-step p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.notification-step.is-done {
  border-color: var(--success-line);
  background: var(--success-bg);
}

.notification-step.is-done .notification-step-index {
  background: var(--success-text);
  color: #fff;
}

.notification-step.is-blocked {
  border-color: var(--danger-line);
  background: var(--danger-bg);
}

.notification-step.is-blocked .notification-step-index {
  background: #b42318;
  color: #fff;
}

.notification-step.is-pending {
  border-color: #f0cf8a;
  background: #fff8e8;
}

.notification-step.is-pending .notification-step-index {
  background: #c57a1f;
  color: #fff;
}

.table-subtext {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.is-unread td {
  background: #f2f7ff;
  font-weight: 700;
}

.unread-badge {
  display: inline-grid;
  min-width: 28px;
  min-height: 28px;
  place-items: center;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.conversation-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 420px;
  gap: 18px;
  align-items: start;
}

.conversation-profile {
  position: sticky;
  top: 88px;
}

.profile-card-head {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.profile-card-head h2 {
  overflow-wrap: anywhere;
}

.profile-card-head span:not(.person-avatar) {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.profile-card-head .identity-badge {
  display: inline-flex;
  margin-top: 8px;
  color: #176334;
  font-size: 12px;
}

.profile-card-head .identity-badge-google {
  color: #174a8f;
}

.profile-card-head .identity-badge-facebook {
  color: #1453a8;
}

.profile-facts {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
}

.profile-facts div {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.conversation-csat {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  border: 1px solid #f0cf8a;
  border-radius: 8px;
  padding: 12px;
  background: #fff8e8;
}

.conversation-csat[hidden] {
  display: none;
}

.conversation-csat h3,
.conversation-csat p {
  margin: 0;
}

.conversation-csat h3 {
  font-size: 14px;
}

.conversation-csat strong {
  color: #8a5a00;
  font-size: 20px;
  letter-spacing: 1px;
}

.conversation-csat p {
  color: var(--text);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.conversation-csat small {
  color: var(--muted);
  font-weight: 700;
}

.conversation-thread {
  display: grid;
  gap: 12px;
  align-content: start;
  min-height: calc(100vh - 210px);
  max-height: calc(100vh - 150px);
  overflow-y: auto;
}

.chat-message {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  max-width: 900px;
  align-items: start;
}

.chat-message-operator {
  margin-left: auto;
}

.chat-message-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-soft);
  box-shadow: 0 8px 18px rgba(22, 32, 51, 0.04);
}

.chat-message-operator .chat-message-card {
  border-color: #bcd4fa;
  background: #eef5ff;
}

.chat-message-system .chat-message-card {
  background: #f3f6fa;
}

.chat-avatar {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--teal), var(--primary));
  font-size: 13px;
}

.chat-message-operator .chat-avatar {
  background: linear-gradient(135deg, var(--primary), var(--violet));
}

.chat-message-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
}

.chat-message p {
  margin-bottom: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.message-attachments {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.message-attachment {
  display: grid;
  gap: 6px;
  width: min(260px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  text-decoration: none;
}

.message-attachment img {
  display: block;
  width: 100%;
  max-height: 180px;
  border-radius: 6px;
  object-fit: cover;
}

.message-attachment span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reply-attachments {
  display: grid;
  gap: 8px;
}

.reply-attachment-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: var(--surface-soft);
}

.reply-attachment-item img {
  width: 42px;
  height: 34px;
  border-radius: 6px;
  object-fit: cover;
}

.reply-attachment-file {
  display: inline-grid;
  width: 42px;
  height: 34px;
  place-items: center;
  border-radius: 6px;
  background: #e9edf4;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.reply-attachment-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reply-attachment-item button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 9px;
  background: #fff;
  color: var(--text);
  font: 700 12px/1 Arial, Helvetica, sans-serif;
  cursor: pointer;
}

.upload-dropzone {
  position: relative;
  display: grid;
  min-height: 76px;
  align-content: center;
  border: 1px dashed #9fb2cb;
  border-radius: 8px;
  padding: 12px;
  background: #f8fbff;
  cursor: pointer;
}

.upload-dropzone:hover,
.upload-dropzone.is-dragover {
  border-color: var(--primary);
  background: #eef5ff;
  outline: 3px solid #d7e5ff;
}

.upload-dropzone-title,
.upload-dropzone-text {
  display: block;
}

.upload-dropzone-title {
  margin-bottom: 4px;
  color: var(--text);
  font-weight: 800;
}

.upload-dropzone-text {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.upload-dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  opacity: 0;
  pointer-events: none;
}

.conversation-side {
  align-self: start;
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 110px);
  overflow: auto;
  scroll-margin-top: 84px;
}

.conversation-thread,
#conversation-tools {
  scroll-margin-top: 84px;
}

.side-rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 18px 0;
}

select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

select:focus {
  border-color: var(--primary);
  outline: 3px solid #d7e5ff;
}

.check-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.check-row input {
  width: 16px;
  min-height: 16px;
  margin: 2px 0 0;
  padding: 0;
}

.check-row span {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.field-group {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.field-group legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.note-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.note-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--surface-soft);
}

.note-item strong,
.note-item span {
  display: block;
}

.note-item span {
  color: var(--muted);
  font-size: 12px;
}

.note-item p {
  margin: 8px 0 0;
  overflow-wrap: anywhere;
}

.meta-list {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
}

.meta-list div {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.meta-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.meta-list dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
}

code {
  border-radius: 5px;
  padding: 2px 5px;
  background: #eef2f7;
}

.details-block summary {
  color: var(--primary);
  cursor: pointer;
  font-weight: 700;
}

.details-block pre {
  max-width: 360px;
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #f8fafc;
  color: var(--text);
  font: 12px/1.4 Consolas, "Courier New", monospace;
  white-space: pre-wrap;
}

.live-visitors-head {
  align-items: flex-end;
}

.live-visitors-shell {
  display: grid;
  gap: 14px;
}

.live-visitors-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 190px minmax(260px, auto) auto minmax(320px, auto);
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
}

.live-visitors-title {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.live-visitors-title h2,
.live-visitors-title strong {
  display: block;
}

.live-visitors-title strong {
  color: var(--muted);
  font-size: 13px;
}

.live-visitors-mark {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 35% 35%, #fff 0 14%, transparent 15%),
    linear-gradient(135deg, var(--primary), var(--teal));
  box-shadow:
    16px 0 0 rgba(66, 199, 223, 0.42),
    7px 16px 0 rgba(240, 194, 51, 0.55);
}

.live-visitors-group span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.segmented-control {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(86px, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.segmented-control button {
  min-height: 40px;
  border: 0;
  border-right: 1px solid var(--line);
  padding: 8px 12px;
  background: transparent;
  color: var(--text);
  font: 800 13px/1 Arial, Helvetica, sans-serif;
  cursor: pointer;
}

.segmented-control button:last-child {
  border-right: 0;
}

.segmented-control button.is-active {
  background: #e8f1ff;
  color: var(--primary);
}

.live-visitors-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  justify-content: flex-end;
}

.live-status-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.live-status-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  background: #fff;
  white-space: nowrap;
}

.live-status-count i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--muted-2);
}

.live-status-count strong {
  font-size: 14px;
}

.live-status-count em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
}

.live-status-count-incoming i {
  background: #df3d4a;
}

.live-status-count-active i {
  background: #42c7df;
}

.live-status-count-served i {
  background: #41b567;
}

.live-status-count-clicked i {
  background: #f0c233;
}

.live-status-count-idle i {
  background: #b9d9e7;
}

.live-visitors-legend span,
.live-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.visitor-status,
.live-status-pill i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--muted-2);
}

.visitor-status-incoming,
.live-status-incoming i {
  background: #df3d4a;
}

.visitor-status-clicked,
.live-status-clicked i {
  background: #f0c233;
}

.visitor-status-served,
.live-status-served i {
  background: #41b567;
}

.visitor-status-triggered,
.live-status-triggered i {
  background: #2f74d0;
}

.visitor-status-active,
.live-status-active i {
  background: #42c7df;
}

.visitor-status-idle,
.live-status-idle i {
  background: #b9d9e7;
}

.visitor-status-offline,
.live-status-offline i {
  background: #a7afba;
}

.live-visitors-layout {
  display: grid;
  grid-template-columns: minmax(520px, 1.15fr) minmax(520px, 1fr) minmax(320px, 0.72fr);
  gap: 14px;
  align-items: stretch;
}

.live-radar-panel {
  position: relative;
  min-height: calc(100vh - 214px);
  overflow: hidden;
  padding: 0;
}

.live-radar-canvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: calc(100vh - 214px);
  border-radius: 8px;
  background: #fff;
}

.live-radar-empty {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  color: var(--muted);
  font-weight: 800;
  pointer-events: none;
}

.live-radar-tooltip {
  position: absolute;
  z-index: 5;
  display: grid;
  gap: 3px;
  max-width: 250px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 34px rgba(22, 32, 51, 0.16);
  color: var(--text);
  font-size: 12px;
  pointer-events: none;
}

.live-radar-tooltip strong,
.live-radar-tooltip span {
  display: block;
  overflow-wrap: anywhere;
}

.live-radar-dock {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: stretch;
  max-height: 172px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 2px 2px 5px;
  scrollbar-width: thin;
}

.live-radar-dock[hidden] {
  display: none;
}

.live-dock-card {
  display: grid;
  grid-template-columns: 34px minmax(130px, 1fr);
  flex: 1 1 208px;
  gap: 8px;
  align-items: center;
  min-width: 208px;
  max-width: 246px;
  border: 1px solid rgba(148, 163, 184, 0.58);
  border-top: 4px solid #42c7df;
  border-radius: 8px;
  padding: 8px 9px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 13px 28px rgba(22, 32, 51, 0.14);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.live-dock-card:hover,
.live-dock-card.is-selected {
  border-color: var(--primary);
  box-shadow: 0 16px 34px rgba(23, 103, 232, 0.24);
}

.live-dock-card-incoming {
  border-top-color: #df3d4a;
}

.live-dock-card-clicked {
  border-top-color: #f0c233;
}

.live-dock-card-served {
  border-top-color: #41b567;
}

.live-dock-card-triggered {
  border-top-color: #2f74d0;
}

.live-dock-card-idle {
  border-top-color: #b9d9e7;
}

.live-dock-card-offline {
  border-top-color: #a7afba;
}

.live-dock-avatar {
  position: relative;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #12315f, var(--primary));
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.live-dock-avatar i {
  position: absolute;
  right: -2px;
  bottom: -2px;
  border: 2px solid #fff;
}

.live-dock-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.live-dock-copy strong,
.live-dock-copy span,
.live-dock-copy em {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-dock-copy strong {
  font-size: 13px;
}

.live-dock-copy span {
  color: var(--muted);
  font-size: 12px;
}

.live-dock-copy em,
.live-dock-more {
  color: var(--primary);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.live-dock-more {
  display: inline-grid;
  min-width: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
}

.live-list-panel {
  min-height: calc(100vh - 214px);
  max-height: calc(100vh - 214px);
  overflow: auto;
  min-width: 0;
}

.live-list-panel.is-full-list {
  grid-column: 1 / 3;
}

.live-visitors-table {
  table-layout: fixed;
  width: max(100%, 820px);
}

.live-visitors-table th:nth-child(1),
.live-visitors-table td:nth-child(1) {
  width: 190px;
}

.live-visitors-table th:nth-child(2),
.live-visitors-table td:nth-child(2) {
  width: 44px;
  text-align: center;
}

.live-visitors-table th:nth-child(3),
.live-visitors-table td:nth-child(3) {
  width: 245px;
}

.live-visitors-table th:nth-child(4),
.live-visitors-table td:nth-child(4) {
  width: 132px;
}

.live-visitors-table th:nth-child(5),
.live-visitors-table td:nth-child(5) {
  width: 112px;
}

.live-visitors-table th:nth-child(6),
.live-visitors-table td:nth-child(6) {
  width: 96px;
}

.live-visitors-table tr {
  cursor: pointer;
}

.live-visitors-table tr:hover td,
.live-visitors-table .is-selected-row td {
  background: #eef5ff;
}

.live-person {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.live-person-copy,
.live-person-copy strong,
.live-person-copy .table-subtext {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-person-copy .identity-badge {
  max-width: 100%;
}

.live-visitors-table td > strong,
.live-visitors-table td > .table-subtext {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-person .identity-badge {
  display: inline-flex;
  max-width: 100%;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-status-dot {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #f8fafc;
  vertical-align: middle;
}

.live-status-dot i {
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(23, 103, 232, 0.08);
}

.live-status-incoming {
  border-color: #ffc1c7;
  background: #fff0f2;
  color: #9d1e2a;
}

.live-status-served {
  border-color: #afe3bf;
  background: #effaf2;
  color: #176334;
}

.live-status-clicked {
  border-color: #f0d47a;
  background: #fff9df;
  color: #6f5207;
}

.live-detail-panel {
  position: sticky;
  top: 88px;
  min-height: calc(100vh - 214px);
  max-height: calc(100vh - 110px);
  overflow: auto;
}

.live-detail-empty {
  margin-top: 14px;
  color: var(--muted);
  font-weight: 700;
}

.live-detail-body {
  display: grid;
  gap: 16px;
  margin-top: 14px;
}

.live-detail-identity {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.live-detail-identity strong,
.live-detail-identity span {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.live-detail-identity span {
  color: var(--muted);
}

.live-detail-facts dd {
  font-weight: 700;
}

.live-commerce-panel {
  display: grid;
  gap: 10px;
}

.live-commerce-section,
.live-commerce-empty {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
}

.live-commerce-section h3,
.live-commerce-empty strong {
  display: block;
  margin: 0 0 8px;
  font-size: 14px;
}

.live-commerce-empty span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.live-commerce-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.live-commerce-list div {
  display: grid;
  grid-template-columns: minmax(96px, 0.42fr) minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
}

.live-commerce-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.live-commerce-list dd {
  min-width: 0;
  margin: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.live-commerce-items {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.live-commerce-items article {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #fff;
}

.live-commerce-items strong,
.live-commerce-items span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.live-commerce-items span,
.live-event-summary {
  color: var(--muted);
  font-size: 13px;
}

.live-event-list {
  display: grid;
  gap: 10px;
}

.live-event-list h3 {
  margin: 0;
  font-size: 15px;
}

.analytics-period {
  min-width: 150px;
}

.analytics-kpis .kpi-card strong {
  font-size: clamp(24px, 1.8vw, 38px);
  overflow-wrap: anywhere;
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.analytics-main-panel {
  grid-column: span 2;
}

.analytics-bars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(24px, 1fr));
  gap: 8px;
  min-height: 230px;
  margin-top: 18px;
  overflow: hidden;
}

.analytics-day {
  display: grid;
  grid-template-rows: minmax(170px, 1fr) auto;
  gap: 7px;
  min-width: 26px;
  align-items: end;
  text-align: center;
}

.analytics-day span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.analytics-bar-stack {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 170px;
  border-bottom: 1px solid var(--line);
}

.analytics-bar {
  position: absolute;
  bottom: 0;
  width: 48%;
  min-height: 3px;
  border-radius: 8px 8px 0 0;
}

.analytics-bar-views {
  left: 12%;
  background: linear-gradient(180deg, var(--teal), #8ee2d7);
}

.analytics-bar-chats {
  right: 12%;
  background: linear-gradient(180deg, var(--primary), #91b9f4);
}

.insight-list,
.rank-list,
.question-list,
.commerce-list,
.commerce-source-list,
.commerce-event-list,
.staffing-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.insight-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-soft);
}

.insight-card strong,
.insight-card p {
  display: block;
  margin: 0;
}

.insight-card p {
  margin-top: 5px;
  color: var(--muted);
}

.insight-warning {
  border-color: #f0cf8a;
  background: #fff8e8;
}

.insight-success {
  border-color: var(--success-line);
  background: var(--success-bg);
}

.heatmap {
  display: grid;
  gap: 6px;
  margin-top: 16px;
  overflow-x: auto;
}

.heatmap-hours,
.heatmap-row {
  display: grid;
  grid-template-columns: 34px repeat(24, minmax(18px, 1fr));
  gap: 4px;
  min-width: min(680px, 100%);
  align-items: center;
}

.heatmap-hours span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}

.heatmap-row strong {
  color: var(--muted);
  font-size: 12px;
}

.heatmap-cell {
  display: block;
  aspect-ratio: 1;
  border: 1px solid rgba(23, 103, 232, 0.08);
  border-radius: 5px;
  background: rgba(23, 103, 232, var(--heat));
}

.behavior-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 16px;
  margin-top: 16px;
  align-items: stretch;
}

.behavior-map-wrap {
  min-width: 0;
}

.behavior-map {
  display: grid;
  grid-template-columns: repeat(10, minmax(18px, 1fr));
  grid-template-rows: repeat(6, minmax(24px, 1fr));
  gap: 5px;
  min-height: 250px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background:
    linear-gradient(90deg, rgba(22, 32, 51, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(22, 32, 51, 0.04) 1px, transparent 1px),
    var(--surface-soft);
  background-size: 10% 100%, 100% 16.666%;
}

.behavior-cell {
  display: block;
  min-height: 24px;
  border: 1px solid rgba(23, 103, 232, 0.1);
  border-radius: 6px;
  background: rgba(23, 103, 232, var(--heat));
}

.behavior-side,
.behavior-block,
.behavior-bars,
.behavior-targets,
.behavior-pages {
  display: grid;
  gap: 10px;
}

.behavior-block {
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-soft);
}

.behavior-block > strong {
  font-size: 13px;
}

.behavior-bar-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 34px;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.behavior-bar-row i {
  display: block;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eef7;
}

.behavior-bar-row b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--teal));
}

.behavior-targets {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.behavior-targets span,
.behavior-pages div {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
}

.behavior-targets span {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.behavior-targets b {
  color: var(--text);
}

.behavior-pages {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.behavior-pages span,
.behavior-pages strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.behavior-pages span {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.behavior-pages strong {
  color: var(--muted);
  font-size: 12px;
}

.staffing-row,
.rank-row,
.commerce-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface-soft);
}

.commerce-funnel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.commerce-funnel article,
.commerce-source-row,
.commerce-event-list article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface-soft);
}

.commerce-funnel article {
  display: grid;
  gap: 4px;
}

.commerce-funnel span,
.commerce-source-row span,
.commerce-event-list span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.commerce-funnel strong {
  font-size: 22px;
  line-height: 1.1;
}

.commerce-funnel em,
.commerce-source-row em,
.commerce-event-list p {
  margin: 0;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
  font-weight: 700;
}

.commerce-source-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  align-items: start;
}

.commerce-source-row strong,
.commerce-source-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.commerce-source-row em {
  grid-row: span 2;
  align-self: center;
  color: var(--primary);
  font-weight: 900;
  white-space: nowrap;
}

.commerce-event-list article {
  display: grid;
  gap: 4px;
}

.commerce-event-list strong,
.commerce-event-list p {
  overflow-wrap: anywhere;
}

.staffing-row em,
.commerce-row em {
  grid-column: 1 / -1;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
  font-weight: 700;
}

.rank-row span,
.commerce-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.question-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface-soft);
}

.question-row strong,
.question-row span {
  display: block;
}

.question-row strong {
  overflow-wrap: anywhere;
}

.question-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 1560px) {
  .topbar {
    gap: 12px;
    padding-inline: 22px;
  }

  .topbar-branding {
    gap: 12px;
  }

  .nav-link {
    padding: 7px 8px;
  }

  .signed-user {
    max-width: 128px;
  }

  .command-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .live-visitors-toolbar {
    grid-template-columns: minmax(240px, 1fr) 190px auto;
  }

  .live-status-counts,
  .live-visitors-legend {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .live-visitors-layout {
    grid-template-columns: minmax(0, 1fr) 360px;
  }

  .analytics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .live-list-panel {
    grid-column: 1 / -1;
    min-height: auto;
    max-height: none;
  }

  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-main-panel .site-row {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .dashboard-main-panel .activity-bar {
    width: 100%;
  }

  .dashboard-main-panel .site-row-stats {
    grid-template-columns: repeat(3, minmax(72px, 1fr));
  }

  .dashboard-main-panel,
  .conversations-panel {
    grid-column: 1 / -1;
  }

  .conversation-layout {
    grid-template-columns: 260px minmax(0, 1fr) 360px;
  }

  .conversation-card-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr));
  }
}

@media (max-width: 1280px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    min-height: auto;
    padding: 14px 22px;
  }

  .topbar-branding,
  .topbar-actions {
    width: 100%;
  }

  .topbar-actions {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .sites-management-layout {
    grid-template-columns: 1fr;
  }

  .conversation-layout {
    grid-template-columns: minmax(220px, 0.52fr) minmax(0, 1fr);
  }

  .conversation-side {
    grid-column: 1 / -1;
    position: static;
    max-height: none;
  }

  .live-visitors-toolbar {
    grid-template-columns: minmax(0, 1fr) minmax(170px, auto);
  }

  .live-visitors-toolbar .segmented-control {
    justify-self: end;
  }
}

@media (max-width: 1180px) {
  .live-visitors-layout {
    grid-template-columns: 1fr;
  }

  .live-radar-panel,
  .live-radar-canvas,
  .live-list-panel,
  .live-detail-panel {
    min-height: auto;
    max-height: none;
  }
}

@media (max-width: 960px) {
  .topbar {
    gap: 8px;
    padding: 10px 12px 8px;
  }

  .topbar-branding,
  .topbar-actions {
    width: 100%;
  }

  .topbar-actions {
    grid-template-columns: 1fr;
    justify-items: stretch;
    gap: 8px;
  }

  .nav-links {
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 6px;
    overflow-x: auto;
    padding: 2px 2px 8px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  .nav-link {
    min-height: 36px;
    padding: 7px 10px;
    font-size: 14px;
    line-height: 1;
  }

  .user-menu {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    width: 100%;
    justify-self: stretch;
    gap: 8px;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-top: 8px;
    padding-left: 0;
  }

  .user-menu .user-avatar {
    width: 30px;
    height: 30px;
  }

  .user-menu .button {
    min-height: 34px;
    padding: 7px 12px;
  }

  .page {
    width: min(100vw - 32px, 1180px);
  }

  .command-grid,
  .metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard-grid,
  .split-layout,
  .live-visitors-layout,
  .live-visitors-toolbar,
  .analytics-grid {
    grid-template-columns: 1fr;
  }

  .analytics-main-panel {
    grid-column: auto;
  }

  .site-row,
  .queue-layout,
  .conversation-card-grid {
    grid-template-columns: 1fr;
  }

  .queue-filters,
  .conversation-profile,
  .conversation-side,
  .live-detail-panel {
    position: static;
    max-height: none;
  }

  .live-radar-panel,
  .live-radar-canvas,
  .live-list-panel {
    min-height: 520px;
    max-height: none;
  }

  .live-list-panel .table-wrap {
    overflow-x: visible;
  }

  .live-visitors-table {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .live-visitors-table thead {
    display: none;
  }

  .live-visitors-table tbody,
  .live-visitors-table tr,
  .live-visitors-table td {
    display: block;
    width: 100%;
  }

  .live-visitors-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 8px 10px;
    border-bottom: 1px solid var(--line);
    padding: 12px 0;
  }

  .live-visitors-table td {
    border-bottom: 0;
    padding: 0;
  }

  .live-visitors-table td:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
  }

  .live-visitors-table td:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    justify-self: end;
    text-align: right;
  }

  .live-visitors-table td:nth-child(3),
  .live-visitors-table td:nth-child(4),
  .live-visitors-table td:nth-child(5),
  .live-visitors-table td:nth-child(6) {
    grid-column: 1 / -1;
  }

  .live-visitors-table td:nth-child(4),
  .live-visitors-table td:nth-child(5),
  .live-visitors-table td:nth-child(6) {
    color: var(--muted);
    font-size: 12px;
  }

  .live-radar-dock {
    right: 10px;
    bottom: 10px;
    left: 10px;
  }

  .queue-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .responsive-card-table {
    display: block !important;
    width: 100%;
    min-width: 0;
    table-layout: fixed;
  }

  .responsive-card-table thead {
    display: none !important;
  }

  .responsive-card-table tbody,
  .responsive-card-table tr,
  .responsive-card-table td {
    display: block !important;
    width: 100%;
    min-width: 0;
  }

  .responsive-card-table tr {
    display: grid;
    gap: 8px;
    border-bottom: 1px solid var(--line);
    padding: 14px 0;
  }

  .responsive-card-table td {
    display: grid !important;
    grid-template-columns: minmax(96px, 0.36fr) minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    border-bottom: 0;
    padding: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .responsive-card-table td > * {
    min-width: 0;
  }

  .responsive-card-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.35;
    text-transform: uppercase;
  }

  .responsive-card-table td[data-label="Konverzace"],
  .responsive-card-table td[data-label="Domena"],
  .responsive-card-table td[data-label="Predmet"],
  .responsive-card-table td[data-label="Detail"],
  .responsive-card-table td[data-label="Chyba"] {
    grid-template-columns: 1fr;
  }

  .responsive-card-table td[data-label="Konverzace"]::before,
  .responsive-card-table td[data-label="Domena"]::before,
  .responsive-card-table td[data-label="Predmet"]::before,
  .responsive-card-table td[data-label="Detail"]::before,
  .responsive-card-table td[data-label="Chyba"]::before {
    margin-bottom: -2px;
  }

  .sites-table td[data-label="Akce"] .button {
    width: 100%;
  }

  .notification-flow-table tr {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .notification-flow-table td:nth-child(1),
  .notification-flow-table td:nth-child(2),
  .notification-flow-table td:nth-child(3) {
    grid-column: 1 / -1;
  }

  .notification-flow-table td:nth-child(4),
  .notification-flow-table td:nth-child(5),
  .notification-flow-table td:nth-child(6),
  .notification-flow-table td:nth-child(7) {
    grid-template-columns: 1fr;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px;
    background: var(--surface-soft);
  }

  .notification-flow-table td:nth-child(4)::before,
  .notification-flow-table td:nth-child(5)::before,
  .notification-flow-table td:nth-child(6)::before,
  .notification-flow-table td:nth-child(7)::before {
    font-size: 10px;
  }

  .notification-cron-table td[data-label="Vysledek"],
  .notification-email-table td[data-label="Predmet"],
  .notification-events-table td[data-label="Udalost"] {
    font-weight: 700;
  }

  .notification-cron-table,
  .notification-email-table,
  .notification-events-table,
  .notification-devices-table {
    min-width: 0 !important;
  }

  .notification-cron-table tr,
  .notification-email-table tr,
  .notification-events-table tr,
  .notification-devices-table tr {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: var(--surface);
  }

  .notification-cron-table td[data-label="Uloha"],
  .notification-email-table td[data-label="Predmet"],
  .notification-events-table td[data-label="Udalost"],
  .notification-devices-table td[data-label="Nazev"] {
    grid-template-columns: 1fr;
    gap: 4px;
    color: var(--text);
    font-weight: 800;
  }

  .notification-cron-table td[data-label="Uloha"]::before,
  .notification-email-table td[data-label="Predmet"]::before,
  .notification-events-table td[data-label="Udalost"]::before,
  .notification-devices-table td[data-label="Nazev"]::before {
    margin-bottom: -2px;
  }

  .filter-bar {
    grid-template-columns: 1fr 1fr;
  }

  .filter-actions {
    grid-column: 1 / -1;
  }

  .health-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .notification-browser-diagnostics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .notification-proof-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .commerce-funnel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .behavior-layout {
    grid-template-columns: 1fr;
  }

  .conversation-layout {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .conversation-thread {
    min-height: 42vh;
    max-height: none;
  }

  .mobile-conversation-actions {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: -4px 0 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 24px rgba(22, 32, 51, 0.12);
  }

  .mobile-conversation-actions .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 8px;
    text-align: center;
    text-decoration: none;
  }
}

@media (max-width: 640px) {
  .dashboard-head,
  .workspace-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-head > .button,
  .head-actions,
  .head-actions .button {
    width: 100%;
    text-align: center;
  }

  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand user"
      "nav nav";
    align-items: center;
    gap: 8px 10px;
    padding: max(8px, env(safe-area-inset-top)) 10px 8px;
  }

  .topbar-actions {
    display: contents;
  }

  .topbar-branding {
    grid-area: brand;
    width: auto;
    min-width: 0;
    justify-content: flex-start;
    gap: 8px;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .brand {
    gap: 8px;
    font-size: 14px;
  }

  .brand span:last-child {
    max-width: min(46vw, 178px);
  }

  .workspace-label {
    display: none;
  }

  .user-menu {
    grid-area: user;
    display: inline-grid;
    grid-template-columns: 28px auto;
    width: auto;
    justify-self: end;
    gap: 6px;
    border-left: 0;
    border-top: 0;
    padding-top: 0;
    padding-left: 0;
  }

  .user-menu .user-avatar {
    width: 28px;
    height: 28px;
  }

  .user-menu .signed-user {
    display: none;
  }

  .user-menu .button {
    min-height: 30px;
    padding: 6px 9px;
    font-size: 12px;
  }

  .nav-links {
    grid-area: nav;
    width: calc(100vw - 20px);
    margin: 0;
    padding: 2px 0 4px;
    gap: 5px;
    flex-wrap: nowrap;
    border-top: 1px solid var(--line);
    overflow-x: auto;
    scrollbar-width: none;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-link {
    min-height: 30px;
    border-radius: 7px;
    padding: 6px 8px;
    font-size: 13px;
    white-space: nowrap;
  }

  .page {
    width: min(100vw - 24px, 1180px);
    padding-top: 14px;
  }

  .mobile-conversation-actions {
    gap: 6px;
    margin-bottom: 12px;
    padding: 6px;
  }

  .mobile-conversation-actions .button {
    font-size: 13px;
  }

  .command-grid,
  .metric-grid,
  .queue-metrics,
  .live-snapshot-grid,
  .avatar-editor,
  .form-grid,
  .form-grid-3,
  .welcome-link-row,
  .checkbox-grid,
  .health-grid,
  .notification-browser-diagnostics,
  .notification-proof-grid,
  .notification-audio-controls,
  .behavior-pages,
  .behavior-targets,
  .commerce-funnel,
  .donut-grid,
  .conversation-strip-item,
  .operator-card,
  .live-detail-identity {
    grid-template-columns: 1fr;
  }

  .segmented-control {
    width: 100%;
  }

  .live-visitors-legend {
    justify-content: flex-start;
  }

  .live-dock-card {
    min-width: 184px;
    grid-template-columns: 32px minmax(112px, 1fr);
  }

  .live-dock-avatar {
    width: 32px;
    height: 32px;
  }

  .analytics-bars {
    grid-auto-columns: minmax(32px, 1fr);
  }

  .site-row-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .conversation-card {
    grid-template-columns: 42px minmax(0, 1fr);
    padding: 12px;
  }

  .chat-message {
    max-width: 100%;
    grid-template-columns: 34px minmax(0, 1fr);
    padding: 11px;
  }

  .chat-avatar {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }

  .chat-message-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .conversation-side textarea {
    min-height: 150px;
  }

  .reply-attachment-item {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .reply-attachment-item button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .avatar-remove-row {
    grid-column: 1;
  }

  .auth-panel {
    min-height: auto;
    place-items: start;
  }

  .dashboard-live-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .dashboard-live-row em {
    grid-column: 1 / -1;
  }

  .admin-notification-toasts {
    top: 74px;
    right: 12px;
    left: 12px;
    width: auto;
  }

  .heatmap-hours,
  .heatmap-row {
    grid-template-columns: 24px repeat(24, minmax(7px, 1fr));
    gap: 2px;
    min-width: 0;
  }

  .heatmap-hours span {
    font-size: 9px;
  }

  .heatmap-row strong {
    font-size: 10px;
  }

  .heatmap-cell {
    border-radius: 3px;
  }

  .admin-notification-toast {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .admin-notification-toast-actions {
    justify-content: flex-end;
  }
}

/* Respektuje systemove nastaveni omezeneho pohybu. Pulzujici odznak upozorneni
   zustane viditelny, jen prestane pulzovat. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* OPRAVA 24. 8. 2026: bubliny upozorneni zustavaji do kliknuti, takze na
   telefonu nesmi zabirat pul obrazovky. Kompaktnejsi tvar a tlacitka. */
@media (max-width: 640px) {
  .admin-notification-toasts { left: 8px; right: 8px; top: 8px; }
  .admin-notification-toast { padding: 8px 10px; gap: 6px; }
  .admin-notification-toast strong { font-size: 14px; }
  .admin-notification-toast p { font-size: 12px; margin: 2px 0 0; }
  .admin-notification-toast-actions .button { padding: 6px 12px; font-size: 13px; }
}
