/* M06 visual layer, loaded in the initial HTML after each module's styles.
 * Gradients identify navigation, primary actions and content surfaces only. */
body.deltron-brand { background: var(--dt-page); }
body.deltron-brand :is(h1, h2, h3, button, input, select, textarea) { font-family: var(--dt-font); }
.deltron-brand :is(.card, .project-info, .project-metrics article, .news-item, .education-card,
  .library-system-card, .library-series-card, .document-type-card, .dt-card, .dt-brand-card) {
  background-color: var(--dt-white);
  background-image: var(--dt-gradient-surface);
}
.deltron-brand :is(.card, .news-item, .education-card) { border: 1px solid var(--dt-line); }
.deltron-brand .wide, .deltron-brand .card.wide { border: 0; background: transparent; box-shadow: none; }
/* Page introductions sit directly on the workspace, without a separate white plate. */
.deltron-brand :is(main, .m05-root) header:not(dialog header),
.deltron-brand.portal-ready :is(main, .m05-root) header:not(dialog header) {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.deltron-brand :is(.project-metrics article, .news-item, .education-card) {
  border-radius: var(--dt-radius-card);
  box-shadow: var(--dt-shadow-card);
}
.deltron-brand .news-item { padding: 24px; margin-block: 16px; }
.deltron-brand :is(.news-meta, .news-readonly) { color: var(--dt-gray); }
.deltron-brand .news-kind { background: var(--dt-hover); color: var(--dt-blue); }
.deltron-brand :is(.news-editor, .education-page #editor) {
  background-image: var(--dt-gradient-surface);
  border-radius: var(--dt-radius-card);
}
.deltron-brand :is(.library-system-card, .library-series-card, .document-type-card) {
  border-radius: var(--dt-radius-card);
  box-shadow: var(--dt-shadow-control);
}
.deltron-brand :is(.library-system-card, .library-series-card, .document-type-card):hover {
  border-color: var(--dt-blue);
}
.deltron-brand :is(.library-system-card, .library-series-card, .document-type-card)[aria-pressed=true] {
  border-color: var(--dt-blue);
  box-shadow: inset 0 0 0 1px var(--dt-blue), var(--dt-shadow-control);
}

/* Native controls remain quiet; only explicit primary actions receive a gradient. */
.deltron-brand .material-actions > a:not(.secondary) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 108px;
  min-height: 48px;
  padding: 10px 18px;
  border: 1px solid var(--dt-blue);
  border-radius: var(--dt-radius);
  font-family: var(--dt-font);
  font-weight: var(--dt-weight-medium);
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}
.deltron-brand .material-list > li > .material-actions:not(:has(> button)) {
  flex: 0 0 auto;
  margin-inline-start: auto;
  justify-content: flex-end;
}
@media (max-width: 760px) {
  .deltron-brand .material-list > li > .material-actions { width: 100%; }
  .deltron-brand .material-actions > a:not(.secondary) { width: 100%; }
}
.deltron-brand :is(.dt-button-primary, .primary, button[type=submit], form button:not([type]), #new-project,
  .download-all, [data-download-all], .material-actions > a:not(.secondary),
  .m05-selection-total > button, .quotation-results article button):not(.secondary):not(.danger) {
  background-color: var(--dt-blue);
  background-image: var(--dt-gradient-primary);
  border-color: var(--dt-blue);
  color: var(--dt-white);
  box-shadow: var(--dt-shadow-primary);
  min-height: 48px;
}
.deltron-brand :is(.dt-button-primary, .primary, button[type=submit], #new-project):not(.secondary):not(.danger):hover {
  box-shadow: var(--dt-shadow-hover);
}
.deltron-brand :is(button, .dt-button, .btn):disabled,
.deltron-brand :is(button, .dt-button, .btn)[aria-disabled=true] {
  background-image: none;
  box-shadow: none;
  transform: none;
}
.deltron-brand :is(.secondary, .danger, .multi-filter-toggle, .library-filter-toggle,
  .library-clear-filters, [data-view]):not([aria-pressed=true]) { background-image: none; }
.deltron-brand .library-views button[aria-pressed=true] {
  background-color: var(--dt-blue);
  background-image: var(--dt-gradient-primary);
  color: var(--dt-white);
}
.deltron-brand .library-filters { background: transparent; border: 0; box-shadow: none; }
.deltron-brand :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), select, textarea) {
  background-color: var(--dt-white);
  background-image: none;
  min-height: 48px;
}
.deltron-brand dialog { background: var(--dt-white); border-color: var(--dt-line); }
.deltron-brand dialog > :is(header, footer),
.deltron-brand :is(.quotation-project-dialog, .m05-save-dialog) > :is(header, footer) {
  background-color: var(--dt-white);
  background-image: var(--dt-gradient-surface);
}

/* The shared shell is identical in SSR and client navigation. */
.deltron-brand .portal-sidebar { background-color: var(--dt-blue); background-image: var(--dt-gradient-sidebar); }
.portal-sidebar .portal-link > span:first-child { display: inline-flex; align-items: center; justify-content: center; }
.portal-icon { display: inline-block; flex-shrink: 0; vertical-align: middle; }
.portal-sidebar .portal-link { gap: 12px; }
.portal-sidebar nav > small { color: var(--dt-white); opacity: .8; }
.deltron-brand.portal-ready header {
  min-height: 72px;
  background: var(--dt-white);
  border-bottom: 1px solid var(--dt-line);
}
.deltron-brand header nav > a[href] {
  min-height: 44px;
  padding: 10px 12px;
  border-color: transparent;
  box-shadow: none;
  background: transparent;
}
.deltron-brand header nav > a[href]:not(:disabled):not([aria-disabled=true]):hover { background: var(--dt-hover); box-shadow: none; transform: none; }
.deltron-brand header nav > a[href][aria-current=page] { color: var(--dt-blue); background: var(--dt-hover); }
.deltron-brand header .portal-logout { box-shadow: none; }
.deltron-brand.portal-ready #portal-menu-toggle { align-items: center; justify-content: center; gap: 8px; }
.deltron-brand .sidebar-support { border-top: 1px solid rgb(255 255 255 / 24%); padding-top: 20px; margin-top: 28px; }

/* Module content uses shared tokens, including the React quotation workspace. */
.deltron-brand .m05-root { background: transparent; }
.deltron-brand .m05-root :is(.quotation-meta, .heat-pump-meta, .quotation-catalog,
  .quotation-builder, .heat-pump-configurator, .heat-pump-estimate, .m05-catalog-selection,
  .m05-saved-list, .m05-workspace-context) {
  background-color: var(--dt-white);
  background-image: var(--dt-gradient-surface);
}
.deltron-brand .m05-root :is(.quotation-brand-switch, .quotation-mode-switch, .heat-pump-manufacturer) button {
  background-color: var(--dt-white);
  background-image: var(--dt-gradient-surface);
}
.deltron-brand .m05-root :is(.quotation-brand-switch, .quotation-mode-switch, .heat-pump-manufacturer) button.active {
  border-color: var(--dt-blue);
  box-shadow: inset 0 0 0 1px var(--dt-blue), var(--dt-shadow-card);
}
.deltron-brand .m05-root .m05-wizard-progress button[aria-current=step] {
  background-color: var(--dt-blue);
  background-image: var(--dt-gradient-primary);
  color: var(--dt-white);
}
.deltron-brand .m05-root .m05-wizard-progress button[aria-current=step] > :is(b, span) { color: inherit; }

@media (max-width:760px) {
  .deltron-brand.portal-ready #portal-menu-toggle { display: inline-flex; }
}
@media (prefers-reduced-motion:reduce) {
  .deltron-brand *, .deltron-brand *::before, .deltron-brand *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
@media (forced-colors:active) {
  body.deltron-brand, .deltron-brand *, .deltron-brand *::before, .deltron-brand *::after {
    background-image: none !important;
    box-shadow: none !important;
  }
  .deltron-brand .portal-sidebar { background: Canvas; color: CanvasText; }
  .deltron-brand .portal-sidebar :is(.portal-link, nav > small, .sidebar-support, .sidebar-support a) { color: CanvasText; opacity: 1; }
  .deltron-brand .portal-sidebar a[aria-current=page] { background: Highlight; color: HighlightText; }
  .deltron-brand .sidebar-logo img { filter: none; background: white; }
  .deltron-brand :is(button, a):focus-visible { outline-color: Highlight; }
}
