:root {
  --page-entrance: show .25s ease-out;
  --ink: #17221c; --muted: #6f7b74; --line: #e6ebe7; --paper: #f6f8f6; --white: #fff;
  --green: #1d7a52; --green-dark: #12543a; --green-pale: #e9f5ee; --orange: #e7944c;
  --shadow: 0 12px 35px rgba(31, 50, 39, .07); --radius: 18px;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, textarea, select { font: inherit; } button, a { -webkit-tap-highlight-color: transparent; }
.boot-view { position:fixed; inset:0; z-index:30; display:grid; place-content:center; justify-items:center; gap:12px; color:var(--muted); background:var(--paper); font-size:10px; letter-spacing:.03em; }.boot-view img { object-fit:contain; filter:drop-shadow(0 7px 13px rgba(19,54,35,.14)); }.boot-view span { animation:boot-pulse 1.2s ease-in-out infinite alternate; }@keyframes boot-pulse { to { opacity:.48; } }
.workspace-refresh { position:fixed; z-index:25; top:12px; right:16px; max-width:min(360px,calc(100vw - 32px)); padding:9px 12px; border:1px solid var(--line); border-radius:10px; background:var(--white); box-shadow:var(--shadow); color:var(--muted); font-size:12px; }
.workspace-refresh.error { color:#8b3f32; }
.workspace-shell-loading .overview-metric strong, .workspace-shell-loading #overviewPipelineTotal, .workspace-shell-loading #overviewPipelineTotalValue { color:transparent; background:var(--line); border-radius:5px; }
.workspace-shell-loading .overview-content { opacity:.45; }
#appShell.workspace-shell-loading .view { display:none; }
#appShell.workspace-shell-loading[data-preview-view="contacts"] #view-contacts { display:block; }
#appShell.workspace-shell-loading:not([data-preview-view]) #pageTitle { visibility:hidden; }
#appShell[data-preview-view] .view.active { animation:none; }
.workspace-shell-loading #leadsDefaultView,.workspace-shell-loading #leadWorkflows,.workspace-shell-loading #leadSourcing { display:none; }
.app-shell:not(.workspace-shell-loading) #workspaceWorkflowPreview { display:none; }
.auth-view { min-height:100vh; display:grid; place-items:center; padding:24px; background:radial-gradient(circle at 50% 0,#edf8f1 0,#f6f8f6 48%,#eef3f0 100%); }
.auth-card { width:min(430px,100%); padding:36px; background:var(--white); border:1px solid var(--line); border-radius:24px; box-shadow:0 24px 70px rgba(25,55,38,.11); }
.auth-card > img { display:block; width:58px; height:58px; object-fit:contain; margin-bottom:15px; filter:drop-shadow(0 7px 13px rgba(19,54,35,.16)); }
.auth-heading { display:flex; align-items:baseline; gap:7px; color:var(--green-dark); font-size:12px; letter-spacing:.04em; text-transform:uppercase; }.auth-heading strong { color:var(--green); }
.auth-card h1 { margin:18px 0 9px; font:500 30px Georgia,serif; letter-spacing:-.025em; }.auth-card > p { margin:0 0 25px; color:var(--muted); font-size:12px; line-height:1.65; }
.auth-card form { display:grid; gap:14px; }.auth-card label { display:grid; gap:8px; color:#536058; font-size:10px; font-weight:750; }.auth-card .button { width:100%; }
.auth-confirm { display:grid; gap:12px; }.auth-confirm p { margin:0 0 4px; color:var(--muted); font-size:11px; line-height:1.6; }.auth-secondary { border:0; background:transparent; color:var(--green-dark); font:inherit; font-size:10px; font-weight:700; cursor:pointer; padding:5px; }.auth-secondary:hover { text-decoration:underline; }
.auth-status { min-height:18px; margin-top:15px; color:var(--green); font-size:10px; line-height:1.5; }.auth-status.error { color:#9a4939; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 232px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 28px 18px 22px; background: #102c20; color: #fff; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; padding: 0 10px 34px; }
.brand-logo { width: 40px; height: 40px; flex: 0 0 40px; object-fit: contain; filter: drop-shadow(0 5px 11px rgba(0,0,0,.22)); }
.brand strong { display: block; letter-spacing: -.02em; font-size: 18px; }.brand small { color: #9eb5a8; font-size: 11px; text-transform: uppercase; letter-spacing: .14em; }
nav { display: grid; gap: 7px; }.nav-item { border: 0; color: #a9bcb1; background: transparent; border-radius: 11px; display: flex; align-items: center; gap: 12px; padding: 11px 12px; cursor: pointer; text-align: left; transition: .18s; }
.nav-item svg { width:20px; height:20px; flex:0 0 20px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }.nav-item:hover, .nav-item.active { color: #fff; background: rgba(255,255,255,.1); }.nav-item.active { box-shadow: inset 3px 0 #78d3a0; }
main { min-width: 0; padding: 0 42px 54px; }.topbar { height: 80px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }.topbar h1 { margin: 0; font-family: Georgia, serif; font-size: 25px; font-weight: 500; letter-spacing: -.02em; }.top-actions { display: flex; align-items: center; gap: 10px; }
.button { min-height: 40px; padding: 0 17px; border: 1px solid transparent; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: 12px; cursor: pointer; text-decoration: none; transition: transform .15s, box-shadow .15s, background .15s; }.button:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(20,50,35,.1); }.button:disabled { opacity: .55; cursor: wait; transform: none; }.button.primary { color: #fff; background: var(--green); }.button.secondary { color: #334239; background: #fff; border-color: var(--line); }.button.danger { color:#fff; background:#a74734; }.button.light { color: var(--green-dark); background: #fff; }.button.google { color: #334239; background: #fff; border-color: var(--line); }.button.google span { font-size: 15px; color: #4285f4; }.button.small { min-height: 34px; padding: 0 12px; }.account-chip { display: flex; align-items: center; gap: 9px; padding: 3px 8px 3px 4px; }.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #d7efe1; color: var(--green); font-weight: 800; }.account-chip strong,.account-chip small { display: block; }.account-chip strong { font-size: 11px; }.account-chip small { color: var(--muted); font-size: 9px; margin-top: 2px; }
.view { display: none; }.view.active { display: block; animation: var(--page-entrance); }@keyframes show { from { opacity: 0; transform: translateY(3px); } }
.metrics-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 13px; margin: 0 0 15px; }.metric { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 17px 19px; box-shadow: 0 3px 14px rgba(31,50,39,.025); }.metric-head { display:flex; align-items:center; justify-content:space-between; color: var(--muted); font-size: 10px; font-weight: 700; }.metric .icon { display:grid; place-items:center; width:25px; height:25px; border-radius:8px; font-style: normal; }.icon.blue { color:#3272b8;background:#eaf2fb }.icon.green { color:var(--green);background:var(--green-pale) }.icon.amber { color:#b56a23;background:#fff0df }.icon.violet { color:#7156ac;background:#f0ecf9 }.metric > strong { display:block; margin: 10px 0 4px; font: 500 29px Georgia,serif; }.metric > small { color:#96a099; font-size:9px; }
.dashboard-grid { display:block; }.panel { background:#fff; border:1px solid var(--line); border-radius:var(--radius); box-shadow:0 4px 18px rgba(31,50,39,.035); }.panel-head { padding: 20px 22px 15px; display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }.panel h3 { margin:0; font: 500 20px Georgia,serif; }.score { padding:6px 9px; border-radius:8px; color:var(--green); background:var(--green-pale); font-size:10px; font-weight:800; }.health-list { padding:0 12px 12px; }.health-row { display:grid; grid-template-columns:30px 1fr auto; align-items:center; gap:10px; padding:11px 10px; border-top:1px solid #f0f2f0; }.health-row > span { display:grid; place-items:center; width:25px; height:25px; border-radius:50%; font-size:10px; font-weight:800; }.health-row.complete > span { color:var(--green); background:var(--green-pale); }.health-row.attention > span { color:#ae6726; background:#fff0df; }.health-row.pending > span { color:#68736c; background:#eef1ef; }.health-row strong,.health-row small { display:block; }.health-row strong { font-size:11px; }.health-row small { color:#929b95; font-size:9px; margin-top:3px; }.health-row b { font-size:9px; color:var(--green); }.health-row.attention b { color:#b66a25 }.health-row.pending b { color:#818a84 }.empty-state { min-height:205px; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; color:#98a29c; }.empty-state > span { display:grid; place-items:center; width:39px; height:39px; border-radius:50%; background:#eff4f1; color:var(--green); margin-bottom:10px; }.empty-state strong { color:#556159; font-size:12px; }.empty-state p { margin:5px 0; max-width:250px; font-size:10px; line-height:1.5; }.text-button { border:0; background:none; color:var(--green); cursor:pointer; font-size:10px; font-weight:750; }
.view-toolbar { min-height:56px; display:flex; align-items:center; justify-content:flex-end; }.table-panel { overflow:hidden; }.table-toolbar { padding:15px 18px; display:flex; justify-content:space-between; border-bottom:1px solid var(--line); }.table-toolbar input { width:min(340px,60%); }.table-wrap { overflow:auto; }table { width:100%; border-collapse:collapse; }th,td { padding:13px 16px; border-bottom:1px solid #eef1ef; text-align:left; font-size:11px; }th { color:#89938d; font-size:9px; text-transform:uppercase; letter-spacing:.07em; }.contact-cell strong,.contact-cell small { display:block; }.contact-cell small { margin-top:3px; color:var(--muted); }.status-badge { display:inline-flex; padding:5px 8px; border-radius:99px; background:#edf6f1; color:var(--green); font-size:9px; font-weight:800; text-transform:capitalize; }.status-badge.bounced,.status-badge.unsubscribed,.status-badge.suppressed { color:#a65d28; background:#fff0df; }.status-badge.sending { color:#7156ac; background:#f0ecf9; }.table-action { border:0; background:transparent; color:#8b958f; cursor:pointer; }.campaign-layout { display:grid; grid-template-columns:minmax(0,1fr) minmax(390px,1fr); gap:16px; align-items:start; }.form-panel { padding-bottom:22px; }.form-panel > label,.dialog-form label { display:grid; gap:7px; margin:0 22px 14px; color:#536058; font-size:10px; font-weight:700; }input,textarea { width:100%; color:var(--ink); background:#fbfcfb; border:1px solid #dfe5e1; border-radius:9px; padding:10px 11px; outline:none; transition:.15s; }textarea { resize:vertical; line-height:1.5; }input:focus,textarea:focus { border-color:#6bb18c; box-shadow:0 0 0 3px rgba(45,132,87,.09); background:#fff; }.form-panel > .button { margin-left:22px; }.form-hint { margin:-3px 22px 15px; color:#8a948e; font-size:9px; }.form-hint code { color:#4a6d59; background:#edf3ef; padding:2px 4px; border-radius:4px; }.stack-list { padding:0 12px 12px; }.campaign-card { padding:14px 10px 18px; border-top:1px solid #eef1ef; }.campaign-card:first-child { border-top:0; }.campaign-card-head { display:flex; align-items:center; justify-content:space-between; gap:12px; }.campaign-card h4 { margin:0; font-size:12px; }.campaign-archive { border:0; padding:4px 6px; color:#8b958f; background:transparent; cursor:pointer; font-size:9px; font-weight:700; }.campaign-archive:hover { color:#9b4b3d; }.campaign-card > p { margin:5px 0 12px; color:var(--muted); font-size:9px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }.campaign-stats { display:flex; gap:14px; margin-bottom:12px; color:#7d8781; font-size:9px; }.campaign-actions { display:flex; gap:7px; flex-wrap:wrap; }.draft-map { margin-top:14px; border:1px solid #edf0ee; border-radius:10px; overflow:hidden; }.draft-map-head,.draft-map-row { display:grid; grid-template-columns:minmax(125px,1.2fr) minmax(90px,.8fr) auto; gap:8px; align-items:center; padding:9px 10px; }.draft-map-head { color:#89938d; background:#f7f9f8; font-size:8px; font-weight:800; text-transform:uppercase; letter-spacing:.07em; }.draft-map-row { border-top:1px solid #edf0ee; font-size:9px; }.draft-contact strong,.draft-contact small { display:block; }.draft-contact small { margin-top:2px; color:var(--muted); overflow:hidden; text-overflow:ellipsis; }.draft-map code { color:#486354; font-size:8px; }.draft-map-empty { padding:15px 10px; color:var(--muted); font-size:9px; text-align:center; }.muted { color:var(--muted); }.timeline { padding:6px 22px 22px; }.timeline-item { display:grid; grid-template-columns:34px 1fr auto; gap:12px; padding:14px 0; border-bottom:1px solid #eef1ef; }.timeline-icon { display:grid; place-items:center; width:31px; height:31px; border-radius:9px; color:var(--green); background:var(--green-pale); }.timeline-item strong,.timeline-item small { display:block; }.timeline-item strong { font-size:11px; }.timeline-item small { margin-top:4px; color:var(--muted); font-size:9px; }.timeline-item time { color:#929b95; font-size:9px; }.settings-grid { display:grid; grid-template-columns:minmax(280px,.8fr) minmax(380px,1.2fr); gap:16px; align-items:start; }.signature-panel { min-height:280px; }.signature-preview { margin:0 22px 22px; min-height:170px; padding:18px; overflow:auto; border:1px dashed #dbe3de; border-radius:11px; color:#7e8982; background:#fafcfb; font-size:12px; }.instructions-panel { grid-column:1/-1; padding-bottom:22px; }.instruction-grid { display:grid; grid-template-columns:1fr 1fr 1.4fr; gap:12px; padding:0 22px 16px; }.instruction-grid label { display:grid; gap:8px; color:#536058; font-size:10px; font-weight:700; }.instruction-grid code { width:max-content; color:var(--green); background:var(--green-pale); padding:5px 7px; border-radius:6px; }.instructions-panel > .button { margin-left:22px; }
.setup-banner { margin-bottom:15px; padding:13px 16px; border-radius:11px; color:#744716; background:#fff1df; border:1px solid #f3d8b8; font-size:11px; }.toast { position:fixed; z-index:20; right:24px; bottom:24px; max-width:360px; padding:12px 16px; border-radius:10px; color:#fff; background:#173d2c; box-shadow:0 10px 35px rgba(0,0,0,.18); display:flex; align-items:center; gap:14px; font-size:11px; opacity:0; pointer-events:none; transform:translateY(8px); transition:.2s; }.toast.show { opacity:1; pointer-events:auto; transform:none; }.toast.error { background:#8b3f32; }.toast-action { border:0; border-radius:7px; padding:6px 9px; color:#173d2c; background:#fff; cursor:pointer; font-size:10px; font-weight:800; }.toast-action:disabled { opacity:.6; cursor:wait; }.hidden { display:none !important; }
.draft-subject { display:block; font-size:9px; line-height:1.35; overflow-wrap:anywhere; }
.leads-table { min-width:720px; }.lead-row td { padding-top:16px; padding-bottom:9px; border-bottom:0; vertical-align:middle; }.lead-company strong,.lead-company small { display:block; }.lead-company strong { font-size:12px; }.lead-company small { margin-top:4px; color:var(--muted); font-size:9px; }.lead-contacts-row > td { padding:0 16px 14px; background:#fbfcfb; }.linked-contacts { margin-left:31px; overflow:hidden; border:1px solid #e9eeeb; border-radius:10px; background:#fff; }.linked-contacts-title { padding:8px 11px; color:#89938d; background:#f5f8f6; font-size:8px; font-weight:800; letter-spacing:.07em; text-transform:uppercase; }.linked-contact { display:grid; grid-template-columns:18px 28px minmax(150px,1fr) auto 24px; align-items:center; gap:9px; min-height:47px; padding:7px 10px; border-top:1px solid #edf1ee; }.contact-avatar { display:grid; place-items:center; width:27px; height:27px; border-radius:8px; color:var(--green); background:var(--green-pale); font-size:9px; font-weight:800; }.linked-contact-identity strong,.linked-contact-identity small { display:block; }.linked-contact-identity strong { font-size:10px; }.linked-contact-identity small { margin-top:3px; color:var(--muted); font-size:8px; }.linked-contact .table-action { font-size:14px; }.lead-row .status-badge.ready { color:var(--green); background:var(--green-pale); }
.tracking-note { display:flex; gap:8px 18px; align-items:center; margin:0 0 15px; padding:12px 15px; color:var(--green-dark); background:var(--green-pale); border:1px solid #cfe7da; border-radius:11px; font-size:10px; line-height:1.45; }.tracking-note span { color:#47705b; }.tracking-note.attention { color:#76502c; background:#fff6e9; border-color:#efdcc0; }.tracking-note.attention span { color:#8a6a49; }.toggle-row { grid-template-columns:auto 1fr !important; align-items:start; padding:12px; border:1px solid var(--line); border-radius:10px; background:#f8faf9; }.toggle-row input { width:17px; height:17px; margin:1px 0 0; accent-color:var(--green); }.toggle-row strong,.toggle-row small { display:block; }.toggle-row small { margin-top:4px; color:var(--muted); font-weight:400; line-height:1.45; }.tracking-config-status { margin:-3px 22px 15px; padding:9px 11px; border-radius:8px; font-size:9px; font-weight:700; }.tracking-config-status.ready { color:var(--green); background:var(--green-pale); }.tracking-config-status.attention { color:#a65d28; background:#fff0df; }.crm-toolbar { display:grid; grid-template-columns:minmax(220px,1.4fr) repeat(3,minmax(130px,.7fr)); gap:9px; padding:15px 18px; border-bottom:1px solid var(--line); }.crm-toolbar input,.crm-toolbar select { width:100%; min-width:0; padding:10px 11px; color:var(--ink); background:#fbfcfb; border:1px solid #dfe5e1; border-radius:9px; outline:none; }.crm-toolbar input:focus,.crm-toolbar select:focus { border-color:#6bb18c; box-shadow:0 0 0 3px rgba(45,132,87,.09); background:#fff; }.crm-subject { max-width:350px; }.crm-subject strong,.crm-subject small,.crm-state-cell small { display:block; }.crm-subject strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.crm-subject small,.crm-state-cell small { margin-top:4px; color:var(--muted); font-size:8px; }.open-state { display:inline-flex; padding:5px 8px; border-radius:99px; font-size:9px; font-weight:800; }.open-state.opened { color:var(--green); background:var(--green-pale); }.open-state.unopened { color:#7156ac; background:#f0ecf9; }.open-state.unavailable { color:#747d78; background:#eef1ef; }.crm-panel table { min-width:700px; }.crm-panel th,.crm-panel td { padding-left:11px; padding-right:11px; }
dialog { width:min(560px,calc(100% - 30px)); border:0; border-radius:18px; padding:0; box-shadow:0 25px 80px rgba(10,30,20,.25); }dialog::backdrop { background:rgba(13,34,23,.45); backdrop-filter:blur(3px); }.dialog-form { padding:22px; }.dialog-head { display:flex; justify-content:space-between; gap:16px; margin-bottom:20px; }.dialog-head h3 { margin:0; font:500 23px Georgia,serif; }.dialog-form label { margin:0 0 14px; }.dialog-form label small { color:#8a948e; font-weight:400; }.two-cols { display:grid; grid-template-columns:1fr 1fr; gap:12px; }.dialog-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:21px; }.icon-button { border:0; background:#eff3f0; width:31px; height:31px; border-radius:50%; cursor:pointer; font-size:19px; }.dialog-copy { color:var(--muted); font-size:11px; line-height:1.5; }.send-warning { padding:13px 14px; margin-bottom:14px; color:#713e32; background:#fff0ec; border:1px solid #f1d0c8; border-radius:10px; }.send-warning strong { font-size:11px; }.send-warning p { margin:5px 0 0; font-size:9px; line-height:1.5; }.send-recipient-list { max-height:230px; overflow:auto; margin-bottom:16px; border:1px solid var(--line); border-radius:10px; }.send-dialog-title,.send-recipient { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 12px; }.send-dialog-title { background:#f6f8f6; font-size:10px; }.send-dialog-title span { color:var(--muted); }.send-recipient { border-top:1px solid var(--line); font-size:10px; }.send-recipient small { color:var(--muted); }.dialog-form code { color:#8b3829; background:#fff0ec; padding:2px 5px; border-radius:4px; }
@media (max-width: 1000px) { .app-shell{grid-template-columns:78px 1fr}.sidebar{padding-inline:11px}.brand>span{display:none}.brand{justify-content:center;gap:0;padding-inline:0}.nav-item{justify-content:center;gap:0;font-size:0}.campaign-layout{grid-template-columns:1fr}.settings-grid{grid-template-columns:1fr}.instructions-panel{grid-column:auto}.instruction-grid{grid-template-columns:1fr}.crm-toolbar{grid-template-columns:1fr 1fr}.tracking-note{align-items:flex-start;flex-direction:column} }
@media (max-width: 700px) { .app-shell{display:block}.sidebar{position:fixed;z-index:10;top:auto;bottom:0;width:100%;height:63px;padding:8px 10px}.brand{display:none}.sidebar nav{display:flex;justify-content:space-around}.nav-item{font-size:0;padding:10px 10px}.nav-item.active{box-shadow:inset 0 -3px #78d3a0}main{padding:0 15px 85px}.topbar{height:auto;padding:20px 0}.topbar h1{font-size:20px}.top-actions .secondary{display:none}.account-chip div{display:none}.metrics-grid{grid-template-columns:1fr 1fr}.settings-grid{grid-template-columns:1fr}.two-cols{grid-template-columns:1fr}.top-actions{gap:4px}.button.google{font-size:0;padding:0 13px}.button.google span{font-size:15px}.crm-toolbar{grid-template-columns:1fr} }
.status-badge.archived { color:#a65d28; background:#fff0df; }

/* Shared appearance and company directory details. */
:root { color-scheme:light; --surface-soft:#fbfcfb; --surface-raised:#f1f5f2; }
.theme-toggle { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:40px; padding:0 12px; border:1px solid var(--line); border-radius:10px; color:var(--ink); background:var(--white); font-size:12px; font-weight:700; cursor:pointer; white-space:nowrap; }
.theme-toggle > span:first-child { font-size:20px; }
.auth-theme-toggle { position:absolute; top:20px; right:20px; }
:is(button,a,input,textarea,select):focus-visible { outline:2px solid var(--green); outline-offset:3px; }
.leads-toolbar { justify-content:space-between; gap:16px; }
.leads-toolbar strong { font-size:14px; }
#leadFilteredCount { display:block; margin-top:5px; color:var(--muted); font-size:12px; }
.leads-table { min-width:1000px; }
.leads-table td { font-size:13px; }
.lead-company { min-width:200px; max-width:260px; overflow-wrap:anywhere; }
.lead-company strong { font-size:14px; }
.lead-company .company-name { display:flex; align-items:center; gap:6px; }
.verified-mark { display:inline-flex; flex:0 0 16px; color:#2864c7; }
.verified-mark svg { width:16px; height:16px; }
html[data-theme="dark"] .verified-mark { color:#9bbcff; }
.verified-filter { display:inline-flex; align-items:center; gap:7px; white-space:nowrap; font-size:12px; cursor:pointer; color:var(--ink); }
.lead-company .discrepancy-reason { display:block; margin-top:6px; font-size:11px; line-height:1.5; color:#97520f; overflow-wrap:anywhere; }
html[data-theme="dark"] .discrepancy-reason { color:#f4c48e; }
.contact-toolbar .verified-filter input { width:15px; height:15px; margin:0; flex:none; accent-color:#2864c7; }
.lead-company small { font-size:12px; line-height:1.5; }
.company-channels { min-width:190px; max-width:270px; overflow-wrap:anywhere; }
.company-channels span { display:block; line-height:1.6; }
.company-channels span + span { color:var(--muted); }
.detail-link { color:var(--green); text-decoration:underline; text-underline-offset:3px; text-decoration-color:color-mix(in srgb,var(--green) 40%,transparent); }
.detail-link:hover { text-decoration-color:currentColor; }
.linked-contact { grid-template-columns:18px 28px minmax(180px,1.5fr) minmax(130px,1fr) minmax(105px,.7fr) auto 24px; gap:12px; padding:12px; }
.linked-contact-identity strong { font-size:13px; }
.linked-contact-identity small,.linked-contact-detail { font-size:12px; line-height:1.5; overflow-wrap:anywhere; }
.linked-contact-detail small { display:block; color:var(--muted); font-size:11px; margin-bottom:3px; }
.linked-contacts-title { font-size:11px; }
.linked-contacts > p { margin:12px; font-size:12px; }
.contact-toolbar { gap:12px; flex-wrap:wrap; align-items:center; }
.contact-toolbar select { min-width:220px; max-width:100%; padding:10px 11px; color:var(--ink); background:var(--surface-soft); border:1px solid var(--line); border-radius:9px; }
.contact-toolbar .button { margin-left:auto; }
.crm-toolbar { grid-template-columns:minmax(200px,1.3fr) repeat(4,minmax(125px,1fr)); }
@media(max-width:1200px) { .crm-toolbar { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:700px) { .crm-toolbar { grid-template-columns:1fr; }.contact-toolbar input,.contact-toolbar select { width:100%; }.contact-toolbar .button { margin-left:0; } }
html[data-theme="dark"] {
  color-scheme:dark;
  --ink:#e8edf5; --muted:#a0aabd; --line:#293141; --paper:#090c12; --white:#121823;
  --green:#9bbcff; --green-dark:#c3d5ff; --green-pale:#1c2942;
  --surface-soft:#0e141f; --surface-raised:#1b2332;
  --shadow:0 12px 35px rgba(0,0,0,.25);
}
html[data-theme="dark"] :is(.panel,.metric,dialog,.linked-contacts,.button.secondary,.button.google,.button.light) { background:var(--white); color:var(--ink); }
html[data-theme="dark"] .sidebar { background:#080b11; }
html[data-theme="dark"] :is(.nav-item,.brand small) { color:var(--muted); }
html[data-theme="dark"] :is(.nav-item:hover,.nav-item.active) { color:var(--ink); background:var(--surface-raised); }
html[data-theme="dark"] .nav-item.active { box-shadow:inset 3px 0 var(--green); }
html[data-theme="dark"] .auth-view { background:radial-gradient(circle at 50% 0,#18233a,var(--paper) 65%); }
html[data-theme="dark"] :is(input,textarea,select,.crm-toolbar input,.crm-toolbar select,.toggle-row,.lead-contacts-row > td) { background:var(--surface-soft); color:var(--ink); border-color:var(--line); }
html[data-theme="dark"] :is(input,textarea,select):focus { background:var(--white); border-color:var(--green); box-shadow:0 0 0 3px rgba(155,188,255,.12); }
html[data-theme="dark"] :is(th,td,.health-row,.campaign-card,.draft-map,.draft-map-row,.linked-contact,.linked-contacts,.timeline-item) { border-color:var(--line); }
html[data-theme="dark"] :is(.linked-contacts-title,.draft-map-head,.send-dialog-title,.icon-button,.empty-state > span) { background:var(--surface-raised); color:var(--muted); }
html[data-theme="dark"] :is(.form-panel > label,.dialog-form label,.instruction-grid label,.auth-card label,.empty-state strong) { color:var(--ink); }
html[data-theme="dark"] :is(th,.health-row small,.health-row.pending b,.metric > small,.empty-state,.form-hint,.campaign-stats,.timeline-item time,.dialog-form label small,.campaign-archive,.table-action) { color:var(--muted); }
html[data-theme="dark"] :is(.button.primary) { background:#305bb5; color:#fff; }
html[data-theme="dark"] .toast:not(.error) { color:var(--ink); background:#202c43; }
html[data-theme="dark"] .toast-action { color:#18233a; }
html[data-theme="dark"] :is(.status-badge,.avatar,.form-hint code,.draft-map code) { color:var(--green); background:var(--green-pale); }
html[data-theme="dark"] :is(.icon.blue) { color:#9dc9ff; background:#223952; }
html[data-theme="dark"] :is(.icon.violet,.status-badge.sending,.open-state.unopened) { color:#d0b7ff; background:#372b4d; }
html[data-theme="dark"] :is(.icon.amber,.health-row.attention > span,.status-badge.bounced,.status-badge.unsubscribed,.status-badge.suppressed,.status-badge.archived,.tracking-config-status.attention,.setup-banner,.tracking-note.attention) { color:#f4c48e; background:#453321; border-color:#6a4b2b; }
html[data-theme="dark"] :is(.health-row.attention b,.tracking-note.attention span) { color:#f4c48e; }
html[data-theme="dark"] :is(.open-state.unavailable,.health-row.pending > span) { color:var(--muted); background:var(--surface-raised); }
html[data-theme="dark"] .tracking-note { border-color:var(--line); }
html[data-theme="dark"] .tracking-note span { color:var(--green); }
html[data-theme="dark"] :is(.send-warning,.dialog-form code) { color:#ffb5a8; background:#472b26; border-color:#704236; }
html[data-theme="dark"] .auth-status.error { color:#ffb5a8; }
html[data-theme="dark"] dialog::backdrop { background:rgba(0,0,0,.65); }
/* Email signatures retain their original email-client canvas. */
.signature-preview { color-scheme:light; background:#fff; color:#17221c; }
@media(max-width:700px) { .theme-label { display:none; }.theme-toggle { padding:0 10px; }.topbar { gap:10px; }.leads-toolbar strong { font-size:13px; } }
@media(max-width:700px) { html[data-theme="dark"] .nav-item.active { box-shadow:inset 0 -3px var(--green); } }
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { animation:none !important; transition:none !important; } }
.template-preview,.template-usage { margin:12px 0; color:var(--muted); font-size:11px; }
.template-preview summary,.template-usage summary { cursor:pointer; padding:6px 0; }
.template-body { white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.6; color:var(--ink); padding:12px; border:1px solid var(--line); border-radius:9px; margin-top:6px; max-height:320px; overflow:auto; }
.template-usage > .campaign-actions { margin-top:10px; }

.lead-import-dialog { width:min(880px,calc(100% - 24px)); max-height:min(90vh,900px); overflow:auto; }
.lead-import-dialog .dialog-copy { margin:-5px 0 18px; font-size:12px; }
.lead-import-dialog input[type="file"] { background:var(--surface-soft); color:var(--ink); }
.lead-import-section-title { display:flex; align-items:baseline; justify-content:space-between; gap:14px; margin:20px 0 11px; }
.lead-import-section-title strong { font-size:13px; }
.lead-import-section-title small { max-width:530px; color:var(--muted); font-size:11px; line-height:1.45; }
.lead-import-mapping { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px 16px; }
.lead-import-mapping label { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.35fr); align-items:center; gap:10px; margin:0; font-size:12px; }
.lead-import-mapping select { min-width:0; width:100%; padding:9px 11px; color:var(--ink); background:var(--surface-soft); border:1px solid var(--line); border-radius:9px; }
.lead-import-errors { color:#ad4c3e; font-size:11px; line-height:1.5; margin-bottom:9px; }
.lead-import-preview { max-height:235px; overflow:auto; border:1px solid var(--line); border-radius:10px; }
.lead-import-preview table { min-width:620px; }
.lead-import-preview th,.lead-import-preview td { padding:9px 11px; font-size:11px; overflow-wrap:anywhere; }
@media(max-width:700px) { .lead-import-mapping { grid-template-columns:1fr; }.lead-import-section-title { flex-direction:column; gap:5px; } }
.variable-editor { position:relative; display:block; overflow:hidden; border:1px solid var(--line); border-radius:9px; background:var(--surface-soft,#fbfcfb); }
.variable-editor .variable-highlight,.variable-editor textarea { font-family:inherit; font-size:12px; font-weight:400; line-height:1.7; letter-spacing:normal; padding:12px; margin:0; border:0; border-radius:0; white-space:pre-wrap; overflow-wrap:break-word; word-break:normal; tab-size:4; width:100%; box-sizing:border-box; scrollbar-gutter:stable; }
.variable-editor .variable-highlight { position:absolute; inset:0; overflow:hidden; pointer-events:none; color:var(--ink); }
.variable-editor textarea,.variable-editor textarea:focus,html[data-theme="dark"] .variable-editor textarea { position:relative; display:block; background:transparent; color:transparent; caret-color:var(--ink); resize:vertical; box-shadow:none; }
.variable-editor textarea::selection { background:rgba(96,145,255,.3); color:transparent; }
.variable-editor:focus-within { border-color:#6a8ed1; box-shadow:0 0 0 2px rgba(96,145,255,.12); }
.variable-token { color:#2851a2; background:#e8efff; border:0; border-radius:4px; font:inherit; padding:0; box-shadow:0 0 0 1px rgba(96,145,255,.25); box-decoration-break:clone; -webkit-box-decoration-break:clone; }
button.variable-token { cursor:pointer; text-align:left; }
button.variable-token:hover { outline:1px solid #7199ee; }
.variable-token.invalid { color:#a64027; background:#fff0df; text-decoration:underline wavy; }
.variable-problems { color:#ac442f; min-height:1em; }
.editor-variable-section { margin:0 22px 16px; }
.variable-section-head { display:flex; align-items:center; justify-content:space-between; gap:12px; font-size:11px; margin-bottom:12px; }
.variable-chip-list { display:flex; flex-wrap:wrap; gap:12px; }
.variable-chip-list .variable-definition { margin:0; }
.variable-definition { margin:12px 0; font-size:11px; overflow-wrap:anywhere; }
.variable-definition .variable-token { font-family:ui-monospace,monospace; padding:3px 5px; }
.variable-definition p { margin:8px 0; color:var(--muted); line-height:1.5; white-space:pre-wrap; }
.variable-scope { color:var(--muted); margin-left:8px; font-size:9px; }
.variable-chip-list .variable-scope { display:none; }
.template-card-heading { display:flex; align-items:flex-start; gap:16px; justify-content:space-between; flex-wrap:wrap; }
.template-card-heading h4 { font-size:15px; line-height:1.4; overflow-wrap:anywhere; }
.template-stats { display:flex; gap:16px; flex-wrap:wrap; }
.template-stats > div { display:grid; gap:4px; }
.template-stats strong { font-size:16px; color:var(--ink); }
.template-stats span { font-size:10px; color:var(--muted); }
.template-stats small { font-size:9px; color:var(--muted); }
.template-subject { margin-top:20px; overflow-wrap:anywhere; }
.template-subject > small { display:block; color:var(--muted); font-size:10px; margin-bottom:7px; }
.template-subject > div { font-size:15px; font-weight:650; line-height:1.6; white-space:pre-wrap; }
.campaign-card > .template-body { max-height:none; overflow:visible; border:0; padding:0; margin:16px 0 22px; font-size:12px; line-height:1.8; }
.saved-template-variables { border-top:1px solid var(--line); padding-top:16px; margin-bottom:20px; }
html[data-theme="dark"] .variable-token { color:#b7cdff; background:#253759; }
html[data-theme="dark"] .variable-token.invalid { color:#ffc2af; background:#512f26; }
html[data-theme="dark"] .variable-problems { color:#ffc2af; }
@media (forced-colors:active) { .variable-editor textarea { color:CanvasText; } .variable-highlight { visibility:hidden; } }

.lead-import-mapping-heading{grid-column:1/-1;margin:12px 0 0;font-size:13px}
