/* Influencer CRM console — crm.1mkt.io layout, Influencer Directory colors (blue #08429e / orange #f7a81b). @version 0.7.0 */
:root {
	--icrm-bg:#ffffff; --icrm-surface:#ffffff; --icrm-surface-2:#f4f6fb;
	--icrm-ink:#0f1115; --icrm-ink-soft:#5b6472; --icrm-line:#e4e7ee; --icrm-line-2:#eef1f6;
	--icrm-blue:#08429e; --icrm-blue-dark:#062f6f; --icrm-blue-tint:#e8eefb; --icrm-blue-tint-2:#f3f6fd;
	--icrm-orange:#f7a81b; --icrm-orange-dark:#d98e09;
	--icrm-dark:#0e1116; --icrm-dark-2:#171b22;
	--icrm-radius:12px; --icrm-radius-sm:8px;
	--icrm-shadow:0 1px 2px rgba(16,19,18,.04), 0 6px 18px rgba(16,19,18,.05);
	--icrm-mono:ui-monospace,"SF Mono",Menlo,Consolas,monospace;
	--icrm-sans:"Inter",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
}
#icrm-console, .icrm-login { font-family:var(--icrm-sans); color:var(--icrm-ink); line-height:1.5; -webkit-font-smoothing:antialiased; }
#icrm-console *, .icrm-login * { box-sizing:border-box; }
.icrm-console__loading { padding:80px; text-align:center; color:var(--icrm-ink-soft); }

/* ---------- Login ---------- */
.icrm-login { min-height:70vh; display:flex; align-items:center; justify-content:center; padding:48px 20px; background:var(--icrm-bg); }
.icrm-login__card { width:100%; max-width:400px; background:var(--icrm-surface); border:1px solid var(--icrm-line); border-radius:var(--icrm-radius); box-shadow:var(--icrm-shadow); padding:34px 30px; }
.icrm-eyebrow { font-size:11px; font-weight:600; letter-spacing:.14em; text-transform:uppercase; color:var(--icrm-blue); }
.icrm-login__brand h1 { font-weight:700; font-size:25px; margin:8px 0 6px; letter-spacing:-.02em; color:var(--icrm-ink); }
.icrm-login__brand p { color:var(--icrm-ink-soft); margin:0 0 20px; font-size:14px; }
.icrm-login__form { display:flex; flex-direction:column; gap:14px; }
.icrm-login__form label { display:flex; flex-direction:column; gap:6px; font-size:12px; font-weight:600; color:var(--icrm-ink-soft); }
.icrm-login__form input { font-family:var(--icrm-sans); font-size:14px; color:var(--icrm-ink); background:var(--icrm-surface); border:1px solid var(--icrm-line); border-radius:var(--icrm-radius-sm); padding:10px 12px; width:100%; }
.icrm-login__form input:focus { outline:none; border-color:var(--icrm-blue); box-shadow:0 0 0 3px var(--icrm-blue-tint); }
.icrm-login__err { background:#fcecea; color:#b3261e; border:1px solid #f4cfc9; border-radius:var(--icrm-radius-sm); padding:10px 12px; font-size:13px; margin-bottom:14px; }
.icrm-login__actions { display:flex; gap:8px; }
.icrm-login__lost { display:block; text-align:center; margin-top:14px; font-size:13px; color:var(--icrm-blue); text-decoration:none; }
.icrm-login__lost:hover { color:var(--icrm-orange-dark); }

/* ---------- Buttons ---------- */
.icrm-btn { font-family:var(--icrm-sans); font-weight:600; font-size:14px; cursor:pointer; border:1px solid transparent; border-radius:var(--icrm-radius-sm); padding:10px 16px; background:var(--icrm-blue); color:#fff; transition:background .15s,color .15s,border-color .15s; }
.icrm-btn:hover { background:var(--icrm-orange); color:#000; }
.icrm-btn--ghost { background:#fff; color:var(--icrm-ink); border-color:var(--icrm-line); }
.icrm-btn--ghost:hover { background:var(--icrm-surface-2); color:var(--icrm-ink); border-color:#d6dad8; }
.icrm-btn.small { padding:7px 12px; font-size:12.5px; }

/* ---------- Shell ---------- */
.icrm-shell { display:grid; grid-template-columns:216px 1fr; height:100vh; max-height:100vh; background:var(--icrm-bg); border:1px solid var(--icrm-line); border-radius:var(--icrm-radius); overflow:hidden; }
.icrm-side { background:var(--icrm-dark); padding:22px 14px; display:flex; flex-direction:column; gap:4px; }
.icrm-side .icrm-brand { padding:4px 10px 18px; }
.icrm-side .icrm-brand strong { font-weight:700; font-size:19px; display:block; color:#fff; letter-spacing:-.01em; }
.icrm-navitem { display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:var(--icrm-radius-sm); font-size:14px; font-weight:500; color:#aeb4c2; cursor:pointer; border:0; background:transparent; width:100%; text-align:left; }
.icrm-navitem:hover { background:rgba(255,255,255,.06); color:#fff; }
.icrm-navitem.active { background:var(--icrm-blue); color:#fff; }
.icrm-navitem .dot { width:6px; height:6px; border-radius:50%; background:currentColor; opacity:.55; }
.icrm-side .icrm-side-foot { margin-top:auto; font-size:12px; padding:8px 10px 0; }
.icrm-side .icrm-side-foot a { color:#aeb4c2; text-decoration:none; font-weight:500; }
.icrm-side .icrm-side-foot a:hover { color:var(--icrm-orange); }

.icrm-main { padding:26px 28px; height:100%; overflow:auto; background:var(--icrm-bg); }
.icrm-page-head { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; margin-bottom:20px; flex-wrap:wrap; }
.icrm-page-head h2 { font-weight:700; font-size:24px; margin:4px 0 0; letter-spacing:-.02em; }
.icrm-page-head .sub { color:var(--icrm-ink-soft); font-size:13.5px; }

/* ---------- Stat cards ---------- */
.icrm-stats { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:14px; margin-bottom:26px; }
.icrm-stat { background:var(--icrm-surface); border:1px solid var(--icrm-line); border-radius:var(--icrm-radius); padding:18px; box-shadow:var(--icrm-shadow); }
.icrm-stat .k { font-size:11px; font-weight:600; letter-spacing:.1em; text-transform:uppercase; color:var(--icrm-ink-soft); }
.icrm-stat .v { font-weight:700; font-size:32px; margin-top:6px; letter-spacing:-.02em; }
.icrm-stat .sub { font-size:12px; color:var(--icrm-ink-soft); margin-top:3px; }
.icrm-stat.accent .v { color:var(--icrm-blue); }

/* ---------- Filter bar ---------- */
.icrm-filterbar { display:flex; gap:10px; background:var(--icrm-surface); border:1px solid var(--icrm-line); border-radius:var(--icrm-radius); padding:14px; margin-bottom:16px; flex-wrap:wrap; }
.icrm-filterbar input[type=search] { flex:1; min-width:240px; }
.icrm-filterbar input, .icrm-filterbar select { font-family:var(--icrm-sans); font-size:14px; color:var(--icrm-ink); background:#fff; border:1px solid var(--icrm-line); border-radius:var(--icrm-radius-sm); padding:10px 12px; }
.icrm-filterbar input:focus, .icrm-filterbar select:focus { outline:none; border-color:var(--icrm-blue); box-shadow:0 0 0 3px var(--icrm-blue-tint); }

/* ---------- Table ---------- */
.icrm-tablewrap { background:var(--icrm-surface); border:1px solid var(--icrm-line); border-radius:var(--icrm-radius); overflow:hidden; box-shadow:var(--icrm-shadow); }
table.icrm-table { width:100%; border-collapse:collapse; font-size:13.5px; }
.icrm-table th { text-align:left; font-size:10.5px; font-weight:600; letter-spacing:.08em; text-transform:uppercase; color:var(--icrm-ink-soft); padding:12px 14px; border-bottom:1px solid var(--icrm-line); background:var(--icrm-surface-2); white-space:nowrap; }
.icrm-table td { padding:12px 14px; border-bottom:1px solid var(--icrm-line-2); vertical-align:middle; }
.icrm-table tr:last-child td { border-bottom:none; }
.icrm-table tbody tr { cursor:pointer; }
.icrm-table tbody tr:hover { background:var(--icrm-blue-tint-2); }
.icrm-name { font-weight:600; }
.icrm-sub { color:var(--icrm-ink-soft); font-size:12px; }
.icrm-pager { display:flex; align-items:center; justify-content:space-between; padding:14px; gap:12px; font-size:13px; color:var(--icrm-ink-soft); }
.icrm-pager .pages { display:flex; gap:6px; align-items:center; }

/* ---------- Badges ---------- */
.icrm-badge { display:inline-block; font-size:10.5px; font-weight:600; letter-spacing:.04em; text-transform:uppercase; padding:3px 9px; border-radius:999px; background:var(--icrm-surface-2); color:var(--icrm-ink-soft); border:1px solid var(--icrm-line); }
.icrm-badge.icrm-s-new { background:#f1f3f7; color:#5a6270; }
.icrm-badge.icrm-s-contacted { background:var(--icrm-blue-tint); color:var(--icrm-blue-dark); border-color:#cdddf7; }
.icrm-badge.icrm-s-replied,.icrm-badge.icrm-s-interested { background:#d6f0df; color:#076b32; border-color:#a9e0be; }
.icrm-badge.icrm-s-won,.icrm-badge.icrm-s-sent { background:#1f9d57; color:#fff; border-color:#1f9d57; }
.icrm-badge.icrm-s-delivered { background:#d6f0df; color:#076b32; border-color:#a9e0be; }
.icrm-badge.icrm-s-opened { background:#0b7a46; color:#fff; border-color:#0b7a46; }
.icrm-badge.icrm-s-negotiating { background:#fbf1e4; color:#8a5a16; border-color:#ead6b8; }
.icrm-badge.icrm-s-lost,.icrm-badge.icrm-s-do_not_contact,.icrm-badge.icrm-s-failed,.icrm-badge.icrm-s-bounced,.icrm-badge.icrm-s-complained { background:#fcecea; color:#b3261e; border-color:#f4cfc9; }
.icrm-badge.icrm-s-unsubscribed,.icrm-badge.icrm-s-queued { background:#fbf1e4; color:#8a6d00; border-color:#ead6b8; }
.icrm-badge.icrm-s-canceled { background:#f1f3f7; color:#9aa19d; border-color:#e5e8e6; }

/* ---------- Drawer ---------- */
.icrm-scrim { position:fixed; inset:0; background:rgba(12,16,22,.45); z-index:99998; opacity:0; pointer-events:none; transition:opacity .2s; }
.icrm-scrim.open { opacity:1; pointer-events:auto; }
.icrm-drawer { position:fixed; top:0; right:0; height:100%; width:520px; max-width:94vw; background:var(--icrm-bg); border-left:1px solid var(--icrm-line); z-index:99999; transform:translateX(100%); transition:transform .24s ease; overflow-y:auto; box-shadow:-12px 0 40px rgba(12,16,22,.16); }
.icrm-drawer.open { transform:translateX(0); }
.icrm-drawer-head { position:sticky; top:0; background:var(--icrm-bg); border-bottom:1px solid var(--icrm-line); padding:20px 22px; display:flex; justify-content:space-between; align-items:flex-start; gap:12px; z-index:2; }
.icrm-drawer-head h3 { font-weight:700; font-size:20px; margin:4px 0 4px; letter-spacing:-.01em; }
.icrm-drawer-head .sub { color:var(--icrm-ink-soft); font-size:13px; }
.icrm-close { cursor:pointer; border:1px solid var(--icrm-line); background:#fff; border-radius:8px; width:32px; height:32px; font-size:17px; line-height:1; color:var(--icrm-ink-soft); flex:none; }
.icrm-close:hover { background:var(--icrm-surface-2); }
.icrm-drawer-body { padding:20px 22px 48px; display:flex; flex-direction:column; gap:20px; }
.icrm-sec-title { font-size:11px; font-weight:600; letter-spacing:.1em; text-transform:uppercase; color:var(--icrm-blue); margin-bottom:10px; }
.icrm-fields { width:100%; border-collapse:collapse; font-size:13.5px; }
.icrm-fields th { text-align:left; width:140px; vertical-align:top; color:var(--icrm-ink-soft); font-weight:500; padding:5px 10px 5px 0; }
.icrm-fields td { padding:5px 0; word-break:break-word; }
.icrm-fields a, .icrm-link { color:var(--icrm-blue-dark); text-decoration:none; font-weight:600; }
.icrm-fields a:hover, .icrm-link:hover { color:var(--icrm-orange-dark); }
.icrm-field { display:flex; flex-direction:column; gap:10px; }
.icrm-field label { font-size:12px; font-weight:600; color:var(--icrm-ink-soft); }
.icrm-field input, .icrm-field select, .icrm-field textarea { font-family:var(--icrm-sans); font-size:14px; color:var(--icrm-ink); background:#fff; border:1px solid var(--icrm-line); border-radius:var(--icrm-radius-sm); padding:10px 12px; width:100%; }
.icrm-field input:focus, .icrm-field select:focus, .icrm-field textarea:focus { outline:none; border-color:var(--icrm-blue); box-shadow:0 0 0 3px var(--icrm-blue-tint); }
.icrm-chipwrap { display:flex; flex-wrap:wrap; gap:6px; }
.icrm-chip2 { display:inline-flex; align-items:center; gap:6px; color:#fff; border-radius:999px; padding:4px 7px 4px 12px; font-size:12px; font-weight:600; line-height:1.2; }
.icrm-chip2 button { background:rgba(255,255,255,.28); border:0; color:#fff; border-radius:50%; width:16px; height:16px; cursor:pointer; line-height:1; }
.icrm-chip2 button:hover { background:rgba(0,0,0,.28); }
.icrm-addrow { display:flex; gap:6px; margin-top:8px; }
.icrm-addrow input { flex:1; }
.icrm-note { background:var(--icrm-surface); border:1px solid var(--icrm-line); border-radius:var(--icrm-radius-sm); padding:10px 12px; font-size:13px; }
.icrm-note + .icrm-note { margin-top:8px; }
.icrm-note-meta, .icrm-act-when { color:var(--icrm-ink-soft); font-size:11px; margin-top:4px; }
.icrm-convo { list-style:none; margin:0; padding:0; }
.icrm-convo li { border:1px solid var(--icrm-line); border-left:3px solid var(--icrm-blue); border-radius:var(--icrm-radius-sm); padding:9px 11px; }
.icrm-convo li + li { margin-top:8px; }
.icrm-convo li.dir-in { border-left-color:var(--icrm-orange); background:#fffdf6; }
.icrm-convo__sub { font-weight:600; font-size:13px; }
.icrm-convo__body { font-size:12.5px; color:#444; margin:3px 0; }
.icrm-convo__meta { font-size:11px; color:var(--icrm-ink-soft); }
.icrm-activity { list-style:none; margin:0; padding:0; font-size:13px; }
.icrm-activity li { padding:7px 0; border-top:1px solid var(--icrm-line-2); }
.icrm-result { font-size:13px; color:var(--icrm-ink-soft); }
.icrm-muted { color:var(--icrm-ink-soft); }
.icrm-empty { text-align:center; padding:50px 20px; color:var(--icrm-ink-soft); }

/* ---------- misc views ---------- */
.icrm-card { background:var(--icrm-surface); border:1px solid var(--icrm-line); border-radius:var(--icrm-radius); padding:18px; box-shadow:var(--icrm-shadow); margin-bottom:16px; }
.icrm-card h3 { margin:0 0 12px; font-size:15px; }
.icrm-twocol { display:grid; grid-template-columns:280px minmax(0,1fr); gap:16px; }
@media (max-width:760px){ .icrm-twocol { grid-template-columns:1fr; } }

/* ---------- Responsive ---------- */
@media (max-width:900px){
	.icrm-shell { grid-template-columns:1fr; }
	.icrm-side { flex-direction:row; overflow-x:auto; align-items:center; }
	.icrm-side .icrm-brand, .icrm-side .icrm-side-foot { display:none; }
	.icrm-navitem { white-space:nowrap; }
	.icrm-main { padding:18px; }
	.icrm-table .hide-sm { display:none; }
}

/* ---- Bulk select + send modal ---- */
.icrm-selbar { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:12px; min-height:30px; }
.icrm-selbar .selcount { font-size:13px; color:var(--icrm-ink-soft); font-weight:600; }
.icrm-table .cbcol { width:36px; text-align:center; }
.icrm-table .cbcol input { cursor:pointer; width:16px; height:16px; }
.icrm-modal { position:fixed; top:50%; left:50%; transform:translate(-50%,-46%); width:660px; max-width:94vw; max-height:88vh; overflow:auto; background:#fff; border:1px solid var(--icrm-line); border-radius:var(--icrm-radius); z-index:100000; opacity:0; visibility:hidden; transition:opacity .18s ease, transform .18s ease; box-shadow:0 24px 60px rgba(12,16,22,.28); }
.icrm-modal.open { opacity:1; visibility:visible; transform:translate(-50%,-50%); }
.icrm-modal-head { position:sticky; top:0; background:#fff; display:flex; align-items:center; justify-content:space-between; padding:16px 20px; border-bottom:1px solid var(--icrm-line); z-index:1; }
.icrm-modal-head h3 { margin:0; font-size:18px; font-weight:700; }
.icrm-modal-body { padding:18px 20px 24px; }
.icrm-modal-target { font-size:14px; margin:0 0 14px; background:var(--icrm-blue-tint-2); border:1px solid var(--icrm-blue-tint); border-radius:var(--icrm-radius-sm); padding:10px 12px; }
.icrm-modal-actions { display:flex; align-items:center; gap:10px; margin-top:16px; flex-wrap:wrap; }
.icrm-preview { margin-top:18px; border-top:1px solid var(--icrm-line); padding-top:16px; }
.icrm-preview-subj { font-size:14px; margin-bottom:8px; }
.icrm-preview-body { border:1px solid var(--icrm-line); border-radius:var(--icrm-radius-sm); padding:14px; font-size:14px; background:var(--icrm-surface-2); max-height:340px; overflow:auto; line-height:1.55; }

/* ---- Lead drawer: info-first layout ---- */
.icrm-quick { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:18px; }
.icrm-quickbtn { display:inline-flex; align-items:center; gap:7px; text-decoration:none; font-size:13px; font-weight:600; color:var(--icrm-blue-dark); background:var(--icrm-blue-tint-2); border:1px solid var(--icrm-blue-tint); border-radius:10px; padding:9px 15px; transition:background .12s ease, border-color .12s ease; }
.icrm-quickbtn:hover { background:var(--icrm-blue); border-color:var(--icrm-blue); color:#fff; }
.icrm-quickbtn span { opacity:.8; font-weight:700; }
.icrm-leadinfo .icrm-fields { border:0; border-radius:0; border-collapse:collapse; width:100%; }
.icrm-leadinfo .icrm-fields tr { border-bottom:1px solid var(--icrm-line-2); }
.icrm-leadinfo .icrm-fields tr:last-child { border-bottom:0; }
.icrm-leadinfo .icrm-fields th { width:120px; border:0; background:transparent; padding:10px 14px 10px 6px; color:var(--icrm-ink-soft); font-weight:500; font-size:12px; white-space:nowrap; vertical-align:top; text-align:left; }
.icrm-leadinfo .icrm-fields td { border:0; background:transparent; padding:10px 6px 10px 0; font-size:13.5px; font-weight:500; color:var(--icrm-ink); vertical-align:top; word-break:break-word; }
.icrm-estatus { display:inline-block; font-size:10.5px; font-weight:700; letter-spacing:.03em; text-transform:uppercase; padding:2px 9px; border-radius:999px; }
.icrm-estatus--ok { background:#e5f5ec; color:#1f7a44; }
.icrm-estatus--bad { background:#fcecea; color:#b3261e; }
.icrm-estatus--warn { background:#fdf4e3; color:#8a6d00; }
.icrm-estatus--na { background:var(--icrm-surface-2); color:var(--icrm-ink-soft); }
.icrm-drawer-divider { height:1px; background:var(--icrm-line); }

/* ---- Advanced filters ---- */
.icrm-filterbar { align-items:center; }
.icrm-filterbar input[type=search], .icrm-filterbar select, .icrm-ms-btn, .icrm-toggle { height:40px; }
.icrm-ms { position:relative; }
.icrm-ms-btn { font-family:var(--icrm-sans); font-size:14px; background:#fff; border:1px solid var(--icrm-line); border-radius:var(--icrm-radius-sm); padding:0 14px; cursor:pointer; color:var(--icrm-ink); }
.icrm-ms-btn:hover { border-color:#cdd3dd; }
.icrm-ms-pop { position:absolute; z-index:60; top:calc(100% + 4px); left:0; min-width:220px; max-height:300px; overflow:auto; background:#fff; border:1px solid var(--icrm-line); border-radius:var(--icrm-radius-sm); box-shadow:0 12px 30px rgba(12,16,22,.16); padding:6px; }
.icrm-ms-opt { display:flex; align-items:center; gap:8px; padding:7px 8px; border-radius:6px; font-size:13px; cursor:pointer; }
.icrm-ms-opt:hover { background:var(--icrm-surface-2); }
.icrm-ms-opt input { width:15px; height:15px; }
.icrm-ms-empty { padding:8px; color:var(--icrm-ink-soft); font-size:13px; }
.icrm-toggle { display:inline-flex; align-items:center; gap:7px; font-size:13px; font-weight:600; color:var(--icrm-ink-soft); border:1px solid var(--icrm-line); border-radius:var(--icrm-radius-sm); padding:0 14px; cursor:pointer; background:#fff; white-space:nowrap; }
.icrm-toggle input { width:15px; height:15px; }
.icrm-pager .pages { display:flex; align-items:center; gap:8px; }
.icrm-pager select { font-family:var(--icrm-sans); font-size:13px; border:1px solid var(--icrm-line); border-radius:var(--icrm-radius-sm); padding:6px 8px; background:#fff; }

/* ---- Sidebar pinned to viewport height ---- */
.icrm-side { height:100%; max-height:100%; overflow:hidden; }
@media (max-width:900px){
	.icrm-shell { height:auto; max-height:none; }
	.icrm-main { height:auto; }
	.icrm-side { height:auto; max-height:none; overflow-x:auto; overflow-y:visible; }
}

/* ---- Multi-value (chip) filter inputs ---- */
.icrm-tokens { display:flex; flex-wrap:wrap; align-items:center; gap:6px; min-width:200px; max-width:380px; min-height:40px; background:#fff; border:1px solid var(--icrm-line); border-radius:var(--icrm-radius-sm); padding:5px 8px; }
#icrm-console .icrm-tokens input { -webkit-appearance:none; appearance:none; border:0; outline:none; flex:1; min-width:80px; width:auto; height:auto; font-family:var(--icrm-sans); font-size:14px; padding:4px 2px; background:transparent; box-shadow:none; }
.icrm-token { display:inline-flex; align-items:center; gap:6px; background:var(--icrm-blue-tint); color:var(--icrm-blue-dark); border-radius:999px; padding:3px 4px 3px 11px; font-size:12px; font-weight:600; line-height:1; white-space:nowrap; }
#icrm-console .icrm-token button { -webkit-appearance:none; appearance:none; margin:0; padding:0; display:inline-flex; align-items:center; justify-content:center; width:16px; height:16px; min-width:16px; flex:none; border:0; border-radius:50%; background:rgba(8,66,158,.2); color:var(--icrm-blue-dark); font-size:12px; line-height:1; cursor:pointer; box-shadow:none; }
#icrm-console .icrm-token button:hover { background:var(--icrm-orange); color:#000; }
/* keep the per-page / filter selects from being stretched full-width by the theme */
#icrm-console .icrm-filterbar select, #icrm-console .icrm-pager select { width:auto; min-width:120px; max-width:200px; }
#icrm-console .icrm-filterbar input[type=search] { flex:1 1 200px; min-width:180px; width:auto; }
/* drawer tag/flag chip remove buttons: same reset so the theme can't square them off */
#icrm-console .icrm-chip2 button, .icrm-drawer .icrm-chip2 button, .icrm-modal .icrm-chip2 button { -webkit-appearance:none; appearance:none; display:inline-flex; align-items:center; justify-content:center; padding:0; margin:0; width:16px; height:16px; min-width:16px; flex:none; line-height:1; font-size:12px; box-shadow:none; }

/* ---- Merge-token reference ---- */
.icrm-tokref { display:flex; flex-wrap:wrap; gap:6px; margin:8px 0 2px; padding:11px 12px; background:var(--icrm-surface-2); border:1px solid var(--icrm-line); border-radius:var(--icrm-radius-sm); }
.icrm-tokref__label { flex-basis:100%; font-size:10.5px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--icrm-ink-soft); margin-bottom:3px; }
#icrm-console .icrm-tokchip, .icrm-drawer .icrm-tokchip, .icrm-modal .icrm-tokchip { -webkit-appearance:none; appearance:none; font-family:var(--icrm-mono); font-size:11.5px; color:var(--icrm-blue-dark) !important; background:#fff !important; border:1px solid var(--icrm-blue-tint) !important; border-radius:999px; padding:4px 11px; margin:0; cursor:pointer; line-height:1.25; box-shadow:none; transition:background .12s ease, color .12s ease, border-color .12s ease; }
#icrm-console .icrm-tokchip:hover, .icrm-drawer .icrm-tokchip:hover, .icrm-modal .icrm-tokchip:hover { background:var(--icrm-blue) !important; color:#fff !important; border-color:var(--icrm-blue) !important; }

/* ---- Conversations (inbox) ---- */
.icrm-navitem { position:relative; }
.icrm-navitem .nav-label { flex:1; }
.nav-badge { background:var(--icrm-orange); color:#000; font-size:11px; font-weight:700; border-radius:999px; padding:1px 7px; margin-left:auto; }
.icrm-convgrid { display:grid; grid-template-columns:320px minmax(0,1fr); gap:16px; align-items:start; }
@media (max-width:820px){ .icrm-convgrid { grid-template-columns:1fr; } }
.icrm-convlist { background:#fff; border:1px solid var(--icrm-line); border-radius:var(--icrm-radius); overflow:hidden; box-shadow:var(--icrm-shadow); max-height:70vh; overflow-y:auto; }
#icrm-console .icrm-convitem { -webkit-appearance:none; appearance:none; display:block; width:100%; text-align:left; background:#fff; border:0; border-bottom:1px solid var(--icrm-line-2); padding:12px 14px; cursor:pointer; font-family:var(--icrm-sans); }
#icrm-console .icrm-convitem:hover { background:var(--icrm-surface-2); }
#icrm-console .icrm-convitem.is-sel { background:var(--icrm-blue-tint-2); box-shadow:inset 3px 0 0 var(--icrm-blue); }
.icrm-convitem.unread .icrm-convitem__name { font-weight:700; }
.icrm-convitem__top { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.icrm-convitem__name { font-weight:600; font-size:14px; }
.icrm-convitem__badge { background:var(--icrm-orange); color:#000; font-size:11px; font-weight:700; border-radius:999px; padding:1px 7px; }
.icrm-convitem__prev { font-size:12.5px; color:var(--icrm-ink-soft); margin-top:2px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.icrm-convitem__meta { font-size:11px; color:#9aa1ad; margin-top:2px; }
.icrm-thread { background:#fff; border:1px solid var(--icrm-line); border-radius:var(--icrm-radius); box-shadow:var(--icrm-shadow); display:flex; flex-direction:column; max-height:70vh; }
.icrm-thread__head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:16px 18px; border-bottom:1px solid var(--icrm-line); }
.icrm-thread__msgs { padding:16px 18px; overflow-y:auto; flex:1; display:flex; flex-direction:column; gap:12px; }
.icrm-bubble { max-width:80%; border:1px solid var(--icrm-line); border-radius:12px; padding:10px 12px; }
.icrm-bubble.in { align-self:flex-start; background:#fffdf6; border-left:3px solid var(--icrm-orange); }
.icrm-bubble.out { align-self:flex-end; background:var(--icrm-blue-tint-2); border-right:3px solid var(--icrm-blue); }
.icrm-bubble__subj { font-weight:600; font-size:13px; }
.icrm-bubble__body { font-size:13px; color:#333; margin:4px 0; white-space:pre-wrap; word-break:break-word; }
.icrm-bubble__meta { font-size:11px; color:var(--icrm-ink-soft); }
.icrm-reply { border-top:1px solid var(--icrm-line); padding:14px 18px; display:flex; flex-direction:column; gap:8px; }
.icrm-reply select, .icrm-reply input, .icrm-reply textarea { width:100%; font-family:var(--icrm-sans); font-size:14px; border:1px solid var(--icrm-line); border-radius:var(--icrm-radius-sm); padding:9px 11px; }
.icrm-reply__actions { display:flex; align-items:center; gap:10px; }

/* ---- Queue error details ---- */
.icrm-stat--click { cursor:pointer; transition:border-color .15s, box-shadow .15s; }
.icrm-stat--click:hover { border-color:var(--icrm-blue); }
.icrm-stat--click.is-on { border-color:var(--icrm-blue); box-shadow:0 0 0 2px var(--icrm-blue-tint); }
.icrm-qbar { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:16px; }
.icrm-errtype { display:inline-block; font-size:11px; font-weight:700; color:#b3261e; background:#fcecea; border:1px solid #f4cfc9; border-radius:6px; padding:2px 8px; }
.icrm-errmsg { font-size:11.5px; color:#8a2b22; margin-top:3px; max-width:380px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* Exclude-title chip input + clear filters */
.icrm-tokens--exclude { border-color:#f0c9c2; }
.icrm-tokens--exclude .icrm-token { background:#fcecea; color:#b3261e; }
#icrm-console .icrm-tokens--exclude .icrm-token button { background:rgba(179,38,30,.16); color:#b3261e; }
#icrm-console .icrm-tokens--exclude .icrm-token button:hover { background:var(--icrm-orange); color:#000; }
.icrm-clearfilters { margin-left:auto; }

/* ---- Multiple emails on a lead ---- */
.icrm-emails { margin-bottom:16px; }
.icrm-emails__label { font-size:10.5px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--icrm-ink-soft); margin-bottom:5px; }
.icrm-emailrow { display:flex; align-items:center; gap:8px; padding:7px 0; border-bottom:1px solid var(--icrm-line-2); font-size:13.5px; }
.icrm-emailrow:last-child { border-bottom:0; }
.icrm-emailrow a { font-weight:600; word-break:break-all; }
.icrm-emailtag { font-size:9.5px; font-weight:700; text-transform:uppercase; letter-spacing:.03em; padding:1px 7px; border-radius:999px; background:var(--icrm-surface-2); color:var(--icrm-ink-soft); white-space:nowrap; }
.icrm-emailtag--primary { background:var(--icrm-blue-tint); color:var(--icrm-blue-dark); }

/* Email-queue drain progress */
.icrm-qprogress { margin:4px 0 16px; max-width:560px; }
.icrm-qprogress__txt { font-size:13px; color:var(--icrm-ink-soft); margin:6px 0 0; }

.icrm-bar { height:10px; background:var(--icrm-surface-2,#eef1f6); border:1px solid var(--icrm-line,#e4e7ee); border-radius:999px; overflow:hidden; }
.icrm-bar__fill { height:100%; background:var(--icrm-blue,#08429e); width:0; transition:width .25s ease; }

.icrm-qnum { width:58px; font-family:var(--icrm-sans); font-size:13px; border:1px solid var(--icrm-line,#e4e7ee); border-radius:var(--icrm-radius-sm,8px); padding:5px 7px; }
.icrm-qpace { display:inline-flex; align-items:center; gap:6px; font-size:12.5px; color:var(--icrm-ink-soft); }

.icrm-autorun { display:inline-flex; align-items:center; gap:6px; font-size:13px; color:var(--icrm-ink-soft); margin-left:6px; cursor:pointer; }
.icrm-autorun input { margin:0; }
