:root {
  color-scheme: light;
  --forest: #123d35;
  --forest-2: #194f43;
  --green: #167254;
  --green-soft: #e8f4ee;
  --mint: #bce6d0;
  --paper: #f4f7f5;
  --white: #fff;
  --ink: #16211e;
  --muted: #67746f;
  --line: #e1e8e4;
  --yellow: #f4ce52;
  --danger: #a53a32;
  --shadow: 0 12px 36px rgba(19, 46, 38, .09);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font-size: 14px; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid #6fb59a; outline-offset: 2px; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.sidebar { background: var(--forest); color: #eaf3ee; min-height: 100vh; padding: 26px 16px 16px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; margin: 0 11px 52px; color: inherit; text-decoration: none; }
.brand-mark { width: 34px; height: 34px; background: var(--mint); display: grid; place-items: center; border-radius: 11px; flex: none; }
.brand-mark svg { width: 23px; height: 23px; fill: var(--forest); }
.brand-name { letter-spacing: -.06em; font-size: 22px; font-weight: 750; }
.brand-period { color: var(--mint); }
.side-caption, .eyebrow { font-size: 10px; font-weight: 750; letter-spacing: .12em; }
.side-caption { color: #97b4a9; margin: 0 12px 12px; }
.nav-list { display: grid; gap: 5px; }
.nav-item { border: 0; display: flex; align-items: center; gap: 12px; border-radius: 8px; padding: 11px 12px; color: #c4d5cd; background: transparent; text-align: left; transition: background-color .15s ease, color .15s ease; }
.nav-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-item.active { background: #24584b; color: #fff; box-shadow: inset 3px 0 0 var(--mint); }
.nav-icon { width: 19px; text-align: center; font-size: 18px; line-height: 1; color: #b5d6c5; }
.nav-count { margin-left: auto; color: var(--forest); background: var(--mint); font-size: 11px; min-width: 19px; height: 19px; display: grid; place-items: center; border-radius: 20px; padding: 0 5px; }
.sidebar-bottom { margin-top: auto; }
.workspace-card { display: flex; align-items: center; gap: 10px; padding: 11px 9px; border-top: 1px solid rgba(255,255,255,.13); }
.workspace-avatar { width: 31px; height: 31px; display: grid; place-items: center; background: #d6ecdf; color: var(--forest); border-radius: 9px; font-weight: 750; }
.workspace-copy { display: grid; gap: 2px; min-width: 0; }
.workspace-copy strong { font-size: 12px; font-weight: 650; }
.workspace-copy small { font-size: 10px; color: #a9c2b7; }
.more { margin-left: auto; color: #a9c2b7; letter-spacing: 1px; }
.logout-button { width: 100%; text-align: left; color: #aac0b6; border: 0; background: transparent; padding: 10px; font-size: 12px; }
.logout-button:hover { color: white; }
.main-area { min-width: 0; padding: 0 34px; }
.topbar { height: 67px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.breadcrumbs { display: flex; gap: 10px; align-items: center; color: #76827d; font-size: 12px; }
.breadcrumbs strong { color: var(--ink); font-weight: 650; }
.crumb-slash { color: #bac4bf; }
.topbar-right { display: flex; align-items: center; gap: 15px; }
.connection-badge, .integration-state { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 650; color: #65726d; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #b1bcb6; flex: none; }
.connection-badge.connected .status-dot, .qr-caption .status-dot { background: #2b9e68; box-shadow: 0 0 0 3px rgba(43,158,104,.12); }
.connection-badge.connected { color: #277750; }
.connection-badge.pending .status-dot { background: #d7a12f; }
.view { display: none; padding: 35px 0 0; max-width: 1480px; margin: 0 auto; }
.view.active { display: block; }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 22px; margin-bottom: 25px; }
.page-heading.compact { margin-bottom: 21px; }
.heading-actions { display: flex; gap: 8px; align-items: center; }
.eyebrow { color: #648076; margin: 0 0 8px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 6px; font-size: clamp(25px, 3vw, 32px); letter-spacing: -.05em; line-height: 1.14; font-weight: 680; }
h2 { margin: 0; letter-spacing: -.025em; font-size: 15px; font-weight: 690; }
.page-subtitle { color: var(--muted); margin: 0; font-size: 13px; }
.button { min-height: 40px; padding: 0 16px; border-radius: 7px; border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 12px; font-weight: 650; font-size: 12px; transition: background-color .15s ease, border-color .15s ease; }
.button-green { background: var(--green); color: white; }
.button-green:hover { background: #105e44; }
.button-dark { background: var(--forest); color: white; }
.button-dark:hover { background: #1b5549; }
.button-light { background: white; color: #33443d; border-color: #dce5e0; }
.button-light:hover { background: #f7faf8; border-color: #c5d5cd; }
.button-yellow { background: var(--yellow); color: #332a09; }
.button-yellow:hover { background: #eac341; }
.button-small { min-height: 34px; padding: 0 12px; font-size: 11px; }
.button-wide { width: 100%; }
.text-button { border: 0; background: transparent; color: var(--green); font-size: 12px; font-weight: 650; padding: 6px 0; }
.text-button:hover { color: #0b543b; text-decoration: underline; }
.connect-banner { display: flex; align-items: center; gap: 15px; padding: 15px 18px; background: var(--forest); color: white; border-radius: 9px; margin-bottom: 19px; }
.banner-icon { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #2f6a58; color: #c7f1d6; font-size: 20px; flex: none; }
.banner-copy { display: grid; gap: 4px; flex: 1; }
.banner-copy strong { font-size: 13px; }
.banner-copy span { color: #c4d7ce; font-size: 11px; }
.button-light#banner-pair { border: 0; background: #e1f1e7; color: #153d31; min-height: 35px; }
.metrics-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 17px; }
.metric { background: white; border: 1px solid var(--line); border-radius: 8px; padding: 15px 17px 14px; min-height: 105px; }
.metric-label { color: #697770; font-size: 11px; font-weight: 570; }
.metric-value { font-size: 27px; font-weight: 650; letter-spacing: -.055em; margin: 7px 0 3px; line-height: 1; }
.metric-status { font-size: 21px; letter-spacing: -.04em; }
.metric-note { color: #87938d; font-size: 10px; }
.metric-unit { font-size: 12px; color: #64746c; font-weight: 500; letter-spacing: 0; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(230px, .9fr); gap: 16px; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: 9px; }
.recent-panel, .setup-panel { padding: 17px 18px; min-width: 0; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 13px; }
.panel-heading p { color: #818c87; font-size: 11px; margin: 5px 0 0; }
.recent-list { display: grid; }
.recent-row { display: grid; grid-template-columns: 35px minmax(0,1fr) auto; align-items: center; gap: 10px; width: 100%; border: 0; border-top: 1px solid #edf1ee; padding: 10px 0; background: transparent; text-align: left; color: inherit; }
.recent-row:hover .recent-name { color: var(--green); }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: #dcefe4; color: #245742; font-weight: 700; font-size: 12px; }
.recent-copy { min-width: 0; display: grid; gap: 4px; }
.recent-name { font-weight: 650; font-size: 12px; }
.recent-preview { color: #75817b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11px; }
.recent-time { color: #89948f; font-size: 10px; }
.empty-row { padding: 20px 10px; text-align: center; color: #85918b; font-size: 12px; }
.setup-list { display: grid; }
.setup-item { display: flex; align-items: center; gap: 10px; border-top: 1px solid #edf1ee; padding: 10px 0; }
.setup-icon { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 7px; background: #eff4f0; color: #65786e; font-size: 12px; flex: none; }
.setup-item.done .setup-icon { background: #e5f4eb; color: #238052; }
.setup-copy { min-width: 0; display: grid; gap: 3px; flex: 1; }
.setup-copy strong { font-size: 11px; font-weight: 620; }
.setup-copy small { color: #87918c; font-size: 10px; }
.setup-link { border: 0; color: var(--green); background: transparent; font-size: 10px; font-weight: 650; padding: 5px; }
.footnote { display: flex; align-items: center; gap: 8px; color: #7f8b85; font-size: 10px; margin: 15px 1px; }
.footnote-mark { width: 15px; height: 15px; display: inline-grid; place-items: center; border: 1px solid #a9b7af; border-radius: 50%; font-size: 10px; }
.footer { display: flex; gap: 12px; align-items: center; color: #89948f; font-size: 10px; border-top: 1px solid var(--line); padding: 15px 0 23px; margin-top: 20px; }
.footer span:first-child { font-weight: 700; color: #5c6d64; }
.footer button { margin-left: auto; color: #677770; font-size: 10px; }

/* Inbox */
.inbox-layout { display: grid; grid-template-columns: minmax(270px, 340px) minmax(0,1fr); height: min(690px, calc(100vh - 205px)); min-height: 440px; overflow: hidden; }
.inbox-list-pane { display: flex; flex-direction: column; border-right: 1px solid var(--line); min-width: 0; }
.inbox-toolbar { padding: 12px; display: flex; gap: 7px; border-bottom: 1px solid var(--line); }
.search-box { display: flex; align-items: center; gap: 7px; background: #f3f6f4; border: 1px solid #edf0ee; border-radius: 6px; padding: 0 9px; min-width: 0; flex: 1; color: #73827a; }
.search-box input { border: 0; outline: 0; background: transparent; min-width: 0; width: 100%; height: 33px; font-size: 11px; }
.filter-button { border: 1px solid #e4ebe6; background: white; border-radius: 6px; color: #66736c; font-size: 10px; padding: 0 9px; white-space: nowrap; }
.filter-button[aria-pressed="true"] { background: var(--green-soft); color: #1b6d4c; border-color: #cce4d5; }
.conversation-list { overflow-y: auto; }
.conversation-row { border: 0; border-bottom: 1px solid #edf1ee; display: flex; gap: 10px; padding: 12px; background: white; text-align: left; width: 100%; color: inherit; }
.conversation-row:hover { background: #f7faf8; }
.conversation-row.selected { background: #edf6f0; box-shadow: inset 3px 0 var(--green); }
.conversation-row .recent-copy { flex: 1; }
.unread-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); margin: 4px 2px; }
.chat-pane { min-width: 0; display: flex; flex-direction: column; background: #fbfcfb; }
.chat-empty { margin: auto; text-align: center; padding: 25px; color: #7f8b85; }
.chat-empty-icon { width: 48px; height: 48px; margin: 0 auto 12px; display: grid; place-items: center; color: #4f7865; background: #e8f3ec; border-radius: 50%; font-size: 22px; }
.chat-empty h2 { color: #33443c; margin-bottom: 6px; }
.chat-empty p { font-size: 12px; margin: 0; }
.chat-header { display: flex; align-items: center; gap: 10px; padding: 11px 15px; border-bottom: 1px solid var(--line); background: white; }
.chat-title { flex: 1; min-width: 0; }
.chat-title strong { font-size: 12px; }
.chat-title small { display: block; color: #7e8983; margin-top: 3px; font-size: 10px; }
.handoff-badge { color: #855716; background: #fff2d0; padding: 5px 7px; border-radius: 5px; font-size: 9px; }
.chat-actions { display: flex; gap: 6px; }
.chat-action { border: 1px solid #e3e9e5; background: white; border-radius: 5px; padding: 6px 8px; font-size: 10px; color: #4c5f55; }
.messages-area { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 17px clamp(12px,4vw,34px); }
.message { max-width: min(78%, 490px); padding: 9px 11px 7px; border-radius: 8px; box-shadow: 0 1px 2px rgba(0,0,0,.035); font-size: 12px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.message.in { background: white; border: 1px solid #e8eeea; align-self: flex-start; border-top-left-radius: 2px; }
.message.out { background: #e1f1e6; align-self: flex-end; border-top-right-radius: 2px; }
.message.system { background: #f7f0d9; align-self: center; color: #75632b; font-size: 10px; }
.message time { display: block; text-align: right; margin-top: 4px; color: #8b9790; font-size: 9px; }
.reply-composer { background: white; border-top: 1px solid var(--line); padding: 10px 13px; display: flex; align-items: end; gap: 8px; }
.reply-composer textarea { resize: none; min-height: 39px; max-height: 120px; border: 1px solid #dfe8e2; border-radius: 6px; padding: 10px; flex: 1; font-size: 12px; }
.reply-composer button { min-height: 39px; }
.composer-note { font-size: 9px; color: #8b9690; padding: 0 14px 9px; background: white; }

/* Flow editor */
.flow-layout { display: grid; grid-template-columns: minmax(0,1fr) 270px; gap: 15px; align-items: start; }
.flow-editor { padding: 18px; }
.flow-editor>.panel-heading { margin-bottom: 18px; }
.field-label, .field>span { display: block; font-size: 11px; color: #56665e; font-weight: 620; margin-bottom: 7px; }
.text-area, .field input, .field select { width: 100%; border: 1px solid #dfe7e2; border-radius: 6px; padding: 10px 11px; color: var(--ink); background: white; line-height: 1.45; resize: vertical; font-size: 12px; }
.text-area:focus, .field input:focus { border-color: #80b398; }
.menus-editor { display: grid; gap: 11px; margin: 15px 0; }
.menu-card { border: 1px solid #e2e9e4; border-radius: 7px; overflow: hidden; }
.menu-card-head { background: #f5f8f6; padding: 11px 12px; display: flex; gap: 8px; align-items: center; }
.menu-card-head strong { flex: 1; font-size: 12px; }
.menu-card-head input { width: 120px; border: 1px solid #e0e7e2; border-radius: 4px; background: white; padding: 6px 7px; font-size: 10px; }
.icon-button { border: 0; background: transparent; color: #8b9690; font-size: 17px; padding: 2px 5px; }
.menu-card-body { padding: 12px; }
.menu-card-body>.text-area { margin-bottom: 12px; }
.option-row { display: grid; grid-template-columns: 46px minmax(110px,1fr) minmax(120px,1.4fr) minmax(135px,1fr) 30px; gap: 7px; align-items: center; margin-top: 8px; }
.option-row input, .option-row select { min-width: 0; width: 100%; border: 1px solid #e0e7e2; border-radius: 5px; padding: 8px 7px; background: white; font-size: 10px; }
.option-key { text-align: center; font-weight: 700; }
.option-remove { border: 0; background: transparent; color: #a2aca6; font-size: 15px; }
.add-option { margin-top: 11px; border: 0; background: transparent; color: var(--green); font-size: 10px; font-weight: 650; padding: 4px; }
.flow-help { padding: 17px; position: sticky; top: 20px; }
.help-mark { width: 31px; height: 31px; display: grid; place-items: center; color: var(--green); background: var(--green-soft); border-radius: 9px; margin-bottom: 12px; font-size: 16px; }
.flow-help h2 { margin-bottom: 8px; }
.flow-help p { color: #738079; font-size: 11px; line-height: 1.65; }
.flow-key { border-top: 1px solid #ecf0ed; padding: 9px 0; display: flex; gap: 9px; align-items: center; font-size: 10px; color: #69766f; }
.key-badge, .key-action { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 5px; background: #f0f5f1; color: #347558; font-weight: 700; }
.flow-help>.text-button { margin-top: 10px; }

/* Integrations and dialogs */
.integration-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; align-items: start; }
.integration-card { padding: 17px; }
.integration-title { display: flex; gap: 10px; align-items: center; margin-bottom: 15px; }
.integration-title>div:nth-child(2) { flex: 1; }
.integration-title h2 { margin-bottom: 4px; }
.integration-title p { color: #818c86; font-size: 10px; margin: 0; }
.integration-icon { width: 37px; height: 37px; border-radius: 10px; display: grid; place-items: center; flex: none; font-weight: 700; }
.ai-icon { background: #e8f4ee; color: #23734f; font-size: 19px; }
.ml-icon { background: #fff2c6; color: #66500b; font-size: 16px; }
.integration-state { white-space: nowrap; background: #f2f5f3; padding: 5px 7px; border-radius: 5px; font-size: 9px; }
.integration-state.ready { color: #23734f; background: #e6f4eb; }
.switch-line { border-block: 1px solid #edf1ee; padding: 11px 0; display: flex; align-items: center; gap: 9px; margin-bottom: 13px; cursor: pointer; }
.switch-line>span:first-child { flex: 1; display: grid; gap: 3px; }
.switch-line strong { font-size: 11px; }
.switch-line small { font-size: 9px; color: #828e87; }
.switch { position: absolute; width: 1px; height: 1px; opacity: 0; }
.switch-visual { width: 34px; height: 19px; border-radius: 12px; background: #cbd4ce; position: relative; transition: background .15s; }
.switch-visual::after { content: ""; width: 15px; height: 15px; background: white; position: absolute; left: 2px; top: 2px; border-radius: 50%; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.18); }
.switch:checked+.switch-visual { background: #29835c; }
.switch:checked+.switch-visual::after { transform: translateX(15px); }
.field { display: block; margin: 11px 0; }
.field>span { display: flex; align-items: baseline; justify-content: space-between; }
.field>span small { font-weight: 450; color: #89948e; font-size: 9px; }
.field input { height: 37px; }
.field .text-area { min-height: 82px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.integration-description { color: #748079; font-size: 11px; line-height: 1.65; margin: -3px 0 15px; }
.redirect-field { padding: 10px; background: #f5f8f6; border: 1px solid #e8eeea; border-radius: 6px; display: grid; gap: 6px; margin: 13px 0; }
.redirect-field span { color: #6d7972; font-size: 9px; }
.redirect-field code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 9px; color: #324a3e; overflow-wrap: anywhere; }
.redirect-field button { justify-self: start; font-size: 10px; }
.integration-actions { display: flex; align-items: center; gap: 9px; margin-top: 13px; flex-wrap: wrap; }
.form-result { font-size: 10px; color: #277750; }
.form-result.error { color: var(--danger); }
.security-note { display: flex; align-items: start; gap: 10px; margin: 14px 2px; color: #76827b; max-width: 740px; }
.security-note>span { font-size: 16px; color: #678b78; }
.security-note p { font-size: 10px; line-height: 1.55; margin: 0; }
.modal-layer { position: fixed; z-index: 20; inset: 0; background: rgba(10, 30, 24, .56); display: grid; place-items: center; padding: 18px; }
.modal-layer[hidden] { display: none; }
.login-card, .qr-card { position: relative; width: min(100%, 410px); background: white; border-radius: 11px; padding: 27px; box-shadow: var(--shadow); }
.login-brand { display: flex; align-items: center; gap: 8px; margin-bottom: 24px; }
.login-brand .brand-mark { background: var(--green-soft); }
.login-brand .brand-mark svg { fill: var(--green); }
.login-brand .brand-name { font-size: 20px; }
.login-brand .brand-period { color: var(--green); }
.login-card h1 { font-size: 23px; }
.login-card>p { color: #6e7b74; font-size: 12px; }
.login-card form { margin: 18px 0 13px; }
.login-card small { color: #859089; font-size: 10px; }
.login-error { min-height: 15px; color: var(--danger); font-size: 10px; margin: 6px 0; }
.qr-card { text-align: center; }
.qr-card .eyebrow { margin: 3px 0 8px; }
.qr-card h2 { font-size: 21px; margin-bottom: 8px; }
.qr-card>p { color: #6c7972; font-size: 12px; line-height: 1.55; margin: 0 auto 15px; max-width: 320px; }
.modal-close { position: absolute; top: 11px; right: 14px; border: 0; background: transparent; color: #718078; font-size: 22px; }
.qr-frame { width: 270px; height: 270px; max-width: 100%; margin: auto; display: grid; place-items: center; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.qr-frame img { width: 250px; height: 250px; max-width: 100%; }
.qr-loading { color: #818d86; font-size: 11px; padding: 25px; }
.qr-caption { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 10px; color: #69766f; margin: 12px 0 8px; }
.qr-card>small { color: #89948e; font-size: 9px; }
.toast-region { position: fixed; z-index: 30; right: 18px; bottom: 18px; display: grid; gap: 7px; }
.toast { background: var(--forest); color: white; padding: 11px 14px; border-radius: 7px; box-shadow: var(--shadow); font-size: 11px; max-width: min(360px, calc(100vw - 36px)); }
.toast.error { background: #8d302b; }

@media (max-width: 1000px) {
  .app-shell { grid-template-columns: 210px minmax(0,1fr); }
  .main-area { padding: 0 23px; }
  .inbox-layout { grid-template-columns: 280px minmax(0,1fr); }
  .option-row { grid-template-columns: 40px minmax(80px,1fr) minmax(100px,1.2fr) minmax(120px,1fr) 25px; }
}
@media (max-width: 760px) {
  .app-shell { display: block; padding-bottom: 63px; }
  .sidebar { position: fixed; z-index: 10; inset: auto 0 0; height: 62px; min-height: 0; padding: 0 7px; display: block; border-top: 1px solid rgba(255,255,255,.15); }
  .brand, .side-caption, .sidebar-bottom { display: none; }
  .nav-list { height: 100%; display: grid; grid-template-columns: repeat(4,1fr); align-items: stretch; gap: 2px; }
  .nav-item { padding: 5px 2px; border-radius: 0; flex-direction: column; gap: 4px; justify-content: center; font-size: 9px; }
  .nav-item.active { box-shadow: inset 0 3px 0 var(--mint); }
  .nav-icon { font-size: 17px; }
  .nav-count { position: absolute; margin: -18px 0 0 23px; min-width: 15px; height: 15px; font-size: 8px; }
  .main-area { padding: 0 15px; }
  .topbar { height: 55px; }
  .topbar-right { gap: 8px; }
  .connection-badge { font-size: 0; }
  .connection-badge .status-dot { width: 9px; height: 9px; }
  .topbar-right .button { font-size: 10px; min-height: 31px; padding: 0 9px; }
  .view { padding-top: 23px; }
  .page-heading { align-items: start; margin-bottom: 17px; }
  .page-heading>.button { align-self: center; font-size: 10px; padding: 0 9px; min-height: 34px; }
  .heading-actions { align-items: stretch; flex-direction: column; gap: 5px; }
  .heading-actions .button { min-height: 31px; padding: 0 8px; font-size: 9px; white-space: nowrap; }
  .page-subtitle { font-size: 11px; line-height: 1.45; }
  .connect-banner { align-items: start; flex-wrap: wrap; padding: 12px; gap: 10px; }
  .banner-icon { width: 30px; height: 30px; }
  .banner-copy { min-width: calc(100% - 47px); }
  .banner-copy span { line-height: 1.5; }
  .connect-banner .button { margin-left: 40px; min-height: 32px; }
  .metrics-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .metric { min-height: 94px; padding: 12px; }
  .metric-value { font-size: 23px; }
  .metric-status { font-size: 17px; }
  .home-grid, .integration-grid, .flow-layout { grid-template-columns: 1fr; }
  .flow-help { position: static; }
  .inbox-layout { height: calc(100vh - 180px); min-height: 400px; display: block; position: relative; }
  .inbox-list-pane { height: 100%; border: 0; }
  .chat-pane { display: none; position: absolute; inset: 0; z-index: 2; }
  .inbox-layout.chat-open .inbox-list-pane { visibility: hidden; }
  .inbox-layout.chat-open .chat-pane { display: flex; }
  .chat-header { padding: 9px; }
  .chat-action { padding: 6px; font-size: 9px; }
  .messages-area { padding: 12px; }
  .message { max-width: 88%; }
  .option-row { grid-template-columns: 38px minmax(75px,1fr) 29px; gap: 6px; }
  .option-row input:nth-child(3), .option-row select { grid-column: 2; }
  .option-remove { grid-column: 3; grid-row: 1; }
  .menu-card-head input { width: 90px; }
  .field-grid { grid-template-columns: 1fr; gap: 0; }
  .footer { padding-bottom: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Conversation view follows ZapFast's native two-pane chat window. */
body[data-view="conversas"] { overflow: hidden; background: #f0f2f5; }
body[data-view="conversas"] .app-shell { display: block; min-height: 100dvh; padding: 0; }
body[data-view="conversas"] .sidebar,
body[data-view="conversas"] .topbar,
body[data-view="conversas"] #view-conversas > .page-heading,
body[data-view="conversas"] .footer { display: none; }
body[data-view="conversas"] .main-area { height: 100dvh; padding: 0; }
body[data-view="conversas"] #view-conversas { display: block; height: 100%; max-width: none; margin: 0; padding: 0; }
body[data-view="conversas"] .inbox-layout { display: grid; grid-template-columns: minmax(340px, 35.55%) minmax(0, 1fr); height: 100%; min-height: 0; overflow: hidden; border: 0; border-radius: 0; background: #fff; }
body[data-view="conversas"] .inbox-list-pane { position: relative; border-right: 1px solid #d8dcdf; background: #fff; }
body[data-view="conversas"] .inbox-list-header { height: 78px; padding: 0 22px; display: flex; align-items: center; gap: 14px; position: relative; }
body[data-view="conversas"] .inbox-list-header h1 { display: flex; align-items: center; gap: 15px; margin: 0 auto 0 0; color: #111b21; font-size: 28px; font-weight: 650; letter-spacing: -.04em; }
body[data-view="conversas"] .inbox-list-header h1::before { content: ""; width: 44px; height: 44px; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #626f45 0 24%, transparent 25%), radial-gradient(ellipse at 50% 100%, #53613d 0 37%, transparent 38%), #c9d89c; }
body[data-view="conversas"] .inbox-header-actions { display: flex; align-items: center; gap: 18px; }
body[data-view="conversas"] .connection-badge { max-width: 22px; overflow: hidden; }
body[data-view="conversas"] .connection-badge .status-dot { width: 10px; height: 10px; }
body[data-view="conversas"] .connection-badge [data-connection-label] { display: none; }
body[data-view="conversas"] .top-action { width: 34px; height: 36px; padding: 5px; display: grid; place-items: center; color: #54656f; border: 0; background: transparent; border-radius: 5px; }
body[data-view="conversas"] .top-action:hover { background: #f0f2f5; }
body[data-view="conversas"] .top-action svg, body[data-view="conversas"] .search-box svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
body[data-view="conversas"] .app-menu { position: absolute; z-index: 8; right: 14px; top: 62px; width: 220px; padding: 6px; border: 1px solid #dfe3e5; border-radius: 6px; background: white; box-shadow: 0 3px 12px #0b141a24; }
body[data-view="conversas"] .app-menu button { width: 100%; display: block; padding: 10px 11px; color: #23313a; border: 0; border-radius: 4px; text-align: left; background: transparent; }
body[data-view="conversas"] .app-menu button:hover { background: #f0f2f5; }
body[data-view="conversas"] .inbox-toolbar { height: 52px; margin: 0 18px; padding: 0; border: 0; gap: 0; }
body[data-view="conversas"] .search-box { padding: 0 13px; gap: 12px; background: #f0f2f5; border: 0; border-radius: 28px; }
body[data-view="conversas"] .search-box svg { width: 22px; height: 22px; color: #54656f; }
body[data-view="conversas"] .search-box input { height: 44px; font-size: 14px; color: #111b21; }
body[data-view="conversas"] .search-box input::placeholder { color: #54656f; }
body[data-view="conversas"] .filter-button { display: none; }
body[data-view="conversas"] .chat-filters { display: flex; gap: 7px; overflow-x: auto; padding: 12px 18px 14px; border-bottom: 1px solid #e9edef; }
body[data-view="conversas"] .filter-chip { flex: none; min-height: 38px; padding: 0 14px; border: 1px solid #d6dadd; border-radius: 22px; color: #54656f; background: #fff; font-size: 14px; }
body[data-view="conversas"] .filter-chip.active { border-color: transparent; color: #008069; background: #d9fdd3; }
body[data-view="conversas"] .conversation-list { flex: 1; }
body[data-view="conversas"] .conversation-row { min-height: 87px; align-items: center; gap: 16px; padding: 12px 16px; border: 0; background: #fff; }
body[data-view="conversas"] .conversation-row:hover { background: #f5f6f6; }
body[data-view="conversas"] .conversation-row.selected { background: #f0f2f5; box-shadow: inset 4px 0 #008069; }
body[data-view="conversas"] .conversation-row .avatar { width: 58px; height: 58px; flex: none; border-radius: 50%; font-size: 17px; color: #fff; background: #8b63a5; }
body[data-view="conversas"] .avatar-placeholder { display: grid; place-items: center; color: #53613d; background: #c9d89c; }
body[data-view="conversas"] .avatar-placeholder svg { width: 66%; height: 66%; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
body[data-view="conversas"] .conversation-row .recent-name { color: #111b21; font-size: 17px; font-weight: 600; }
body[data-view="conversas"] .conversation-row .recent-preview { max-width: 30ch; margin-top: 5px; color: #667781; font-size: 14px; }
body[data-view="conversas"] .conversation-row .recent-time { margin-left: auto; color: #667781; font-size: 12px; }
body[data-view="conversas"] .chat-pane { position: relative; background-color: #efeae2; }
body[data-view="conversas"] .chat-pane::before { content: ""; position: absolute; inset: 78px 0 0; z-index: 0; pointer-events: none; background: url("/chat-wallpaper.svg") repeat; background-size: 420px auto; opacity: .075; }
body[data-view="conversas"] .chat-pane > * { position: relative; z-index: 1; }
body[data-view="conversas"] .chat-empty { color: #54656f; }
body[data-view="conversas"] .chat-empty-icon { display: none; }
body[data-view="conversas"] .chat-empty h2 { color: #41525b; font-size: 24px; }
body[data-view="conversas"] .chat-header { height: 78px; flex: none; gap: 14px; padding: 0 22px; border: 0; background: #fff; }
body[data-view="conversas"] .chat-header .avatar { width: 48px; height: 48px; border-radius: 50%; font-size: 15px; }
body[data-view="conversas"] .chat-title strong { color: #111b21; font-size: 19px; font-weight: 600; }
body[data-view="conversas"] .chat-title small { display: none; }
body[data-view="conversas"] .handoff-badge { color: #7e5c13; background: #fff1c7; font-size: 11px; }
body[data-view="conversas"] .chat-actions { gap: 8px; }
body[data-view="conversas"] .chat-action { min-height: 38px; padding: 0 12px; color: #54656f; border: 0; border-radius: 5px; font-size: 12px; }
body[data-view="conversas"] .messages-area { gap: 8px; padding: 28px clamp(22px, 5vw, 64px); }
body[data-view="conversas"] .message { max-width: min(78%, 620px); padding: 10px 12px 7px; color: #111b21; border: 0; border-radius: 8px; box-shadow: 0 1px 1px #0b141a24; font-size: 15px; line-height: 1.45; }
body[data-view="conversas"] .message.in { background: #fff; border-top-left-radius: 0; }
body[data-view="conversas"] .message.out { background: #d9fdd3; border-top-right-radius: 0; }
body[data-view="conversas"] .message.system { background: #fff4c8; color: #5c4f2d; border-radius: 7px; font-size: 12px; }
body[data-view="conversas"] .message time { color: #667781; font-size: 11px; }
body[data-view="conversas"] .reply-composer { min-height: 64px; align-items: center; gap: 12px; margin: 0 18px 9px; padding: 5px 16px; border: 1px solid #008069; border-radius: 34px; background: #f0f2f5; }
body[data-view="conversas"] .reply-composer textarea { min-height: 42px; max-height: 100px; padding: 10px 4px; color: #111b21; border: 0; border-radius: 0; background: transparent; font-size: 15px; }
body[data-view="conversas"] .reply-composer button { min-height: 40px; border-radius: 22px; }
body[data-view="conversas"] .composer-note { display: none; }
body[data-view="conversas"] .chat-icon-action { width: 42px; height: 42px; padding: 9px; display: grid; place-items: center; }
body[data-view="conversas"] .chat-icon-action svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

@media (prefers-color-scheme: dark) {
  body[data-view="conversas"] { background: #0b141a; }
  body[data-view="conversas"] .inbox-layout,
  body[data-view="conversas"] .inbox-list-pane,
  body[data-view="conversas"] .conversation-row,
  body[data-view="conversas"] .chat-header { background: #111b21; }
  body[data-view="conversas"] .inbox-list-pane { border-color: #26333a; }
  body[data-view="conversas"] .inbox-list-header h1,
  body[data-view="conversas"] .conversation-row .recent-name,
  body[data-view="conversas"] .chat-title strong { color: #e9edef; }
  body[data-view="conversas"] .search-box,
  body[data-view="conversas"] .top-action:hover { background: #202c33; }
  body[data-view="conversas"] .filter-chip { color: #c5cdd1; border-color: #43515a; background: #111b21; }
  body[data-view="conversas"] .filter-chip.active { color: #d7fff5; border-color: transparent; background: #005c4b; }
  body[data-view="conversas"] .conversation-row:hover,
  body[data-view="conversas"] .conversation-row.selected { background: #202c33; }
  body[data-view="conversas"] .conversation-row .recent-preview,
  body[data-view="conversas"] .conversation-row .recent-time,
  body[data-view="conversas"] .top-action,
  body[data-view="conversas"] .search-box input { color: #aebac1; }
  body[data-view="conversas"] .avatar-placeholder { color: #c5d69a; background: #374331; }
  body[data-view="conversas"] .chat-pane { background-color: #0b141a; }
  body[data-view="conversas"] .chat-pane::before { opacity: .045; filter: invert(1); }
  body[data-view="conversas"] .chat-empty h2 { color: #c5cdd1; }
  body[data-view="conversas"] .chat-header .chat-action { color: #c5cdd1; background: #202c33; }
  body[data-view="conversas"] .message { color: #e9edef; }
  body[data-view="conversas"] .message.in { background: #202c33; }
  body[data-view="conversas"] .message.out { background: #005c4b; }
  body[data-view="conversas"] .message.system { background: #403c31; color: #f2deb0; }
  body[data-view="conversas"] .reply-composer { border-color: #00a884; background: #202c33; }
  body[data-view="conversas"] .reply-composer textarea { color: #e9edef; }
  body[data-view="conversas"] .composer-note { color: #aebac1; }
  body[data-view="conversas"] .app-menu { border-color: #35434a; background: #202c33; }
  body[data-view="conversas"] .app-menu button { color: #e9edef; }
  body[data-view="conversas"] .app-menu button:hover { background: #35434a; }
}

@media (max-width: 760px) {
  body[data-view="conversas"] .inbox-layout { display: block; }
  body[data-view="conversas"] .inbox-list-pane { height: 100%; border: 0; }
  body[data-view="conversas"] .chat-pane { display: none; position: absolute; inset: 0; z-index: 5; }
  body[data-view="conversas"] .inbox-layout.chat-open .inbox-list-pane { visibility: hidden; }
  body[data-view="conversas"] .inbox-layout.chat-open .chat-pane { display: flex; }
  body[data-view="conversas"] .inbox-list-header { height: 64px; padding: 0 16px; }
  body[data-view="conversas"] .inbox-list-header h1 { font-size: 23px; }
  body[data-view="conversas"] .inbox-list-header h1::before { width: 38px; height: 38px; }
  body[data-view="conversas"] .inbox-header-actions { gap: 8px; }
  body[data-view="conversas"] .inbox-header-actions .connection-badge { display: none; }
  body[data-view="conversas"] .conversation-row { min-height: 76px; padding: 9px 13px; }
  body[data-view="conversas"] .conversation-row .avatar { width: 51px; height: 51px; }
  body[data-view="conversas"] .chat-header { height: 64px; padding: 0 10px; }
  body[data-view="conversas"] .mobile-back { display: block; font-size: 25px; }
  body[data-view="conversas"] .messages-area { padding: 16px 10px; }
  body[data-view="conversas"] .message { max-width: 88%; font-size: 14px; }
  body[data-view="conversas"] .reply-composer { margin: 0 8px 8px; }
  body[data-view="conversas"] .composer-note { display: none; }
}
