:root {
  --bg: #f4f7f5;
  --surface: #ffffff;
  --surface-soft: #f8faf9;
  --surface-muted: #eef3f0;
  --text: #12251d;
  --text-soft: #5e6e67;
  --text-faint: #87958f;
  --line: #dfe7e3;
  --line-strong: #cdd9d3;
  --primary: #0f7a51;
  --primary-dark: #0b6040;
  --primary-soft: #e6f5ee;
  --primary-ring: rgba(15, 122, 81, 0.14);
  --danger: #c73d4c;
  --warning: #c87910;
  --blue: #3a6fd8;
  --violet: #7655d6;
  --shadow-sm: 0 4px 14px rgba(20, 45, 34, 0.06);
  --shadow-md: 0 15px 45px rgba(20, 45, 34, 0.10);
  --shadow-lg: 0 30px 80px rgba(13, 36, 26, 0.18);
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --sidebar-width: 256px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); min-width: 320px; }
button, input, select { font: inherit; }
button { cursor: pointer; }
svg { width: 20px; height: 20px; }
input, select { color: var(--text); }

.app-shell { min-height: 100vh; display: flex; }
.sidebar {
  width: var(--sidebar-width); position: fixed; inset: 0 auto 0 0; background: #0e2119; color: #fff;
  display: flex; flex-direction: column; padding: 24px 16px 16px; z-index: 50; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 27px; }
.brand-mark { width: 39px; height: 39px; border-radius: 12px; display: grid; place-items: center; background: #24a572; color: #fff; box-shadow: 0 8px 18px rgba(20, 177, 112, .22); }
.brand-mark svg { width: 23px; height: 23px; }
.brand strong { font-size: 16px; display: block; letter-spacing: -.2px; }
.brand span { display: block; margin-top: 2px; color: #91a59b; font-size: 11.5px; }
.sidebar-nav { display: grid; gap: 5px; }
.nav-item { border: 0; background: transparent; color: #9fb1a8; display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px 11px; border-radius: 10px; text-align: left; transition: .18s ease; }
.sidebar-nav a.nav-item { text-decoration:none; }
.nav-item svg { width: 19px; height: 19px; flex: 0 0 auto; }
.nav-item span:nth-child(2) { flex: 1; }
.nav-item:hover { background: rgba(255,255,255,.065); color: #fff; }
.nav-item.active { background: #1a3a2d; color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.025); }
.nav-item.active svg { color: #65d3a7; }
.nav-count { min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center; background: rgba(255,255,255,.08); color: #c7d5ce; font-size: 11px; }
.sidebar-divider { height: 1px; background: rgba(255,255,255,.08); margin: 20px 8px 17px; }
.nav-label { margin: 0 11px 9px; color: #647a6f; text-transform: uppercase; letter-spacing: .11em; font-size: 10px; font-weight: 700; }
.secondary-nav { margin-bottom: 22px; }
.plan-card { margin-top: auto; padding: 14px; border: 1px solid rgba(255,255,255,.09); background: rgba(255,255,255,.04); border-radius: 14px; }
.plan-card-head { display: flex; justify-content: space-between; gap: 10px; font-size: 11px; color: #bfd0c7; }
.plan-card-head span:first-child { color: #fff; font-weight: 700; }
.plan-progress { height: 5px; background: rgba(255,255,255,.1); border-radius: 20px; overflow: hidden; margin: 11px 0 10px; }
.plan-progress span { display: block; height: 100%; border-radius: inherit; background: #4bc592; }
.plan-card p { color: #8fa399; font-size: 11px; line-height: 1.5; margin: 0 0 12px; }
.sidebar-user { display: flex; align-items: center; gap: 9px; margin-top: 13px; padding: 11px 4px 0; border-top: 1px solid rgba(255,255,255,.07); }
.user-avatar { width: 34px; height: 34px; border-radius: 10px; background: #d6f4e7; color: #146c4c; display: grid; place-items: center; font-size: 11px; font-weight: 800; }
.sidebar-user > div:nth-child(2) { min-width: 0; flex: 1; }
.sidebar-user strong, .sidebar-user span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user strong { font-size: 11.5px; }
.sidebar-user span { color: #82988d; font-size: 10px; margin-top: 2px; }

.main-wrap { margin-left: var(--sidebar-width); width: calc(100% - var(--sidebar-width)); min-height: 100vh; }
.topbar { height: 70px; padding: 0 30px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.91); backdrop-filter: blur(16px); display: flex; align-items: center; gap: 18px; position: sticky; top: 0; z-index: 40; }
.menu-button { display: none !important; }
.topbar-search { width: min(480px, 45vw); position: relative; display: flex; align-items: center; }
.topbar-search svg { position: absolute; left: 13px; color: #74857c; width: 18px; }
.topbar-search input { width: 100%; height: 40px; border: 1px solid var(--line); background: #f8faf9; border-radius: 10px; padding: 0 63px 0 41px; outline: none; font-size: 12px; transition: .18s ease; }
.topbar-search input:focus { background: #fff; border-color: #92c9b2; box-shadow: 0 0 0 4px var(--primary-ring); }
.shortcut { position: absolute; right: 11px; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 3px 7px; color: #77877f; font-size: 10px; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 9px; }
.credit-pill { border: 1px solid var(--line); background: #fff; color: var(--text-soft); height: 36px; padding: 0 12px; border-radius: 999px; font-size: 11px; display: flex; align-items: center; gap: 5px; }
.credit-dot { width: 8px; height: 8px; border-radius: 50%; background: #e8ad3d; box-shadow: 0 0 0 3px #fff5df; }
.notification-button { position: relative; }
.notification-dot { position: absolute; top: 7px; right: 7px; width: 6px; height: 6px; border-radius: 50%; background: #e54d5d; box-shadow: 0 0 0 2px #fff; }

.content { padding: 32px 34px 60px; max-width: 1510px; margin: 0 auto; }
.page-section { display: none; }
.page-section.active { display: block; animation: sectionIn .25s ease; }
@keyframes sectionIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.page-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 22px; margin-bottom: 26px; }
.page-heading h1 { margin: 7px 0 7px; font-size: clamp(27px, 3vw, 40px); line-height: 1.08; letter-spacing: -1.45px; max-width: 750px; }
.page-heading p { margin: 0; max-width: 690px; color: var(--text-soft); font-size: 13px; line-height: 1.65; }
.compact-heading h1 { font-size: 32px; }
.eyebrow { display: flex; align-items: center; gap: 7px; color: var(--primary); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.eyebrow span { width: 7px; height: 7px; border-radius: 50%; background: #31b47b; box-shadow: 0 0 0 4px #e4f5ed; }

.btn { border: 0; min-height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 15px; font-weight: 750; font-size: 11.5px; transition: .18s ease; white-space: nowrap; }
.btn svg { width: 17px; height: 17px; }
.btn-primary { color: #fff; background: var(--primary); box-shadow: 0 7px 16px rgba(15,122,81,.17); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 9px 20px rgba(15,122,81,.24); }
.btn-secondary { background: #fff; color: var(--text); border: 1px solid var(--line); }
.btn-secondary:hover { border-color: var(--line-strong); background: var(--surface-soft); }
.btn-dark { color: #10271e; background: #e9f7f0; }
.btn-full { width: 100%; }
.btn-small { min-height: 34px; padding: 0 11px; font-size: 10.5px; }
.icon-button { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: #50635a; display: inline-grid; place-items: center; transition: .18s ease; }
.icon-button:hover { background: var(--surface-soft); color: var(--primary); }
.icon-button.small { width: 27px; height: 27px; border: 0; background: transparent; color: #779086; letter-spacing: 1px; }
.history-button { margin-top: 8px; }

.search-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.search-panel::after { content: ""; position: absolute; width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(circle, rgba(34,176,116,.07), transparent 67%); right: -70px; top: -115px; pointer-events: none; }
.search-panel-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 17px; position: relative; z-index: 1; }
.panel-kicker { color: var(--primary); font-size: 9.5px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.search-panel-top h2 { margin: 4px 0 0; font-size: 18px; letter-spacing: -.45px; }
.api-status { display: flex; align-items: center; gap: 7px; color: #6d7e76; font-size: 10.5px; background: #f7faf8; border: 1px solid var(--line); padding: 7px 10px; border-radius: 999px; }
.api-status span { width: 7px; height: 7px; border-radius: 50%; background: #36b77c; box-shadow: 0 0 0 3px #e2f4eb; }
.primary-search-row { display: grid; grid-template-columns: minmax(280px, 1.7fr) minmax(180px, .8fr) minmax(160px, .75fr) 135px; gap: 12px; align-items: end; position: relative; z-index: 1; }
.field { display: grid; gap: 7px; }
.field > span { font-size: 10.5px; font-weight: 700; color: #43564d; }
.field input, .field select { height: 44px; width: 100%; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 0 12px; outline: none; transition: .18s ease; font-size: 12px; }
.field input:focus, .field select:focus { border-color: #91cbb2; box-shadow: 0 0 0 4px var(--primary-ring); }
.input-shell, .select-shell { position: relative; }
.input-shell svg, .select-shell svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #72857b; width: 18px; z-index: 1; pointer-events: none; }
.input-shell input, .select-shell select { padding-left: 40px; }
.select-shell::after { content: "⌄"; position: absolute; right: 12px; top: 50%; transform: translateY(-55%); color: #6f8078; pointer-events: none; font-size: 15px; }
select { appearance: none; }
.search-button { height: 44px; }
.button-loader { display: none; width: 17px; height: 17px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .75s linear infinite; }
.search-button.loading .button-label { display: none; }
.search-button.loading .button-loader { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }
.filter-row { margin-top: 14px; padding-top: 14px; border-top: 1px solid #edf1ef; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; position: relative; z-index: 1; }
.filter-chip, .more-filters, .mini-select { min-height: 34px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: #596b62; display: inline-flex; align-items: center; gap: 7px; padding: 0 10px; font-size: 10.5px; }
.filter-chip svg, .more-filters svg { width: 15px; height: 15px; }
.filter-chip.active { border-color: #a6d6c1; background: var(--primary-soft); color: var(--primary-dark); }
.chip-check { display: none; }
.filter-chip.active .chip-check { display: inline; font-size: 9px; width: 15px; height: 15px; border-radius: 50%; background: #c9ebdd; place-items: center; text-align: center; line-height: 15px; }
.mini-select { padding: 0 5px 0 10px; gap: 4px; }
.mini-select span { color: #839088; }
.mini-select select { border: 0; background: transparent; outline: none; font-size: 10.5px; min-width: 80px; height: 32px; color: #34483e; padding-right: 13px; }
.more-filters { margin-left: auto; }
.more-filters span { min-width: 18px; height: 18px; border-radius: 6px; background: #edf4f0; display: grid; place-items: center; font-size: 9px; color: var(--primary-dark); }
.search-progress { margin-top: 14px; border: 1px solid #cfe3da; border-radius: 13px; background: linear-gradient(135deg,#f7fcf9,#eef8f3); padding: 13px 15px; position: relative; z-index: 1; }
.search-progress[hidden] { display: none; }
.search-progress-main { display: flex; align-items: center; gap: 11px; }
.search-progress-main div { min-width: 0; }
.search-progress-main strong { display: block; color: #163b2d; font-size: 11.5px; }
.search-progress-main small { display: block; color: #6f8279; font-size: 9.5px; margin-top: 2px; }
.search-progress-spinner { width: 22px; height: 22px; border: 2px solid #c9e6d9; border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; flex: 0 0 auto; }
.search-progress.complete .search-progress-spinner { animation: none; border: 0; background: #d8f0e4; color: var(--primary); display: grid; place-items: center; }
.search-progress.complete .search-progress-spinner::after { content: "✓"; font-size: 12px; font-weight: 900; }
.search-progress-steps { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 7px; margin-top: 11px; }
.search-progress-steps span { border-top: 2px solid #dce9e3; padding-top: 6px; color: #89978f; font-size: 8.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-progress-steps span.active { border-color: #2ba873; color: #176b4c; font-weight: 750; }
.search-progress-steps span.done { border-color: #8fcdb1; color: #4d7664; }

.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 16px 0 30px; }
.metric-card { min-height: 99px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: grid; grid-template-columns: 38px 1fr; align-items: center; column-gap: 11px; box-shadow: 0 3px 10px rgba(20,45,34,.035); }
.metric-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; }
.metric-icon svg { width: 19px; }
.metric-icon.mint { background: #e3f6ed; color: #168258; }
.metric-icon.blue { background: #e8effc; color: var(--blue); }
.metric-icon.violet { background: #eee9fb; color: var(--violet); }
.metric-icon.amber { background: #fbefdc; color: #b16c0a; }
.metric-card div:nth-child(2) span { display: block; color: #728179; font-size: 10px; }
.metric-card strong { display: block; margin-top: 2px; font-size: 20px; letter-spacing: -.5px; }
.metric-card small { grid-column: 2; color: #8a9791; font-size: 9.5px; margin-top: -5px; }
.metric-card small.positive { color: #24885f; }

.results-section { min-height: 400px; }
.section-toolbar { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 15px; }
.title-line { display: flex; align-items: center; gap: 9px; }
.title-line h2 { margin: 0; font-size: 18px; letter-spacing: -.35px; }
.results-badge { background: #edf3f0; color: #718078; border: 1px solid #e0e8e4; border-radius: 999px; padding: 4px 8px; font-size: 9px; }
.clear-leads-button { border: 0; border-radius: 7px; background: #f8ecec; color: #a34b4b; padding: 5px 8px; font-size: 9px; font-weight: 750; transition: .18s ease; }
.clear-leads-button:hover { background: #f3dddd; color: #8e3333; }
.clear-leads-button[hidden] { display: none; }
.section-toolbar p { margin: 5px 0 0; color: var(--text-soft); font-size: 11px; }
.toolbar-actions { display: flex; align-items: center; gap: 8px; }
.sort-control { height: 40px; display: flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 0 8px 0 12px; color: #809087; font-size: 10.5px; }
.sort-control select { border: 0; outline: none; background: transparent; min-width: 105px; font-size: 10.5px; color: #36483f; padding-right: 12px; }
.empty-state { min-height: 330px; border: 1px dashed #cad8d1; border-radius: 18px; background: rgba(255,255,255,.55); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 38px; text-align: center; }
.empty-state.smaller { min-height: 260px; }
.empty-state h3 { margin: 16px 0 7px; font-size: 17px; }
.empty-state p { max-width: 520px; margin: 0 0 18px; color: var(--text-soft); font-size: 11.5px; line-height: 1.65; }
.empty-visual { width: 80px; height: 80px; border-radius: 50%; background: #eaf6f0; color: var(--primary); display: grid; place-items: center; position: relative; }
.empty-visual svg { width: 30px; height: 30px; }
.empty-orbit { position: absolute; border: 1px solid rgba(22,130,88,.13); border-radius: 50%; }
.orbit-one { inset: -10px; }
.orbit-two { inset: -20px; }
.leads-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.lead-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; transition: .22s ease; box-shadow: 0 2px 8px rgba(17,43,31,.025); }
.lead-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #c9d9d1; }
.lead-card-top { padding: 17px 17px 14px; }
.lead-head { display: flex; align-items: flex-start; gap: 11px; }
.business-avatar { width: 43px; height: 43px; border-radius: 13px; display: grid; place-items: center; background: linear-gradient(145deg,#e2f4ec,#f5fbf8); color: var(--primary-dark); font-weight: 850; font-size: 13px; flex: 0 0 auto; border: 1px solid #d8ebe2; }
.business-avatar.service { background: linear-gradient(145deg,#e9effc,#f7f9fe); color: #3e65b2; border-color: #dce5f6; }
.lead-title-wrap { min-width: 0; flex: 1; }
.lead-title-wrap h3 { margin: 1px 0 4px; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lead-title-wrap p { margin: 0; color: #6e7f77; font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lead-quick-actions { display: flex; align-items: center; gap: 3px; flex: 0 0 auto; }
.done-lead-button { min-height: 29px; border: 1px solid #dce5e1; border-radius: 8px; background: #fff; color: #697a72; padding: 0 7px 0 6px; display: inline-flex; align-items: center; gap: 4px; font-size: 8.5px; font-weight: 800; white-space: nowrap; transition: .18s ease; }
.done-lead-button svg { width: 13px; height: 13px; }
.done-lead-button:hover { border-color: #9bcab5; color: var(--primary); background: #f5fbf8; }
.done-lead-button.done { border-color: #9fd0bb; background: #e5f5ed; color: #0e704b; }
.lead-card.completed { border-color: #b9daca; }
.save-lead-button { border: 0; background: transparent; color: #87968f; padding: 4px; }
.save-lead-button:hover, .save-lead-button.saved { color: var(--primary); }
.save-lead-button.saved svg { fill: #dff3ea; }
.score-row { display: flex; align-items: center; justify-content: space-between; margin: 15px 0 12px; }
.score-badge { display: flex; align-items: center; gap: 7px; }
.score-ring { --score: 80; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#28a36d calc(var(--score) * 1%), #e8efeb 0); position: relative; }
.score-ring::before { content:""; position:absolute; inset:4px; border-radius:50%; background:#fff; }
.score-ring strong { position:relative; font-size:10px; }
.score-badge div > span { display: block; color: #7e8d85; font-size: 9px; }
.score-badge div > strong { display: block; color: #22392f; font-size: 10.5px; margin-top: 1px; }
.rating-block { text-align: right; }
.rating-line { color: #2e443a; font-weight: 800; font-size: 11px; }
.rating-line span { color: #e3a52e; margin-right: 3px; }
.rating-block small { color: #8a9891; font-size: 9px; }
.signal-list { display: flex; gap: 6px; flex-wrap: wrap; }
.signal { border-radius: 7px; padding: 5px 7px; font-size: 9px; font-weight: 700; display: inline-flex; gap: 4px; align-items: center; }
.signal.good { color: #18724f; background: #e7f5ee; }
.signal.neutral { color: #5d6e66; background: #f0f3f2; }
.signal.warning { color: #a45e09; background: #fff2dd; }
.lead-facts { display: grid; gap: 6px; margin: 0 0 11px; padding: 9px 10px; border: 1px solid #edf1ef; border-radius: 10px; background: #fbfcfc; }
.lead-fact { display: grid; grid-template-columns: 48px minmax(0,1fr); gap: 7px; align-items: baseline; font-size: 9px; line-height: 1.35; }
.lead-fact > span:first-child { color: #89968f; font-weight: 750; }
.lead-fact > span:last-child, .lead-fact > a { color: #40564b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead-fact > a { color: #147451; font-weight: 700; text-decoration: none; }
.lead-fact > a:hover { text-decoration: underline; }
.lead-insight { margin-top: 12px; padding: 10px; border-radius: 10px; background: #f7faf8; color: #53655c; font-size: 9.7px; line-height: 1.55; min-height: 56px; }
.lead-insight strong { color: #274036; }
.lead-card-actions { border-top: 1px solid #edf1ef; padding: 11px; display: grid; grid-template-columns: .75fr 1.18fr 1.15fr; gap: 8px; background: #fbfcfc; }
.lead-card-actions .btn { min-height: 36px; padding: 0 9px; font-size: 10px; }
.btn-maps { border: 1px solid #c8e0d4; background: #edf8f3; color: #116a49; }
.btn-maps:hover { border-color: #84bda5; background: #e1f3eb; }
.btn-maps.resolving { color: #557068; cursor: wait; }
.btn-maps:disabled { border-color: #dce5e1; background: #f2f5f4; color: #8a9892; cursor: not-allowed; opacity: 1; }
.btn-maps.unavailable:disabled { border-color: #eadede; background: #f8f1f1; color: #956565; }
.btn-maps svg { width: 15px; height: 15px; flex: 0 0 auto; }

.sites-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.site-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-sm); }
.site-thumb { height: 168px; position: relative; padding: 15px; overflow: hidden; background: linear-gradient(135deg,#edf8f3,#d6eee3); }
.site-thumb.service { background: linear-gradient(135deg,#edf2fb,#d9e4f8); }
.site-thumb.ai-builder { background:radial-gradient(circle at 82% 20%,rgba(76,226,166,.35),transparent 28%),linear-gradient(145deg,#09261b,#0d6547); }
.site-thumb.ai-builder .site-browser { transform:perspective(700px) rotateX(2deg) rotateZ(-1deg); box-shadow:0 18px 34px rgba(0,0,0,.25); }
.site-thumb.ai-builder .site-browser-hero { background:linear-gradient(125deg,#fbfffd,#eaf7f1); }
.site-thumb.ai-builder .site-browser-person { border-radius:16px 50px 16px 50px; background:linear-gradient(145deg,#42ca91,#113c2d); }
.site-browser { height: 100%; border-radius: 9px; background: #fff; box-shadow: 0 12px 25px rgba(25,54,41,.12); overflow: hidden; transform: perspective(700px) rotateX(2deg); }
.site-browser-bar { height: 17px; background: #f3f5f4; border-bottom: 1px solid #e8edeb; position: relative; }
.site-browser-bar::before { content: "•••"; position:absolute; left:7px; top:-3px; color:#a9b4af; letter-spacing:1px; font-size:10px; }
.site-browser-hero { height: calc(100% - 17px); display:flex; padding: 16px; gap: 10px; }
.site-browser-copy { width: 58%; }
.site-browser-copy span, .site-browser-copy strong, .site-browser-copy i { display:block; border-radius:99px; background:#dbe7e1; }
.site-browser-copy span { width:35%; height:4px; background:#66b994; }
.site-browser-copy strong { width:92%; height:9px; margin:8px 0 6px; background:#244438; }
.site-browser-copy i { width:74%; height:4px; }
.site-browser-copy button { margin-top:12px; width:44%; height:12px; border:0; border-radius:4px; background:#168258; }
.site-browser-person { flex:1; border-radius: 50px 50px 12px 12px; background:linear-gradient(#bee4d3,#7ac5a2); align-self:end; height:95%; }
.site-card-info { padding: 14px; }
.site-card-info h3 { margin:0 0 3px; font-size:13px; display:flex; align-items:center; gap:6px; }
.site-card-info p { margin:0; color:var(--text-soft); font-size:10px; }
.site-ai-badge { padding:3px 5px; border-radius:5px; color:#0c704b; background:#dff5ea; font-size:7px; letter-spacing:.08em; }
.site-card-actions { display:flex; gap:7px; padding:0 14px 14px; }
.site-card-actions .btn { flex:1; min-width:0; padding-left:9px; padding-right:9px; }
.site-card-actions .btn svg { width:14px; height:14px; flex:0 0 auto; }
.btn-download { color:#116a49; background:#e9f6f0; border:1px solid #c9e2d6; }
.btn-download:hover { color:#0b6040; background:#dcf0e6; border-color:#9dcbb6; }

.pipeline-board { display: grid; grid-template-columns: repeat(5,minmax(220px,1fr)); gap: 13px; overflow-x: auto; padding-bottom: 8px; }
.pipeline-column { background:#eef3f0; border:1px solid #dfe7e3; border-radius:15px; padding:11px; min-height:390px; transition:border-color .2s ease,background .2s ease; }
.pipeline-column.drag-over { border-color:#22ae78; background:#e2f4eb; }
.pipeline-column-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; padding:3px 3px 8px; }
.pipeline-column-head strong { font-size:11px; }
.pipeline-column-head span { width:21px; height:21px; border-radius:7px; display:grid; place-items:center; background:#fff; color:#708078; font-size:9px; }
.pipeline-item { background:#fff; border:1px solid var(--line); border-radius:11px; padding:11px; margin-bottom:8px; cursor:grab; box-shadow:0 6px 18px rgba(17,54,40,.04); }
.pipeline-item.dragging { opacity:.45; }
.pipeline-item-top { display:flex; align-items:flex-start; justify-content:space-between; gap:8px; }
.pipeline-item-top button { width:20px; height:20px; padding:0; border:0; border-radius:6px; color:#87958e; background:#f1f4f2; font-size:14px; line-height:1; }
.pipeline-item-top button:hover { color:#a33131; background:#fceaea; }
.pipeline-item h4 { margin:0 0 5px; font-size:11px; }
.pipeline-item p { margin:0; color:#78877f; font-size:9.5px; }
.pipeline-item-footer { display:flex; justify-content:space-between; align-items:center; margin-top:10px; font-size:9px; color:#718078; }
.pipeline-score { color:var(--primary); font-weight:800; }
.pipeline-stage-control { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:11px; padding-top:9px; border-top:1px solid #edf1ee; }
.pipeline-stage-control span { color:#87958e; font-size:8px; font-weight:700; text-transform:uppercase; letter-spacing:.06em; }
.pipeline-stage-control select { max-width:135px; height:26px; padding:0 6px; border:1px solid var(--line); border-radius:7px; outline:0; color:#40534a; background:#fff; font-size:8px; }
.pipeline-empty { min-height:90px; display:grid; place-items:center; border:1px dashed #cbd8d1; border-radius:10px; color:#8b9a93; font-size:9px; }
.history-list { display:grid; gap:8px; }
.history-row { width:100%; padding:13px; display:flex; justify-content:space-between; gap:20px; border:1px solid var(--line); border-radius:11px; color:var(--text); background:#fff; text-align:left; }
.history-row:hover { border-color:#79cbaa; background:#f5fbf8; }
.history-row span:last-child { text-align:right; }
.history-row strong,.history-row b,.history-row small { display:block; }
.history-row strong { font-size:11px; }
.history-row b { color:var(--primary); font-size:10px; }
.history-row small { margin-top:3px; color:#7c8c84; font-size:8px; font-weight:500; }
.history-empty { padding:30px 15px; text-align:center; color:#798a82; }
.history-empty strong,.history-empty span { display:block; }
.history-empty strong { color:var(--text); font-size:12px; }
.history-empty span { margin-top:5px; font-size:9px; }
.credit-modal-balance { margin-bottom:14px; padding:14px; display:flex; align-items:center; justify-content:space-between; gap:15px; border-radius:12px; color:#fff; background:#0c382a; }
.credit-modal-balance strong { font-size:15px; }
.credit-ledger { display:grid; gap:7px; max-height:390px; overflow:auto; }
.credit-ledger-row { padding:11px; display:grid; grid-template-columns:30px 1fr auto; align-items:center; gap:10px; border:1px solid var(--line); border-radius:10px; }
.credit-ledger-icon { width:28px; height:28px; display:grid; place-items:center; border-radius:8px; font-weight:900; }
.credit-ledger-icon.credit { color:#08704a; background:#e3f7ed; }
.credit-ledger-icon.debit { color:#9b5b12; background:#fff2dc; }
.credit-ledger-row strong,.credit-ledger-row small { display:block; }
.credit-ledger-row strong { font-size:9.5px; }
.credit-ledger-row small { margin-top:3px; color:#809087; font-size:7.5px; }
.credit-ledger-row>b { font-size:11px; }
.credit-ledger-row>b.credit { color:#08704a; }
.credit-ledger-row>b.debit { color:#9b5b12; }

.template-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
.template-card { background:#fff; border:1px solid var(--line); border-radius:17px; overflow:hidden; box-shadow:var(--shadow-sm); }
.template-preview { height:225px; margin:12px; border-radius:12px; overflow:hidden; position:relative; padding:18px; }
.doctor-theme { background:linear-gradient(135deg,#e4f4ec,#c6e6d7); }
.service-theme { background:linear-gradient(135deg,#e7eefb,#cbdaf4); }
.legal-theme { background:linear-gradient(135deg,#f3ebdd,#dec6a1); }
.preview-nav { height:8px; width:100%; border-radius:10px; background:rgba(255,255,255,.72); margin-bottom:37px; }
.preview-copy { width:58%; }
.preview-copy span,.preview-copy strong,.preview-copy small { display:block; border-radius:10px; background:rgba(17,47,35,.18); }
.preview-copy span { width:40%; height:5px; }
.preview-copy strong { width:100%; height:14px; margin:10px 0 7px; background:rgba(17,47,35,.74); }
.preview-copy small { width:84%; height:6px; }
.preview-copy button { width:48%; height:21px; margin-top:19px; border:0; border-radius:5px; background:#176f4e; }
.preview-person { position:absolute; right:17px; bottom:0; width:31%; height:72%; background:linear-gradient(#fff,#71ba99); border-radius:60px 60px 10px 10px; }
.preview-card-stack { position:absolute; right:17px; top:54px; width:31%; height:112px; border-radius:11px; background:rgba(255,255,255,.85); box-shadow:-13px 13px 0 rgba(255,255,255,.48); }
.preview-column { position:absolute; right:18px; bottom:0; width:31%; height:74%; background:rgba(83,48,21,.72); border-radius:4px 4px 0 0; }
.template-info { display:flex; justify-content:space-between; gap:12px; align-items:center; padding:3px 16px 16px; }
.template-info h3 { margin:0 0 4px; font-size:13px; }
.template-info p { margin:0; color:var(--text-soft); font-size:10px; }
.status-pill { padding:5px 8px; border-radius:999px; font-size:9px; background:#f0f3f2; color:#718078; }
.status-pill.active { background:#e4f5ed; color:#1c7754; }

.settings-layout { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.settings-layout-single { grid-template-columns:minmax(0,680px); }
.settings-card { background:#fff; border:1px solid var(--line); border-radius:16px; padding:20px; display:grid; gap:15px; align-content:start; }
.settings-card-title h3 { margin:0 0 4px; font-size:15px; }
.settings-card-title p { margin:0; color:var(--text-soft); font-size:10.5px; }
.integration-row { display:grid; grid-template-columns:39px 1fr auto; gap:11px; align-items:center; padding:11px 0; border-bottom:1px solid #edf1ef; }
.integration-row:last-child { border-bottom:0; }
.integration-icon { width:39px; height:39px; border-radius:11px; background:#edf5f1; color:var(--primary); display:grid; place-items:center; font-weight:850; font-size:11px; }
.integration-row strong,.integration-row span { display:block; }
.integration-row strong { font-size:11px; }
.integration-row span { font-size:9.5px; color:#849189; margin-top:3px; }

.modal-backdrop { position:fixed; inset:0; background:rgba(8,24,17,.56); backdrop-filter:blur(5px); display:none; align-items:center; justify-content:center; padding:20px; z-index:100; }
.modal-backdrop.open { display:flex; animation:fadeIn .18s ease; }
@keyframes fadeIn { from {opacity:0} to {opacity:1} }
.modal { width:min(560px,100%); max-height:90vh; overflow:auto; background:#fff; border-radius:19px; box-shadow:var(--shadow-lg); animation:modalIn .22s ease; }
.large-modal { width:min(790px,100%); }
.generation-modal { width:min(840px,100%); }
.compact-modal { width:min(500px,100%); }
@keyframes modalIn { from {opacity:0; transform:translateY(12px) scale(.98)} to {opacity:1; transform:none} }
.modal-head { position:sticky; top:0; z-index:2; display:flex; justify-content:space-between; align-items:center; gap:15px; padding:19px 20px 15px; background:#fff; border-bottom:1px solid #edf1ef; }
.modal-head h2 { margin:3px 0 0; font-size:18px; letter-spacing:-.4px; }
.modal-close { width:36px; height:36px; }
.modal-body { padding:20px; }
.details-hero { display:grid; grid-template-columns:55px 1fr auto; gap:13px; align-items:center; padding-bottom:17px; border-bottom:1px solid var(--line); }
.details-hero .business-avatar { width:55px; height:55px; font-size:16px; }
.details-hero h3 { margin:0 0 5px; font-size:16px; }
.details-hero p { margin:0; color:var(--text-soft); font-size:10.5px; }
.details-score { min-width:70px; text-align:center; background:#ebf7f1; border:1px solid #d8ede3; border-radius:12px; padding:9px; }
.details-score strong { display:block; color:var(--primary-dark); font-size:18px; }
.details-score span { color:#618074; font-size:9px; }
.detail-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; margin:16px 0; }
.detail-box { border:1px solid var(--line); border-radius:11px; padding:11px; background:#fbfcfc; }
.detail-box span { display:block; color:#87958e; font-size:9px; margin-bottom:4px; }
.detail-box strong { font-size:10.5px; }
.why-list { display:grid; gap:8px; margin:12px 0 17px; }
.why-item { display:flex; gap:9px; align-items:flex-start; padding:10px; border-radius:10px; background:#f6faf8; color:#52645b; font-size:10px; line-height:1.45; }
.why-item i { width:19px; height:19px; border-radius:50%; background:#daf0e6; color:#178158; font-style:normal; display:grid; place-items:center; flex:0 0 auto; font-size:9px; }
.modal-action-row { display:flex; gap:8px; }
.modal-action-row .btn { flex:1; }
.generation-summary { display:grid; grid-template-columns:48px 1fr; gap:12px; align-items:center; padding:13px; background:#f5faf7; border:1px solid #dfebe5; border-radius:13px; margin-bottom:16px; }
.generation-summary .business-avatar { width:48px; height:48px; }
.generation-summary h3 { margin:0 0 4px; font-size:13px; }
.generation-summary p { margin:0; color:var(--text-soft); font-size:10px; }
.generation-options { display:grid; grid-template-columns:repeat(3,1fr); gap:9px; margin-bottom:16px; }
.theme-option { border:1px solid var(--line); border-radius:11px; background:#fff; padding:9px; text-align:left; transition:.18s ease; }
.theme-option.active { border-color:#7fc3a7; box-shadow:0 0 0 3px var(--primary-ring); }
.theme-swatch { height:70px; border-radius:8px; margin-bottom:8px; position:relative; overflow:hidden; }
.theme-swatch::before { content:""; position:absolute; left:9px; top:12px; width:50%; height:8px; border-radius:8px; background:rgba(28,64,49,.7); box-shadow:0 14px 0 rgba(28,64,49,.18),0 24px 0 rgba(28,64,49,.12); }
.theme-swatch::after { content:""; position:absolute; right:9px; bottom:0; width:28%; height:55px; border-radius:25px 25px 5px 5px; background:rgba(255,255,255,.75); }
.theme-option strong { font-size:10px; }
.theme-mint { background:linear-gradient(135deg,#d9f0e5,#acd9c4); }
.theme-blue { background:linear-gradient(135deg,#e4edfb,#abc3ed); }
.theme-sand { background:linear-gradient(135deg,#f4eadb,#d7bc92); }
.verified-summary { grid-template-columns:34px 1fr; }
.success-mini { width:34px; height:34px; border-radius:10px; display:grid; place-items:center; background:#d8f1e5; color:#147953; font-weight:800; }
.doctor-template-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:9px; }
.doctor-template-card { min-width:0; overflow:hidden; border:1px solid var(--line); border-radius:14px; background:#fff; }
.doctor-template-visual { height:105px; padding:13px; display:flex; flex-direction:column; justify-content:space-between; position:relative; overflow:hidden; color:#17362a; }
.doctor-template-visual::after { content:""; position:absolute; right:16px; bottom:-10px; width:60px; height:82px; border-radius:35px 35px 8px 8px; background:rgba(255,255,255,.72); box-shadow:0 0 0 9px rgba(255,255,255,.18); }
.doctor-template-visual span { font-size:9px; font-weight:800; letter-spacing:.12em; }
.doctor-template-visual strong { max-width:110px; font-size:12px; line-height:1.2; }
.template-one-visual { background:linear-gradient(135deg,#d8ede2,#92c6aa); }
.template-two-visual { color:#193858; background:linear-gradient(135deg,#e5f3ff,#88c5ee); }
.doctor-template-copy { padding:12px 12px 8px; }
.doctor-template-copy h3 { margin:0 0 4px; font-size:12px; }
.doctor-template-copy p { min-height:42px; margin:0; color:var(--text-soft); font-size:9px; line-height:1.5; }
.doctor-template-actions { display:grid; grid-template-columns:1fr 1fr; gap:7px; padding:8px 12px 12px; }
.doctor-template-actions .btn { justify-content:center; padding:8px 10px; }
.ai-builder-choice { grid-column:1/-1; display:grid; grid-template-columns:190px minmax(0,1fr); align-items:center; border-color:#c8ddd4; background:linear-gradient(115deg,#fff 35%,#f4fbf7); box-shadow:0 10px 28px rgba(14,80,55,.07); }
.ai-builder-choice .doctor-template-visual { height:100%; min-height:132px; }
.ai-builder-choice .doctor-template-copy { padding:16px; }
.ai-builder-choice .doctor-template-copy p { min-height:0; max-width:390px; }
.ai-builder-choice-actions { grid-template-columns:1fr; padding:16px; }
.ai-builder-choice-actions .btn { width:100%; }
.ai-builder-mobile-cta { display:flex; width:100%; max-width:330px; min-height:46px; margin:12px 0 8px; white-space:normal; }
.ai-builder-visual { color:#fff; background:radial-gradient(circle at 82% 16%,rgba(102,241,185,.36),transparent 28%),linear-gradient(145deg,#082f22,#11684a 62%,#1a8c63); isolation:isolate; }
.ai-builder-visual::before { content:""; position:absolute; width:95px; height:95px; left:-30px; bottom:-45px; border:1px solid rgba(255,255,255,.2); border-radius:50%; box-shadow:0 0 0 15px rgba(255,255,255,.05),0 0 0 31px rgba(255,255,255,.035); }
.ai-builder-visual::after { width:68px; height:68px; right:20px; bottom:20px; border-radius:20px; background:linear-gradient(145deg,rgba(255,255,255,.23),rgba(255,255,255,.07)); border:1px solid rgba(255,255,255,.28); box-shadow:0 17px 35px rgba(0,0,0,.18); transform:rotate(11deg); }
.ai-builder-visual > * { position:relative; z-index:1; }
.ai-builder-visual i { position:absolute; right:39px; bottom:42px; width:29px; height:29px; z-index:2; border:1px solid rgba(255,255,255,.55); border-radius:50%; box-shadow:0 0 24px rgba(113,255,199,.52); }
.ai-builder-visual i::before,.ai-builder-visual i::after { content:""; position:absolute; background:#c8ffe9; border-radius:10px; }
.ai-builder-visual i::before { width:13px; height:1px; left:7px; top:13px; }
.ai-builder-visual i::after { width:1px; height:13px; left:13px; top:7px; }
.ai-new-badge { margin-left:5px; padding:3px 5px; border-radius:5px; color:#0c704b; background:#dff5ea; font-size:7px; letter-spacing:.08em; vertical-align:2px; }
.btn-ai-builder { color:#fff; background:linear-gradient(115deg,#0b704b,#159365); box-shadow:0 8px 20px rgba(13,126,84,.22); }
.btn-ai-builder:hover { background:linear-gradient(115deg,#095d3e,#117c56); transform:translateY(-1px); box-shadow:0 11px 24px rgba(13,126,84,.3); }
.ai-preparing-shell { min-height:365px; padding:48px 28px 30px; text-align:center; display:flex; flex-direction:column; align-items:center; justify-content:center; background:radial-gradient(circle at 50% 35%,#f0fbf6,transparent 48%); border:1px solid #e2eee8; border-radius:17px; }
.ai-preparing-shell h3 { margin:15px 0 7px; font-size:17px; letter-spacing:-.35px; }
.ai-preparing-shell > p { max-width:520px; margin:0; color:var(--text-soft); font-size:10.5px; line-height:1.6; }
.ai-orbit-loader { width:78px; height:78px; display:grid; place-items:center; position:relative; border-radius:25px; color:#fff; background:linear-gradient(145deg,#153e30,#0a6c49); box-shadow:0 18px 45px rgba(12,103,70,.23); }
.ai-orbit-loader svg { width:30px; height:30px; position:relative; z-index:2; }
.ai-orbit-loader span,.ai-orbit-loader i,.ai-orbit-loader b { position:absolute; inset:-9px; border:1px solid rgba(28,153,105,.2); border-radius:28px; animation:aiOrbit 3.8s linear infinite; }
.ai-orbit-loader i { inset:-18px; border-style:dashed; animation-direction:reverse; animation-duration:6s; }
.ai-orbit-loader b { inset:-4px; border-color:transparent; }
.ai-orbit-loader b::after { content:""; position:absolute; top:-4px; left:50%; width:8px; height:8px; border-radius:50%; background:#49d49c; box-shadow:0 0 0 5px rgba(73,212,156,.12); }
.ai-orbit-loader.compact { width:58px; height:58px; border-radius:18px; box-shadow:0 12px 28px rgba(12,103,70,.2); flex:0 0 auto; }
.ai-orbit-loader.compact span { inset:-5px; border-radius:21px; }
.ai-orbit-loader.compact i { inset:-10px; }
.ai-orbit-loader.compact svg { width:24px; height:24px; }
@keyframes aiOrbit { to { transform:rotate(360deg); } }
.ai-model-pill { display:inline-flex; align-items:center; gap:6px; width:max-content; border:1px solid #d8e9e1; background:#f4faf7; color:#35705a; border-radius:999px; padding:5px 8px; font-size:8px; font-weight:800; letter-spacing:.05em; text-transform:uppercase; }
.ai-model-pill i { width:6px; height:6px; border-radius:50%; background:#2bb27d; box-shadow:0 0 0 3px rgba(43,178,125,.12); }
.ai-thinking-lines { width:min(340px,75%); display:grid; gap:7px; margin-top:25px; }
.ai-thinking-lines span { height:6px; border-radius:20px; background:linear-gradient(90deg,#e5f1eb 20%,#bfe6d4 50%,#e5f1eb 80%); background-size:220% 100%; animation:aiShimmer 1.35s linear infinite; }
.ai-thinking-lines span:nth-child(2) { width:82%; justify-self:center; animation-delay:.12s; }
.ai-thinking-lines span:nth-child(3) { width:56%; justify-self:center; animation-delay:.24s; }
@keyframes aiShimmer { to { background-position:-220% 0; } }
.ai-prompt-editor { display:grid; gap:14px; }
.ai-editor-head { display:grid; grid-template-columns:48px 1fr; gap:12px; align-items:center; padding:14px; border:1px solid #dcebe4; border-radius:14px; background:linear-gradient(115deg,#f6fbf8,#eef8f3); }
.ai-editor-icon { width:48px; height:48px; display:grid; place-items:center; border-radius:14px; color:#fff; background:linear-gradient(145deg,#116d4c,#21a474); box-shadow:0 10px 22px rgba(18,133,90,.19); }
.ai-editor-icon svg { width:23px; height:23px; }
.ai-editor-head span { color:#168158; font-size:8px; font-weight:850; text-transform:uppercase; letter-spacing:.1em; }
.ai-editor-head h3 { margin:3px 0 4px; font-size:14px; }
.ai-editor-head p { margin:0; color:var(--text-soft); font-size:9.5px; line-height:1.45; }
.ai-prompt-field { display:grid; gap:8px; }
.ai-prompt-field > span { display:flex; justify-content:space-between; gap:12px; align-items:center; }
.ai-prompt-field b { font-size:10px; }
.ai-prompt-field small { color:#85948d; font-size:8.5px; }
.ai-prompt-field textarea { width:100%; min-height:245px; resize:vertical; border:1px solid #cfddd6; border-radius:13px; background:#fbfdfc; color:#203b30; padding:14px; outline:none; font:500 10.5px/1.65 Inter,ui-sans-serif,system-ui; transition:.18s ease; }
.ai-prompt-field textarea:focus { border-color:#73bd9e; background:#fff; box-shadow:0 0 0 4px var(--primary-ring); }
.ai-prompt-note { display:flex; align-items:flex-start; gap:8px; color:#62766d; background:#f5f8f7; border-radius:10px; padding:10px; font-size:9px; line-height:1.5; }
.ai-prompt-note svg { width:15px; height:15px; flex:0 0 auto; color:#21845f; }
.ai-editor-actions { display:grid; grid-template-columns:150px 1fr; gap:8px; }
.ai-build-loader { padding:5px; }
.ai-build-loader-top { display:grid; grid-template-columns:65px 1fr; gap:16px; align-items:center; margin:5px 5px 20px; padding:17px; border-radius:16px; color:#eafff5; background:radial-gradient(circle at 90% 10%,rgba(77,224,165,.2),transparent 30%),linear-gradient(135deg,#0a241a,#0e4d37); box-shadow:0 16px 35px rgba(9,55,38,.16); }
.ai-build-loader-top .ai-model-pill { margin-bottom:7px; color:#b8f0d8; background:rgba(255,255,255,.07); border-color:rgba(255,255,255,.12); }
.ai-build-loader-top h3 { margin:0 0 4px; font-size:15px; }
.ai-build-loader-top p { margin:0; color:#a9c9bc; font-size:9.5px; line-height:1.45; }
.ai-stage-list { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.ai-stage-list > div { min-height:50px; display:grid; grid-template-columns:22px 1fr 8px; align-items:center; gap:7px; padding:9px; border:1px solid #e2e9e6; border-radius:11px; color:#84918b; background:#fafcfb; transition:.25s ease; }
.ai-stage-list > div > i { width:22px; height:22px; display:grid; place-items:center; border-radius:7px; color:#9aa8a1; background:#edf2ef; font-style:normal; }
.ai-stage-list svg { width:12px; height:12px; opacity:0; }
.ai-stage-list span { font-size:8.8px; font-weight:750; line-height:1.25; }
.ai-stage-list b { width:6px; height:6px; border-radius:50%; background:#d7dfdb; }
.ai-stage-list > div.active { color:#174d39; border-color:#a9d6c2; background:#f1faf6; box-shadow:0 5px 14px rgba(17,124,82,.08); }
.ai-stage-list > div.active > i { background:#dff3e9; color:#147953; animation:pulse 1.25s infinite; }
.ai-stage-list > div.active b { background:#27ae78; box-shadow:0 0 0 4px rgba(39,174,120,.12); }
.ai-stage-list > div.complete { color:#43685a; }
.ai-stage-list > div.complete > i { color:#fff; background:#23a873; }
.ai-stage-list > div.complete svg { opacity:1; }
.ai-stage-list > div.complete b { background:#93c7b0; }
.ai-premium-progress { height:8px; margin:19px 2px 9px; border-radius:20px; background:#e8eeeb; overflow:hidden; position:relative; }
.ai-premium-progress span { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#0a6544,#30bd83,#71dfb1); box-shadow:0 0 16px rgba(47,189,131,.35); transition:width .6s ease; }
.ai-premium-progress i { position:absolute; inset:0; background:linear-gradient(100deg,transparent 35%,rgba(255,255,255,.7),transparent 65%); animation:aiProgress 1.5s linear infinite; }
@keyframes aiProgress { from { transform:translateX(-100%); } to { transform:translateX(100%); } }
.ai-build-wait { display:block; color:#839189; text-align:center; font-size:8.5px; }
.ai-generation-result .ai-model-pill { margin:0 auto 9px; }
.ai-success-icon { background:linear-gradient(145deg,#d9f5e8,#bfead6); box-shadow:0 12px 30px rgba(25,151,101,.14); }
.ai-result-direction { margin:0 0 12px; padding:11px; text-align:left; border:1px solid #deebe5; border-radius:11px; background:#f7faf8; }
.ai-result-direction span { display:block; margin-bottom:4px; color:#18815a; font-size:8px; font-weight:850; text-transform:uppercase; letter-spacing:.09em; }
.ai-result-direction p { margin:0; color:#53685f; font-size:9.5px; line-height:1.5; }
.ai-result-actions { display:grid; grid-template-columns:repeat(4,1fr); gap:7px; }
.ai-result-actions .btn { min-width:0; padding-left:9px; padding-right:9px; }
.ai-admin-ready { margin:0 0 12px; padding:12px; text-align:left; border:1px solid #cce9dd; border-radius:12px; background:linear-gradient(145deg,#f1fbf6,#f9fcfa); box-shadow:0 10px 30px rgba(18,94,67,.06); }
.ai-admin-ready>div:first-child>span { display:block; color:#08764f; font-size:9px; font-weight:850; text-transform:uppercase; letter-spacing:.08em; }
.ai-admin-ready>div:first-child p { margin:4px 0 10px; color:#587067; font-size:9px; line-height:1.45; }
.ai-admin-credentials { display:grid; grid-template-columns:1fr 1fr; gap:7px; margin-bottom:8px; }
.ai-admin-credentials label { display:grid; grid-template-columns:1fr auto; align-items:center; gap:5px; padding:7px; border:1px solid #dcebe4; border-radius:8px; background:#fff; color:#71827b; font-size:7px; font-weight:800; text-transform:uppercase; letter-spacing:.06em; }
.ai-admin-credentials code { grid-column:1; overflow:hidden; color:#183b2d; font:750 9px/1.3 ui-monospace,SFMono-Regular,Consolas,monospace; text-transform:none; text-overflow:ellipsis; white-space:nowrap; }
.ai-admin-credentials button { grid-column:2; grid-row:1/3; padding:5px 7px; border:0; border-radius:6px; background:#e7f5ee; color:#08764f; font-size:7px; font-weight:850; cursor:pointer; }
.ai-admin-ready>.btn { width:100%; min-height:32px; }
.generation-error .error-icon { background:#fff0e5; color:#b45724; font-weight:850; font-size:20px; }
.generation-progress { display:none; text-align:center; padding:25px 10px 12px; }
.generation-progress.active { display:block; }
.ai-loader { width:56px; height:56px; border-radius:18px; margin:0 auto 14px; background:linear-gradient(145deg,#1b9a69,#0f6d4a); color:#fff; display:grid; place-items:center; position:relative; animation:pulse 1.4s infinite; }
.ai-loader svg { width:27px; height:27px; }
@keyframes pulse { 0%,100%{box-shadow:0 0 0 0 rgba(22,150,100,.22)} 50%{box-shadow:0 0 0 13px rgba(22,150,100,0)} }
.progress-track { height:7px; background:#e8efeb; border-radius:30px; overflow:hidden; margin:15px auto 8px; max-width:360px; }
.progress-track span { display:block; height:100%; width:10%; background:linear-gradient(90deg,#1a8b60,#43bd88); border-radius:inherit; transition:width .4s ease; }
.generation-progress h3 { margin:0 0 5px; font-size:14px; }
.generation-progress p { color:var(--text-soft); font-size:10px; margin:0; }
.generation-result { text-align:center; }
.success-icon { width:58px; height:58px; border-radius:50%; background:#dcf3e7; color:#158057; display:grid; place-items:center; margin:0 auto 12px; }
.success-icon svg { width:27px; height:27px; }
.generation-result h3 { margin:0 0 5px; font-size:16px; }
.generation-result > p { margin:0 0 15px; color:var(--text-soft); font-size:10.5px; }
.share-link-box { display:flex; gap:8px; padding:8px; border:1px solid var(--line); background:#f8faf9; border-radius:11px; margin-bottom:11px; }
.share-link-box input { min-width:0; flex:1; border:0; background:transparent; padding:0 5px; outline:none; font-size:10.5px; color:#50635a; }
.manual-form { display:grid; gap:14px; }
.form-two-col { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.filter-options-list { display:grid; gap:5px; margin-bottom:16px; }
.toggle-row { display:grid; grid-template-columns:1fr 38px; align-items:center; gap:15px; padding:12px 0; border-bottom:1px solid #edf1ef; cursor:pointer; }
.toggle-row strong,.toggle-row span { display:block; }
.toggle-row strong { font-size:11px; }
.toggle-row span { color:#87948e; font-size:9.5px; margin-top:3px; }
.toggle-row input { display:none; }
.toggle-row i { width:36px; height:21px; background:#dce4e0; border-radius:30px; position:relative; transition:.2s ease; }
.toggle-row i::after { content:""; position:absolute; width:17px; height:17px; top:2px; left:2px; border-radius:50%; background:#fff; box-shadow:0 2px 5px rgba(0,0,0,.16); transition:.2s ease; }
.toggle-row input:checked + i { background:#2ba875; }
.toggle-row input:checked + i::after { transform:translateX(15px); }

.toast-container { position:fixed; right:22px; bottom:22px; display:grid; gap:8px; z-index:160; }
.toast { width:min(350px,calc(100vw - 44px)); background:#142820; color:#fff; border-radius:12px; box-shadow:var(--shadow-lg); padding:12px 14px; display:flex; gap:10px; align-items:flex-start; animation:toastIn .25s ease; }
.toast.success .toast-symbol { background:#2fad79; }
.toast.warning .toast-symbol { background:#d7912c; }
.toast-symbol { width:24px; height:24px; border-radius:7px; display:grid; place-items:center; background:#2f9270; flex:0 0 auto; font-size:11px; }
.toast strong { display:block; font-size:10.5px; margin-bottom:3px; }
.toast span { display:block; color:#aec0b8; font-size:9.5px; line-height:1.4; }
@keyframes toastIn { from{opacity:0; transform:translateY(9px)} to{opacity:1; transform:none} }
.mobile-overlay { display:none; }

@media (max-width: 1450px) {
  .lead-card-actions { grid-template-columns:.8fr 1.2fr; }
  .lead-card-actions [data-action="generate"] { grid-column:1/-1; }
}

@media (max-width: 1180px) {
  :root { --sidebar-width: 228px; }
  .content { padding-left: 24px; padding-right: 24px; }
  .primary-search-row { grid-template-columns: 1.5fr 1fr 1fr; }
  .search-button { grid-column: 1/-1; width: 100%; }
  .leads-grid, .sites-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .metric-grid { grid-template-columns: repeat(2,1fr); }
  .top-generate-button { padding:0 12px; }
}

@media (max-width: 860px) {
  .sidebar { transform:translateX(-102%); transition:.25s ease; width:260px; box-shadow:20px 0 50px rgba(0,0,0,.22); }
  .sidebar.open { transform:none; }
  .main-wrap { margin-left:0; width:100%; }
  .menu-button { display:inline-grid !important; }
  .mobile-overlay { position:fixed; inset:0; background:rgba(6,22,15,.5); z-index:45; }
  .mobile-overlay.open { display:block; }
  .topbar { padding:0 17px; }
  .topbar-search { width:auto; flex:1; }
  .shortcut { display:none; }
  .credit-pill { display:flex; height:40px; padding:0 10px; }
  .top-generate-button span { display:none; }
  .content { padding:25px 17px 50px; }
  .page-heading { align-items:flex-end; }
  .history-button { display:none; }
  .template-grid, .settings-layout { grid-template-columns:1fr; }
  .ai-builder-choice { grid-template-columns:160px 1fr; }
  .ai-builder-choice-actions { grid-column:1/-1; padding-top:0; }
  .ai-stage-list { grid-template-columns:repeat(2,1fr); }
}

@media (max-width: 640px) {
  .topbar-search { display:none; }
  .topbar-actions { margin-left:auto; }
  .topbar { gap:10px; }
  .topbar-actions { gap:7px; }
  .top-generate-button { width:auto; min-width:82px; padding:0 12px; }
  .top-generate-button svg { margin:0; }
  .top-generate-button span { display:inline; }
  .page-heading h1 { font-size:30px; }
  .page-heading p { font-size:12px; }
  .search-panel { padding:16px; }
  .search-panel-top { align-items:flex-start; }
  .api-status { font-size:0; padding:7px; }
  .primary-search-row { grid-template-columns:1fr; }
  .search-button { grid-column:auto; }
  .filter-row { align-items:stretch; }
  .filter-chip, .mini-select, .more-filters { flex:1 1 calc(50% - 8px); justify-content:center; }
  .more-filters { margin-left:0; }
  .metric-grid { grid-template-columns:1fr 1fr; gap:9px; }
  .metric-card { padding:12px; min-height:92px; grid-template-columns:34px 1fr; }
  .metric-icon { width:34px; height:34px; }
  .metric-card strong { font-size:17px; }
  .section-toolbar { align-items:flex-start; }
  .toolbar-actions { display:none; }
  .leads-grid, .sites-grid { grid-template-columns:1fr; }
  .done-lead-button span { display:none; }
  .done-lead-button { width:29px; padding:0; justify-content:center; }
  .empty-state { min-height:300px; padding:27px 20px; }
  .modal-backdrop { padding:10px; align-items:flex-end; }
  .modal { max-height:94vh; border-radius:18px 18px 0 0; }
  .generation-modal { display:flex; flex-direction:column; overflow:hidden; }
  .generation-modal .modal-head { flex:0 0 auto; }
  .generation-modal .modal-body { min-height:0; overflow-y:auto; overscroll-behavior:contain; padding-bottom:calc(22px + env(safe-area-inset-bottom)); }
  .detail-grid, .form-two-col { grid-template-columns:1fr; }
  .details-hero { grid-template-columns:50px 1fr; }
  .details-score { grid-column:1/-1; display:flex; justify-content:center; gap:5px; align-items:baseline; }
  .details-score strong { display:inline; }
  .generation-options { grid-template-columns:1fr; }
  .doctor-template-grid { grid-template-columns:1fr; }
  .doctor-template-copy p { min-height:0; }
  .ai-builder-choice { display:block; }
  .ai-builder-choice .doctor-template-visual { height:96px; min-height:96px; }
  .ai-builder-choice .doctor-template-copy { padding:13px 13px 7px; }
  .ai-builder-mobile-cta { display:flex !important; width:100%; min-height:50px; margin:10px 0 8px; padding:10px 14px; white-space:normal; font-size:12px; line-height:1.25; position:relative; z-index:1; }
  .ai-builder-choice-actions { display:none !important; }
  .ai-editor-actions { grid-template-columns:1fr; }
  .ai-stage-list { grid-template-columns:1fr; }
  .ai-stage-list > div { min-height:44px; }
  .ai-build-loader-top { grid-template-columns:1fr; text-align:center; }
  .ai-build-loader-top .ai-orbit-loader { margin:0 auto; }
  .ai-build-loader-top .ai-model-pill { margin-left:auto; margin-right:auto; }
  .ai-result-actions { grid-template-columns:1fr 1fr; }
  .ai-admin-credentials { grid-template-columns:1fr; }
  .theme-option { display:grid; grid-template-columns:100px 1fr; align-items:center; gap:10px; }
  .theme-swatch { height:55px; margin:0; }
  .modal-action-row { flex-direction:column; }
  .template-preview { height:200px; }
  .integration-row { grid-template-columns:38px 1fr; }
  .integration-row .btn { grid-column:1/-1; }
}

@media (max-width: 390px) {
  .topbar { padding:0 11px; gap:7px; }
  .topbar-actions { gap:5px; }
  .credit-pill { padding:0 9px; }
  .credit-label { display:none; }
  .top-generate-button { min-width:76px; padding:0 10px; }
}
