.theme-control{display:flex;align-items:center;gap:8px;min-width:0;font-size:11px;color:var(--muted)}
.sale-dialog{max-height:90dvh;overflow:auto}.sale-amount{display:grid;grid-template-columns:1fr 110px;gap:16px}.sale-dialog select{margin-top:6px;width:100%;padding:10px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink)}.sale-attribution{padding:12px;border:1px solid var(--line);border-radius:8px;margin:16px 0;font-size:12px;line-height:1.6}.sale-record{display:grid;gap:5px;padding:12px 0;border-top:1px solid var(--line)}.sale-record strong{font-size:16px;color:var(--ink)}.sale-record span,.sale-record small,.sale-record p{font-size:11px;color:var(--muted);line-height:1.6}.dataset-panel{margin-top:32px;border-top:1px solid var(--line);padding-top:24px}.dataset-panel>header{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:16px}.dataset-panel h2{font-size:18px;font-weight:500;margin-bottom:8px}.dataset-row{display:flex;justify-content:space-between;gap:15px;padding:16px 0;border-bottom:1px solid var(--line)}.dataset-row strong{font-size:13px;font-weight:500}.dataset-row small{display:block;margin-top:6px;font-size:11px;color:var(--muted)}
.theme-control select{width:155px;max-width:100%;margin:0;padding:8px 24px 8px 9px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink);font:inherit;cursor:pointer}
.theme-control select:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.queue-attention{display:flex;gap:6px;padding:12px 15px 0;flex-wrap:wrap}
.queue-attention button{border:1px solid var(--line);background:transparent;color:var(--muted);padding:6px 8px;border-radius:7px;font-size:11px;min-height:32px}
.queue-attention button.selected{background:#b19be722;color:var(--ink);border-color:var(--accent)}
.conversation-tools{display:flex;align-items:center;gap:6px;padding:0 18px 9px;flex-wrap:wrap;border-bottom:1px solid var(--line)}
.conversation-tools button{display:flex;align-items:center;gap:6px;border:1px solid var(--line);background:transparent;color:var(--muted);padding:7px 9px;border-radius:7px;font-size:11px;min-height:34px}
.conversation-tools button:hover{color:var(--ink);border-color:var(--accent)}
:root[data-theme="graphite"]{color-scheme:dark;--frame:#111519;--surface:#1b2127;--panel:#1b2127dc;--panel-soft:#202830bd;--ink:#edf0f3;--muted:#a6b3bf;--line:#bfced71f;--accent:#c0ccd6;--green:#c0ccd6;--tint:#b9cbd61a;--outgoing:#35424d;--note:#392e23;--shadow:#0004;--wash:#5a728d20;--primary-ink:#17212a}
:root[data-theme="ocean"]{color-scheme:dark;--frame:#091a25;--surface:#102b3b;--panel:#102b3bdc;--panel-soft:#17394abd;--ink:#e5f5fc;--muted:#9fbfce;--line:#a5d5e523;--accent:#74cbdc;--green:#74cbdc;--tint:#64bbd51a;--outgoing:#214f64;--note:#343928;--shadow:#00101855;--wash:#116b8130;--primary-ink:#07252f}
:root[data-theme="pearl"]{color-scheme:light;--frame:#eef1f4;--surface:#fff;--panel:#ffffffd9;--panel-soft:#f4f7faed;--ink:#263443;--muted:#5c6d7b;--line:#304c6525;--accent:#486b9b;--green:#486b9b;--tint:#486b9b12;--outgoing:#e1eaf7;--note:#fff3dc;--shadow:#20394e12;--wash:#9ebcda26;--primary-ink:#fff}
html[data-theme]:not([data-theme="liquid"]){background:var(--frame);color:var(--ink)}
[data-theme]:not([data-theme="liquid"]) body{background:radial-gradient(ellipse at 0 0,var(--wash),transparent 55%),var(--frame);color:var(--ink)}
[data-theme]:not([data-theme="liquid"]) :is(.sidebar,.crm-shell .sidebar,.shell>.sidebar,.conversation-queue,.thread,.contact-details,.contact-details.open,.directory,.sheet,.palette,.inspector,.builder-top,.topbar,.login-panel,.dialog){background:var(--panel);color:var(--ink);border-color:var(--line);box-shadow:inset 0 1px 0 #ffffff10}
[data-theme]:not([data-theme="liquid"]) :is(.inbox-layout,.composer,.thread-header,.thread-context,.compose-tabs,.queue-heading,.queue-tabs,.queue-footer,.detail-section,.details-heading,.contact-table-row,.contact-table-head,.node-card,.palette-note,.connection-card,.table-wrap,.table-head,.flow-row){border-color:var(--line)}
[data-theme]:not([data-theme="liquid"]) :is(.canvas,.inbox-layout,.builder,.login-screen){background:var(--frame)}
[data-theme]:not([data-theme="liquid"]) :is(.thread,.conversation-items,.messages,.composer-wrap,.attribution){background:transparent}
[data-theme]:not([data-theme="liquid"]) :is(.nav-item,.crm-topbar,.topbar,.queue-heading .eyebrow,.queue-footer,.queue-subtitle,.conversation-snippet,.conversation-meta,.thread-title>span,.thread-context,.compose-tabs>span,.composer-hint,.message-stamp,.details-heading,.contact-profile>span:not(.person-avatar),.detail-section dt,.detail-section h3>span,.attribution>p,.notes-section>p,.attribution-foot,.directory p,.connection-facts,.contact-table-head,.contact-table-row>span,.login-header,.login-intro>p:last-child,.login-panel .fine,.dialog p,.muted,.fine,.canvas-head p,.breadcrumb,.page-heading p,.inspector-head p,.field-description,.builder-name small,.node-copy small,.palette p,.palette-item small,.inspector-empty p,.guide p,.list-toolbar p,.flow-identity small,.save-indicator,.empty p,.empty-thread p,.loading-label,.empty-thread,.inbox-empty p){color:var(--muted)}
[data-theme]:not([data-theme="liquid"]) :is(.brand,.brand strong,.queue-heading h1,.thread-title>strong,.contact-profile h2,.detail-section h3,.detail-section dd,.attribution>strong,.directory h1,.connection-card h2,.connection-facts strong,.login-intro h1,.login-panel h2,.dialog h2,.dialog label,.page-heading h1,.canvas-head h1,.inspector-head h2,.palette h2,.node-copy strong,.empty-thread h2,.inbox-empty strong,.canvas-empty strong,.canvas-empty p,.start-card strong,.start-card small,.guide strong){color:var(--ink)}
[data-theme]:not([data-theme="liquid"]) :is(.nav-item.active,.conversation-row.selected,.conversation-row:hover,.queue-tabs .selected,.compose-tabs .selected,.filter-toggle.selected,.pill,.flow-icon,.node-symbol,.palette-symbol,.empty-orbit,.queue-attention button.selected){background:var(--tint);color:var(--ink);border-color:var(--line)}
[data-theme]:not([data-theme="liquid"]) :is(.inbox-search,.composer,.message-bubble,.connection-card,.clid,.node-card,.table-head,.palette-note,.start-card,.dialog input,.login-panel input,input,textarea,select){background:var(--panel-soft);color:var(--ink);border-color:var(--line)}
[data-theme]:not([data-theme="liquid"]) :is(input,textarea)::placeholder{color:var(--muted)}
[data-theme]:not([data-theme="liquid"]) .outgoing .message-bubble{background:var(--outgoing);border-color:var(--line);box-shadow:0 3px 12px var(--shadow)}
[data-theme]:not([data-theme="liquid"]) :is(.message p,.message-stamp,.message blockquote,.clid code){color:var(--ink)}
[data-theme]:not([data-theme="liquid"]) :is(.note-mode,.contact-note){background:var(--note);border-color:var(--line)}
[data-theme]:not([data-theme="liquid"]) :is(.contact-note p,.contact-note small){color:var(--ink)}
[data-theme]:not([data-theme="liquid"]) :is(.primary,.send-button){background:var(--accent);color:var(--primary-ink);border-color:transparent;box-shadow:none}
[data-theme]:not([data-theme="liquid"]) :is(.secondary,.icon-button,.text-button,.queue-tabs button,.filter-toggle,.compose-tabs button,.thread-context button,.referral-event,.referral-event span,.ctwa-indicator,.attribution-label,.clid>span,.integration-notice,.empty-symbol,.row-arrow,.canvas-foot){color:var(--muted)}
[data-theme]:not([data-theme="liquid"]) :is(.secondary,.icon-button:hover,.text-button:hover){background:var(--tint);border-color:var(--line)}
[data-theme]:not([data-theme="liquid"]) :is(.demo-bar,.alert){background:var(--panel-soft);color:var(--ink);border-color:var(--line)}
[data-theme]:not([data-theme="liquid"]) .demo-bar button{color:var(--accent)}
[data-theme]:not([data-theme="liquid"]) .dialog-backdrop{background:var(--shadow)}
[data-theme]:not([data-theme="liquid"]) :is(.mark i,.unread){background:var(--accent);color:var(--primary-ink)}
[data-theme]:not([data-theme="liquid"]) .date-divider span{background:var(--surface);color:var(--muted)}
[data-theme="pearl"] .person-avatar{background:hsl(var(--person-hue) 15% 89%);color:hsl(var(--person-hue) 23% 30%);border-color:var(--line)}
[data-theme="pearl"] .avatar{background:#dbe3ed;color:#304d73}
[data-theme="pearl"] .mini-status.waiting{color:#86601f}
[data-theme="pearl"] .mini-status.in-progress{color:#526684}
[data-theme="pearl"] .mini-status.resolved{color:#35654b}
[data-theme="pearl"] .delivery{color:#526684}
[data-theme="pearl"] .queue-heading h1 span{color:var(--muted)}
@media(max-width:800px){.theme-control>span{display:none}.theme-control select{width:116px;font-size:11px}.crm-topbar{gap:8px}.crm-topbar>.topbar-divider,.crm-topbar>span:not(.topbar-divider){display:none}.topbar-right{margin-left:auto}.conversation-tools{padding:0 12px 8px}}
@media(max-width:600px){.theme-control select{width:108px;min-height:34px}.crm-topbar .brand{font-size:14px}.queue-attention{padding:12px 18px 0}.builder-top .theme-control{display:none}.login-header>span{display:none}.login-header{gap:12px}.login-header .theme-control{margin-left:auto}}
@media(max-width:600px){.conversation-tools button,.queue-attention button,.dialog-actions button,.theme-control select{min-height:44px}.sale-amount{grid-template-columns:minmax(0,1fr) 100px;gap:12px}}
/* Integration controls share the same mobile touch targets as the inbox. */
.connection-create-actions { display:flex; flex-wrap:wrap; gap:10px; }
.uazapi-setup { padding:20px; border:1px solid var(--line); border-radius:14px; margin:0 0 20px; background:var(--surface); }
.uazapi-setup p { color:var(--muted); line-height:1.6; max-width:720px; }
.uazapi-setup label { display:grid; gap:8px; margin:16px 0; }
.uazapi-setup input { width:100%; min-width:0; padding:12px; color:var(--ink); background:transparent; border:1px solid var(--line); border-radius:8px; }
@media(max-width:600px) { .connection-create-actions { width:100%; } .connection-create-actions button { flex:1; min-height:44px; } }
