@font-face {
  font-family: "Outfit Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fonts/outfit-variable.woff2") format("woff2-variations");
}
@font-face {
  font-family: "Plus Jakarta Sans Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("/fonts/plus-jakarta-sans-variable.woff2") format("woff2-variations");
}

:root {
  --font-display: "Outfit Variable", "Segoe UI", system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans Variable", "Segoe UI", system-ui, sans-serif;
  --ink: #112620;
  --ink-soft: #243c35;
  --paper: #f4f2eb;
  --card: #fbfaf5;
  --line: #dcded4;
  --muted: #68756f;
  --mint: #93efb8;
  --mint-strong: #45cc82;
  --amber: #efb953;
  --coral: #ff816a;
  --blue: #589cdf;
  --shadow: 0 22px 60px rgba(14, 35, 29, .09);
  --radius-lg: 28px;
  --radius-md: 19px;
}

/* Leads uses the same colors as the existing dashboard, with readable text. */
#leads.section-block { padding: 24px 26px; overflow: auto; height: calc(100dvh - 88px); }
.leads-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.leads-heading h2 { margin: 4px 0; font-size: 30px; }
.leads-heading p { color: var(--muted); }
.leads-notice { padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: #f0f1e8; font-size: 13px; line-height: 1.6; }
.leads-filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin: 20px 0 10px; }
.leads-filters label { display: grid; gap: 6px; font-size: 12px; font-weight: 650; flex: 1; min-width: 150px; }
.leads-filters label:first-child { flex: 2; }
.leads-filters input, .leads-filters select { width: 100%; min-height: 42px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--card); }
.leads-button { padding: 10px 14px; min-height: 42px; border-radius: 10px; border: 1px solid #446b5b; color: var(--ink); background: var(--card); cursor: pointer; font: inherit; font-size: 13px; }
.leads-button:hover:not(:disabled) { background: var(--mint); }
.leads-button:disabled { opacity: .45; cursor: default; }
#leads-feedback { color: var(--muted); font-size: 12px; min-height: 20px; }
.leads-layout { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.1fr); gap: 20px; align-items: start; }
.leads-list-panel, .leads-detail { min-width: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--card); overflow: hidden; }
.lead-row { display: block; width: 100%; padding: 18px; text-align: left; background: transparent; border: 0; border-bottom: 1px solid var(--line); color: var(--ink); cursor: pointer; }
.lead-row:hover { background: #edf5ec; }
.lead-row[aria-pressed=true] { background: #e1f5e7; }
.lead-row-heading { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.lead-row-heading strong { font-size: 15px; overflow-wrap: anywhere; }
.lead-row small, .lead-property { display: block; margin-top: 9px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.lead-property { color: var(--ink-soft); font-size: 13px; }
.lead-badge { display: inline-block; padding: 5px 8px; border-radius: 7px; background: #e9eee6; font-size: 11px; line-height: 1.5; }
.lead-badge.attention { background: #ffe8b4; }
.lead-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.leads-pagination { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px; font-size: 11px; }
.leads-detail { padding: 22px; max-height: 70dvh; overflow: auto; overflow-wrap: anywhere; }
.leads-detail h3 { margin: 4px 0; font-size: 25px; }
.leads-detail h4 { margin: 20px 0 6px; }
.lead-facts { display: grid; grid-template-columns: minmax(90px, .8fr) minmax(0, 1fr); gap: 10px 15px; font-size: 12px; line-height: 1.6; }
.lead-facts dt { color: var(--muted); }
.lead-facts dd { margin: 0; white-space: pre-wrap; }
.lead-message { padding: 12px; border-radius: 12px; margin-top: 12px; border: 1px solid var(--line); }
.lead-message.customer { margin-right: 18px; background: #fff; }
.lead-message.operator { margin-left: 18px; background: #eaf5e9; }
.lead-message small { color: var(--muted); font-size: 10px; }
.lead-message p { white-space: pre-wrap; font-size: 13px; line-height: 1.6; margin-bottom: 0; }
.leads-empty { padding: 20px; color: var(--muted); line-height: 1.7; font-size: 14px; }
#leads :focus-visible { outline: 3px solid #247a53; outline-offset: 3px; }
@media (max-width: 1000px) { .leads-layout { grid-template-columns: 1fr; } .leads-detail { max-height: none; } }
@media (max-width: 700px) { #leads.section-block { height: auto; min-height: 75dvh; padding: 18px 14px; } .leads-heading h2 { font-size: 24px; } .leads-detail { padding: 16px; } }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
h1, h2, h3, .button, .integration-action, .nav-item, .status-pill, .progress-number, .indicator-card strong {
  font-family: var(--font-display);
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .022;
  z-index: 20;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.75'/%3E%3C/svg%3E");
}
.is-hidden { display: none !important; }

.session-splash {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  place-content: center;
  align-items: center;
  gap: 0 13px;
  color: white;
  background: var(--ink);
}
.session-splash .brand-mark { grid-row: 1 / 3; }
.session-splash strong, .session-splash small { display: block; }
.session-splash strong { font-size: 16px; }
.session-splash small { margin-top: 4px; color: #9cafa7; font-size: 10px; }
.session-splash i { grid-column: 1 / 3; width: 90px; height: 3px; margin: 23px auto 0; overflow: hidden; border-radius: 10px; background: rgba(255,255,255,.12); }
.session-splash i::after { content: ""; display: block; width: 45%; height: 100%; border-radius: inherit; background: var(--mint); animation: session-progress 1s ease-in-out infinite alternate; }
@keyframes session-progress { from { transform: translateX(0); } to { transform: translateX(125%); } }
body:not(.session-checking) .session-splash { display: none; }
body.session-checking .login-shell,
body.session-checking .onboarding-shell,
body.session-checking .app-shell { visibility: hidden; }

.login-shell {
  min-height: 100vh;
  padding: 32px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 18% 13%, rgba(147, 239, 184, .17), transparent 32%),
    radial-gradient(circle at 84% 86%, rgba(255, 129, 106, .12), transparent 28%),
    var(--ink);
  position: relative;
}
.login-shell::before,
.login-shell::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 50%;
}
.login-shell::before { width: 420px; height: 420px; left: -180px; bottom: -210px; }
.login-shell::after { width: 240px; height: 240px; right: -80px; top: -100px; }
.login-brand {
  position: absolute;
  left: 38px;
  top: 30px;
  display: flex;
  align-items: center;
  gap: 11px;
  color: white;
  font-weight: 750;
}
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px 12px 12px 4px;
  display: inline-grid;
  place-items: center;
  color: var(--ink);
  background: var(--mint);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
}
.login-card {
  width: min(100%, 490px);
  padding: 45px;
  border-radius: 30px;
  background: var(--card);
  box-shadow: 0 30px 100px rgba(0,0,0,.28);
  position: relative;
  z-index: 2;
}
.eyebrow, .section-kicker {
  color: #557269;
  font-size: 11px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.eyebrow { display: flex; align-items: center; gap: 9px; }
.eyebrow span { width: 21px; height: 2px; background: var(--coral); }
.login-card h1 {
  margin: 22px 0 15px;
  font: 700 clamp(36px, 6vw, 48px)/1.03 var(--font-display);
  letter-spacing: -.035em;
}
.login-card > p, #login-copy > p { color: var(--muted); line-height: 1.6; margin: 0 0 28px; }
.auth-tabs {
  margin-bottom: 22px;
  padding: 4px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  border-radius: 12px;
  background: #e9e9e2;
}
.auth-tab {
  min-height: 39px;
  border: 0;
  border-radius: 9px;
  color: #77837e;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}
.auth-tab.active { color: var(--ink); background: white; box-shadow: 0 3px 10px rgba(17,38,32,.08); }
.auth-form { animation: auth-in .22s ease-out; }
@keyframes auth-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.link-fields { margin-top: 18px; padding: 15px; border: 1px solid #d8dbd3; border-radius: 14px; background: #f0f0e9; }
.link-fields label:first-of-type { margin-top: 14px; }
.link-callout { display: flex; flex-direction: column; gap: 3px; }
.link-callout strong { color: #31584b; font-size: 11px; }
.link-callout span { color: #77837e; font-size: 10px; }
label { display: block; margin: 18px 0 8px; font-size: 12px; font-weight: 750; }
input, select {
  width: 100%;
  border: 1px solid #cfd5cd;
  color: var(--ink);
  background: #fff;
  border-radius: 12px;
  padding: 14px 15px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus { border-color: var(--mint-strong); box-shadow: 0 0 0 4px rgba(69, 204, 130, .12); }
.password-field { position: relative; }
.password-field input { padding-right: 82px; }
.reveal-button {
  position: absolute;
  right: 8px;
  top: 7px;
  border: 0;
  padding: 8px;
  color: #426057;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
}
.form-error { min-height: 20px; margin: 8px 0 4px !important; color: #b63c31 !important; font-size: 12px; }
.text-button { border: 0; padding: 0; color: #31584b; background: transparent; cursor: pointer; font-weight: 750; }
.auth-secondary-action { display: block; margin: 10px 0 0 auto; font-size: 11px; }
.auth-switch { margin: 18px 0 0; color: var(--muted); text-align: center; font-size: 12px; }
.verification-state { padding-top: 24px; text-align: center; animation: auth-in .22s ease-out; }
.verification-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 20px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  color: var(--ink);
  background: var(--mint);
  font-size: 29px;
  box-shadow: 0 12px 30px rgba(69, 204, 130, .22);
}
.verification-kicker { margin: 0; color: #557269; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.verification-state h1 { margin: 10px 0 12px; }
.verification-state > p:not(.verification-kicker) { margin: 0 0 5px; color: var(--muted); line-height: 1.55; }
.verification-email { display: block; overflow-wrap: anywhere; font-size: 15px; }
.verification-help { margin: 24px 0; padding: 15px; display: flex; gap: 11px; align-items: flex-start; border-radius: 14px; color: #31584b; background: #eaf8ef; text-align: left; }
.verification-help > span { width: 22px; height: 22px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--mint-strong); font-size: 12px; font-weight: 900; }
.verification-help p { margin: 0; font-size: 12px; line-height: 1.5; }
.verification-back { margin-top: 18px; font-size: 12px; }
.auth-state-heading { margin-bottom: 24px; }
.auth-state-heading h1 { margin: 10px 0 12px; }
.auth-state-heading > p:last-child { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.auth-state-icon { width: 42px; height: 42px; margin-bottom: 18px; display: grid; place-items: center; border-radius: 13px; color: var(--ink); background: var(--mint); font-weight: 900; }
.recovery-error-icon { color: #8f493e; background: #f9ddd8; }
.terms-check { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-weight: 500; line-height: 1.45; }
.terms-check input { width: 17px; height: 17px; margin: 2px 0 0; flex: 0 0 auto; }
.terms-check a { color: #31584b; font-weight: 700; }
.button {
  border: 0;
  border-radius: 12px;
  min-height: 48px;
  padding: 0 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  font-weight: 750;
  transition: transform .18s, background .18s, opacity .18s;
}

.onboarding-shell { min-height: 100vh; padding: 28px clamp(20px, 5vw, 70px); background: var(--paper); }
.onboarding-header { display: flex; align-items: center; justify-content: space-between; max-width: 1160px; margin: 0 auto; }
.onboarding-brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.onboarding-layout { max-width: 1040px; margin: 9vh auto 0; display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(36px, 7vw, 90px); align-items: start; }
.onboarding-aside h1 { margin: 18px 0 16px; font: 750 clamp(36px, 5vw, 58px)/1.02 var(--font-display); letter-spacing: -.04em; }
.onboarding-aside > p { color: var(--muted); line-height: 1.6; }
.wizard-progress { height: 7px; margin-top: 34px; overflow: hidden; border-radius: 10px; background: #dfe2da; }
.wizard-progress span { display: block; width: 10%; height: 100%; border-radius: inherit; background: var(--mint-strong); transition: width .3s; }
.wizard-progress-label { margin-top: 9px; font-size: 12px; }
.wizard-card { min-height: 430px; padding: clamp(26px, 5vw, 48px); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--card); box-shadow: var(--shadow); }
.wizard-card h2 { margin: 5px 0 10px; font: 700 clamp(28px, 4vw, 40px)/1.1 var(--font-display); }
.wizard-card .wizard-description { margin: 0 0 28px; color: var(--muted); line-height: 1.55; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.choice-card { min-height: 145px; padding: 20px; border: 1px solid #ccd2ca; border-radius: 16px; background: white; cursor: pointer; text-align: left; }
.choice-card:hover, .choice-card:focus { border-color: var(--mint-strong); box-shadow: 0 0 0 4px rgba(69,204,130,.1); }
.choice-card strong, .choice-card span { display: block; }
.choice-card strong { margin-bottom: 8px; font-size: 17px; }
.choice-card span { color: var(--muted); line-height: 1.45; font-size: 13px; }
.wizard-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.wizard-fields .field-wide { grid-column: 1 / -1; }
.wizard-actions { display: flex; justify-content: flex-end; align-items: center; gap: 15px; margin-top: 28px; }
.plan-card { display: block; padding: 19px; border: 1px solid #ccd2ca; border-radius: 15px; background: white; }
.plan-card input { width: auto; margin-right: 9px; }
.wizard-summary { padding: 18px; border-radius: 15px; background: #eaf8ef; color: #274b3e; line-height: 1.55; }
.team-layout { display: grid; grid-template-columns: minmax(270px,.75fr) minmax(320px,1.25fr); gap: 18px; }
.team-invite-form { display: block; }
.team-invite-form > p { color: var(--muted); font-size: 13px; line-height: 1.5; }
.team-list { margin-top: 15px; }
.team-row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); }
.team-row:first-child { border-top: 0; }
.team-row > span:first-child { flex: 1; min-width: 0; }
.team-row strong, .team-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-row small { margin-top: 4px; color: var(--muted); }
.team-badge { padding: 5px 9px; border-radius: 20px; background: #e8eee9; font-size: 10px; font-weight: 800; }
.team-link-reveal { margin-bottom: 18px; padding: 16px 18px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; border: 1px solid #bfe3ca; border-radius: var(--radius-md); background: #eaf8ef; }
.team-link-reveal-copy { min-width: 0; flex: 1 1 320px; }
.team-link-reveal-copy strong { display: block; color: #274b3e; font-size: 13px; }
.team-link-reveal-copy p { margin-top: 4px; color: #46685b; font-size: 12px; line-height: 1.5; }
.team-link-url { display: block; margin-top: 9px; padding: 9px 11px; overflow-x: auto; white-space: nowrap; border-radius: 10px; background: #fff; border: 1px solid #cfe6d6; color: #1c3a2f; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.team-link-reveal-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.team-member-actions { display: flex; gap: 8px; }
.features-section { padding-top: 22px; }
.feature-list { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--card); box-shadow: 0 12px 35px rgba(14,35,29,.05); }
.feature-list-loading { padding: 28px; color: var(--muted); font-size: 12px; }
.feature-row { min-height: 92px; padding: 20px 22px; display: flex; align-items: center; gap: 16px; border-top: 1px solid var(--line); }
.feature-row:first-child { border-top: 0; }
.feature-symbol { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px; color: #31584b; background: #e6f6e9; font-weight: 900; }
.feature-copy { min-width: 0; flex: 1; }
.feature-copy strong, .feature-copy small { display: block; }
.feature-copy strong { font-size: 13px; }
.feature-copy small { max-width: 650px; margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.feature-title { display: flex; align-items: center; gap: 8px; }
.feature-title > strong { display: block; }
.feature-title em { padding: 3px 7px; border-radius: 20px; color: #0f57a6; background: #e5f1ff; font-size: 8px; font-style: normal; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.feature-row-blocked .feature-symbol { color: #806632; background: #f7ecd6; }
.feature-requirement { max-width: 720px; margin-top: 11px; padding: 10px 11px; display: flex; align-items: center; gap: 12px; border-radius: 10px; }
.feature-requirement > span { min-width: 0; flex: 1; color: #735d31; font-size: 9px; line-height: 1.45; }
.feature-requirement > span strong { margin-bottom: 2px; color: #44320e; font-size: 9px; }
.feature-requirement.blocked { border: 1px solid #ead29e; background: #fff8e8; }
.feature-requirement.ready { color: #285c47; background: #eaf8ef; }
.feature-requirement.ready > span, .feature-requirement.ready > span strong { color: #285c47; }
.feature-requirement button { flex: 0 0 auto; min-height: 32px; padding: 7px 10px; border: 1px solid #21493d; border-radius: 8px; color: #fff; background: #21493d; font: 800 9px/1.2 var(--font-body); cursor: pointer; }
.feature-requirement button:hover { background: #173a30; }
.feature-requirement button:disabled { cursor: wait; opacity: .68; }
.feature-switch { width: 46px; height: 26px; margin: 0; flex: 0 0 auto; position: relative; cursor: pointer; }
.feature-switch input { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.feature-switch > span:last-child { position: absolute; inset: 0; border-radius: 30px; background: #ccd2cd; transition: background .2s; }
.feature-switch > span:last-child::after { content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; border-radius: 50%; background: white; box-shadow: 0 2px 6px rgba(17,38,32,.2); transition: transform .2s; }
.feature-switch input:checked + span { background: var(--mint-strong); }
.feature-switch input:checked + span::after { transform: translateX(20px); }
.feature-switch input:focus-visible + span { box-shadow: 0 0 0 4px rgba(69,204,130,.2); }
.feature-switch input:disabled + span { opacity: .55; cursor: wait; }
.sr-only { width: 1px; height: 1px; padding: 0; margin: -1px; position: absolute; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 760px) {
  .onboarding-layout { margin-top: 45px; grid-template-columns: 1fr; gap: 25px; }
  .onboarding-aside h1 { font-size: 38px; }
  .choice-grid, .wizard-fields { grid-template-columns: 1fr; }
  .wizard-fields .field-wide { grid-column: auto; }
  .wizard-card { min-height: auto; }
  .team-layout { grid-template-columns: 1fr; }
  .feature-row { padding: 17px; }
  .feature-requirement { align-items: stretch; flex-direction: column; }
  .feature-requirement button { width: 100%; }
}
.button:hover:not(:disabled) { transform: translateY(-2px); }
.button:disabled { cursor: not-allowed; opacity: .48; }
.button-primary { color: var(--ink); background: var(--mint); }
.button-primary:hover { background: #a7f5c6; }
.button-wide { width: 100%; }
.button-light { background: #fff; color: var(--ink); }
.privacy-note { margin-top: 20px; display: flex; gap: 9px; align-items: center; color: #7c8883; font-size: 11px; }
.lock-icon { width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid #d1d6cf; border-radius: 50%; }

.app-shell { display: grid; grid-template-columns: 244px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px 18px 20px;
  color: #f8faf6;
  background: var(--ink);
  display: flex;
  flex-direction: column;
  z-index: 10;
}
.sidebar-brand { display: flex; gap: 12px; align-items: center; text-decoration: none; padding: 0 10px; }
.sidebar-brand > span:last-child { display: flex; align-items: baseline; gap: 4px; }
.sidebar-brand strong { font-size: 18px; letter-spacing: -.03em; }
.sidebar-brand small { color: var(--mint); font-size: 10px; font-weight: 900; letter-spacing: .12em; }
.sidebar nav { margin-top: 58px; }
.nav-label { margin: 0 12px 12px; color: #82948d; font-size: 10px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.nav-item {
  display: flex;
  align-items: center;
  min-height: 45px;
  padding: 0 13px;
  margin: 4px 0;
  border-radius: 11px;
  color: #aebdb7;
  text-decoration: none;
  font-size: 13px;
  font-weight: 650;
}
.nav-item:hover, .nav-item.active { color: white; background: rgba(255,255,255,.075); }
.nav-icon { width: 28px; color: var(--mint); font-size: 17px; }
.nav-count { margin-left: auto; min-width: 24px; padding: 3px 7px; border-radius: 30px; color: var(--ink); background: var(--mint); text-align: center; font-size: 10px; }
.sidebar-bottom { margin-top: auto; }
.help-card { padding: 18px; border: 1px solid rgba(255,255,255,.1); border-radius: 16px; background: rgba(255,255,255,.045); }
.help-icon { float: right; width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; color: var(--mint); border: 1px solid rgba(147,239,184,.35); font-weight: 800; }
.help-card strong { font-size: 12px; }
.help-card p { margin: 7px 0 12px; color: #9aaca5; font-size: 10px; line-height: 1.5; }
.help-card a { color: var(--mint); font-size: 10px; font-weight: 750; text-decoration: none; }
.profile { width: 100%; margin-top: 15px; padding: 12px 7px; border: 0; display: flex; gap: 9px; align-items: center; color: white; background: transparent; cursor: pointer; text-align: left; }
.profile > span:nth-child(2) { display: flex; flex-direction: column; flex: 1; overflow: hidden; }
.profile strong { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile small { margin-top: 3px; color: #81938c; font-size: 9px; }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; color: var(--ink); background: #f1bd67; font-size: 10px; font-weight: 900; }

.main-content { min-width: 0; background: var(--paper); }
.topbar {
  min-height: 88px;
  padding: 21px clamp(24px, 4vw, 58px);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: rgba(244,242,235,.86);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 8;
}
.breadcrumb { margin: 0 0 5px; color: #88938e; font-size: 10px; font-weight: 700; }
.breadcrumb span { padding: 0 5px; color: #bdc4c0; }
.topbar h1 { margin: 0; font-size: 17px; letter-spacing: -.02em; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 15px; }
.system-live { padding: 8px 12px; border: 1px solid #d4d8d1; border-radius: 40px; color: #50645e; background: rgba(255,255,255,.5); font-size: 10px; font-weight: 700; }
.system-live i, .status-pill i { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--mint-strong); box-shadow: 0 0 0 3px rgba(69,204,130,.13); }
.icon-button, .menu-button { border: 1px solid #d4d8d1; background: #fff; color: var(--ink); cursor: pointer; }
.icon-button { width: 36px; height: 36px; border-radius: 50%; font-size: 18px; }
.menu-button { display: none; margin-right: 15px; width: 38px; height: 38px; border-radius: 10px; }

.hero-grid { padding: 62px clamp(24px, 4vw, 58px) 48px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); gap: 45px; align-items: end; }
.hero-copy h2 { margin: 18px 0 18px; font: 750 clamp(43px, 5vw, 68px)/.98 var(--font-display); letter-spacing: -.055em; }
.hero-copy h2 em { color: #53766b; font-style: normal; font-weight: 500; }
.hero-copy > p { max-width: 635px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.progress-card { min-height: 205px; padding: 25px; color: white; border-radius: var(--radius-lg); background: var(--ink-soft); box-shadow: var(--shadow); }
.progress-top { display: flex; align-items: center; justify-content: space-between; }
.progress-number { font: 750 38px/1 var(--font-display); }
.progress-top p { margin: 7px 0 0; color: #a7b6b0; font-size: 10px; }
.progress-orbit { width: 63px; height: 63px; border: 6px solid rgba(255,255,255,.11); border-top-color: var(--mint); border-right-color: var(--mint); border-radius: 50%; display: grid; place-items: center; transform: rotate(18deg); }
.progress-orbit span { transform: rotate(-18deg); font-size: 10px; font-weight: 800; }
.progress-track { height: 5px; margin: 24px 0 17px; border-radius: 10px; overflow: hidden; background: rgba(255,255,255,.12); }
.progress-track span { display: block; width: 0; height: 100%; background: var(--mint); border-radius: inherit; transition: width .6s cubic-bezier(.2,.8,.2,1); }
.progress-message { margin: 0; color: #c4d0cb; font-size: 10px; line-height: 1.5; }

.section-block { padding: 5px clamp(24px, 4vw, 58px) 45px; scroll-margin-top: 110px; }
.section-heading { margin-bottom: 19px; display: flex; align-items: end; justify-content: space-between; }
.section-heading h2 { margin: 7px 0 0; font: 700 25px/1.1 var(--font-display); letter-spacing: -.025em; }
.section-heading > p { color: #87918d; font-size: 10px; }
.integration-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.integration-card { min-height: 290px; padding: 21px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--card); transition: transform .2s, box-shadow .2s, border-color .2s; }
.integration-card:hover { transform: translateY(-3px); border-color: #c8cdc4; box-shadow: var(--shadow); }
.card-topline { display: flex; align-items: flex-start; justify-content: space-between; }
.service-icon { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-size: 19px; font-weight: 800; }
.service-icon svg { width: 23px; height: 23px; fill: currentColor; }
.telegram-icon { color: white; background: var(--blue); }
.whatsapp-icon { color: white; background: #25d366; }
.openai-icon { color: var(--ink); background: var(--mint); }
.status-pill { padding: 7px 10px; border-radius: 30px; color: #426258; background: #e6f6e9; font-size: 9px; font-weight: 800; letter-spacing: .02em; }
.status-pill.off { color: #826737; background: #f7ecd6; }
.status-pill.off i { background: var(--amber); box-shadow: 0 0 0 3px rgba(239,185,83,.14); }
.status-pill.error { color: #8f493e; background: #f9e3df; }
.status-pill.error i { background: var(--coral); box-shadow: 0 0 0 3px rgba(255,129,106,.14); }
.card-copy { margin-top: 34px; }
.service-type { margin: 0 0 7px; color: #84918b; font-size: 9px; text-transform: uppercase; font-weight: 800; letter-spacing: .13em; }
.card-copy h3 { margin: 0 0 10px; font: 700 24px/1.1 var(--font-display); }
.card-copy > p:last-child { min-height: 56px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.card-footer { margin-top: auto; padding-top: 15px; border-top: 1px solid #e2e4dd; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-footer > span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #71807a; font-size: 9px; }
.card-footer a, .text-button { flex: none; border: 0; padding: 0; color: #254f42; background: none; text-decoration: none; font-size: 9px; font-weight: 800; cursor: pointer; }

.meta-panel { margin: 10px clamp(24px, 4vw, 58px) 44px; border-radius: var(--radius-lg); display: grid; grid-template-columns: minmax(210px, .7fr) minmax(0, 1.55fr); overflow: hidden; color: white; background: var(--ink); scroll-margin-top: 110px; }
.meta-art { min-height: 470px; position: relative; overflow: hidden; background: radial-gradient(circle at 48% 38%, #31564b 0, #1b3931 34%, #112820 72%); }
.meta-art::after { content: ""; position: absolute; inset: auto 0 0; height: 45%; background: linear-gradient(transparent, rgba(7,22,17,.6)); }
.meta-orbit { position: absolute; left: 50%; top: 45%; border: 1px solid rgba(147,239,184,.28); border-radius: 50%; transform: translate(-50%, -50%) rotate(-20deg); }
.orbit-one { width: 270px; height: 130px; }
.orbit-two { width: 165px; height: 300px; transform: translate(-50%, -50%) rotate(48deg); }
.meta-symbol { position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%); width: 88px; height: 88px; display: grid; place-items: center; border-radius: 25px 25px 25px 8px; color: var(--ink); background: var(--mint); box-shadow: 0 15px 50px rgba(99,235,156,.2); font: 700 51px/1 var(--font-display); z-index: 2; }
.meta-content { padding: clamp(30px, 4vw, 50px); }
.meta-heading { display: flex; align-items: center; justify-content: space-between; }
.meta-heading .section-kicker { color: #86a49a; }
.meta-heading h2 { margin: 8px 0 0; font: 700 36px/1 var(--font-display); }
.status-large { padding: 8px 12px; }
.meta-description { max-width: 650px; margin: 22px 0 27px; color: #aabcb5; font-size: 12px; line-height: 1.7; }
.meta-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mini-step { padding: 12px; border: 1px solid rgba(255,255,255,.1); border-radius: 12px; display: flex; align-items: center; gap: 9px; }
.mini-step > span { width: 25px; height: 25px; display: grid; place-items: center; flex: none; border-radius: 50%; color: #85968f; border: 1px solid #51665e; font-size: 9px; font-weight: 850; }
.mini-step.done > span { color: var(--ink); border-color: var(--mint); background: var(--mint); }
.mini-step p { margin: 0; min-width: 0; }
.mini-step strong, .mini-step small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-step strong { color: #eff5f2; font-size: 9px; }
.mini-step small { margin-top: 3px; color: #768b83; font-size: 8px; }
.meta-actions { margin-top: 25px; display: flex; align-items: center; gap: 16px; }
.meta-actions > span { color: #7f938b; font-size: 9px; }
.meta-alert { margin-top: 20px; padding: 12px 14px; border-left: 3px solid var(--amber); color: #edd8a8; background: rgba(239,185,83,.08); font-size: 10px; line-height: 1.6; }
.asset-selectors { margin-top: 23px; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 9px 15px; }
.asset-selectors label { margin: 0; color: #aebeb8; font-size: 9px; }
.asset-selectors select { padding: 10px 12px; color: #eaf2ee; border-color: #486057; background: #203a32; font-size: 10px; }
.app-footer { margin: 0 clamp(24px, 4vw, 58px); padding: 20px 0 30px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; color: #87918d; font-size: 9px; }
.app-footer p { margin: 0; }
.app-footer p span { color: var(--mint-strong); }
.app-footer a { text-decoration: none; }

.indicator-grid { padding: 0 clamp(24px, 4vw, 58px) 42px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.indicator-card { min-width: 0; padding: 22px; display: grid; grid-template-columns: auto 1fr; gap: 5px 16px; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--card); box-shadow: 0 10px 30px rgba(17,38,32,.04); }
.indicator-icon { grid-row: 1 / 3; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; }
.indicator-icon svg { width: 25px; height: 25px; fill: currentColor; }
.indicator-campaigns .indicator-icon { color: #245744; background: #dff5e7; }
.indicator-leads .indicator-icon { color: #286690; background: #deeffb; }
.indicator-card > div { min-width: 0; display: flex; align-items: baseline; gap: 10px; }
.indicator-card strong { font: 800 34px/1 var(--font-display); }
.indicator-card div span { color: var(--ink-soft); font-size: 12px; font-weight: 800; }
.indicator-card small { color: var(--muted); font-size: 10px; }
.meta-integration-card { grid-column: 1 / -1; min-height: 0; margin: 0; display: grid; grid-template-columns: minmax(170px, .45fr) minmax(0, 1.55fr); padding: 0; border: 0; }
.meta-integration-card:hover { transform: none; border-color: transparent; }
.meta-integration-card .meta-art { min-height: 360px; }
.meta-symbol svg { width: 54px; fill: none; stroke: currentColor; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }

.toast { position: fixed; right: 24px; bottom: 24px; z-index: 50; max-width: 360px; padding: 13px 17px; border-radius: 12px; color: white; background: #1c3930; box-shadow: 0 15px 50px rgba(0,0,0,.22); font-size: 11px; opacity: 0; transform: translateY(15px); pointer-events: none; transition: .2s; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: #7a352d; }

body.telegram-modal-open { overflow: hidden; }
.telegram-setup { position: fixed; inset: 0; z-index: 60; padding: 22px; display: grid; place-items: center; }
.telegram-backdrop { position: absolute; inset: 0; width: 100%; border: 0; background: rgba(7, 22, 17, .72); backdrop-filter: blur(7px); cursor: default; }
.telegram-dialog {
  position: relative;
  width: min(100%, 720px);
  max-height: calc(100vh - 44px);
  overflow-y: auto;
  padding: 32px;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 28px;
  background: var(--card);
  box-shadow: 0 35px 110px rgba(0,0,0,.36);
  animation: telegram-dialog-in .22s ease-out;
}
@keyframes telegram-dialog-in { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
.telegram-close { position: absolute; right: 18px; top: 17px; width: 36px; height: 36px; border: 0; border-radius: 50%; color: #587069; background: #e9ede7; cursor: pointer; font-size: 22px; line-height: 1; }
.telegram-dialog-heading { display: flex; gap: 17px; align-items: flex-start; padding-right: 38px; }
.telegram-dialog-heading .service-icon { flex: 0 0 auto; }
.telegram-dialog-heading h2 { margin: 6px 0 8px; font: 700 clamp(28px, 4vw, 38px)/1.05 var(--font-display); letter-spacing: -.035em; }
.telegram-dialog-heading p:last-child { max-width: 550px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.telegram-loading { min-height: 230px; display: flex; align-items: center; justify-content: center; gap: 11px; color: var(--muted); font-size: 12px; }
.telegram-loading > span { width: 17px; height: 17px; border: 2px solid #d3dbd3; border-top-color: var(--mint-strong); border-radius: 50%; animation: telegram-spin .7s linear infinite; }
@keyframes telegram-spin { to { transform: rotate(360deg); } }
.telegram-setup-content { margin-top: 27px; display: grid; grid-template-columns: 205px minmax(0, 1fr); gap: 29px; align-items: center; }
.telegram-setup-content.without-qr { grid-template-columns: minmax(0, 1fr); }
.telegram-qr-wrap { padding: 12px 12px 15px; border: 1px solid var(--line); border-radius: 20px; background: white; text-align: center; }
.telegram-qr-wrap img { display: block; width: 180px; height: 180px; border-radius: 9px; }
.telegram-qr-wrap span { display: block; margin-top: 8px; color: #7a8782; font-size: 9px; }
.telegram-steps { margin: 0 0 18px; padding: 0; display: grid; gap: 12px; list-style: none; }
.telegram-steps li { display: flex; gap: 11px; align-items: center; }
.telegram-steps li > span { width: 29px; height: 29px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid #cfd8d0; border-radius: 50%; color: #64746e; font-size: 10px; font-weight: 850; }
.telegram-steps li.done > span { color: var(--ink); border-color: var(--mint); background: var(--mint); }
.telegram-steps strong, .telegram-steps small { display: block; }
.telegram-steps strong { font-size: 11px; }
.telegram-steps small { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.button-telegram { width: 100%; color: white; background: #2aabee; text-decoration: none; }
.button-telegram:hover { background: #199bdc; }
.button-whatsapp { width: 100%; color: white; background: #1da851; text-decoration: none; }
.button-whatsapp:hover { background: #168944; }
.whatsapp-business-setup { margin-top: 25px; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: #f7faf7; }
.whatsapp-business-copy strong { font: 700 17px/1.2 var(--font-display); }
.whatsapp-business-copy p { margin: 7px 0 17px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.whatsapp-business-setup label { display: block; margin-bottom: 7px; color: var(--ink-soft); font-size: 10px; font-weight: 800; }
.whatsapp-business-setup input { width: 100%; letter-spacing: .35em; text-align: center; font-size: 17px; }
.whatsapp-business-setup small { display: block; margin: 7px 0 15px; color: var(--muted); font-size: 9px; }
.telegram-copy-link { width: 100%; margin-top: 11px; border: 0; color: #446258; background: transparent; cursor: pointer; font-size: 10px; font-weight: 800; }
.telegram-success { margin-top: 22px; padding: 16px 18px; display: flex; align-items: center; gap: 13px; border-radius: 15px; color: #274b3e; background: #e6f7eb; }
.telegram-success-icon { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; color: var(--ink); background: var(--mint); font-weight: 900; }
.telegram-success strong { font-size: 12px; }
.telegram-success p { margin: 3px 0 0; color: #577066; font-size: 10px; line-height: 1.45; }
.telegram-error { margin: 16px 0 0; text-align: center; }
.telegram-later { display: block; margin: 21px auto 0; font-size: 10px; }

@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 76px minmax(0, 1fr); }
  .sidebar { padding-inline: 12px; }
  .sidebar-brand { padding: 0 7px; }
  .sidebar-brand > span:last-child { display: none; }
  .nav-label, .nav-item:not(.active) .nav-count, .nav-item { font-size: 0; }
  .nav-item { justify-content: center; padding: 0; }
  .nav-icon { width: auto; font-size: 18px; }
  .help-card { display: none; }
  .profile > span:not(.avatar) { display: none; }
  .profile { justify-content: center; }
  .hero-grid { grid-template-columns: 1fr; }
  .progress-card { min-height: auto; }
  .integration-grid { grid-template-columns: 1fr 1fr; }
  .meta-panel { grid-template-columns: 180px minmax(0, 1fr); }
}

@media (max-width: 700px) {
  .login-shell { padding: 20px; align-items: start; padding-top: 100px; }
  .login-brand { left: 24px; top: 24px; }
  .login-card { padding: 31px 25px; border-radius: 23px; }
  .app-shell { display: block; }
  .sidebar { position: fixed; width: 244px; left: -260px; transition: left .22s; box-shadow: 20px 0 60px rgba(0,0,0,.2); }
  .sidebar.open { left: 0; }
  .sidebar-brand > span:last-child { display: flex; }
  .sidebar nav .nav-item { justify-content: flex-start; padding: 0 13px; font-size: 13px; }
  .nav-item:not(.active) .nav-count { font-size: 10px; }
  .help-card { display: block; }
  .profile { justify-content: flex-start; }
  .profile > span:nth-child(2), .profile > span:last-child { display: flex; }
  .menu-button { display: block; }
  .topbar { min-height: 76px; padding: 16px 20px; }
  .system-live { display: none; }
  .hero-grid { padding: 42px 20px 38px; gap: 28px; }
  .hero-copy h2 { font-size: 45px; }
  .section-block { padding-inline: 20px; }
  .indicator-grid { padding: 0 20px 38px; grid-template-columns: 1fr; gap: 11px; }
  .indicator-card { padding: 17px; }
  .integration-grid { grid-template-columns: 1fr; }
  .integration-card:last-child { grid-column: auto; }
  .meta-panel { margin-inline: 20px; grid-template-columns: 1fr; }
  .meta-integration-card { margin: 0; grid-template-columns: 1fr; }
  .meta-art { min-height: 210px; }
  .meta-symbol { top: 50%; }
  .meta-orbit { top: 50%; }
  .meta-content { padding: 28px 23px; }
  .meta-steps { grid-template-columns: 1fr; }
  .meta-actions { align-items: flex-start; flex-direction: column; }
  .asset-selectors { grid-template-columns: 1fr; }
  .asset-selectors label { margin-top: 5px; }
  .url-list > div { grid-template-columns: 1fr auto; }
  .url-list span { grid-column: 1 / -1; }
  .app-footer { margin-inline: 20px; }
  .telegram-setup { padding: 12px; align-items: end; }
  .telegram-dialog { max-height: calc(100vh - 24px); padding: 26px 22px; border-radius: 24px 24px 18px 18px; }
  .telegram-dialog-heading { padding-right: 28px; }
  .telegram-dialog-heading h2 { font-size: 30px; }
  .telegram-setup-content { grid-template-columns: 1fr; gap: 18px; }
  .telegram-qr-wrap { width: 172px; padding: 10px 10px 12px; justify-self: center; }
  .telegram-qr-wrap img { width: 150px; height: 150px; }
  .telegram-steps { gap: 10px; }
}

/* O dashboard segue o fluxo do documento: cada seção ocupa sua própria área,
   sem sobreposição em telas desktop de pouca altura. */
@media (min-width: 701px) {
  body.dashboard-open { overflow: auto; }
  .app-shell { height: auto; min-height: 100vh; }
  .main-content { height: auto; min-height: 100vh; display: block; }
  .topbar { min-height: 76px; padding: 17px clamp(24px, 4vw, 58px); position: sticky; }
  .breadcrumb { display: block; }
  .topbar h1 { font-size: 17px; }
  .hero-grid { padding: 52px clamp(24px, 4vw, 58px) 34px; grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr); gap: 34px; }
  .hero-copy .eyebrow { font-size: 11px; }
  .hero-copy h2 { margin: 16px 0 16px; font-size: clamp(42px, 5vw, 64px); }
  .hero-copy > p { font-size: 13px; line-height: 1.65; }
  .progress-card { height: auto; min-height: 190px; padding: 24px; border-radius: var(--radius-lg); }
  .progress-number { font-size: 38px; }
  .progress-top p { margin-top: 7px; font-size: 10px; }
  .progress-orbit { width: 61px; height: 61px; border-width: 6px; }
  .progress-orbit span { font-size: 10px; }
  .progress-track { margin: 23px 0 16px; }
  .progress-message { font-size: 10px; }
  .section-block { min-height: 0; padding: 5px clamp(24px, 4vw, 58px) 45px; display: block; }
  .section-heading { margin-bottom: 19px; }
  .section-heading .section-kicker { display: block; }
  .section-heading h2 { margin-top: 7px; font-size: 25px; }
  .section-heading > p { font-size: 10px; }
  .integration-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .integration-card { height: auto; min-height: 270px; padding: 21px; border-radius: var(--radius-md); }
  .service-icon { width: 44px; height: 44px; border-radius: 13px; }
  .status-pill { padding: 7px 10px; font-size: 9px; }
  .card-copy { margin-top: 30px; }
  .service-type { margin-bottom: 7px; font-size: 9px; }
  .card-copy h3 { margin-bottom: 10px; font-size: 24px; }
  .card-copy > p:last-child { font-size: 11px; line-height: 1.65; }
  .card-footer { padding-top: 15px; }
  .card-footer > span, .card-footer a, .text-button { font-size: 9px; }
  .meta-integration-card { min-height: 0; padding: 0; grid-template-columns: minmax(190px, .48fr) minmax(0, 1.52fr); }
  .meta-integration-card .meta-art { min-height: 360px; }
  .meta-content { padding: clamp(30px, 4vw, 48px); overflow: visible; }
  .meta-heading h2 { font-size: 36px; }
  .meta-heading .section-kicker { font-size: 11px; }
  .meta-description { margin: 20px 0 24px; font-size: 11px; line-height: 1.65; }
  .meta-steps { gap: 8px; }
  .mini-step { padding: 11px; gap: 8px; }
  .mini-step > span { width: 25px; height: 25px; font-size: 9px; }
  .mini-step strong { font-size: 9px; }
  .mini-step small { display: block; }
  .app-footer { margin: 0 clamp(24px, 4vw, 58px); padding: 20px 0 30px; }
}

/* Regras finais do dashboard compacto; mantidas por último para prevalecerem
   sobre o layout histórico durante a transição. */
@media (min-width: 701px) {
  body.dashboard-open { overflow: hidden; }
  .app-shell { height: 100vh; min-height: 0; }
  .main-content { height: 100vh; min-height: 0; overflow: hidden; display: block; }
  .topbar { min-height: 62px; height: 62px; padding: 10px 26px; position: relative; }
  .breadcrumb { display: none; }
  .hero-grid { height: 147px; padding: 18px 26px 12px; grid-template-columns: minmax(0, 1fr) 220px; gap: 22px; align-items: center; }
  .hero-copy .eyebrow { font-size: 8px; }
  .hero-copy h2 { margin: 8px 0 7px; font-size: clamp(30px, 3.5vw, 43px); line-height: .96; }
  .hero-copy > p { max-width: 600px; font-size: 10px; line-height: 1.4; }
  .progress-card { min-height: 0; height: 116px; padding: 14px 16px; border-radius: 18px; }
  .progress-number { font-size: 27px; }
  .progress-top p { margin-top: 3px; font-size: 7px; }
  .progress-orbit { width: 43px; height: 43px; border-width: 4px; }
  .progress-orbit span, .progress-message { font-size: 7px; }
  .progress-track { height: 4px; margin: 12px 0 8px; }
  .indicator-grid { height: 74px; padding: 0 26px 10px; gap: 10px; }
  .indicator-card { padding: 9px 14px; gap: 1px 10px; border-radius: 14px; }
  .indicator-icon { width: 38px; height: 38px; border-radius: 11px; }
  .indicator-icon svg { width: 20px; height: 20px; }
  .indicator-card strong { font-size: 25px; }
  .indicator-card div span { font-size: 9px; }
  .indicator-card small { font-size: 7px; }
  #integracoes.section-block { height: calc(100vh - 310px); min-height: 300px; padding: 3px 26px 12px; display: flex; flex-direction: column; }
  #integracoes .section-heading { flex: 0 0 34px; margin: 0; align-items: center; }
  #integracoes .section-heading .section-kicker { display: none; }
  #integracoes .section-heading h2 { margin: 0; font-size: 20px; }
  #integracoes .section-heading > p { font-size: 8px; }
  #integracoes .integration-grid { min-height: 0; flex: 1; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
  #integracoes .integration-card { min-height: 0; height: 100%; padding: 14px; border-radius: 15px; overflow: hidden; }
  #integracoes .service-icon { width: 38px; height: 38px; border-radius: 11px; }
  #integracoes .service-icon svg { width: 21px; height: 21px; }
  #integracoes .meta-icon svg { width: 27px; }
  #integracoes .status-pill { max-width: 52%; padding: 6px 7px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 7px; }
  #integracoes .card-copy { margin-top: 14px; }
  #integracoes .service-type { margin-bottom: 4px; font-size: 7px; }
  #integracoes .card-copy h3 { margin-bottom: 6px; font-size: 20px; }
  #integracoes .card-copy > p:last-child { min-height: 0; font-size: 8px; line-height: 1.4; }
  #integracoes .card-footer { min-width: 0; margin-top: auto; padding-top: 9px; gap: 8px; }
  #integracoes .card-footer > span { font-size: 7px; }
  #integracoes .integration-action { min-width: 92px; min-height: 32px; padding-inline: 10px; font-size: 8px; }
  #integracoes .meta-integration-card { display: flex; grid-column: auto; margin: 0; color: var(--ink); background: var(--card); }
  #integracoes .meta-alert { max-height: 38px; margin-top: 9px; overflow: hidden; font-size: 7px; }
  #integracoes .asset-selectors { max-height: 78px; margin-top: 9px; overflow: auto; }
  .app-footer { height: 27px; margin: 0 26px; padding: 7px 0; font-size: 7px; }
  #equipe.section-block, #funcionalidades.section-block { height: calc(100vh - 62px); padding: 24px 26px; overflow: auto; }
}

.route-hidden { display: none !important; }
.integration-action {
  min-width: 104px;
  min-height: 36px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex: 0 0 auto;
  border: 1px solid #cbd5ce;
  border-radius: 10px;
  color: #21493d;
  background: #fff;
  text-decoration: none;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}
.integration-action:hover { border-color: #8fc9a8; background: #eff9f2; }
.integration-action:disabled { cursor: not-allowed; opacity: .52; }
.card-footer .integration-action {
  border: 1px solid #cbd5ce;
  padding: 0 13px;
  color: #21493d;
  background: #fff;
  font-size: 10px;
}
.card-footer .integration-action:hover { border-color: #8fc9a8; background: #eff9f2; }
.meta-icon { color: white; background: #1676ee; }
.meta-icon svg { width: 30px; fill: none; stroke: currentColor; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.meta-integration-card { grid-column: auto; margin: 0; display: flex; padding: 21px; color: var(--ink); background: var(--card); }
.meta-integration-card .meta-steps { display: none; }
.meta-integration-card .meta-alert { margin: 9px 0 0; padding: 8px 10px; border: 0; border-radius: 8px; color: #806632; background: #f7ecd6; font-size: 9px; line-height: 1.35; }
.meta-feature-shortcut { margin-top: 10px; padding: 10px 11px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid #d6dfd8; border-radius: 9px; color: #21493d; background: #f7fbf8; text-decoration: none; }
.meta-feature-shortcut:hover { border-color: #91b9a5; background: #eff9f2; }
.meta-feature-shortcut strong, .meta-feature-shortcut small { display: block; }
.meta-feature-shortcut strong { font-size: 9px; }
.meta-feature-shortcut small { margin-top: 2px; color: #71807a; font-size: 8px; font-weight: 500; }
.meta-integration-card .meta-permission-alert { padding: 11px; display: grid; gap: 9px; color: #624b1d; border: 1px solid #ead29e; background: #fff8e8; }
.meta-permission-alert.is-hidden { display: none; }
.meta-permission-copy { display: grid; gap: 3px; }
.meta-permission-copy strong { color: #44320e; font-size: 10px; line-height: 1.3; }
.meta-permission-copy span { color: #735d31; font-size: 9px; line-height: 1.45; }
.meta-permission-action { width: 100%; min-height: 34px; padding: 8px 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid #21493d; border-radius: 8px; color: #fff; background: #21493d; font: 800 9px/1.2 var(--font-body); cursor: pointer; }
.meta-permission-action:hover { border-color: #173a30; background: #173a30; }
.meta-permission-action:focus-visible { outline: 3px solid rgba(36, 112, 84, .22); outline-offset: 2px; }
.meta-permission-action:disabled { cursor: wait; opacity: .68; }
.meta-integration-card .asset-selectors { margin-top: 9px; grid-template-columns: 1fr; gap: 4px; }
.meta-integration-card .asset-selectors label { margin: 0; font-size: 8px; }
.meta-integration-card .asset-selectors select { padding: 7px 9px; color: var(--ink); border-color: #cfd5cd; background: #fff; font-size: 9px; }
.meta-card-footer { flex-direction: column; align-items: stretch; }
.meta-card-footer > span { width: 100%; }
.meta-card-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.meta-card-actions.single-action { grid-template-columns: 1fr; }
.meta-card-actions .integration-action { width: 100%; min-width: 0; }
.integration-action-primary,
.card-footer .integration-action-primary { color: #fff; border-color: #21493d; background: #21493d; }
.integration-action-primary:hover,
.card-footer .integration-action-primary:hover { color: #fff; border-color: #173a30; background: #173a30; }

@media (min-width: 701px) {
  body.dashboard-open { overflow: hidden; }
  .app-shell { height: 100vh; min-height: 0; }
  .main-content { height: 100vh; min-height: 0; overflow: hidden; }
  .topbar { min-height: 62px; height: 62px; padding: 10px 26px; position: relative; }
  .breadcrumb { display: none; }
  .hero-grid { height: 147px; padding: 18px 26px 12px; grid-template-columns: minmax(0, 1fr) 220px; gap: 22px; align-items: center; }
  .hero-copy .eyebrow { font-size: 8px; }
  .hero-copy h2 { margin: 8px 0 7px; font-size: clamp(30px, 3.5vw, 43px); line-height: .96; }
  .hero-copy > p { max-width: 600px; font-size: 10px; line-height: 1.4; }
  .progress-card { min-height: 0; height: 116px; padding: 14px 16px; border-radius: 18px; }
  .progress-number { font-size: 27px; }
  .progress-top p { margin-top: 3px; font-size: 7px; }
  .progress-orbit { width: 43px; height: 43px; border-width: 4px; }
  .progress-orbit span { font-size: 7px; }
  .progress-track { height: 4px; margin: 12px 0 8px; }
  .progress-message { font-size: 7px; }
  .indicator-grid { height: 74px; padding: 0 26px 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .indicator-card { padding: 9px 14px; grid-template-columns: auto 1fr; gap: 1px 10px; border-radius: 14px; }
  .indicator-icon { width: 38px; height: 38px; border-radius: 11px; }
  .indicator-icon svg { width: 20px; height: 20px; }
  .indicator-card strong { font-size: 25px; }
  .indicator-card div span { font-size: 9px; }
  .indicator-card small { font-size: 7px; }
  #integracoes.section-block { height: calc(100vh - 62px - 147px - 74px - 27px); min-height: 300px; padding: 3px 26px 12px; display: flex; flex-direction: column; }
  #integracoes .section-heading { flex: 0 0 34px; margin: 0; align-items: center; }
  #integracoes .section-heading .section-kicker { display: none; }
  #integracoes .section-heading h2 { margin: 0; font-size: 20px; }
  #integracoes .section-heading > p { font-size: 8px; }
  #integracoes .integration-grid { min-height: 0; flex: 1; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
  #integracoes .integration-card { min-height: 0; height: 100%; padding: 14px; border-radius: 15px; overflow: hidden; }
  #integracoes .service-icon { width: 38px; height: 38px; border-radius: 11px; }
  #integracoes .service-icon svg { width: 21px; height: 21px; }
  #integracoes .meta-icon svg { width: 27px; }
  #integracoes .status-pill { max-width: 52%; padding: 6px 7px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 7px; }
  #integracoes .card-copy { margin-top: 14px; }
  #integracoes .service-type { margin-bottom: 4px; font-size: 7px; }
  #integracoes .card-copy h3 { margin-bottom: 6px; font-size: 20px; }
  #integracoes .card-copy > p:last-child { min-height: 0; font-size: 8px; line-height: 1.4; }
  #integracoes .card-footer { min-width: 0; margin-top: auto; padding-top: 9px; gap: 8px; }
  #integracoes .card-footer > span { font-size: 7px; }
  #integracoes .integration-action { min-width: 92px; min-height: 32px; padding-inline: 10px; font-size: 8px; }
  #integracoes .meta-alert { max-height: 38px; overflow: hidden; font-size: 7px; }
  #integracoes .meta-integration-card .asset-selectors {
    max-height: none;
    overflow: visible;
    flex: 0 0 auto;
  }
  #integracoes .meta-integration-card .asset-selectors select {
    width: 100%;
    min-width: 0;
    min-height: 32px;
    line-height: 1.2;
  }
  .app-footer { height: 27px; margin: 0 26px; padding: 7px 0; font-size: 7px; }
  #equipe.section-block, #funcionalidades.section-block { height: calc(100vh - 62px); padding: 24px 26px; overflow: auto; }
}

@media (max-width: 700px) {
  .meta-integration-card { display: flex; padding: 21px; }
  .integration-action { min-width: 110px; min-height: 38px; }
}

@media (min-width: 99999px) {
  body.dashboard-open { overflow: hidden; }
  .app-shell { height: 100vh; min-height: 0; }
  .main-content {
    height: 100vh;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(300px, 2fr);
    grid-template-rows: 70px 180px minmax(0, 1fr) 34px;
    grid-template-areas:
      "topbar topbar"
      "hero meta"
      "services meta"
      "footer meta";
  }
  .topbar {
    grid-area: topbar;
    min-height: 0;
    padding: 14px 26px;
    position: relative;
  }
  .breadcrumb { display: none; }
  .topbar h1 { font-size: 15px; }
  .help-card { display: none; }

  .hero-grid {
    grid-area: hero;
    min-height: 0;
    padding: 24px 14px 16px 26px;
    grid-template-columns: minmax(0, 1fr) 176px;
    gap: 18px;
    align-items: center;
  }
  .hero-copy .eyebrow { font-size: 8px; }
  .hero-copy h2 {
    margin: 10px 0 8px;
    font-size: clamp(30px, 3.2vw, 45px);
    line-height: .98;
  }
  .hero-copy > p {
    max-width: 480px;
    font-size: 10px;
    line-height: 1.45;
  }
  .progress-card {
    min-height: 0;
    height: 140px;
    padding: 17px;
    border-radius: 20px;
  }
  .progress-number { font-size: 27px; }
  .progress-top p { margin-top: 4px; font-size: 7px; }
  .progress-orbit { width: 47px; height: 47px; border-width: 5px; }
  .progress-orbit span { font-size: 8px; }
  .progress-track { margin: 15px 0 11px; }
  .progress-message { font-size: 7px; }

  .section-block {
    grid-area: services;
    min-height: 0;
    padding: 7px 14px 17px 26px;
    display: flex;
    flex-direction: column;
  }
  .section-heading { margin-bottom: 10px; }
  .section-heading .section-kicker { display: none; }
  .section-heading h2 { margin: 0; font-size: 20px; }
  .section-heading > p { font-size: 8px; }
  .integration-grid {
    min-height: 0;
    flex: 1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }
  .integration-card {
    min-height: 0;
    height: 100%;
    padding: 14px;
    border-radius: 15px;
  }
  .service-icon { width: 35px; height: 35px; border-radius: 10px; font-size: 15px; }
  .status-pill { padding: 6px 7px; font-size: 7px; }
  .status-pill i { width: 5px; height: 5px; margin-right: 4px; }
  .card-copy { margin-top: 17px; }
  .service-type { margin-bottom: 5px; font-size: 7px; }
  .card-copy h3 { margin-bottom: 7px; font-size: 20px; }
  .card-copy > p:last-child { min-height: 0; font-size: 9px; line-height: 1.45; }
  .card-footer { padding-top: 10px; }
  .card-footer > span,
  .card-footer a,
  .text-button { font-size: 7px; }

  .meta-panel {
    grid-area: meta;
    min-width: 0;
    min-height: 0;
    margin: 16px 22px 16px 10px;
    grid-template-columns: 1fr;
    grid-template-rows: 120px minmax(0, 1fr);
    border-radius: 22px;
  }
  .meta-art { min-height: 0; }
  .meta-art::after { display: none; }
  .meta-symbol {
    top: 50%;
    width: 58px;
    height: 58px;
    border-radius: 17px 17px 17px 6px;
    font-size: 34px;
  }
  .meta-orbit { top: 50%; }
  .orbit-one { width: 180px; height: 80px; }
  .orbit-two { width: 95px; height: 185px; }
  .meta-content {
    min-height: 0;
    padding: 22px;
    overflow-y: auto;
    scrollbar-width: thin;
  }
  .meta-heading h2 { font-size: 29px; }
  .meta-heading .section-kicker { font-size: 8px; }
  .status-large { max-width: 145px; text-align: center; }
  .meta-description { margin: 14px 0 16px; font-size: 9px; line-height: 1.5; }
  .meta-steps { gap: 5px; }
  .mini-step { padding: 8px; gap: 6px; }
  .mini-step > span { width: 21px; height: 21px; font-size: 7px; }
  .mini-step strong { font-size: 7px; }
  .mini-step small { display: none; }
  .meta-alert { margin-top: 12px; padding: 9px 11px; font-size: 8px; }
  .meta-actions { margin-top: 16px; gap: 10px; }
  .meta-actions .button { min-height: 41px; padding-inline: 14px; font-size: 10px; }
  .asset-selectors { margin-top: 15px; gap: 7px 10px; }
  .asset-selectors select { padding: 8px 9px; }
  .app-footer {
    grid-area: footer;
    margin: 0 14px 0 26px;
    padding: 9px 0;
  }
}

/* Conversation inbox */
.assistant-shell { height: 100%; min-height: 0; display: flex; flex-direction: column; background: #f6f7f3; }
#assistente.section-block { height: calc(100dvh - 62px); padding: 0; overflow: hidden; }
.assistant-header { min-height: 78px; padding: 13px clamp(20px, 4vw, 54px); display: flex; align-items: center; gap: 13px; border-bottom: 1px solid #dfe6dd; background: #fffefa; }
.assistant-mark { width: 43px; height: 43px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 13px; color: #123527; background: #a9eac1; font: 800 23px var(--font-display); }
.assistant-header h2 { margin: 0; font: 700 16px var(--font-display); }
.assistant-header p { margin: 4px 0 0; color: #748178; font-size: 11px; }
.assistant-live { margin-left: auto; padding: 6px 10px; border: 1px solid #cce3d1; border-radius: 20px; color: #2f714b; background: #eef8ef; font-size: 10px; font-weight: 750; }
.assistant-messages { width: min(100%, 880px); min-height: 0; flex: 1; margin: 0 auto; padding: 25px clamp(18px, 4vw, 42px); overflow: auto; }
.assistant-messages:empty { flex: 0; padding: 0; }
.assistant-message { width: fit-content; max-width: min(88%, 680px); margin: 0 0 17px; padding: 14px 17px; border-radius: 15px; background: #fff; box-shadow: 0 2px 8px rgba(23, 52, 37, .05); }
.assistant-message.user { margin-left: auto; border-bottom-right-radius: 5px; background: #dcf1df; }
.assistant-message.agent { margin-right: auto; border-bottom-left-radius: 5px; }
.assistant-message-sender { color: #3a7851; font-size: 10px; font-weight: 800; }
.assistant-message p { margin: 7px 0 0; color: #233b2d; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.6; }
.assistant-message-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.assistant-message-actions button, .assistant-message-actions a { min-height: 34px; padding: 8px 11px; border: 1px solid #cdded0; border-radius: 9px; color: #1e5c38; background: #f4faf4; cursor: pointer; text-decoration: none; font: 700 11px var(--font-body); }
.assistant-message-actions button:hover, .assistant-message-actions a:hover { background: #e3f1e5; }
.assistant-starters { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px 20px; text-align: center; }
.assistant-starters[hidden] { display: none; }
.assistant-starters h3 { margin: 0; font: 700 clamp(26px, 3vw, 36px)/1.12 var(--font-display); letter-spacing: -.025em; }
.assistant-starters p { margin: 10px 0 24px; color: #708078; font-size: 13px; }
.assistant-starters > div { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; }
.assistant-starters button { padding: 11px 15px; border: 1px solid #d4e0d2; border-radius: 11px; color: #29553b; background: #fff; cursor: pointer; font-size: 12px; font-weight: 700; }
.assistant-starters button:hover { background: #e9f5e9; }
.assistant-form { width: min(100%, 880px); margin: 0 auto; padding: 12px clamp(18px, 4vw, 42px) 4px; display: flex; gap: 9px; align-items: end; }
.assistant-form textarea { min-width: 0; width: 100%; min-height: 49px; max-height: 180px; resize: vertical; padding: 14px 15px; border: 1px solid #cbdaca; border-radius: 13px; outline: none; color: var(--ink); background: #fff; font: 13px/1.45 var(--font-body); }
.assistant-form .assistant-attach { width: 49px; flex: 0 0 49px; padding: 0; border: 1px solid #cbdaca; color: #245f40; background: #fff; font-size: 27px; font-weight: 400; }
.assistant-form .assistant-attach:hover { background: #e9f5ea; }
.assistant-form textarea:focus { border-color: #419b69; box-shadow: 0 0 0 3px #dbefdf; }
.assistant-form button { min-height: 49px; padding: 0 20px; border: 0; border-radius: 12px; color: #fff; background: #245f40; cursor: pointer; font-size: 12px; font-weight: 800; }
.assistant-form button:hover { background: #317b51; }
.assistant-form button:disabled { opacity: .6; cursor: default; }
.assistant-feedback { width: min(100%, 880px); min-height: 26px; margin: 0 auto; padding: 3px clamp(18px, 4vw, 42px) 9px; color: #64776a; font-size: 11px; }
.assistant-attachment { width: min(100%, 880px); margin: 0 auto; padding: 4px clamp(18px, 4vw, 42px); display: flex; align-items: center; gap: 10px; color: #345b42; font-size: 11px; }
.assistant-attachment[hidden] { display: none; }
.assistant-attachment button { border: 0; color: #9b503e; background: transparent; cursor: pointer; font: inherit; font-weight: 750; }
.assistant-photo { display: block; max-width: min(100%, 300px); max-height: 220px; margin-top: 10px; border-radius: 9px; object-fit: contain; }
@media (max-width: 700px) {
  #assistente.section-block { height: calc(100dvh - 76px); padding: 0; }
  .assistant-header { min-height: 67px; padding-inline: 16px; }
  .assistant-live { display: none; }
  .assistant-messages { padding: 16px 14px; }
  .assistant-message { max-width: 92%; }
  .assistant-form { padding-inline: 10px; }
  .assistant-form .assistant-attach { width: 42px; flex-basis: 42px; }
  .assistant-form button { padding-inline: 13px; }
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
#leads.section-block { height: calc(100dvh - 62px); padding: 0; overflow: hidden; }
.chat-shell { height: 100%; min-height: 0; display: grid; grid-template-columns: minmax(290px, 360px) minmax(0, 1fr); background: #f6f7f3; }
.chat-sidebar { min-width: 0; min-height: 0; display: flex; flex-direction: column; border-right: 1px solid #dfe4dc; background: #fffefa; }
.chat-sidebar-head { padding: 28px 22px 19px; display: flex; justify-content: space-between; align-items: start; }
.chat-sidebar-head h2 { margin: 0; font: 700 29px/1.1 var(--font-display); letter-spacing: -.03em; }
.chat-sidebar-head p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.chat-icon-button { width: 38px; height: 38px; border: 1px solid #dfe5dd; border-radius: 11px; background: #fff; color: var(--ink); cursor: pointer; font-size: 22px; }
.chat-icon-button:hover { background: #eef7ee; }
.chat-filters { padding: 0 18px 14px; border-bottom: 1px solid #e9ece6; }
.chat-search { min-height: 43px; display: flex; align-items: center; border: 1px solid #dbe2d9; border-radius: 12px; background: #f5f7f2; }
.chat-search:focus-within { border-color: #399b69; box-shadow: 0 0 0 3px #d8efe0; }
.chat-search input { min-width: 0; width: 100%; padding: 10px 13px; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 13px; }
.chat-search button { width: 40px; flex: 0 0 auto; border: 0; background: transparent; color: #567368; cursor: pointer; font-size: 24px; }
.chat-filter-row { display: flex; gap: 8px; margin-top: 10px; }
.chat-filter-row label { flex: 1; min-width: 0; }
.chat-filter-row select { width: 100%; min-height: 35px; padding: 0 8px; border: 1px solid #e1e6df; border-radius: 9px; color: #365248; background: #fff; font-size: 11px; }
#leads-feedback { flex: 0 0 auto; margin: 0; padding: 9px 20px; min-height: 35px; border-bottom: 1px solid #eff0eb; color: #74837b; font-size: 10px; }
.chat-list { min-height: 0; flex: 1; overflow: auto; }
.lead-row { display: flex; gap: 12px; align-items: start; padding: 15px 17px; border-bottom: 1px solid #edf0e9; }
.lead-row:hover { background: #f5f9f3; }
.lead-row[aria-pressed=true] { background: #eaf5ea; }
.chat-avatar { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 14px; color: #275543; background: #dceee1; font: 750 14px var(--font-display); }
.lead-row:nth-child(4n+2) .chat-avatar { color: #72562c; background: #f4e9ce; }
.lead-row:nth-child(4n+3) .chat-avatar { color: #4c5d80; background: #e2e9f4; }
.chat-row-content { display: block; min-width: 0; flex: 1; }
.lead-row-heading { align-items: center; }
.lead-row-heading strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; }
.lead-row-heading time { flex: 0 0 auto; color: #859188; font-size: 10px; }
.chat-preview { display: block; margin-top: 4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #5e7068; font-size: 12px; }
.chat-row-foot { display: block; margin-top: 7px; color: #819087; font-size: 10px; }
.chat-row-foot.attention { color: #946129; font-weight: 700; }
.chat-sidebar .leads-pagination { min-height: 52px; border-top: 1px solid #e8ece6; }
.chat-sidebar .leads-button { min-height: 31px; padding: 5px 9px; font-size: 11px; }
.chat-conversation { min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; background: #f6f7f3; }
.chat-empty { flex: 1; display: grid; place-content: center; justify-items: center; padding: 35px; text-align: center; }
.chat-empty > span { width: 76px; height: 76px; display: grid; place-items: center; border-radius: 23px; color: #397453; background: #e1eee1; font-size: 38px; }
.chat-empty h3 { margin: 20px 0 5px; font: 650 25px var(--font-display); }
.chat-empty p { max-width: 280px; margin: 0; color: #728077; font-size: 13px; line-height: 1.6; }
.chat-header { display: flex; align-items: center; gap: 12px; min-height: 76px; padding: 12px 22px; border-bottom: 1px solid #e2e6dd; background: #fffefa; }
.chat-header .chat-avatar { width: 43px; height: 43px; }
.chat-identity { min-width: 0; flex: 1; }
.chat-identity h3 { margin: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font: 700 16px var(--font-display); }
.chat-identity p { margin: 4px 0 0; color: #708077; font-size: 11px; }
.chat-header-actions { display: flex; gap: 7px; align-items: center; }
.chat-header-actions .leads-button, .chat-primary-action { min-height: 36px; padding: 7px 12px; border-radius: 10px; font-size: 11px; font-weight: 750; cursor: pointer; }
.chat-primary-action { border: 1px solid #22553b; color: #fff; background: #22553b; }
.chat-primary-action:hover { background: #32744f; }
.chat-primary-action:disabled { opacity: .6; cursor: default; }
.chat-back { display: none; border: 0; color: #336047; background: transparent; font-size: 12px; font-weight: 750; }
.chat-context { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 24px; border-bottom: 1px solid #e7eae2; background: #fcfcf7; font-size: 11px; }
.chat-context strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 700; }
.chat-assessment { margin: 0; padding: 8px 24px; border-bottom: 1px solid #e7eae2; color: #617269; background: #fcfcf7; font-size: 11px; }
.chat-info { flex: 0 0 auto; border-bottom: 1px solid #e7eae2; background: #fcfcf7; font-size: 11px; }
.chat-info summary { padding: 8px 24px; color: #365b45; cursor: pointer; font-weight: 700; }
.chat-info .lead-facts { max-height: 180px; overflow: auto; margin: 0; padding: 8px 24px 15px; }
.chat-thread { min-height: 0; flex: 1; overflow: auto; padding: 18px clamp(18px, 4vw, 54px) 26px; }
.chat-history-nav { display: flex; justify-content: center; gap: 8px; margin: 0 0 14px; }
.chat-history-nav .leads-button { min-height: 29px; padding: 4px 10px; border-color: #d5e0d4; color: #456b55; background: #fff; font-size: 10px; }
.lead-message { width: fit-content; max-width: min(78%, 590px); margin: 0 0 12px; padding: 9px 13px; border: 0; border-radius: 13px 13px 13px 4px; box-shadow: 0 1px 2px rgba(23, 53, 34, .08); }
.lead-message.customer { margin-right: auto; background: #fff; }
.lead-message.operator { margin-left: auto; border-radius: 13px 13px 4px 13px; background: #dcf2e2; }
.lead-message strong { color: #537463; font-size: 10px; }
.lead-message p { margin: 4px 0; color: #1e3429; overflow-wrap: anywhere; white-space: pre-wrap; font-size: 13px; line-height: 1.45; }
.lead-message small { display: block; color: #7f8a80; text-align: right; font-size: 10px; }
.chat-composer { display: flex; align-items: end; gap: 10px; padding: 13px 22px 6px; border-top: 1px solid #e1e6dd; background: #fffefa; }
.chat-composer textarea { min-width: 0; width: 100%; min-height: 44px; max-height: 150px; resize: vertical; padding: 12px 14px; border: 1px solid #d8e0d5; border-radius: 12px; outline: none; color: var(--ink); background: #f8faf6; font: 13px/1.45 var(--font-body); }
.chat-composer textarea:focus { border-color: #3b9e6a; box-shadow: 0 0 0 3px #d8efe0; }
.chat-send { min-height: 44px; padding: 0 20px; border: 0; border-radius: 11px; color: #fff; background: #225b3d; cursor: pointer; font-size: 12px; font-weight: 750; }
.chat-send:hover { background: #30764f; }
.chat-send:disabled { opacity: .6; cursor: default; }
.chat-composer-note { margin: 0; padding: 16px 22px; border-top: 1px solid #e0e7dd; color: #68786e; background: #fffefa; font-size: 12px; }
.chat-action-feedback { min-height: 18px; margin: 0; padding: 0 22px 5px; color: #995b3c; background: #fffefa; font-size: 11px; }

@media (max-width: 850px) {
  .chat-shell { grid-template-columns: minmax(255px, 40%) minmax(0, 1fr); }
  .chat-header { padding-inline: 13px; }
  .chat-header-actions .leads-button, .chat-primary-action { padding-inline: 8px; }
}
@media (max-width: 700px) {
  #leads.section-block { height: calc(100dvh - 76px); min-height: 0; padding: 0; }
  .chat-shell { display: block; }
  .chat-sidebar, .chat-conversation { height: 100%; }
  .chat-conversation { display: none; }
  #leads.chat-open .chat-sidebar { display: none; }
  #leads.chat-open .chat-conversation { display: flex; }
  .chat-back { display: block; padding: 8px 4px; cursor: pointer; }
  .chat-header { min-height: 66px; }
  .chat-header .chat-avatar { width: 36px; height: 36px; border-radius: 11px; }
  .chat-header-actions .leads-button, .chat-primary-action { max-width: 94px; line-height: 1.15; }
  .lead-message { max-width: 88%; }
  .chat-thread { padding-inline: 14px; }
  .chat-composer { padding-inline: 12px; }
  .chat-send { padding-inline: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

@media (min-width: 99999px) {
  body.dashboard-open { overflow: auto; }
  .app-shell { height: auto; min-height: 100vh; }
  .main-content { height: auto; min-height: 100vh; display: block; }
  .topbar { min-height: 76px; padding: 17px clamp(24px, 4vw, 58px); position: sticky; }
  .breadcrumb { display: block; }
  .hero-grid { padding: 52px clamp(24px, 4vw, 58px) 34px; grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr); gap: 34px; }
  .hero-copy .eyebrow { font-size: 11px; }
  .hero-copy h2 { margin: 16px 0; font-size: clamp(42px, 5vw, 64px); }
  .hero-copy > p { font-size: 13px; line-height: 1.65; }
  .progress-card { height: auto; min-height: 190px; padding: 24px; border-radius: var(--radius-lg); }
  .progress-number { font-size: 38px; }
  .progress-top p { margin-top: 7px; font-size: 10px; }
  .progress-orbit { width: 61px; height: 61px; border-width: 6px; }
  .progress-orbit span, .progress-message { font-size: 10px; }
  .progress-track { margin: 23px 0 16px; }
  .section-block { min-height: 0; padding: 5px clamp(24px, 4vw, 58px) 45px; display: block; }
  .section-heading { margin-bottom: 19px; }
  .section-heading .section-kicker { display: block; }
  .section-heading h2 { margin-top: 7px; font-size: 25px; }
  .section-heading > p { font-size: 10px; }
  .integration-grid { min-height: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .integration-card { height: auto; min-height: 270px; padding: 21px; border-radius: var(--radius-md); }
  .service-icon { width: 44px; height: 44px; border-radius: 13px; }
  .status-pill { padding: 7px 10px; font-size: 9px; }
  .card-copy { margin-top: 30px; }
  .service-type { margin-bottom: 7px; font-size: 9px; }
  .card-copy h3 { margin-bottom: 10px; font-size: 24px; }
  .card-copy > p:last-child { font-size: 11px; line-height: 1.65; }
  .card-footer { padding-top: 15px; }
  .card-footer > span, .card-footer a, .text-button { font-size: 9px; }
  .meta-integration-card { min-height: 0; margin: 0; padding: 0; grid-template-columns: minmax(190px, .48fr) minmax(0, 1.52fr); grid-template-rows: none; }
  .meta-integration-card .meta-art { min-height: 360px; }
  .meta-content { padding: clamp(30px, 4vw, 48px); overflow: visible; }
  .meta-heading h2 { font-size: 36px; }
  .meta-heading .section-kicker { font-size: 11px; }
  .meta-description { margin: 20px 0 24px; font-size: 11px; line-height: 1.65; }
  .meta-steps { gap: 8px; }
  .mini-step { padding: 11px; gap: 8px; }
  .mini-step > span { width: 25px; height: 25px; font-size: 9px; }
  .mini-step strong { font-size: 9px; }
  .mini-step small { display: block; }
  .app-footer { margin: 0 clamp(24px, 4vw, 58px); padding: 20px 0 30px; }
}
