/* PayKita v23 — uniform neutral charcoal for authenticated UI.
 * Deliberately scoped to dark mode + #lv7-dashboard-root.
 * Status colors (success/pending/error), theme accents and QR image surfaces are preserved.
 * This file MUST load last after all v17–v22 stylesheets. */
html[data-theme="dark"] #lv7-dashboard-root {
  --lv7-bg:#0d1117;
  --lv7-card:#1b2028;
  --lv7-subtle:#252b35;
  --lv7-border:#343c49;
  --lv7-text:#f1f4f9;
  --lv7-muted:#a5adba;
  --lv7-shadow:none;
  --pk-bg:#0d1117;--pk-card:#1b2028;--pk-card-alt:#252b35;
  --pk-input:#1b2028;--pk-ink:#f1f4f9;--pk-text:#f1f4f9;
  --pk-muted:#a5adba;--pk-faint:#a5adba;--pk-line:#343c49;
  --pk-hover:#252b35;
  --pk2-bg:#0d1117;--pk2-card:#1b2028;--pk2-ink:#f1f4f9;--pk2-border:#343c49;
  --dk-bg:#0d1117;--dk-white:#1b2028;--dk-ink:#f1f4f9;--dk-muted:#a5adba;--dk-border:#343c49;
  --pro-surface:#1b2028;--pro-surface-soft:#252b35;
  --pro-line:#343c49;--pro-text:#f1f4f9;--pro-muted:#a5adba;
  --surface-soft:#1b2028;--surface-soft-2:#252b35;
  --surface-line:#343c49;--surface-text:#f1f4f9;--surface-muted:#a5adba;
}
html[data-theme="dark"] body:has(#lv7-dashboard-root),
html[data-theme="dark"] #lv7-dashboard-root,
html[data-theme="dark"] #lv7-dashboard-root .lv7-main {
  background:#0d1117!important;color:#f1f4f9;
}
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-mode-switch,.lv7-workspace-icon) {
  background:#252b35!important;border-color:#343c49!important;
}
/* A section may redefine inherited legacy tokens. Keep the neutral palette at page scope, too. */
html[data-theme="dark"] #lv7-dashboard-root :is(.lv9-page,.lv11-legacy-page,.qris-page,.provider-modern-page) {
  --lv7-card:#1b2028;--lv7-subtle:#252b35;--lv7-border:#343c49;
  --pk-card:#1b2028;--pk-card-alt:#252b35;--pk-line:#343c49;
  --pro-surface-soft:#252b35;--surface-soft-2:#252b35;
}
/* Page-level boxes: never recolor semantic notices or the main theme-colored payment card. */
html[data-theme="dark"] #lv7-dashboard-root :is(
 .qris-builder-panel,.profile-panel,.qpk-card,.qpk-balance-card,
 .provider-dashboard-card,.provider-status-card,.provider-guide-panel,
 .project-smooth-card,.smooth-section-card,.listener-device-item,
 .subscription-card,.settings-tabs-card,.api-section,.endpoint-card,
 .lv7-daily,.lv7-metric,.lv7-stat-card,.lv7-transactions-card,
 .lv7-status-card,.lv7-detector-card,.lv7-chart-card
) {
  background:#1b2028!important;border-color:#343c49!important;
}
/* Inset cards & form groups: old QRIS and provider CSS used the default dark green here. */
html[data-theme="dark"] #lv7-dashboard-root :is(
 .qris-active-provider-box,.provider-qris-box,.qris-auto-detector,
 .qris-order-preview,.qris-breakdown,.qris-mode-box,
 .qris-mode-option:not(.is-disabled),.qris-mode-explanation:not(.is-warning),
 .qris-inline-empty,.provider-standby-note,.qris-estimate-plan,
 .qris-detection-status,.qris-status-box,.qris-settings-card,
 .provider-status-table,.provider-settings-card,.provider-connect-card,
 .provider-guide-body,.provider-connection-info,.provider-meta-box,
 .profile-info-item,.settings-surface,.settings-card,
 .project-detail-metrics,.lv7-stats-card
) {
  background:#252b35!important;border-color:#343c49!important;
}
/* Form controls and ordinary data tables should not inherit green-tinted surfaces. */
html[data-theme="dark"] #lv7-dashboard-root :is(.lv9-page,.lv11-legacy-page) :is(
 input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]),
 select,textarea
) {
  background:#1b2028!important;color:#f1f4f9!important;border-color:#343c49!important;
}
html[data-theme="dark"] #lv7-dashboard-root :is(.lv9-page,.lv11-legacy-page) :is(
 table,thead,tbody,th,td
) {border-color:#343c49!important;}
html[data-theme="dark"] #lv7-dashboard-root :is(.lv9-page,.lv11-legacy-page) :is(
 .table-wrap,.qpk-table-wrap,.qris-details-table,.provider-status-table
) {border-color:#343c49!important;}
/* Text in neutral QRIS cards; preserve success labels as green. */
html[data-theme="dark"] #lv7-dashboard-root .qris-page :is(
 .qris-active-provider-box,.provider-qris-box,.qris-auto-detector,.qris-mode-box,
 .qris-order-preview,.qris-breakdown
) {color:#f1f4f9;}
/* Semantic exception: these are actual success-state messages, not decorative panels. */
html[data-theme="dark"] #lv7-dashboard-root :is(
 .provider-info-note.success-note,.merchant-connected-note,.api-note.success,
 .lv7-status-paid,.badge.paid,.badge.success,.qpk-status.paid
) {border-color:#345b49!important;}
/* Do not override .lv7-balance (follows selected theme), notice warnings, QR code
 * images, status pills, or button accent colors. */
