/* Shared theme choice. The same control is used in the sidebar and on login. */
.theme-control{min-width:0;padding:10px 12px;color:var(--muted,#667780);font-size:12px;font-weight:650;border:0}
.theme-control legend{padding:0 0 6px;color:inherit}
.sidebar .theme-control{margin:auto 7px 0;border-top:1px solid var(--line,#dfe8e9);flex-shrink:0}
.sidebar .account{margin-top:0}
.theme-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px;padding:3px;border:1px solid var(--line,#dfe8e9);border-radius:10px;background:#eef3f4}
.theme-options label{position:relative;min-width:0;cursor:pointer}
.theme-options input{position:absolute;opacity:0;width:1px;height:1px;margin:0}
.theme-options span{display:block;padding:7px 5px;border-radius:7px;text-align:center;color:var(--muted,#667780);white-space:nowrap}
.theme-options input:checked+span{background:#fff;color:#165f63;box-shadow:0 1px 4px #172a3120}
.theme-options input:focus-visible+span{outline:3px solid #41aeb3;outline-offset:1px}
.login-theme-control{position:fixed;left:22px;bottom:18px;z-index:2;width:230px;padding:9px 12px;border:1px solid #dfe8e9;border-radius:12px;background:#fff;box-shadow:0 8px 28px #172a3114}
@media(max-width:800px){.sidebar .theme-control{margin:10px 0 0;padding:9px 12px;border-top:1px solid var(--line,#dfe8e9)}.login-theme-control{position:static;margin:-25px 20px 20px auto}}

:root[data-theme="dark"]{
  color-scheme:dark;
  --ink:#eaf1f2;
  --muted:#aabdc2;
  --line:#35494f;
  --purple:#80d4d1;
  --surface:#101a1e;
  --sidebar:#152227;
  --accent:#78cecc;
  --accent-hover:#98e1df;
  --accent-soft:#234147;
  --shadow:0 8px 30px #0003;
  --dark-panel:#1b2a30;
  --dark-soft:#22363c;
  --dark-field:#17262b;
  --dark-danger:#ff9ca6;
  background:var(--surface);
  color:var(--ink);
}
[data-theme="dark"] body,[data-theme="dark"] .page{background:var(--surface);color:var(--ink)}
[data-theme="dark"] a{color:inherit}
[data-theme="dark"] .sidebar,[data-theme="dark"] .topbar,[data-theme="dark"] .panel,
[data-theme="dark"] .pipeline-panel,[data-theme="dark"] .flow-panel,[data-theme="dark"] .stat-card,
[data-theme="dark"] .statistics-filter,[data-theme="dark"] .login-card{background:var(--dark-panel);border-color:var(--line);color:var(--ink)}
[data-theme="dark"] .sidebar{box-shadow:3px 0 18px #0002}
[data-theme="dark"] .sidebar .workspace,[data-theme="dark"] .sidebar .account{border-color:var(--line)}
[data-theme="dark"] .wordmark,[data-theme="dark"] .topbar strong,[data-theme="dark"] h1,
[data-theme="dark"] h2,[data-theme="dark"] h3,[data-theme="dark"] h4,
[data-theme="dark"] .hold-summary-title,[data-theme="dark"] .campaign-facts strong,
[data-theme="dark"] .mail-shift-cell strong{color:var(--ink)}
[data-theme="dark"] .wordmark span,[data-theme="dark"] .eyebrow{color:var(--accent)}
[data-theme="dark"] .workspace-icon,[data-theme="dark"] .avatar,[data-theme="dark"] .mark{background:var(--accent-soft);color:var(--accent)}
[data-theme="dark"] .workspace small,[data-theme="dark"] .account small,
[data-theme="dark"] .nav-label,[data-theme="dark"] .campaign-nav-label,
[data-theme="dark"] .brand-note,[data-theme="dark"] .breadcrumb,[data-theme="dark"] .slash,
[data-theme="dark"] .stat-top,[data-theme="dark"] .stat-card p,
[data-theme="dark"] .table-limit,[data-theme="dark"] td small,
[data-theme="dark"] footer{color:var(--muted)}
[data-theme="dark"] .nav-item,[data-theme="dark"] .nav-item>span:first-child{color:#bbcbcf}
[data-theme="dark"] .nav-item:hover,[data-theme="dark"] .nav-item.active{background:var(--accent-soft);color:#d8f8f4}
[data-theme="dark"] .nav-item.active>span:first-child{color:var(--accent)}
[data-theme="dark"] .nav-toggle,[data-theme="dark"] .logout-form button,
[data-theme="dark"] .login-theme-control{background:var(--dark-soft);border-color:var(--line);color:var(--ink)}
[data-theme="dark"] .date-tag,[data-theme="dark"] .pill,
[data-theme="dark"] .pill.small,[data-theme="dark"] .count{background:var(--dark-soft);border-color:var(--line);color:#bddbdc}
[data-theme="dark"] .theme-control{color:var(--ink)}
[data-theme="dark"] .theme-options{background:#17262b;border-color:var(--line)}
[data-theme="dark"] .theme-options span{color:#b8cbd0}
[data-theme="dark"] .theme-options input:checked+span{background:#31565a;color:#e7faf8;box-shadow:none}

/* Surfaces, tables and supporting text. */
[data-theme="dark"] .panel-heading,[data-theme="dark"] .pipeline-heading,
[data-theme="dark"] .drawer-head,[data-theme="dark"] .pagination,
[data-theme="dark"] .hold-disclosure[open]>summary{border-color:var(--line)}
[data-theme="dark"] .stat-card.warm-leads,[data-theme="dark"] .stat-card.emphasis{background:#1d4747;border-color:#376d68}
[data-theme="dark"] .stat-card.warm-leads .stat-top,[data-theme="dark"] .stat-card.warm-leads .stat-value,
[data-theme="dark"] .stat-card.warm-leads p,[data-theme="dark"] .stat-card.emphasis .stat-top,
[data-theme="dark"] .stat-card.emphasis p{color:#bde5da}
[data-theme="dark"] .stat-card.emphasis .stat-icon,[data-theme="dark"] .stat-card.warm-leads .stat-icon,
[data-theme="dark"] .stat-icon.lavender,[data-theme="dark"] .stat-icon.mint,
[data-theme="dark"] .stat-icon.peach,[data-theme="dark"] .empty-icon,
[data-theme="dark"] .pipeline-step>span,[data-theme="dark"] .step{background:var(--accent-soft);color:var(--accent);border-color:var(--line)}
[data-theme="dark"] .progress-row,[data-theme="dark"] .campaign-help,
[data-theme="dark"] .campaign-articles,[data-theme="dark"] .reminder-copy,
[data-theme="dark"] .statistics-outcomes div,[data-theme="dark"] .compact-list li,
[data-theme="dark"] .sent-mail pre,[data-theme="dark"] .table-wrap::before{background:var(--dark-soft);border-color:var(--line);color:var(--ink)}
[data-theme="dark"] .campaign-articles strong,[data-theme="dark"] .campaign-articles li,
[data-theme="dark"] .campaign-draft-form label,[data-theme="dark"] .campaign-mode-form label,
[data-theme="dark"] .catalog-filters label,[data-theme="dark"] .catalog-edit-form label,
[data-theme="dark"] .block-form label{color:var(--muted)}
[data-theme="dark"] .panel-heading p,[data-theme="dark"] .subtitle,
[data-theme="dark"] .empty-state p,[data-theme="dark"] .empty-foot,
[data-theme="dark"] .campaign-overview-top p:last-child,[data-theme="dark"] .reply-body,
[data-theme="dark"] .muted-copy{color:var(--muted)}
[data-theme="dark"] table,[data-theme="dark"] th{background:var(--dark-panel);color:var(--ink)}
[data-theme="dark"] th{background:var(--dark-soft);color:#bed0d4;border-bottom-color:var(--line)}
[data-theme="dark"] td{border-bottom-color:var(--line)}
[data-theme="dark"] tbody tr:hover{background:#253a40}
[data-theme="dark"] .table-link,[data-theme="dark"] .panel-link,
[data-theme="dark"] .sent-mail summary,[data-theme="dark"] .catalog-drawer .drawer-close{color:var(--accent)}
[data-theme="dark"] .badge.good,[data-theme="dark"] .notice.good{background:#1b4238;color:#a8e8c8;border-color:#336f55}
[data-theme="dark"] .badge.waiting{background:#493a24;color:#f3d295}
[data-theme="dark"] .badge.error{background:#492a32;color:#ffb2b9}
[data-theme="dark"] .badge.muted{background:#304048;color:#d1dce0}
[data-theme="dark"] .reply-summary .reply-positive{color:#a8e8c8}
[data-theme="dark"] .reply-summary .reply-maybe{color:#f1cc87}
[data-theme="dark"] .reply-summary .reply-negative{color:#f1a5ae}

/* Controls and feedback across all work areas. */
[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
[data-theme="dark"] select,[data-theme="dark"] textarea,[data-theme="dark"] .file-control{
  background:var(--dark-field);border-color:#536970;color:var(--ink);
}
[data-theme="dark"] input::placeholder,[data-theme="dark"] textarea::placeholder{color:#92a7ad;opacity:1}
[data-theme="dark"] input[type="checkbox"],[data-theme="dark"] input[type="radio"]{accent-color:#69c5c3}
[data-theme="dark"] .primary-button,[data-theme="dark"] .button.primary{background:#3b9b9e;border-color:#3b9b9e;color:#fff}
[data-theme="dark"] .primary-button:hover,[data-theme="dark"] .button.primary:hover{background:#53b2b4;border-color:#53b2b4}
[data-theme="dark"] .primary-button:disabled{background:#53676b;border-color:#53676b;color:#d3dddd}
[data-theme="dark"] .panel-link,[data-theme="dark"] .filter button,
[data-theme="dark"] .pagination a,[data-theme="dark"] .reply-form button,
[data-theme="dark"] .reply-actions button,[data-theme="dark"] .panel td form>button,
[data-theme="dark"] .priority-form button,[data-theme="dark"] .secondary-button,
[data-theme="dark"] .engine-actions button,[data-theme="dark"] .hold-form button,
[data-theme="dark"] .hold-lift-form button,[data-theme="dark"] .button.secondary,
[data-theme="dark"] .file-button,[data-theme="dark"] .sni-toolbar button,
[data-theme="dark"] .auto-run-control button{background:var(--accent-soft);border-color:#3a6669;color:#c3eeea}
[data-theme="dark"] .panel-link:hover,[data-theme="dark"] .filter button:hover,
[data-theme="dark"] .pagination a:hover,[data-theme="dark"] .reply-form button:hover,
[data-theme="dark"] .reply-actions button:hover,[data-theme="dark"] .secondary-button:hover,
[data-theme="dark"] .engine-actions button:hover:not(:disabled){background:#31565a}
[data-theme="dark"] .queue-actions .remove-form button,[data-theme="dark"] .button.danger{background:#492a32;border-color:#75414a;color:#ffb9bf}
[data-theme="dark"] .queue-actions .remove-form button:hover{background:#5d303a}
[data-theme="dark"] .setup-banner,[data-theme="dark"] .notice{background:#253b40;border-color:#3a6263;color:#c8e9e6}
[data-theme="dark"] .setup-banner strong{color:#e3f8f5}
[data-theme="dark"] .error-panel,[data-theme="dark"] .login-card .error{background:#3c272f;border-color:#73434c;color:#ffccd0}
[data-theme="dark"] .error-panel strong,[data-theme="dark"] .error-panel p,
[data-theme="dark"] .reply-error,[data-theme="dark"] .reminder-campaign .error-text,
[data-theme="dark"] .reply-report-link{color:var(--dark-danger)}
[data-theme="dark"] .error-panel a{color:#b9e7e4}

/* Prospect catalogue and mobile queue cards. */
[data-theme="dark"] .catalog-drawer,[data-theme="dark"] .drawer-head{background:var(--dark-panel);color:var(--ink)}
[data-theme="dark"] .drawer-backdrop{background:#02080bbd}
[data-theme="dark"] .blocked-row,[data-theme="dark"] .catalog-list tbody tr.blocked-row{background:#37282e;border-color:#75414a}
[data-theme="dark"] .compact-list li{background:var(--dark-soft)}
[data-theme="dark"] .catalog-list tbody tr,[data-theme="dark"] .queue-table tr,
[data-theme="dark"] .recent-sends-table tr{background:var(--dark-panel);border-color:var(--line)}
[data-theme="dark"] .queue-table td,[data-theme="dark"] .recent-sends-table td{border-bottom-color:var(--line)}
[data-theme="dark"] .queue-table td:first-child,[data-theme="dark"] .recent-sends-table td:first-child{background:var(--dark-soft)}
[data-theme="dark"] .sni-toolbar{background:var(--dark-panel);border-color:var(--line)}
[data-theme="dark"] .sni-grid label:hover{background:var(--dark-soft)}
[data-theme="dark"] .sni-grid em,[data-theme="dark"] .rule-strip span{background:var(--dark-soft);color:var(--muted)}

/* Statistics, reminders and the sign-in screen. */
[data-theme="dark"] .statistics-cards strong,[data-theme="dark"] .statistics-outcomes b,
[data-theme="dark"] .statistics-reminder strong,[data-theme="dark"] .statistics-insight-body h3{color:#a1e1dc}
[data-theme="dark"] .statistics-bar,[data-theme="dark"] .statistics-trend-bars{background:#34474d}
[data-theme="dark"] .statistics-bar i{background:#5bb9b8}
[data-theme="dark"] .reminder-campaign{border-color:var(--line);background:var(--dark-panel)}
[data-theme="dark"] .login-shell{color:var(--ink)}
[data-theme="dark"] .intro p:last-child,[data-theme="dark"] .hint,
[data-theme="dark"] .footnote,[data-theme="dark"] .card-top{color:var(--muted)}
[data-theme="dark"] .login-card{box-shadow:0 18px 60px #0005}
[data-theme="dark"] .login-card button[type="submit"]{background:#3b9b9e;color:#fff}
[data-theme="dark"] .login-card button[type="submit"]:hover{background:#53b2b4}
[data-theme="dark"] .skip-link{background:var(--dark-panel);color:var(--ink)}
