@import url('/base.css');

.app-shell { min-height: 100dvh; }
.sidebar { width: 234px; position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; padding: 37px 22px 22px; background: var(--white); border-right: 1px solid var(--line); z-index: 20; }
.brand { display: inline-flex; align-items: center; gap: 10px; width: fit-content; color: var(--ink); text-decoration: none; font-size: 25px; font-weight: 740; letter-spacing: -1.1px; }
.brand-dot { color: var(--green); }
.sidebar > .brand { margin-left: 13px; }
.sidebar-label { color: #687460; font-size: 11px; letter-spacing: 1.7px; font-weight: 650; margin: 57px 14px 16px; }
.desktop-navigation { display: grid; gap: 7px; }
.nav-link { position: relative; display: flex; align-items: center; gap: 13px; border-radius: 10px; padding: 13px 15px; color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 560; transition: background .15s, color .15s; }
.nav-link:hover { background: #f7f8f5; color: var(--ink); }
.nav-link.active { background: var(--green-light); color: var(--green); font-weight: 650; }
.nav-link svg { width: 19px; height: 19px; }
.nav-badge { display: grid; place-items: center; min-width: 20px; height: 20px; border-radius: 7px; background: var(--green); color: white; font-size: 12px; padding: 0 5px; margin-left: auto; }
.sidebar-bottom { margin-top: auto; }
.free-note { display: flex; align-items: center; gap: 7px; color: #687460; padding: 24px 13px; font-size: 12px; }
.tiny-dot { width: 5px; height: 5px; border-radius: 50%; background: #6f9d6b; flex-shrink: 0; }
.profile-link { display: flex; align-items: center; gap: 10px; width: 100%; padding: 17px 10px 8px; border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--ink); text-decoration: none; text-align: left; cursor: pointer; }
.profile-link strong, .profile-link small { display: block; }
.profile-link > span:nth-child(2) { min-width: 0; }
.profile-link strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-link strong { font-size: 14px; font-weight: 620; }
.profile-link small { font-size: 12px; color: var(--muted); margin-top: 4px; }
.profile-chevron { margin-left: auto; color: #8c948b; font-size: 22px; }
.avatar { width: 43px; height: 43px; flex-shrink: 0; display: grid; place-items: center; border-radius: 13px; font-weight: 700; font-size: 21px; font-family: Georgia, serif; }
.profile-avatar { width: 35px; height: 35px; border-radius: 50%; background: #f0f1ec; font-size: 15px; font-weight: 600; font-family: inherit; }
.avatar.lilac { background: #eeebf5; color: #76638d; }
.avatar.peach { background: #faeee3; color: #ad7343; }
.avatar.sage { background: #e7eee8; color: #568171; }
.workspace { margin-left: 234px; }
main { padding: 43px 46px 34px; max-width: 1280px; margin: 0 auto; outline: none; }
.mobile-header, .mobile-navigation { display: none; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 31px; }
.eyebrow { display: flex; align-items: center; gap: 7px; font-size: 12px; letter-spacing: 1.6px; color: var(--muted); font-weight: 600; margin: 0 0 12px; }
h1 { font-size: 30px; line-height: 1.25; letter-spacing: -1.1px; font-weight: 630; margin: 0; }
h1 { overflow-wrap: anywhere; }
.page-subtitle { font-size: 14px; line-height: 1.7; color: var(--muted); margin: 9px 0 0; }
.header-tools { display: flex; align-items: center; gap: 12px; padding-top: 7px; }
.preview-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 500; color: #687460; white-space: nowrap; padding: 7px 10px; border: 1px solid var(--line); border-radius: 20px; background: #fff9; }
.preview-pill > span { width: 4px; height: 4px; border-radius: 50%; background: #a2aa98; }
.icon-button { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); background: white; border-radius: 11px; color: #727c70; cursor: pointer; flex-shrink: 0; }
.icon-button:hover { background: var(--green-light); color: var(--green); }
.icon-button svg { width: 17px; height: 17px; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(235px, 1fr); gap: 22px; }
.home-secondary { grid-column: 2; grid-row: 1 / span 2; }
.home-recent { grid-column: 1; grid-row: 2; }
.home-recent .section-heading { margin-top: 4px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: 17px; }
.code-card { position: relative; overflow: hidden; padding: 28px 30px 25px; min-height: 273px; box-shadow: 0 5px 18px #253d2303; }
.card-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.card-label { font-size: 12px; font-weight: 650; letter-spacing: 1.25px; color: #697764; margin: 0; }
.sample-label { font-size: 11px; font-weight: 500; border: 1px solid #e5e8df; color: #687460; padding: 3px 7px; border-radius: 5px; }
.code-description { color: var(--muted); font-size: 13px; margin: 11px 0 0; line-height: 1.7; max-width: 340px; }
.device-code { display: flex; align-items: center; justify-content: flex-start; gap: 11px; font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace; font-size: clamp(24px, 2.65vw, 35px); font-weight: 500; letter-spacing: -.8px; margin: 31px 0 29px; white-space: nowrap; }
.code-dash { color: #c8cec1; font-weight: 300; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 39px; padding: 10px 15px; border: 1px solid transparent; border-radius: 9px; background: var(--green); color: white; text-decoration: none; font-size: 13px; line-height: 1.4; font-weight: 570; cursor: pointer; transition: background .15s, transform .15s; }
.button:hover { background: #315e47; }
.button:active { transform: translateY(1px); }
.button svg { width: 15px; height: 15px; }
.button.secondary { background: white; border-color: var(--line); color: #5d6859; }
.button.secondary:hover { background: #f7f8f5; border-color: #d7ddd1; }
.button:disabled { opacity: .45; cursor: default; transform: none; }
.code-actions { display: flex; align-items: center; gap: 9px; }
.device-note { display: flex; align-items: center; gap: 6px; color: #687460; font-size: 11px; margin-top: 18px; }
.device-note svg { width: 12px; height: 12px; }
.how-card { background: #edf3e9; border-color: #e5ecdf; padding: 27px 25px; }
.how-card h2 { font-size: 16px; font-weight: 600; margin: 0 0 22px; letter-spacing: -.3px; }
.how-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.how-list li { display: flex; align-items: flex-start; gap: 13px; }
.step-number { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 50%; background: #fff9; border: 1px solid #dbe5d4; color: #6c8260; font-size: 12px; flex-shrink: 0; }
.how-list strong { display: block; font-size: 13px; font-weight: 600; margin: 1px 0 4px; }
.how-list p { color: #687460; font-size: 12px; line-height: 1.7; margin: 0; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 30px 0 15px; }
.section-heading h2 { font-size: 15px; font-weight: 610; letter-spacing: -.3px; margin: 0; }
.text-link { display: inline-flex; align-items: center; gap: 6px; color: #6e7d64; text-decoration: none; font-size: 12px; font-weight: 530; }
.text-link svg { width: 13px; height: 13px; }
.text-link:hover { color: var(--green); text-decoration: underline; }
.conversation-row { display: flex; gap: 14px; align-items: center; padding: 20px 23px; text-decoration: none; color: var(--ink); border-bottom: 1px solid #eef0ea; transition: background .15s; min-width: 0; }
.conversation-row:last-child { border-bottom: 0; }
.conversation-row:hover { background: #fafbf8; }
.conversation-list { overflow: hidden; }
.conversation-copy { min-width: 0; flex: 1; }
.conversation-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.conversation-name { font-size: 14px; font-weight: 610; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation-time { color: #687460; font-size: 11px; font-weight: 400; flex-shrink: 0; }
.conversation-bottom { display: flex; align-items: center; gap: 12px; margin-top: 7px; }
.conversation-preview { font-size: 13px; color: #687460; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; flex: 1; }
.conversation-row.has-unread .conversation-preview { color: #687560; }
.unread-badge { min-width: 17px; height: 17px; padding: 0 4px; border-radius: 6px; background: #eaf2e6; color: #57804b; font-size: 11px; font-weight: 650; display: grid; place-items: center; flex-shrink: 0; }
.muted-icon { color: #687460; width: 12px; height: 12px; }
.quiet-card { padding: 24px; margin-top: 15px; background: #fff; }
.quiet-card > .icon-orbit { width: 34px; height: 34px; border-radius: 11px; background: #f3f5ef; color: #7c8b71; display: grid; place-items: center; margin-bottom: 16px; }
.quiet-card svg { width: 17px; height: 17px; }
.quiet-card h3 { font-size: 14px; font-weight: 590; margin: 0 0 8px; }
.quiet-card p { font-size: 12px; line-height: 1.8; color: #687460; margin: 0 0 14px; }
.preview-note { display: flex; align-items: flex-start; gap: 7px; color: #687460; font-size: 11px; line-height: 1.8; margin: 23px 1px 0; }
.preview-note svg { width: 12px; height: 12px; flex-shrink: 0; margin-top: 2px; }
.inbox-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.search-field { display: flex; align-items: center; gap: 10px; background: white; border: 1px solid var(--line); border-radius: 10px; padding: 0 13px; min-height: 43px; width: 320px; }
.search-field > svg { width: 16px; height: 16px; color: #687460; flex-shrink: 0; }
.search-field input { border: 0; background: none; outline: none; width: 100%; padding: 11px 0; font-size: 13px; color: var(--ink); }
.search-field:focus-within { border-color: #92ae88; box-shadow: 0 0 0 3px #4e835311; }
.search-clear { display: grid; place-items: center; color: #687460; background: none; border: 0; cursor: pointer; padding: 4px; }
.search-clear svg { width: 13px; height: 13px; }
.filter-tabs { display: flex; gap: 4px; padding: 4px; background: #eff1eb; border-radius: 9px; }
.filter-button { border: 0; border-radius: 6px; color: #687460; background: none; font-size: 12px; padding: 8px 12px; cursor: pointer; white-space: nowrap; }
.filter-button.selected { background: white; color: #4b6244; box-shadow: 0 1px 4px #20361709; font-weight: 570; }
.inbox-list .conversation-row { padding: 24px; }
.inbox-list .avatar { width: 46px; height: 46px; }
.inbox-list .conversation-name { font-size: 15px; }
.inbox-list .conversation-preview { margin-top: 2px; }
.inbox-summary { color: #687460; font-size: 12px; margin: 14px 3px; }
.empty-state { display: flex; flex-direction: column; align-items: center; padding: 67px 20px; text-align: center; }
.empty-state > svg { width: 31px; height: 31px; color: #687460; margin-bottom: 17px; }
.empty-state h2 { font-size: 15px; margin: 0 0 8px; font-weight: 580; }
.empty-state p { font-size: 13px; color: var(--muted); margin: 0 0 20px; line-height: 1.7; }
.settings-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(230px, 1fr); gap: 23px; }
.settings-card { margin-bottom: 20px; overflow: hidden; }
.settings-section-heading { padding: 24px 25px 17px; }
.settings-section-heading h2 { font-size: 16px; font-weight: 600; margin: 0 0 7px; }
.settings-section-heading p { color: var(--muted); font-size: 12px; line-height: 1.8; margin: 0; }
.profile-form { padding: 0 25px 24px; }
.field-label { display: block; font-size: 12px; font-weight: 570; margin: 4px 0 8px; color: #626e5a; }
.text-input { border: 1px solid #e0e6da; border-radius: 9px; background: #fdfefc; padding: 12px; color: var(--ink); width: 100%; font-size: 14px; outline: none; }
.text-input:focus { border-color: #94ad86; box-shadow: 0 0 0 3px #4e835311; }
.form-footer { display: flex; gap: 10px; justify-content: space-between; align-items: center; margin-top: 14px; }
.field-help { font-size: 11px; color: #687460; line-height: 1.8; margin: 0; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 19px 25px; border-top: 1px solid #eef1e9; }
.toggle-label { display: block; font-size: 13px; font-weight: 560; }
.toggle-description { display: block; font-size: 12px; color: #687460; margin-top: 6px; line-height: 1.7; }
.toggle { width: 33px; height: 20px; padding: 3px; background: #e3e7de; border: 0; border-radius: 20px; cursor: pointer; flex-shrink: 0; }
.toggle::before { content: ''; display: block; width: 14px; height: 14px; background: white; border-radius: 50%; box-shadow: 0 1px 3px #273f2515; transition: transform .15s; }
.toggle[aria-checked='true'] { background: var(--green); }
.toggle[aria-checked='true']::before { transform: translateX(13px); }
.toggle:disabled { opacity: .45; cursor: default; }
.settings-info { padding: 25px; background: #edf3e9; border-color: #e5ecdf; align-self: start; }
.settings-info .icon-orbit { display: grid; place-items: center; width: 40px; height: 40px; background: #fff9; border-radius: 12px; color: #78936b; margin-bottom: 21px; }
.settings-info svg { width: 20px; height: 20px; }
.settings-info h2 { font-size: 16px; letter-spacing: -.25px; font-weight: 570; line-height: 1.5; margin: 0 0 12px; }
.settings-info p { font-size: 13px; color: #687460; line-height: 1.9; margin: 0; }
.settings-info .info-divider { border-top: 1px solid #dce7d5; margin: 21px 0; }
.settings-info .small-copy { font-size: 12px; }
.reset-row { padding: 17px 25px 24px; }
.reset-button { color: #82745e; font-size: 12px; border: 0; background: none; padding: 3px 0; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.form-error { color: #a85545; font-size: 12px; margin: 10px 0 0; }
.is-chat main { max-width: 1120px; height: 100dvh; display: flex; padding-top: 28px; padding-bottom: 28px; }
.chat-panel { --chat-accent: var(--green); --chat-tint: #e9f1e5; --chat-ink: #3d5834; display: flex; flex-direction: column; flex: 1; min-width: 0; min-height: 0; overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 17px; }
/* Future company themes are scoped to these chat variables, never the shell. */
.chat-header { display: flex; align-items: center; gap: 13px; padding: 18px 23px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.chat-back { color: #8a9482; border: 0; width: 26px; background: none; margin-left: -6px; }
.chat-header .avatar { width: 39px; height: 39px; font-size: 20px; }
.chat-business-name { font-size: 15px; font-weight: 640; margin: 0 0 5px; }
.chat-business-detail { font-size: 11px; color: #687460; }
.chat-header-actions { margin-left: auto; display: flex; gap: 8px; }
.chat-header-actions .icon-button { width: 31px; height: 31px; border-color: transparent; border-radius: 50%; }
.chat-header-actions .icon-button[aria-pressed='true'] { background: #f0f3eb; color: #7e8d70; }
.chat-demo-strip { padding: 9px 20px; background: #fcfdf9; color: #687460; text-align: center; font-size: 11px; border-bottom: 1px solid #edf1e7; flex-shrink: 0; }
.thread { min-height: 0; flex: 1; overflow-y: auto; padding: 24px 30px; background: #f7f9f4; scroll-behavior: smooth; }
.date-label { text-align: center; margin: 10px 0 22px; font-size: 11px; color: #687460; }
.message { display: flex; align-items: flex-end; gap: 9px; margin-bottom: 15px; }
.message .avatar { width: 24px; height: 24px; border-radius: 7px; font-size: 15px; margin-bottom: 3px; }
.message.outgoing { justify-content: flex-end; margin-left: 38px; }
.message.incoming { margin-right: 38px; }
.message-body { max-width: 420px; min-width: 90px; background: white; border: 1px solid #e9eee3; border-radius: 13px 13px 13px 4px; padding: 16px 17px 10px; }
.message.outgoing .message-body { background: var(--chat-tint); border-color: #e0e9d9; color: var(--chat-ink); border-radius: 13px 13px 4px 13px; }
.message-title { font-size: 14px; font-weight: 630; margin: 0 0 9px; line-height: 1.5; }
.message-text { font-size: 13px; line-height: 1.9; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.message-meta { display: flex; justify-content: flex-end; align-items: center; gap: 5px; font-size: 10px; line-height: 1.5; color: #687460; margin-top: 9px; }
.message-meta svg { width: 11px; height: 11px; }
.composer-wrap { flex-shrink: 0; padding: 17px 23px 12px; border-top: 1px solid var(--line); background: #fff; }
.composer { display: flex; flex-direction: column; gap: 10px; }
.composer-row { display: flex; align-items: flex-end; gap: 10px; width: 100%; }
.composer-row textarea { min-width: 0; flex: 1; }
.message-title-input { width: 100%; }
.send-button { flex-shrink: 0; }
.composer textarea { width: 100%; min-height: 43px; max-height: 140px; resize: none; border: 1px solid #e8ece2; border-radius: 11px; padding: 13px 15px; font-size: 13px; line-height: 1.5; color: var(--ink); background: #fafcf7; outline: none; }
.composer textarea:focus { border-color: #a9ba9b; box-shadow: 0 0 0 3px #4e835309; }
.composer textarea[aria-invalid='true'] { border-color: #cd9c91; }
.send-button { width: 43px; height: 43px; padding: 0; border-radius: 11px; background: var(--chat-accent); }
.send-button svg { width: 17px; height: 17px; }
.composer-help { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 9px 2px 0; color: #687460; font-size: 10px; line-height: 1.6; }
.byte-count { white-space: nowrap; font-variant-numeric: tabular-nums; }
.byte-count.over-limit { color: #b36350; }
.composer-error { color: #a85545; font-size: 12px; margin: 8px 2px 0; }
.toast { position: fixed; bottom: 28px; left: calc(50% + 117px); transform: translate(-50%, 10px); padding: 12px 18px; color: white; background: #354c32; border: 1px solid #ffffff1a; border-radius: 11px; box-shadow: 0 5px 22px #1a31152b; max-width: calc(100vw - 40px); font-size: 13px; line-height: 1.6; text-align: center; opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; z-index: 60; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.app-dialog { border: 1px solid var(--line); border-radius: 19px; padding: 28px; width: min(390px, calc(100% - 36px)); color: var(--ink); box-shadow: 0 25px 100px #18370e26; }
.app-dialog::backdrop { background: #1e321f47; backdrop-filter: blur(3px); }
.app-dialog h2 { font-size: 19px; font-weight: 600; letter-spacing: -.5px; margin: 0 0 12px; }
.app-dialog p { color: var(--muted); font-size: 14px; line-height: 1.9; margin: 0 0 22px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
.dialog-business { display: flex; gap: 14px; align-items: center; margin-bottom: 20px; }
.dialog-business h2 { margin: 0; font-size: 18px; }
.dialog-business small { color: var(--muted); font-size: 12px; display: block; margin-top: 6px; }
.mode-switch { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: white; color: var(--ink); border-radius: 10px; padding: 9px 10px; font-size: 12px; cursor: pointer; }
.mode-switch [data-mode-icon] { display: flex; }
.mode-switch svg { width: 15px; height: 15px; }
.account-choices { display: grid; gap: 10px; margin: 20px 0; }
.account-choice { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: white; border: 1px solid var(--line); border-radius: 12px; padding: 15px 13px; color: var(--ink); cursor: pointer; }
.account-choice:hover, .account-choice.selected { background: var(--green-light); border-color: #b6c6ab; }
.account-choice-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: #f0f3ec; color: var(--green); flex-shrink: 0; }
.account-choice-copy { min-width: 0; flex: 1; }
.account-choice strong, .account-choice small { display: block; overflow-wrap: anywhere; }
.account-choice strong { font-size: 14px; font-weight: 600; }
.account-choice small { margin-top: 5px; font-size: 12px; color: var(--muted); }
.account-choice > svg { color: var(--green); flex-shrink: 0; }
.app-dialog .dialog-note { font-size: 12px; }
.business-identity { display: flex; gap: 15px; align-items: center; margin: 29px 0 22px; }
.business-mark { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: #e7eee2; color: var(--green); flex-shrink: 0; }
.business-mark svg { width: 25px; height: 25px; }
.business-identity > div { min-width: 0; }
.business-identity h2 { font-size: 23px; font-weight: 600; margin: 0 0 7px; overflow-wrap: anywhere; }
.business-identity p { font-size: 13px; color: var(--muted); margin: 0; overflow-wrap: anywhere; }
.plain-button { padding: 0; border: 0; background: none; cursor: pointer; text-align: left; }
.switch-info { margin-top: 19px; }
.inbox-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.inbox-actions .button { white-space: nowrap; }
.inbox-toolbar .search-field { min-width: 0; }
.extra-field { margin-top: 20px; }
.optional-label { color: var(--muted); font-weight: 400; }
.spaced-actions { margin-top: 25px; flex-wrap: wrap; }
.code-input { text-transform: uppercase; letter-spacing: 1px; }
.thread-empty { text-align: center; color: var(--muted); margin: 70px auto; font-size: 14px; line-height: 1.8; }
.thread-empty > svg { width: 32px; height: 32px; color: #91a384; }
.thread-empty h2 { color: var(--ink); font-size: 18px; font-weight: 600; }
.chat-identity { min-width: 0; }
.chat-business-name, .chat-business-detail { overflow-wrap: anywhere; }
.message-title { overflow-wrap: anywhere; }

@media (min-width: 1500px) {
  main { padding-top: 56px; }
  .home-grid { gap: 26px; }
  .code-card { min-height: 300px; padding: 32px 35px; }
  .device-code { margin-top: 37px; margin-bottom: 34px; font-size: 38px; }
  .how-card { padding: 31px; }
}
@media (max-width: 1150px) and (min-width: 761px) {
  .sidebar { width: 205px; padding-left: 17px; padding-right: 17px; }
  .workspace { margin-left: 205px; }
  main { padding-left: 28px; padding-right: 28px; }
  .home-grid, .settings-layout { grid-template-columns: minmax(0, 1fr); }
  .how-card { grid-row: auto; }
  .how-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .how-list li { gap: 9px; }
  .quiet-card { display: none; }
  .home-secondary { display: contents; }
  .home-recent { grid-row: 2; }
  .settings-info { max-width: none; }
  .toast { left: calc(50% + 102px); }
}
@media (max-width: 760px) {
  .sidebar { display: none; }
  .workspace { margin-left: 0; }
  .mobile-header { display: flex; align-items: center; justify-content: space-between; padding: calc(19px + env(safe-area-inset-top)) 22px 15px; }
  .mobile-header .brand { gap: 8px; font-size: 23px; }
  .mobile-header .preview-pill { font-size: 10px; padding: 6px 8px; }
  main { padding: 23px 22px 110px; max-width: 580px; }
  .page-header { margin-bottom: 24px; }
  .page-header .header-tools { display: none; }
  .eyebrow { font-size: 10px; letter-spacing: 1.35px; margin-bottom: 10px; }
  h1 { font-size: 27px; letter-spacing: -.8px; }
  .page-subtitle { font-size: 13px; max-width: 290px; }
  .home-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .code-card { padding: 25px 23px; min-height: 0; }
  .card-label { font-size: 11px; }
  .code-description { font-size: 13px; max-width: 270px; }
  .device-code { font-size: clamp(25px, 7.6vw, 37px); gap: 9px; margin: 30px 0 26px; }
  .button { min-height: 42px; font-size: 13px; }
  .code-actions .button { padding-left: 12px; padding-right: 12px; }
  .device-note { margin-top: 17px; }
  .home-secondary { display: contents; }
  .how-card { grid-row: 3; margin-top: 24px; padding: 23px; }
  .how-card h2 { font-size: 16px; margin-bottom: 20px; }
  .how-list { gap: 20px; }
  .how-list p { font-size: 12px; }
  .quiet-card { display: none; }
  .home-recent { grid-row: 2; }
  .section-heading { margin-top: 28px; }
  .section-heading h2 { font-size: 16px; }
  .text-link { font-size: 11px; }
  .conversation-row { padding: 19px 16px; gap: 11px; }
  .conversation-row .avatar { width: 39px; height: 39px; border-radius: 11px; font-size: 20px; }
  .conversation-name { font-size: 13px; }
  .conversation-preview { font-size: 12px; }
  .conversation-time { font-size: 10px; }
  .conversation-bottom { margin-top: 7px; }
  .mobile-navigation { display: flex; position: fixed; inset: auto 0 0; padding: 10px 15px calc(10px + env(safe-area-inset-bottom)); background: #fffffffa; backdrop-filter: blur(12px); border-top: 1px solid var(--line); z-index: 30; justify-content: space-around; }
  .mobile-navigation .nav-link { flex-direction: column; padding: 6px 12px 3px; gap: 6px; border-radius: 0; font-size: 11px; min-width: 70px; color: #687460; background: none; }
  .mobile-navigation .nav-link.active { color: var(--green); }
  .mobile-navigation .nav-link svg { width: 21px; height: 21px; }
  .mobile-navigation .nav-badge { position: absolute; margin: 0; top: 0; right: 19px; min-width: 15px; height: 15px; font-size: 10px; border: 2px solid white; border-radius: 6px; }
  .preview-note { margin-top: 22px; font-size: 10px; }
  .inbox-toolbar { flex-direction: column; align-items: stretch; gap: 17px; margin-bottom: 19px; }
  .search-field { width: 100%; min-height: 45px; }
  .search-field input { font-size: 14px; }
  .filter-tabs { width: fit-content; }
  .filter-button { font-size: 12px; padding: 8px 13px; }
  .inbox-list .conversation-row { padding: 22px 16px; }
  .inbox-list .conversation-name { font-size: 14px; }
  .inbox-list .avatar { width: 41px; height: 41px; }
  .inbox-list .conversation-preview { font-size: 12px; }
  .settings-layout { display: block; }
  .settings-card { margin-bottom: 20px; }
  .settings-section-heading { padding: 22px 21px 18px; }
  .profile-form { padding: 0 21px 22px; }
  .text-input { font-size: 16px; }
  .toggle-row { padding: 19px 21px; }
  .toggle-label { font-size: 14px; }
  .toggle-description { font-size: 12px; max-width: 205px; }
  .toggle { width: 37px; height: 23px; padding: 3px; }
  .toggle::before { width: 17px; height: 17px; }
  .toggle[aria-checked='true']::before { transform: translateX(14px); }
  .settings-info { padding: 24px; }
  .reset-row { padding: 12px 21px 24px; }
  .is-chat .mobile-header, .is-chat .mobile-navigation { display: none; }
  .is-chat main { padding: 0; height: 100dvh; max-width: none; }
  .chat-panel { border: 0; border-radius: 0; }
  .chat-header { padding: calc(16px + env(safe-area-inset-top)) 17px 15px; gap: 10px; }
  .chat-back { margin-left: -5px; width: 24px; }
  .chat-header .avatar { width: 36px; height: 36px; border-radius: 10px; }
  .chat-business-name { font-size: 15px; }
  .chat-business-detail { font-size: 11px; }
  .chat-header-actions { gap: 1px; }
  .chat-header-actions .icon-button { width: 29px; }
  .chat-demo-strip { font-size: 10px; padding: 10px 12px; }
  .thread { padding: 22px 17px; }
  .message-body { padding: 14px 14px 9px; max-width: 100%; }
  .message-title { font-size: 14px; }
  .message-text { font-size: 14px; line-height: 1.8; }
  .message.incoming { margin-right: 14px; }
  .message.outgoing { margin-left: 40px; }
  .message .avatar { display: none; }
  .message-meta { font-size: 10px; }
  .composer-wrap { padding: 14px 16px calc(10px + env(safe-area-inset-bottom)); }
  .composer textarea { font-size: 16px; padding: 10px 12px; min-height: 44px; }
  .send-button { height: 44px; width: 44px; }
  .composer-help { font-size: 10px; }
  .desktop-hint { display: none; }
  .toast { left: 50%; bottom: calc(88px + env(safe-area-inset-bottom)); font-size: 13px; }
  .is-chat .toast { bottom: calc(125px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* Business verification is a visibly labeled local demo, not an identity claim. */
.verification-outline { display: inline-flex; align-items: center; margin-left: 7px; padding: 2px 7px; border: 1.5px solid #2563eb; color: #1d4ed8; border-radius: 7px; font-size: 10px; font-weight: 700; line-height: 1.5; vertical-align: middle; white-space: nowrap; }
.verification-plan { padding: 4px 24px 24px; display: flex; align-items: flex-start; flex-direction: column; gap: 12px; }
.verification-plan p { margin: 6px 0 0; color: #647064; font-size: 13px; line-height: 1.6; }
.verification-plan .field-help { font-size: 11px; }
@media (max-width: 640px) { .verification-plan { padding: 4px 21px 22px; } .verification-outline { font-size: 9px; } }

/* Business-only chrome; personal navigation and other companies stay neutral. */
.business-theme-active .nav-link.active { color: var(--business-accent); background: var(--business-tint); }
.business-theme-active .button:not(.secondary):not(.danger) { background: var(--business-accent); }
.business-theme-active .business-mark { background: var(--business-tint); color: var(--business-accent); }
.theme-settings { padding: 2px 24px 24px; }
.theme-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.theme-option { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 11px; border-radius: 11px; border: 1px solid var(--line); background: white; color: var(--ink); text-align: left; font: inherit; cursor: pointer; }
.theme-option.selected { border-color: var(--business-accent); background: var(--business-tint); }
.theme-option svg { width: 15px; margin-left: auto; color: var(--business-accent); }
.theme-swatch { display: inline-block; width: 23px; height: 23px; border-radius: 8px; flex: 0 0 auto; }
.theme-preview { margin: 17px 0 12px; padding: 17px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.theme-preview strong { color: var(--chat-accent); }
.theme-preview-bubble { margin: 12px 0 8px auto; width: fit-content; max-width: 90%; padding: 13px 14px; border-radius: 12px 12px 4px 12px; background: var(--chat-tint); color: var(--chat-ink); }
.theme-preview small { color: var(--muted); }
@media (max-width: 640px) { .theme-settings { padding: 2px 21px 22px; } .theme-options { grid-template-columns: 1fr; } }

.chat-panel { background: var(--chat-background, white); color: var(--chat-foreground, var(--ink)); }
.chat-panel .chat-header, .chat-panel .composer-wrap { background: var(--chat-background, white); color: var(--chat-foreground, var(--ink)); }
.chat-panel .chat-business-name, .chat-panel .chat-business-detail, .chat-panel .message-text { color: inherit; }
.chat-panel .thread { background: var(--chat-background, white); }
.theme-preview { background: var(--chat-background, white); color: var(--chat-foreground, var(--ink)); }
.theme-preview strong { color: var(--chat-foreground, var(--ink)); }
.theme-custom-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.theme-color-field { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; }
.theme-color-field input { width: 44px; height: 36px; border: 1px solid var(--line); border-radius: 6px; background: transparent; cursor: pointer; }
.theme-custom-fields .button { width: fit-content; }
@media (max-width: 640px) { .theme-custom-fields { grid-template-columns: 1fr; } }

/* Consistent contrast and an actual themed chat preview. */
.theme-option.selected { background: var(--business-tint); color: #192d21; }
.business-theme-active .theme-option.selected { color: #192d21; }
.theme-option.selected:focus-visible, .theme-color-field input:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }
.theme-preview { background: var(--chat-background) !important; color: var(--chat-foreground) !important; }
.theme-preview strong { color: var(--chat-foreground) !important; }
.theme-preview small { color: var(--chat-foreground); opacity: .8; }
.theme-preview-bubble { background: var(--chat-tint); color: var(--chat-ink); }
.chat-panel .chat-demo-strip, .chat-panel .chat-business-detail, .chat-panel .composer-help { color: var(--chat-foreground); opacity: .8; }


/* All business surfaces share one palette. Customer pages are untouched. */
body.business-theme-active {
  --white: color-mix(in srgb, var(--business-background) 92%, var(--business-foreground) 8%);
  --canvas: var(--business-background);
  --ink: var(--business-foreground);
  --muted: color-mix(in srgb, var(--business-foreground) 78%, var(--business-background) 22%);
  --green: var(--business-accent);
  --green-light: var(--business-tint);
  --line: color-mix(in srgb, var(--business-foreground) 20%, var(--business-background) 80%);
  --business-card: var(--white);
  --business-control: color-mix(in srgb, var(--business-background) 94%, var(--business-foreground) 6%);
  --business-hover: color-mix(in srgb, var(--business-background) 83%, var(--business-foreground) 17%);
  --business-button-text: var(--business-background);
  background: var(--canvas);
  color: var(--ink);
}
.business-theme-active .sidebar,
.business-theme-active .mobile-header,
.business-theme-active .mobile-navigation,
.business-theme-active .card,
.business-theme-active .app-dialog,
.business-theme-active .conversation-row,
.business-theme-active .inbox-list,
.business-theme-active .composer,
.business-theme-active .settings-card,
.business-theme-active .theme-preview {
  background-color: var(--business-card);
  color: var(--ink);
  border-color: var(--line);
}
.business-theme-active .sidebar-label,
.business-theme-active .free-note,
.business-theme-active .page-subtitle,
.business-theme-active .eyebrow,
.business-theme-active .field-help,
.business-theme-active .settings-section-heading p,
.business-theme-active .settings-info p,
.business-theme-active .card-label,
.business-theme-active .device-note,
.business-theme-active .conversation-preview,
.business-theme-active .conversation-time,
.business-theme-active .toggle-description,
.business-theme-active .preview-note,
.business-theme-active .theme-preview small,
.business-theme-active .dialog-note {
  color: var(--muted);
}
.business-theme-active .nav-link,
.business-theme-active .profile-link,
.business-theme-active .mode-switch,
.business-theme-active .brand,
.business-theme-active .text-link,
.business-theme-active .plain-button,
.business-theme-active .settings-info,
.business-theme-active .conversation-name {
  color: var(--ink);
}
.business-theme-active .nav-link:hover,
.business-theme-active .conversation-row:hover,
.business-theme-active .account-choice:hover {
  background: var(--business-hover);
}
.business-theme-active .nav-link.active {
  background: var(--business-tint);
  color: var(--business-ink);
}
.business-theme-active .icon-button,
.business-theme-active .text-input,
.business-theme-active .search-field,
.business-theme-active input,
.business-theme-active textarea,
.business-theme-active .theme-option,
.business-theme-active .filter-button,
.business-theme-active .button.secondary {
  background: var(--business-control);
  color: var(--ink);
  border-color: var(--line);
}
.business-theme-active input::placeholder,
.business-theme-active textarea::placeholder { color: var(--muted); }
.business-theme-active .button:not(.secondary):not(.danger),
.business-theme-active .nav-badge,
.business-theme-active .send-button {
  background: var(--business-accent);
  color: var(--business-button-text);
}
.business-theme-active .button.secondary:hover,
.business-theme-active .icon-button:hover,
.business-theme-active .theme-option:hover {
  background: var(--business-hover);
  color: var(--ink);
}
.business-theme-active .how-card,
.business-theme-active .business-mark,
.business-theme-active .account-choice.selected {
  background: var(--business-tint);
  color: var(--business-ink);
  border-color: var(--line);
}
.business-theme-active .preview-pill,
.business-theme-active .sample-label,
.business-theme-active .chat-demo-strip {
  background: var(--business-control);
  color: var(--muted);
  border-color: var(--line);
}
.business-theme-active .theme-option.selected {
  background: var(--business-tint) !important;
  color: var(--business-ink) !important;
  border-color: var(--business-accent) !important;
}
.business-theme-active .theme-option.selected svg { color: var(--business-ink); }
.business-theme-active .theme-preview {
  background: var(--chat-background) !important;
  color: var(--chat-foreground) !important;
}
.business-theme-active .theme-preview strong { color: var(--chat-foreground) !important; }
.business-theme-active .theme-preview-bubble {
  background: var(--chat-tint);
  color: var(--chat-ink);
}
.business-theme-active .theme-custom-fields,
.business-theme-active .theme-color-field { color: var(--ink); }
.business-theme-active .chat-panel {
  background: var(--chat-background) !important;
  color: var(--chat-foreground);
}
.business-theme-active .chat-header,
.business-theme-active .composer-wrap,
.business-theme-active .thread { background: var(--chat-background); }
@media (max-width: 760px) {
  .business-theme-active .mobile-navigation { background: var(--business-card); }
  .business-theme-active .mobile-navigation .nav-link.active { color: var(--business-ink); background: var(--business-tint); }
}

.company-chat-link { color: inherit; text-decoration: underline; text-decoration-color: var(--chat-accent); text-underline-offset: 4px; }
.company-profile { --chat-background: var(--white); --chat-foreground: var(--ink); display:grid;gap:22px;max-width:900px;color:var(--chat-foreground); }
.company-profile-hero { background:var(--chat-background);border:1px solid var(--line);border-radius:19px;padding:28px;display:flex;align-items:center;gap:20px; }
.company-profile-hero h1 { margin:0 0 10px; } .company-profile-hero p { margin:0;line-height:1.65; }
.company-logo { width:86px;height:86px;object-fit:contain;border-radius:18px; background:white;flex-shrink:0; }
.company-logo-fallback { width:86px;height:86px;font-size:32px; }
.company-profile-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px; }
.company-profile-section {padding:24px;overflow-wrap:anywhere;background:var(--chat-background);color:var(--chat-foreground);}
.company-profile-section h2{margin:0 0 17px;font-size:18px}
.company-hour{display:flex;justify-content:space-between;gap:10px;border-bottom:1px solid var(--line);padding:8px 0;font-size:13px;}
.company-actions{display:flex;flex-wrap:wrap;gap:9px;margin-top:15px;}
.company-edit-form{display:grid;gap:11px;}
.company-edit-form h3{font-size:15px;margin:15px 0 0;}
.company-edit-form .text-input{width:100%;}
.company-action-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px;}
.company-hour-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px;}
@media(max-width:760px){.company-profile-grid,.company-action-fields,.company-hour-fields{grid-template-columns:1fr}.company-profile-hero{padding:19px;align-items:flex-start;}.company-logo,.company-logo-fallback{width:60px;height:60px;}}

/* In the customer's linked company conversation, brand the whole chat workspace,
   but restore the normal personal UI outside that conversation. */
body.customer-company-chat-theme .chat-panel,
body.customer-company-chat-theme .chat-header,
body.customer-company-chat-theme .thread,
body.customer-company-chat-theme .composer-wrap { background: var(--chat-background); color: var(--chat-foreground); }
body.customer-company-chat-theme .message.incoming .message-body { background: var(--business-control); color: var(--business-foreground); border-color: var(--line); }
body.customer-company-chat-theme .message.outgoing .message-body { background: var(--business-tint); color: var(--business-ink); border-color: var(--line); }
body.customer-company-chat-theme .chat-demo-strip { background: var(--business-control); color: var(--business-foreground); border-color: var(--line); }
body.customer-company-chat-theme .chat-panel .chat-business-name,
body.customer-company-chat-theme .chat-panel .chat-business-detail { color: var(--chat-foreground); }

/* Compact, grouped business profile editor */
.company-profile-form { padding: 4px 24px 24px; display: grid; gap: 14px; }
.company-editor-panel { min-width: 0; padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
.company-editor-panel h3 { margin: 0; font-size: 16px; }
.company-editor-panel p { margin: 6px 0 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.company-editor-panel summary { font-size: 16px; font-weight: 650; cursor: pointer; }
.company-editor-panel summary span { display: block; margin-top: 4px; font-size: 12px; font-weight: 400; color: var(--muted); }
.company-panel-fields { display: grid; gap: 8px; margin-top: 15px; }
.company-panel-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; }
.company-panel-heading .button { flex-shrink:0; }
.action-editors { margin-top: 16px; display:grid; gap:10px; }
.action-editor { padding: 14px; border-radius: 12px; background: var(--canvas); border: 1px solid var(--line); }
.action-editor-top { display:flex;align-items:center;gap:9px;margin-bottom:12px; }
.action-editor-top strong { font-size: 13px; }
.action-editor-top [data-action="remove-profile-action"] { margin-left:auto; }
.action-icon { display:grid; place-items:center; width:30px; height:30px; border-radius:9px; background:var(--green-light); color:var(--green); }
.action-editor-fields { display:grid; grid-template-columns:1fr 1fr; gap:9px 12px; }
.action-editor-fields .text-input { min-width:0; width:100%; }
.action-empty { padding: 12px 0; }
.company-form-footer { padding-top: 4px; }
.company-action-buttons .company-action-button { background: var(--chat-accent); color: var(--chat-background); }
@media(max-width:760px) { .company-profile-form { padding:4px 18px 20px; } .company-panel-heading { flex-direction:column; } .action-editor-fields { grid-template-columns:1fr; } }


/* Functional business settings sidebar */
.business-settings-tools { display: grid; align-content: start; gap: 18px; min-width: 0; }
.business-settings-panel { display:flex; flex-direction:column; align-items:stretch; gap:12px; padding:25px; }
.business-settings-panel h2 { margin:0; font-size:18px; line-height:1.35; }
.business-settings-panel p { margin:0 0 7px; font-size:13px; line-height:1.65; color:var(--muted); }
.business-settings-panel > .button { align-self:flex-start; }
.business-settings-link { display:flex; align-items:center; gap:10px; padding:12px 10px; border:1px solid var(--line); border-radius:10px; text-decoration:none; font-size:13px; font-weight:600; color:var(--ink); }
.business-settings-link:hover { background:var(--green-light); color:var(--ink); }
.business-settings-link svg { flex-shrink:0; width:17px; height:17px; color:var(--green); }
.business-settings-link span { margin-left:auto; font-size:11px; color:var(--muted); font-weight:500; }
#public-company-profile-settings, #company-theme-settings, #company-action-settings { scroll-margin-top:24px; }
@media(max-width:760px) { .business-settings-tools { grid-template-columns:1fr; } .business-settings-panel {padding:20px;} }

/* Company owner edits the same page visitors see; private controls are absent for visitors. */
.company-profile-toolbar { display:flex;align-items:center;justify-content:space-between;gap:16px; }
.company-profile-edit { min-width:0; }
.company-profile-edit > .settings-card { overflow:hidden; }
.company-profile-edit .company-profile-form { color:var(--ink); }
.company-profile-edit .company-editor-panel { background:var(--white); }
@media(max-width:640px){.company-profile-toolbar { flex-wrap:wrap; }}

.company-brand-editor{display:grid;grid-template-columns:148px minmax(0,1fr);align-items:start;gap:24px;margin-top:22px}
.company-logo-editor{display:flex;flex-direction:column;align-items:center;gap:9px;min-width:0}
.company-logo-tile{position:relative;display:flex;align-items:center;justify-content:center;width:128px;height:128px;overflow:hidden;border:1px solid var(--line);border-radius:20px;background:var(--green-light);color:var(--green);cursor:pointer}
.company-logo-tile:hover{border-color:var(--green)}
.company-logo-tile img{width:100%;height:100%;object-fit:contain;background:var(--white)}
.company-logo-initial{font-size:48px;font-weight:700}
.company-logo-edit{position:absolute;inset:auto 7px 7px;display:flex;align-items:center;justify-content:center;gap:5px;padding:7px;border-radius:9px;background:var(--white);color:var(--ink);font-size:12px;font-weight:650}
.company-logo-edit svg{width:14px;height:14px}
.company-logo-caption{font-size:11px;color:var(--muted);text-align:center}
.company-logo-remove{font-size:12px;cursor:pointer}
.company-description-editor{min-width:0;display:flex;flex-direction:column;gap:10px}
.company-description-editor .text-input{width:100%;min-height:128px;resize:vertical}
.company-description-editor .field-help{margin:0}
@media(max-width:540px){.company-brand-editor{grid-template-columns:1fr;gap:17px}.company-logo-editor{align-items:flex-start}}

/* Uploaded business logo replaces initials in every owned business identity surface. */
.profile-avatar:has(.profile-logo-image), .account-choice-icon:has(.account-logo-image), .business-mark:has(.business-logo-image) { overflow: hidden; padding: 0; }
.profile-logo-image,.account-logo-image,.business-logo-image { display:block; width:100%; height:100%; object-fit:contain; background:var(--white); }
.company-avatar { display:block; object-fit:contain; background:var(--white); border-radius:inherit; }
