:root {
  --ink: #172033;
  --muted: #68738a;
  --line: #e5e9f2;
  --surface: #ffffff;
  --canvas: #f4f6fa;
  --nav: #11192b;
  --nav-soft: #1b2540;
  --purple: #7257f6;
  --purple-dark: #5d43df;
  --purple-soft: #eeeaff;
  --green: #0e9f6e;
  --green-soft: #dcfce7;
  --amber: #d97706;
  --amber-soft: #fff5d8;
  --red: #dc3f52;
  --red-soft: #ffe6e9;
  --blue: #1877f2;
  --shadow: 0 14px 36px rgba(30, 42, 72, .08);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { min-height: 100%; font-size: 16px; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--purple); text-decoration: none; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3 { letter-spacing: -.025em; line-height: 1.18; }
button { cursor: pointer; }

.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); }
.brand-icon {
  display: grid; width: 44px; height: 44px; place-items: center;
  border-radius: 13px; color: #fff; font-weight: 900; font-size: 21px;
  background: linear-gradient(145deg, #8a6dff, #5b3fe0);
  box-shadow: 0 9px 20px rgba(114, 87, 246, .26);
}
.brand > span:last-child { display: grid; line-height: 1.05; }
.brand b { font-size: 20px; letter-spacing: .09em; }
.brand small { color: var(--muted); font-size: 10px; letter-spacing: .16em; margin-top: 5px; }
.brand.light { color: #fff; }
.brand.light small { color: #aeb8ce; }

.btn {
  display: inline-flex; min-height: 47px; align-items: center; justify-content: center;
  gap: 8px; padding: 11px 18px; border: 1px solid transparent; border-radius: 11px;
  font-weight: 750; font-size: 15px; transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .48; cursor: not-allowed; transform: none; }
.btn-primary { color: #fff; background: var(--purple); box-shadow: 0 9px 20px rgba(114, 87, 246, .22); }
.btn-primary:hover { background: var(--purple-dark); }
.btn-secondary { color: var(--ink); background: #fff; border-color: #dbe0ea; }
.btn-secondary:hover { border-color: #bdc5d5; }
.btn-block { width: 100%; }
.eyebrow { display: block; margin-bottom: 11px; color: var(--purple); font-size: 12px; font-weight: 850; letter-spacing: .13em; }

label { display: grid; gap: 8px; color: #3d465b; font-size: 14px; font-weight: 700; }
input, select, textarea {
  width: 100%; min-height: 48px; padding: 11px 13px; color: var(--ink);
  background: #fff; border: 1px solid #d9deea; border-radius: 10px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder { color: #9da6b7; }
input:focus, select:focus, textarea:focus { border-color: var(--purple); box-shadow: 0 0 0 4px rgba(114,87,246,.1); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-grid.one { grid-template-columns: 1fr; }
.form-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.checkbox { display: flex; grid: none; align-items: flex-start; gap: 9px; font-size: 14px; font-weight: 600; }
.checkbox input { width: 17px; min-height: 17px; height: 17px; accent-color: var(--purple); }
.muted { color: var(--muted); font-size: 13px; }
.block { display: block; color: var(--muted); }
.form-error, .flash { padding: 13px 15px; border-radius: 10px; font-weight: 650; font-size: 14px; }
.form-error, .flash-error { color: #991b2d; background: var(--red-soft); border: 1px solid #fecdd3; }
.flash-success { color: #08744f; background: var(--green-soft); border: 1px solid #bbf7d0; }
.flash { position: relative; margin-bottom: 18px; }
.flash button { position: absolute; top: 7px; right: 8px; border: 0; background: transparent; font-size: 22px; color: inherit; }
.password-input { position: relative; }
.password-input input { padding-right: 78px; }
.password-input button { position: absolute; top: 8px; right: 8px; padding: 6px 8px; border: 0; color: var(--purple); background: transparent; font-size: 12px; font-weight: 800; }

/* Public login and registration */
.public-body { background: #fff; }
.auth-layout { display: grid; min-height: 100vh; grid-template-columns: minmax(0, 1.08fr) minmax(470px, .92fr); }
.auth-visual {
  position: relative; display: flex; min-height: 100vh; flex-direction: column; justify-content: space-between;
  padding: 48px clamp(44px, 6vw, 98px); overflow: hidden; color: #fff;
  background:
    radial-gradient(circle at 85% 10%, rgba(114,87,246,.56), transparent 37%),
    radial-gradient(circle at 12% 88%, rgba(25,183,237,.21), transparent 34%),
    linear-gradient(145deg, #11182b 0%, #1a2442 53%, #151b31 100%);
}
.auth-visual::after {
  content: ""; position: absolute; width: 410px; height: 410px; right: -180px; bottom: 11%;
  border: 1px solid rgba(255,255,255,.11); border-radius: 50%; box-shadow: 0 0 0 64px rgba(255,255,255,.025), 0 0 0 128px rgba(255,255,255,.018);
}
.auth-message { position: relative; z-index: 1; max-width: 660px; padding: 70px 0 40px; }
.auth-message > span { color: #bbaeff; font-size: 13px; font-weight: 850; letter-spacing: .14em; }
.auth-message h1 { max-width: 620px; margin: 20px 0 22px; font-size: clamp(42px, 5vw, 70px); font-weight: 750; }
.auth-message p { max-width: 610px; color: #c7cfdf; font-size: 19px; line-height: 1.65; }
.auth-stats { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; border: 1px solid rgba(255,255,255,.11); border-radius: 14px; overflow: hidden; }
.auth-stats div { display: grid; gap: 3px; padding: 18px; background: rgba(255,255,255,.055); backdrop-filter: blur(12px); }
.auth-stats b { font-size: 15px; }
.auth-stats span { color: #aeb8cc; font-size: 12px; }
.auth-panel { display: grid; place-items: center; padding: 48px clamp(32px, 5vw, 92px); background: #fff; }
.auth-card { width: min(100%, 480px); }
.auth-card h2, .register-form h2 { margin-bottom: 10px; font-size: 36px; }
.auth-card > p, .register-form > p { color: var(--muted); margin-bottom: 30px; }
.auth-card > label { margin-bottom: 18px; }
.auth-card .form-row { margin: 2px 0 22px; }
.auth-link { margin: 24px 0 0 !important; text-align: center; font-size: 14px; }
.auth-link a { font-weight: 800; }
.public-top { display: flex; max-width: 1320px; margin: auto; padding: 28px 36px; align-items: center; justify-content: space-between; }
.public-top > a:last-child { color: var(--ink); font-weight: 750; }
.register-shell { display: grid; max-width: 1320px; margin: 18px auto 64px; padding: 0 36px; grid-template-columns: 390px 1fr; gap: 30px; }
.plan-summary {
  padding: 38px; align-self: start; color: #fff; border-radius: 22px; overflow: hidden;
  background: linear-gradient(145deg, #151d34, #222d4c); box-shadow: var(--shadow);
}
.plan-summary .eyebrow { color: #bbaeff; }
.plan-summary h1 { margin-bottom: 24px; font-size: 30px; }
.price { display: flex; align-items: flex-start; gap: 3px; padding-bottom: 22px; border-bottom: 1px solid rgba(255,255,255,.12); }
.price sup { margin-top: 10px; font-size: 22px; }
.price b { font-size: 60px; line-height: .95; }
.price span { align-self: flex-end; color: #aeb8cc; }
.plan-summary > p { color: #c4ccdb; margin: 25px 0; }
.plan-summary ul { display: grid; gap: 14px; padding: 0; list-style: none; }
.plan-summary li { color: #eef1f8; }
.secure-note { margin-top: 28px; padding: 14px; border-radius: 10px; color: #d7ddeb; background: rgba(255,255,255,.07); font-size: 13px; }
.register-form { padding: 42px; background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
.register-form .terms { margin: 24px 0; }

/* App chrome */
.app-shell { display: grid; min-height: 100vh; grid-template-columns: 282px minmax(0, 1fr); }
.sidebar {
  position: fixed; z-index: 30; inset: 0 auto 0 0; display: flex; width: 282px; flex-direction: column;
  padding: 27px 20px 20px; color: #fff; background: var(--nav); box-shadow: 8px 0 28px rgba(12,18,32,.08);
}
.sidebar .brand { margin: 0 10px 28px; }
.workspace { display: flex; min-height: 72px; align-items: center; gap: 12px; padding: 12px; border: 1px solid #2a3551; border-radius: 13px; background: #19233a; }
.workspace > span { display: grid; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; border-radius: 11px; background: #343f60; font-weight: 900; }
.workspace div { display: grid; min-width: 0; }
.workspace small { color: #8995ad; font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.workspace b { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar nav { margin-top: 28px; }
.sidebar nav > small { display: block; margin: 0 13px 10px; color: #6f7c96; font-size: 10px; font-weight: 850; letter-spacing: .13em; }
.sidebar nav a { display: flex; height: 52px; align-items: center; gap: 13px; margin: 5px 0; padding: 0 14px; color: #abb5c8; border-radius: 11px; font-size: 15px; font-weight: 650; }
.sidebar nav a i { display: grid; width: 27px; place-items: center; font-style: normal; font-size: 21px; }
.sidebar nav a:hover { color: #fff; background: rgba(255,255,255,.045); }
.sidebar nav a.active { color: #fff; background: var(--purple); box-shadow: 0 10px 22px rgba(114,87,246,.22); }
.sidebar-user { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; margin-top: auto; padding: 14px 8px 0; border-top: 1px solid #26314a; }
.sidebar-user > div { display: grid; min-width: 0; }
.sidebar-user b { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user small { color: #7f8ca5; font-size: 11px; }
.sidebar-user form button { border: 0; color: #96a2b8; background: transparent; font-size: 22px; }
.main { grid-column: 2; min-width: 0; }
.topbar {
  position: sticky; z-index: 20; top: 0; display: flex; height: 78px; align-items: center; justify-content: space-between;
  padding: 0 34px; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); backdrop-filter: blur(18px);
}
.mobile-nav { display: none; }
.top-search { display: flex; width: min(460px, 50%); align-items: center; gap: 9px; color: #9ba4b6; font-size: 25px; }
.top-search input { border: 0; box-shadow: none; background: transparent; }
.top-search input:focus { box-shadow: none; }
.top-user { position: relative; display: flex; align-items: center; gap: 12px; }
.notifications { position: relative; display: grid; width: 43px; height: 43px; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); background: #fff; font-size: 22px; }
.notifications i { position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; border: 2px solid #fff; border-radius: 50%; background: var(--red); }
.avatar { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; border-radius: 11px; color: #5743be; background: var(--purple-soft); font-size: 12px; font-weight: 850; }
button.avatar { border: 0; }
.avatar.dark { color: #fff; background: var(--nav); }
.avatar.large { width: 70px; height: 70px; margin: auto; border-radius: 19px; font-size: 20px; }
.popover {
  position: absolute; z-index: 60; top: 56px; right: 54px; display: none; width: 340px;
  padding: 17px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 20px 45px rgba(25,35,55,.16);
}
.popover.open { display: block; }
.popover h4 { margin: 2px 3px 10px; font-size: 16px; }
.notice { display: flex; gap: 12px; padding: 12px 4px; border-top: 1px solid #eff1f5; }
.notice > i { width: 9px; height: 9px; margin-top: 6px; border-radius: 50%; background: var(--purple); }
.notice > i.amber { background: var(--amber); }
.notice p, .profile-menu p { display: grid; margin: 0; }
.notice b { font-size: 13px; }
.notice span { color: var(--muted); font-size: 12px; }
.profile-menu { right: 0; width: 300px; }
.profile-menu > div { display: flex; align-items: center; gap: 12px; }
.profile-menu p b { font-size: 14px; }
.profile-menu p small { color: var(--muted); }
.role-note { margin: 14px 0 !important; padding: 10px; border-radius: 8px; background: var(--canvas); color: var(--muted); font-size: 12px; }
.logout { width: 100%; padding: 10px; border: 0; border-radius: 9px; color: var(--red); background: var(--red-soft); font-weight: 800; }
.content { padding: 31px 34px 60px; }
.page-heading { display: flex; min-height: 66px; align-items: center; justify-content: space-between; margin-bottom: 21px; }
.page-heading span { color: var(--purple); font-size: 11px; font-weight: 850; letter-spacing: .13em; }
.page-heading h1 { margin: 4px 0 0; font-size: 30px; }

/* Dashboard and panels */
.panel, .integration-card, .billing-hero {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.panel { margin-bottom: 24px; }
.panel-head { display: flex; min-height: 83px; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 0 0 4px; font-size: 19px; }
.panel-head p { margin: 0; color: var(--muted); font-size: 13px; }
.panel-head > a { font-size: 13px; font-weight: 800; }
.connection-banner, .security-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; padding: 18px 21px;
  color: #fff; border-radius: 15px; background: linear-gradient(100deg, #18213a, #243253);
}
.connection-banner > div, .security-banner { display: flex; align-items: center; }
.connection-banner > div { gap: 13px; }
.connection-banner p, .security-banner p { display: grid; margin: 0; }
.connection-banner p small, .security-banner p small { color: #bfc8da; }
.wa-logo, .google-logo {
  display: grid; width: 47px; height: 47px; flex: 0 0 47px; place-items: center; border-radius: 13px;
  color: #fff; background: #19b86e; font-weight: 900; font-size: 20px;
}
.google-logo { color: #fff; background: linear-gradient(135deg, #4285f4 0 50%, #ea4335 50%); }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 17px; margin-bottom: 24px; }
.metric-grid article { position: relative; display: grid; min-height: 145px; align-content: center; padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.metric-grid article::before { content: ""; position: absolute; top: 0; left: 24px; width: 38px; height: 4px; border-radius: 0 0 5px 5px; background: var(--purple); }
.metric-grid small { color: var(--muted); font-size: 12px; font-weight: 750; }
.metric-grid b { margin: 7px 0 3px; font-size: 32px; line-height: 1.1; }
.metric-grid span { color: var(--muted); font-size: 12px; }
.metric-grid .featured { color: #fff; background: linear-gradient(140deg, #7257f6, #573bd8); border-color: transparent; }
.metric-grid .featured::before { background: #fff; }
.metric-grid .featured small, .metric-grid .featured span { color: #e2dcff; }
.empty { display: grid; min-height: 280px; place-items: center; align-content: center; padding: 40px; text-align: center; }
.empty > span { display: grid; width: 60px; height: 60px; place-items: center; margin-bottom: 13px; border-radius: 18px; color: var(--purple); background: var(--purple-soft); font-size: 27px; }
.empty h3 { margin: 0 0 7px; }
.empty p { max-width: 500px; color: var(--muted); }
.empty.small { min-height: 120px; }
.toolbar { display: flex; gap: 12px; padding: 16px 24px; border-bottom: 1px solid var(--line); }
.toolbar input { max-width: 420px; }
.toolbar select { max-width: 210px; }
.lead-help { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; padding: 20px 22px; border: 1px solid #c7eadf; border-radius: var(--radius); background: #effbf7; }
.lead-help > span { display: grid; place-items: center; flex: 0 0 42px; width: 42px; height: 42px; border-radius: 12px; color: #fff; background: var(--green); font-size: 20px; font-weight: 900; }
.lead-help div { flex: 1; }
.lead-help b { display: block; margin-bottom: 4px; font-size: 16px; color: #145946; }
.lead-help p { margin: 0; color: #477568; font-size: 14px; line-height: 1.55; }
.lead-edit { border: 1px solid #d9d6ed; border-radius: 9px; padding: 9px 13px; background: #fff; color: var(--purple); font-weight: 800; cursor: pointer; }
.lead-edit:hover { border-color: var(--purple); background: var(--purple-soft); }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th { padding: 13px 20px; color: #7d8799; background: #fafbfc; font-size: 10px; font-weight: 850; letter-spacing: .08em; text-align: left; }
td { padding: 16px 20px; border-top: 1px solid #eef0f4; font-size: 14px; vertical-align: middle; }
tbody tr:hover { background: #fafbff; }
td select { min-height: 37px; padding: 7px 34px 7px 10px; font-size: 12px; }
.person { display: flex; align-items: center; gap: 12px; }
.person p { display: grid; margin: 0; }
.person b { font-size: 14px; }
.person small { color: var(--muted); font-size: 12px; }
.source, .status, .subscription-status {
  display: inline-flex; min-height: 28px; align-items: center; padding: 4px 9px; border-radius: 99px;
  color: #4a556b; background: #edf0f5; font-size: 11px; font-weight: 800;
}
.source-whatsapp_ad, .source-whatsapp_organic, .status-active, .status-won, .status-paid { color: #087b54; background: var(--green-soft); }
.source-google_lead_form, .source-google_ads { color: #155bb0; background: #e2efff; }
.source-meta_lead_form { color: #155bb0; background: #e5efff; }
.status-new, .status-trialing, .status-pending { color: #6249d7; background: var(--purple-soft); }
.status-contacting, .status-proposal { color: #a55e04; background: var(--amber-soft); }
.status-past_due, .status-suspended, .status-cancelled, .status-lost { color: #b12c40; background: var(--red-soft); }

/* Inbox */
.inbox { display: grid; min-height: calc(100vh - 207px); grid-template-columns: 300px minmax(360px, 1fr) 260px; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.inbox-empty { grid-column: 1 / -1; }
.conversation-list { border-right: 1px solid var(--line); overflow-y: auto; }
.conversation-search { padding: 15px; border-bottom: 1px solid var(--line); }
.conversation-list > a { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 14px; color: var(--ink); border-bottom: 1px solid #eff1f5; }
.conversation-list > a.active { background: var(--purple-soft); box-shadow: inset 3px 0 var(--purple); }
.conversation-list p { display: grid; min-width: 0; margin: 0; }
.conversation-list b, .conversation-list small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation-list b { font-size: 13px; }
.conversation-list small, .conversation-list time { color: var(--muted); font-size: 11px; }
.chat { display: grid; grid-template-rows: auto auto 1fr auto; min-width: 0; background: #f7f8fb; }
.chat > header { display: flex; min-height: 74px; align-items: center; justify-content: space-between; padding: 12px 18px; background: #fff; border-bottom: 1px solid var(--line); }
.ad-referral { display: flex; gap: 12px; margin: 13px 16px 0; padding: 12px; border: 1px solid #dce6ff; border-radius: 11px; background: #f2f6ff; }
.ad-referral > span { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 9px; color: #fff; background: var(--blue); font-size: 10px; font-weight: 900; }
.ad-referral p { display: grid; margin: 0; }
.ad-referral small { color: var(--blue); font-size: 9px; font-weight: 850; letter-spacing: .08em; }
.ad-referral b { font-size: 12px; }
.ad-referral em { color: var(--muted); font-size: 11px; font-style: normal; }
.messages { display: flex; min-height: 350px; flex-direction: column; gap: 10px; padding: 18px; overflow-y: auto; }
.message { max-width: min(76%, 560px); padding: 10px 13px; border-radius: 13px 13px 13px 3px; background: #fff; box-shadow: 0 3px 10px rgba(40,50,70,.06); }
.message.outbound { align-self: flex-end; border-radius: 13px 13px 3px 13px; color: #fff; background: var(--purple); }
.message.system { align-self: center; color: var(--muted); background: #e9edf4; }
.message p { margin: 0; font-size: 14px; }
.message small { display: block; margin-top: 4px; color: #8b94a7; font-size: 9px; }
.message.outbound small { color: #dcd6ff; }
.composer { display: flex; gap: 10px; padding: 14px; background: #fff; border-top: 1px solid var(--line); }
.composer button { padding: 0 22px; border: 0; border-radius: 10px; color: #fff; background: var(--purple); font-weight: 800; }
.channel-reply-note { padding: 14px 18px; color: #5d6679; background: #fff8e6; border-top: 1px solid #f2dfad; font-size: 13px; text-align: center; }
.lead-context { padding: 27px 20px; text-align: center; border-left: 1px solid var(--line); }
.lead-context h3 { margin: 13px 0 2px; }
.lead-context > p { color: var(--muted); font-size: 12px; }
.lead-context dl { margin-top: 28px; text-align: left; }
.lead-context dl div { display: grid; gap: 2px; padding: 12px 0; border-top: 1px solid var(--line); }
.lead-context dt { color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; }
.lead-context dd { margin: 0; font-size: 13px; overflow-wrap: anywhere; }

/* Integrations, users, billing and admin */
.connection-intro {
  display: grid; grid-template-columns: minmax(250px, .62fr) minmax(0, 1.38fr); gap: 28px; align-items: center;
  margin-bottom: 22px; padding: 27px; color: #fff; border-radius: 18px;
  background: radial-gradient(circle at 86% 10%, rgba(114,87,246,.42), transparent 36%), linear-gradient(145deg, #11192c, #202b49);
  box-shadow: var(--shadow);
}
.connection-intro h2 { margin: 0 0 8px; font-size: 25px; }
.connection-intro p { margin: 0; color: #b9c3d6; font-size: 14px; }
.connection-intro .eyebrow { color: #bcaeff; }
.channel-paths { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.channel-paths a { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; min-height: 76px; padding: 12px; color: #fff; border: 1px solid rgba(255,255,255,.12); border-radius: 13px; background: rgba(255,255,255,.06); }
.channel-paths a:hover { background: rgba(255,255,255,.1); }
.channel-paths p { display: grid; min-width: 0; margin: 0; }
.channel-paths b { font-size: 12px; }
.channel-paths small { color: #9eabc0; font-size: 10px; }
.channel-paths em { color: #a99aff; font-style: normal; }
.security-banner { justify-content: flex-start; color: #28564a; background: #eafbf3; border: 1px solid #c9f2df; }
.security-banner > span { display: grid; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; margin-right: 12px; border-radius: 11px; background: #cbf4df; }
.security-banner p small { color: #4e756b; }
.integration-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.integration-card { padding: 25px; }
.integration-card.full { grid-column: 1 / -1; }
.integration-title { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 13px; padding-bottom: 21px; border-bottom: 1px solid var(--line); }
.integration-title h2 { margin: 0 0 3px; font-size: 18px; }
.integration-title p { margin: 0; color: var(--muted); font-size: 12px; }
.integration-title em { color: var(--muted); font-size: 11px; font-style: normal; font-weight: 750; }
.integration-title em.connected { color: var(--green); }
.simple-connect-hero { min-height: 190px; margin-bottom: 20px; padding: 34px 38px; display: flex; align-items: center; justify-content: space-between; gap: 30px; color: #fff; border-radius: var(--radius); background: linear-gradient(135deg,#121a2c,#24204b); box-shadow: 0 16px 38px rgba(18,26,44,.16); }
.simple-connect-hero h2 { margin: 7px 0 10px; font-size: 30px; letter-spacing: -.035em; }
.simple-connect-hero p { max-width: 720px; margin: 0; color: #bdc6d9; font-size: 15px; line-height: 1.65; }
.simple-connect-hero .eyebrow { color: #aa9aff; }
.managed-badge { flex: 0 0 auto; padding: 12px 15px; border: 1px solid rgba(255,255,255,.14); border-radius: 10px; color: #d7d1ff; background: rgba(255,255,255,.07); font-size: 12px; font-weight: 800; }
.client-steps { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 14px; margin-bottom: 20px; padding: 19px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.client-steps > div { display: flex; align-items: center; gap: 11px; }
.client-steps > div > span { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 auto; border-radius: 9px; color: var(--purple); background: var(--purple-soft); font-weight: 900; }
.client-steps p { display: grid; gap: 3px; margin: 0; }
.client-steps b { font-size: 13px; }.client-steps small { color: var(--muted); font-size: 11px; }
.client-steps > i { color: #c7cbd6; font-style: normal; font-size: 18px; }
.simple-connection-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.simple-connection-card { padding: 25px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.simple-connection-card.full { grid-column: 1 / -1; }
.simple-channel-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 13px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.simple-channel-head h2 { margin: 0 0 4px; font-size: 19px; }.simple-channel-head p { margin: 0; color: var(--muted); font-size: 12px; }
.simple-channel-head em { color: var(--muted); font-size: 11px; font-style: normal; font-weight: 800; }
.simple-channel-head em.connection-ready { color: var(--green); }.simple-channel-head em.connection-waiting { color: #a56512; }
.simple-benefit { margin: 20px 0; padding: 16px 17px; border-left: 3px solid var(--green); border-radius: 0 10px 10px 0; background: var(--green-soft); }
.simple-benefit.meta { border-color: #247cf0; background: #eef5ff; }.simple-benefit.google { border-color: #ec4b40; background: #fff4f1; }
.simple-benefit b { display: block; margin-bottom: 4px; font-size: 12px; }.simple-benefit p { margin: 0; color: #697387; font-size: 12px; line-height: 1.55; }
.simple-request-form { display: grid; gap: 9px; }.simple-request-form .btn { min-height: 48px; width: 100%; }.simple-request-form > small { color: var(--muted); font-size: 10px; text-align: center; }
.connected-summary, .request-progress { display: flex; align-items: center; gap: 12px; padding: 16px; border: 1px solid #c9ebdf; border-radius: 11px; background: #f2fbf8; }
.request-progress { border-color: #f1dfb8; background: #fff9ec; }
.connected-summary > span, .request-progress > span { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 auto; border-radius: 10px; color: #fff; background: var(--green); font-weight: 900; }
.request-progress > span { color: #9a6618; background: #f8e6bd; }
.connected-summary p, .request-progress p { display: grid; gap: 3px; margin: 0; }.connected-summary small, .request-progress small { color: var(--muted); font-size: 11px; }
.client-picker { margin-top: 0; }.client-safety-note { display: flex; align-items: center; gap: 12px; margin-top: 20px; padding: 18px 20px; border: 1px solid #d8dced; border-radius: var(--radius); background: #f8f9fd; }
.client-safety-note > span { color: var(--purple); font-size: 22px; }.client-safety-note p { display: grid; gap: 3px; margin: 0; }.client-safety-note small { color: var(--muted); }
.admin-implementation-hero { min-height: 145px; margin-bottom: 20px; padding: 28px 32px; display: flex; align-items: center; justify-content: space-between; color: #fff; border-radius: var(--radius); background: linear-gradient(135deg,#161d31,#2c2458); }
.admin-implementation-hero h2 { margin: 6px 0 7px; font-size: 26px; }.admin-implementation-hero p { margin: 0; color: #bdc5d7; }
.admin-implementation-hero > div:last-child { min-width: 150px; padding: 18px; border-radius: 12px; background: rgba(255,255,255,.08); text-align: center; }
.admin-implementation-hero > div:last-child b, .admin-implementation-hero > div:last-child span { display: block; }.admin-implementation-hero > div:last-child b { font-size: 30px; }.admin-implementation-hero > div:last-child span { color: #c9c2ef; font-size: 11px; }
.company-implementation-picker { margin: 20px 0; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.company-implementation-picker label { display: flex; align-items: center; gap: 15px; color: var(--ink); font-weight: 800; }.company-implementation-picker select { max-width: 440px; }
.technical-workspace { padding: 25px; border: 1px solid #ded9f4; border-radius: var(--radius); background: #f8f7fc; }
.technical-workspace-head { display: flex; align-items: center; gap: 13px; margin-bottom: 20px; }.technical-workspace-head h2 { margin: 3px 0; }.technical-workspace-head p { margin: 0; color: var(--muted); }
.technical-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }.technical-grid > .full { grid-column: 1 / -1; }
.technical-grid .form-panel form { padding-top: 20px; }.technical-grid .form-panel form label { margin-bottom: 13px; }
.owner-webhook { display: grid; gap: 7px; margin-top: 18px; padding: 14px; border-radius: 9px; background: var(--canvas); }.owner-webhook code { overflow-wrap: anywhere; color: var(--purple); }.owner-webhook small { color: var(--muted); }
.inline-activation-form { padding-top: 9px !important; }
.webhook-diagnostic { display: grid; gap: 5px; margin-top: 12px; padding: 13px; border: 1px solid #cfe8dd; border-radius: 9px; background: #f1fbf7; color: #225d4b; }
.webhook-diagnostic span, .webhook-diagnostic small { line-height: 1.45; }.webhook-diagnostic.error { border-color: #f0c8c8; background: #fff4f4; color: #9d3030; }
.btn.compact { min-height: 36px; padding: 8px 12px; font-size: 11px; }
.meta-logo {
  display: grid; width: 47px; height: 47px; flex: 0 0 47px; place-items: center; border-radius: 13px;
  color: #fff; background: #1877f2; font-family: Arial, sans-serif; font-size: 28px; font-weight: 900;
}
.meta-logo.small { width: 38px; height: 38px; flex-basis: 38px; border-radius: 10px; font-size: 22px; }
.flow-note { display: grid; gap: 4px; margin-top: 20px; padding: 14px 16px; border-left: 3px solid #20b774; border-radius: 4px 10px 10px 4px; color: #3e6057; background: #eefbf5; }
.flow-note.meta { color: #31587f; background: #eef5ff; border-left-color: #1877f2; }
.flow-note.google { color: #66561f; background: #fff9e8; border-left-color: #f5b400; }
.flow-note b { font-size: 12px; }
.flow-note span { font-size: 12px; line-height: 1.55; }
.setup-guide { margin-top: 16px; border: 1px solid #dfe3ec; border-radius: 12px; background: #fafbfc; overflow: hidden; }
.setup-guide summary { padding: 14px 16px; color: #30394d; font-size: 13px; font-weight: 800; cursor: pointer; list-style-position: inside; }
.setup-guide[open] summary { border-bottom: 1px solid #e5e8ef; background: #f5f7fa; }
.setup-guide ol { display: grid; gap: 8px; margin: 0; padding: 16px 20px 16px 38px; color: #5f6b80; font-size: 12px; }
.setup-guide li::marker { color: var(--purple); font-weight: 850; }
.setup-guide a { font-weight: 800; }
.setup-guide.technical .webhook-box { border: 0; border-radius: 0; }
.guide-warning { margin: 0 16px 16px; padding: 11px 13px; border-radius: 8px; color: #9a5a06; background: var(--amber-soft); font-size: 12px; font-weight: 750; }
.integration-form label > small, .test-form label > small { color: #8993a6; font-size: 10px; font-weight: 600; }
.integration-form { padding: 23px 0; }
.integration-form > label { margin-bottom: 16px; }
.integration-form .btn { margin-top: 18px; }
.webhook-box { padding: 17px; border: 1px solid #dfe3ec; border-radius: 12px; background: #f8f9fb; }
.webhook-box > span { display: block; margin-bottom: 12px; color: var(--muted); font-size: 10px; font-weight: 850; letter-spacing: .1em; }
.webhook-box label { margin-bottom: 12px; }
.webhook-box label > div { display: flex; min-width: 0; }
.webhook-box code { min-width: 0; flex: 1; overflow: hidden; padding: 10px; border: 1px solid #dfe3ec; border-radius: 8px 0 0 8px; background: #fff; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.webhook-box button { padding: 8px 10px; border: 0; border-radius: 0 8px 8px 0; color: #fff; background: var(--nav-soft); font-size: 11px; }
.webhook-box > p { margin: 12px 0 0; color: var(--muted); font-size: 12px; }
.test-form { display: flex; align-items: end; gap: 12px; padding-top: 20px; }
.test-form label { flex: 1; }
.test-form .btn { flex: 0 0 auto; }
.owner-setup { margin-top: 20px; padding: 17px; border: 1px solid #ddd6fe; border-radius: 12px; background: #f5f2ff; }
.owner-setup > span { color: var(--purple); font-size: 9px; font-weight: 900; letter-spacing: .1em; }
.owner-setup h3 { margin: 7px 0 5px; font-size: 16px; }
.owner-setup p { margin: 0; color: #6c6680; font-size: 12px; }
.oauth-connect { display: grid; place-items: center; gap: 10px; padding: 32px 20px; text-align: center; }
.oauth-connect p { max-width: 450px; margin: 0; color: var(--muted); font-size: 12px; }
.meta-connect { color: #fff; background: #1877f2; box-shadow: 0 9px 20px rgba(24,119,242,.2); }
.meta-connect span { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; color: #1877f2; background: #fff; font-family: Arial, sans-serif; font-size: 18px; font-weight: 900; }
.page-picker { margin-top: 20px; padding: 20px; border: 1px solid #d8e5fb; border-radius: 13px; background: #f3f7ff; }
.page-picker h3 { margin-bottom: 14px; }
.page-picker form { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border-top: 1px solid #dde6f4; }
.page-picker form > div { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; }
.page-picker form .meta-logo { grid-row: 1 / 3; }
.page-picker form b { font-size: 13px; }
.page-picker form small { color: var(--muted); font-size: 10px; }
.two-column { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(320px, .7fr); gap: 22px; }
.form-panel { padding: 25px; }
.form-panel h2 { margin-bottom: 8px; }
.form-panel > p { color: var(--muted); font-size: 14px; }
.form-panel form { display: grid; gap: 15px; }
.billing-hero { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 24px; margin-bottom: 22px; padding: 30px; overflow: hidden; }
.billing-hero::after { content: ""; position: absolute; width: 180px; height: 180px; right: -80px; bottom: -120px; border-radius: 50%; background: var(--purple-soft); }
.billing-hero h2 { margin-bottom: 7px; font-size: 27px; }
.billing-hero p { max-width: 630px; margin: 0; color: var(--muted); }
.billing-price { display: grid; padding-right: 130px; text-align: right; }
.billing-price b { font-size: 34px; }
.billing-price span { color: var(--muted); font-size: 12px; }
.subscription-status { position: absolute; z-index: 1; top: 23px; right: 23px; }
.billing-grid { display: grid; grid-template-columns: minmax(300px, .7fr) minmax(0, 1.3fr); gap: 22px; }
.setup-required { padding: 15px; color: #8a5b08; background: var(--amber-soft); border-radius: 9px; font-size: 13px; }
.admin-finance { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .45fr); gap: 20px; }
.finance-numbers { display: grid; grid-template-columns: repeat(3, 1fr); padding: 27px 23px; }
.finance-numbers div { display: grid; gap: 7px; padding: 5px 22px; border-left: 1px solid var(--line); }
.finance-numbers div:first-child { border-left: 0; padding-left: 0; }
.finance-numbers small, .plan-mini > small { color: var(--muted); font-size: 10px; font-weight: 850; letter-spacing: .08em; }
.finance-numbers b { font-size: 25px; }
.plan-mini { padding: 24px; color: #fff; background: linear-gradient(145deg, #18213a, #263453); border: 0; }
.plan-mini > small { color: #9ba8c0; }
.plan-mini h2 { margin: 11px 0 20px; }
.plan-mini div { display: flex; align-items: end; gap: 5px; }
.plan-mini div b { font-size: 32px; }
.plan-mini div span, .plan-mini p { color: #abb6ca; font-size: 12px; }
.plan-mini p { margin: 14px 0 0; }

/* Modal */
.modal { width: min(520px, calc(100% - 28px)); padding: 0; border: 0; border-radius: 18px; box-shadow: 0 25px 75px rgba(20,28,44,.3); }
.modal.modal-wide { width: min(760px, calc(100% - 28px)); }
.modal::backdrop { background: rgba(12,18,31,.6); backdrop-filter: blur(4px); }
.modal > form { position: relative; padding: 30px; }
.modal-close { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border: 0; border-radius: 9px; color: var(--muted); background: var(--canvas); font-size: 21px; }
.modal h2 { margin-bottom: 22px; }
.modal h2 + .modal-description { margin: -14px 0 22px; color: var(--muted); line-height: 1.55; }
.modal .btn { width: 100%; margin-top: 22px; }
.lead-form-grid { align-items: end; }
.lead-form-grid .field-span-2 { grid-column: 1 / -1; }
.lead-form-grid textarea { resize: vertical; min-height: 96px; }

/* Installer */
.installer-body { padding: 40px 20px; background: linear-gradient(145deg, #11192c, #242f50); }
.installer { width: min(940px, 100%); margin: auto; padding: 38px; border-radius: 22px; background: #fff; box-shadow: 0 25px 80px rgba(0,0,0,.25); }
.installer-head { display: flex; align-items: center; gap: 17px; padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.installer-head > div > span { color: var(--purple); font-size: 10px; font-weight: 850; letter-spacing: .14em; }
.installer-head h1 { margin: 3px 0; font-size: 30px; }
.installer-head p { margin: 0; color: var(--muted); }
.requirements { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 25px 0; }
.requirements div { display: flex; align-items: center; gap: 10px; padding: 11px; border-radius: 9px; color: #386257; background: #effaf6; font-size: 13px; font-weight: 650; }
.requirements div.fail { color: #a32f42; background: var(--red-soft); }
.requirements span { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; color: #fff; background: var(--green); font-weight: 900; }
.requirements .fail span { background: var(--red); }
.install-form fieldset { margin: 0 0 22px; padding: 21px; border: 1px solid var(--line); border-radius: 13px; }
.install-form legend { padding: 0 8px; font-size: 17px; font-weight: 850; }
.install-form fieldset > p { color: var(--muted); font-size: 13px; }
.install-success { display: grid; min-height: 450px; place-items: center; align-content: center; text-align: center; }
.install-success > span { display: grid; width: 78px; height: 78px; place-items: center; border-radius: 24px; color: #fff; background: var(--green); font-size: 36px; }
.install-success h2 { margin: 20px 0 6px; font-size: 32px; }
.install-success p { max-width: 600px; color: var(--muted); }

@media (max-width: 1180px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .inbox { grid-template-columns: 280px 1fr; }
  .lead-context { display: none; }
  .integration-grid { grid-template-columns: 1fr; }
  .simple-connection-grid, .technical-grid { grid-template-columns: 1fr; }
  .simple-connection-card.full, .technical-grid > .full { grid-column: auto; }
  .simple-connect-hero, .admin-implementation-hero { align-items: flex-start; flex-direction: column; }
  .client-steps { grid-template-columns: 1fr; }
  .client-steps > i { display: none; }
  .company-implementation-picker label { align-items: flex-start; flex-direction: column; }
  .company-implementation-picker select { max-width: none; }
  .integration-card.full { grid-column: auto; }
  .connection-intro { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-visual { min-height: 480px; padding: 35px; }
  .auth-message { padding: 45px 0 20px; }
  .auth-message h1 { font-size: 44px; }
  .auth-panel { padding: 55px 25px; }
  .register-shell { grid-template-columns: 1fr; }
  .plan-summary { order: 2; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { transform: translateX(-102%); transition: transform .22s; }
  .sidebar.open { transform: translateX(0); }
  .main { grid-column: 1; }
  .mobile-nav { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
  .topbar { padding: 0 18px; }
  .content { padding: 22px 18px 50px; }
  .top-search { display: none; }
  .two-column, .billing-grid, .admin-finance { grid-template-columns: 1fr; }
  .channel-paths { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  html { font-size: 15px; }
  .auth-visual { min-height: 400px; }
  .auth-message h1 { font-size: 34px; }
  .auth-message p { font-size: 16px; }
  .auth-stats { grid-template-columns: 1fr; }
  .auth-stats div { padding: 11px 15px; }
  .public-top { padding: 22px 18px; }
  .register-shell { padding: 0 18px; }
  .register-form, .plan-summary, .installer { padding: 25px; }
  .form-grid, .metric-grid, .requirements { grid-template-columns: 1fr; }
  .lead-help { align-items: flex-start; flex-wrap: wrap; }
  .lead-help .btn { width: 100%; }
  .lead-form-grid .field-span-2 { grid-column: auto; }
  .metric-grid article { min-height: 125px; }
  .inbox { grid-template-columns: 1fr; }
  .conversation-list { max-height: 240px; border-right: 0; border-bottom: 1px solid var(--line); }
  .chat { min-height: 580px; }
  .test-form { display: grid; }
  .integration-title { grid-template-columns: auto 1fr; }
  .integration-title em { grid-column: 2; }
  .billing-hero { grid-template-columns: 1fr; }
  .billing-price { padding-right: 0; text-align: left; }
  .subscription-status { position: static; justify-self: start; }
  .finance-numbers { grid-template-columns: 1fr; }
  .finance-numbers div, .finance-numbers div:first-child { padding: 13px 0; border-left: 0; border-top: 1px solid var(--line); }
  .popover { position: fixed; top: 70px; right: 12px; left: 12px; width: auto; }
}
