/*
 * OpenChat styles for every page: dashboard, setup, chat widget, and website preview.
 * Colors are CSS variables, so light/dark themes and the website's brand color apply everywhere.
 */

/* Light theme colors (default) */
:root {
  color-scheme: light;
  --bg: #f5f6fa;
  --surface: #fff;
  --surface-2: #f0f1f7;
  --ink: #232335;
  --muted: #7b7b8e;
  --line: #e7e7f0;
  --brand: #6657ed;
  --brand-soft: #efedff;
  --danger: #c33957;
  --success: #219775;
  --shadow: 0 20px 70px #22223d12;
  --radius: 18px;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  font-size: 14px;
}
/* Dark theme colors */
:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #12131c;
  --surface: #1a1b29;
  --surface-2: #242638;
  --ink: #f1f1f9;
  --muted: #a5a6bd;
  --line: #303247;
  --brand-soft: #302957;
  --shadow: 0 20px 70px #0003;
}
/* Base elements and typography */
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.65;
}
a {
  color: var(--brand);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 32px;
  line-height: 1.16;
  letter-spacing: -1.2px;
}
h2 {
  font-size: 23px;
  letter-spacing: -0.65px;
}
h3 {
  font-size: 16px;
}
p {
  line-height: 1.65;
}
svg {
  flex-shrink: 0;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
}
input,
textarea,
select {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 10px;
  padding: 11px 12px;
  min-width: 0;
  width: 100%;
  outline: none;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
textarea {
  resize: vertical;
}
/* Form fields */
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
}
.field > span {
  font-size: 12px;
  font-weight: 650;
}
.field small,
.muted {
  color: var(--muted);
}
input[type='checkbox'] {
  width: 17px;
  height: 17px;
  accent-color: var(--brand);
}
input[type='color'] {
  height: 43px;
  padding: 5px;
}
.check {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 12px 0;
}
.button,
button.primary,
/* Buttons */
button.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 41px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 0;
  background: var(--brand);
  color: white;
  font-weight: 650;
  text-decoration: none;
}
button.secondary,
.button.secondary {
  background: var(--surface-2);
  color: var(--ink);
  border: 1px solid var(--line);
}
.button:hover {
  filter: brightness(0.97);
  text-decoration: none;
}
.text-button {
  border: 0;
  background: none;
  color: var(--brand);
  padding: 8px;
  font-weight: 600;
}
.icon-button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}
.icon-button:hover {
  background: var(--surface-2);
  color: var(--ink);
}
.danger {
  color: var(--danger) !important;
}
/* Brand, labels, pills, and small layout helpers */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 750;
  color: var(--ink);
  letter-spacing: -0.5px;
}
.brand:hover {
  text-decoration: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: var(--brand);
  color: #fff;
  border-radius: 11px;
  font-size: 17px;
  letter-spacing: -1px;
}
.brand-mark img,
.site-card .avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: inherit;
}
.website-logo-preview {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.website-logo-preview[hidden] {
  display: none;
}
.eyebrow {
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 2px;
  color: var(--brand);
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  border-radius: 20px;
  background: var(--brand-soft);
  color: var(--brand);
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 650;
}
.pill-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.green {
  color: var(--success);
  background: #21977516;
}
.pill.blocked {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 12%, transparent);
}
.row {
  display: flex;
  gap: 12px;
  align-items: center;
}
.spread {
  justify-content: space-between;
}
.grow {
  flex: 1;
  min-width: 0;
}
/* Cards, loading and empty states, avatars, messages */
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 24px;
}
.loading {
  display: grid;
  place-items: center;
  min-height: 40vh;
  color: var(--muted);
}
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  height: 100%;
  min-height: 190px;
  padding: 26px;
  color: var(--muted);
}
.empty h3 {
  color: var(--ink);
  margin: 8px 0 0;
}
.empty p {
  font-size: 12px;
  max-width: 260px;
  margin: 0;
}
.empty-icon {
  background: var(--brand-soft);
  color: var(--brand);
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 20px;
}
.avatar {
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 750;
  flex-shrink: 0;
  border-radius: 14px;
  width: 42px;
  height: 42px;
  position: relative;
  font-size: 14px;
}
.avatar.online::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  border: 2px solid var(--surface);
  bottom: 0;
  right: 0;
}
.error-message {
  color: var(--danger);
  font-size: 12px;
  margin: 9px 0;
  line-height: 1.5;
}
.hint {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}
.hidden {
  display: none !important;
}
/* Toast notification (bottom of the screen) */
#toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  background: var(--ink);
  color: var(--surface);
  padding: 12px 18px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  max-width: 90vw;
  display: none;
  font-size: 12px;
}
#toast.visible {
  display: block;
}
.auth-page,
/* Sign-in and setup pages */
.setup-page {
  min-height: 100dvh;
  padding: 40px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: min(880px, 100%);
  border: 1px solid var(--line);
  border-radius: 26px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.auth-art {
  padding: 50px 42px;
  background: #6657ed;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 520px;
}
.auth-art .brand {
  color: #fff;
}
.auth-art .brand-mark {
  background: #ffffff25;
}
.auth-art h1 {
  font-size: 44px;
  letter-spacing: -2px;
}
.auth-art p {
  opacity: 0.75;
  font-size: 13px;
}
.auth-art .pill {
  background: #ffffff22;
  color: white;
}
.auth-form {
  padding: 44px 38px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-form h2 {
  margin: 18px 0 8px;
}
.auth-form .primary {
  width: 100%;
  margin-top: 6px;
}
.setup-wrap {
  width: min(700px, 100%);
}
.setup-head {
  margin-bottom: 24px;
}
.setup-head .brand {
  margin-bottom: 24px;
}
.setup-card {
  padding: 28px;
}
.setup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
}
.wide {
  grid-column: 1/-1;
}
.step-label {
  display: flex;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  margin-bottom: 20px;
  font-weight: 700;
}
.step-label span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  background: var(--brand-soft);
  color: var(--brand);
  border-radius: 8px;
  font-size: 11px;
}
/* Dashboard layout: sidebar, navigation, and main area */
.dashboard {
  display: grid;
  grid-template-columns: 230px 1fr;
  min-height: 100dvh;
}
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 26px 20px;
  gap: 28px;
  height: 100dvh;
  position: sticky;
  top: 0;
}
.sidebar .brand {
  margin-left: 5px;
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.nav-button {
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  width: 100%;
  padding: 12px;
  font-weight: 600;
  font-size: 13px;
}
.nav-button.active {
  background: var(--brand-soft);
  color: var(--brand);
}
.sidebar-bottom {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.profile {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.profile .avatar {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  font-size: 12px;
}
.profile-name {
  font-size: 12px;
  font-weight: 700;
}
.profile small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
}
.main-area {
  padding: 30px 34px;
  min-width: 0;
}
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}
.page-header h1 {
  font-size: 27px;
  margin: 7px 0;
}
.page-header p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}
.page-header select {
  width: auto;
  min-width: 170px;
  max-width: 240px;
  background: var(--surface);
}
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}
.stat {
  padding: 18px 22px;
}
.stat span {
  color: var(--muted);
  font-size: 11px;
}
.stat strong {
  display: block;
  font-size: 27px;
  margin-top: 9px;
  letter-spacing: -1px;
}
.overview-sites {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 18px 0;
}
.overview-site {
  display: block;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
}
.overview-site p {
  margin: 5px 0 0;
}
.overview-site-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.overview-site-heading .row {
  flex-wrap: wrap;
}
.overview-usage {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 16px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.overview-metric span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.overview-metric strong {
  display: block;
  margin-top: 5px;
  font-size: 17px;
}
.overview-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.overview-actions .overview-action {
  align-items: flex-start;
  flex-direction: column;
  text-align: left;
  white-space: normal;
  min-height: 95px;
}
.overview-action span {
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
}
/* Support inbox: conversation list */
.inbox {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  height: calc(100dvh - 285px);
  min-height: 420px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
}
.conversation-sidebar {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  min-height: 0;
  background: var(--surface);
}
.list-top {
  padding: 18px 16px;
  border-bottom: 1px solid var(--line);
}
.list-top h3 {
  margin: 0 0 10px;
}
.search-input {
  background: var(--surface-2);
  border: 0;
  font-size: 12px;
  padding: 10px 12px;
}
.conversation-list {
  overflow-y: auto;
  min-height: 0;
  flex: 1;
  padding: 8px;
}
.conversation-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 13px 10px;
  background: none;
  border: 0;
  border-radius: 12px;
  color: var(--ink);
  text-align: left;
  margin-bottom: 3px;
}
.conversation-item:hover {
  background: var(--surface-2);
}
.conversation-item.active {
  background: var(--brand-soft);
}
.conversation-item .avatar {
  width: 39px;
  height: 39px;
  border-radius: 12px;
}
.conversation-item .title {
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.conversation-item .preview {
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.conversation-item .time {
  font-size: 9px;
  color: var(--muted);
  margin-left: auto;
  align-self: flex-start;
  white-space: nowrap;
}
.badge {
  display: inline-grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  border-radius: 7px;
  background: var(--brand);
  color: #fff;
  font-size: 10px;
  padding: 0 4px;
}
/* Chat panel: header, message bubbles, attachments, composer */
.chat-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100%;
  background: var(--surface);
}
.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  min-height: 76px;
}
.chat-header h3 {
  font-size: 14px;
  margin: 0 0 4px;
}
.chat-header .hint {
  font-size: 10px;
  margin: 0;
}
.chat-header .avatar {
  width: 37px;
  height: 37px;
  border-radius: 12px;
}
.messages {
  flex: 1;
  overflow-y: auto;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--bg);
  overscroll-behavior: contain;
}
.message {
  max-width: 78%;
  align-self: flex-start;
}
.message.mine {
  align-self: flex-end;
}
.message-name {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 5px;
}
.message-body {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 11px 14px;
  border-radius: 15px 15px 15px 4px;
  line-height: 1.6;
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.mine .message-body {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
  border-radius: 15px 15px 4px 15px;
}
.message-meta {
  font-size: 9px;
  color: var(--muted);
  margin-top: 5px;
  display: flex;
  gap: 6px;
}
.mine .message-meta {
  justify-content: flex-end;
}
.attachment-button {
  background: var(--surface-2);
  color: var(--ink);
  border: 0;
  border-radius: 8px;
  padding: 9px 11px;
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 5px;
  max-width: 100%;
  font-size: 11px;
  overflow-wrap: anywhere;
}
.attachment-image {
  display: block;
  max-width: 220px;
  max-height: 190px;
  border-radius: 9px;
  margin-top: 8px;
}
.typing {
  font-size: 10px;
  color: var(--muted);
  height: 24px;
  padding: 4px 20px;
}
.composer {
  border-top: 1px solid var(--line);
  padding: 13px 18px;
}
.composer-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}
.composer textarea {
  resize: none;
  min-height: 43px;
  max-height: 110px;
  line-height: 1.4;
  background: var(--surface-2);
  border: 0;
  padding: 13px 12px;
  font-size: 12px;
}
.send-button {
  width: 43px;
  height: 43px;
  flex-shrink: 0;
  border: 0;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--brand);
  color: white;
}
.composer .icon-button {
  height: 43px;
  width: 32px;
  border: 0;
  background: none;
}
.composer-hint {
  font-size: 9px;
  color: var(--muted);
  margin: 8px 0 0;
  text-align: center;
}
.file-chip {
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--brand-soft);
  padding: 7px 10px;
  border-radius: 9px;
  margin-bottom: 9px;
  color: var(--brand);
}
.file-chip button {
  border: 0;
  background: none;
  color: inherit;
  margin-left: auto;
}
/* Live connection indicator */
.connection {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--muted);
}
.connection::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
}
.connection.offline::before {
  background: #dbad3c;
}
/* Websites page and install code */
.site-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.site-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.site-card h3 {
  margin: 0;
}
.site-origin {
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.site-card .row {
  flex-wrap: wrap;
}
.billing-sites {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.billing-site {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  white-space: normal;
  gap: 5px;
}
.billing-site span {
  font-size: 11px;
  color: var(--muted);
}
.billing-site.selected {
  border-color: var(--brand);
}
.billing-form {
  margin-top: 18px;
}
.billing-form .setup-grid {
  margin-bottom: 14px;
}
.integration {
  margin-top: 18px;
}
.codebox {
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 16px;
  border-radius: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font:
    12px/1.6 ui-monospace,
    monospace;
  margin: 14px 0;
}
/* Tables (users page) */
.table-wrap {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
th {
  text-align: left;
  padding: 16px 20px;
  background: var(--surface-2);
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}
td {
  padding: 15px 20px;
  border-top: 1px solid var(--line);
  white-space: nowrap;
}
td .text-button {
  font-size: 11px;
  padding: 5px;
}
/* Dialogs */
dialog {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px;
  width: min(600px, calc(100vw - 30px));
  max-height: 90dvh;
  box-shadow: var(--shadow);
}
dialog::backdrop {
  background: #18172770;
  backdrop-filter: blur(3px);
}
dialog .dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
dialog h2 {
  font-size: 21px;
  margin: 0;
}
.dialog-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 22px;
}
/* Chat widget (inside the website's iframe) */
.widget-page {
  height: 100dvh;
  overflow: hidden;
}
.widget-page #app {
  height: 100%;
}
.widget-shell {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--surface);
}
.widget-header {
  padding: 19px 18px 16px;
  color: #fff;
  background: var(--brand);
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 84px;
}
.widget-header .brand-mark {
  background: #ffffff25;
}
.widget-header h2 {
  font-size: 18px;
  margin: 0 0 4px;
}
.widget-header p {
  font-size: 11px;
  opacity: 0.8;
  margin: 0;
  line-height: 1.4;
}
.widget-header .icon-button {
  background: #ffffff20;
  border: 0;
  color: white;
  width: 32px;
  height: 32px;
}
.widget-auth {
  padding: 25px 24px;
  overflow-y: auto;
  flex: 1;
}
.widget-auth h1 {
  font-size: 25px;
  margin: 8px 0 9px;
}
.widget-auth .primary {
  width: 100%;
}
.auth-tabs {
  display: flex;
  background: var(--surface-2);
  border-radius: 10px;
  padding: 4px;
  margin: 20px 0;
}
.auth-tabs button {
  border: 0;
  flex: 1;
  background: none;
  color: var(--muted);
  padding: 9px;
  border-radius: 7px;
  font-weight: 650;
  font-size: 12px;
}
.auth-tabs button.active {
  background: var(--surface);
  color: var(--brand);
  box-shadow: 0 1px 4px #0001;
}
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 10px;
  margin: 22px 0;
}
.divider::before,
.divider::after {
  content: '';
  height: 1px;
  background: var(--line);
  flex: 1;
}
.widget-tabs {
  display: flex;
  gap: 5px;
  border-bottom: 1px solid var(--line);
  padding: 8px 12px;
}
.widget-tabs button {
  border: 0;
  background: none;
  color: var(--muted);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 650;
  padding: 9px 11px;
}
.widget-tabs button.active {
  background: var(--brand-soft);
  color: var(--brand);
}
.widget-content {
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.widget-content .conversation-list {
  padding: 8px 10px;
}
.widget-content .list-top {
  padding: 12px 16px;
}
.widget-footer {
  padding: 9px 16px;
  border-top: 1px solid var(--line);
  font-size: 9px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
/* Compact chat panel inside the widget */
.widget-content .chat-header {
  padding: 11px 13px;
  min-height: 66px;
  gap: 8px;
}
.widget-content .chat-header .avatar {
  width: 31px;
  height: 31px;
  border-radius: 10px;
  font-size: 11px;
}
.widget-content .chat-header h3 {
  font-size: 12px;
}
.widget-content .chat-header .icon-button {
  width: 29px;
  height: 29px;
}
.widget-content .messages {
  padding: 16px;
  gap: 12px;
}
.widget-content .message {
  max-width: 85%;
}
.widget-content .composer {
  padding: 10px 12px;
}
.widget-content .composer-row {
  gap: 5px;
}
.widget-content .chat-panel {
  height: 100%;
}
.guest-note {
  background: var(--surface-2);
  border-radius: 12px;
  padding: 12px;
  font-size: 11px;
  color: var(--muted);
}
/* Website preview page (/demo) */
.demo-page {
  max-width: 1150px;
  margin: auto;
  padding: 45px 60px;
  min-height: 100dvh;
}
.demo-copy {
  margin: 100px 0 70px;
}
.demo-copy h1 {
  font-size: 72px;
  line-height: 1.08;
  letter-spacing: -4px;
  margin: 22px 0;
}
.demo-copy > p {
  font-size: 16px;
  color: var(--muted);
  max-width: 500px;
}
.demo-note {
  padding: 28px;
  border-left: 3px solid var(--brand);
  background: var(--surface);
  max-width: 570px;
  border-radius: 0 20px 20px 0;
}
.demo-note h2 {
  margin: 12px 0;
}
.demo-note p {
  font-size: 13px;
  margin-bottom: 0;
  color: var(--muted);
}
/* Responsive: tablets */
@media (max-width: 1000px) {
  .dashboard {
    grid-template-columns: 190px 1fr;
  }
  .main-area {
    padding: 24px;
  }
  .sidebar {
    padding: 24px 14px;
  }
  .inbox {
    grid-template-columns: 230px 1fr;
  }
  .message {
    max-width: 88%;
  }
}
/* Responsive: phones */
@media (max-width: 760px) {
  .auth-art {
    display: none;
  }
  .auth-wrap {
    display: block;
    max-width: 440px;
  }
  .auth-form {
    padding: 30px;
  }
  .setup-grid {
    grid-template-columns: 1fr;
  }
  .setup-card {
    padding: 20px;
  }
  .dashboard {
    display: block;
  }
  .sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 14px 18px;
    gap: 12px;
    align-items: center;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .sidebar .nav {
    flex-direction: row;
    margin-left: auto;
    gap: 2px;
  }
  .nav-button {
    font-size: 0;
    padding: 10px;
    width: auto;
  }
  .sidebar-bottom {
    border: 0;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 8px;
  }
  .sidebar-bottom .profile {
    display: none;
  }
  .sidebar-bottom .text-button {
    padding: 8px;
    font-size: 11px;
  }
  .main-area {
    padding: 20px 14px;
  }
  .page-header {
    gap: 12px;
    flex-wrap: wrap;
  }
  .page-header h1 {
    font-size: 23px;
  }
  .page-header select {
    max-width: 190px;
    font-size: 12px;
  }
  .stat-row {
    gap: 8px;
  }
  .stat {
    padding: 13px;
  }
  .stat strong {
    font-size: 22px;
  }
  .inbox {
    grid-template-columns: 150px minmax(0, 1fr);
    height: 65dvh;
    min-height: 420px;
  }
  .conversation-item {
    padding: 10px 5px;
    gap: 6px;
  }
  .conversation-item .avatar {
    width: 29px;
    height: 29px;
    border-radius: 9px;
    font-size: 10px;
  }
  .conversation-item .time {
    display: none;
  }
  .chat-header {
    padding: 12px 10px;
    gap: 8px;
  }
  .chat-header .avatar {
    display: none;
  }
  .chat-header h3 {
    font-size: 12px;
  }
  .chat-header .secondary {
    padding: 7px 9px;
    min-height: 32px;
    font-size: 10px;
  }
  .messages {
    padding: 12px;
  }
  .composer {
    padding: 10px;
  }
  .composer-row {
    gap: 4px;
  }
  .composer .icon-button {
    width: 23px;
  }
  .message {
    max-width: 94%;
  }
  .message-body {
    padding: 9px 11px;
  }
  .composer-hint {
    display: none;
  }
  .list-top {
    padding: 12px 9px;
  }
  .list-top h3 {
    font-size: 12px;
  }
  .demo-page {
    padding: 30px 24px;
  }
  .demo-copy {
    margin: 70px 0 45px;
  }
  .demo-copy h1 {
    font-size: 46px;
    letter-spacing: -2.5px;
  }
  .demo-copy > p {
    font-size: 14px;
  }
}
/* Less motion for people who ask for it in their device settings */
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
