:root {
  --bg: #f4efe7;
  --bg-accent: #e6d8c0;
  --paper: #fffaf2;
  --panel: #ffffff;
  --ink: #233038;
  --muted: #647179;
  --line: rgba(35, 48, 56, 0.14);
  --primary: #2d6a5c;
  --primary-strong: #214f45;
  --secondary: #c77b4d;
  --danger: #b3524b;
  --shadow: 0 24px 70px rgba(49, 43, 32, 0.14);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --font-head: "Georgia", "Times New Roman", serif;
  --font-body: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(circle at top left, rgba(199, 123, 77, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(45, 106, 92, 0.16), transparent 24%),
    linear-gradient(180deg, #f8f3eb 0%, #efe6d8 100%);
  color: var(--ink);
  font-family: var(--font-body);
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.app-shell {
  min-height: 100vh;
  padding: 28px;
}

.topbar,
.hero-card,
.admin-view,
.widget-window,
.privacy-dialog {
  background: rgba(255, 250, 242, 0.92);
  backdrop-filter: blur(18px);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.topbar h1,
.hero-copy h2,
.admin-header h2,
.widget-header h2,
.section-title,
.detail-title,
.privacy-header h3 {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--secondary);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.topbar-actions,
.hero-actions,
.admin-header-actions,
.widget-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.danger-btn,
.tab-btn,
.quick-action-btn,
.detail-back-btn {
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover,
.danger-btn:hover,
.tab-btn:hover,
.quick-action-btn:hover,
.detail-back-btn:hover,
.card-action:hover {
  transform: translateY(-1px);
}

.primary-btn {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 12px 24px rgba(45, 106, 92, 0.22);
}

.secondary-btn {
  background: rgba(199, 123, 77, 0.14);
  color: #824521;
}

.ghost-btn,
.detail-back-btn {
  background: rgba(35, 48, 56, 0.06);
  color: var(--ink);
}

.danger-btn {
  background: rgba(179, 82, 75, 0.12);
  color: var(--danger);
}

main {
  margin-top: 28px;
}

.hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 24px;
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.hero-copy p {
  max-width: 62ch;
  color: var(--muted);
  line-height: 1.6;
}

.hero-preview {
  display: grid;
  gap: 16px;
}

.preview-note {
  display: grid;
  gap: 10px;
  padding: 22px;
  min-height: 180px;
  border-radius: var(--radius-lg);
  color: #fffdf9;
  background:
    linear-gradient(155deg, rgba(45, 106, 92, 0.95), rgba(33, 79, 69, 0.9)),
    linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.08));
}

.preview-note.alt {
  min-height: 140px;
  background:
    linear-gradient(145deg, rgba(199, 123, 77, 0.96), rgba(147, 85, 50, 0.92));
}

.preview-note p,
.preview-note ul,
.preview-note span {
  margin: 0;
}

.preview-note ul {
  padding-left: 18px;
  line-height: 1.7;
}

.admin-view {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.tab-btn {
  background: rgba(35, 48, 56, 0.06);
  color: var(--ink);
}

.tab-btn.active {
  background: var(--primary);
  color: #fff;
}

.admin-panel {
  margin-top: 24px;
}

.admin-section {
  display: grid;
  gap: 16px;
}

.section-title {
  font-size: 1.5rem;
}

.admin-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.editor-card,
.lead-card,
.faq-card,
.settings-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: 0 12px 28px rgba(35, 48, 56, 0.06);
}

.lead-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.lead-status {
  display: inline-flex;
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.status-new {
  background: #fff0d7;
  color: #87510b;
}

.status-in_progress {
  background: #e1efff;
  color: #215b94;
}

.status-completed {
  background: #dff2e7;
  color: #256348;
}

.status-spam {
  background: #f4e3e0;
  color: #8b3f35;
}

.lead-status-field {
  margin-bottom: 14px;
}

.conversation-admin-heading,
.conversation-detail-header,
.conversation-list-topline,
.conversation-list-footer,
.admin-transcript-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.conversation-refresh-btn {
  flex: 0 0 auto;
}

.conversation-admin-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.38fr) minmax(0, 0.62fr);
  min-height: 620px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: 0 12px 28px rgba(35, 48, 56, 0.06);
}

.conversation-list {
  display: grid;
  align-content: start;
  max-height: 720px;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: rgba(35, 48, 56, 0.025);
}

.conversation-list-item {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.conversation-list-item:hover,
.conversation-list-item.active {
  background: rgba(45, 113, 84, 0.1);
}

.conversation-list-item.active {
  box-shadow: inset 4px 0 0 var(--primary);
}

.conversation-list-topline strong,
.conversation-count,
.conversation-intent,
.conversation-preview,
.conversation-status,
.conversation-lead-mark {
  display: block;
}

.conversation-count,
.conversation-intent,
.conversation-preview,
.admin-transcript-meta time {
  color: var(--muted);
  font-size: 0.86rem;
}

.conversation-intent {
  font-weight: 800;
  color: var(--primary);
}

.conversation-preview {
  display: -webkit-box;
  overflow: hidden;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.conversation-list-footer {
  align-items: center;
  margin-top: 2px;
}

.conversation-status,
.conversation-lead-mark {
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
}

.conversation-status.status-active {
  background: #e1efff;
  color: #215b94;
}

.conversation-status.status-lead,
.conversation-lead-mark {
  background: #dff2e7;
  color: #256348;
}

.conversation-status.status-closed {
  background: rgba(35, 48, 56, 0.1);
  color: var(--muted);
}

.conversation-detail {
  min-width: 0;
  padding: 22px;
}

.conversation-detail-header {
  align-items: center;
  margin-bottom: 16px;
}

.conversation-detail-header h4 {
  margin: 4px 0 0;
  font-family: var(--font-head);
  font-size: 1.3rem;
}

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

.conversation-summary-grid {
  padding: 14px;
  border-radius: 16px;
  background: rgba(35, 48, 56, 0.045);
}

.conversation-summary-grid p,
.conversation-profile-grid p {
  margin: 0;
  line-height: 1.5;
}

.conversation-profile {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.conversation-profile summary {
  cursor: pointer;
  font-weight: 800;
}

.conversation-profile-grid {
  margin-top: 12px;
}

.admin-transcript {
  display: grid;
  align-content: start;
  gap: 12px;
  max-height: 500px;
  margin-top: 16px;
  padding-right: 6px;
  overflow-y: auto;
}

.admin-transcript-message {
  width: min(86%, 680px);
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 18px 18px 18px 6px;
  background: #eef5f0;
}

.admin-transcript-message.user {
  justify-self: end;
  border-radius: 18px 18px 6px;
  background: #f8eade;
}

.admin-transcript-message p {
  margin: 7px 0 0;
  line-height: 1.55;
  white-space: pre-wrap;
}

.admin-transcript-meta {
  align-items: center;
  color: var(--primary);
  font-size: 0.82rem;
}

.admin-login-card {
  width: min(460px, 100%);
  margin: 4vh auto;
}

.form-error {
  margin: 0;
  color: var(--danger);
  font-size: 0.9rem;
  font-weight: 700;
}

.editor-card h4,
.lead-card h4,
.faq-card h4,
.settings-card h4,
.detail-title,
.content-title {
  margin: 0 0 12px;
  font-family: var(--font-head);
}

.field-grid {
  display: grid;
  gap: 12px;
}

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

.field {
  display: grid;
  gap: 6px;
}

.field label,
.checkbox-row label {
  color: var(--muted);
  font-size: 0.92rem;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid rgba(35, 48, 56, 0.16);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  padding: 12px 14px;
}

.field textarea {
  min-height: 96px;
  resize: vertical;
}

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

.muted-note {
  color: var(--muted);
  line-height: 1.5;
}

.widget-overlay,
.privacy-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgba(27, 32, 36, 0.42);
  padding: 18px;
}

.widget-window {
  --paper: #f8f4e9;
  --panel: #fffdf7;
  --ink: #24342c;
  --muted: #637068;
  --line: rgba(42, 78, 58, 0.16);
  --primary: #356b4b;
  --primary-strong: #254f38;
  --secondary: #c87835;
  width: min(1440px, 100%);
  height: min(92vh, 980px);
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.98), rgba(246, 240, 226, 0.98)),
    radial-gradient(circle at 82% 0%, rgba(200, 120, 53, 0.12), transparent 34%);
  border-radius: 32px;
  border: 1px solid rgba(42, 78, 58, 0.2);
  box-shadow: 0 35px 90px rgba(24, 52, 36, 0.3);
  overflow: hidden;
}

body.embed-mode {
  min-height: 100vh;
  overflow: hidden;
  background: transparent;
}

.embed-mode .app-shell {
  min-height: 100vh;
  padding: 0;
}

.embed-mode .app-shell > .topbar,
.embed-mode .app-shell > main,
.embed-mode .admin-view {
  display: none !important;
}

.embed-mode .widget-overlay {
  padding: 0;
  background: transparent;
}

.embed-mode .widget-window {
  width: 100%;
  height: 100vh;
  max-height: none;
  border: none;
  border-radius: 0;
}

.return-site-btn {
  width: auto;
  height: auto;
  padding: 10px 15px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
}

.widget-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 28px 18px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(53, 107, 75, 0.07), transparent 42%),
    rgba(255, 253, 247, 0.74);
}

.widget-identity {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 14px;
}

.widget-avatar {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  object-fit: cover;
  background: #dcece2;
  box-shadow: 0 7px 18px rgba(31, 76, 53, 0.18);
}

.settings-avatar-preview {
  width: 92px;
  height: 92px;
  margin-top: 6px;
  border: 3px solid #fff;
  border-radius: 50%;
  object-fit: cover;
  background: #dcece2;
  box-shadow: 0 8px 22px rgba(31, 76, 53, 0.16);
}

.widget-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
}

.mobile-toggle {
  display: none;
}

.close-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(35, 48, 56, 0.08);
  color: var(--ink);
  font-size: 1.6rem;
  line-height: 1;
}

.close-btn.small {
  width: 36px;
  height: 36px;
}

.selection-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 24px;
  padding: 0 28px 18px;
}

.selection-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(45, 106, 92, 0.1);
  color: var(--primary-strong);
  font-size: 0.95rem;
}

.widget-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(390px, 40%) minmax(0, 60%);
}

.chat-column,
.content-column {
  min-height: 0;
}

.chat-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 20px 20px 28px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(53, 107, 75, 0.035), transparent 55%);
}

.messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 6px 8px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scroll-behavior: smooth;
  scrollbar-color: rgba(53, 107, 75, 0.42) transparent;
}

.message {
  flex: 0 0 auto;
  height: auto;
  min-height: 0;
  max-width: 96%;
  padding: 9px 12px 10px;
  border-radius: 16px;
  font-size: 0.92rem;
  line-height: 1.38;
  text-align: left;
  box-shadow: 0 5px 14px rgba(36, 52, 44, 0.05);
}

.message.assistant {
  align-self: flex-start;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  column-gap: 9px;
  border: 1px solid rgba(53, 107, 75, 0.12);
  background: #edf4ec;
}

.message-avatar {
  grid-row: 1 / span 2;
  width: 34px;
  height: 34px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  object-fit: cover;
  background: #dcece2;
}

.message.user {
  align-self: flex-end;
  max-width: 92%;
  border: 1px solid rgba(200, 120, 53, 0.12);
  background: #f7e8d8;
}

.message-meta {
  display: block;
  margin-bottom: 3px;
  color: rgba(37, 79, 56, 0.72);
  font-size: 0.72rem;
  font-weight: 700;
}

.message-text {
  display: block;
  white-space: pre-wrap;
}

.quick-actions-panel {
  display: grid;
  gap: 7px;
  padding: 9px 10px 10px;
  border: 1px solid rgba(53, 107, 75, 0.12);
  border-radius: 16px;
  background: rgba(255, 253, 247, 0.78);
}

.quick-actions-label {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.quick-action-btn {
  padding: 7px 10px;
  border: 1px solid rgba(53, 107, 75, 0.13);
  background: #f3f7ef;
  color: var(--primary-strong);
  font-size: 0.82rem;
  line-height: 1.2;
}

.composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.composer-controls {
  display: grid;
  gap: 8px;
}

.voice-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid rgba(53, 107, 75, 0.22);
  border-radius: 999px;
  background: #f3f7ef;
  color: var(--primary-strong);
  font-weight: 700;
}

.voice-btn svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.voice-btn.listening {
  border-color: rgba(190, 73, 49, 0.42);
  background: #f9e5dc;
  color: #9b3f2e;
  animation: voice-pulse 1.4s ease-in-out infinite;
}

.voice-btn:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.voice-status {
  grid-column: 1 / -1;
  margin: -4px 4px 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.voice-status.voice-error {
  color: #9b3f2e;
}

@keyframes voice-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 4px rgba(190, 73, 49, 0.1);
  }
  50% {
    box-shadow: 0 0 0 9px rgba(190, 73, 49, 0.04);
  }
}

.composer textarea {
  min-height: 116px;
  max-height: 230px;
  border: 1px solid rgba(53, 107, 75, 0.2);
  border-radius: 20px;
  padding: 16px 18px;
  resize: vertical;
  background: #fffef9;
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(53, 107, 75, 0.04);
}

.content-column {
  padding: 0 28px 28px 20px;
}

.content-panel {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 254, 249, 0.97), rgba(247, 241, 227, 0.98));
  border: 1px solid rgba(53, 107, 75, 0.1);
  padding: 22px;
}

.content-stack {
  display: grid;
  gap: 18px;
}

.content-title {
  margin: 0;
  font-size: 1.8rem;
}

.content-lead {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.catalog-grid,
.gallery-grid,
.detail-gallery {
  display: grid;
  gap: 16px;
}

.catalog-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

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

.detail-gallery {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.catalog-card,
.gallery-card,
.gallery-featured,
.detail-section,
.lead-form,
.availability-form,
.welcome-card,
.status-card {
  border: 1px solid rgba(35, 48, 56, 0.1);
  border-radius: 22px;
  background: var(--panel);
  overflow: hidden;
  box-shadow: 0 14px 34px rgba(35, 48, 56, 0.07);
}

.catalog-card {
  display: grid;
  min-height: 100%;
  min-width: 0;
}

.catalog-image,
.detail-image,
.gallery-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: linear-gradient(135deg, #d8ecde, #f2dcc7);
}

.detail-image {
  height: 320px;
}

.catalog-body,
.gallery-body,
.welcome-card,
.status-card {
  padding: 18px;
}

.catalog-body {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.catalog-topline,
.detail-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  min-width: 0;
  flex-wrap: wrap;
}

.catalog-topline h4 {
  min-width: 0;
  flex: 1 1 150px;
  overflow-wrap: anywhere;
}

.price-badge {
  display: inline-flex;
  min-width: 0;
  max-width: 100%;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(199, 123, 77, 0.14);
  color: #824521;
  white-space: normal;
  overflow-wrap: anywhere;
}

.catalog-card h4,
.gallery-body h4 {
  margin: 0 0 10px;
  font-family: var(--font-head);
  font-size: 1.22rem;
}

.catalog-card p,
.gallery-body p,
.detail-copy p,
.detail-copy li,
.welcome-card p,
.status-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.card-action {
  align-self: flex-start;
  max-width: 100%;
  margin-top: 14px;
  border: none;
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(45, 106, 92, 0.1);
  color: var(--primary-strong);
  white-space: normal;
}

.detail-layout {
  display: grid;
  gap: 20px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-copy {
  display: grid;
  gap: 14px;
}

.detail-list {
  margin: 0;
  padding-left: 18px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.detail-section {
  padding: 16px;
}

.detail-section strong {
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-head);
  color: var(--ink);
}

.gallery-featured {
  min-width: 0;
}

.gallery-featured .gallery-image {
  height: 180px;
  min-height: 0;
}

.gallery-card,
.gallery-featured {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.gallery-body {
  flex: 1;
}

.lead-form,
.availability-form {
  padding: 22px;
}

.availability-form {
  display: grid;
  gap: 16px;
}

.availability-status {
  display: grid;
  gap: 10px;
}

.availability-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.availability-meta span {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(53, 107, 75, 0.1);
  color: var(--primary-strong);
  font-size: 0.88rem;
}

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

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

.form-actions,
.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.inline-link {
  padding: 0;
  border: none;
  background: none;
  color: var(--primary);
  text-decoration: underline;
}

.privacy-dialog {
  width: min(760px, 100%);
  border-radius: 24px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.privacy-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 20px 22px 12px;
  border-bottom: 1px solid var(--line);
}

.privacy-body {
  padding: 18px 22px 24px;
}

.privacy-body p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.6;
}

.empty-state {
  padding: 24px;
  border-radius: 18px;
  background: rgba(35, 48, 56, 0.04);
  color: var(--muted);
}

@media (max-width: 1100px) {
  .hero-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .app-shell {
    padding: 16px;
  }

  .topbar,
  .hero-card,
  .admin-view {
    padding: 20px;
  }

  .widget-window {
    height: min(96vh, 980px);
    border-radius: 24px;
  }

  .widget-header {
    padding: 20px 20px 14px;
  }

  .selection-strip {
    padding: 0 20px 14px;
  }

  .chat-column,
  .content-column {
    padding-left: 20px;
    padding-right: 20px;
  }

  .chat-column {
    padding-bottom: 18px;
  }

  .content-column {
    padding-bottom: 20px;
  }

  .mobile-toggle {
    display: inline-flex;
  }

  .mobile-toggle.active {
    background: var(--primary);
    color: #fff;
  }

  .widget-body {
    display: block;
  }

  .chat-column,
  .content-column {
    height: calc(100% - 0px);
  }

  .chat-column {
    border-right: none;
  }

  .content-column.mobile-hidden,
  .chat-column.mobile-hidden {
    display: none;
  }

  .gallery-grid,
  .form-grid.two,
  .field-grid.two {
    grid-template-columns: 1fr;
  }

  .gallery-featured {
    grid-row: auto;
  }

  .gallery-featured .gallery-image {
    min-height: 220px;
  }

  .detail-image {
    height: 240px;
  }

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

  .conversation-list {
    max-height: 300px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 720px) {
  .topbar,
  .admin-header {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions,
  .topbar-actions,
  .admin-header-actions,
  .widget-header-actions,
  .form-actions,
  .admin-actions {
    width: 100%;
  }

  .primary-btn,
  .secondary-btn,
  .ghost-btn,
  .danger-btn {
    width: 100%;
    justify-content: center;
  }

  .composer {
    grid-template-columns: 1fr;
  }

  .composer-controls {
    grid-template-columns: 1fr 1fr;
  }

  .message {
    max-width: 100%;
  }

  .widget-header-actions {
    align-items: center;
  }

  .conversation-admin-heading,
  .conversation-detail-header {
    flex-direction: column;
    align-items: stretch;
  }

  .conversation-summary-grid,
  .conversation-profile-grid {
    grid-template-columns: 1fr;
  }

  .conversation-detail {
    padding: 16px;
  }

  .admin-transcript-message {
    width: 100%;
  }
}
