/* PAYKITA v19 — neutral charcoal dark surfaces, semantic status colors unchanged.
   Light mode deliberately untouched; accents still come from the chosen theme.
   This file loads after v17 CSS. Does not affect payment business logic. */
html[data-theme="dark"] {
  --pkv17-bg:#0d1117;--pkv17-card:#1b2028;--pkv17-text:#f1f4f9;
  --pkv17-muted:#a5adba;--pkv17-border:#343c49;--pkv17-subtle:#252b35;
  --pk-public-bg:#0d1117;--pk-public-card:#1b2028;
  --pk-public-text:#f1f4f9;--pk-public-muted:#a5adba;--pk-public-border:#343c49;
  color-scheme:dark;
}
/* Dashboard and its shared shell, sidebar, topbar, tables and forms. */
html[data-theme="dark"] #lv7-dashboard-root {
  --lv7-bg:#0d1117;--lv7-card:#1b2028;--lv7-border:#343c49;
  --lv7-text:#f1f4f9;--lv7-muted:#a5adba;--lv7-subtle:#252b35;
  --lv7-shadow:none;
}
html[data-theme="dark"] body:has(#lv7-dashboard-root),
html[data-theme="dark"] body:has(#lv7-dashboard-root) #lv7-dashboard-root,
html[data-theme="dark"] body:has(#lv7-dashboard-root) .lv7-main {background:#0d1117!important;color:#f1f4f9!important;}
html[data-theme="dark"] #lv7-dashboard-root :is(.lv7-sidebar,.lv7-topbar) {background:#171c23!important;border-color:#343c49!important;}
html[data-theme="dark"] #lv7-dashboard-root :is(.lv7-stats-card,.lv7-detector-mark) {border-color:var(--lv7-border);}
/* Use theme color only on the primary payment card, selected navigation and accent controls.
   All neutral containers remain charcoal independent of theme selection. */
html[data-theme="dark"] #lv7-dashboard-root :is(.lv7-daily,.lv7-metric,.lv7-status-card,.lv7-detector-card,.lv7-chart-card,.lv7-transactions-card,.lv7-stat-card) {
  background:var(--lv7-card);border-color:var(--lv7-border);
}
html[data-theme="dark"] #lv7-dashboard-root :is(.lv7-table,.lv7-table th,.lv7-table td) {border-color:var(--lv7-border);}
/* EJS merchant pages use multiple generations of card tokens; align neutral base colors. */
html[data-theme="dark"] #lv7-dashboard-root .lv9-page {
  --pk-bg:#0d1117;--pk-card:#1b2028;--pk-card-alt:#252b35;
  --pk-line:#343c49;--pk-ink:#f1f4f9;--pk-muted:#a5adba;
  --pk2-bg:#0d1117;--pk2-card:#1b2028;--pk2-ink:#f1f4f9;--pk2-border:#343c49;
  --dk-bg:#0d1117;--dk-white:#1b2028;--dk-border:#343c49;
}
html[data-theme="dark"] #lv7-dashboard-root .lv9-page :is(.provider-dashboard-card,.provider-status-card,.provider-side-stack,.provider-guide-panel,.qpk-card,.qpk-balance-card,.smooth-section-card,.project-smooth-card,.listener-note-box,.listener-app-brand) {
  border-color:#343c49!important;
}
html[data-theme="dark"] #lv7-dashboard-root .lv9-page :is(.provider-dashboard-card,.provider-status-card,.provider-guide-panel,.qpk-card,.qpk-balance-card,.smooth-section-card,.project-smooth-card) {
  background:#1b2028!important;
}
/* Public Home—including mobile navigation and the payment simulation. */
html[data-theme="dark"]:has(.hero-payment-automation) {
  --pk-public-bg:#0d1117;--pk-public-card:#1b2028;
  --pk-public-text:#f1f4f9;--pk-public-muted:#a5adba;--pk-public-border:#343c49;
}
html[data-theme="dark"]:has(.hero-payment-automation) body {background:#0d1117!important;color:#f1f4f9;}
html[data-theme="dark"]:has(.hero-payment-automation) :is(.section-muted,.final-cta,.hero-payment-automation) {background:#0d1117!important;}
html[data-theme="dark"]:has(.hero-payment-automation) :is(.provider-section,.pricing-section,.stats-section) {background:#121720!important;}
html[data-theme="dark"]:has(.hero-payment-automation) :is(.topbar,.mobile-menu) {background:#171c23!important;border-color:#343c49!important;}
html[data-theme="dark"]:has(.hero-payment-automation) :is(.payment-preview,.pk-animated-preview,.pkf-step,.pk-animated-preview .pkf-step,.pkf-toolbar,.pkf-assurance,.payment-preview-foot,.step-card,.feature-card,.provider-card,.stat-card,.price-card,.faq-list details,.supported-card,.provider-inline,.mobile-menu a) {
  background:#1b2028!important;border-color:#343c49!important;
}
html[data-theme="dark"]:has(.hero-payment-automation) :is(.pkf-flow,.pkf-step.pkf-source,.pkf-step.pkf-order,.pkf-step.pkf-paid) {border-color:#343c49!important;}
html[data-theme="dark"]:has(.hero-payment-automation) :is(.pkf-toolbar,.payment-preview-foot,.pkf-assurance) {background:#252b35!important;}
html[data-theme="dark"]:has(.hero-payment-automation) :is(.payment-preview-head strong,.pkf-step h3,.pkf-step .pkf-amount,.hero h1,.section-heading h2,.provider-card h3) {color:#f1f4f9!important;}
html[data-theme="dark"]:has(.hero-payment-automation) :is(.pkf-detail,.pkf-eyebrow,.pkf-step p,.pkf-toolbar-label,.stat-label) {color:#a5adba;}
/* Disable the ornamental pink/green radial blob on dark only. */
html[data-theme="dark"]:has(.hero-payment-automation) :is(.payment-preview,.pk-animated-preview)::before,
html[data-theme="dark"]:has(.hero-payment-automation) :is(.payment-preview,.pk-animated-preview)::after {background:none!important;box-shadow:none!important;}
/* No white mobile menu tile when dark theme is active. */
html[data-theme="dark"]:has(.hero-payment-automation) :is(.menu-button,.menu-button svg,.mobile-menu button) {background:#252b35!important;color:#f1f4f9!important;border-color:#343c49!important;}
/* Public auth and legal surfaces follow the same charcoal palette. */
html[data-theme="dark"]:has(.login-stitch) :is(.login-stitch-card,.login-stitch-google,.login-stitch-form input),
html[data-theme="dark"]:has(.login-wrap) :is(.login-card,.login-card input),
html[data-theme="dark"]:has(.privacy-public-shell) :is(.privacy-public-shell,.privacy-public-header){background:#1b2028!important;border-color:#343c49!important;color:#f1f4f9!important;}
/* ANNOUNCEMENT v18 modal (outside Dashboard root). */
html[data-theme="dark"] .lv7-announcement {
  --pk-notice-card:#1b2028;--pk-notice-panel:#252b35;--pk-notice-line:#343c49;
  --pk-notice-text:#f1f4f9;--pk-notice-muted:#a5adba;
}
html[data-theme="dark"] .lv7-announcement .lv7-announcement-scroll {scrollbar-color:#404956 #252b35;}
/* Payment realtime v18 toast: charcoal card; green success check stays semantic. */
html[data-theme="dark"] .pk-payment-activity {
  --activity-bg:#1b2028;--activity-border:#343c49;
  --activity-text:#f1f4f9;--activity-muted:#a5adba;
}
html[data-theme="dark"] .pk-payment-activity .pk-payment-activity-card {box-shadow:0 16px 42px rgba(0,0,0,.4);}
/* Intentional semantic color protection: paid green, pending amber, failed red. */
html[data-theme="dark"] #lv7-dashboard-root :is(.lv7-status-paid,.badge.paid,.badge.success) {color:#7bdfaf!important;background:#1d352a!important;}
html[data-theme="dark"] #lv7-dashboard-root :is(.lv7-status-pending,.badge.pending) {color:#f4cc74!important;background:#403322!important;}
html[data-theme="dark"] #lv7-dashboard-root :is(.lv7-status-expired,.lv7-status-cancelled,.badge.expired,.badge.cancelled,.badge.failed) {color:#ff969d!important;background:#3d282d!important;}
