/* RC39: dark surface hierarchy. Page structure is transparent;
   only meaningful cards, menu surfaces and interactive panels are raised. */
html[data-ycw-theme='dark'] body.ycw-portal {
  --ycw39-page:#101a2a;
  --ycw39-card:#1b293d;
  --ycw39-edge:#3c506c;
}
/* Structural blocks must not paint a second, slightly lighter rectangle. */
html[data-ycw-theme='dark'] body.ycw-portal :is(
  .wdes-content .wdes-block:not(.ycw-record-card),
  .wdes-content .wdes-block-table,
  .ycw-dashboard-services,.ycw-dashboard .ycw-dashboard-section,
  .ycw-dashboard-section-title,.ycw-dashboard-section-title > div,
  .ycw-dashboard .ycw-metrics-grid,
  .kbarticles,.kb-article-content,.kb-article-details,
  .wdes-knb-block,.block-knb,
  .contact-page,.account-details,.billing-details
) {
  background-color:transparent!important;
  background-image:none!important;
  box-shadow:none!important;
}
/* Do not flatten genuine cards or forms contained within structural wrappers. */
html[data-ycw-theme='dark'] body.ycw-portal :is(
  .ycw-dashboard .tiles .tile,.ycw-dashboard-action-card,
  .ycw-dashboard-panel,.ycw-dashboard-card,
  .ycw-record-card,.ycw-kb-category-card,.ycw-kb-article-card,
  .ycw-domain-dialog-surface,.ycw-service-dialog-surface
) { background-color:var(--ycw39-card)!important; border-color:var(--ycw39-edge)!important; }
/* Dashboard section scaffolding: no colored square behind 'Snel regelen'. */
html[data-ycw-theme='dark'] body.ycw-portal .ycw-dashboard .ycw-dashboard-services {
  background:transparent!important;
  border-color:transparent!important;
  box-shadow:none!important;
}
/* DataTables should have dark table cells, but a transparent outer wrapper. */
html[data-ycw-theme='dark'] body.ycw-portal .table-container,
html[data-ycw-theme='dark'] body.ycw-portal .dataTables_wrapper {
  background:transparent!important;
  background-image:none!important;
}
html[data-ycw-theme='dark'] body.ycw-portal .dataTables_wrapper > .row {
  background:transparent!important;
}
@media print {
  html[data-ycw-theme='dark'] body.ycw-portal .ycw-dashboard .ycw-dashboard-services,
  html[data-ycw-theme='dark'] body.ycw-portal .wdes-content .wdes-block {background:#fff!important;}
}
/* Older table styles sometimes apply a higher-specificity colored wrapper.
   Keep table cells opaque, but not the outer container itself. */
html[data-ycw-theme='dark'] body.ycw-portal .wdes-content :is(.table-container,.dataTables_wrapper),
html[data-ycw-theme='dark'] body.ycw-portal #main-body :is(.table-container,.dataTables_wrapper),
html[data-ycw-theme='dark'] body.ycw-portal .wdes-content .dataTables_wrapper > .row,
html[data-ycw-theme='dark'] body.ycw-portal #main-body .dataTables_wrapper > .row {
  background-color:transparent!important;
  background-image:none!important;
}
/* A legacy :is() rule includes multi-part selectors and therefore has unusually
   high specificity. Restrict the extra specificity to table wrappers only. */
html[data-ycw-theme='dark'] body.ycw-portal .wdes-content .table-container.table-container.table-container,
html[data-ycw-theme='dark'] body.ycw-portal .wdes-content .dataTables_wrapper.dataTables_wrapper.dataTables_wrapper,
html[data-ycw-theme='dark'] body.ycw-portal #main-body .table-container,
html[data-ycw-theme='dark'] body.ycw-portal #main-body .dataTables_wrapper,
html[data-ycw-theme='dark'] body.ycw-portal .wdes-content .dataTables_wrapper.dataTables_wrapper > .row.row,
html[data-ycw-theme='dark'] body.ycw-portal #main-body .dataTables_wrapper > .row {
  background:transparent!important;
  background-image:none!important;
}
