:root {
  color-scheme: light;
  --ink: #15231e;
  --ink-soft: #33443d;
  --muted: #7a8981;
  --muted-dark: #a9b8af;
  --line: #e4eae4;
  --paper: #f5f7f2;
  --surface: #fff;
  --forest: #17372e;
  --forest-deep: #112c25;
  --forest-soft: #20483c;
  --green: #2a795f;
  --lime: #d5f269;
  --lime-strong: #c3e943;
  --blue: #4e79da;
  --amber: #c88b30;
  --violet: #8166bd;
  --red: #bc625b;
  --shadow: 0 24px 70px rgb(24 49 38 / 14%);
  --radius: 14px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); }
body { min-width: 320px; margin: 0; color: var(--ink); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid rgb(78 121 218 / 48%); outline-offset: 3px; }
button:disabled { opacity: .48; cursor: not-allowed; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.eyebrow { margin: 0 0 8px; color: #819188; font-size: 10px; font-weight: 800; letter-spacing: .12em; line-height: 1.2; }
.light-eyebrow { color: #b7c9bf; }

/* App frame */
.app-body { background: var(--paper); }
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; display: flex; width: 250px; flex-direction: column; padding: 28px 18px 18px; overflow-y: auto; color: #f3f8f2; background: var(--forest); }
.brand { display: inline-flex; align-items: center; gap: 10px; width: max-content; color: inherit; text-decoration: none; font-size: 20px; font-weight: 750; letter-spacing: -.055em; }
.brand-mark { display: grid; width: 26px; height: 26px; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 3px; padding: 5px 4px; border-radius: 8px; background: var(--lime); transform: rotate(-5deg); }
.brand-mark span { display: block; border-radius: 3px 3px 2px 2px; background: var(--forest); }
.brand-mark span:nth-child(1) { height: 8px; }
.brand-mark span:nth-child(2) { height: 14px; }
.brand-mark span:nth-child(3) { height: 10px; }
.sidebar-caption { margin: 42px 0 12px 12px; color: #91a69a; font-size: 9px; font-weight: 800; letter-spacing: .15em; }
.primary-nav { display: grid; gap: 5px; }
.nav-link { position: relative; display: flex; min-height: 44px; align-items: center; gap: 12px; padding: 0 12px; border: 0; border-radius: 9px; color: #c5d2ca; background: transparent; text-align: left; cursor: pointer; transition: background .18s ease, color .18s ease, transform .18s ease; }
.nav-link:hover { color: #fff; background: rgb(255 255 255 / 7%); }
.nav-link:active { transform: scale(.985); }
.nav-link.is-active { color: #fff; background: var(--forest-soft); box-shadow: inset 3px 0 0 var(--lime); }
.nav-icon { display: inline-grid; width: 20px; place-items: center; color: #b7c8bd; font-size: 19px; line-height: 1; }
.nav-link.is-active .nav-icon { color: var(--lime); }
.nav-count { display: grid; min-width: 21px; height: 21px; place-items: center; margin-left: auto; border-radius: 99px; color: #19342b; background: var(--lime); font-size: 11px; font-weight: 800; }
.sidebar-divider { height: 1px; margin: 26px 3px 0; background: rgb(226 238 229 / 12%); }
.sidebar-divider + .sidebar-caption { margin-top: 25px; }
.sidebar-spacer { flex: 1; min-height: 36px; }
.sidebar-help { display: grid; grid-template-columns: 31px 1fr 24px; align-items: center; gap: 9px; padding: 12px 9px; border: 1px solid rgb(255 255 255 / 10%); border-radius: 11px; background: rgb(255 255 255 / 4%); }
.help-mark { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 8px; color: var(--forest); background: var(--lime); font-weight: 800; }
.sidebar-help strong, .sidebar-help span { display: block; }
.sidebar-help strong { font-size: 11px; font-weight: 700; }
.sidebar-help span { margin-top: 2px; color: #aec0b5; font-size: 9px; }
.icon-button { display: inline-grid; width: 34px; height: 34px; place-items: center; padding: 0; border: 1px solid transparent; border-radius: 9px; color: #60736a; background: transparent; cursor: pointer; transition: border-color .18s ease, background .18s ease, color .18s ease; }
.icon-button:hover { border-color: var(--line); color: var(--ink); background: #fff; }
.help-open { width: 24px; height: 24px; color: #b4c4ba; font-size: 12px; }
.sidebar-profile { display: flex; align-items: center; gap: 10px; margin-top: 17px; padding: 15px 4px 0; border-top: 1px solid rgb(226 238 229 / 13%); }
.avatar { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid rgb(255 255 255 / 25%); border-radius: 50%; color: #18372c; background: #e5efcf; font-size: 13px; font-weight: 800; }
.profile-copy { min-width: 0; flex: 1; }
.profile-copy strong, .profile-copy span { display: block; }
.profile-copy strong { font-size: 11px; font-weight: 700; }
.profile-copy span { margin-top: 1px; color: #a8bbb0; font-size: 10px; }
.profile-menu { width: 27px; height: 27px; color: #afc0b6; transform: rotate(90deg); }
.main-content { min-height: 100vh; margin-left: 250px; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; min-height: 86px; align-items: center; justify-content: space-between; gap: 18px; padding: 17px clamp(25px, 4vw, 62px); border-bottom: 1px solid var(--line); background: rgb(245 247 242 / 94%); backdrop-filter: blur(14px); }
.topbar-title span { display: block; margin-bottom: 3px; color: #8d9a92; font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.topbar-title h1 { margin: 0; font-size: 17px; font-weight: 730; letter-spacing: -.03em; }
.topbar-actions { display: flex; align-items: center; gap: 15px; }
.worker-indicator { display: flex; align-items: center; gap: 7px; color: #6d7e73; font-size: 11px; }
.status-dot { display: inline-block; width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: #a6b3aa; }
.status-dot.is-online { background: #56a778; box-shadow: 0 0 0 4px rgb(86 167 120 / 12%); }
.status-dot.is-offline { background: #c36f69; box-shadow: 0 0 0 4px rgb(195 111 105 / 12%); }
.status-dot.is-busy { background: #dfa84b; box-shadow: 0 0 0 4px rgb(223 168 75 / 12%); }
.button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 9px; padding: 0 17px; border: 1px solid transparent; border-radius: 9px; font-size: 12px; font-weight: 750; text-decoration: none; cursor: pointer; transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0) scale(.985); }
.button-primary { border-color: #c9e95b; color: #20301c; background: var(--lime); box-shadow: 0 3px 0 rgb(21 49 36 / 5%); }
.button-primary:hover { background: var(--lime-strong); box-shadow: 0 7px 18px rgb(111 143 48 / 17%); }
.button-secondary { border-color: #dbe3dc; color: #46584f; background: #fff; }
.button-secondary:hover { border-color: #bfcfc3; background: #fbfcfa; }
.button-quiet { border-color: transparent; color: #62746a; background: transparent; }
.button-quiet:hover { background: #f0f3ee; }
.button-wide { width: 100%; }
.plus-mark { display: inline-grid; width: 19px; height: 19px; place-items: center; border-radius: 6px; background: rgb(23 55 46 / 9%); font-size: 17px; line-height: 1; }
.mobile-menu { display: none; }
.content-wrap { width: min(100%, 1510px); margin: 0 auto; padding: 34px clamp(25px, 4vw, 62px) 56px; }
.page-section { animation: section-in .28s ease both; }
.page-section.is-visible { display: block; }
@keyframes section-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* Overview */
.welcome-block { position: relative; display: flex; min-height: 194px; align-items: center; justify-content: space-between; gap: 25px; overflow: hidden; padding: 27px 34px; border: 1px solid #e6eadf; border-radius: 15px; background: linear-gradient(108deg, #fdfefb 0%, #f7f9ef 72%, #eef4dd 100%); }
.welcome-block > div:first-child { position: relative; z-index: 1; max-width: 650px; }
.welcome-block h2 { max-width: 560px; margin: 0; font-size: clamp(23px, 2.5vw, 32px); font-weight: 760; letter-spacing: -.055em; line-height: 1.16; }
.welcome-block p:not(.eyebrow) { max-width: 510px; margin: 11px 0 0; color: #75837a; font-size: 13px; }
.welcome-art { position: relative; width: 175px; height: 160px; flex: 0 0 auto; margin-right: 45px; }
.art-ring { position: absolute; display: block; border: 1px solid #d8e4ba; border-radius: 50%; }
.ring-outer { inset: 12px 0 0 12px; }
.ring-inner { inset: 31px 19px 19px 31px; border-color: #c1d68f; }
.art-pin { position: absolute; top: 46px; left: 60px; display: grid; width: 58px; height: 58px; place-items: center; border: 5px solid #e9f0d8; border-radius: 18px 18px 18px 5px; color: #f1f5e7; background: var(--forest); box-shadow: 0 10px 24px rgb(39 83 58 / 22%); font-size: 28px; transform: rotate(-12deg); }
.art-spark { position: absolute; color: #6a8d4a; font-size: 16px; }
.spark-a { top: 22px; right: 17px; }
.spark-b { bottom: 14px; left: 4px; color: #d2a448; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 30px 0 38px; border-bottom: 1px solid var(--line); }
.metric-item { min-height: 112px; padding: 5px 22px 22px; border-right: 1px solid var(--line); }
.metric-item:first-child { padding-left: 0; }
.metric-item:last-child { border-right: 0; }
.metric-label { display: block; color: #718078; font-size: 11px; font-weight: 600; }
.metric-value { margin-top: 6px; color: var(--ink); font-size: 28px; font-weight: 760; letter-spacing: -.06em; line-height: 1.25; }
.metric-foot { display: flex; align-items: center; gap: 7px; margin-top: 5px; color: #97a198; font-size: 10px; }
.metric-icon { display: inline-grid; width: 17px; height: 17px; place-items: center; border-radius: 5px; font-size: 12px; font-weight: 800; }
.metric-icon-green { color: #327456; background: #e1f0e4; }
.metric-icon-blue { color: #4c72c3; background: #e7edfb; }
.metric-icon-amber { color: #a77830; background: #f9f0de; }
.metric-icon-violet { color: #765fa7; background: #eee9f8; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 15px; margin-bottom: 13px; }
.section-heading .eyebrow { margin-bottom: 5px; }
.section-heading h3 { margin: 0; font-size: 17px; letter-spacing: -.035em; }
.text-button { padding: 5px 0; border: 0; color: #568167; background: transparent; font-size: 11px; font-weight: 750; cursor: pointer; }
.text-button:hover { color: var(--forest); }
.data-surface { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.recent-surface { min-height: 190px; }
.table-scroll { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; }
.data-table thead { background: #fbfcfa; }
.data-table th { height: 42px; padding: 0 16px; color: #8c9991; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.sort-button { display: inline-flex; align-items: center; gap: 5px; padding: 0; border: 0; color: inherit; background: transparent; font-size: inherit; font-weight: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.sort-button:hover { color: #4b7560; }
.sort-button span { color: #b0bab2; font-size: 11px; }
.data-table td { height: 59px; padding: 9px 16px; border-top: 1px solid #edf0ec; color: #68776f; font-size: 11px; }
.data-table tbody tr { transition: background .14s ease; }
.data-table tbody tr:hover { background: #fbfcf8; }
.table-primary { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); font-size: 11px; font-weight: 700; }
.table-icon { display: grid; width: 29px; height: 29px; place-items: center; border: 1px solid #e5eadf; border-radius: 8px; color: #477256; background: #f2f6ed; font-size: 14px; }
.table-secondary { display: block; margin-top: 2px; color: #99a49d; font-size: 9px; font-weight: 500; }
.status-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 99px; color: #69786e; background: #f1f3f0; font-size: 9px; font-weight: 700; }
.status-chip::before { width: 5px; height: 5px; border-radius: 50%; background: #a9b2ab; content: ""; }
.status-chip.status-running { color: #8d6728; background: #fbf3df; }
.status-chip.status-running::before { background: #d4a542; animation: pulse 1.5s infinite; }
.status-chip.status-completed { color: #387256; background: #eaf4ea; }
.status-chip.status-completed::before { background: #56a778; }
.status-chip.status-failed { color: #a2504b; background: #faeae7; }
.status-chip.status-failed::before { background: #c66a63; }
.status-chip.status-cancelled { color: #777e79; background: #eff1ee; }
@keyframes pulse { 50% { box-shadow: 0 0 0 4px rgb(212 165 66 / 18%); } }
.row-open { width: 28px; height: 28px; color: #8e9a92; }
.bottom-note { display: flex; align-items: center; gap: 12px; margin-top: 17px; padding: 14px 16px; border: 1px solid #e8ecdf; border-radius: 10px; background: #f9fbf5; }
.note-icon { display: grid; width: 28px; height: 28px; flex: 0 0 auto; place-items: center; border-radius: 8px; color: #62824f; background: #edf4da; }
.bottom-note p { flex: 1; margin: 0; color: #829087; font-size: 10px; }
.bottom-note strong { color: #46574c; font-weight: 700; }

/* Search, leads, settings pages */
.page-intro-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 4px 0 24px; }
.page-intro-row h2 { margin: 0; font-size: 27px; font-weight: 760; letter-spacing: -.055em; }
.page-intro-row p:not(.eyebrow) { margin: 7px 0 0; font-size: 12px; }
.filter-row, .lead-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.search-control { display: flex; min-width: 260px; height: 39px; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid #dfe6df; border-radius: 8px; color: #91a098; background: #fff; }
.search-control:focus-within { border-color: #a3c7ae; box-shadow: 0 0 0 3px rgb(86 142 102 / 10%); }
.search-control span { font-size: 16px; }
.search-control input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 11px; }
.search-control input::placeholder { color: #9da8a1; }
.filter-row select, .lead-toolbar select, .field select, .field input:not([type="checkbox"]):not([type="range"]), .password-field input { width: 100%; min-height: 41px; padding: 0 12px; border: 1px solid #dfe6df; border-radius: 8px; outline: none; color: #304239; background: #fff; font-size: 11px; }
.filter-row select, .lead-toolbar > select { width: max-content; min-width: 150px; }
.filter-row select:focus, .field select:focus, .field input:focus, .lead-toolbar select:focus { border-color: #a3c7ae; box-shadow: 0 0 0 3px rgb(86 142 102 / 10%); }
.data-surface .empty-state { min-height: 280px; }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 37px 20px; text-align: center; }
.empty-illustration { position: relative; display: grid; width: 62px; height: 62px; place-items: center; margin-bottom: 14px; border: 1px solid #e5ebdf; border-radius: 19px; color: #678b69; background: #f3f7ed; font-size: 26px; transform: rotate(-4deg); }
.empty-illustration i { position: absolute; right: -5px; bottom: -5px; width: 17px; height: 17px; border: 3px solid white; border-radius: 50%; background: var(--lime); }
.empty-state h4 { margin: 0; font-size: 14px; letter-spacing: -.02em; }
.empty-state p { max-width: 340px; margin: 7px 0 17px; color: #8d9991; font-size: 11px; }
.empty-state .button { min-height: 38px; }
.lead-toolbar { flex-wrap: wrap; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.compact-field { min-width: 170px; }
.compact-field span { display: block; margin-bottom: 4px; color: #84928a; font-size: 9px; font-weight: 700; }
.compact-field select { min-height: 35px; }
.lead-search { flex: 1; }
.toggle-inline { display: inline-flex; align-items: center; gap: 7px; padding: 0 4px; color: #617067; font-size: 10px; white-space: nowrap; cursor: pointer; }
.toggle-inline input { accent-color: #478267; }
.result-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 11px 2px; color: #88968e; font-size: 10px; }
.manual-review-hint { display: inline-flex; align-items: center; gap: 6px; color: #a18756; }
.manual-review-hint i { width: 6px; height: 6px; border-radius: 50%; background: #d5ae60; }
.lead-table th { height: 43px; }
.lead-table td { height: 63px; }
.business-name { display: block; max-width: 225px; overflow: hidden; color: #2a3c32; font-size: 11px; font-weight: 750; text-overflow: ellipsis; }
.business-sub { display: block; max-width: 220px; overflow: hidden; margin-top: 3px; color: #98a39d; font-size: 9px; text-overflow: ellipsis; }
.rating-value { display: inline-flex; align-items: center; gap: 4px; color: #68766e; }
.rating-value span { color: #dba846; font-size: 12px; }
.website-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 6px; color: #44775c; background: #edf5ee; font-size: 9px; font-weight: 750; }
.website-badge.is-missing { color: #9a7129; background: #fbf4e5; }
.website-badge.is-present { color: #44775c; background: #edf5ee; }
.website-badge.is-unknown { color: #78847d; background: #f0f2ef; }
.website-link { color: #4b8065; text-decoration: none; }
.website-link:hover { text-decoration: underline; }
.pagination-row { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; color: #8b9990; font-size: 10px; }
.pagination-row > div { display: flex; align-items: center; gap: 7px; }
.pagination-row .icon-button { width: 30px; height: 30px; border-color: #e0e7df; background: #fff; }
.export-actions { display: flex; gap: 8px; }
.settings-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 15px; }
.settings-panel { padding: 21px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.settings-panel-heading { display: flex; align-items: center; gap: 11px; padding-bottom: 17px; border-bottom: 1px solid #edf0ec; }
.settings-symbol { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 10px; color: #376c55; background: #eaf3e7; font-size: 16px; }
.settings-symbol-lime { color: #566e2d; background: #f0f6db; }
.settings-panel-heading h3 { margin: 0; font-size: 13px; }
.settings-panel-heading p { margin: 3px 0 0; color: #8b9790; font-size: 10px; }
.connection-row { display: flex; align-items: center; gap: 11px; padding-top: 18px; }
.connection-row > div { flex: 1; }
.connection-row strong, .connection-row small { display: block; }
.connection-row strong { font-size: 11px; }
.connection-row small { margin-top: 3px; color: #8e9b93; font-size: 9px; }
.connection-row .button { min-height: 34px; padding: 0 10px; font-size: 10px; }
.steps-list { display: grid; gap: 14px; margin: 18px 0 0; padding: 0; list-style: none; }
.steps-list li { display: flex; align-items: flex-start; gap: 11px; }
.steps-list li > span { display: grid; width: 27px; height: 27px; flex: 0 0 auto; place-items: center; border-radius: 8px; color: #6d8462; background: #f1f5e7; font-size: 9px; font-weight: 800; }
.steps-list strong, .steps-list small { display: block; }
.steps-list strong { font-size: 10px; }
.steps-list small { margin-top: 3px; color: #8c9991; font-size: 9px; }

/* Search modal */
.modal-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgb(15 33 27 / 56%); backdrop-filter: blur(5px); animation: fade-in .16s ease both; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.search-modal { width: min(720px, 100%); max-height: min(92vh, 850px); overflow: auto; padding: 25px 28px 22px; border: 1px solid rgb(255 255 255 / 72%); border-radius: 17px; background: #fcfdfa; box-shadow: var(--shadow); animation: modal-in .22s cubic-bezier(.2,.8,.2,1) both; }
@keyframes modal-in { from { opacity: .5; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
.modal-header { display: flex; justify-content: space-between; gap: 20px; }
.modal-header h2 { margin: 0; font-size: 21px; font-weight: 770; letter-spacing: -.05em; }
.modal-header p.muted { margin: 6px 0 0; font-size: 11px; }
.modal-close { width: 32px; height: 32px; border-color: #e5eae4; background: #fff; font-size: 20px; }
.step-indicator { position: relative; display: grid; grid-template-columns: 30px 1fr 30px 1fr; align-items: center; gap: 8px; margin: 24px 0 20px; }
.step-dot { display: grid; width: 27px; height: 27px; place-items: center; border: 1px solid #dce5dc; border-radius: 50%; color: #9ba69e; background: #fff; font-size: 9px; font-weight: 800; }
.step-dot.is-current, .step-dot.is-done { border-color: var(--forest); color: #fff; background: var(--forest); }
.step-line { height: 1px; background: #dce5dc; }
.step-label { position: absolute; top: 31px; left: 0; color: #54675c; font-size: 9px; font-weight: 700; }
.step-label-last { left: auto; right: 0; color: #a0aaa2; font-weight: 600; }
.modal-form { margin-top: 28px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 14px; }
.field { min-width: 0; }
.field-wide { grid-column: 1 / -1; }
.field > label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; color: #43544a; font-size: 10px; font-weight: 750; }
.field small { display: block; margin-top: 5px; color: #99a49d; font-size: 9px; }
.field-hint { color: #a0aaa3; font-size: 9px; font-weight: 600; }
.input-with-icon { position: relative; }
.input-with-icon > span { position: absolute; top: 50%; left: 12px; color: #809187; font-size: 15px; transform: translateY(-50%); }
.input-with-icon input { padding-left: 35px !important; }
.category-combobox { position: relative; display: flex; align-items: center; border: 1px solid #dfe6df; border-radius: 8px; background: #fff; }
.category-combobox:focus-within { border-color: #a3c7ae; box-shadow: 0 0 0 3px rgb(86 142 102 / 10%); }
.category-combobox input { min-width: 0; flex: 1; min-height: 41px; padding: 0 12px; border: 0; border-radius: inherit; outline: none; color: #304239; background: transparent; font-size: 11px; }
.category-combobox input::placeholder { color: #a0aaa3; }
.category-add { display: grid; width: 29px; height: 29px; place-items: center; margin-right: 6px; border: 0; border-radius: 7px; color: var(--forest); background: #eef4e8; font-size: 18px; cursor: pointer; }
.category-suggestions { position: absolute; top: calc(100% + 6px); right: 0; left: 0; z-index: 12; max-height: 190px; overflow: auto; padding: 5px; border: 1px solid #e0e7df; border-radius: 9px; background: #fff; box-shadow: 0 13px 35px rgb(20 39 29 / 12%); }
.category-suggestion { display: flex; width: 100%; align-items: center; justify-content: space-between; padding: 8px 9px; border: 0; border-radius: 6px; color: #485b50; background: transparent; text-align: left; font-size: 10px; cursor: pointer; }
.category-suggestion:hover { color: var(--forest); background: #f2f6ec; }
.category-suggestion span:last-child { color: #a3aea5; }
.selected-categories { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.category-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 7px 5px 9px; border: 1px solid #e1e9de; border-radius: 7px; color: #4d6856; background: #f4f7ee; font-size: 9px; font-weight: 700; }
.category-chip button { display: grid; width: 15px; height: 15px; place-items: center; padding: 0; border: 0; border-radius: 4px; color: #839381; background: transparent; font-size: 13px; cursor: pointer; }
.category-chip button:hover { color: var(--red); background: #fff; }
.estimate-row { display: flex; align-items: center; gap: 10px; margin-top: 2px; padding: 11px 12px; border: 1px solid #e6ecdd; border-radius: 9px; background: #f8faf3; }
.estimate-icon { display: grid; width: 29px; height: 29px; flex: 0 0 auto; place-items: center; border-radius: 8px; color: #548064; background: #e8f1df; font-size: 15px; }
.estimate-row > div:nth-child(2) { flex: 1; }
.estimate-row strong, .estimate-row span { display: block; }
.estimate-row strong { color: #425449; font-size: 9px; }
.estimate-row span { margin-top: 2px; color: #8d9b91; font-size: 9px; }
.estimate-row .estimate-count { margin: 0; color: #4f7359; font-size: 14px; font-weight: 800; }
.advanced-options { margin-top: 15px; border-top: 1px solid #e9ede8; }
.advanced-options summary { display: flex; align-items: center; gap: 8px; padding: 12px 0 3px; color: #4d5e53; font-size: 10px; font-weight: 750; cursor: pointer; list-style: none; }
.advanced-options summary::-webkit-details-marker { display: none; }
.advanced-options summary::before { content: "+"; display: grid; width: 17px; height: 17px; place-items: center; border-radius: 5px; color: #64836b; background: #edf3e7; font-size: 13px; }
.advanced-options[open] summary::before { content: "−"; }
.advanced-options summary span { color: #9ca79f; font-size: 9px; font-weight: 500; }
.advanced-grid { padding: 12px 0 3px; }
.advanced-grid input:not([type="range"]) { min-height: 35px; }
.inline-fields { display: flex; align-items: center; gap: 8px; color: #829087; }
.inline-fields input { max-width: 92px; }
.rating-control { display: flex; align-items: center; gap: 10px; min-height: 35px; }
.rating-control input { flex: 1; accent-color: #4f8064; }
.rating-control output { min-width: 29px; color: #597160; font-size: 10px; font-weight: 750; }
.toggle-option { display: flex; align-items: center; gap: 9px; align-self: end; min-height: 40px; cursor: pointer; }
.toggle-option input { position: absolute; opacity: 0; }
.toggle-track { position: relative; width: 33px; height: 19px; flex: 0 0 auto; border-radius: 99px; background: #d9e0d9; transition: background .16s ease; }
.toggle-track::after { position: absolute; top: 3px; left: 3px; width: 13px; height: 13px; border-radius: 50%; background: white; box-shadow: 0 1px 3px rgb(15 35 23 / 18%); transition: transform .16s ease; content: ""; }
.toggle-option input:checked + .toggle-track { background: #4f8064; }
.toggle-option input:checked + .toggle-track::after { transform: translateX(14px); }
.toggle-option input:focus-visible + .toggle-track { outline: 3px solid rgb(78 121 218 / 48%); outline-offset: 3px; }
.toggle-option strong, .toggle-option small { display: block; }
.toggle-option strong { color: #4a5d51; font-size: 9px; }
.toggle-option small { margin-top: 2px; color: #99a49d; font-size: 8px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; padding-top: 13px; border-top: 1px solid #e9ede8; }
.review-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; overflow: hidden; border: 1px solid #e5ebe2; border-radius: 11px; background: #fff; }
.review-cell { min-height: 82px; padding: 14px; border-bottom: 1px solid #edf0eb; }
.review-cell:nth-child(odd) { border-right: 1px solid #edf0eb; }
.review-cell:nth-last-child(-n+2) { border-bottom: 0; }
.review-cell span, .review-cell strong { display: block; }
.review-cell span { color: #8e9b92; font-size: 9px; }
.review-cell strong { margin-top: 5px; color: #33473a; font-size: 12px; font-weight: 750; }
.review-note { display: flex; gap: 9px; margin-top: 14px; padding: 11px; border-radius: 8px; color: #95733d; background: #fbf5e9; }
.review-note > span { font-size: 14px; }
.review-note p { margin: 0; color: #887754; font-size: 9px; }
.search-step-loading { opacity: .55; pointer-events: none; }

/* Job details, toasts, login */
.job-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 60; width: min(450px, 100vw); overflow-y: auto; padding: 24px; border-left: 1px solid #e1e8df; background: #fbfcfa; box-shadow: -20px 0 55px rgb(19 40 29 / 12%); animation: drawer-in .22s ease both; }
@keyframes drawer-in { from { transform: translateX(20px); opacity: .6; } to { transform: translateX(0); opacity: 1; } }
.drawer-header { display: flex; justify-content: space-between; gap: 18px; padding-bottom: 17px; border-bottom: 1px solid #e8ede7; }
.drawer-header h2 { margin: 0; font-size: 18px; letter-spacing: -.04em; }
.drawer-header .icon-button { border-color: #e2e8e1; background: #fff; font-size: 19px; }
.drawer-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 18px 0; border: 1px solid #e7ece6; border-radius: 10px; background: #fff; }
.drawer-stat { padding: 13px; border-bottom: 1px solid #edf0eb; }
.drawer-stat:nth-child(odd) { border-right: 1px solid #edf0eb; }
.drawer-stat:nth-last-child(-n+2) { border-bottom: 0; }
.drawer-stat span, .drawer-stat strong { display: block; }
.drawer-stat span { color: #87938b; font-size: 9px; }
.drawer-stat strong { margin-top: 4px; color: #33473a; font-size: 15px; }
.progress-block { margin: 19px 0; }
.progress-label { display: flex; justify-content: space-between; color: #52645a; font-size: 10px; }
.progress-track { height: 7px; overflow: hidden; margin-top: 8px; border-radius: 9px; background: #e8ede6; }
.progress-meter { display: block; width: 100%; height: 100%; border: 0; appearance: none; background: transparent; }
.progress-meter::-webkit-progress-bar { border-radius: inherit; background: transparent; }
.progress-meter::-webkit-progress-value { border-radius: inherit; background: #76a078; transition: width .3s ease; }
.progress-meter::-moz-progress-bar { border-radius: inherit; background: #76a078; }
.drawer-section-title { margin: 22px 0 9px; color: #829087; font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.drawer-log { display: grid; gap: 6px; max-height: 220px; overflow: auto; padding: 0; list-style: none; }
.drawer-log li { display: flex; gap: 8px; color: #66766d; font-size: 9px; }
.drawer-log time { flex: 0 0 auto; color: #a0aaa3; font-variant-numeric: tabular-nums; }
.drawer-error { margin: 13px 0; padding: 11px; border: 1px solid #f0d8d5; border-radius: 8px; color: #9d514b; background: #fcf1ef; font-size: 10px; }
.drawer-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 19px; }
.drawer-actions .button { min-height: 36px; padding: 0 11px; font-size: 10px; }
.drawer-scrim { position: fixed; inset: 0; z-index: 55; background: rgb(16 36 28 / 24%); }
.toast-region { position: fixed; right: 21px; bottom: 20px; z-index: 90; display: grid; gap: 8px; }
.toast { display: flex; align-items: center; gap: 9px; max-width: 360px; padding: 12px 15px; border: 1px solid #dce8dc; border-radius: 10px; color: #355542; background: #fff; box-shadow: 0 12px 36px rgb(18 42 29 / 12%); font-size: 11px; animation: section-in .18s ease both; }
.toast::before { width: 7px; height: 7px; border-radius: 50%; background: #6aa16e; content: ""; }
.toast.is-error { border-color: #f0d8d5; color: #9b504a; }
.toast.is-error::before { background: #c66a63; }
.login-body { background: #f7f8f4; }
.login-layout { display: grid; min-height: 100vh; grid-template-columns: minmax(0, 1.05fr) minmax(430px, .95fr); }
.login-story { position: relative; display: flex; min-height: 100vh; flex-direction: column; overflow: hidden; padding: 42px clamp(35px, 6vw, 90px); color: #f4f8f3; background: var(--forest); }
.brand-large { position: relative; z-index: 2; font-size: 22px; }
.story-copy { position: relative; z-index: 2; max-width: 560px; margin: auto 0; padding: 45px 0; }
.story-copy h1 { max-width: 550px; margin: 0; font-size: clamp(38px, 4.4vw, 62px); font-weight: 730; letter-spacing: -.065em; line-height: 1.06; }
.story-copy p:not(.eyebrow) { max-width: 460px; margin: 20px 0 0; color: #b9cbc0; font-size: 14px; line-height: 1.8; }
.story-note { position: relative; z-index: 2; display: flex; align-items: center; gap: 9px; margin-top: auto; padding-bottom: 8px; color: #9fb4a6; font-size: 11px; }
.story-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 5px rgb(213 242 105 / 12%); }
.story-orbit { position: absolute; display: block; border: 1px solid rgb(212 239 187 / 10%); border-radius: 50%; }
.orbit-one { width: min(62vw, 720px); aspect-ratio: 1; top: 16%; right: -42%; }
.orbit-two { width: min(46vw, 520px); aspect-ratio: 1; top: 25%; right: -29%; border-color: rgb(212 239 187 / 13%); }
.login-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 45px clamp(24px, 5vw, 75px); }
.login-card { width: min(390px, 100%); margin: auto; }
.login-mobile-brand { display: none; margin-bottom: 48px; color: var(--forest); }
.login-card h2 { margin: 0; font-size: 26px; letter-spacing: -.05em; }
.login-intro { margin: 8px 0 26px; font-size: 12px; }
.stack-form { display: grid; gap: 9px; }
.stack-form > label { color: #4a5b50; font-size: 10px; font-weight: 750; }
.password-field { position: relative; }
.password-field input { min-height: 45px; padding-right: 78px; }
.password-toggle { position: absolute; top: 50%; right: 10px; padding: 4px; border: 0; color: #6c8674; background: transparent; font-size: 9px; font-weight: 700; cursor: pointer; transform: translateY(-50%); }
.form-error { margin: 0; color: #aa4d48; font-size: 10px; }
.stack-form .button { min-height: 46px; margin-top: 6px; }
.login-footnote { display: flex; align-items: center; gap: 7px; margin: 18px 0 0; color: #97a39b; font-size: 9px; }
.lock-mark { font-size: 14px; }
.login-footer { margin-top: auto; color: #a5afa8; font-size: 8px; font-weight: 800; letter-spacing: .14em; }
.login-footer span { padding: 0 5px; color: #d3dda8; }

@media (max-width: 1180px) {
  .sidebar { width: 224px; }
  .main-content { margin-left: 224px; }
  .topbar { padding-inline: 28px; }
  .content-wrap { padding-inline: 28px; }
  .metric-item { padding-inline: 15px; }
  .data-table th, .data-table td { padding-inline: 12px; }
  .welcome-art { margin-right: 10px; }
}
@media (max-width: 960px) {
  .sidebar { width: 72px; align-items: center; padding: 21px 9px 13px; }
  .sidebar .brand { width: 42px; justify-content: center; overflow: hidden; }
  .sidebar .brand > span:last-child, .sidebar-caption, .nav-link > span:not(.nav-icon), .sidebar-divider, .sidebar-help, .profile-copy, .profile-menu { display: none; }
  .sidebar .primary-nav { width: 100%; margin-top: 34px; }
  .sidebar-divider + .sidebar-caption { display: none; }
  .nav-link { width: 48px; height: 48px; justify-content: center; padding: 0; }
  .nav-icon { font-size: 20px; }
  .sidebar-spacer { min-height: 24px; }
  .sidebar-profile { justify-content: center; width: 100%; padding-top: 13px; }
  .main-content { margin-left: 72px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 20px; }
  .metric-item:nth-child(2) { border-right: 0; }
  .metric-item:nth-child(3) { padding-left: 0; }
  .settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .sidebar { display: none; }
  .sidebar.is-open { display: flex; width: min(270px, 84vw); align-items: stretch; padding: 23px 18px 16px; box-shadow: 18px 0 46px rgb(16 36 28 / 20%); }
  .sidebar.is-open .brand { width: max-content; }
  .sidebar.is-open .brand > span:last-child, .sidebar.is-open .sidebar-caption, .sidebar.is-open .nav-link > span:not(.nav-icon), .sidebar.is-open .sidebar-divider, .sidebar.is-open .sidebar-help, .sidebar.is-open .profile-copy, .sidebar.is-open .profile-menu { display: flex; }
  .sidebar.is-open .sidebar-caption { display: block; }
  .sidebar.is-open .nav-link { width: auto; justify-content: flex-start; padding: 0 12px; }
  .sidebar.is-open .nav-link > span:not(.nav-icon) { display: inline; }
  .sidebar.is-open .sidebar-help { display: grid; }
  .sidebar.is-open .sidebar-profile { justify-content: flex-start; }
  .main-content { margin-left: 0; }
  .topbar { min-height: 68px; gap: 9px; padding: 12px 16px; }
  .mobile-menu { display: inline-grid; width: 32px; height: 32px; flex: 0 0 auto; color: #52655a; }
  .topbar-title { flex: 1; min-width: 0; }
  .topbar-title span { font-size: 7px; }
  .topbar-title h1 { font-size: 15px; }
  .topbar-actions { gap: 8px; }
  .worker-indicator { width: 8px; overflow: hidden; gap: 0; }
  .worker-indicator .status-dot { width: 7px; }
  .top-new-search { width: 37px; min-width: 37px; min-height: 37px; padding: 0; overflow: hidden; color: transparent; font-size: 0; }
  .top-new-search .plus-mark { width: 19px; height: 19px; flex: 0 0 auto; color: var(--forest); font-size: 17px; }
  .content-wrap { padding: 20px 15px 42px; }
  .welcome-block { min-height: 182px; padding: 24px 20px; }
  .welcome-block h2 { max-width: 380px; font-size: 24px; }
  .welcome-block p:not(.eyebrow) { max-width: 310px; font-size: 11px; }
  .welcome-art { position: absolute; right: -91px; bottom: -29px; opacity: .45; transform: scale(.78); }
  .metric-grid { gap: 0; margin: 22px 0 30px; row-gap: 15px; }
  .metric-item { min-height: 87px; padding: 0 10px 10px; }
  .metric-item:first-child, .metric-item:nth-child(3) { padding-left: 0; }
  .metric-item:nth-child(2) { padding-right: 0; }
  .metric-item:nth-child(3), .metric-item:nth-child(4) { border-bottom: 0; }
  .metric-item:nth-child(3) { border-right: 1px solid var(--line); }
  .metric-label { font-size: 9px; }
  .metric-value { margin-top: 4px; font-size: 24px; }
  .metric-foot { font-size: 8px; }
  .metric-icon { width: 14px; height: 14px; font-size: 10px; }
  .section-heading h3 { font-size: 15px; }
  .recent-surface { min-height: 210px; }
  .data-table { min-width: 660px; }
  .bottom-note { align-items: flex-start; padding: 11px; }
  .bottom-note p { font-size: 9px; }
  .bottom-note .text-button { display: none; }
  .page-intro-row { align-items: flex-start; flex-direction: column; margin: 4px 0 18px; }
  .page-intro-row h2 { font-size: 23px; }
  .page-intro-row .button, .export-actions { align-self: stretch; }
  .export-actions > .button { flex: 1; padding-inline: 9px; font-size: 10px; }
  .filter-row, .lead-toolbar { align-items: stretch; flex-direction: column; }
  .search-control, .filter-row select, .lead-toolbar > select { width: 100%; min-width: 0; }
  .lead-toolbar .compact-field { width: 100%; }
  .lead-toolbar > select { min-height: 38px; }
  .toggle-inline { padding: 4px 0; }
  .result-meta { align-items: flex-start; flex-direction: column; }
  .data-surface .empty-state { min-height: 240px; }
  .settings-panel { padding: 15px; }
  .connection-row { flex-wrap: wrap; }
  .connection-row .button { margin-left: 18px; }
  .search-modal { max-height: 94vh; padding: 20px 17px 16px; border-radius: 14px; }
  .modal-header h2 { font-size: 18px; }
  .modal-header p.muted { max-width: 300px; font-size: 10px; }
  .form-grid { grid-template-columns: 1fr; gap: 13px; }
  .field-wide { grid-column: auto; }
  .advanced-grid { grid-template-columns: 1fr 1fr; }
  .toggle-option { grid-column: 1 / -1; }
  .estimate-row { grid-column: auto; }
  .step-indicator { grid-template-columns: 27px 1fr 27px 1fr; }
  .modal-actions { justify-content: space-between; }
  .modal-actions .button { min-height: 39px; padding-inline: 12px; font-size: 10px; }
  .job-drawer { padding: 20px 16px; }
  .login-layout { grid-template-columns: 1fr; }
  .login-story { display: none; }
  .login-panel { min-height: 100vh; padding: 26px 22px; }
  .login-card { margin: auto; }
  .login-mobile-brand { display: inline-flex; }
  .login-footer { align-self: center; }
}
@media (max-width: 390px) {
  .welcome-block { padding-inline: 16px; }
  .welcome-block h2 { max-width: 280px; font-size: 21px; }
  .metric-item { padding-right: 6px; padding-left: 6px; }
  .metric-item:first-child, .metric-item:nth-child(3) { padding-left: 0; }
  .metric-value { font-size: 21px; }
  .section-heading .text-button { font-size: 10px; }
  .advanced-grid { grid-template-columns: 1fr; }
  .toggle-option { grid-column: auto; }
  .review-summary { grid-template-columns: 1fr; }
  .review-cell, .review-cell:nth-child(odd), .review-cell:nth-last-child(-n+2) { min-height: auto; border-right: 0; border-bottom: 1px solid #edf0eb; }
  .review-cell:last-child { border-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
