*{box-sizing:border-box}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;background:#f8fafc;color:#0f172a;font-size:14px}.app{display:flex;flex-direction:column;height:100vh}.topbar{display:flex;align-items:center;gap:24px;padding:0 20px;height:56px;background:#0f172a;color:#fff;flex-shrink:0}.topbar h1{font-size:17px;margin:0}.topbar nav{display:flex;gap:4px}.topbar nav button{background:none;border:none;color:#cbd5e1;padding:8px 14px;border-radius:8px;cursor:pointer;font-size:14px}.topbar nav button:hover{background:#1e293b;color:#fff}.topbar nav button.active{background:#334155;color:#fff;font-weight:600}.topbar .me{margin-left:auto;color:#94a3b8;font-size:12px}.topbar .me a{color:#cbd5e1;cursor:pointer;text-decoration:underline}.login-page{min-height:100vh;display:flex;align-items:center;justify-content:center;background:#0f172a}.login-card{background:#fff;border-radius:16px;padding:32px;width:360px;max-width:90vw;display:flex;flex-direction:column;gap:14px;box-shadow:0 20px 50px #0005}.login-card h1{margin:0;font-size:22px;text-align:center}.split{display:flex;flex:1;overflow:hidden}.list-pane{flex:1;overflow-y:auto;padding:16px 20px}.list-pane.narrow{max-width:320px;border-right:1px solid #e2e8f0}.detail-pane{width:480px;max-width:50%;overflow-y:auto;border-left:1px solid #e2e8f0;background:#fff;padding:16px 20px}.detail-pane.template-detail{flex:1;width:auto;max-width:none;min-width:0;border-left:0}.page{padding:16px 20px;overflow-y:auto}.toolbar{display:flex;gap:8px;align-items:center;margin-bottom:12px;flex-wrap:wrap}.toolbar h2{margin:0 auto 0 0}.toolbar input{flex:1;min-width:160px}input,select,textarea{font:inherit;padding:7px 10px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;width:100%}.toolbar input,.toolbar select{width:auto}textarea{resize:vertical}input:focus,select:focus,textarea:focus{outline:none;border-color:#2563eb;box-shadow:0 0 0 2px #2563eb22}button{font:inherit;padding:7px 14px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;cursor:pointer}button:hover{background:#f1f5f9}button:disabled{opacity:.5;cursor:default}button.primary{background:#2563eb;border-color:#2563eb;color:#fff}button.primary:hover{background:#1d4ed8}button.ai-action{color:#6d28d9;border-color:#c4b5fd;background:#f5f3ff}button.ai-action:hover{background:#ede9fe}button.danger{color:#dc2626;border-color:#fca5a5}button.danger:hover{background:#fef2f2}table{width:100%;border-collapse:collapse;background:#fff;border-radius:10px;overflow:hidden}th,td{text-align:left;padding:10px 12px;border-bottom:1px solid #f1f5f9}th{background:#f8fafc;font-weight:600;color:#475569;font-size:12px;text-transform:uppercase;letter-spacing:.03em}tbody tr{cursor:pointer}tbody tr:hover{background:#f8fafc}tbody tr.selected{background:#eff6ff}tbody tr.bulk-selected{box-shadow:inset 3px 0 #7c3aed}.select-column{width:38px;padding-left:10px;padding-right:6px;text-align:center}.row-checkbox{width:16px;height:16px;margin:0;vertical-align:middle;accent-color:#7c3aed}.badge{color:#fff;padding:2px 9px;border-radius:999px;font-size:11px;font-weight:600}.empty{color:#94a3b8;font-style:italic}.detail-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.detail-header h2{margin:0}.field-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:10px}label{display:flex;flex-direction:column;gap:4px;font-size:12px;font-weight:600;color:#475569}label.block{margin-bottom:10px}.email-addresses{margin:12px 0;padding:12px;border:1px solid #e2e8f0;border-radius:10px;background:#f8fafc}.email-addresses-header{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:10px}.email-addresses-header>div{display:flex;flex-direction:column;gap:2px}.email-addresses-header span{color:#64748b;font-size:11px}.email-address-row{display:grid;grid-template-columns:minmax(150px,1.4fr) minmax(110px,1fr) auto auto;gap:7px;align-items:center;margin-top:7px}.email-address-row button{white-space:nowrap}.email-address-row .primary-address{color:#92400e;border-color:#fbbf24;background:#fffbeb}.actions{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.research{margin:12px 0;background:#fefce8;border:1px solid #fde68a;border-radius:10px;padding:8px 12px}.research summary{cursor:pointer;font-weight:600}.research pre{white-space:pre-wrap;font-family:inherit;font-size:13px;margin:8px 0 4px}.log-reply{display:flex;flex-direction:column;gap:8px;margin:8px 0}.history{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:10px}.history li{border:1px solid #e2e8f0;border-radius:10px;padding:10px 12px;background:#f8fafc}.history li.in{background:#f0fdf4;border-color:#bbf7d0}.history-meta{display:flex;gap:12px;font-size:11px;color:#64748b;margin-bottom:4px}.history pre{white-space:pre-wrap;font-family:inherit;font-size:13px;margin:6px 0 0}.history-attachments{display:flex;flex-wrap:wrap;gap:6px;margin-top:9px}.history-attachments span{padding:4px 8px;border:1px solid #dbeafe;border-radius:7px;color:#1e3a8a;background:#eff6ff;font-size:11px}.detail-pane.wide{width:720px;max-width:62%}.stat-cards{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:14px 0}.stat-card{background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:14px;display:flex;flex-direction:column;gap:2px;align-items:center}.stat-card strong{font-size:22px}.stat-card span{color:#64748b;font-size:12px}.campaign-item{display:flex;flex-direction:column;gap:2px}.campaign-tag{color:#7c3aed}.template-list{list-style:none;padding:0;margin:0}.template-list li{padding:9px 12px;border-radius:8px;cursor:pointer}.template-list li:hover{background:#f1f5f9}.template-list li.selected{background:#eff6ff;font-weight:600}.modal-backdrop{position:fixed;inset:0;background:#0f172a66;display:flex;align-items:center;justify-content:center;z-index:10}.modal{background:#fff;border-radius:14px;padding:20px;width:640px;max-width:92vw;max-height:88vh;overflow-y:auto;box-shadow:0 20px 50px #0f172a33}.modal.compose-modal{width:1080px}.modal.bulk-compose-modal{width:1120px}.modal.contact-finder-modal{width:920px}.modal-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.modal-header h3{margin:0}.contact-finder-modal .modal-header{align-items:flex-start}.contact-finder-modal .modal-header p{margin:5px 0 0;color:#64748b;font-size:12px}.modal-footer{display:flex;justify-content:space-between;align-items:center;margin-top:12px}.compose-ai{display:flex;gap:8px;margin-bottom:12px}.compose-ai input{flex:1}.compose-ai select{width:auto}.finder-search-actions{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:10px 0 14px}.finder-progress{margin:12px 0 15px;padding:14px;border:1px solid #bfdbfe;border-radius:12px;background:#f8fbff}.finder-progress-heading{display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:start}.finder-progress-heading>div{display:flex;flex-direction:column;gap:3px}.finder-progress-heading strong{color:#1e3a8a;font-size:13px}.finder-progress-heading span{color:#64748b;font-size:11px}.finder-progress-heading b{color:#2563eb;font-size:13px}.finder-progress-side{display:flex;flex-direction:column;align-items:flex-end;gap:7px}.finder-progress-side button{padding:5px 8px;color:#b91c1c;border-color:#fecaca;background:#fff;font-size:10px;white-space:nowrap}.finder-progress-track{height:7px;overflow:hidden;margin:12px 0;border-radius:999px;background:#dbeafe}.finder-progress-track>span{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#2563eb,#7c3aed);transition:width .4s ease}.finder-progress-track.indeterminate>span{background-image:linear-gradient(90deg,#2563eb,#7c3aed 45%,#60a5fa 70%,#2563eb);background-size:220% 100%;animation:search-progress 1.8s linear infinite}.finder-progress-events{display:flex;flex-direction:column;gap:6px;margin:0;padding:0;list-style:none}.finder-progress-events li{display:flex;gap:8px;align-items:start;color:#64748b}.finder-progress-events li>span{width:14px;color:#2563eb;font-size:10px;line-height:17px;text-align:center}.finder-progress-events li>div{display:flex;flex:1;justify-content:space-between;gap:12px}.finder-progress-events strong{color:#475569;font-size:11px;font-weight:500}.finder-progress-events small{flex-shrink:0;color:#94a3b8;font-size:10px}@keyframes search-progress{to{background-position:-220% 0}}.finder-notice{padding:10px 12px;color:#475569;border:1px solid #cbd5e1;border-radius:9px;background:#f8fafc;font-size:12px}.finder-summary{display:grid;grid-template-columns:auto 1fr;align-items:baseline;gap:5px 12px;padding:11px 13px;margin-bottom:12px;border:1px solid #bbf7d0;border-radius:10px;background:#f0fdf4}.finder-summary span{color:#166534;font-size:12px}.finder-summary p{grid-column:1 / -1;margin:3px 0 0;color:#475569;font-size:12px}.finder-results{display:flex;flex-direction:column;gap:9px;max-height:46vh;overflow-y:auto;padding-right:4px}.finder-result{position:relative;padding:12px 14px;border:1px solid #dbeafe;border-radius:11px;background:#fff}.finder-result.duplicate{background:#f8fafc;border-color:#e2e8f0}.finder-select{display:flex;flex-direction:row;align-items:flex-start;gap:9px;padding-right:100px}.finder-select input{width:auto;margin-top:3px}.finder-select span{display:flex;flex-direction:column;gap:2px}.finder-select strong{color:#0f172a;font-size:14px}.finder-select small{color:#64748b;font-weight:400}.finder-category{position:absolute;top:11px;right:12px;padding:3px 8px;border-radius:999px;color:#1d4ed8;background:#eff6ff;font-size:10px;font-weight:700;text-transform:uppercase}.finder-result>p{margin:8px 0;color:#475569;font-size:12px;line-height:1.45}.finder-emails{display:flex;flex-wrap:wrap;gap:6px 14px;color:#334155;font-size:12px}.finder-sources{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin-top:9px;font-size:11px}.finder-sources span{color:#15803d;font-weight:600}.finder-sources a{color:#2563eb}.existing-contact{margin-top:9px;padding:5px 9px;color:#475569;font-size:11px}.finder-footer{position:sticky;bottom:-20px;padding:12px 0 0;background:#fff}.finder-footer>button:last-child{margin-left:auto}.finder-empty{padding:24px;text-align:center}.compose-design-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:11px 12px;margin:12px 0;border:1px solid #e2e8f0;border-radius:10px;background:#f8fafc}.compose-design-row>div:first-child{display:flex;flex-direction:column;gap:2px}.compose-design-row strong{color:#334155;font-size:12px}.compose-design-row span{color:#64748b;font-size:12px}.design-switch{display:flex;padding:3px;border:1px solid #cbd5e1;border-radius:9px;background:#fff}.design-switch button{border:0;padding:6px 12px;background:transparent}.design-switch button.active{background:#173f7a;color:#fff}.compose-attachments{margin:12px 0;padding:11px 12px;border:1px solid #e2e8f0;border-radius:10px;background:#f8fafc}.compose-attachments-header{display:flex;align-items:center;justify-content:space-between;gap:14px}.compose-attachments-header>div{display:flex;flex-direction:column;gap:2px}.compose-attachments-header strong{color:#334155;font-size:12px}.compose-attachments-header span{color:#64748b;font-size:11px}.attachment-picker{display:inline-flex;align-items:center;justify-content:center;cursor:pointer;padding:7px 11px;border:1px solid #cbd5e1;border-radius:8px;color:#334155;background:#fff;font-size:12px;font-weight:600}.attachment-picker:hover{border-color:#94a3b8;background:#f8fafc}.attachment-input{display:none}.attachment-list{display:flex;flex-direction:column;gap:6px;margin:10px 0 0;padding:0;list-style:none}.attachment-list li{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:9px;padding:7px 9px;border:1px solid #e2e8f0;border-radius:8px;background:#fff}.attachment-list li>div{display:flex;min-width:0;flex-direction:column}.attachment-list strong{overflow:hidden;color:#334155;font-size:12px;text-overflow:ellipsis;white-space:nowrap}.attachment-list small{color:#64748b;font-size:10px}.attachment-list button{padding:4px 7px;color:#b91c1c;border-color:#fecaca;background:#fff;font-size:10px}.bulk-compose-modal .modal-header>div{display:flex;flex-direction:column;gap:3px}.bulk-compose-modal .modal-header p{margin:0;color:#64748b;font-size:12px}.bulk-settings-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:12px}.personalization-help{display:flex;flex-wrap:wrap;align-items:baseline;gap:5px 9px;margin:10px 0 12px;padding:10px 12px;border:1px solid #c4b5fd;border-radius:10px;color:#4c1d95;background:#f5f3ff;font-size:12px}.personalization-help strong{width:100%}.personalization-help span{flex:1}.personalization-help code,.template-detail .hint code{padding:1px 4px;border-radius:4px;color:#5b21b6;background:#ede9fe}.personalization-help small{color:#6d28d9;font-weight:600}.template-detail .hint{line-height:1.7}.bulk-progress,.bulk-result-summary{margin:12px 0;padding:12px;border:1px solid #bfdbfe;border-radius:10px;background:#eff6ff}.bulk-progress>div:first-child{display:flex;justify-content:space-between;color:#1e3a8a}.bulk-progress-track{height:7px;margin:9px 0;overflow:hidden;border-radius:999px;background:#dbeafe}.bulk-progress-track span{display:block;height:100%;border-radius:inherit;background:#2563eb;transition:width .25s ease}.bulk-progress-track.indeterminate span{width:35%;background:linear-gradient(90deg,#2563eb,#7c3aed,#2563eb);animation:bulk-progress 1.4s ease-in-out infinite}@keyframes bulk-progress{0%{transform:translate(-110%)}to{transform:translate(310%)}}.bulk-progress small{color:#64748b}.bulk-result-summary{color:#166534;border-color:#bbf7d0;background:#f0fdf4}.bulk-result-summary.has-errors{color:#92400e;border-color:#fde68a;background:#fffbeb}.bulk-result-summary details{margin-top:8px;color:#475569}.bulk-result-summary summary{cursor:pointer;font-size:12px;font-weight:600}.bulk-result-summary ul{display:flex;flex-direction:column;gap:5px;margin:8px 0 0;padding:0;list-style:none}.bulk-result-summary li{display:grid;grid-template-columns:18px minmax(120px,.8fr) minmax(170px,1fr) 1fr;gap:7px;font-size:11px}.bulk-result-summary li.sent>span{color:#16a34a}.bulk-result-summary li.failed>span{color:#dc2626}.bulk-result-summary li em{color:#b91c1c;font-style:normal}.bulk-confirmation{display:grid;grid-template-columns:auto 1fr;align-items:start;gap:9px;margin:12px 0;padding:11px 12px;border:1px solid #fbbf24;border-radius:10px;color:#78350f;background:#fffbeb;cursor:pointer}.bulk-confirmation input{width:16px;height:16px;margin:1px 0 0;accent-color:#2563eb}.bulk-confirmation span{font-size:12px;line-height:1.45}.email-editor-shell{display:grid;gap:14px;margin-bottom:10px}.email-editor-shell.with-preview{grid-template-columns:minmax(0,1fr) minmax(320px,.9fr)}.email-editor-pane{min-width:0}.email-editor-pane textarea{display:block;min-height:350px;border-radius:0 0 10px 10px;line-height:1.55;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:13px}.email-toolbar{display:flex;gap:4px;flex-wrap:wrap;padding:7px;border:1px solid #cbd5e1;border-bottom:0;border-radius:10px 10px 0 0;background:#f8fafc}.email-toolbar button{min-width:34px;padding:5px 9px;background:#fff}.editor-hint{margin:5px 2px 0;color:#64748b;font-size:11px}.email-preview-pane{min-width:0;overflow:hidden;border:1px solid #cbd5e1;border-radius:10px;background:#e2e8f0}.email-preview-label{height:34px;display:flex;align-items:center;padding:0 11px;border-bottom:1px solid #cbd5e1;background:#f8fafc;color:#64748b;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.05em}.email-preview-pane iframe{display:block;width:100%;height:420px;border:0;background:#f1f5f9}@media(max-width:860px){.email-editor-shell.with-preview{grid-template-columns:1fr}.email-preview-pane iframe{height:480px}.compose-design-row,.compose-attachments-header{align-items:flex-start;flex-direction:column}.bulk-settings-grid{grid-template-columns:1fr}.bulk-result-summary li{grid-template-columns:18px 1fr}.email-address-row{grid-template-columns:1fr 1fr}.finder-search-actions{align-items:stretch;flex-direction:column}.finder-summary{grid-template-columns:1fr}.finder-summary p{grid-column:auto}}.error{color:#dc2626;background:#fef2f2;border:1px solid #fca5a5;border-radius:8px;padding:8px 12px}.hint{color:#64748b;font-size:12px}.spinner-wrap{display:inline-flex;align-items:center;gap:6px}.spinner{width:13px;height:13px;border-radius:50%;border:2px solid #cbd5e1;border-top-color:#2563eb;animation:spin .7s linear infinite;display:inline-block}@keyframes spin{to{transform:rotate(360deg)}}
