:root {
  color-scheme: light;
  --green: #1E7A45;
  --green-dark: #155b33;
  --green-pale: #e8f3ec;
  --ink: #202a24;
  --muted: #728078;
  --line: #e5ebe7;
  --paper: #fff;
  --canvas: #f5f8f6;
  --amber: #c18222;
  font-family: "Aptos", "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; }
body { color: var(--ink); background: var(--canvas); font-size: 15px; }
button, input, select { font: inherit; }
button { touch-action: manipulation; }
.app-shell { min-height: 100%; display: flex; flex-direction: column; }
.topbar { height: 66px; flex: 0 0 66px; display: flex; align-items: center; gap: 12px; padding: 0 max(18px, env(safe-area-inset-left)); color: white; background: var(--green); box-shadow: 0 2px 9px #113d2520; z-index: 2; }
.brand-logo { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: white; }
.topbar-title { display: grid; gap: 1px; line-height: 1.2; }
.topbar-title strong { font-size: 16px; font-weight: 700; }
.topbar-title span { font-size: 12px; color: #e1efe5; }
.icon-button { width: 42px; height: 42px; border: 0; border-radius: 8px; display: inline-grid; place-items: center; color: inherit; background: transparent; cursor: pointer; }
.icon-button:hover { background: #ffffff20; }
.icon-button:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #82c999; outline-offset: 2px; }
.icon-button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.notification-button { margin-left: auto; }
.notification-button.is-enabled { color: #c4f0d0; }
.connection-dot { width: 9px; height: 9px; margin-left: auto; border-radius: 50%; background: #f0be63; box-shadow: 0 0 0 3px #ffffff20; }
.connection-dot.is-online { background: #a8e5b9; }
.connection-dot.is-offline { background: #f18f83; }
.chat-main { width: min(100%, 850px); flex: 1; margin: 0 auto; display: flex; flex-direction: column; min-height: calc(100dvh - 66px); background: var(--paper); }
.conversation-heading { min-height: 84px; padding: 17px 22px 14px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.eyebrow { color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: 1px; }
.conversation-heading h1 { margin: 4px 0 0; max-width: min(65vw, 560px); overflow: hidden; color: var(--ink); font-size: 18px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.chat-status { color: var(--muted); font-size: 12px; }
.message-list { display: flex; flex: 1; flex-direction: column; gap: 17px; padding: 22px clamp(14px, 4vw, 34px) 34px; overflow-y: auto; overscroll-behavior: contain; scroll-behavior: smooth; }
.state-panel { min-height: 45vh; flex: 1; display: grid; align-content: center; justify-items: center; gap: 10px; color: var(--muted); text-align: center; }
.state-panel p { margin: 0; }
.state-mark { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid #d6e7dc; border-radius: 50%; color: var(--green); background: var(--green-pale); font-size: 12px; font-weight: 800; }
.message-row { width: 100%; display: flex; }
.message-row.is-business { justify-content: flex-end; }
.message-bubble { width: fit-content; max-width: min(88%, 610px); padding: 12px 14px 9px; border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; background: #fff; box-shadow: 0 2px 8px #172d1f08; }
.is-business .message-bubble { border-color: #d4e9db; border-radius: 14px 14px 4px 14px; background: #f0f8f2; }
.message-text { margin: 0; color: var(--ink); line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.message-time { display: block; margin-top: 7px; color: #87928b; font-size: 10px; text-align: right; }
.widget-card { width: min(100%, 500px); margin-top: 12px; padding: 14px; border: 1px solid #e3eae5; border-radius: 8px; background: #fff; }
.widget-copy { margin: 0 0 12px; color: #36443a; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.widget-list { max-height: 245px; overflow-y: auto; border-top: 1px solid var(--line); }
.item-row { min-height: 46px; padding: 8px 0; display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 9px; border-bottom: 1px solid #eef1ef; }
.item-row input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--green); }
.item-label { min-width: 0; font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; }
.item-price { width: 112px; padding: 8px 9px !important; }
.field { width: 100%; min-height: 43px; padding: 10px 11px; border: 1px solid #d7e0da; border-radius: 6px; color: var(--ink); background: #fff; }
.field:disabled { color: #77827b; background: #f2f4f2; }
.field-label { display: grid; gap: 6px; margin-top: 10px; color: #435048; font-size: 12px; font-weight: 650; }
.widget-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; }
.button { min-height: 41px; padding: 9px 13px; border: 0; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; color: white; background: var(--green); font-size: 13px; font-weight: 700; cursor: pointer; }
.button:hover:not(:disabled) { background: var(--green-dark); }
.button.secondary { color: #3e4841; background: #e9eeeb; }
.button.secondary:hover:not(:disabled) { background: #dce4df; }
.button:disabled { opacity: .55; cursor: not-allowed; }
.widget-error { min-height: 0; margin: 8px 0 0; color: #a52f25; font-size: 12px; }
.widget-error:empty { display: none; }
.readonly-note { margin: 10px 0 0; color: var(--green-dark); font-size: 12px; font-weight: 650; }
.account-summary { margin: 0 0 12px; padding: 11px; border-radius: 6px; background: var(--canvas); color: #46534a; font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
.account-summary strong { color: var(--ink); }
.image-carousel { display: flex; gap: 9px; margin: 0 -1px 12px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; }
.service-image { width: min(78vw, 280px); height: 165px; flex: 0 0 auto; object-fit: cover; border-radius: 6px; background: #eef2ef; scroll-snap-align: start; }
.image-placeholder { width: 100%; min-height: 115px; margin-bottom: 12px; display: grid; place-items: center; border: 1px dashed #cfdad2; border-radius: 6px; color: var(--muted); background: var(--canvas); font-size: 13px; }
.drawer-backdrop { position: fixed; inset: 0; z-index: 8; background: #12221870; }
.drawer { position: fixed; inset: 0 auto 0 0; z-index: 9; width: min(340px, 88vw); display: flex; flex-direction: column; background: white; box-shadow: 5px 0 25px #0c1a1020; transform: translateX(-105%); transition: transform 180ms ease-out; padding-left: env(safe-area-inset-left); }
.drawer.is-open { transform: translateX(0); }
.drawer-header { min-height: 69px; padding: 10px 12px 10px 17px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.drawer-brand { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.drawer-brand img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.drawer-header .icon-button { color: #455149; }
.drawer-header .icon-button:hover { background: #f0f4f1; }
.drawer-list { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.list-loading, .list-empty { padding: 24px 17px; color: var(--muted); font-size: 13px; }
.chat-list-item { width: 100%; min-height: 76px; padding: 13px 15px 12px 18px; border: 0; border-bottom: 1px solid #eff2f0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 12px; color: var(--ink); background: white; text-align: left; cursor: pointer; }
.chat-list-item:hover { background: #f8faf8; }
.chat-list-item.is-selected { border-left: 3px solid var(--green); padding-left: 15px; background: var(--green-pale); }
.chat-item-title { min-width: 0; overflow: hidden; font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.chat-item-time { color: var(--muted); font-size: 10px; white-space: nowrap; }
.chat-item-preview { grid-column: 1 / -1; overflow: hidden; color: #78847c; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.drawer-footer { padding: 14px 18px max(14px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: #839087; font-size: 11px; }
.toast-region { position: fixed; right: 14px; bottom: max(16px, env(safe-area-inset-bottom)); left: 14px; z-index: 20; display: grid; justify-items: center; pointer-events: none; }
.toast { max-width: 480px; padding: 11px 15px; border-radius: 6px; color: white; background: #28352d; box-shadow: 0 3px 16px #1118; font-size: 13px; }
@media (min-width: 760px) { body { background: #edf2ee; } .chat-main { box-shadow: 0 0 24px #172d1f0a; } .message-list { padding-top: 28px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; } }