*{box-sizing:border-box}
body{margin:0;font:14px/1.45 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;color:#1e293b;background:#f8fafc}
[hidden],aside[hidden],section[hidden],tr[hidden],.hidden{display:none !important}

header{display:flex;gap:16px;align-items:center;padding:10px 20px;background:#0f172a;color:#f8fafc}
header strong{font-size:15px;letter-spacing:-0.2px}
header nav{display:flex;gap:4px;flex:1}
header button{background:none;border:0;color:#94a3b8;padding:6px 12px;border-radius:6px;cursor:pointer;font:inherit;font-weight:500;transition:all .15s}
header button:hover{color:#fff;background:#1e293b}
header button.on{background:#334155;color:#fff}
#me{font-size:12px;color:#94a3b8;background:#1e293b;padding:4px 10px;border-radius:20px}

.todo{display:grid;grid-template-columns:repeat(4,minmax(175px,1fr));gap:12px;padding:14px 20px;margin:-14px -20px 14px;background:#f1f5f9;border-bottom:1px solid #e2e8f0}
@media (max-width: 980px){.todo{grid-template-columns:repeat(2,minmax(150px,1fr));gap:10px}}
@media (max-width: 640px){.todo{grid-template-columns:repeat(2,minmax(130px,1fr));padding:10px 12px;margin:-10px -12px 10px;gap:8px}}
.todo-stat-card{border-radius:12px;padding:13px 16px;min-height:102px;cursor:pointer;text-align:left;display:flex;flex-direction:column;justify-content:space-between;gap:6px;transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease;font:inherit}
.todo-stat-card:hover{transform:translateY(-1px)}
.todo-stat-card.is-attention{background:linear-gradient(180deg,#fffbeb 0%,#fef3c7 100%);border:1.5px solid #f59e0b;border-left:5px solid #d97706;color:#78350f;box-shadow:0 2px 6px rgba(217,119,6,0.10)}
.todo-stat-card.is-attention:hover{border-color:#d97706;box-shadow:0 4px 12px rgba(217,119,6,0.16)}
.todo-stat-card.is-done{background:linear-gradient(180deg,#f0fdf4 0%,#dcfce7 100%);border:1.5px solid #6ee7b7;border-left:5px solid #10b981;color:#065f46;box-shadow:0 2px 6px rgba(16,185,129,0.08)}
.todo-stat-card.is-done:hover{border-color:#10b981;box-shadow:0 4px 12px rgba(16,185,129,0.14)}
.todo-stat-card.is-active{box-shadow:0 0 0 3px #4f46e5,0 6px 16px rgba(15,23,42,0.14) !important;transform:translateY(-1px)}
.todo-card-top{display:flex;align-items:center;justify-content:space-between;gap:6px;flex-wrap:wrap}
.todo-status-pill{display:inline-flex;align-items:center;gap:4px;font-size:10.5px;font-weight:700;letter-spacing:.25px;text-transform:uppercase;padding:2px 8px;border-radius:999px}
.todo-stat-card.is-attention .todo-status-pill{background:rgba(217,119,6,0.14);color:#b45309;border:1px solid rgba(217,119,6,0.28)}
.todo-stat-card.is-done .todo-status-pill{background:rgba(16,185,129,0.14);color:#047857;border:1px solid rgba(16,185,129,0.28)}
.todo-filter-chip{display:inline-flex;align-items:center;gap:3px;font-size:10px;font-weight:700;padding:2px 7px;border-radius:999px;background:#4f46e5;color:#fff}
.todo-stat-num{font-size:30px;font-weight:800;line-height:1.05;letter-spacing:-0.03em}
.todo-stat-card.is-attention .todo-stat-num{color:#92400e}
.todo-stat-card.is-done .todo-stat-num{color:#065f46}
.todo-stat-label{font-size:12.5px;font-weight:600;line-height:1.3}
.todo-stat-card.is-attention .todo-stat-label{color:#78350f}
.todo-stat-card.is-done .todo-stat-label{color:#047857}
.todo-stat-card.is-loading{background:linear-gradient(180deg,#f8fafc 0%,#f1f5f9 100%);border:1.5px solid #cbd5e1;border-left:5px solid #64748b;color:#475569;box-shadow:0 1px 4px rgba(15,23,42,0.05)}
.todo-stat-card.is-loading .todo-status-pill{background:rgba(100,116,139,0.14);color:#475569;border:1px solid rgba(100,116,139,0.28)}
.todo-stat-card.is-loading .todo-stat-num{color:#64748b}
.todo-stat-card.is-loading .todo-stat-label{color:#475569}

main{padding:14px 20px 60px}
.bar{display:flex;gap:8px;margin-bottom:12px;flex-wrap:wrap}
.bar input{flex:2;min-width:240px}
.bar select{flex:1;min-width:140px}

input,select,textarea{font:inherit;padding:7px 10px;border:1px solid #cbd5e1;border-radius:6px;background:#fff;color:#1e293b}
input:focus,select:focus,textarea:focus{outline:none;border-color:#6366f1;box-shadow:0 0 0 3px rgba(99,102,241,0.15)}
textarea{width:100%;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:12.5px;line-height:1.5}

table{width:100%;min-width:1226px;table-layout:fixed;border-collapse:collapse;background:#fff;border-radius:8px;box-shadow:0 1px 3px rgba(0,0,0,0.06);overflow:visible}
th,td{padding:9px 12px;border-bottom:1px solid #e2e8f0;text-align:left;vertical-align:middle;box-sizing:border-box}
th{background:#f8fafc;font-weight:600;font-size:12px;color:#64748b;letter-spacing:0.3px;text-transform:uppercase;border-bottom:2px solid #e2e8f0}
th[data-sort]{cursor:pointer;user-select:none;transition:background .1s, color .1s;white-space:nowrap}
th[data-sort]:hover{background:#f1f5f9;color:#0f172a}
th[data-sort].is-sorted{background:#eef2ff;color:#1e1b4b;border-bottom-color:#6366f1}
.sort-icon{font-size:10.5px;color:#94a3b8;display:inline-block;min-width:12px;text-align:center;margin-left:2px;font-weight:700}
th[data-sort]:hover .sort-icon{color:#475569}
th[data-sort].is-sorted .sort-icon{color:#4f46e5}

tr.contact-row{transition:background .1s}
tr.contact-row:hover{background:#f8fafc}
tr.contact-row.is-expanded{background:#f1f5f9}

/* Mini-carrot play / expand icon */
.mini-carrot-svg{display:inline-block;vertical-align:middle;flex-shrink:0}
.clip-pill .clip-carrot{width:13px;height:12px;margin-right:1px}
.thread-carrot-svg{width:12px;height:11px}

/* Expand toggle button (mini carrot play caret!) */
.expand-toggle{background:none;border:1px solid transparent;padding:3px 5px;width:28px;height:28px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;font-size:15px;color:#64748b;border-radius:6px;line-height:1;transition:background .15s,border-color .15s}
.expand-toggle:hover{color:#0f172a;background:#fff7ed;border-color:#fdba74}
.expand-toggle.open{background:#ffedd5;border-color:#fb923c}
.expand-toggle .carrot-caret{display:inline-flex;align-items:center;justify-content:center;line-height:1;transform:rotate(0deg)}
.expand-toggle.open .carrot-caret{transform:rotate(90deg)}
@media (prefers-reduced-motion: no-preference){.expand-toggle .carrot-caret{transition:transform .18s cubic-bezier(.4,0,.2,1)}}

/* Table cells */
.id-cell b{font-family:ui-monospace,Menlo,monospace;font-size:12px;color:#334155}
.target-cell{line-height:1.35;overflow:hidden}
.name-line{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.name-line b{color:#0f172a;font-size:13.5px}
.company-line{font-size:12px;color:#64748b}
.email-line{font-size:11.5px;color:#475569;margin-top:2px;word-break:break-all}

/* Segment cell */
.segment-cell{font-size:12.5px;overflow:hidden}
.sub-tag{display:inline-block;font-size:11px;background:#f1f5f9;color:#475569;padding:1px 6px;border-radius:4px;margin-top:3px}

/* Music / Pitch Sample Cell */
.music-td{overflow:hidden}
.music-cell{display:flex;flex-direction:column;gap:3px;font-size:12px}
.music-title{display:flex;align-items:center;gap:4px;color:#0f172a}
.music-links{display:flex;gap:4px;flex-wrap:wrap}
.demo-pill,.clip-pill{display:inline-flex;align-items:center;gap:3px;font-size:11px;padding:2px 7px;border-radius:12px;text-decoration:none;font-weight:500;transition:opacity .15s}
.demo-pill{background:#e0f2fe;color:#0369a1}
.demo-pill:hover{opacity:.85;background:#bae6fd}
.clip-pill{background:#ffedd5;color:#c2410c}
.clip-pill:hover{opacity:.85;background:#fed7aa}

/* Contact forms & Alts */
.form-pill{display:inline-flex;align-items:center;gap:3px;font-size:11px;padding:2px 7px;border-radius:12px;background:#ecfdf5;color:#047857;text-decoration:none;font-weight:600;border:1px solid #a7f3d0}
.form-pill:hover{background:#d1fae5}
.copy-btn{transition:color .15s, background .15s}

/* Relationship / History Selector */
.history-td{overflow:visible}
.history-cell{display:flex;flex-direction:column;gap:3px}
.rel-select{font-size:11.5px;padding:3px 6px;border-radius:6px;font-weight:500;cursor:pointer;border-width:1px;border-style:solid;width:100%;max-width:180px}
.rel-select.rel-cold{background:#f1f5f9;color:#475569;border-color:#cbd5e1}
.rel-select.rel-known{background:#e0f2fe;color:#0369a1;border-color:#7dd3fc;font-weight:600}
.rel-select.rel-customer{background:#dcfce7;color:#15803d;border-color:#86efac;font-weight:600}
.rel-select.rel-past_contact{background:#f3e8ff;color:#7e22ce;border-color:#d8b4fe;font-weight:600}
.rel-select.rel-do_not_contact{background:#fee2e2;color:#b91c1c;border-color:#fca5a5;font-weight:600}
.small-note{font-size:11px;color:#64748b;line-height:1.2;cursor:default;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* Value cell & Tooltip */
.value-td{overflow:visible;text-align:center}
.val-wrapper{position:relative;display:inline-block;cursor:help}
.val-badge{display:inline-block;font-size:11.5px;font-weight:600;padding:2px 7px;border-radius:10px;background:#f1f5f9;color:#334155;border:1px solid #cbd5e1}
.val-badge.tier-1{background:#fef3c7;color:#92400e;border-color:#fde68a}
.val-badge.tier-2{background:#e0e7ff;color:#3730a3;border-color:#c7d2fe}
.val-badge.tier-3{background:#f3f4f6;color:#374151;border-color:#e5e7eb}

.tooltip-box{position:absolute;bottom:calc(100% + 10px);left:50%;transform:translateX(-50%) translateY(4px);width:310px;background:#0f172a;color:#f8fafc;padding:12px 14px;border-radius:8px;font-size:11.5px;line-height:1.45;box-shadow:0 12px 28px rgba(0,0,0,0.3);z-index:9999;pointer-events:none;opacity:0;transition:opacity .18s ease, transform .18s ease;text-align:left}
.tooltip-box::after{content:"";position:absolute;top:100%;left:50%;margin-left:-6px;border-width:6px;border-style:solid;border-color:#0f172a transparent transparent transparent}
.val-wrapper:hover .tooltip-box{opacity:1;pointer-events:auto;transform:translateX(-50%) translateY(0)}

.tooltip-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px}
.tooltip-header strong{font-size:12px;color:#facc15}
.tooltip-tier-badge{font-size:10px;padding:1px 6px;border-radius:4px;background:#334155;color:#94a3b8}
.tooltip-desc{color:#cbd5e1;margin-bottom:8px;font-size:11px}
.tooltip-divider{height:1px;background:#334155;margin:8px 0}
.tooltip-section-title{font-weight:600;color:#94a3b8;margin-bottom:4px;font-size:10.5px;text-transform:uppercase;letter-spacing:0.3px}
.tooltip-specifics{display:flex;flex-direction:column;gap:3px}
.tooltip-item{color:#e2e8f0;font-size:11px}
.tooltip-item b{color:#94a3b8;font-weight:500}

/* Stage tags */
.tag{display:inline-block;font-size:11px;padding:2px 8px;border-radius:10px;background:#eee;font-weight:500}
.st-draft{background:#fef3c7;color:#92400e}
.st-son_approved{background:#e0f2fe;color:#0369a1;font-weight:600}
.st-launched{background:#dcfce7;color:#15803d;font-weight:600}
.st-hold{background:#e2e8f0;color:#475569}
.st-do_not_contact{background:#fee2e2;color:#b91c1c}
.st-reply{background:#fae8ff;color:#86198f;font-weight:600}

/* Action Buttons */
button{font:inherit;padding:7px 14px;border-radius:6px;border:1px solid #0f172a;background:#0f172a;color:#fff;cursor:pointer;transition:all .15s}
button:hover{background:#1e293b}
button.ghost{background:transparent;color:inherit;border-color:#cbd5e1}
button.ghost:hover{background:#f1f5f9;border-color:#94a3b8}
button:disabled{opacity:.4;cursor:not-allowed}

.btn-approve{background:#059669;border-color:#047857;color:#fff;font-weight:600;font-size:12px;padding:5px 11px;border-radius:6px;cursor:pointer;white-space:nowrap;transition:background .15s}
.btn-approve:hover{background:#047857}
.btn-launch{background:#7c3aed;border-color:#6d28d9;color:#fff;font-weight:600;font-size:12px;padding:5px 12px;border-radius:6px;cursor:pointer;white-space:nowrap;transition:background .15s}
.btn-launch:hover{background:#6d28d9}
.btn-save{background:#2563eb;border-color:#1d4ed8;color:#fff;font-weight:500;font-size:12px;padding:5px 12px;border-radius:6px;cursor:pointer}
.btn-save:hover{background:#1d4ed8}

.small-btn{padding:4px 8px;font-size:11px}
.icon-btn{padding:4px 7px;font-size:12px;line-height:1}

.actions-td{text-align:right}
.actions-cell{display:flex;gap:6px;align-items:center;justify-content:flex-end;flex-wrap:nowrap}

/* Detail Row / Inline Accordion */
.detail-row td.detail-cell{background:#f8fafc;padding:16px 20px;border-bottom:2px solid #cbd5e1;box-shadow:inset 0 2px 4px rgba(0,0,0,0.03)}
.detail-box{display:flex;flex-direction:column;gap:12px}

.detail-header{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px;padding-bottom:10px;border-bottom:1px solid #e2e8f0}
.detail-title-group{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.detail-top-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.jurisdiction-tag{background:#e2e8f0;color:#334155;font-weight:500}
.email-badge{font-size:12px;background:#f1f5f9;padding:3px 8px;border-radius:6px;color:#1e293b}

.account-select{font-size:12px;padding:5px 8px;border-radius:6px;background:#fff;border:1px solid #cbd5e1}
.stage-select{font-size:12px;padding:5px 8px;border-radius:6px;background:#fff;border:1px solid #cbd5e1}

/* Detail 3-Card Grid */
.detail-grid{display:grid;grid-template-columns:1.2fr 1fr 1fr;gap:14px}
@media (max-width: 1100px) {
  .detail-grid{grid-template-columns:1fr;gap:14px}
}

.detail-card{background:#fff;border:1px solid #e2e8f0;border-radius:8px;padding:14px 16px;box-shadow:0 1px 3px rgba(0,0,0,0.03);display:flex;flex-direction:column;gap:10px}
.card-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:2px}
.card-head h4{margin:0;font-size:13.5px;color:#0f172a;display:flex;align-items:center;gap:6px}

.guard-pill{font-size:11px;padding:2px 8px;border-radius:12px;font-weight:600}
.guard-pill.ok{background:#dcfce7;color:#15803d}
.guard-pill.warn{background:#fef3c7;color:#92400e}

.approval-stamp{font-size:11.5px;padding:6px 10px;border-radius:6px;line-height:1.4}
.approval-stamp.ok{background:#ecfdf5;border:1px solid #a7f3d0;color:#065f46}
.approval-stamp.err{background:#fef2f2;border:1px solid #fecaca;color:#991b1b}
.approval-stamp.muted{background:#f1f5f9;color:#64748b}

.field-group{display:flex;flex-direction:column;gap:4px}
.field-group label{font-size:11.5px;font-weight:600;color:#475569;text-transform:uppercase;letter-spacing:0.3px}
.subject-input{font-weight:500;font-size:13px}
.body-textarea{min-height:240px;resize:vertical}

/* Draft Save Bar, Accessible Switch Toggle & Keystroke/Edit Counter */
.draft-save-bar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 10px;padding-top:4px;border-top:1px solid #f1f5f9}
.draft-save-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.autosave-toggle{display:inline-flex;align-items:center;gap:7px;font-size:12px;color:#334155;cursor:pointer;user-select:none;padding:4px 9px;border-radius:999px;background:#f8fafc;border:1px solid #e2e8f0;transition:border-color .15s,background .15s}
.autosave-toggle:hover{border-color:#cbd5e1;background:#f1f5f9}
.autosave-switch{appearance:none;-webkit-appearance:none;width:30px;height:17px;border-radius:999px;background:#cbd5e1;border:0;padding:0;margin:0;position:relative;cursor:pointer;transition:background .18s ease;flex-shrink:0}
.autosave-switch::after{content:"";position:absolute;top:2px;left:2px;width:13px;height:13px;border-radius:50%;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,0.22);transition:transform .18s ease}
.autosave-switch:checked{background:#059669}
.autosave-switch:checked::after{transform:translateX(13px)}
.autosave-switch:focus-visible{outline:2px solid #6366f1;outline-offset:2px}
.autosave-state-txt{font-size:11px;color:#64748b}
.autosave-state-txt.is-on{color:#059669}

.draft-save-meta{display:flex;align-items:center;gap:6px 8px;flex-wrap:wrap;font-size:11.5px}
.edit-counter{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;border-radius:999px;font-size:11px;font-weight:500;border:1px solid transparent;white-space:nowrap}
.edit-counter.clean{background:#ecfdf5;color:#047857;border-color:#a7f3d0}
.edit-counter.dirty{background:#fffbeb;color:#b45309;border-color:#fde68a;font-weight:600}
.edit-counter.saving{background:#eff6ff;color:#1d4ed8;border-color:#bfdbfe}
.last-saved-time{color:#475569;font-size:11px;white-space:nowrap}
.last-saved-time b{color:#0f172a;font-weight:600}

.thread-container{min-height:80px;display:flex;flex-direction:column;gap:8px}
.thread-card{border:1px solid #e2e8f0;border-radius:6px;padding:8px 10px;background:#f8fafc;font-size:12px}
.thread-card.reply{border-left:3px solid #7c3aed;background:#fff}
.thread-card-head{display:flex;justify-content:space-between;margin-bottom:4px;color:#64748b;font-size:11px}

.card-divider{height:1px;background:#e2e8f0;margin:6px 0}
.comments-list{display:flex;flex-direction:column;gap:6px;max-height:160px;overflow:auto}
.comment-item{background:#f8fafc;border:1px solid #e2e8f0;border-radius:6px;padding:6px 8px;font-size:12px}
.comment-item.done{opacity:.5}
.comment-input-row{display:flex;gap:6px;margin-top:4px}
.comment-input-row input{flex:1;font-size:12px;padding:5px 8px}

.info-block{display:flex;flex-direction:column;gap:3px;font-size:12px}
.info-label{font-size:11px;font-weight:600;color:#64748b;text-transform:uppercase;letter-spacing:0.3px}
.info-value{color:#1e293b;line-height:1.4}
.audit-list{max-height:120px;overflow:auto;line-height:1.5}

/* Drawer fallback */
aside{position:fixed;inset:0;background:rgba(0,0,0,0.45);display:flex;justify-content:flex-end;z-index:9999}
.drawer{width:min(760px,100%);background:#fff;height:100%;overflow:auto;padding:24px;position:relative;box-shadow:-4px 0 24px rgba(0,0,0,0.15)}
.close{position:absolute;right:16px;top:16px;font-size:18px;width:32px;height:32px;display:grid;place-items:center;padding:0;border-radius:50%}

/* Status banners */
.warn{color:#b45309}.err{color:#b91c1c}.ok{color:#15803d}.muted{color:#64748b}.small{font-size:11.5px}
.box{border:1px solid #e2e8f0;border-radius:8px;padding:10px;margin:8px 0;background:#fcfcfc}
.row{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:6px 0}

/* Legacy fallback classes */
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}
.grid .box b{font-size:22px;display:block}
.login{display:grid;place-items:center;height:100vh}
.card{background:#fff;padding:28px;border-radius:12px;width:320px;display:grid;gap:12px;box-shadow:0 4px 24px #0001}

/* Gmail Unified Inbox Architecture */
.gmail-inbox-section{width:100%;margin-top:4px}
.gmail-app-container{display:grid;grid-template-columns:230px 1fr;background:#fff;border:1px solid #e2e8f0;border-radius:12px;box-shadow:0 1px 4px rgba(0,0,0,0.04);min-height:640px;overflow:hidden}

/* Left Sidebar */
/* The sidebar is an <aside>; undo the generic drawer rule above (position:fixed;inset:0), which made it cover the whole inbox */
.gmail-sidebar{position:static;inset:auto;z-index:auto;justify-content:flex-start;background:#f8fafc;border-right:1px solid #e2e8f0;padding:16px 12px;display:flex;flex-direction:column;gap:14px;user-select:none}
.gmail-compose-btn{display:inline-flex;align-items:center;gap:10px;padding:0 22px;height:46px;border-radius:24px;background:#c2e7ff;color:#001d35;border:none;font-size:13.5px;font-weight:600;cursor:pointer;box-shadow:0 1px 3px rgba(0,0,0,0.1);transition:all .15s}
.gmail-compose-btn:hover{background:#b3defa;box-shadow:0 2px 6px rgba(0,0,0,0.15);transform:translateY(-1px)}
.gmail-compose-icon{flex-shrink:0}

.gmail-nav{display:flex;flex-direction:column;gap:2px}
.gmail-nav-item{display:flex;align-items:center;gap:10px;padding:8px 14px;border-radius:20px;font-size:13px;font-weight:500;color:#475569;background:none;border:none;cursor:pointer;text-align:left;width:100%;transition:background .15s, color .15s}
.gmail-nav-item:hover{background:#e2e8f0;color:#0f172a}
.gmail-nav-item.active{background:#d3e3fd;color:#041e49;font-weight:600}
.gmail-nav-item .nav-icon{font-size:15px;width:20px;display:inline-block;text-align:center}
.gmail-nav-item .nav-label{flex:1}
.gmail-nav-item .nav-badge{font-size:11px;font-weight:600;padding:2px 7px;border-radius:10px;background:rgba(0,0,0,0.06);color:inherit}
.gmail-nav-item.active .nav-badge{background:rgba(4,30,73,0.12);color:#041e49}

.gmail-sidebar-section{display:flex;flex-direction:column;gap:6px;border-top:1px solid #e2e8f0;padding-top:12px;margin-top:4px}
.gmail-section-title{display:flex;justify-content:space-between;align-items:center;font-size:11px;font-weight:700;color:#64748b;text-transform:uppercase;letter-spacing:0.5px;padding:0 8px}
.btn-xs-link{background:none;border:none;font-size:11px;color:#6366f1;cursor:pointer;text-decoration:underline;padding:0}
.btn-xs-link:hover{color:#4f46e5}

.gmail-account-list{display:flex;flex-direction:column;gap:3px}
.account-filter-item{display:flex;align-items:center;gap:8px;padding:6px 10px;border-radius:8px;font-size:12px;color:#334155;cursor:pointer;transition:background .1s}
.account-filter-item:hover{background:#e2e8f0}
.account-filter-item.active{background:#e0e7ff;color:#3730a3;font-weight:600}
.acc-dot{width:7px;height:7px;border-radius:50%;background:#10b981;flex-shrink:0}
.acc-dot.paused{background:#94a3b8}

/* Main Content Area */
.gmail-main{display:flex;flex-direction:column;background:#fff;min-width:0}

/* Topbar */
.gmail-topbar{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:12px 18px;border-bottom:1px solid #f1f5f9;background:#fff}
.gmail-search-bar{display:flex;align-items:center;gap:8px;background:#f1f5f9;border-radius:24px;padding:0 14px;height:40px;flex:1;max-width:540px;border:1px solid transparent;transition:all .15s}
.gmail-search-bar:focus-within{background:#fff;border-color:#6366f1;box-shadow:0 0 0 3px rgba(99,102,241,0.15)}
.gmail-search-bar input{border:none;background:transparent;outline:none;font-size:13px;width:100%;color:#0f172a;padding:0}
.search-icon{font-size:14px;color:#64748b}
.btn-search-clear{background:none;border:none;font-size:12px;color:#94a3b8;cursor:pointer;padding:2px 4px}
.btn-search-clear:hover{color:#0f172a}

.btn-gmail-refresh{display:inline-flex;align-items:center;gap:6px;padding:6px 14px;border-radius:20px;border:1px solid #cbd5e1;background:#fff;color:#334155;font-size:12.5px;font-weight:600;cursor:pointer;transition:all .15s}
.btn-gmail-refresh:hover{background:#f8fafc;border-color:#94a3b8;color:#0f172a}
.btn-gmail-refresh.spinning .refresh-icon{animation:spin 1s linear infinite}
@keyframes spin{100%{transform:rotate(360deg)}}

/* Toolbar */
.gmail-toolbar{display:flex;justify-content:space-between;align-items:center;padding:8px 18px;border-bottom:1px solid #e2e8f0;background:#f8fafc;min-height:42px}
.toolbar-left{display:flex;align-items:center;gap:10px}
.select-box-wrapper{display:flex;align-items:center}
.btn-toolbar-icon{background:none;border:none;font-size:15px;color:#64748b;cursor:pointer;padding:4px 6px;border-radius:4px}
.btn-toolbar-icon:hover{background:#e2e8f0;color:#0f172a}
.toolbar-actions-group{display:flex;align-items:center;gap:6px}
.btn-toolbar-action{font-size:12px;font-weight:500;padding:4px 10px;border-radius:6px;border:1px solid #cbd5e1;background:#fff;color:#334155;cursor:pointer;transition:all .1s}
.btn-toolbar-action:hover{background:#f1f5f9;border-color:#94a3b8;color:#0f172a}
.btn-toolbar-action.danger:hover{background:#fef2f2;border-color:#fca5a5;color:#b91c1c}
.toolbar-right{font-size:12px;color:#64748b}

/* Message List & Rows */
.gmail-content-body{flex:1;display:flex;flex-direction:column;position:relative;overflow:auto}
.gmail-list-view{flex:1;display:flex;flex-direction:column}
.gmail-rows-list{display:flex;flex-direction:column}

.gmail-row{display:flex;align-items:center;gap:10px;padding:9px 16px;border-bottom:1px solid #f1f5f9;cursor:pointer;transition:background .1s, box-shadow .1s;font-size:13px;user-select:none}
.gmail-row:hover{background:#f8fafc;box-shadow:inset 1px 0 0 #dadce0, inset -1px 0 0 #dadce0}
.gmail-row.unread{font-weight:600;background:#fff}
.gmail-row.read{background:#fafafa;color:#475569}
.gmail-row.selected{background:#e0f2fe}

.mail-star{font-size:15px;cursor:pointer;color:#cbd5e1;transition:color .1s;line-height:1}
.mail-star.starred{color:#f59e0b}
.mail-star:hover{transform:scale(1.15)}

.mail-avatar{width:28px;height:28px;border-radius:50%;background:#e0f2fe;color:#0369a1;font-size:11px;font-weight:700;display:grid;place-items:center;flex-shrink:0}
.mail-sender{width:180px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex-shrink:0;color:#0f172a}
.mail-content{flex:1;display:flex;align-items:center;gap:8px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;min-width:0}
.mail-subject{color:#0f172a;flex-shrink:0}
.mail-snippet{color:#64748b;font-weight:normal;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mail-badge-tag{font-size:11px;padding:2px 6px;border-radius:4px;background:#f1f5f9;color:#475569;flex-shrink:0}
.mail-date{width:90px;text-align:right;font-size:12px;color:#64748b;flex-shrink:0}

/* Google-style Empty State */
.gmail-empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:60px 24px;text-align:center;margin:auto}
.empty-graphic-wrapper{position:relative;width:80px;height:80px;border-radius:50%;background:#f1f5f9;display:grid;place-items:center;margin-bottom:14px;box-shadow:0 2px 10px rgba(0,0,0,0.03)}
.empty-tray-icon{font-size:38px}
.empty-sparkle-stars{position:absolute;top:2px;right:2px;font-size:18px;animation:pulse 2s infinite ease-in-out}
@keyframes pulse{0%,100%{transform:scale(1)}50%{transform:scale(1.2)}}
.empty-title{font-size:18px;font-weight:600;color:#0f172a;margin:0 0 6px}
.empty-subtitle{font-size:13.5px;color:#64748b;max-width:440px;line-height:1.5;margin:0 0 20px}
.empty-accounts-status{display:flex;gap:8px;flex-wrap:wrap;justify-content:center;margin-bottom:24px}
.acc-status-chip{display:inline-flex;align-items:center;gap:6px;padding:4px 12px;border-radius:20px;font-size:12px;background:#f8fafc;border:1px solid #e2e8f0;color:#334155}
.empty-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:center}
.btn-empty-action{display:inline-flex;align-items:center;gap:6px;padding:8px 16px;border-radius:20px;font-size:13px;font-weight:600;cursor:pointer;transition:all .15s}
.btn-empty-action.primary{background:#1a73e8;color:#fff;border:none;box-shadow:0 1px 3px rgba(26,115,232,0.3)}
.btn-empty-action.primary:hover{background:#1557b0}
.btn-empty-action.secondary{background:#fff;border:1px solid #cbd5e1;color:#1e293b}
.btn-empty-action.secondary:hover{background:#f8fafc;border-color:#94a3b8}
.btn-empty-action.ghost{background:none;border:none;color:#6366f1;text-decoration:underline}

/* Thread Detail View */
.gmail-thread-view{padding:20px 24px;display:flex;flex-direction:column;gap:16px;background:#fff;min-height:500px}
.thread-header-bar{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #f1f5f9;padding-bottom:12px}
.btn-back-inbox{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border-radius:20px;background:#f1f5f9;border:1px solid #e2e8f0;font-size:12.5px;font-weight:500;color:#334155;cursor:pointer}
.btn-back-inbox:hover{background:#e2e8f0;color:#0f172a}
.thread-actions-bar{display:flex;gap:8px}

.thread-subject-title{font-size:18px;font-weight:600;color:#0f172a;margin:4px 0 0;display:flex;align-items:center;gap:10px;flex-wrap:wrap}

/* Contact Context Card inside Thread */
.thread-contact-card{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px;padding:10px 14px;background:#f0fdf4;border:1px solid #bbf7d0;border-radius:8px;font-size:12.5px}
.contact-card-info{display:flex;align-items:center;gap:8px;flex-wrap:wrap;color:#166534}
.contact-card-info b{font-size:13.5px;color:#0f172a}
.btn-view-pipeline{background:#fff;border:1px solid #86efac;color:#15803d;padding:4px 10px;border-radius:6px;font-size:12px;font-weight:600;cursor:pointer;transition:all .1s}
.btn-view-pipeline:hover{background:#dcfce7}

.thread-message-card{border:1px solid #e2e8f0;border-radius:8px;padding:16px;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,0.03)}
.thread-sender-row{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:12px}
.sender-details{display:flex;gap:10px;align-items:center}
.sender-avatar-lg{width:36px;height:36px;border-radius:50%;background:#e0f2fe;color:#0369a1;font-size:13px;font-weight:700;display:grid;place-items:center}
.sender-meta{display:flex;flex-direction:column;gap:2px}
.sender-name-text{font-size:14px;font-weight:600;color:#0f172a}
.sender-sub-text{font-size:12px;color:#64748b}
.thread-date-text{font-size:12px;color:#64748b}

.thread-message-body{font-size:13.5px;line-height:1.6;color:#1e293b;white-space:pre-wrap;margin:12px 0 16px}
.thread-replies-history{display:flex;flex-direction:column;gap:10px;margin-top:16px}
.reply-bubble{background:#f8fafc;border-left:3px solid #6366f1;border-radius:0 8px 8px 0;padding:12px 14px;font-size:13px}
.reply-bubble-head{display:flex;justify-content:space-between;color:#64748b;font-size:11.5px;margin-bottom:4px}

/* Inline Quick Reply Box */
.thread-reply-composer{border:1px solid #cbd5e1;border-radius:8px;padding:14px;background:#f8fafc;display:flex;flex-direction:column;gap:10px;margin-top:12px}
.reply-header-info{display:flex;align-items:center;gap:10px;font-size:12.5px}
.reply-account-select{padding:4px 8px;font-size:12px;border-radius:6px;background:#fff;border:1px solid #cbd5e1}
.reply-textarea{min-height:120px;border:1px solid #cbd5e1;border-radius:6px;padding:10px;font-size:13px;background:#fff}
.reply-footer{display:flex;justify-content:space-between;align-items:center}

/* Gmail Floating Docked Compose Box */
.docked-compose{position:fixed;bottom:0;right:24px;width:520px;max-width:calc(100vw - 32px);background:#fff;border-radius:10px 10px 0 0;box-shadow:0 8px 30px rgba(0,0,0,0.22);border:1px solid #cbd5e1;border-bottom:none;z-index:99999;display:flex;flex-direction:column;overflow:hidden;font-size:13px;transition:height .2s, width .2s}
.docked-compose.minimized{height:40px;width:280px}
.docked-compose.minimized .docked-compose-body{display:none}
.docked-compose.expanded{width:min(900px, 94vw);height:min(700px, 86vh);bottom:10px;right:10px;border-radius:10px;border-bottom:1px solid #cbd5e1}

.docked-compose-header{background:#0f172a;color:#fff;padding:8px 14px;display:flex;justify-content:space-between;align-items:center;font-weight:600;cursor:pointer;user-select:none}
.docked-title{font-size:13px;letter-spacing:-0.2px}
.docked-controls{display:flex;gap:6px;align-items:center}
.btn-control{background:none;border:none;color:#94a3b8;font-size:14px;cursor:pointer;padding:2px 6px;line-height:1;border-radius:3px}
.btn-control:hover{color:#fff;background:rgba(255,255,255,0.15)}

.docked-compose-body{display:flex;flex-direction:column;flex:1;background:#fff}
.compose-field{display:flex;align-items:center;border-bottom:1px solid #f1f5f9;padding:6px 14px;gap:8px}
.compose-label{font-size:12px;color:#64748b;font-weight:500;width:54px;flex-shrink:0}
.compose-select{flex:1;border:none;background:transparent;outline:none;font-size:12.5px;padding:2px 0}
.compose-to-wrapper{flex:1;position:relative}
.compose-to-wrapper input{width:100%;border:none;background:transparent;outline:none;font-size:12.5px;padding:2px 0}
.compose-field input{flex:1;border:none;background:transparent;outline:none;font-size:12.5px;padding:2px 0}

.compose-contact-dropdown{position:absolute;top:100%;left:0;right:0;max-height:180px;overflow-y:auto;background:#fff;border:1px solid #cbd5e1;border-radius:6px;box-shadow:0 4px 16px rgba(0,0,0,0.12);z-index:1000;margin-top:4px}
.contact-dropdown-item{padding:6px 10px;cursor:pointer;font-size:12px;display:flex;justify-content:space-between;border-bottom:1px solid #f1f5f9}
.contact-dropdown-item:hover{background:#f1f5f9}

.compose-editor{flex:1;display:flex;flex-direction:column;min-height:180px}
.compose-editor textarea{flex:1;border:none;resize:none;outline:none;padding:12px 14px;font-size:13px;line-height:1.5;font-family:inherit}

.docked-compose-footer{padding:8px 14px;border-top:1px solid #f1f5f9;background:#f8fafc;display:flex;justify-content:space-between;align-items:center}
.btn-gmail-send{background:#1a73e8;color:#fff;border:none;border-radius:18px;padding:7px 20px;font-size:13px;font-weight:600;cursor:pointer;transition:all .15s}
.btn-gmail-send:hover{background:#1557b0;box-shadow:0 1px 3px rgba(0,0,0,0.2)}
.btn-icon-danger{background:none;border:none;font-size:15px;color:#94a3b8;cursor:pointer;padding:4px}
.btn-icon-danger:hover{color:#ef4444}
.compose-status{font-size:12px;margin-left:10px}

/* Accounts Grid & Modals */
.accounts-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(360px,1fr));gap:16px}
.account-card{background:#fff;border-radius:12px;padding:20px;border:1px solid #e2e8f0;box-shadow:0 1px 4px rgba(0,0,0,0.04);display:flex;flex-direction:column;gap:12px;position:relative}
.account-card.is-paused{opacity:0.8;background:#fafafa}
.account-header{display:flex;justify-content:space-between;align-items:flex-start;gap:8px}
.account-title-group{display:flex;flex-direction:column;gap:2px}
.account-badge-group{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.account-stat-pill{background:#f8fafc;border:1px solid #e2e8f0;border-radius:6px;padding:6px 10px;display:flex;flex-direction:column;gap:2px;font-size:11px}
.account-stat-pill b{font-size:13px;color:#0f172a}
.test-res-box{border-radius:8px;padding:10px 12px;font-size:11.5px;display:flex;flex-direction:column;gap:4px}
.test-res-box.ok{background:#f0fdf4;border:1px solid #86efac;color:#166534}
.test-res-box.warn{background:#fffbeb;border:1px solid #fde68a;color:#92400e}
.test-res-box.err{background:#fef2f2;border:1px solid #fca5a5;color:#991b1b}

/* Native dialog modals (modern-web-guidance compliant) */
dialog:modal{overscroll-behavior:contain}
dialog::backdrop{overflow:hidden;overscroll-behavior:contain}
dialog.modal{border:none;border-radius:12px;padding:0;max-width:680px;width:95vw;box-shadow:0 24px 48px rgba(0,0,0,0.25);background:#fff;color:#1e293b}
dialog.modal::backdrop{background:rgba(15,23,42,0.65);backdrop-filter:blur(3px)}
.modal-header{padding:14px 20px;border-bottom:1px solid #e2e8f0;display:flex;justify-content:space-between;align-items:center;background:#f8fafc;border-radius:12px 12px 0 0}
.modal-header h3{font-size:15px;color:#0f172a}
.modal-body{padding:20px;max-height:75vh;overflow-y:auto}
.modal-footer{padding:12px 20px;border-top:1px solid #e2e8f0;display:flex;justify-content:flex-end;align-items:center;gap:10px;background:#f8fafc;border-radius:0 0 12px 12px}

/* Industry & Music Type Multi-Select Chips & Pickers */
.tax-cell-wrap{display:flex;flex-direction:column;gap:4px}
.tax-chips-line{display:flex;flex-wrap:wrap;gap:3px;align-items:center}
.tax-chip{display:inline-flex;align-items:center;gap:3px;font-size:10.5px;line-height:1.25;padding:2px 7px;border-radius:999px;font-weight:600;border:1px solid transparent;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tax-chip.ind{background:#eef2ff;color:#3730a3;border-color:#c7d2fe}
.tax-chip.mus{background:#fef3c7;color:#92400e;border-color:#fde68a}
.tax-actions-row{display:flex;align-items:center;gap:4px;flex-wrap:wrap;margin-top:1px}
.tax-edit-pill{background:#f8fafc;color:#475569;border:1px solid #cbd5e1;font-size:10.5px;font-weight:600;padding:1.5px 7px;border-radius:999px;cursor:pointer;line-height:1.3;transition:all .12s}
.tax-edit-pill:hover{background:#e2e8f0;color:#0f172a;border-color:#94a3b8}
.tax-edit-pill.confirmed{background:#ecfdf5;color:#047857;border-color:#a7f3d0}
.tax-confirm-btn{background:#ecfdf5;color:#047857;border:1px solid #a7f3d0;font-size:10.5px;font-weight:700;padding:1.5px 6px;border-radius:999px;cursor:pointer;line-height:1.3;transition:all .12s}
.tax-confirm-btn:hover{background:#d1fae5;border-color:#6ee7b7}
.news-count-pill{display:inline-flex;align-items:center;gap:3px;font-size:10px;font-weight:600;padding:1px 6px;border-radius:999px;background:#f0f9ff;color:#0369a1;border:1px solid #bae6fd;cursor:pointer}
.news-count-pill:hover{background:#e0f2fe}

/* Son's Connection Memory Pills & Notes Card */
.son-mem-pill{display:inline-flex;align-items:center;gap:4px;font-size:11px;font-weight:600;padding:3px 8px;border-radius:999px;cursor:pointer;border:1px solid transparent;line-height:1.25;transition:all .15s;width:fit-content;max-width:100%}
.son-mem-pill.has-mem{background:#ecfdf5;color:#047857;border-color:#86efac}
.son-mem-pill.has-mem:hover{background:#dcfce7;border-color:#4ade80}
.son-mem-pill.needs-mem{background:#fffbeb;color:#b45309;border-color:#fcd34d}
.son-mem-pill.needs-mem:hover{background:#fef3c7;border-color:#fbbf24}

.son-notes-card{background:linear-gradient(180deg,#f0fdf4 0%,#f8fafc 100%);border:1px solid #86efac;border-radius:8px;padding:10px 12px;display:flex;flex-direction:column;gap:6px;font-size:12px}
.son-notes-grid{display:grid;grid-template-columns:1fr;gap:4px}
.son-notes-row{display:flex;gap:6px;line-height:1.4}
.son-notes-row b{color:#065f46;min-width:108px;flex-shrink:0;font-size:11.5px}
.warm-draft-banner{background:#f0fdf4;border:1px solid #86efac;border-radius:8px;padding:10px 12px;margin-bottom:4px;display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px}

/* News, Publications, Releases & Research Links Area */
.news-feed{display:flex;flex-direction:column;gap:7px;max-height:310px;overflow-y:auto;padding-right:2px}
.news-card{background:#f8fafc;border:1px solid #e2e8f0;border-left:3px solid #0284c7;border-radius:7px;padding:8px 10px;display:flex;flex-direction:column;gap:4px;font-size:12px;transition:border-color .12s,background .12s}
.news-card:hover{background:#fff;border-color:#cbd5e1;border-left-color:#0284c7}
.news-card-top{display:flex;align-items:center;justify-content:space-between;gap:6px;flex-wrap:wrap}
.news-badges{display:flex;align-items:center;gap:5px;flex-wrap:wrap}
.news-kind-badge{font-size:10px;font-weight:700;padding:1.5px 6px;border-radius:999px;background:#e0f2fe;color:#0369a1;text-transform:uppercase;letter-spacing:0.25px}
.news-kind-badge.kind-release{background:#ede9fe;color:#6d28d9}
.news-kind-badge.kind-award{background:#fef3c7;color:#b45309}
.news-kind-badge.kind-interview{background:#fce7f3;color:#be185d}
.news-kind-badge.kind-publication{background:#dcfce7;color:#15803d}
.news-date-badge{font-size:10.5px;color:#475569;font-weight:600;background:#fff;border:1px solid #e2e8f0;padding:1px 6px;border-radius:999px}
.news-title-link{font-weight:600;color:#0f172a;text-decoration:none;line-height:1.35;word-break:break-word}
.news-title-link:hover{color:#2563eb;text-decoration:underline}
.news-domain-link{display:inline-flex;align-items:center;gap:3px;font-size:11px;color:#0284c7;text-decoration:none;font-weight:500}
.news-domain-link:hover{text-decoration:underline}
.news-summary{color:#475569;font-size:11.5px;line-height:1.42}

/* Modal Chips & Multi-Select Checkboxes */
.warm-target-banner{background:#f1f5f9;border:1px solid #e2e8f0;border-radius:8px;padding:9px 12px;font-size:12.5px;display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:6px}
.modal-field-label{display:block;font-size:12px;font-weight:700;color:#1e293b;margin-bottom:5px}
.quick-chip-row{display:flex;flex-wrap:wrap;gap:5px;margin-bottom:7px}
.quick-chip{background:#f8fafc;color:#334155;border:1px solid #cbd5e1;border-radius:999px;padding:3px 9px;font-size:11px;font-weight:500;cursor:pointer;transition:all .12s}
.quick-chip:hover{background:#e0e7ff;color:#3730a3;border-color:#a5b4fc}
.quick-chip.active{background:#4f46e5;color:#fff;border-color:#4338ca}
.warm-regen-card{display:flex;align-items:flex-start;gap:10px;padding:11px 13px;background:#ecfdf5;border:1px solid #86efac;border-radius:8px;cursor:pointer;user-select:none}
.warm-regen-card input[type="checkbox"]{margin-top:2px;width:16px;height:16px;accent-color:#059669;flex-shrink:0}

.tax-option-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(155px,1fr));gap:7px}
.tax-opt-label{display:flex;align-items:center;gap:7px;padding:7px 10px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;font-size:12px;font-weight:500;color:#1e293b;cursor:pointer;user-select:none;transition:all .12s}
.tax-opt-label:hover{border-color:#94a3b8;background:#f8fafc}
.tax-opt-label:has(input:checked){background:#eef2ff;border-color:#6366f1;color:#312e81;font-weight:600}
.tax-opt-label.music-opt:has(input:checked){background:#fffbeb;border-color:#f59e0b;color:#78350f;font-weight:600}
.tax-opt-label input{margin:0;accent-color:#4f46e5;flex-shrink:0}
.tax-opt-label.music-opt input{accent-color:#d97706}

/* ───────── Mobile layout (≤760px) ─────────
   Root cause of the "blocker": the header row could not wrap and several blocks had
   fixed min-widths wider than a phone (table 1226px, account cards 360px, inbox 230px
   sidebar), so the page itself became wider than the screen. Fix the causes, then
   clip any remaining stray overflow at the root as a failsafe. */
#queue{overflow-x:auto}
.accounts-grid{grid-template-columns:repeat(auto-fit,minmax(min(360px,100%),1fr))}

@media (max-width:760px){
  html{overflow-x:clip}

  /* Header: brand + user on row 1, tabs as a swipeable strip on row 2 */
  header{flex-wrap:wrap;gap:8px 10px;padding:10px 12px}
  header strong{flex:1;font-size:14px}
  header nav{order:3;flex:1 0 100%;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch;gap:2px}
  header nav::-webkit-scrollbar{display:none}
  header nav button{white-space:nowrap;flex:0 0 auto;padding:6px 10px}
  #me{max-width:40vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  header form button{padding:4px 10px;font-size:12px}

  .todo{padding:10px 12px;gap:6px}
  .todo .pill{font-size:12px;padding:4px 10px}
  main{padding:10px 12px 70px}

  /* Filters: search full width, selects two per row */
  .bar input{min-width:0;flex:1 0 100%}
  .bar select{min-width:0;flex:1 1 calc(50% - 4px);max-width:calc(50% - 4px)}

  /* Pipeline table → cards. The header row stays as a strip of sort chips. */
  #pipeline > div[style*="overflow-x"]{overflow:visible !important}
  #pipeline table{min-width:0;table-layout:auto;background:transparent;box-shadow:none;display:block}
  #pipeline thead{display:block;margin:0 0 8px}
  #pipeline thead tr{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none}
  #pipeline thead tr::-webkit-scrollbar{display:none}
  #pipeline thead th{flex:0 0 auto;width:auto !important;border:1px solid #cbd5e1;border-radius:16px;padding:4px 10px;font-size:11px;background:#fff;white-space:nowrap}
  #pipeline thead th:not([data-sort]){display:none}
  #pipeline tbody{display:block}

  tr.contact-row{display:grid;grid-template-columns:30px minmax(0,1fr) auto;grid-template-areas:
      "tog target value"
      "id  seg    stage"
      ".   music  music"
      ".   hist   hist"
      "act act    act";
    background:#fff;border:1px solid #e2e8f0;border-radius:10px;margin-bottom:10px;padding:8px 6px;box-shadow:0 1px 2px rgba(0,0,0,.04)}
  tr.contact-row.is-expanded{border-color:#6366f1;border-radius:10px 10px 0 0;margin-bottom:0}
  tr.contact-row > td{display:block;width:auto !important;border:0;padding:3px 6px;text-align:left !important;overflow:visible}
  tr.contact-row > td:nth-child(1){grid-area:tog;padding:2px 0}
  tr.contact-row > td.id-cell{grid-area:id;padding:2px 0;text-align:center !important}
  tr.contact-row > td.id-cell b{font-size:10.5px}
  tr.contact-row > td.target-cell{grid-area:target}
  tr.contact-row > td.value-td{grid-area:value;text-align:right !important}
  tr.contact-row > td.segment-cell{grid-area:seg}
  tr.contact-row > td.stage-cell{grid-area:stage;text-align:right !important}
  tr.contact-row > td.music-td{grid-area:music}
  tr.contact-row > td.history-td{grid-area:hist}
  tr.contact-row > td.actions-td{grid-area:act;border-top:1px solid #f1f5f9;margin-top:4px;padding-top:8px}
  .music-cell{flex-direction:row;flex-wrap:wrap;align-items:center;gap:6px}
  .rel-select{max-width:none}
  .small-note{white-space:normal}
  .alt-reps-preview{white-space:normal !important}
  .actions-cell{justify-content:flex-start;flex-wrap:wrap}

  /* Expanded detail sits under its card */
  tr.detail-row{display:block;margin-bottom:10px}
  tr.detail-row > td.detail-cell{display:block;padding:12px;border:1px solid #6366f1;border-top:0;border-radius:0 0 10px 10px}
  #rows > tr:not(.contact-row):not(.detail-row) > td{display:block}

  /* Value tooltip: anchor to the right edge so it never runs off-screen; tap to show */
  .tooltip-box{left:auto;right:0;transform:translateY(4px);width:min(310px,86vw)}
  .val-wrapper:hover .tooltip-box,.val-wrapper:focus-within .tooltip-box{transform:translateY(0)}
  .tooltip-box::after{left:auto;right:14px}

  /* Inbox: folders become a horizontal strip above the list */
  .gmail-app-container{grid-template-columns:minmax(0,1fr);min-height:0}
  .gmail-sidebar,.gmail-main{min-width:0}
  .gmail-sidebar{border-right:0;border-bottom:1px solid #e2e8f0;padding:10px;gap:8px}
  .gmail-compose-btn{height:38px;padding:0 16px;align-self:flex-start}
  .gmail-nav,.gmail-account-list{flex-direction:row;overflow-x:auto;scrollbar-width:none;gap:4px}
  .gmail-nav::-webkit-scrollbar,.gmail-account-list::-webkit-scrollbar{display:none}
  .gmail-nav-item,.account-filter-item{width:auto;flex:0 0 auto;white-space:nowrap;padding:6px 10px}
  .gmail-sidebar-section{padding-top:8px}
  .gmail-topbar{flex-wrap:wrap;padding:10px 12px}
  .gmail-search-bar{max-width:none;flex:1 0 100%}
  .gmail-toolbar{flex-wrap:wrap;gap:6px;padding:8px 12px}
  .gmail-row{padding:9px 10px;gap:8px}
  .mail-sender{width:96px}
  .mail-snippet,.mail-badge-tag{display:none}
  .mail-date{width:52px}
  .gmail-thread-view{padding:14px 12px}
  .thread-sender-row,.reply-footer{flex-wrap:wrap;gap:8px}

  /* Compose: full-width sheet */
  .docked-compose{right:0;width:100%;max-width:100vw;border-radius:10px 10px 0 0}
  .docked-compose.expanded{width:100vw;height:92vh;right:0;bottom:0}

  /* Account modal: fixed-width fields shrink to fit */
  .modal-body .row > div[style*="width"]{width:auto !important;flex:1 1 120px}
  .modal-body{padding:14px}
}


/* ───────── Rich HTML Email Editor & Clickable Links ───────── */
.rte-shell{display:flex;flex-direction:column;border:1px solid #cbd5e1;border-radius:8px;background:#fff;overflow:hidden;transition:border-color .15s,box-shadow .15s}
.rte-shell:focus-within{border-color:#6366f1;box-shadow:0 0 0 3px rgba(99,102,241,.12)}
.rte-shell.is-locked{background:#f8fafc;opacity:.92}
.rte-toolbar{display:flex;align-items:center;gap:4px;flex-wrap:wrap;padding:5px 8px;background:#f8fafc;border-bottom:1px solid #e2e8f0}
.rte-group{display:inline-flex;align-items:center;gap:2px}
.rte-sep{inline-size:1px;align-self:stretch;background:#cbd5e1;margin:3px 3px}
.rte-btn{display:inline-flex;align-items:center;justify-content:center;gap:4px;min-inline-size:28px;min-block-size:28px;padding:3px 7px;border:1px solid transparent;border-radius:5px;background:transparent;color:#334155;font-size:11.5px;font-weight:600;cursor:pointer;line-height:1;transition:background .12s,color .12s,border-color .12s}
.rte-btn:hover:not(:disabled){background:#e2e8f0;color:#0f172a}
.rte-btn:focus-visible{outline:2px solid #4f46e5;outline-offset:1px}
.rte-btn[aria-pressed="true"]{background:#e0e7ff;color:#3730a3;border-color:#818cf8}
.rte-btn:disabled{opacity:.45;cursor:not-allowed}

.rte-link-popover{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;padding:6px 10px;background:#eff6ff;border-bottom:1px solid #bfdbfe;font-size:11.5px;color:#1e3a8a}
.rte-link-popover[hidden]{display:none !important}
.rte-link-popover-url{font-weight:600;color:#1d4ed8;text-decoration:underline;max-width:290px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rte-link-popover-actions{display:inline-flex;align-items:center;gap:5px;flex-wrap:wrap}

.rte-visual{min-height:260px;max-height:520px;overflow-y:auto;padding:12px 14px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;font-size:13.5px;line-height:1.58;color:#0f172a;outline:none;word-break:break-word}
.rte-visual.compose-visual{min-height:190px;max-height:340px}
.rte-visual:empty::before{content:attr(data-placeholder);color:#94a3b8;pointer-events:none}
.rte-visual p{margin:0 0 10px}
.rte-visual p:last-child{margin-bottom:0}
.rte-visual ul,.rte-visual ol{margin:4px 0 12px;padding-left:22px}
.rte-visual li{margin:0 0 4px}
.rte-visual hr{border:none;border-top:1px solid #e2e8f0;margin:14px 0 8px}
.rte-visual a{color:#1d4ed8;text-decoration:underline;text-underline-offset:2px;cursor:pointer;border-radius:3px;padding:0 1px;transition:background .12s}
.rte-visual a:hover{background:#dbeafe;color:#1e40af}

.rte-shell .body-textarea,.rte-shell #composeBodyInput{border:0 !important;border-radius:0 !important;min-height:260px;margin:0;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:12.5px;line-height:1.5;padding:12px;width:100%;resize:vertical;outline:none}
.rte-shell .body-textarea[hidden],.rte-shell #composeBodyInput[hidden],.rte-visual[hidden]{display:none !important}

.draft-links-strip{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-top:6px;padding:6px 9px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:7px;font-size:11px}
.draft-links-strip-label{font-weight:700;color:#475569;white-space:nowrap}
.draft-link-chip{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;border-radius:999px;background:#eff6ff;border:1px solid #bfdbfe;color:#1d4ed8;font-weight:600;text-decoration:none;max-width:250px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;transition:background .12s,border-color .12s}
.draft-link-chip:hover{background:#dbeafe;border-color:#93c5fd;text-decoration:underline}
.draft-link-chip.is-video{background:#fef2f2;border-color:#fecaca;color:#b91c1c}
.draft-link-chip.is-video:hover{background:#fee2e2;border-color:#fca5a5}

.btn-send-now{background:#0284c7;color:#fff;border:1px solid #0369a1;padding:5px 11px;border-radius:6px;font-weight:700;font-size:12px;cursor:pointer;transition:background .12s}
.btn-send-now:hover:not(:disabled){background:#0369a1}
.btn-send-now:disabled{opacity:.5;cursor:not-allowed}
.test-badge{display:inline-flex;align-items:center;gap:3px;padding:1px 6px;border-radius:999px;background:#fef3c7;border:1px solid #fcd34d;color:#92400e;font-size:10px;font-weight:700;letter-spacing:.2px}

.thread-message-body.rich-html p{margin:0 0 10px}
.thread-message-body.rich-html ul,.thread-message-body.rich-html ol{margin:4px 0 12px;padding-left:22px}
.thread-message-body.rich-html li{margin:0 0 4px}
.thread-message-body.rich-html a,.thread-card a.inline-mail-link{color:#1d4ed8;text-decoration:underline}

/* ───────── Multi-Tenant Outreach Import, Language & Office Styles ───────── */
.asr-pill {
  display: inline-flex;
  align-items: center;
  background: rgba(56, 189, 248, 0.16);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.pipeline-actions-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
  padding: 10px 14px;
  background: linear-gradient(90deg, #f8fafc 0%, #f0f9ff 100%);
  border: 1px solid #cbd5e1;
  border-radius: 10px;
}

.pipeline-actions-left,
.pipeline-actions-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-import-primary {
  background: #0284c7;
  color: #fff;
  border: 1px solid #0369a1;
  padding: 7px 14px;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(2, 132, 199, 0.2);
  transition: background 0.15s ease;
}
.btn-import-primary:hover {
  background: #0369a1;
}

.export-dropdown {
  position: relative;
  display: inline-block;
}
.export-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 13px;
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
  background: #fff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 7px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  white-space: nowrap;
  cursor: pointer;
}
.export-trigger-btn:hover,
.export-trigger-btn[aria-expanded="true"] {
  background: #f0f9ff !important;
  border-color: #38bdf8 !important;
  color: #0369a1;
}
.export-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 245px;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.14);
  padding: 5px;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.export-menu[hidden] {
  display: none !important;
}
.export-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 6px;
  text-decoration: none;
  color: #0f172a;
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.12s ease, color 0.12s ease;
}
.export-menu-item:hover {
  background: #f0f9ff;
  color: #0369a1;
}

.deal-val-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #6ee7b7;
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 10.5px;
  font-weight: 700;
  margin-top: 3px;
}

.import-dropzone {
  border: 2px dashed #94a3b8;
  background: #f8fafc;
  border-radius: 10px;
  padding: 20px 16px;
  text-align: center;
  transition: all 0.15s ease;
}
.import-dropzone.dragover {
  border-color: #0284c7;
  background: #e0f2fe;
}

.mapping-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(225px, 1fr));
  gap: 8px;
  max-height: 210px;
  overflow-y: auto;
  padding: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}
.mapping-item {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mapping-col-name {
  font-size: 11px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mapping-item select {
  font-size: 11px;
  padding: 3px 5px;
  width: 100%;
}

.preview-table-wrap {
  max-height: 175px;
  overflow: auto;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
}
.preview-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
.preview-table-wrap th {
  background: #f1f5f9;
  color: #334155;
  padding: 5px 8px;
  position: sticky;
  top: 0;
  font-size: 10.5px;
  white-space: nowrap;
}
.preview-table-wrap td {
  padding: 4px 8px;
  border-top: 1px solid #e2e8f0;
  max-width: 190px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-timeline {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
}
.history-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 3px solid #0284c7;
  border-radius: 6px;
  padding: 7px 9px;
  font-size: 11.5px;
}
.history-item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
}

.custom-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 8px;
  font-size: 11px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 7px 9px;
  margin-top: 4px;
}

/* ───────── Multi-Tenant Outreach Language & Office Styles ───────── */
.lang-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  white-space: nowrap;
}
.lang-pill.bilingual {
  background: #ecfeff;
  color: #0e7490;
  border-color: #a5f3fc;
}

.country-region-line {
  font-size: 11px;
  color: #0369a1;
  font-weight: 600;
  margin-top: 1px;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.office-line {
  font-size: 10.5px;
  color: #64748b;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lang-switcher-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 11px;
  background: linear-gradient(90deg, #f0f9ff 0%, #ecfeff 100%);
  border: 1px solid #bae6fd;
  border-radius: 8px;
  font-size: 11.5px;
}
.lang-switcher-bar select {
  font-size: 11.5px;
  padding: 4px 8px;
  font-weight: 600;
  border-color: #7dd3fc;
  background: #fff;
}

/* ───────── Connected Ecosystem & Verbatim Testimonials Deck ───────── */
.ecosystem-deck {
  margin: 0 0 12px;
  padding: 14px 16px;
  background: linear-gradient(180deg, #f0f9ff 0%, #f8fafc 100%);
  border: 1px solid #bae6fd;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(3, 105, 161, 0.06);
}
.ecosystem-deck-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.ecosystem-stages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.eco-stage-card {
  background: #fff;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  padding: 9px 11px;
  font-size: 11.5px;
  line-height: 1.45;
}
.eco-stage-card p {
  margin: 4px 0 0;
  color: #334155;
  font-size: 11px;
}
.eco-stage-num {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #0284c7;
  margin-bottom: 2px;
}
.ecosystem-quotes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px;
}
.eco-quote-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-left: 3px solid #0284c7;
  border-radius: 8px;
  padding: 8px 11px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
}
.eco-quote-card p {
  margin: 0;
  font-size: 11.2px;
  font-style: italic;
  color: #1e293b;
  line-height: 1.42;
}
.eco-quote-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 10.5px;
  color: #475569;
}
.rte-snippet-select {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid #bae6fd;
  background: #f0f9ff;
  color: #0369a1;
  font-weight: 600;
  max-width: 175px;
  cursor: pointer;
}

/* ───────── Collapsed Old Drafts, R1/R2 Reply Drafts & Auto-Synced Thread Cards ───────── */
.draft-stack{display:flex;flex-direction:column;gap:12px}

.collapsed-draft-card{display:flex;flex-direction:column;gap:6px;padding:10px 12px;background:#f8fafc;border:1px solid #cbd5e1;border-left:4px solid #64748b;border-radius:8px;transition:border-color .15s,background .15s}
.collapsed-draft-card:hover{background:#f1f5f9;border-color:#94a3b8}
.collapsed-draft-card.is-reply-collapsed{border-left-color:#0284c7}
.collapsed-draft-top{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
.collapsed-draft-title{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;font-weight:700;color:#1e293b}
.saved-old-pill{display:inline-flex;align-items:center;gap:3px;padding:1px 7px;border-radius:999px;background:#dcfce7;border:1px solid #86efac;color:#166534;font-size:10.5px;font-weight:700}
.collapsed-draft-meta{font-size:11.5px;color:#475569;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.collapsed-draft-snippet{font-size:11px;color:#64748b;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}

.btn-edit-old-draft{display:inline-flex;align-items:center;gap:4px;padding:4px 10px;border-radius:6px;background:#fff;border:1px solid #94a3b8;color:#0f172a;font-size:11.5px;font-weight:700;cursor:pointer;transition:background .12s,border-color .12s,box-shadow .12s}
.btn-edit-old-draft:hover{background:#eff6ff;border-color:#3b82f6;color:#1d4ed8;box-shadow:0 1px 2px rgba(15,23,42,.06)}

.old-draft-open-box{padding:12px;border:1px solid #94a3b8;border-left:4px solid #475569;border-radius:8px;background:#fcfdff}

.reply-draft-card{display:flex;flex-direction:column;gap:8px;padding:12px;border:1px solid #bae6fd;border-left:4px solid #0284c7;border-radius:9px;background:linear-gradient(180deg,#f0f9ff 0%,#ffffff 64px)}
.reply-draft-card.is-old-open{border:1px solid #cbd5e1;border-left:4px solid #0369a1;background:#fff}
.reply-draft-head{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
.reply-draft-title{display:inline-flex;align-items:center;gap:7px}
.reply-draft-title h4{margin:0;font-size:13.5px;color:#0f172a}
.r-badge{display:inline-flex;align-items:center;justify-content:center;padding:2px 8px;border-radius:999px;background:#0284c7;color:#fff;font-size:11px;font-weight:800;letter-spacing:.3px}
.r-badge.is-sent{background:#475569}

.reply-context-strip{padding:7px 10px;border-radius:6px;background:#f8fafc;border:1px solid #e2e8f0;font-size:11.5px;color:#334155;line-height:1.4}
.reply-context-quote{margin-top:2px;color:#475569;font-style:italic;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}

.reply-route-row{display:grid;grid-template-columns:1fr 1fr;gap:8px}
@media (max-width:900px){.reply-route-row{grid-template-columns:1fr}}
.reply-route-field label{display:block;font-size:10.5px;font-weight:700;color:#475569;text-transform:uppercase;letter-spacing:.3px;margin-bottom:2px}
.reply-route-field input,.reply-route-field select{width:100%;font-size:12px;padding:5px 8px}

.reply-send-bar{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;padding-top:6px;border-top:1px solid #e2e8f0}
.next-reply-waiting-bar{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;padding:9px 12px;border-radius:8px;background:#f8fafc;border:1px dashed #cbd5e1;font-size:11.5px;color:#475569}

.autosync-pill{display:inline-flex;align-items:center;gap:5px;padding:2px 8px;border-radius:999px;background:#f0fdf4;border:1px solid #bbf7d0;color:#15803d;font-size:10.5px;font-weight:700;user-select:none}
.autosync-dot{width:6px;height:6px;border-radius:50%;background:#22c55e;box-shadow:0 0 0 2px rgba(34,197,94,.2)}

.thread-card.outbound{background:#f8fafc;border:1px solid #e2e8f0;border-left:3px solid #6366f1}
.thread-card.inbound-reply{background:#f0fdf4;border:1px solid #bbf7d0;border-left:3px solid #16a34a}
.thread-card.inbound-alert{background:#fef2f2;border:1px solid #fecaca;border-left:3px solid #dc2626}
.thread-dir-pill{display:inline-flex;align-items:center;gap:4px;padding:1px 7px;border-radius:999px;font-size:10.5px;font-weight:700}
.thread-dir-pill.out{background:#e0e7ff;color:#3730a3}
.thread-dir-pill.in{background:#dcfce7;color:#166534}
.thread-meta-line{font-size:11.5px;color:#475569;margin:2px 0 4px}
.thread-subj-line{font-size:11.5px;font-weight:600;color:#1e293b;margin-bottom:5px}
.thread-body-wrap{font-size:12.5px;line-height:1.5;color:#0f172a;background:#fff;border:1px solid rgba(148,163,184,.28);border-radius:6px;padding:8px 10px}
.thread-body-wrap p{margin:0 0 8px}
.thread-body-wrap p:last-child{margin-bottom:0}

.thread-collapsed-extra{margin-top:6px}
.thread-collapsed-extra > summary{display:inline-flex;align-items:center;gap:4px;padding:1px 8px;border-radius:999px;background:#f1f5f9;border:1px solid #cbd5e1;color:#475569;font-size:11px;font-weight:700;cursor:pointer;list-style:none;user-select:none}
.thread-collapsed-extra > summary::-webkit-details-marker{display:none}
.thread-collapsed-extra > summary:hover{background:#e2e8f0;color:#0f172a}
.thread-collapsed-inner{margin-top:6px;padding-left:10px;border-left:2px solid #cbd5e1;font-size:11.5px;color:#64748b}

.thread-outbound-details > summary{cursor:pointer;font-size:11.5px;font-weight:600;color:#4f46e5;user-select:none;margin-top:3px}
.thread-outbound-details[open] > summary{margin-bottom:5px}

/* ───────── Newest-First Thread Accordion (Carrot Expander + Pagination) ───────── */
.thread-card.is-latest{box-shadow:0 1px 3px rgba(15,23,42,.06)}
.thread-card.is-compressed{padding:6px 10px;cursor:pointer;transition:background .12s,border-color .12s}
.thread-card.outbound.is-compressed:hover{background:#f1f5f9;border-color:#cbd5e1}
.thread-card.inbound-reply.is-compressed:hover{background:#dcfce7;border-color:#86efac}
.thread-card.inbound-alert.is-compressed:hover{background:#fee2e2;border-color:#fca5a5}

.thread-compressed-row{display:flex;align-items:center;gap:6px;min-width:0}
.thread-compressed-snippet{flex:1;min-width:0;font-size:11.5px;color:#475569;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.thread-compressed-time{flex-shrink:0;font-size:10.5px;color:#64748b;margin-left:auto;white-space:nowrap}

.thread-carrot-toggle{background:#fff;border:1px solid #cbd5e1;padding:0;width:21px;height:21px;flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;border-radius:5px;cursor:pointer;line-height:1;transition:background .14s,border-color .14s}
.thread-carrot-toggle:hover{background:#eef2ff;border-color:#a5b4fc}
.thread-carrot-toggle.open{background:#eef2ff;border-color:#a5b4fc}
.thread-carrot-toggle .thread-carrot{display:inline-flex;align-items:center;justify-content:center;font-size:11.5px;line-height:1;transform:rotate(0deg)}
.thread-carrot-toggle.open .thread-carrot{transform:rotate(90deg)}
@media (prefers-reduced-motion: no-preference){.thread-carrot-toggle .thread-carrot{transition:transform .18s cubic-bezier(.4,0,.2,1)}}

.thread-latest-pill{display:inline-flex;align-items:center;padding:1px 6px;border-radius:999px;background:#0f172a;color:#fff;font-size:9.5px;font-weight:700;letter-spacing:.25px;text-transform:uppercase}

.thread-pagination{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;padding:6px 8px;margin-top:2px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:6px;font-size:11px;color:#64748b}
.thread-page-info{font-weight:600;color:#475569}
.thread-page-controls{display:inline-flex;align-items:center;gap:4px}
.thread-page-btn{background:#fff;border:1px solid #cbd5e1;color:#334155;font-size:11px;font-weight:600;padding:2px 7px;border-radius:5px;cursor:pointer;line-height:1.35;transition:background .12s,border-color .12s}
.thread-page-btn.is-num{min-width:22px;text-align:center;padding:2px 5px}
.thread-page-btn:hover:not(:disabled){background:#eff6ff;border-color:#93c5fd;color:#1d4ed8}
.thread-page-btn.active{background:#4f46e5;border-color:#4338ca;color:#fff}
.thread-page-btn:disabled{opacity:.42;cursor:default}

/* ───────── Stack Version Badge & Release Notes Modal ───────── */
header button.version-pill-btn{display:inline-flex;align-items:center;gap:5px;padding:3px 9px;border-radius:999px;background:#1e293b;border:1px solid #334155;color:#bae6fd;font-size:11px;font-weight:700;letter-spacing:.2px;cursor:pointer;white-space:nowrap;transition:background .15s,border-color .15s,color .15s}
header button.version-pill-btn:hover{background:#0284c7;border-color:#38bdf8;color:#fff}
.version-meta-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(165px,1fr));gap:8px;margin-bottom:14px}
.version-meta-cell{background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;padding:8px 10px}
.version-meta-label{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.4px;color:#64748b;margin-bottom:2px}
.version-meta-value{font-size:12.5px;font-weight:700;color:#0f172a;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;word-break:break-all}
.version-release-card{border:1px solid #e2e8f0;border-left:4px solid #6366f1;border-radius:8px;padding:10px 12px;background:#fff;margin-bottom:10px}
.version-release-card.is-current{border-left-color:#16a34a;background:linear-gradient(180deg,#f0fdf4 0%,#ffffff 48px)}
.version-release-head{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin-bottom:6px}
.version-release-title{font-size:13px;font-weight:700;color:#0f172a;display:inline-flex;align-items:center;gap:6px;flex-wrap:wrap}
.version-release-date{font-size:11px;color:#64748b;font-weight:600}
.version-release-highlights{margin:0;padding-left:18px;font-size:12px;color:#334155;line-height:1.5}
.version-release-highlights li{margin-bottom:3px}
.version-sync-code{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:11.5px;background:#0f172a;color:#e2e8f0;padding:8px 10px;border-radius:7px;overflow-x:auto;margin-top:8px}

/* ───────── Interactive Visual Report & Campaign Analytics Studio ───────── */
.rpt-studio{display:flex;flex-direction:column;gap:14px;padding-bottom:24px}

.rpt-toolbar{background:#fff;border:1px solid #e2e8f0;border-radius:10px;padding:14px 16px;box-shadow:0 1px 3px rgba(15,23,42,.04);display:flex;flex-direction:column;gap:10px}
.rpt-toolbar-top{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap}
.rpt-filters-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.rpt-filters-row select{font-size:12px;padding:5px 9px;border-radius:6px;background:#f8fafc;border:1px solid #cbd5e1;color:#0f172a;max-width:215px}
.rpt-check-pill{display:inline-flex;align-items:center;gap:5px;padding:4px 9px;border-radius:6px;background:#f8fafc;border:1px solid #cbd5e1;font-size:11.5px;font-weight:600;color:#334155;cursor:pointer;user-select:none}
.rpt-check-pill input{margin:0}

.rpt-active-chips{display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:7px 10px;background:#eef2ff;border:1px solid #c7d2fe;border-radius:8px}
.rpt-filter-chip{display:inline-flex;align-items:center;gap:6px;padding:2px 9px;border-radius:999px;background:#fff;border:1px solid #818cf8;color:#312e81;font-size:11px;cursor:pointer;transition:background .12s}
.rpt-filter-chip:hover{background:#fee2e2;border-color:#fca5a5;color:#991b1b}

.rpt-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
@media (max-width:1100px){.rpt-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:600px){.rpt-kpi-grid{grid-template-columns:1fr}}
.rpt-kpi-card{background:#fff;border:1px solid #e2e8f0;border-radius:9px;padding:11px 13px;box-shadow:0 1px 2px rgba(15,23,42,.03);display:flex;flex-direction:column;gap:4px}
.rpt-kpi-lbl{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.35px;color:#64748b}
.rpt-kpi-val{font-size:22px;font-weight:800;color:#0f172a;line-height:1.15;display:flex;align-items:baseline;gap:5px;flex-wrap:wrap}
.rpt-kpi-unit{font-size:11.5px;font-weight:600;color:#64748b}
.rpt-kpi-meta{font-size:11.5px;color:#475569;margin-bottom:2px}

.rpt-mini-track{width:100%;height:5px;background:#f1f5f9;border-radius:999px;overflow:hidden;margin-top:2px}
.rpt-mini-fill{height:100%;border-radius:999px;transition:width .25s ease}

.rpt-card{background:#fff;border:1px solid #e2e8f0;border-radius:10px;padding:14px 16px;box-shadow:0 1px 3px rgba(15,23,42,.04);display:flex;flex-direction:column;gap:10px;min-width:0}
.rpt-span-full{width:100%}
.rpt-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:8px}
.rpt-card-head h4{margin:0;font-size:14px;color:#0f172a}
.rpt-sub{font-size:11.5px;color:#64748b;margin-top:2px}

.rpt-pie-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
@media (max-width:1280px){.rpt-pie-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:680px){.rpt-pie-grid{grid-template-columns:1fr}}

.rpt-donut-layout{display:flex;flex-direction:column;align-items:center;gap:10px}
.rpt-donut-wrap{width:132px;height:132px;flex-shrink:0}
.rpt-donut-svg{width:100%;height:100%;overflow:visible}
.rpt-donut-seg{cursor:pointer;transition:opacity .15s,stroke-width .15s}
.rpt-donut-seg:hover{opacity:.85}
.rpt-donut-big{font-size:18px;font-weight:800;fill:#0f172a}
.rpt-donut-small{font-size:10px;font-weight:600;fill:#64748b;text-transform:uppercase;letter-spacing:.3px}

.rpt-legend-list{width:100%;display:flex;flex-direction:column;gap:3px}
.rpt-legend-row{width:100%;display:flex;align-items:center;gap:6px;padding:4px 6px;border-radius:6px;background:transparent;border:1px solid transparent;font-size:11.5px;color:#1e293b;cursor:pointer;text-align:left;transition:background .12s,border-color .12s}
.rpt-legend-row:hover{background:#f8fafc;border-color:#e2e8f0}
.rpt-legend-row.active{background:#eef2ff;border-color:#818cf8;font-weight:700}
.rpt-legend-row.is-zero{opacity:.48}
.rpt-legend-swatch{width:9px;height:9px;border-radius:3px;flex-shrink:0}
.rpt-legend-label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rpt-legend-val{flex-shrink:0;font-size:11px;white-space:nowrap}

.rpt-seg-group{display:inline-flex;background:#f1f5f9;border:1px solid #e2e8f0;border-radius:7px;padding:2px;gap:2px}
.rpt-seg-btn{background:transparent;border:none;padding:3px 8px;border-radius:5px;font-size:11px;font-weight:600;color:#475569;cursor:pointer;transition:background .12s,color .12s}
.rpt-seg-btn:hover{color:#0f172a}
.rpt-seg-btn.active{background:#fff;color:#0f172a;box-shadow:0 1px 2px rgba(15,23,42,.08)}

.rpt-series-bar{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.rpt-series-chip{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:999px;background:#f8fafc;border:1px solid #cbd5e1;font-size:11.5px;color:#64748b;cursor:pointer;opacity:.55;transition:all .14s}
.rpt-series-chip.on{opacity:1;background:#fff;color:#0f172a;border-color:var(--chip-color,#6366f1);box-shadow:0 1px 2px rgba(15,23,42,.05)}
.rpt-series-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0}

.rpt-svg-scroll{width:100%;overflow-x:auto}
.rpt-timeline-svg{width:100%;min-width:560px;height:auto;max-height:240px;display:block}
.rpt-day-hit{cursor:pointer}
.rpt-day-hit:hover{fill:rgba(99,102,241,.05)}
.rpt-time-bar,.rpt-line-dot{cursor:pointer}
.rpt-day-callout{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:7px 11px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:7px;font-size:11.5px;color:#334155}

.rpt-grid-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
@media (max-width:980px){.rpt-grid-2{grid-template-columns:1fr}}

.rpt-table-wrap{width:100%;overflow-x:auto;border:1px solid #e2e8f0;border-radius:8px}
.rpt-matrix-table{width:100%;min-width:980px;table-layout:fixed;border-collapse:collapse;box-shadow:none}
.rpt-matrix-table th{background:#f8fafc;font-size:11px;padding:8px 10px}
.rpt-matrix-table td{padding:8px 10px;font-size:12px;vertical-align:middle}
.rpt-matrix-table tr.is-active-slice{background:#eef2ff}
.rpt-slice-link{background:none;border:none;padding:0;display:inline-flex;align-items:center;gap:6px;color:#0f172a;font-size:12.5px;cursor:pointer;text-align:left}
.rpt-slice-link:hover b{color:#4f46e5;text-decoration:underline}
.rpt-dot{width:9px;height:9px;border-radius:50%;flex-shrink:0}

.rpt-val-pill{display:inline-flex;align-items:center;justify-content:center;padding:2px 7px;border-radius:999px;background:#f1f5f9;border:1px solid #cbd5e1;color:#334155;font-size:11px;font-weight:700}
.rpt-val-pill.high{background:#ecfdf5;border-color:#6ee7b7;color:#047857}
.rpt-rate-badge{display:inline-flex;align-items:center;gap:3px;padding:1px 7px;border-radius:999px;background:#f1f5f9;color:#475569;font-size:10.5px;font-weight:700}
.rpt-rate-badge.ok{background:#dcfce7;border:1px solid #86efac;color:#166534}
.rpt-chip-subtle{display:inline-block;padding:2px 7px;border-radius:6px;background:#f0f9ff;border:1px solid #bae6fd;color:#0369a1;font-size:11px;font-weight:600;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

.rpt-hbar-list{display:flex;flex-direction:column;gap:7px}
.rpt-hbar-item{padding:4px 6px;border-radius:6px;border:1px solid transparent;transition:background .12s,border-color .12s}
.rpt-hbar-item:hover{background:#f8fafc}
.rpt-hbar-item.active{background:#eef2ff;border-color:#818cf8}
.rpt-hbar-top{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:3px;font-size:12px}
.rpt-hbar-name{background:none;border:none;padding:0;font-size:12px;font-weight:600;color:#1e293b;cursor:pointer;text-align:left;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rpt-hbar-name:hover{color:#4f46e5;text-decoration:underline}
.rpt-hbar-stats{display:inline-flex;align-items:center;gap:6px;flex-shrink:0;font-size:11.5px}
.rpt-hbar-track{position:relative;height:7px;background:#f1f5f9;border-radius:999px;overflow:hidden;cursor:pointer}
.rpt-hbar-fill{height:100%;border-radius:999px;transition:width .25s ease}
.rpt-hbar-overlay{position:absolute;left:0;top:0;height:100%;background:rgba(16,185,129,.65);border-radius:999px}
.rpt-mini-jump{background:#fff;border:1px solid #cbd5e1;color:#475569;border-radius:4px;padding:0 5px;font-size:10px;cursor:pointer;line-height:1.4}
.rpt-mini-jump:hover{background:#eff6ff;color:#1d4ed8;border-color:#93c5fd}

.rpt-sub-divider{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.4px;color:#64748b;padding-top:6px;border-top:1px solid #e2e8f0}
.rpt-signal-grid{display:flex;flex-direction:column;gap:5px}
.rpt-signal-row{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;padding:6px 8px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:6px;font-size:11.5px}
.rpt-signal-lbl{font-weight:600;color:#1e293b;flex:1;min-width:170px}

.rpt-val-hist{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:6px;height:120px;padding:8px 8px 4px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;align-items:end}
.rpt-hist-col{background:transparent;border:1px solid transparent;border-radius:6px;padding:3px 2px;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:3px;cursor:pointer}
.rpt-hist-col:hover{background:#fff;border-color:#cbd5e1}
.rpt-hist-col.active{background:#eef2ff;border-color:#818cf8}
.rpt-hist-num{font-size:10px;font-weight:700;color:#334155;min-height:12px}
.rpt-hist-bar-area{width:100%;flex:1;display:flex;align-items:flex-end;justify-content:center}
.rpt-hist-bar{width:68%;border-radius:4px 4px 2px 2px;transition:height .2s ease}
.rpt-hist-lbl{font-size:10.5px;font-weight:700;color:#64748b}

.rpt-acc-box{padding:10px 12px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px}

.rpt-feed-list{display:flex;flex-direction:column;gap:8px;max-height:360px;overflow-y:auto;padding-right:2px}
.rpt-feed-item{padding:9px 11px;border-radius:8px;border:1px solid #e2e8f0;background:#f8fafc}
.rpt-feed-item.is-reply{background:#f0fdf4;border-color:#bbf7d0;border-left:3px solid #16a34a}
.rpt-feed-item.is-alert{background:#fef2f2;border-color:#fecaca;border-left:3px solid #dc2626}
.rpt-feed-item.is-comment{background:#f8fafc;border-left:3px solid #6366f1}
.rpt-feed-quote{font-size:12px;color:#334155;font-style:italic;margin-top:4px;line-height:1.4}

.rpt-vtimeline{display:flex;flex-direction:column;gap:0;max-height:360px;overflow-y:auto;padding-left:6px}
.rpt-tl-row{position:relative;display:flex;gap:10px;padding:7px 4px 7px 14px;border-left:2px solid #e2e8f0}
.rpt-tl-dot{position:absolute;left:-6px;top:12px;width:10px;height:10px;border-radius:50%;background:#94a3b8;border:2px solid #fff;box-shadow:0 0 0 1px #cbd5e1}
.rpt-tl-dot.green{background:#16a34a;box-shadow:0 0 0 1px #86efac}
.rpt-tl-dot.blue{background:#0284c7;box-shadow:0 0 0 1px #7dd3fc}
.rpt-tl-dot.purple{background:#8b5cf6;box-shadow:0 0 0 1px #c4b5fd}
.rpt-tl-dot.red{background:#dc2626;box-shadow:0 0 0 1px #fca5a5}
.rpt-tl-body{flex:1;min-width:0;font-size:12px;color:#1e293b}
.rpt-inline-cid{background:none;border:none;padding:0;color:#4f46e5;font-weight:700;font-size:12px;cursor:pointer}
.rpt-inline-cid:hover{text-decoration:underline}

/* ───────── Brand Header & Upper-Right Account / Profile Dropdown ───────── */
.brand-header-btn{display:inline-flex;align-items:center;gap:10px;padding:4px 8px;border-radius:8px;background:transparent;border:1px solid transparent;color:#f8fafc;text-align:left;cursor:pointer;transition:background .15s,border-color .15s}
.brand-header-btn:hover{background:#1e293b;border-color:#334155}
.brand-logo-wrap{width:30px;height:30px;border-radius:7px;background:#1e293b;border:1px solid #334155;display:inline-flex;align-items:center;justify-content:center;overflow:hidden;flex-shrink:0}
.brand-logo-img{width:100%;height:100%;object-fit:contain;display:block}
.brand-logo-emoji{font-size:17px;line-height:1}
.brand-title-col{display:flex;flex-direction:column;line-height:1.15}
.brand-title-col strong{font-size:14.5px;color:#f8fafc;letter-spacing:-0.2px}
.brand-subtext{font-size:10.5px;color:#94a3b8;font-weight:400;max-width:240px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.user-menu-wrap{position:relative;margin-left:auto}
.user-menu-btn{display:inline-flex;align-items:center;gap:8px;padding:5px 11px 5px 6px;border-radius:999px;background:#1e293b;border:1px solid #334155;color:#e2e8f0;cursor:pointer;transition:background .15s,border-color .15s}
.user-menu-btn:hover,.user-menu-btn.on,.user-menu-btn[aria-expanded="true"]{background:#334155;border-color:#6366f1;color:#fff}
.user-avatar-badge{width:24px;height:24px;border-radius:50%;background:#0f172a;border:1px solid #475569;display:inline-flex;align-items:center;justify-content:center;overflow:hidden;font-size:13px;flex-shrink:0}
.user-avatar-img{width:100%;height:100%;object-fit:cover;display:block}
.user-menu-caret{font-size:11px;color:#94a3b8;margin-left:1px}

.user-dropdown{position:absolute;right:0;top:calc(100% + 8px);width:315px;background:#fff;color:#0f172a;border:1px solid #cbd5e1;border-radius:12px;box-shadow:0 14px 34px rgba(15,23,42,.22);padding:8px;z-index:2000}
.user-dropdown-head{display:flex;align-items:center;gap:10px;padding:8px 10px 10px;border-bottom:1px solid #e2e8f0;margin-bottom:6px}
.user-dropdown-avatar{width:36px;height:36px;border-radius:9px;background:#eef2ff;border:1px solid #c7d2fe;display:flex;align-items:center;justify-content:center;font-size:19px;overflow:hidden;flex-shrink:0}
.user-dropdown-title{font-weight:700;font-size:13.5px;color:#0f172a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.user-dropdown-sub{font-size:11px;color:#64748b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.user-dropdown-group{display:flex;flex-direction:column;gap:2px}
.user-dropdown-item{width:100%;display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:8px;background:transparent;border:0;color:#1e293b;text-align:left;cursor:pointer;font:inherit;transition:background .12s}
.user-dropdown-item:hover,.user-dropdown-item.active{background:#eef2ff;color:#312e81}
.user-dropdown-item .udi-icon{font-size:16px;width:22px;text-align:center;flex-shrink:0}
.user-dropdown-item .udi-text{display:flex;flex-direction:column;line-height:1.25;min-width:0}
.user-dropdown-item .udi-text b{font-size:12.5px;font-weight:600}
.user-dropdown-item .udi-text small{font-size:11px;color:#64748b}
.user-dropdown-item.is-danger{color:#dc2626}
.user-dropdown-item.is-danger:hover{background:#fef2f2;color:#991b1b}
.user-logout-form{margin:0}

.user-dropdown-divider{height:1px;background:#e2e8f0;margin:6px 4px}
.user-dropdown-prefs{display:flex;flex-direction:column;gap:7px;padding:4px 8px}
.udp-row{display:flex;align-items:center;justify-content:space-between;gap:8px}
.udp-label{font-size:11.5px;font-weight:600;color:#475569}
.udp-seg{display:inline-flex;background:#f1f5f9;border:1px solid #cbd5e1;border-radius:7px;padding:2px;gap:2px}
.udp-btn{background:transparent;border:0;color:#475569;font-size:11px;font-weight:600;padding:3px 8px;border-radius:5px;cursor:pointer;transition:all .12s}
.udp-btn:hover{color:#0f172a;background:rgba(255,255,255,.6)}
.udp-btn.active{background:#fff;color:#4f46e5;box-shadow:0 1px 2px rgba(15,23,42,.1)}

/* ───────── Settings Sub-Navigation & Business Profile / Pricing Studio ───────── */
.settings-subnav{display:inline-flex;gap:6px;flex-wrap:wrap;padding:5px;background:#e2e8f0;border-radius:10px;margin-bottom:14px}
.settings-subnav-btn{background:transparent;border:0;padding:7px 14px;border-radius:7px;font-size:12.5px;font-weight:600;color:#475569;cursor:pointer;display:inline-flex;align-items:center;gap:6px;transition:all .14s}
.settings-subnav-btn:hover{color:#0f172a;background:rgba(255,255,255,.55)}
.settings-subnav-btn.active{background:#fff;color:#4f46e5;box-shadow:0 1px 3px rgba(15,23,42,.08)}

.biz-studio{display:flex;flex-direction:column;gap:14px;padding-bottom:32px}
.biz-hero-card{background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:18px 20px;box-shadow:0 1px 3px rgba(15,23,42,.05)}
.biz-hero-top{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;flex-wrap:wrap}
.biz-brand-preview{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.biz-logo-stage{width:68px;height:68px;border-radius:14px;background:linear-gradient(135deg,#0f172a,#1e293b);border:2px solid #cbd5e1;display:flex;align-items:center;justify-content:center;overflow:hidden;flex-shrink:0;box-shadow:0 4px 10px rgba(15,23,42,.12)}
.biz-logo-stage-img{width:100%;height:100%;object-fit:contain;background:#fff}
.biz-logo-stage-emoji{font-size:34px;line-height:1}
.biz-eyebrow{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.6px;color:#4f46e5}
.biz-main-title{margin:2px 0 3px;font-size:21px;color:#0f172a;letter-spacing:-.3px}
.biz-tagline{font-size:13px;color:#475569;font-weight:500}
.biz-meta-links{display:flex;gap:12px;flex-wrap:wrap;margin-top:6px;font-size:11.5px;color:#64748b}
.biz-meta-links a{color:#0284c7;text-decoration:none;font-weight:600}
.biz-meta-links a:hover{text-decoration:underline}

.biz-edit-panel{margin-top:16px;padding:15px;background:#f8fafc;border:1px solid #cbd5e1;border-radius:10px}
.biz-edit-section-title{font-weight:700;font-size:12.5px;color:#0f172a;margin-bottom:10px;text-transform:uppercase;letter-spacing:.35px}
.biz-edit-grid-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.biz-edit-grid-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
@media (max-width:860px){.biz-edit-grid-3,.biz-edit-grid-2{grid-template-columns:1fr}}
.biz-edit-panel input,.biz-edit-panel textarea{width:100%}
.biz-edit-footer{display:flex;justify-content:flex-end;align-items:center;gap:10px;margin-top:12px;padding-top:10px;border-top:1px solid #e2e8f0}

.biz-stats-strip{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:10px}
@media (max-width:1250px){.biz-stats-strip{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media (max-width:680px){.biz-stats-strip{grid-template-columns:repeat(2,minmax(0,1fr))}}
.biz-stat-tile{background:#fff;border:1px solid #e2e8f0;border-radius:10px;padding:11px 12px;box-shadow:0 1px 2px rgba(15,23,42,.03)}
.biz-stat-tile.is-crm{background:#eef2ff;border-color:#c7d2fe}
.biz-stat-val{font-size:19px;font-weight:800;color:#0f172a;letter-spacing:-.3px}
.biz-stat-tile.is-crm .biz-stat-val{color:#4338ca}
.biz-stat-lbl{font-size:11.5px;font-weight:700;color:#334155;margin-top:2px}
.biz-stat-sub{font-size:10.5px;color:#64748b;margin-top:2px;line-height:1.3}

.biz-descriptors-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
@media (max-width:980px){.biz-descriptors-grid{grid-template-columns:1fr}}
.biz-card{background:#fff;border:1px solid #e2e8f0;border-radius:11px;padding:16px 18px;box-shadow:0 1px 3px rgba(15,23,42,.04)}
.biz-card-head{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:10px}
.biz-card-head h3{margin:0;font-size:14.5px;color:#0f172a}
.biz-badge{font-size:11px;font-weight:600;padding:2px 9px;border-radius:999px;background:#f1f5f9;border:1px solid #cbd5e1;color:#334155}
.biz-prose{margin:0 0 12px;font-size:13px;line-height:1.58;color:#334155}
.biz-team-callout{padding:10px 12px;border-radius:8px;background:#f8fafc;border:1px solid #e2e8f0;font-size:12px;color:#334155;line-height:1.45}

.biz-bullet-list,.biz-client-list{display:flex;flex-direction:column;gap:8px}
.biz-bullet-item{display:flex;align-items:flex-start;gap:9px;padding:7px 9px;border-radius:8px;background:#f8fafc;border:1px solid #e2e8f0;font-size:12.5px}
.biz-bullet-num{width:20px;height:20px;border-radius:50%;background:#4f46e5;color:#fff;font-size:11px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;margin-top:1px}
.biz-bullet-check{width:20px;height:20px;border-radius:50%;background:#dcfce7;color:#15803d;font-size:11px;font-weight:800;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;margin-top:1px}
.biz-bullet-sub{font-size:11.5px;color:#475569;margin-top:2px;line-height:1.4}

.biz-client-item{padding:8px 10px;border-radius:8px;background:#f8fafc;border:1px solid #e2e8f0}
.biz-client-top{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:12.5px}
.biz-count-pill{font-size:10.5px;font-weight:700;padding:1px 7px;border-radius:999px;background:#eef2ff;border:1px solid #c7d2fe;color:#4338ca}

/* Pricing & Multi-Seat Calculator */
.pricing-calc-box{display:grid;grid-template-columns:1.15fr 1fr;gap:14px;padding:14px;background:#f8fafc;border:1px solid #cbd5e1;border-radius:10px;margin:8px 0 16px}
@media (max-width:1050px){.pricing-calc-box{grid-template-columns:1fr}}
.pricing-calc-title{font-weight:700;font-size:13.5px;color:#0f172a}
.pricing-calc-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:10px}
@media (max-width:560px){.pricing-calc-metrics{grid-template-columns:1fr}}
.pcm-card{background:#fff;border:1px solid #e2e8f0;border-radius:8px;padding:8px 10px;display:flex;flex-direction:column;gap:2px}
.pcm-card.is-highlight{background:#eef2ff;border-color:#818cf8}
.pcm-card.is-savings{background:#f0fdf4;border-color:#86efac}
.pcm-lbl{font-size:10.5px;font-weight:700;text-transform:uppercase;color:#64748b;letter-spacing:.3px}
.pcm-card b{font-size:15px;color:#0f172a}
.pcm-card b.pcm-tier{font-size:12.5px;color:#4338ca}
.pcm-card.is-highlight b{color:#3730a3}
.pcm-card.is-savings b{color:#15803d}
.pcm-card small{font-size:11px;color:#475569}
.pricing-quote-textarea{font-size:12px;line-height:1.45;background:#fff;border:1px solid #cbd5e1;border-radius:8px}
.quick-chip.active-chip{background:#4f46e5;color:#fff;border-color:#4338ca}

.biz-pricing-tables-grid{display:grid;grid-template-columns:1.15fr 1fr;gap:16px;margin-top:6px}
@media (max-width:1080px){.biz-pricing-tables-grid{grid-template-columns:1fr}}
.biz-subtable-title{margin:0 0 8px;font-size:13px;color:#0f172a}
.biz-compact-table{width:100% !important;min-width:0 !important;table-layout:auto !important;box-shadow:none;border:1px solid #e2e8f0}
.biz-compact-table th,.biz-compact-table td{padding:7px 9px;font-size:12px}
.biz-compact-table tr.is-selected-row{background:#eef2ff}
.biz-disc-pill{display:inline-block;padding:1px 6px;border-radius:999px;background:#eff6ff;border:1px solid #bfdbfe;color:#1d4ed8;font-size:10.5px;font-weight:700}
.biz-disc-pill.is-green{background:#dcfce7;border-color:#86efac;color:#15803d}
.biz-edu-banner{padding:9px 11px;border-radius:8px;background:#f0fdf4;border:1px solid #bbf7d0;font-size:12px;color:#166534;line-height:1.45}
.sec-team-pill{padding:5px 10px;border-radius:999px;background:#f8fafc;border:1px solid #cbd5e1;font-size:12px;color:#334155}

/* ───────── Dark Mode Theme (html[data-theme="dark"]) ───────── */
html[data-theme="dark"] body{background:#0b1120;color:#e2e8f0}
html[data-theme="dark"] header{background:#020617;border-bottom:1px solid #1e293b}
html[data-theme="dark"] .todo{background:#0f172a;border-bottom-color:#1e293b}
html[data-theme="dark"] .todo-stat-card.is-attention{background:linear-gradient(180deg,#291d09 0%,#1f1607 100%);border-color:#b45309;border-left-color:#f59e0b;color:#fde68a}
html[data-theme="dark"] .todo-stat-card.is-attention .todo-stat-num{color:#fef3c7}
html[data-theme="dark"] .todo-stat-card.is-attention .todo-stat-label{color:#fcd34d}
html[data-theme="dark"] .todo-stat-card.is-attention .todo-status-pill{background:rgba(245,158,11,0.18);color:#fbbf24;border-color:rgba(245,158,11,0.35)}
html[data-theme="dark"] .todo-stat-card.is-done{background:linear-gradient(180deg,#072619 0%,#051c13 100%);border-color:#047857;border-left-color:#10b981;color:#a7f3d0}
html[data-theme="dark"] .todo-stat-card.is-done .todo-stat-num{color:#ecfdf5}
html[data-theme="dark"] .todo-stat-card.is-done .todo-stat-label{color:#6ee7b7}
html[data-theme="dark"] .todo-stat-card.is-done .todo-status-pill{background:rgba(16,185,129,0.18);color:#34d399;border-color:rgba(16,185,129,0.35)}
html[data-theme="dark"] .todo-stat-card.is-loading{background:linear-gradient(180deg,#1e293b 0%,#0f172a 100%);border-color:#334155;border-left-color:#64748b;color:#cbd5e1}
html[data-theme="dark"] .todo-stat-card.is-loading .todo-stat-num{color:#94a3b8}
html[data-theme="dark"] .todo-stat-card.is-loading .todo-stat-label{color:#cbd5e1}
html[data-theme="dark"] .todo-stat-card.is-loading .todo-status-pill{background:rgba(148,163,184,0.16);color:#cbd5e1;border-color:rgba(148,163,184,0.3)}
html[data-theme="dark"] .todo-stat-card.is-active{box-shadow:0 0 0 3px #818cf8,0 6px 16px rgba(0,0,0,0.45) !important}
html[data-theme="dark"] th[data-sort]:hover{background:#1e293b;color:#f8fafc}
html[data-theme="dark"] th[data-sort].is-sorted{background:#1e1b4b;color:#e0e7ff;border-bottom-color:#818cf8}
html[data-theme="dark"] th[data-sort].is-sorted .sort-icon{color:#a5b4fc}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea{background:#0f172a;color:#e2e8f0;border-color:#334155}
html[data-theme="dark"] table,
html[data-theme="dark"] .box,
html[data-theme="dark"] .card,
html[data-theme="dark"] .biz-card,
html[data-theme="dark"] .biz-hero-card,
html[data-theme="dark"] .biz-stat-tile,
html[data-theme="dark"] .rpt-toolbar,
html[data-theme="dark"] .rpt-kpi-card,
html[data-theme="dark"] .rpt-card,
html[data-theme="dark"] .account-card,
html[data-theme="dark"] .modal,
html[data-theme="dark"] .drawer,
html[data-theme="dark"] .gmail-app-container,
html[data-theme="dark"] .user-dropdown{background:#111827;color:#e2e8f0;border-color:#1f2937}

html[data-theme="dark"] th{background:#0f172a;color:#94a3b8;border-bottom-color:#1f2937}
html[data-theme="dark"] td{border-bottom-color:#1f2937}
html[data-theme="dark"] tr.contact-row:hover{background:#1e293b}
html[data-theme="dark"] tr.contact-row.is-expanded{background:#172554}
html[data-theme="dark"] .detail-cell{background:#0f172a}

html[data-theme="dark"] .biz-main-title,
html[data-theme="dark"] .biz-card-head h3,
html[data-theme="dark"] .biz-subtable-title,
html[data-theme="dark"] .biz-stat-val,
html[data-theme="dark"] .rpt-kpi-val,
html[data-theme="dark"] .rpt-card-head h3,
html[data-theme="dark"] .user-dropdown-title,
html[data-theme="dark"] .pricing-calc-title{color:#f8fafc}

html[data-theme="dark"] .biz-prose,
html[data-theme="dark"] .biz-tagline,
html[data-theme="dark"] .biz-bullet-sub,
html[data-theme="dark"] .biz-stat-lbl,
html[data-theme="dark"] .udp-label{color:#cbd5e1}

html[data-theme="dark"] .biz-bullet-item,
html[data-theme="dark"] .biz-client-item,
html[data-theme="dark"] .biz-team-callout,
html[data-theme="dark"] .biz-edit-panel,
html[data-theme="dark"] .pricing-calc-box,
html[data-theme="dark"] .pcm-card,
html[data-theme="dark"] .rpt-feed-item,
html[data-theme="dark"] .rpt-mailbox-card,
html[data-theme="dark"] .collapsed-draft-card,
html[data-theme="dark"] .thread-msg,
html[data-theme="dark"] .rte-wrap,
html[data-theme="dark"] .rte-toolbar{background:#0f172a;border-color:#334155;color:#e2e8f0}

html[data-theme="dark"] .rte-visual{background:#0b1120;color:#f1f5f9}
html[data-theme="dark"] .pcm-card b{color:#f8fafc}
html[data-theme="dark"] .pcm-card.is-highlight{background:#1e1b4b;border-color:#4f46e5}
html[data-theme="dark"] .pcm-card.is-highlight b,
html[data-theme="dark"] .pcm-card b.pcm-tier{color:#a5b4fc}
html[data-theme="dark"] .pcm-card.is-savings{background:#052e16;border-color:#16a34a}
html[data-theme="dark"] .pcm-card.is-savings b{color:#86efac}
html[data-theme="dark"] .biz-edu-banner{background:#052e16;border-color:#166534;color:#bbf7d0}
html[data-theme="dark"] .biz-stat-tile.is-crm{background:#1e1b4b;border-color:#4338ca}
html[data-theme="dark"] .biz-stat-tile.is-crm .biz-stat-val{color:#a5b4fc}
html[data-theme="dark"] .settings-subnav,
html[data-theme="dark"] .udp-seg{background:#0f172a;border:1px solid #334155}
html[data-theme="dark"] .settings-subnav-btn,
html[data-theme="dark"] .udp-btn{color:#94a3b8}
html[data-theme="dark"] .settings-subnav-btn.active,
html[data-theme="dark"] .udp-btn.active{background:#1e293b;color:#a5b4fc}
html[data-theme="dark"] .user-dropdown-head,
html[data-theme="dark"] .user-dropdown-divider{border-color:#1f2937;background:transparent}
html[data-theme="dark"] .user-dropdown-item{color:#e2e8f0}
html[data-theme="dark"] .user-dropdown-item:hover,
html[data-theme="dark"] .user-dropdown-item.active{background:#1e293b;color:#a5b4fc}
.user-menu-wrap{position:relative;margin-left:0}
html[data-theme="dark"] .ghost{background:#1e293b;color:#e2e8f0;border-color:#334155}
html[data-theme="dark"] .ghost:hover{background:#334155}

/* --- Send Queue Studio & Automated Follow-Up Engine --- */
.q-studio{display:flex;flex-direction:column;gap:14px;padding-bottom:28px}
.q-top-header{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;flex-wrap:wrap;background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:16px 18px}
.q-kpi-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(215px,1fr));gap:12px}
.q-kpi-card{background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:14px 16px;display:flex;flex-direction:column;gap:4px}
.q-kpi-card.highlight{background:linear-gradient(135deg,#f0f9ff 0%,#eef2ff 100%);border-color:#bae6fd}
.q-kpi-label{font-size:11.5px;font-weight:700;text-transform:uppercase;letter-spacing:.4px;color:#475569}
.q-kpi-val{font-size:22px;font-weight:800;color:#0f172a;display:flex;align-items:baseline;gap:6px}
.q-kpi-unit{font-size:12px;font-weight:600;color:#64748b}
.q-kpi-sub{font-size:11.5px;color:#475569;line-height:1.45}
.q-override-tag{display:inline-block;background:#dbeafe;color:#1d4ed8;font-weight:700;font-size:10px;padding:1px 6px;border-radius:99px;margin-left:4px}

.q-controls-card{background:#fff;border:1px solid #cbd5e1;border-radius:12px;padding:16px 18px;box-shadow:0 1px 3px rgba(15,23,42,.04)}
.q-controls-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(285px,1fr));gap:18px}
.q-ctrl-block{display:flex;flex-direction:column;gap:4px;padding:4px 0}
.q-ctrl-title{font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.4px;color:#0f172a;margin-bottom:6px;border-bottom:1px solid #f1f5f9;padding-bottom:5px}
.q-ctrl-row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.q-label{display:block;font-size:11px;font-weight:600;color:#475569;margin-bottom:4px}
.q-check-line{display:flex;align-items:flex-start;gap:7px;font-size:12px;color:#1e293b;cursor:pointer;line-height:1.4}
.q-check-line input{margin-top:2px}
.q-sender-pool-list{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.q-sender-chip{display:inline-flex;align-items:center;gap:6px;padding:5px 9px;border-radius:8px;border:1px solid #cbd5e1;background:#f8fafc;font-size:11.5px;cursor:pointer}
.q-sender-chip.active{border-color:#93c5fd;background:#eff6ff}
.q-controls-footer{display:flex;justify-content:flex-end;align-items:center;gap:12px;margin-top:14px;padding-top:12px;border-top:1px solid #f1f5f9}

.q-filter-card{background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:12px 14px;display:flex;flex-direction:column;gap:10px}
.q-view-tabs{display:flex;gap:6px;flex-wrap:wrap;border-bottom:1px solid #f1f5f9;padding-bottom:10px}
.q-vtab{background:#f8fafc;border:1px solid #e2e8f0;border-radius:999px;padding:6px 12px;font-size:12px;font-weight:600;color:#475569;cursor:pointer;display:inline-flex;align-items:center;gap:6px}
.q-vtab:hover{background:#f1f5f9;color:#0f172a}
.q-vtab.on{background:#0f172a;border-color:#0f172a;color:#fff}
.q-vbadge{background:rgba(100,116,139,.16);color:inherit;border-radius:99px;padding:1px 7px;font-size:11px;font-weight:700}
.q-vtab.on .q-vbadge{background:rgba(255,255,255,.22);color:#fff}
.q-vbadge.warn{background:#fef3c7;color:#b45309}
.q-vtab.on .q-vbadge.warn{background:#f59e0b;color:#fff}
.q-filter-bar{display:flex;gap:8px;flex-wrap:wrap;align-items:center}

.q-table-wrap{background:#fff;border:1px solid #e2e8f0;border-radius:12px;overflow-x:auto}
.q-main-table{width:100%;border-collapse:collapse}
.q-main-table th{background:#f8fafc;font-size:11px;text-transform:uppercase;letter-spacing:.4px;color:#475569;padding:10px 12px;border-bottom:1px solid #e2e8f0;text-align:left}
.q-main-table td{padding:11px 12px;border-bottom:1px solid #f1f5f9;vertical-align:top;font-size:12.5px}
.q-group-header-row td{background:#f1f5f9;padding:8px 12px;font-size:12px;color:#1e293b;border-bottom:1px solid #e2e8f0}
.q-empty-cell{padding:32px 18px!important;text-align:center;color:#64748b;font-size:13px}
.q-contact-link{color:#0f172a;text-decoration:none}
.q-contact-link:hover{color:#2563eb;text-decoration:underline}
.q-val-chip{background:#fef9c3;color:#854d0e;border:1px solid #fde047;border-radius:6px;padding:1px 5px;font-size:10.5px;font-weight:700}
.q-from-addr{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;font-weight:700;color:#0369a1}
.q-body-snip{max-width:430px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:2px}

.q-kind-pill,.q-status-pill{display:inline-flex;align-items:center;gap:4px;padding:3px 8px;border-radius:999px;font-size:11px;font-weight:700;white-space:nowrap}
.q-kind-pill.initial{background:#eff6ff;color:#1d4ed8;border:1px solid #bfdbfe}
.q-kind-pill.followup{background:#f5f3ff;color:#6d28d9;border:1px solid #ddd6fe}
.q-kind-pill.reply{background:#e0f2fe;color:#0369a1;border:1px solid #bae6fd}
.q-kind-pill.timer{background:#f0fdf4;color:#15803d;border:1px solid #bbf7d0}

/* Inbox Reply Schedule & Save for Approval Controls */
.btn-reply-schedule{background:#eff6ff;color:#1d4ed8;border:1px solid #93c5fd;border-radius:999px;padding:8px 16px;font-size:13px;font-weight:600;cursor:pointer;transition:all .15s}
.btn-reply-schedule:hover{background:#dbeafe;border-color:#60a5fa}
.btn-reply-approval{background:#fffbeb;color:#b45309;border:1px solid #fcd34d;border-radius:999px;padding:8px 16px;font-size:13px;font-weight:600;cursor:pointer;transition:all .15s}
.btn-reply-approval:hover{background:#fef3c7;border-color:#f59e0b}
.reply-schedule-drawer{background:#f8fafc;border:1px solid #cbd5e1;border-radius:10px;padding:12px 14px;margin:8px 0}
.reply-schedule-top{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px}
.reply-staged-banner{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px;padding:10px 14px;border-radius:10px;margin-bottom:10px;font-size:12.5px;border:1px solid #cbd5e1;background:#f8fafc}
.reply-staged-banner.status-pending_approval{background:#fffbeb;border-color:#fcd34d;color:#92400e}
.reply-staged-banner.status-approved{background:#f0fdf4;border-color:#86efac;color:#166534}
.reply-staged-banner.status-scheduled{background:#eff6ff;border-color:#93c5fd;color:#1e40af}
html[data-theme="dark"] .reply-schedule-drawer,
html[data-theme="dark"] .reply-staged-banner{background:#0f172a;border-color:#334155;color:#e2e8f0}
html[data-theme="dark"] .btn-reply-schedule{background:#1e3a8a;color:#bfdbfe;border-color:#2563eb}
html[data-theme="dark"] .btn-reply-approval{background:#78350f;color:#fde68a;border-color:#d97706}

/* Inbox Date, Category & Read Filter Controls */
.inbox-filter-controls{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.inbox-mini-select{font-size:12px;padding:4px 8px;border-radius:7px;border:1px solid #cbd5e1;background:#fff;color:#334155;max-width:175px;cursor:pointer}
.inbox-custom-dates{display:inline-flex;align-items:center;gap:4px}
.inbox-mini-date{font-size:11.5px;padding:3px 6px;border-radius:6px;border:1px solid #cbd5e1}
html[data-theme="dark"] .inbox-mini-select,
html[data-theme="dark"] .inbox-mini-date{background:#0f172a;border-color:#334155;color:#e2e8f0}

.q-status-pill.queued{background:#dbeafe;color:#1e40af}
.q-status-pill.unapproved{background:#fef3c7;color:#b45309;border:1px solid #fcd34d}
.q-status-pill.approved{background:#dcfce7;color:#166534}
.q-status-pill.timer{background:#f1f5f9;color:#334155;border:1px solid #cbd5e1}
.q-status-pill.sent{background:#dcfce7;color:#15803d}
.q-status-pill.failed{background:#fee2e2;color:#b91c1c}
.q-status-pill.cancelled{background:#f1f5f9;color:#64748b}
.quick-chip.on{background:#0f172a;color:#fff;border-color:#0f172a}

html[data-theme="dark"] .q-top-header,
html[data-theme="dark"] .q-kpi-card,
html[data-theme="dark"] .q-controls-card,
html[data-theme="dark"] .q-filter-card,
html[data-theme="dark"] .q-table-wrap{background:#1e293b;border-color:#334155}
html[data-theme="dark"] .q-kpi-card.highlight{background:linear-gradient(135deg,#0f172a 0%,#1e293b 100%);border-color:#0284c7}
html[data-theme="dark"] .q-kpi-val,
html[data-theme="dark"] .q-ctrl-title,
html[data-theme="dark"] .q-contact-link,
html[data-theme="dark"] .q-check-line{color:#f8fafc}
html[data-theme="dark"] .q-kpi-label,
html[data-theme="dark"] .q-kpi-sub,
html[data-theme="dark"] .q-label{color:#94a3b8}
html[data-theme="dark"] .q-main-table th,
html[data-theme="dark"] .q-group-header-row td{background:#0f172a;color:#cbd5e1;border-color:#334155}
html[data-theme="dark"] .q-main-table td{border-color:#334155}
html[data-theme="dark"] .q-vtab{background:#0f172a;border-color:#334155;color:#cbd5e1}
html[data-theme="dark"] .q-vtab.on{background:#38bdf8;border-color:#38bdf8;color:#0f172a}
html[data-theme="dark"] .q-sender-chip{background:#0f172a;border-color:#334155;color:#e2e8f0}
html[data-theme="dark"] .q-from-addr{color:#38bdf8}

/* --- Stats Mode Switcher (Shellcatch Market Intelligence + Report Studio) --- */
.stats-mode-switcher{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:10px 14px;margin-bottom:12px;background:#fff;border:1px solid #e2e8f0;border-radius:10px;box-shadow:0 1px 2px rgba(15,23,42,.04)}
html[data-theme="dark"] .stats-mode-switcher{background:#1e293b;border-color:#334155}
html[data-theme="dark"] .pipeline-actions-bar{background:linear-gradient(90deg,#0f172a 0%,#1e293b 100%);border-color:#334155}
html[data-theme="dark"] .export-trigger-btn{background:#1e293b !important;border-color:#475569 !important;color:#f8fafc}
html[data-theme="dark"] .export-trigger-btn:hover,
html[data-theme="dark"] .export-trigger-btn[aria-expanded="true"]{background:#0f172a !important;border-color:#38bdf8 !important;color:#38bdf8}
html[data-theme="dark"] .export-menu{background:#1e293b;border-color:#475569;box-shadow:0 12px 28px rgba(0,0,0,.45)}
html[data-theme="dark"] .export-menu-item{color:#e2e8f0}
html[data-theme="dark"] .export-menu-item:hover{background:#0f172a;color:#38bdf8}
