/* Panel theme only. Widget preview theme belongs to the merchant, not this preference. */
.theme-picker{display:flex;align-items:center;gap:7px;margin:0;font-size:12px;white-space:nowrap}
.theme-picker select{width:auto;max-width:126px;padding:7px 24px 7px 9px;font-size:12px;min-height:36px}
.mobile-dialog .theme-picker{padding:16px 0;justify-content:space-between}
:root[data-theme="dark"]{--canvas:#14151c;--card:#1d2029;--ink:#eef0f7;--muted:#aab3c3;--line:#363b4b;--forest:#181923;--forest-deep:#11121a;--accent:#a6e2c5;--mint:#263d36;--gold:#efc979;--shadow:0 8px 28px #0002;color-scheme:dark}
[data-theme="dark"] input,[data-theme="dark"] textarea,[data-theme="dark"] select{background:#181c25;color:var(--ink);border-color:#495268}
[data-theme="dark"] input::placeholder,[data-theme="dark"] textarea::placeholder{color:#a5aebe}
[data-theme="dark"] .primary{background:#b7ef85;color:#162313}
[data-theme="dark"] .primary:hover{background:#cafa9f}
[data-theme="dark"] .secondary,[data-theme="dark"] .small-button{background:#272e3a;color:#edf1f7;border-color:#495367}
[data-theme="dark"] .secondary:hover,[data-theme="dark"] .small-button:hover{background:#344052}
[data-theme="dark"] .eyebrow,[data-theme="dark"] .hero-label{color:#bad7c8}
[data-theme="dark"] .topbar{background:#1b1e27ed}
[data-theme="dark"] .search-button,[data-theme="dark"] .search-button kbd{background:#272d39;border-color:var(--line);color:var(--muted)}
[data-theme="dark"] .topbar-actions>.icon-button,[data-theme="dark"] .help-button{color:var(--ink);border-color:var(--line)}
[data-theme="dark"] .hero,[data-theme="dark"] .start-banner,[data-theme="dark"] .subscription-hero{background:#233830;border-color:#405447}
[data-theme="dark"] .hero-copy>p,[data-theme="dark"] .start-banner p,[data-theme="dark"] .subscription-hero p{color:#c0cfc5}
[data-theme="dark"] .hero-actions .btn.primary{background:#b7ef85;color:#162313}
[data-theme="dark"] .hero-art{background:radial-gradient(ellipse at center,#3d594355,transparent 65%)}
[data-theme="dark"] .art-node{background:#293e33;border-color:#506450}
[data-theme="dark"] .art-caption{color:#b8d0a5}
[data-theme="dark"] .metric-card,[data-theme="dark"] .date-pill,[data-theme="dark"] .skip-link,[data-theme="dark"] dialog{background:var(--card);color:var(--ink);border-color:var(--line)}
[data-theme="dark"] .metric-label,[data-theme="dark"] .metric-card>small,[data-theme="dark"] .fine-print,[data-theme="dark"] .setup-row small,[data-theme="dark"] .plan-teaser>p,[data-theme="dark"] .status-card>p,[data-theme="dark"] .source-name small,[data-theme="dark"] .source-date,[data-theme="dark"] .source-table-head,[data-theme="dark"] .start-step>p,[data-theme="dark"] .plan-description,[data-theme="dark"] .plan-terms,[data-theme="dark"] .usage-meter>div>span,[data-theme="dark"] .usage-meter strong>span,[data-theme="dark"] .conversation-copy small,[data-theme="dark"] .conversation-meta>small{color:var(--muted)}
[data-theme="dark"] .plan-teaser,[data-theme="dark"] .subscription-note,[data-theme="dark"] .safety-strip,[data-theme="dark"] .tip-card,[data-theme="dark"] .knowledge-summary{background:#25322d;border-color:#44564a;color:#d3e3d8}
[data-theme="dark"] .safety-strip p,[data-theme="dark"] .tip-card p{color:#bacdc0}
[data-theme="dark"] .badge{background:#303747;color:#dce2ed}
[data-theme="dark"] .badge.green{background:#264735;color:#b6ebc5}
[data-theme="dark"] .badge.amber{background:#4a3b1e;color:#ffe0a2}
[data-theme="dark"] .step-number,[data-theme="dark"] .step-icon,[data-theme="dark"] .source-icon,[data-theme="dark"] .conversation-avatar,[data-theme="dark"] .empty-icon{background:#2b3b30;border-color:#465848;color:#c5dfbb}
[data-theme="dark"] .setup-row,[data-theme="dark"] .source-row,[data-theme="dark"] .source-table-head,[data-theme="dark"] .conversation-row,[data-theme="dark"] .plan-features,[data-theme="dark"] .plan-terms{border-color:var(--line)}
[data-theme="dark"] .empty-state{background:none;border-color:#465448}
[data-theme="dark"] .empty-state p{color:var(--muted)}
[data-theme="dark"] progress,[data-theme="dark"] progress::-webkit-progress-bar{background:#3b483c}
[data-theme="dark"] progress::-webkit-progress-value{background:#a8d894}
[data-theme="dark"] progress::-moz-progress-bar{background:#a8d894}
[data-theme="dark"] .login-layout{background:var(--canvas)}
[data-theme="dark"] .login-story{background:#20212d}
[data-theme="dark"] .login-help{border-color:var(--line)}
[data-theme="dark"] .login-help p,[data-theme="dark"] .mfa-details{color:var(--muted)}
[data-theme="dark"] .form-error{background:#40282c;border-color:#90525b;color:#ffd2d8}
[data-theme="dark"] .command-dialog .nav-link,[data-theme="dark"] .mobile-dialog .nav-link{color:var(--ink)}
[data-theme="dark"] .command-dialog .nav-link:hover,[data-theme="dark"] .mobile-dialog .nav-link:hover{background:#354235}
[data-theme="dark"] .command-dialog .nav-link.active,[data-theme="dark"] .mobile-dialog .nav-link.active{background:#39513f;color:#eff7ec}
[data-theme="dark"] .command-dialog .nav-group,[data-theme="dark"] .mobile-dialog .nav-group{color:var(--muted)}
[data-theme="dark"] .skeleton{background:linear-gradient(90deg,#242c34,#343e49,#242c34)}
/* Inbox surfaces keep delivery status, notes and warning states distinguishable. */
[data-theme="dark"] .inbox-page{color:var(--ink)}
[data-theme="dark"] .inbox-grid,[data-theme="dark"] .inbox-thread-pane,[data-theme="dark"] .inbox-composer{background:var(--card);border-color:var(--line)}
[data-theme="dark"] .inbox-list-pane,[data-theme="dark"] .inbox-details{background:#20232e;border-color:var(--line)}
[data-theme="dark"] .inbox-list-tools,[data-theme="dark"] .inbox-pager,[data-theme="dark"] .inbox-thread-header{border-color:var(--line)}
[data-theme="dark"] .inbox-filter-row{background:#2b2b3b}
[data-theme="dark"] .inbox-filter-row button{color:#c7bfda}
[data-theme="dark"] .inbox-filter-row button[aria-pressed="true"]{background:#48415e;color:#fff}
[data-theme="dark"] .inbox-row:hover{background:#303344}
[data-theme="dark"] .inbox-row.selected{background:#3b3354;border-color:#6f608d}
[data-theme="dark"] .inbox-avatar{background:#49405c;color:#ede4ff}
[data-theme="dark"] #inbox-search,[data-theme="dark"] #inbox-reply,[data-theme="dark"] #inbox-remote-draft{background:#191c27;color:var(--ink);border-color:#51566b}
[data-theme="dark"] #inbox-reply:disabled{background:#262935;color:#acb4c4}
[data-theme="dark"] .inbox-message-meta,[data-theme="dark"] .inbox-message-meta strong,[data-theme="dark"] .inbox-snippet,[data-theme="dark"] .inbox-list-meta,[data-theme="dark"] .inbox-row-top time,[data-theme="dark"] .inbox-state,[data-theme="dark"] .inbox-details summary,[data-theme="dark"] .inbox-details dt,[data-theme="dark"] .inbox-thread-identity p,[data-theme="dark"] .inbox-heading p,[data-theme="dark"] .inbox-sync,[data-theme="dark"] .inbox-reply-help,[data-theme="dark"] #inbox-draft-status,[data-theme="dark"] #inbox-page-label{color:#bcc0d1}
[data-theme="dark"] .inbox-bubble{background:#393246;color:#f0eaf8}
[data-theme="dark"] .inbox-message.customer .inbox-bubble{background:#303945;color:#f1f4f8}
[data-theme="dark"] .inbox-message.human .inbox-bubble{background:#294537;color:#e2f7e8}
[data-theme="dark"] .inbox-message.system .inbox-bubble{background:transparent;border-color:#515166;color:#bdc4d5}
[data-theme="dark"] .inbox-message-card{background:#242b36;border-color:#525669}
[data-theme="dark"] .inbox-message-card small{color:#bcc0d1}
[data-theme="dark"] .inbox-new-messages{background:#423354;color:#eddbff;border-color:#816998}
[data-theme="dark"] .inbox-unread{color:#d5b6ff}
[data-theme="dark"] .inbox-private-note,[data-theme="dark"] .inbox-alert,[data-theme="dark"] .inbox-draft-conflict,[data-theme="dark"] .inbox-channel-notice,[data-theme="dark"] .inbox-state.waiting{background:#44371e;color:#ffe3a9;border-color:#826737}
[data-theme="dark"] .inbox-actions .btn,[data-theme="dark"] .inbox-composer>label,[data-theme="dark"] .inbox-empty strong{color:var(--ink)}
[data-theme="dark"] #inbox-send{background:#b7ef85;color:#162313}
[data-theme="dark"] #inbox-send:not(:disabled):hover{background:#cafa9f}
@media(max-width:650px){.topbar-actions>.theme-picker{display:none}}
@media(prefers-reduced-motion:reduce){.skeleton{animation:none}}

[data-theme="dark"] .inbox-empty,[data-theme="dark"] .inbox-no-selection p{color:#bdc4d5}

/* At tablet widths the sidebar leaves a narrow content column. Keep the theme
   control available without pushing the refresh/menu actions off screen. */
@media(max-width:1100px){
  .topbar-left{min-width:0}
  .breadcrumb-root,.breadcrumb-divider{display:none}
  .topbar .search-button{min-width:36px;padding:4px;background:transparent;border-color:transparent}
  .topbar .search-button>span:nth-child(2),.topbar .search-button kbd{display:none}
}
[data-theme="dark"] .inbox-tags,[data-theme="dark"] .inbox-side,[data-theme="dark"] .inbox-side-head{background:#20232e;border-color:var(--line)}
[data-theme="dark"] .inbox-side-card,[data-theme="dark"] .inbox-order,[data-theme="dark"] .inbox-history,[data-theme="dark"] .inbox-crm li,[data-theme="dark"] .inbox-pop,[data-theme="dark"] .inbox-assign select,[data-theme="dark"] .inbox-order-form textarea,[data-theme="dark"] .inbox-order-form input:not([type=checkbox]),[data-theme="dark"] .inbox-order-form select,[data-theme="dark"] .inbox-note-form textarea,[data-theme="dark"] .inbox-pop input[type=search]{background:#272a37;color:#eef0f7;border-color:var(--line)}
[data-theme="dark"] .inbox-side-tabs{background:#181a23}
[data-theme="dark"] .inbox-side-tabs button{color:#bcc0d1}
[data-theme="dark"] .inbox-side-tabs button[aria-selected="true"],[data-theme="dark"] .inbox-pick{background:#2d3140;color:#eef0f7}
[data-theme="dark"] .inbox-pick:hover,[data-theme="dark"] .inbox-pick:focus-visible{background:#353a4c;border-color:#4b5068}
[data-theme="dark"] .inbox-tag,[data-theme="dark"] .inbox-pick code{background:#383055;color:#ddd3f6}
[data-theme="dark"] .inbox-tag button:hover{background:#4a4170}
[data-theme="dark"] .inbox-side-body,[data-theme="dark"] .inbox-order-form label,[data-theme="dark"] .inbox-note-form label,[data-theme="dark"] .inbox-compose-tools>label{color:#dfe2ee}
[data-theme="dark"] .inbox-side-note,[data-theme="dark"] .inbox-facts dt,[data-theme="dark"] .inbox-order-meta,[data-theme="dark"] .inbox-history small,[data-theme="dark"] .inbox-crm small,[data-theme="dark"] .inbox-pick small,[data-theme="dark"] .inbox-kpis small,[data-theme="dark"] .inbox-kpis p,[data-theme="dark"] .inbox-assign,[data-theme="dark"] .inbox-pop-title,[data-theme="dark"] .inbox-lines li span:last-child{color:#bcc0d1}
[data-theme="dark"] .inbox-side-warn{background:#44371e;color:#ffe3a9;border-color:#826737}
[data-theme="dark"] .inbox-pill{background:#2f3342;color:#d3d6e3}
[data-theme="dark"] .inbox-pill.ok{background:#1f3b26;color:#bfe8c4}
[data-theme="dark"] .inbox-pill.waiting{background:#44371e;color:#ffe3a9}
[data-theme="dark"] .inbox-pill.bad{background:#4a2420;color:#ffc9c1}
[data-theme="dark"] .inbox-action{border-color:var(--line)}
[data-theme="dark"] .inbox-channel { background: #26324d; color: #b9cbf5; }
[data-theme="dark"] .inbox-delivery.ok { color: #6fd3a2; }
[data-theme="dark"] .inbox-delivery.wait { color: #e7bb5f; }
[data-theme="dark"] .inbox-delivery.bad { color: #f08a80; }
[data-theme="dark"] .btn.danger{background:#d0574b;border-color:#d0574b;color:#fff}[data-theme="dark"] .btn.ghost{color:#d8dbe6}[data-theme="dark"] .btn.ghost:hover{background:#2d3140}
[data-theme="dark"] .command-dialog .nav-link.is-highlighted{background:#2f4a3a;color:#eff7ec}
[data-theme="dark"] .breadcrumb-root,[data-theme="dark"] .step-fraction small{color:#a9b0c2}[data-theme="dark"] .start-percent span{color:#c9dcc4}
