/* Workspace chrome only. The IG editor and rendered artwork live in a separate iframe. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --blue: #315cdc;
  --blue-dark: #b8ccff;
  --cyan: #52d4ff;
  --rail: rgba(23, 37, 56, .95);
  --canvas: #101b2a;
  --ink: #f1f6ff;
  --muted: #c0d2e8;
  --line: #405672;
  --line-strong: #7186a0;
  --amber: #ffdf9a;
  --amber-bg: #4c381b;
  --red: #ffc1ca;
  --red-bg: #542b35;
  --green: #a6e8c6;
  --green-bg: #183e34;
  --lift: 0 16px 34px -24px rgba(0, 0, 0, .8);
  --surface: #19283d;
  --theme-surface: #19283d;
  --theme-soft: #23364e;
}
:root[data-theme="dark"] body { background: #101b2a; }
:root[data-theme="dark"] a, :root[data-theme="dark"] .button.link, :root[data-theme="dark"] .eyebrow { color: #b8ccff; }
:root[data-theme="dark"] :is(input, select, textarea) {
  color: var(--ink); background: #19283d; border-color: var(--line-strong); box-shadow: none;
}
:root[data-theme="dark"] :is(input, textarea)::placeholder { color: #bdcde0; }
:root[data-theme="dark"] :is(input, textarea)[readonly] { background: #23364e; }
:root[data-theme="dark"] :focus-visible { outline-color: var(--cyan); }
:root[data-theme="dark"] :is(.card, .invite-card, .settings-link, .draft-row, .publication-card, .publish-row, .threads-post, .insights-account, .insights-table > .insights-post) { background: var(--theme-surface); color: var(--ink); }
:root[data-theme="dark"] :is(.button.ghost, .btn.secondary, .filter, .switch, .tab.active, .calendar-day, .calendar-week-day, .agree-row) { background: var(--theme-soft); color: var(--ink); border-color: var(--line-strong); }
:root[data-theme="dark"] :is(.button.ghost, .btn.secondary):hover:not(:disabled) { background: #304760; color: #fff; }
:root[data-theme="dark"] .button.primary:hover:not(:disabled), :root[data-theme="dark"] .btn:hover:not(:disabled) { background: #2549a7; color: #fff; }
:root[data-theme="dark"] .button.danger:hover:not(:disabled) { background: #713b47; }
:root[data-theme="dark"] :is(.filter[aria-pressed="true"], .calendar-week-day.is-selected) { background: var(--blue); color: #fff; }
:root[data-theme="dark"] :is(.token-form, .publish-time-form, .mode-switch, .picture-chooser, .insights-explain, .calendar-day.is-past, .calendar-week-day.is-past) { background: #23364e; }
:root[data-theme="dark"] :is(.todo-row.urgent, .publication-card[data-status="failed"], .publication-card[data-status="partial"], .insights-account[data-state="missing_permission"], .insights-account[data-state="needs_reconnect"]) { background: #542b35; border-color: #b97885; }
:root[data-theme="dark"] :is(.pill.owner, .pill.version, .tag.manual-due, .tag.publish-info, .tag.ig-mode-photos, .tag.ig-mode-design, .tag.insights-info, .tag.insights-desk, .switch:has(input:checked)) { background: #263f66; color: #d5e3ff; }
:root[data-theme="dark"] :is(.pill.viewer, .tag:not(.platform):not(.on):not(.manual-scheduled):not(.manual-stale):not(.manual-removed):not(.urgent):not(.warn):not(.manual-pending):not(.manual-checking):not(.manual-newer):not(.manual-due):not(.publish-ok):not(.publish-info):not(.publish-warn):not(.publish-alert):not(.ig-mode-photos):not(.ig-mode-design):not(.ig-mode-both):not(.insights-warn):not(.insights-alert):not(.insights-ok):not(.insights-info):not(.insights-desk)) { background: #30445c; color: #e1ebf8; }
:root[data-theme="dark"] .pill.admin { background: #174456; color: #b9eaff; }
:root[data-theme="dark"] .calendar-today-tag, :root[data-theme="dark"] .calendar-more, :root[data-theme="dark"] .calendar-week-count, :root[data-theme="dark"] .picture-order { color: #b8ccff; }
:root[data-theme="dark"] a.calendar-item:hover { background: #304760; }
/* Sidebar (redesign stage 1): the current page stays blue like a pressed filter; others lift on hover. */
:root[data-theme="dark"] .topbar .tab { color: var(--muted); }
:root[data-theme="dark"] .topbar .tab:hover { background: var(--theme-soft); color: var(--ink); }
:root[data-theme="dark"] .topbar .tab.active { background: var(--blue); color: #fff; box-shadow: none; }
:root[data-theme="dark"] .save-bar { background: #19283d; }
:root[data-theme="dark"] .skip-link { background: #e3ecff; color: #101b2a; }
:root[data-theme="dark"] .lightbox .button.ghost { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .4); }
:root[data-theme="dark"] .lightbox .button.ghost:hover:not(:disabled) { background: rgba(255, 255, 255, .2); border-color: #fff; color: #fff; }
/* Batch scheduling has a self-contained palette, so pair each surface with readable text. */
:root[data-theme="dark"] .batch-schedule { background: var(--theme-surface); border-color: var(--line); color: var(--ink); }
:root[data-theme="dark"] .batch-fields :is(input, select), :root[data-theme="dark"] .batch-button { background: var(--theme-soft); border-color: var(--line-strong); color: var(--ink); }
:root[data-theme="dark"] .batch-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
:root[data-theme="dark"] .batch-link { color: #b8ccff; }
:root[data-theme="dark"] .batch-hint { color: var(--muted); }
:root[data-theme="dark"] :is(.batch-warning, .batch-notice, .batch-manual-box) { background: var(--amber-bg); border-color: #94774a; color: var(--amber); }
:root[data-theme="dark"] :is(.batch-choices li, .batch-table th, .batch-table td) { border-color: var(--line); }
:root[data-theme="dark"] .calendar-platform.instagram { color: #ffb8d8; }
:root[data-theme="dark"] .calendar-week-day.is-today:not(.is-selected) .calendar-week-date { color: #b8ccff; }
