/* Data Analytics Platform: admin-only table browser.
   Standalone page. Reuses --nf-* tokens from tokens.css and defines
   --dp-* layout tokens locally. */

:root {
  --dp-control-height: 40px;
  --dp-touch-target: 44px;
  --dp-control-radius: 10px;
  --dp-card-radius: 14px;
  --dp-card-pad: 16px;
  --dp-section-gap: 16px;
  --dp-stack-gap: 14px;
  --dp-border: rgba(255, 255, 255, .09);
  --dp-border-strong: rgba(255, 255, 255, .14);
  --dp-surface-panel: rgba(34, 34, 34, .96);
  --dp-surface-card: rgba(255, 255, 255, .035);
  --dp-surface-control: rgba(24, 24, 24, .84);
  --dp-shadow-panel: 0 1px 2px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .025);
  --dp-shadow-raised: 0 10px 30px rgba(0, 0, 0, .2);
  --dp-focus-ring: 0 0 0 3px rgba(244, 245, 243, .22);
}

.dp-body {
  min-height: 100vh;
  color-scheme: dark;
  background-color: var(--nf-color-canvas);
  color: var(--nf-color-text);
  padding: clamp(14px, 2.4vw, 30px);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

.dp-body :focus-visible {
  outline: 2px solid #f4f5f3;
  outline-offset: 2px;
  box-shadow: var(--dp-focus-ring);
}

/* Scrollbars stay visible for discoverability while matching the page's
   dark surfaces. This stylesheet is exclusive to the Data Platform page, so
   the root rules safely cover the document scrollbar as well as every nested
   overflow region. */
html,
.dp-body,
.dp-body * {
  scrollbar-width: thin;
  scrollbar-color: var(--nf-alpha-selection-24) transparent;
}

html::-webkit-scrollbar,
.dp-body::-webkit-scrollbar,
.dp-body *::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

html::-webkit-scrollbar-track,
.dp-body::-webkit-scrollbar-track,
.dp-body *::-webkit-scrollbar-track {
  background: var(--nf-alpha-white-03);
  border-radius: var(--nf-radius-pill);
}

html::-webkit-scrollbar-thumb,
.dp-body::-webkit-scrollbar-thumb,
.dp-body *::-webkit-scrollbar-thumb {
  min-width: 36px;
  min-height: 36px;
  border: 2px solid transparent;
  border-radius: var(--nf-radius-pill);
  background: var(--nf-alpha-selection-24);
  background-clip: padding-box;
}

html::-webkit-scrollbar-thumb:hover,
.dp-body::-webkit-scrollbar-thumb:hover,
.dp-body *::-webkit-scrollbar-thumb:hover {
  background: var(--nf-color-ink-700);
  background-clip: padding-box;
}

html::-webkit-scrollbar-corner,
.dp-body::-webkit-scrollbar-corner,
.dp-body *::-webkit-scrollbar-corner {
  background: transparent;
}

.dp-shell {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
}

.dp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 54px;
}

.dp-header-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.dp-back-link {
  flex: 0 0 auto;
  font-size: 12px;
  color: var(--nf-color-text-muted);
}

.dp-back-link:hover {
  color: var(--nf-color-text);
}

.dp-logout-btn {
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid var(--dp-border);
  border-radius: var(--dp-control-radius);
  background: var(--dp-surface-card);
  color: inherit;
  font: inherit;
  font-weight: var(--nf-weight-medium);
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.dp-logout-btn:hover {
  border-color: var(--dp-border-strong);
  background: var(--nf-color-surface-hover);
  color: var(--nf-color-text);
}

.dp-title {
  margin: 0;
  font-size: clamp(24px, 2.4vw, 30px);
  font-weight: var(--nf-weight-bold);
  letter-spacing: -.025em;
  line-height: 1.15;
}

.dp-subtitle {
  color: var(--nf-color-text-muted);
  font-size: 12px;
  line-height: 1.4;
}

/* Explicit display rules below would defeat the hidden attribute's
   UA display: none, so the view toggle needs this guard. */
.dp-layout[hidden],
.dp-dashboard[hidden],
.dp-variables[hidden],
.dp-search-view[hidden],
.dp-filter-builder[hidden] {
  display: none;
}

.dp-layout {
  display: grid;
  grid-template-columns: minmax(270px, 300px) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

@media (max-width: 768px) {
  .dp-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.dp-sidebar,
.dp-main {
  display: flex;
  flex-direction: column;
  gap: var(--dp-stack-gap);
}

.dp-sidebar {
  height: min(786px, calc(100vh - 178px));
  min-height: 620px;
  padding: 16px 10px 12px;
  border: 1px solid var(--nf-alpha-white-10);
  border-radius: var(--dp-card-radius);
  background: linear-gradient(180deg, var(--nf-alpha-white-05), var(--nf-alpha-white-03));
  box-shadow: inset 0 1px 0 var(--nf-alpha-white-05);
  position: sticky;
  top: clamp(12px, 3vw, 28px);
}

@media (max-width: 768px) {
  .dp-sidebar {
    position: static;
    height: auto;
    min-height: 0;
  }
}

.dp-sidebar-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 6px 12px;
  border-bottom: 1px solid var(--nf-alpha-white-07);
  color: var(--nf-color-text-muted);
  font-size: 11px;
}

.dp-sidebar-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--nf-color-text);
  font-size: 13px;
  font-weight: var(--nf-weight-bold);
}

.dp-sidebar-count {
  min-width: 24px;
  padding: 2px 7px;
  border: 1px solid var(--nf-alpha-selection-24);
  border-radius: var(--nf-radius-pill);
  background: var(--nf-alpha-selection-10);
  color: var(--nf-color-text);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.dp-sidebar-copy {
  color: var(--nf-color-text-muted);
  line-height: 1.35;
}

.dp-table-search {
  width: 100%;
  min-height: 34px;
  margin-top: 7px;
  padding: 7px 10px;
  border: 1px solid var(--nf-alpha-white-10);
  border-radius: var(--dp-control-radius);
  outline: none;
  background: var(--nf-control-background);
  color: var(--nf-color-text);
  font: inherit;
  font-size: 12px;
}

.dp-table-search::placeholder { color: var(--nf-color-text-muted); }
.dp-table-search:focus { border-color: var(--nf-color-selection); box-shadow: 0 0 0 2px var(--nf-color-focus-ring); }

.dp-table-list {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 4px;
  min-height: 0;
  padding: 2px 2px 8px 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

@media (max-width: 768px) {
  .dp-table-list {
    max-height: 280px;
    flex-direction: column;
    flex-wrap: nowrap;
  }
}

.dp-table-list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: var(--nf-radius-sm);
  background: transparent;
  color: var(--nf-color-text);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease, transform 140ms ease;
}

.dp-table-list-item:hover {
  background: var(--nf-color-surface-hover);
  transform: translateX(2px);
}

.dp-table-list-item.is-active {
  background: var(--nf-alpha-selection-10);
  border-color: var(--nf-alpha-selection-24);
  box-shadow: inset 2px 0 0 var(--nf-color-selection);
}

.dp-table-list-item.is-unavailable {
  color: var(--nf-color-text-muted);
}

.dp-table-list-group-label {
  position: sticky;
  z-index: 1;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--nf-color-surface);
  color: var(--nf-color-text-muted);
  font-size: 10px;
  font-weight: var(--nf-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 9px 6px;
}

.dp-table-list-group-label:first-child {
  padding-top: 0;
}

.dp-table-list-group-count {
  min-width: 20px;
  color: var(--nf-color-text-muted);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.dp-table-list-item-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.dp-table-list-item-name {
  overflow: hidden;
  color: var(--nf-color-text);
  font-size: 12px;
  font-weight: var(--nf-weight-medium);
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dp-table-list-item-meta {
  color: var(--nf-color-text-muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  white-space: nowrap;
}

.dp-collection-badge,
.dp-column-collection-note {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  padding: 2px 6px;
  border: 1px solid var(--nf-alpha-white-16);
  border-radius: var(--nf-radius-pill);
  color: var(--nf-color-text-muted);
  font-size: 10px;
  font-weight: var(--nf-weight-medium);
  line-height: 1.2;
  text-transform: none;
}

.dp-table-list-item .dp-collection-badge {
  justify-content: center;
  width: 82px;
  min-width: 82px;
  margin-left: 0;
  padding: 4px 7px;
  box-sizing: border-box;
  font-size: 9px;
  text-align: center;
  white-space: nowrap;
}

.dp-table-list-item .dp-collection-badge.is-ready {
  border-color: rgba(117, 168, 130, .28);
  background: rgba(117, 168, 130, .12);
  color: #a7d2b1;
}

.dp-table-list-item .dp-collection-badge.is-not-connected,
.dp-table-list-item .dp-collection-badge.is-no-history,
.dp-table-list-item .dp-collection-badge.is-stale {
  border-color: rgba(245, 158, 11, .24);
  background: rgba(245, 158, 11, .11);
  color: #f7c65f;
}

.dp-table-list-item .dp-collection-badge.is-failed,
.dp-table-list-item .dp-collection-badge.is-unavailable {
  border-color: rgba(239, 68, 68, .28);
  background: rgba(239, 68, 68, .12);
  color: #fb9292;
}

.dp-table-list-item .dp-collection-badge.is-running {
  border-color: var(--nf-alpha-selection-24);
  background: var(--nf-alpha-selection-10);
  color: var(--nf-color-text);
}

.dp-table-list-empty {
  padding: 22px 10px;
  color: var(--nf-color-text-muted);
  font-size: 12px;
  line-height: 1.4;
}

.dp-column-collection-note {
  margin-left: 5px;
  white-space: nowrap;
}

.dp-loading,
.dp-empty {
  color: var(--nf-color-text-muted);
  font-size: 13px;
  padding: 12px 0;
}

.dp-error {
  padding: 10px 14px;
  border-radius: var(--nf-radius-sm);
  border: 1px solid rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.12);
  color: #ffd0d0;
  font-size: 13px;
}

.dp-toolbar {
  display: grid;
  grid-template-columns: minmax(120px, 0.75fr) auto auto;
  align-items: end;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--nf-alpha-white-10);
  border-radius: var(--dp-card-radius);
  background: linear-gradient(135deg, var(--nf-alpha-white-05), var(--nf-alpha-white-03));
  box-shadow: inset 0 1px 0 var(--nf-alpha-white-05);
}

.dp-toolbar-copy {
  display: flex;
  flex-direction: column;
  align-self: center;
  gap: 3px;
}

.dp-toolbar-title {
  color: var(--nf-color-text);
  font-size: 13px;
  font-weight: var(--nf-weight-bold);
}

.dp-toolbar-hint {
  color: var(--nf-color-text-muted);
  font-size: 11px;
}

.dp-toolbar-fields,
.dp-toolbar-actions {
  display: flex;
  align-items: end;
  gap: 8px;
}

.dp-toolbar-actions {
  padding-left: 14px;
  border-left: 1px solid var(--nf-alpha-white-10);
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dp-toolbar-actions .dp-refresh-control {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dp-toolbar-actions .dp-last-refreshed {
  white-space: normal;
}

.dp-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--nf-color-text-muted);
}

.dp-input {
  background: var(--nf-control-background);
  border: 1px solid var(--nf-alpha-white-10);
  border-radius: var(--dp-control-radius);
  color: var(--nf-color-text);
  min-height: 34px;
  padding: 7px 10px;
  font: inherit;
  font-size: 13px;
}

.dp-btn {
  cursor: pointer;
  border: 1px solid var(--nf-alpha-white-16);
  background: var(--nf-alpha-white-07);
  color: var(--nf-color-text);
  font: inherit;
  font-size: 13px;
  min-height: 34px;
  padding: 7px 14px;
  border-radius: var(--dp-control-radius);
  transition: border-color 140ms ease, background-color 140ms ease, transform 140ms ease;
}

.dp-btn:hover:not(:disabled) {
  background: var(--nf-color-surface-hover);
  border-color: var(--nf-alpha-selection-24);
  transform: translateY(-1px);
}

.dp-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.dp-btn--primary {
  background: var(--nf-color-selection);
  border-color: var(--nf-color-selection);
  color: var(--nf-color-selection-text);
}

.dp-btn--sm {
  padding: 5px 10px;
  font-size: 12px;
}

.dp-input--sm {
  padding: 5px 8px;
  font-size: 12px;
}

/* -------------------------------------------------------------------------
   Filter builder (Wave F1)
   ------------------------------------------------------------------------- */

.dp-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 10px 14px;
  border: 1px solid var(--nf-alpha-white-10);
  border-radius: var(--dp-card-radius);
  background: var(--nf-alpha-white-03);
}

.dp-filter-bar[hidden] {
  display: none;
}

.dp-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dp-filter-label {
  padding-right: 10px;
  border-right: 1px solid var(--nf-alpha-white-10);
  color: var(--nf-color-text-muted);
  font-size: 11px;
  font-weight: var(--nf-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dp-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  font-size: 12px;
  color: var(--nf-color-text);
  background: var(--nf-alpha-selection-10);
  border: 1px solid var(--nf-alpha-selection-24);
  border-radius: var(--nf-radius-pill);
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
}

.dp-filter-chip > span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.dp-filter-chip-remove {
  cursor: pointer;
  border: none;
  background: none;
  color: var(--nf-color-text-muted);
  font: inherit;
  font-size: 12px;
  padding: 0 2px;
  line-height: 1;
  flex-shrink: 0;
}

.dp-filter-chip-remove:hover {
  color: var(--nf-color-text);
}

.dp-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.dp-filter-row[hidden] {
  display: none;
}

.dp-info-panel {
  border: 1px solid var(--nf-alpha-white-10);
  border-radius: var(--dp-card-radius);
  background: var(--nf-alpha-white-03);
  padding: var(--dp-card-pad);
}

.dp-info-panel summary {
  cursor: pointer;
  color: var(--nf-color-text);
  font-size: 13px;
  font-weight: var(--nf-weight-medium);
}

.dp-info-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
  font-size: 13px;
}

.dp-info-row {
  display: flex;
  gap: 8px;
}

.dp-info-row--columns {
  flex-direction: column;
}

.dp-info-label {
  color: var(--nf-color-text-muted);
  min-width: 96px;
  flex-shrink: 0;
}

.dp-info-value {
  color: var(--nf-color-text);
  word-break: break-word;
}

.dp-grid-wrap {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--nf-alpha-white-10);
  border-radius: var(--dp-card-radius);
  background: linear-gradient(180deg, var(--nf-alpha-white-05), var(--nf-alpha-white-03));
  padding: 0;
  min-width: 0;
  box-shadow: inset 0 1px 0 var(--nf-alpha-white-05);
}

.dp-grid-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--nf-alpha-white-10);
}

.dp-grid-heading {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.dp-grid-eyebrow {
  color: var(--nf-color-text-muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.dp-grid-title {
  margin: 0;
  overflow: hidden;
  color: var(--nf-color-text);
  font-size: 16px;
  font-weight: var(--nf-weight-bold);
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dp-grid-row-summary {
  flex: 0 0 auto;
  padding: 4px 9px;
  border: 1px solid var(--nf-alpha-white-10);
  border-radius: var(--nf-radius-pill);
  background: var(--nf-alpha-white-05);
  color: var(--nf-color-text-muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.dp-grid-loading,
.dp-dash-loading {
  z-index: 4;
  width: max-content;
  padding: 5px 9px;
  border: 1px solid var(--nf-alpha-selection-24);
  border-radius: var(--nf-radius-pill);
  background: var(--nf-color-surface-raised);
  box-shadow: var(--shadow);
  color: var(--nf-color-text-muted);
  font-size: 11px;
  pointer-events: none;
}

.dp-grid-loading {
  position: absolute;
  top: 14px;
  right: 16px;
}

.dp-grid-scroll {
  height: 392px;
  overflow: auto;
  max-width: 100%;
  background: rgba(0, 0, 0, .24);
}

.dp-table {
  border-collapse: collapse;
  width: 100%;
  min-width: max-content;
  font-size: 13px;
}

.dp-table thead th {
  position: sticky;
  top: 0;
  background: var(--nf-color-surface-raised);
  color: var(--nf-color-text-muted);
  text-align: left;
  height: 38px;
  padding: 9px 12px;
  white-space: nowrap;
  border-bottom: 1px solid var(--nf-alpha-white-10);
}

.dp-th-sort {
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  font: inherit;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.dp-th-sort:hover {
  color: var(--nf-color-text);
}

.dp-sort-indicator {
  font-size: 10px;
}

.dp-table tbody td {
  height: 38px;
  padding: 8px 12px;
  white-space: nowrap;
  border-bottom: 1px solid var(--nf-alpha-white-05);
  color: var(--nf-color-text);
}

.dp-table tbody tr:nth-child(even) {
  background: var(--nf-alpha-white-03);
}

.dp-table tbody tr:hover {
  background: var(--nf-color-surface-hover);
}

.dp-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 54px;
  padding: 9px 16px;
  border-top: 1px solid var(--nf-alpha-white-10);
  background: var(--nf-alpha-white-03);
}

.dp-page-info {
  color: var(--nf-color-text-muted);
  font-size: 13px;
}

#dp-grid-empty {
  position: absolute;
  z-index: 2;
  top: 64px;
  right: 0;
  bottom: 54px;
  left: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  pointer-events: none;
}

#dp-grid-empty[hidden] {
  display: none;
}

@media (max-width: 1180px) {
  .dp-toolbar {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 12px;
  }

  .dp-toolbar-copy {
    display: none;
  }

  .dp-toolbar-fields,
  .dp-toolbar-actions {
    flex-wrap: wrap;
  }

  .dp-toolbar-actions {
    padding-top: 10px;
    padding-left: 0;
    border-top: 1px solid var(--nf-alpha-white-10);
    border-left: 0;
  }
}

@media (max-width: 768px) {
  .dp-toolbar-fields,
  .dp-toolbar-actions {
    align-items: stretch;
  }

  .dp-toolbar-fields .dp-field {
    flex: 1 1 140px;
  }

  .dp-toolbar-actions .dp-btn {
    flex: 1 1 120px;
  }

  .dp-grid-scroll {
    height: 360px;
  }
}

/* -------------------------------------------------------------------------
   Filter builder (Wave 6): column/op/value rows, chips for active filters.
   ------------------------------------------------------------------------- */

.dp-filter-builder {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: var(--dp-card-pad);
  border: 1px solid var(--nf-alpha-white-07);
  border-radius: var(--dp-card-radius);
  background: var(--nf-alpha-white-03);
}

.dp-filter-builder-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dp-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

@media (max-width: 390px) {
  .dp-filter-row {
    flex-direction: column;
    align-items: stretch;
  }
}

.dp-filter-select {
  background: var(--nf-control-background);
  border: 1px solid var(--nf-alpha-white-10);
  border-radius: var(--dp-control-radius);
  color: var(--nf-color-text);
  padding: 6px 10px;
  font: inherit;
  font-size: 13px;
  min-width: 0;
}

.dp-filter-row-remove {
  padding: 5px 10px;
  font-size: 12px;
}

.dp-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dp-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 4px 10px;
  border: 1px solid var(--nf-alpha-white-16);
  border-radius: var(--dp-control-radius);
  background: var(--nf-alpha-white-07);
  color: var(--nf-color-text);
  font-size: 12px;
  white-space: nowrap;
}

.dp-filter-chip-remove {
  cursor: pointer;
  border: none;
  background: none;
  color: var(--nf-color-text-muted);
  font: inherit;
  font-size: 12px;
  padding: 0 2px;
  line-height: 1;
}

.dp-filter-chip-remove:hover {
  color: var(--nf-color-text);
}

/* -------------------------------------------------------------------------
   Dashboard (Wave 5): view toggle, KPI tiles, inline SVG charts.
   ------------------------------------------------------------------------- */

.dp-view-toggle {
  display: flex;
  align-self: flex-start;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--nf-alpha-white-10);
  border-radius: calc(var(--dp-control-radius) + 4px);
  background: var(--nf-alpha-white-03);
}

.dp-view-btn {
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  color: var(--nf-color-text-muted);
  font: inherit;
  font-size: 13px;
  min-width: 92px;
  padding: 7px 16px;
  border-radius: var(--dp-control-radius);
  transition: color 140ms ease, border-color 140ms ease, background-color 140ms ease;
}

.dp-view-btn:hover {
  color: var(--nf-color-text);
  background: var(--nf-color-surface-hover);
}

.dp-view-btn.is-active {
  color: var(--nf-color-text);
  background: linear-gradient(180deg, var(--nf-alpha-selection-24), var(--nf-alpha-selection-10));
  border-color: var(--nf-alpha-selection-24);
  box-shadow: inset 0 1px 0 var(--nf-alpha-white-10);
}

.dp-dashboard {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--dp-stack-gap);
  min-width: 0;
}

.dp-variables {
  display: flex;
  flex-direction: column;
  gap: var(--dp-stack-gap);
  min-width: 0;
}

.dp-dash-loading {
  position: fixed;
  right: max(18px, env(safe-area-inset-right, 0px));
  bottom: max(18px, env(safe-area-inset-bottom, 0px));
}

.dp-dash-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: var(--dp-card-pad);
  border: 1px solid var(--nf-alpha-white-07);
  border-radius: var(--dp-card-radius);
  background: var(--nf-alpha-white-03);
  justify-content: space-between;
}

.dp-dash-toolbar--dashboard {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  justify-content: stretch;
}

.dp-dash-toolbar-head,
.dp-dash-toolbar-controls {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.dp-dash-toolbar-controls {
  align-items: end;
  padding-top: 12px;
  border-top: 1px solid var(--nf-alpha-white-07);
}

.dp-dash-toolbar-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 150px;
}

.dp-dash-range-copy {
  color: var(--nf-color-text);
  font-size: 15px;
  font-weight: var(--nf-weight-bold);
  line-height: 1.25;
}

.dp-range-presets {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.dp-range-group {
  display: flex;
  gap: 6px;
  padding: 4px;
  border-radius: var(--nf-radius-pill);
  background: var(--nf-alpha-white-05);
}

.dp-range-btn,
.dp-variable-range-btn {
  cursor: pointer;
  border: 1px solid var(--nf-alpha-white-16);
  background: var(--nf-alpha-white-07);
  color: var(--nf-color-text);
  font: inherit;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: var(--nf-radius-pill);
}

.dp-dash-toolbar--dashboard .dp-range-group {
  gap: 3px;
  padding: 3px;
  border-radius: 10px;
}

.dp-dash-toolbar--dashboard .dp-range-btn {
  min-height: 34px;
  padding: 6px 14px;
  border-color: transparent;
  background: transparent;
  color: var(--nf-color-text-muted);
  font-weight: var(--nf-weight-medium);
}

.dp-custom-range-panel {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-self: end;
}

.dp-custom-range-panel .dp-custom-range { justify-content: flex-end; }

.dp-custom-range {
  display: flex;
  align-items: end;
  gap: 8px;
}

.dp-refresh-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dp-last-refreshed,
.dp-section-note {
  color: var(--nf-color-text-muted);
  font-size: 11px;
  white-space: nowrap;
}

.dp-dash-toolbar--dashboard .dp-refresh-control {
  flex-direction: row;
}

.dp-dash-toolbar--dashboard .dp-refresh-control .dp-btn {
  min-height: 38px;
}

.dp-dashboard-section,
.dp-dashboard-quality {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--nf-alpha-white-07);
  border-radius: var(--dp-card-radius);
  background: linear-gradient(135deg, var(--nf-alpha-white-05), var(--nf-alpha-white-03));
}

.dp-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.dp-section-heading h2,
.dp-dashboard-quality h2 {
  margin: 2px 0 0;
  font-size: 16px;
}

.dp-section-kicker {
  color: var(--nf-color-text-muted);
  font-size: 10px;
  font-weight: var(--nf-weight-bold);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.dp-section-link {
  color: var(--nf-color-link);
  font-size: 12px;
  text-decoration: none;
}

.dp-quality-content {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, .75fr);
  gap: 12px;
}

.dp-quality-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--nf-alpha-white-07);
  border-radius: var(--nf-radius-md);
  background: rgba(20, 20, 20, .48);
  box-shadow: inset 0 1px 0 var(--nf-alpha-white-03);
}

.dp-quality-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.dp-quality-panel-head h3,
.dp-quality-empty h3 {
  margin: 0;
  color: var(--nf-color-text);
  font-size: 13px;
}

.dp-quality-panel-meta {
  color: var(--nf-color-text-muted);
  font-size: 11px;
  white-space: nowrap;
}

.dp-quality-source-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.dp-quality-source-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 10px 11px;
  border: 1px solid var(--nf-alpha-white-07);
  border-radius: var(--nf-control-radius);
  background: var(--nf-alpha-white-03);
}

.dp-quality-source-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.dp-quality-source-copy strong {
  overflow: hidden;
  color: var(--nf-color-text);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dp-quality-source-copy span {
  color: var(--nf-color-text-muted);
  font-size: 10px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.dp-quality-status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border: 1px solid transparent;
  border-radius: var(--nf-radius-pill);
  font-size: 9px;
  font-weight: var(--nf-weight-bold);
  letter-spacing: .04em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.dp-quality-status.is-ready {
  border-color: rgba(117, 168, 130, .28);
  background: rgba(117, 168, 130, .12);
  color: #a7d2b1;
}

.dp-quality-status.is-running {
  border-color: var(--nf-alpha-selection-24);
  background: var(--nf-alpha-selection-10);
  color: var(--nf-color-text);
}

.dp-quality-status.is-no-history,
.dp-quality-status.is-not-connected,
.dp-quality-status.is-stale {
  border-color: rgba(245, 158, 11, .24);
  background: rgba(245, 158, 11, .11);
  color: #f7c65f;
}

.dp-quality-status.is-failed {
  border-color: rgba(239, 68, 68, .28);
  background: rgba(239, 68, 68, .12);
  color: #fb9292;
}

.dp-quality-status.is-unknown {
  border-color: var(--nf-alpha-white-10);
  background: var(--nf-alpha-white-05);
  color: var(--nf-color-text-muted);
}

.dp-quality-checks {
  grid-column: 1 / -1;
}

.dp-quality-checks .dp-quality-panel-head {
  flex-wrap: wrap;
}

.dp-quality-checks .dp-quality-panel-meta {
  white-space: normal;
}

.dp-quality-checks .dp-quality-source-list {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
}

.dp-quality-more > summary {
  width: fit-content;
  list-style: none;
  cursor: pointer;
}

.dp-quality-more > summary::-webkit-details-marker { display: none; }

.dp-quality-more[open] > summary {
  margin-bottom: 8px;
  border-color: var(--nf-alpha-selection-24);
  background: var(--nf-alpha-selection-10);
}

.dp-quality-coverage-total {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.dp-quality-coverage-total strong {
  color: var(--nf-color-text);
  font-size: 24px;
  letter-spacing: -.02em;
}

.dp-quality-coverage-total span {
  color: var(--nf-color-text-muted);
  font-size: 11px;
}

.dp-quality-coverage-bar {
  display: flex;
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: var(--nf-radius-pill);
  background: var(--nf-alpha-white-07);
}

.dp-quality-coverage-bar > span { display: block; min-width: 2px; }
.dp-quality-coverage-bar .is-observed { background: var(--nf-color-success-500); }
.dp-quality-coverage-bar .is-empty { background: #f59e0b; }
.dp-quality-coverage-bar .is-blocked { background: var(--nf-color-danger-500); }

.dp-quality-legend {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.dp-quality-legend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--nf-color-text-muted);
  font-size: 11px;
}

.dp-quality-legend-row strong {
  color: var(--nf-color-text);
  font-size: 12px;
}

.dp-quality-legend-name {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.dp-quality-legend-name i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.dp-quality-legend-name i.is-observed { background: var(--nf-color-success-500); }
.dp-quality-legend-name i.is-empty { background: #f59e0b; }
.dp-quality-legend-name i.is-blocked { background: var(--nf-color-danger-500); }

.dp-quality-empty p {
  margin: 0;
  color: var(--nf-color-text-muted);
  font-size: 12px;
}

.dp-variable-search { display: flex; flex-direction: column; gap: 4px; }

.dp-variable-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  align-items: start;
}

.dp-variable-row {
  border: 1px solid var(--nf-alpha-white-10);
  border-radius: var(--dp-control-radius);
  background: var(--nf-alpha-white-03);
  overflow: hidden;
}

.dp-variable-row[open] {
  grid-column: 1 / -1;
}

.dp-variable-row summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(88px, auto) auto 24px;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
  min-height: 56px;
  padding: 7px 10px;
  cursor: pointer;
  list-style: none;
}

.dp-variable-row summary::-webkit-details-marker { display: none; }
.dp-variable-row summary::after {
  content: '+';
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: var(--nf-color-text-muted);
  font-size: 17px;
  line-height: 1;
  border-radius: 6px;
  background: var(--nf-alpha-white-05);
}
.dp-variable-row[open] summary::after { content: '−'; }
.dp-variable-row summary:hover { background: var(--nf-color-surface-hover); }
.dp-variable-row-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dp-variable-row-name strong { color: var(--nf-color-text); font-size: 12px; line-height: 1.25; overflow-wrap: anywhere; }
.dp-variable-row-name span { color: var(--nf-color-text-muted); font-size: 10px; line-height: 1.25; overflow-wrap: anywhere; }
.dp-variable-row-metric { display: flex; flex-direction: column; align-items: flex-end; min-width: 0; }
.dp-variable-row-value { color: var(--nf-color-text); font-size: 14px; font-weight: var(--nf-weight-bold); line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dp-variable-row-unit { color: var(--nf-color-text-muted); font-size: 10px; line-height: 1.2; }
.dp-variable-row .dp-variable-status { justify-self: end; }
.dp-variable-row.is-empty .dp-variable-status { background: rgba(59, 130, 246, .12); color: #93c5fd; }
.dp-variable-row.is-blocked .dp-variable-status { background: rgba(245, 158, 11, .12); color: #fcd34d; }

.dp-variable-row-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  border-top: 1px solid var(--nf-alpha-white-07);
  background: var(--nf-alpha-white-03);
}

.dp-variable-row-body.has-visual {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
}

.dp-variable-details {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.dp-variable-detail-row {
  grid-column: span 2;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--nf-alpha-white-07);
  border-radius: var(--dp-control-radius);
  background: var(--nf-alpha-white-03);
}

.dp-variable-detail-row--formula { grid-column: span 4; }
.dp-variable-detail-row--coverage { grid-column: span 4; }
.dp-variable-detail-row--limitations { grid-column: 1 / -1; }
.dp-variable-detail-row dt { margin: 0 0 4px; color: var(--nf-color-text-muted); font-size: 9px; font-weight: var(--nf-weight-medium); text-transform: uppercase; letter-spacing: .06em; }
.dp-variable-detail-row dd { margin: 0; color: var(--nf-color-text); font-size: 11px; line-height: 1.35; overflow-wrap: anywhere; }

.dp-variable-coverage-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.dp-variable-coverage-chip {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 7px;
  border-radius: var(--nf-radius-pill);
  background: var(--nf-alpha-white-07);
  color: var(--nf-color-text-muted);
  font-size: 10px;
  line-height: 1.2;
}

.dp-variable-coverage-chip.is-observed { background: rgba(34, 197, 94, .1); color: #86efac; }
.dp-variable-coverage-chip.is-no_rows { background: rgba(59, 130, 246, .1); color: #93c5fd; }
.dp-variable-coverage-chip.is-blocked { background: rgba(245, 158, 11, .1); color: #fcd34d; }
.dp-variable-coverage-note { display: block; margin-top: 6px; color: var(--nf-color-text-muted); }

.dp-variable-row-body > .dp-variable-reason {
  grid-column: 1 / -1;
  padding: 8px 10px;
  border-radius: var(--dp-control-radius);
  background: var(--nf-alpha-white-05);
}

.dp-variable-insights {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.dp-variable-trend-panel {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: space-between;
  min-height: 0;
  margin: 0;
  padding: 9px 10px;
  border: 1px solid var(--nf-alpha-white-07);
  border-radius: var(--dp-control-radius);
  background: var(--nf-alpha-white-03);
}

.dp-variable-trend-panel figcaption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  color: var(--nf-color-text-muted);
  font-size: 9px;
  font-weight: var(--nf-weight-medium);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.dp-variable-trend-panel figcaption span:last-child { font-weight: var(--nf-weight-normal); letter-spacing: 0; text-transform: none; }
.dp-variable-row-body .dp-variable-sparkline { align-self: center; height: 66px; margin: 8px 0 0; }

.dp-prepared-summary {
  color: var(--nf-color-text-muted);
  font-size: 13px;
  padding: 0 2px;
}

.dp-variable-groups,
.dp-variable-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dp-variable-groups {
  gap: 20px;
}

.dp-variable-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px;
}

.dp-variable-section-head h2 {
  margin: 0;
  color: var(--nf-color-text);
  font-size: 16px;
  font-weight: var(--nf-weight-bold);
}

.dp-variable-section-head span {
  color: var(--nf-color-text-muted);
  font-size: 12px;
}

@media (max-width: 980px) {
  .dp-variable-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .dp-variable-row-body.has-visual {
    grid-template-columns: minmax(0, 1fr) minmax(200px, 240px);
  }
}

.dp-variable-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 12px;
}

.dp-variable-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 178px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid var(--nf-alpha-white-10);
  border-radius: var(--dp-card-radius);
  background: var(--nf-alpha-white-03);
}

.dp-variable-card.is-blocked,
.dp-variable-card.is-empty {
  min-height: 150px;
  background: var(--nf-alpha-white-03);
  border-style: dashed;
}

.dp-variable-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.dp-variable-label {
  margin: 0;
  color: var(--nf-color-text-muted);
  font-size: 12px;
  font-weight: var(--nf-weight-medium);
  line-height: 1.35;
}

.dp-variable-status {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: var(--nf-radius-pill);
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.is-blocked .dp-variable-status {
  background: rgba(245, 158, 11, 0.12);
  color: #fcd34d;
}

.is-empty .dp-variable-status {
  background: rgba(59, 130, 246, 0.12);
  color: #93c5fd;
}

.dp-variable-value {
  color: var(--nf-color-text);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: var(--nf-weight-bold);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.dp-variable-card-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

.is-blocked .dp-variable-value,
.is-empty .dp-variable-value {
  color: var(--nf-color-text-muted);
  font-size: 18px;
}

.dp-variable-reason {
  margin: 0;
  color: var(--nf-color-text-muted);
  font-size: 12px;
  line-height: 1.45;
}

.dp-variable-sparkline {
  display: block;
  width: 100%;
  height: 54px;
  margin-top: auto;
}

.dp-variable-baseline {
  stroke: var(--nf-alpha-white-10);
  stroke-width: 1;
}

.dp-variable-line {
  fill: none;
  stroke: var(--nf-color-data);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dp-variable-foot {
  color: var(--nf-color-text-muted);
  font-size: 11px;
}

.dp-variable-breakdown {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: auto;
}

.dp-variable-breakdown-row {
  display: grid;
  grid-template-columns: minmax(60px, 0.8fr) 1fr;
  align-items: center;
  gap: 8px;
  color: var(--nf-color-text-muted);
  font-size: 10px;
}

.dp-variable-breakdown-track {
  height: 5px;
  overflow: hidden;
  border-radius: var(--nf-radius-pill);
  background: var(--nf-alpha-white-07);
}

.dp-variable-breakdown-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--nf-color-data);
}

@media (max-width: 720px) {
  .dp-dash-toolbar,
  .dp-custom-range {
    align-items: stretch;
  }

  .dp-dash-toolbar,
  .dp-custom-range {
    flex-direction: column;
  }

  .dp-range-group {
    width: 100%;
  }

  .dp-range-btn,
  .dp-variable-range-btn {
    flex: 1 1 0;
  }

  .dp-custom-range {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .dp-custom-range .dp-btn {
    grid-column: 1 / -1;
  }

  .dp-dash-toolbar--dashboard {
    padding: 12px;
  }

  .dp-dash-toolbar--dashboard .dp-range-btn {
    padding: 6px 8px;
    font-size: 12px;
    white-space: nowrap;
  }

  .dp-dash-toolbar-head {
    align-items: start;
  }

  .dp-dash-toolbar--dashboard .dp-refresh-control {
    flex-direction: column-reverse;
    align-items: end;
    gap: 5px;
    width: auto;
  }

  .dp-dash-toolbar-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .dp-range-presets,
  .dp-custom-range-panel {
    width: 100%;
  }

  .dp-variable-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .dp-dashboard .dp-chart-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .dp-dashboard .dp-chart-card {
    padding: 12px;
  }

  .dp-dashboard .dp-chart-axis-label {
    font-size: var(--dp-chart-axis-size, 15px);
  }

  .dp-refresh-control { width: 100%; justify-content: space-between; }
  .dp-variable-row summary { grid-template-columns: minmax(0, 1fr) auto 24px; gap: 5px 8px; min-height: 58px; }
  .dp-variable-row-name { grid-column: 1; grid-row: 1 / span 2; }
  .dp-variable-row-metric { grid-column: 2; grid-row: 1; }
  .dp-variable-row .dp-variable-status { grid-column: 2; grid-row: 2; }
  .dp-variable-row summary::after { grid-column: 3; grid-row: 1 / span 2; }
  .dp-variable-row-body,
  .dp-variable-row-body.has-visual { grid-template-columns: 1fr; }
  .dp-variable-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dp-variable-detail-row,
  .dp-variable-detail-row--formula,
  .dp-variable-detail-row--coverage,
  .dp-variable-detail-row--limitations { grid-column: 1 / -1; }
  .dp-variable-detail-row--source-tables,
  .dp-variable-detail-row--aggregation { grid-column: span 1; }
  .dp-variable-row-body .dp-variable-sparkline { height: 58px; }
  .dp-section-heading { align-items: start; flex-direction: column; }
}

.dp-range-btn:hover,
.dp-variable-range-btn:hover {
  background: var(--nf-color-surface-hover);
}

.dp-range-btn.is-active,
.dp-variable-range-btn.is-active {
  background: var(--nf-color-selection);
  border-color: var(--nf-color-selection);
  color: var(--nf-color-selection-text);
}

.dp-dash-toolbar--dashboard .dp-range-btn.is-active {
  background: var(--nf-color-selection);
  border-color: var(--nf-color-selection);
  color: var(--nf-color-selection-text);
  box-shadow: none;
}

.dp-kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--dp-stack-gap);
}

.dp-kpi-tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: var(--dp-card-pad);
  border: 1px solid var(--nf-alpha-white-07);
  border-radius: var(--dp-card-radius);
  background: var(--nf-alpha-white-03);
  min-width: 0;
}

.dp-kpi-label {
  color: var(--nf-color-text-muted);
  font-size: 12px;
}

.dp-kpi-value {
  color: var(--nf-color-text);
  font-size: clamp(18px, 2.4vw, 24px);
  font-weight: var(--nf-weight-bold);
  font-variant-numeric: proportional-nums;
  overflow-wrap: anywhere;
}

.dp-kpi-detail {
  margin-top: auto;
  color: var(--nf-color-text-muted);
  font-size: 10px;
  line-height: 1.35;
}

.dp-chart-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--dp-section-gap);
}

.dp-chart-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--nf-alpha-white-07);
  border-radius: var(--dp-card-radius);
  background: var(--nf-alpha-white-03);
  min-width: 0;
}

.dp-chart-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
}

.dp-chart-title {
  color: var(--nf-color-text);
  font-size: 15px;
  font-weight: var(--nf-weight-bold);
  line-height: 1.3;
}

.dp-chart-current {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  color: var(--nf-color-text-muted);
  font-size: 10px;
  line-height: 1.2;
}

.dp-chart-current span:first-child {
  font-size: 9px;
  font-weight: var(--nf-weight-medium);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.dp-chart-current strong {
  color: var(--nf-color-text);
  font-size: 14px;
  font-weight: var(--nf-weight-bold);
  font-variant-numeric: tabular-nums;
}

.dp-chart-svg-wrap {
  width: 100%;
  overflow: hidden;
  border-radius: var(--nf-radius-sm);
}

.dp-chart-svg-wrap:focus-within {
  box-shadow: 0 0 0 2px var(--nf-alpha-selection-24);
}

.dp-chart-svg {
  display: block;
  width: 100%;
  height: auto;
}

.dp-chart-grid-line {
  stroke: var(--nf-alpha-white-10);
  stroke-width: 1;
  shape-rendering: crispEdges;
}

.dp-chart-axis-label {
  fill: #b9b9b7;
  font-size: var(--dp-chart-axis-size, 12px);
  font-weight: var(--nf-weight-medium);
}

.dp-chart-mark {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.dp-chart-gap-bridge {
  fill: none;
  opacity: .82;
  stroke-dasharray: 5 4;
  stroke-linecap: round;
  stroke-width: 2;
}

.dp-chart-gap-note {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: -3px;
  color: var(--nf-color-text-muted);
  font-size: 10px;
}

.dp-chart-gap-note i {
  width: 18px;
  border-top: 2px dashed var(--nf-color-data);
}

.dp-chart-area {
  stroke: none;
  opacity: 0.1;
}

.dp-chart-bar {
  cursor: pointer;
}

.dp-chart-hit {
  fill: transparent;
  cursor: crosshair;
}

.dp-chart-hit:focus {
  outline: none;
}

.dp-chart-crosshair {
  stroke: var(--nf-alpha-white-16);
  stroke-width: 1;
  pointer-events: none;
}

.dp-chart-empty {
  color: var(--nf-color-text-muted);
  font-size: 13px;
  padding: 24px 0;
  text-align: center;
}

.dp-chart-tooltip {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  background: var(--nf-color-surface-raised);
  border: 1px solid var(--nf-alpha-white-16);
  border-radius: var(--nf-radius-sm);
  padding: 8px 11px;
  font-size: 13px;
  line-height: 1.4;
  white-space: nowrap;
}

.dp-chart-tooltip[hidden] {
  display: none;
}

.dp-tooltip-value {
  color: var(--nf-color-text);
  font-weight: var(--nf-weight-bold);
  font-size: 14px;
}

.dp-tooltip-date {
  color: var(--nf-color-text-muted);
}

@media (max-width: 1180px) {
  .dp-chart-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .dp-chart-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .dp-quality-content {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .dp-chart-card {
    padding: 12px;
  }

  .dp-chart-axis-label {
    font-size: var(--dp-chart-axis-size, 15px);
  }

  .dp-quality-source-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .dp-quality-panel {
    padding: 12px;
  }
}

/* -------------------------------------------------------------------------
   Global search (Wave F2): search bar (visible in Tables + Dashboard) and
   the dedicated search results view.
   ------------------------------------------------------------------------- */

.dp-search-bar {
  display: flex;
  gap: 8px;
}

.dp-search-input {
  flex: 1 1 auto;
  min-width: 0;
}

.dp-search-view {
  display: flex;
  flex-direction: column;
  gap: var(--dp-stack-gap);
  min-width: 0;
}

.dp-search-meta {
  color: var(--nf-color-text-muted);
  font-size: 12px;
}

.dp-search-meta[hidden] {
  display: none;
}

.dp-search-results {
  display: flex;
  flex-direction: column;
  gap: var(--dp-stack-gap);
  min-width: 0;
}

.dp-search-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: var(--dp-card-pad);
  border: 1px solid var(--nf-alpha-white-07);
  border-radius: var(--dp-card-radius);
  background: var(--nf-alpha-white-03);
  min-width: 0;
}

.dp-search-card-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.dp-search-card-table {
  color: var(--nf-color-text);
  font-weight: var(--nf-weight-bold);
  font-size: 14px;
}

.dp-search-card-source {
  color: var(--nf-color-text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dp-search-card-columns {
  color: var(--nf-color-text-muted);
  font-size: 12px;
  word-break: break-word;
}

.dp-search-card-grid {
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--nf-alpha-white-07);
  border-radius: var(--nf-radius-sm);
}

.dp-search-card-note {
  color: var(--nf-color-text-muted);
  font-size: 12px;
}

.dp-search-open-btn {
  align-self: flex-start;
}

/* -------------------------------------------------------------------------
   Unified workspace refinement

   These shared rules are intentionally grouped after the feature sections.
   They keep interaction geometry, surfaces and type hierarchy consistent
   across Dashboard, Variables, Tables and the signed-out screen.
   ------------------------------------------------------------------------- */

.dp-body :focus-visible {
  outline: 2px solid #f4f5f3;
  outline-offset: 2px;
  box-shadow: var(--dp-focus-ring);
}

.dp-view-toggle,
.dp-dash-toolbar,
.dp-dashboard-section,
.dp-dashboard-quality,
.dp-sidebar,
.dp-toolbar,
.dp-filter-bar,
.dp-info-panel,
.dp-grid-wrap,
.dp-search-card {
  border-color: var(--dp-border);
  background: var(--dp-surface-panel);
  box-shadow: var(--dp-shadow-panel);
}

.dp-kpi-tile,
.dp-chart-card,
.dp-quality-panel,
.dp-quality-source-row,
.dp-variable-row,
.dp-variable-detail-row,
.dp-variable-trend-panel {
  border-color: var(--dp-border);
  background: var(--dp-surface-card);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .018);
}

.dp-field,
.dp-variable-search,
.dp-range-presets,
.dp-custom-range-panel {
  gap: 6px;
}

.dp-field-label,
.dp-toolbar-hint,
.dp-sidebar-copy,
.dp-last-refreshed,
.dp-section-note,
.dp-grid-eyebrow,
.dp-quality-panel-meta {
  color: var(--nf-color-text-muted);
  font-size: 11px;
  line-height: 1.35;
}

.dp-field-label {
  font-weight: var(--nf-weight-medium);
}

.dp-input,
.dp-table-search,
.dp-filter-select {
  min-height: var(--dp-control-height);
  padding: 8px 12px;
  border-color: var(--dp-border);
  border-radius: var(--dp-control-radius);
  background: var(--dp-surface-control);
  color: var(--nf-color-text);
  font-size: 13px;
  line-height: 1.2;
  transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

.dp-input:hover,
.dp-table-search:hover,
.dp-filter-select:hover {
  border-color: var(--dp-border-strong);
  background: rgba(24, 24, 24, .86);
}

.dp-input:focus,
.dp-table-search:focus,
.dp-filter-select:focus {
  border-color: rgba(244, 245, 243, .68);
  background: rgba(24, 24, 24, .90);
  box-shadow: var(--dp-focus-ring);
  outline: none;
}

.dp-input::placeholder,
.dp-table-search::placeholder {
  color: rgba(183, 189, 196, .72);
}

.dp-btn {
  min-height: var(--dp-control-height);
  padding: 8px 14px;
  border-color: var(--dp-border-strong);
  border-radius: var(--dp-control-radius);
  background: rgba(255, 255, 255, .055);
  color: var(--nf-color-text);
  font-size: 13px;
  font-weight: var(--nf-weight-semibold);
  line-height: 1.2;
  transition: background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}

.dp-btn:hover:not(:disabled) {
  border-color: rgba(244, 245, 243, .28);
  background: rgba(244, 245, 243, .07);
  transform: none;
}

.dp-btn:active:not(:disabled) {
  background: rgba(244, 245, 243, .12);
}

.dp-btn:disabled {
  opacity: .42;
}

.dp-btn--primary {
  border-color: var(--nf-color-selection);
  background: var(--nf-color-selection);
  color: var(--nf-color-selection-text);
  box-shadow: none;
}

.dp-btn--primary:hover:not(:disabled) {
  border-color: #ffffff;
  background: #ffffff;
}

.dp-btn--sm,
.dp-input--sm {
  min-height: 34px;
  padding-block: 6px;
  font-size: 12px;
}

.dp-view-toggle {
  gap: 3px;
  padding: 3px;
  border-radius: 12px;
}

.dp-view-btn {
  min-width: 96px;
  min-height: 38px;
  padding: 8px 16px;
  border-radius: 9px;
  color: var(--nf-color-text-muted);
  font-size: 13px;
  font-weight: var(--nf-weight-medium);
}

.dp-view-btn.is-active {
  border-color: var(--nf-color-selection);
  background: var(--nf-color-selection);
  color: var(--nf-color-selection-text);
  box-shadow: none;
}

.dp-dash-toolbar,
.dp-toolbar,
.dp-dashboard-section,
.dp-dashboard-quality {
  padding: 16px;
}

.dp-dash-toolbar--dashboard {
  gap: 14px;
}

.dp-dash-toolbar-head,
.dp-dash-toolbar-controls {
  gap: 20px;
}

.dp-dash-toolbar-controls {
  padding-top: 14px;
  border-color: var(--dp-border);
}

.dp-dash-toolbar--dashboard .dp-refresh-control .dp-btn {
  min-height: var(--dp-control-height);
}

.dp-dash-range-copy {
  font-size: 15px;
  letter-spacing: -.01em;
}

.dp-range-group {
  gap: 3px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, .045);
  border-radius: 11px;
  background: rgba(255, 255, 255, .045);
}

.dp-range-btn,
.dp-variable-range-btn {
  min-height: 34px;
  padding: 7px 12px;
  border-color: transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--nf-color-text-muted);
  font-size: 12px;
  font-weight: var(--nf-weight-medium);
  white-space: nowrap;
}

.dp-range-btn:hover,
.dp-variable-range-btn:hover {
  color: var(--nf-color-text);
  background: rgba(255, 255, 255, .065);
}

.dp-range-btn.is-active,
.dp-variable-range-btn.is-active,
.dp-dash-toolbar--dashboard .dp-range-btn.is-active,
.dp-synthetic-toggle[aria-pressed="true"],
.dp-synthetic-toggle[aria-pressed="true"]:hover:not(:disabled) {
  border-color: var(--nf-color-selection);
  background: var(--nf-color-selection);
  color: var(--nf-color-selection-text);
  box-shadow: none;
}

.dp-section-heading {
  min-height: 39px;
  align-items: center;
}

.dp-section-heading h2,
.dp-dashboard-quality h2,
.dp-variable-section-head h2,
.dp-grid-title {
  letter-spacing: -.012em;
}

.dp-section-heading h2,
.dp-dashboard-quality h2,
.dp-variable-section-head h2 {
  font-size: 17px;
  line-height: 1.25;
}

.dp-section-kicker,
.dp-grid-eyebrow,
.dp-filter-label {
  font-size: 10px;
  font-weight: var(--nf-weight-bold);
  letter-spacing: .085em;
}

.dp-section-link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 9px;
  border-radius: 8px;
  color: var(--nf-color-link);
  font-size: 12px;
  font-weight: var(--nf-weight-medium);
}

.dp-section-link:hover {
  background: rgba(244, 245, 243, .07);
  color: #d3e4f8;
}

.dp-kpi-row {
  gap: 10px;
}

.dp-kpi-tile {
  min-height: 98px;
  padding: 14px;
  border-radius: 12px;
}

.dp-kpi-label {
  font-size: 12px;
  font-weight: var(--nf-weight-medium);
}

.dp-kpi-value {
  font-size: clamp(20px, 2.25vw, 25px);
  letter-spacing: -.02em;
  line-height: 1.15;
}

.dp-kpi-detail {
  font-size: 11px;
  line-height: 1.4;
}

.dp-chart-card {
  padding: 15px;
  border-radius: 12px;
}

.dp-chart-title {
  font-size: 14px;
}

.dp-chart-current,
.dp-chart-gap-note {
  font-size: 11px;
}

.dp-chart-current span:first-child {
  font-size: 10px;
}

.dp-chart-current strong {
  font-size: 15px;
}

.dp-chart-mark,
.dp-chart-gap-bridge {
  stroke-width: 2.25;
}

.dp-chart-grid-line {
  stroke: rgba(255, 255, 255, .085);
}

.dp-chart-tooltip {
  border-color: var(--dp-border-strong);
  border-radius: var(--dp-control-radius);
  background: #2b2b2b;
  box-shadow: var(--dp-shadow-raised);
}

.dp-quality-panel {
  border-radius: 12px;
}

.dp-quality-panel-head h3,
.dp-quality-empty h3,
.dp-quality-source-copy strong {
  font-size: 13px;
}

.dp-quality-source-copy span,
.dp-quality-coverage-total span,
.dp-quality-legend-row {
  font-size: 11px;
}

.dp-quality-source-row {
  border-radius: 10px;
}

.dp-quality-status,
.dp-variable-status {
  min-height: 22px;
  padding: 4px 8px;
  border: 1px solid transparent;
  font-size: 10px;
  font-weight: var(--nf-weight-semibold);
  line-height: 1;
}

.dp-variable-row {
  border-radius: 10px;
}

.dp-variable-row summary {
  min-height: 60px;
  padding: 8px 11px;
}

.dp-variable-row summary::after {
  width: 26px;
  height: 26px;
  border: 1px solid rgba(255, 255, 255, .055);
  border-radius: 8px;
  font-size: 16px;
}

.dp-variable-row-name strong {
  font-size: 13px;
  font-weight: var(--nf-weight-semibold);
}

.dp-variable-row-name span,
.dp-variable-row-unit {
  font-size: 11px;
}

.dp-variable-row-value {
  font-size: 15px;
}

.dp-variable-row-body {
  padding: 12px;
  background: rgba(0, 0, 0, .18);
}

.dp-variable-detail-row,
.dp-variable-trend-panel {
  padding: 10px 11px;
  border-radius: 9px;
}

.dp-variable-detail-row dt,
.dp-variable-trend-panel figcaption {
  font-size: 10px;
}

.dp-variable-detail-row dd,
.dp-variable-reason {
  font-size: 12px;
  line-height: 1.45;
}

.dp-variable-coverage-chip {
  min-height: 22px;
  font-size: 11px;
}

.dp-variable-section-head {
  min-height: 34px;
  padding: 0 4px;
}

.dp-variable-section-head span,
.dp-prepared-summary {
  font-size: 12px;
}

.dp-sidebar {
  padding: 16px 11px 12px;
}

.dp-sidebar-head {
  gap: 5px;
  padding: 0 6px 14px;
  border-color: var(--dp-border);
}

.dp-sidebar-title-row {
  font-size: 14px;
}

.dp-table-search {
  margin-top: 8px;
}

.dp-table-list {
  gap: 3px;
  padding-top: 4px;
}

.dp-table-list-item {
  min-height: 50px;
  border-radius: 9px;
  transition: border-color 140ms ease, background-color 140ms ease;
}

.dp-table-list-item:hover {
  transform: none;
}

.dp-table-list-item-name {
  font-size: 12px;
  font-weight: var(--nf-weight-semibold);
}

.dp-table-list-item-meta {
  font-size: 10px;
}

.dp-table-list-group-label {
  padding-block: 13px 7px;
  background: rgba(41, 41, 41, .98);
}

.dp-toolbar-title {
  font-size: 14px;
}

.dp-info-panel summary {
  min-height: 20px;
  font-size: 13px;
  font-weight: var(--nf-weight-semibold);
}

.dp-grid-header {
  min-height: 68px;
  border-color: var(--dp-border);
}

.dp-grid-title {
  font-size: 17px;
}

.dp-grid-row-summary {
  padding: 5px 10px;
  border-color: var(--dp-border);
  background: rgba(255, 255, 255, .04);
  font-size: 11px;
}

.dp-table {
  font-size: 13px;
}

.dp-table thead th {
  height: 42px;
  padding: 10px 12px;
  border-color: var(--dp-border);
  background: #292929;
  font-size: 11px;
  font-weight: var(--nf-weight-semibold);
  letter-spacing: .012em;
}

.dp-table tbody td {
  height: 42px;
  border-color: rgba(255, 255, 255, .045);
}

.dp-pagination {
  min-height: 58px;
  border-color: var(--dp-border);
}

.dp-login-body {
  display: grid;
  min-height: 100vh;
  padding: 24px;
  place-items: center;
}

.dp-login-card {
  width: min(100%, 400px);
  padding: 28px;
  border: 1px solid var(--dp-border);
  border-radius: var(--dp-card-radius);
  background: var(--dp-surface-panel);
  box-shadow: var(--dp-shadow-raised), inset 0 1px 0 rgba(255, 255, 255, .035);
}

.dp-login-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 24px;
}

.dp-login-copy h1 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -.025em;
  line-height: 1.15;
}

.dp-login-copy p {
  margin: 0;
  color: var(--nf-color-text-muted);
  font-size: 13px;
  line-height: 1.45;
}

.dp-login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dp-login-form .dp-btn {
  width: 100%;
  margin-top: 2px;
}

.dp-login-error {
  margin: -8px 0 16px;
  padding: 10px 12px;
  border: 1px solid rgba(239, 68, 68, .32);
  border-radius: var(--dp-control-radius);
  background: rgba(239, 68, 68, .1);
  color: #ffb4b4;
  font-size: 12px;
  line-height: 1.4;
}

@media (max-width: 768px) {
  .dp-body {
    padding: 12px;
  }

  .dp-header {
    align-items: flex-start;
    gap: 12px;
  }

  .dp-header-copy {
    flex: 1 1 auto;
  }

  .dp-title {
    font-size: 24px;
  }

  .dp-view-toggle {
    width: 100%;
  }

  .dp-view-btn {
    flex: 1 1 0;
    min-width: 0;
    min-height: var(--dp-touch-target);
  }

  .dp-input,
  .dp-table-search,
  .dp-filter-select,
  .dp-btn {
    min-height: var(--dp-touch-target);
  }

  .dp-dash-toolbar--dashboard .dp-refresh-control .dp-btn {
    min-height: var(--dp-touch-target);
  }

  .dp-dash-toolbar,
  .dp-toolbar,
  .dp-dashboard-section,
  .dp-dashboard-quality {
    padding: 14px;
  }

  .dp-section-heading {
    min-height: 0;
  }

  .dp-variable-row summary {
    min-height: 64px;
  }

  .dp-sidebar {
    padding-inline: 10px;
  }

  .dp-table-list-item {
    min-height: 52px;
  }

  .dp-toolbar-copy {
    display: flex;
  }

  .dp-toolbar-fields {
    align-items: flex-end;
  }

  .dp-toolbar-fields .dp-btn {
    align-self: flex-end;
  }
}

@media (max-width: 480px) {
  .dp-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .dp-subtitle {
    max-width: 255px;
  }

  .dp-logout-btn {
    min-height: 38px;
  }

  .dp-dashboard-section,
  .dp-dashboard-quality,
  .dp-dash-toolbar,
  .dp-toolbar {
    border-radius: 12px;
  }

  .dp-login-body {
    padding: 16px;
  }

  .dp-login-card {
    padding: 22px;
  }
}

/* Table workspace: the shared controls act on the selected pane. */
.dp-body.dp-tables-visible .dp-shell {
  max-width: none;
}

.dp-layout.is-sidebar-collapsed {
  grid-template-columns: minmax(0, 1fr);
}

.dp-sidebar[hidden],
.dp-grid-wrap[hidden] {
  display: none;
}

.dp-main {
  min-width: 0;
}

.dp-workspace-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 44px;
}

.dp-layout-switch {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--dp-border);
  border-radius: 11px;
  background: var(--dp-surface-panel);
}

.dp-layout-btn {
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--nf-color-text-muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.dp-layout-btn:hover,
.dp-layout-btn.is-active {
  color: var(--nf-color-text);
  background: var(--nf-alpha-selection-10);
}

.dp-layout-btn.is-active {
  border-color: var(--nf-alpha-selection-24);
}

.dp-active-pane-label {
  margin-left: auto;
  color: var(--nf-color-text-muted);
  font-size: 12px;
}

.dp-toolbar {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  padding: 12px 14px;
}

.dp-toolbar-copy {
  align-self: center;
}

.dp-toolbar-actions {
  gap: 6px;
}

.dp-pane-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
}

.dp-pane-grid[data-layout="split"],
.dp-pane-grid[data-layout="quad"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dp-grid-wrap {
  min-width: 0;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.dp-grid-wrap.is-active {
  border-color: rgba(244, 245, 243, .36);
  box-shadow: 0 0 0 1px rgba(244, 245, 243, .06), var(--dp-shadow-panel);
}

.dp-grid-wrap.is-drop-target {
  border-color: #f4f5f3;
  box-shadow: 0 0 0 3px var(--dp-focus-ring);
}

.dp-grid-header {
  position: relative;
  z-index: 3;
  min-height: 58px;
  padding: 9px 14px;
}

.dp-grid-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.dp-grid-eyebrow {
  display: none;
}

.dp-info-panel {
  position: relative;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.dp-info-panel summary {
  display: flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 9px;
  border: 1px solid var(--dp-border);
  border-radius: 8px;
  background: var(--dp-surface-card);
  list-style: none;
  white-space: nowrap;
  font-size: 11px;
}

.dp-info-panel summary::-webkit-details-marker { display: none; }
.dp-info-panel summary::after { content: ' ⌄'; margin-left: 3px; }
.dp-info-panel[open] summary::after { content: ' ⌃'; }

.dp-info-body {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 12;
  width: min(420px, 78vw);
  max-height: min(400px, 55vh);
  overflow: auto;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--dp-border-strong);
  border-radius: 10px;
  background: #292929;
  box-shadow: var(--dp-shadow-raised);
}

.dp-grid-scroll {
  height: max(360px, calc(100vh - 365px));
}

.dp-pane-grid[data-layout="quad"] .dp-grid-scroll {
  height: max(235px, calc((100vh - 390px) / 2));
}

.dp-grid-wrap .dp-empty {
  position: absolute;
  z-index: 2;
  top: 58px;
  right: 0;
  bottom: 54px;
  left: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  pointer-events: none;
}

.dp-grid-wrap .dp-empty[hidden] { display: none; }

.dp-pane-empty-instruction {
  display: none;
}

.dp-grid-wrap.is-empty-pane {
  display: flex;
  flex-direction: column;
  min-height: 320px;
  border-style: dashed;
}

.dp-grid-wrap.is-empty-pane .dp-grid-scroll,
.dp-grid-wrap.is-empty-pane .dp-pagination,
.dp-grid-wrap.is-empty-pane .dp-info-panel,
.dp-grid-wrap.is-empty-pane .dp-grid-row-summary {
  display: none;
}

.dp-grid-wrap.is-empty-pane .dp-pane-empty-instruction {
  display: grid;
  flex: 1;
  place-items: center;
  padding: 20px;
  color: var(--nf-color-text-muted);
  text-align: center;
  font-size: 13px;
}

@media (max-width: 1180px) {
  .dp-toolbar { grid-template-columns: minmax(0, 1fr); }
  .dp-toolbar-fields { flex-wrap: wrap; }
  .dp-toolbar-actions { justify-content: flex-start; }
  .dp-active-pane-label { margin-left: 0; }
}

@media (max-width: 768px) {
  .dp-workspace-controls { align-items: stretch; }
  .dp-layout-switch { flex: 1 1 auto; }
  .dp-layout-btn { flex: 1 1 0; min-height: var(--dp-touch-target); }
  .dp-active-pane-label { flex: 1 1 100%; }
  .dp-grid-header { flex-wrap: wrap; }
  .dp-grid-header-actions { justify-content: space-between; width: 100%; }
  .dp-grid-scroll { height: 410px; }
}

@media (max-width: 600px) {
  .dp-pane-grid[data-layout="split"],
  .dp-pane-grid[data-layout="quad"] {
    grid-template-columns: minmax(0, 1fr);
  }
  .dp-pane-grid[data-layout="quad"] .dp-grid-scroll { height: 340px; }
}

/* Tables command bar: one persistent row, with on-demand query controls. */
.dp-body.dp-tables-visible .dp-shell { gap: 10px; }
.dp-body.dp-tables-visible .dp-main { gap: 10px; }

.dp-sidebar-title-actions { display: flex; align-items: center; gap: 7px; }
.dp-sidebar-hide {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--dp-border);
  border-radius: 8px;
  background: var(--dp-surface-card);
  color: var(--nf-color-text-muted);
  cursor: pointer;
}
.dp-sidebar-hide:hover { border-color: var(--dp-border-strong); background: var(--nf-color-surface-hover); color: var(--nf-color-text); }

.dp-workspace-controls {
  position: relative;
  z-index: 8;
  flex-wrap: nowrap;
  gap: 8px;
  min-height: 52px;
  padding: 6px;
  border: 1px solid var(--dp-border);
  border-radius: var(--dp-card-radius);
  background: var(--dp-surface-panel);
  box-shadow: var(--dp-shadow-panel);
}

.dp-workspace-controls > .dp-btn,
.dp-command-menu > summary.dp-btn { min-height: 36px; padding: 7px 10px; white-space: nowrap; }
.dp-workspace-controls > .dp-btn[hidden] { display: none; }
.dp-layout-switch { padding: 2px; flex: 0 0 auto; }
.dp-layout-btn { min-height: 32px; padding: 5px 9px; }
.dp-command-spacer { flex: 1 1 auto; min-width: 0; }

.dp-command-menu { position: relative; flex: 0 0 auto; }
.dp-command-menu > summary { display: flex; align-items: center; gap: 6px; list-style: none; cursor: pointer; }
.dp-command-menu > summary::-webkit-details-marker { display: none; }
.dp-command-menu > summary::after { content: '▾'; color: var(--nf-color-text-muted); font-size: 11px; }
.dp-command-menu[open] > summary { border-color: var(--nf-alpha-selection-24); background: var(--nf-alpha-selection-10); }
.dp-filter-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--nf-color-selection); color: var(--nf-color-canvas); font-size: 10px; font-weight: 700; }
.dp-filter-count[hidden] { display: none; }

.dp-command-popover {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  z-index: 10;
  padding: 16px;
  border: 1px solid var(--dp-border-strong);
  border-radius: var(--dp-card-radius);
  background: #202020;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .48);
}
.dp-filters-popover { width: min(620px, calc(100vw - 32px)); max-height: min(730px, calc(100dvh - 110px)); overflow-y: auto; }
.dp-popover-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.dp-popover-heading strong { flex: 0 0 auto; font-size: 13px; }
.dp-active-pane-label { margin: 0 0 0 auto; text-align: right; }
.dp-filter-move { flex: 0 0 auto; padding: 4px 7px; border: 1px solid var(--dp-border); border-radius: 6px; background: transparent; color: var(--nf-color-text-muted); font: inherit; font-size: 11px; cursor: grab; touch-action: none; user-select: none; }
.dp-filter-move:hover, .dp-filter-move:focus-visible { color: var(--nf-color-text); border-color: var(--dp-border-strong); }
.dp-filter-move:active { cursor: grabbing; }
.dp-filter-move span { margin-left: 3px; font-size: 14px; line-height: 0; }
.dp-date-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) auto auto; align-items: end; gap: 8px; }
.dp-date-controls .dp-input { width: 100%; min-width: 0; }
.dp-date-controls .dp-btn { white-space: nowrap; }
.dp-filters-popover .dp-filter-bar {
  display: block;
  min-height: 0;
  margin: 14px 0 10px;
  padding: 14px 0 0;
  border: 0;
  border-top: 1px solid var(--dp-border);
  border-radius: 0;
  background: none;
  box-shadow: none;
}
.dp-filters-popover .dp-filter-bar[hidden] { display: none; }
.dp-filter-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dp-filter-section-head > div { display: grid; gap: 3px; min-width: 0; }
.dp-filters-popover .dp-filter-label { padding: 0; border: 0; }
.dp-filter-section-copy { color: var(--nf-color-text-muted); font-size: 11px; }
.dp-filter-section-head .dp-btn { flex: 0 0 auto; }
.dp-filters-popover .dp-filter-chips { margin-top: 10px; }
.dp-filters-popover .dp-filter-chips:empty { display: none; }
.dp-filters-popover .dp-filter-row {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--dp-border);
  border-radius: 10px;
  background: rgba(255, 255, 255, .025);
}
.dp-filters-popover .dp-filter-row[hidden] { display: none; }
.dp-filter-column-field { display: grid; gap: 7px; min-width: 0; }
.dp-filter-column-field .dp-input,
.dp-filter-editor-fields .dp-input { width: 100%; min-width: 0; }
.dp-filter-column-list { height: 128px; padding: 4px; }
.dp-filter-column-list optgroup { color: var(--nf-color-text-muted); font-weight: var(--nf-weight-semibold); }
.dp-filter-column-list option { padding: 5px 8px; color: var(--nf-color-text); }
.dp-filter-editor-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 10px; }
.dp-filter-editor-fields .dp-field { min-width: 0; }
.dp-filter-editor-fields .dp-field[hidden] { display: none; }
.dp-filter-hint { min-height: 16px; margin: 0; color: var(--nf-color-text-muted); font-size: 11px; line-height: 1.35; }
.dp-filter-editor-actions { display: flex; justify-content: flex-end; gap: 8px; }
.dp-filter-editor-actions .dp-btn { min-height: 36px; }
.dp-filters-popover .dp-last-refreshed { display: block; margin-top: 10px; font-size: 11px; }
.dp-rows-control { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; color: var(--nf-color-text-muted); font-size: 12px; }
.dp-rows-control select { min-height: 36px; width: 68px; padding: 5px 8px; }
.dp-export-popover { display: grid; gap: 6px; min-width: 190px; padding: 8px; }
.dp-export-actions { display: grid; gap: 6px; }
.dp-export-actions[hidden] { display: none; }
.dp-export-actions .dp-btn { width: 100%; text-align: left; }
.dp-export-popover.is-choosing { display: flex; flex-direction: column; width: min(720px, calc(100vw - 32px)); max-height: min(640px, calc(100dvh - 110px)); padding: 16px; overflow: hidden; }
.dp-export-chooser { display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.dp-export-chooser[hidden] { display: none; }
.dp-export-chooser .dp-popover-heading { margin-bottom: 0; }
.dp-export-count { margin-left: auto; font-variant-numeric: tabular-nums; }
.dp-export-bulk { display: flex; gap: 8px; }
.dp-export-groups { display: grid; gap: 12px; min-height: 0; overflow-y: auto; padding-right: 4px; }
.dp-export-group { min-width: 0; margin: 0; padding: 8px 12px 10px; border: 1px solid var(--dp-border); border-radius: 10px; background: var(--dp-surface-card); }
.dp-export-group legend { padding: 0 4px; }
.dp-export-group-toggle { color: var(--nf-color-text-muted); font-size: 11px; font-weight: var(--nf-weight-bold); text-transform: uppercase; letter-spacing: .05em; }
.dp-export-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 0 12px; }
.dp-export-option { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 28px; font-size: 12px; cursor: pointer; }
.dp-export-option span { min-width: 0; overflow-wrap: anywhere; }
.dp-export-option input { flex: 0 0 auto; width: 16px; height: 16px; margin: 0; accent-color: var(--nf-color-selection); }
.dp-export-chooser .dp-filter-hint { min-height: 0; }
.dp-export-chooser-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 12px; border-top: 1px solid var(--dp-border); }

@media (max-width: 1100px) {
  .dp-workspace-controls { flex-wrap: wrap; }
  .dp-command-spacer { flex: 1 1 40px; }
}

@media (max-width: 768px) {
  .dp-sidebar-hide { width: var(--dp-touch-target); height: var(--dp-touch-target); }
  .dp-workspace-controls { align-items: center; }
  .dp-layout-switch { flex: 1 1 auto; }
  .dp-layout-btn { flex: 1 1 0; min-height: var(--dp-touch-target); padding: 5px 6px; }
  .dp-command-spacer { flex: 1 1 100%; height: 0; }
  .dp-workspace-controls > .dp-btn,
  .dp-command-menu > summary.dp-btn,
  .dp-rows-control select { min-height: var(--dp-touch-target); }
  .dp-filters-popover,
  .dp-export-popover { position: fixed; top: auto; bottom: 0; left: 0; right: 0; width: auto; max-height: 75dvh; overflow-y: auto; border-radius: 16px 16px 0 0; }
  .dp-export-popover.is-choosing { width: auto; max-height: 85dvh; }
  .dp-export-option { min-height: var(--dp-control-height); }
  .dp-export-bulk .dp-btn,
  .dp-export-chooser-actions .dp-btn { flex: 1 1 0; min-height: var(--dp-touch-target); }
  .dp-date-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dp-date-controls .dp-btn { width: 100%; }
  .dp-popover-heading { display: block; }
  .dp-active-pane-label { display: block; margin: 3px 0 0; text-align: left; }
  .dp-filter-move { display: none; }
  .dp-filter-column-list { height: 112px; }
  .dp-filter-editor-fields { grid-template-columns: minmax(0, 1fr); }
  .dp-filter-editor-actions {
    position: sticky;
    bottom: -14px;
    z-index: 1;
    margin: 0 -14px -14px;
    padding: 10px 14px 14px;
    border-top: 1px solid var(--dp-border);
    background: #202020;
  }
  .dp-filter-editor-actions .dp-btn { min-height: var(--dp-touch-target); }
}

@media (max-width: 400px) {
  .dp-workspace-controls { gap: 6px; }
  .dp-rows-control { gap: 4px; }
  .dp-rows-control select { width: 60px; }
}

/* Empty panes also obey layout visibility when fewer slots are selected. */
.dp-grid-wrap[hidden] { display: none; }

.dp-pane-grid[data-layout="quad"] .dp-info-body { max-height: min(220px, 42vh); }

/* Table workspace surfaces and independent scroll regions. */
.dp-body.dp-tables-visible .dp-table-list {
  gap: 0;
  padding: 0 3px 4px 0;
}

.dp-body.dp-tables-visible .dp-table-list-group-label {
  z-index: 2;
  min-height: 30px;
  padding: 0 9px;
  border-bottom: 1px solid var(--dp-border);
  background: #292929;
  line-height: 1;
}

.dp-body.dp-tables-visible .dp-table-list-item { margin: 2px 0; }
.dp-body.dp-tables-visible .dp-table-list-item:hover { transform: none; }

.dp-grid-heading { flex-direction: row; align-items: center; gap: 8px; }
.dp-pane-index {
  display: inline-grid;
  flex: 0 0 22px;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--dp-border-strong);
  border-radius: 6px;
  background: var(--dp-surface-card);
  color: var(--nf-color-text-muted);
  font-size: 11px;
  font-weight: 700;
}
.dp-grid-wrap.is-active .dp-pane-index {
  border-color: var(--nf-alpha-selection-24);
  background: var(--nf-alpha-selection-10);
  color: var(--nf-color-text);
}
.dp-grid-header { min-height: 54px; padding: 8px 12px; background: rgba(255, 255, 255, .018); }
.dp-grid-title { font-size: 14px; font-weight: var(--nf-weight-semibold); }
.dp-grid-wrap.is-empty-pane { min-height: 220px; border-color: var(--dp-border-strong); background: rgba(255, 255, 255, .018); }
.dp-grid-wrap.is-empty-pane .dp-grid-header { border-bottom: 0; }
.dp-grid-wrap.is-empty-pane .dp-grid-title { color: var(--nf-color-text-muted); }
.dp-grid-wrap.is-empty-pane .dp-pane-empty-instruction {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 12px 18px 28px;
  margin: 0;
  font-size: 12px;
}
.dp-pane-empty-instruction strong { color: var(--nf-color-text); font-size: 13px; font-weight: var(--nf-weight-semibold); }
.dp-pane-empty-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 5px;
  border: 1px dashed var(--dp-border-strong);
  border-radius: 9px;
  color: var(--nf-color-text-muted);
  font-size: 22px;
  font-weight: 300;
}
.dp-grid-wrap.is-empty-pane.is-active .dp-pane-empty-mark { border-color: var(--nf-alpha-selection-24); color: #eeeeec; }

@media (min-width: 900px) and (min-height: 720px) {
  .dp-body.dp-tables-visible { height: 100dvh; overflow: hidden; }
  .dp-body.dp-tables-visible .dp-shell { height: 100%; min-height: 0; }
  .dp-body.dp-tables-visible .dp-layout { flex: 1 1 auto; min-height: 0; }
  .dp-body.dp-tables-visible .dp-sidebar { position: static; height: auto; min-height: 0; }
  .dp-body.dp-tables-visible .dp-main { min-height: 0; }
  .dp-body.dp-tables-visible .dp-pane-grid { flex: 1 1 auto; min-height: 0; grid-auto-rows: minmax(0, 1fr); }
  .dp-body.dp-tables-visible .dp-pane-grid[data-layout="quad"] { grid-template-rows: repeat(2, minmax(0, 1fr)); }
  .dp-body.dp-tables-visible .dp-grid-wrap { display: flex; flex-direction: column; min-height: 0; }
  .dp-body.dp-tables-visible .dp-grid-wrap[hidden] { display: none; }
  .dp-body.dp-tables-visible .dp-grid-scroll,
  .dp-body.dp-tables-visible .dp-pane-grid[data-layout="quad"] .dp-grid-scroll { flex: 1 1 auto; height: auto; min-height: 0; }
  .dp-body.dp-tables-visible .dp-pagination { flex: 0 0 auto; min-height: 48px; padding: 4px 10px; }
}

/* Shared app bar and dashboard hierarchy. */
.dp-body { padding-top: 0; }
.dp-shell { gap: 12px; }
.dp-header {
  min-height: 64px;
  padding: 9px 0;
  border-bottom: 1px solid var(--dp-border);
  justify-content: flex-start;
  gap: 22px;
}
.dp-title { font-size: 19px; letter-spacing: -.025em; }
.dp-header-copy { flex: 0 0 auto; }
.dp-header .dp-view-toggle {
  width: auto;
  margin: 0;
  padding: 3px;
  gap: 2px;
}
.dp-header .dp-view-btn { min-width: 86px; min-height: 34px; padding: 6px 12px; }
.dp-header .dp-back-link { margin-left: auto; }
.dp-header .dp-logout-btn { min-height: 34px; }

.dp-dash-toolbar--dashboard {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
}
.dp-dash-toolbar--dashboard .dp-dash-toolbar-copy { gap: 0; min-width: 0; }
.dp-dashboard-title { margin: 0; font-size: 18px; line-height: 1.2; letter-spacing: -.02em; }
.dp-dash-toolbar--dashboard .dp-dash-range-copy { font-size: 11px; color: var(--nf-color-text-muted); font-weight: var(--nf-weight-medium); }
.dp-dash-toolbar--dashboard .dp-dash-toolbar-controls {
  width: auto;
  gap: 8px;
  padding: 0;
  border: 0;
  justify-content: flex-end;
  align-items: center;
}
.dp-dash-toolbar--dashboard .dp-range-group { flex: 0 0 auto; }
.dp-dash-toolbar--dashboard .dp-range-btn { min-height: 34px; padding: 5px 11px; }
.dp-dash-toolbar--dashboard .dp-last-refreshed { text-align: right; }
.dp-dash-date-menu { position: relative; flex: 0 0 auto; }
.dp-dash-date-menu > summary {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 10px;
  list-style: none;
  cursor: pointer;
  white-space: nowrap;
}
.dp-dash-date-menu > summary::-webkit-details-marker { display: none; }
.dp-dash-date-menu > summary::after { content: '▾'; margin-left: 7px; color: var(--nf-color-text-muted); font-size: 10px; }
.dp-dash-date-menu[open] > summary { border-color: var(--nf-alpha-selection-24); background: var(--nf-alpha-selection-10); }
.dp-dash-date-popover {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  z-index: 20;
  width: min(460px, calc(100vw - 28px));
  padding: 14px;
  border: 1px solid var(--dp-border-strong);
  border-radius: 12px;
  background: #202020;
  box-shadow: var(--dp-shadow-raised);
  align-items: end;
}
.dp-dash-date-popover .dp-field { min-width: 0; flex: 1 1 0; }
.dp-dash-date-popover .dp-input { width: 100%; min-width: 0; }
.dp-dash-date-popover .dp-btn { white-space: nowrap; }

.dp-dashboard { gap: 22px; }
.dp-dashboard-section,
.dp-dashboard-quality {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}
.dp-dashboard .dp-section-heading { min-height: 0; margin-bottom: 2px; }
.dp-dashboard .dp-section-heading h2 { font-size: 18px; }
.dp-dashboard-source-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid var(--dp-border);
  border-radius: 9px;
  background: var(--dp-surface-card);
  color: var(--nf-color-text-muted);
  font-size: 11px;
  text-decoration: none;
  white-space: nowrap;
}
.dp-dashboard-source-link:hover { border-color: var(--dp-border-strong); color: var(--nf-color-text); }
.dp-dashboard-source-link .dp-section-note { color: inherit; }
.dp-dashboard .dp-kpi-row { grid-template-columns: repeat(auto-fit, minmax(205px, 1fr)); gap: 10px; }
.dp-dashboard .dp-kpi-tile { min-height: 116px; padding: 14px 16px; gap: 5px; }
.dp-dashboard .dp-kpi-label { font-size: 12px; }
.dp-dashboard .dp-kpi-value { font-size: clamp(23px, 2.5vw, 30px); line-height: 1.1; font-variant-numeric: tabular-nums; }
.dp-dashboard .dp-kpi-detail { margin-top: auto; font-size: 11px; line-height: 1.3; }
.dp-dashboard-finance-note,
.dp-dashboard-empty {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--dp-border);
  border-radius: 10px;
  background: rgba(255, 255, 255, .025);
  color: var(--nf-color-text-muted);
  font-size: 12px;
}
.dp-dashboard-finance-note[hidden] { display: none; }
.dp-dashboard-empty { grid-column: 1 / -1; }
.dp-dashboard .dp-chart-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.dp-dashboard .dp-chart-card { padding: 16px; }
.dp-dashboard .dp-chart-svg-wrap { min-width: 0; }
.dp-dashboard-quality { padding-bottom: 20px; }

/* A loaded pane exposes removal where its slot number sits. */
.dp-pane-clear {
  position: relative;
  padding: 0;
  font: inherit;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}
.dp-pane-clear:disabled { cursor: default; }
.dp-pane-clear-number,
.dp-pane-clear-icon { position: absolute; inset: 0; margin: auto; transition: opacity 160ms ease, transform 160ms ease; }
.dp-pane-clear-number { display: grid; place-items: center; }
.dp-pane-clear-icon { width: 14px; height: 14px; opacity: 0; transform: scale(.65) rotate(-20deg); }
.dp-pane-clear:hover:not(:disabled),
.dp-pane-clear:focus-visible:not(:disabled) { border-color: rgba(239, 110, 110, .48); background: rgba(239, 68, 68, .14); color: #ffaaa8; }
.dp-pane-clear:hover:not(:disabled) .dp-pane-clear-number,
.dp-pane-clear:focus-visible:not(:disabled) .dp-pane-clear-number { opacity: 0; transform: scale(.65); }
.dp-pane-clear:hover:not(:disabled) .dp-pane-clear-icon,
.dp-pane-clear:focus-visible:not(:disabled) .dp-pane-clear-icon { opacity: 1; transform: scale(1) rotate(0); }

@media (max-width: 1060px) {
  .dp-dash-toolbar--dashboard { grid-template-columns: minmax(150px, 1fr) auto; }
  .dp-dash-toolbar--dashboard .dp-last-refreshed { grid-column: 1 / -1; text-align: left; }
}

@media (max-width: 768px) {
  .dp-pane-clear { flex-basis: 44px; width: 44px; height: 44px; }
  .dp-body { padding: 0 12px 18px; }
  .dp-header { flex-wrap: wrap; gap: 7px 12px; padding: 9px 0; }
  .dp-header-copy { flex: 1 1 auto; }
  .dp-header .dp-view-toggle { order: 3; flex: 1 1 100%; width: 100%; margin: 0; }
  .dp-header .dp-view-btn { flex: 1 1 0; min-width: 0; min-height: 40px; }
  .dp-header .dp-back-link { margin-left: 0; }
  .dp-dash-toolbar--dashboard { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 12px; }
  .dp-dash-toolbar--dashboard .dp-dash-toolbar-copy { grid-column: 1; grid-row: 1; }
  .dp-dash-toolbar--dashboard .dp-last-refreshed { grid-column: 2; grid-row: 1; font-size: 10px; text-align: right; }
  .dp-dash-toolbar--dashboard .dp-dash-toolbar-controls { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .dp-dash-toolbar--dashboard .dp-range-group { grid-column: 1 / -1; width: 100%; }
  .dp-dash-toolbar--dashboard .dp-dash-date-menu { grid-column: 1; width: 100%; }
  .dp-dash-toolbar--dashboard .dp-dash-date-menu > summary { justify-content: center; }
  .dp-dash-toolbar--dashboard #dp-dash-refresh { grid-column: 2; width: 100%; }
  .dp-dash-toolbar--dashboard #dp-dash-synthetic { grid-column: 1 / -1; grid-row: 3; width: 100%; }
  .dp-dashboard .dp-chart-grid { grid-template-columns: minmax(0, 1fr); }
  .dp-dash-date-popover { position: fixed; top: auto; bottom: 0; left: 0; right: 0; width: auto; border-radius: 16px 16px 0 0; }
}

@media (max-width: 480px) {
  .dp-dashboard { gap: 18px; }
  .dp-dashboard .dp-kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dp-dashboard .dp-kpi-tile { min-height: 112px; padding: 12px; }
  .dp-dashboard .dp-kpi-value { font-size: 22px; }
  .dp-dashboard .dp-section-heading { align-items: flex-start; }
  .dp-dashboard-source-link { max-width: 145px; white-space: normal; }
  .dp-dash-toolbar--dashboard .dp-range-group { width: 100%; }
  .dp-dash-toolbar--dashboard .dp-range-btn { flex: 1 1 0; padding-inline: 6px; }
  .dp-dash-date-popover { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dp-dash-date-popover .dp-btn { grid-column: 1 / -1; }
}

@media (hover: none) {
  .dp-pane-clear { flex-basis: 44px; width: 44px; height: 44px; }
  .dp-pane-clear:not(:disabled) .dp-pane-clear-number { opacity: 0; }
  .dp-pane-clear:not(:disabled) .dp-pane-clear-icon { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .dp-pane-clear,
  .dp-pane-clear-number,
  .dp-pane-clear-icon { transition: none; }
}

/* Decision-focused dashboard and compact metric catalog. */
.dp-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.dp-pulse-comparison { margin: 4px 0 0; color: var(--nf-color-text-muted); font-size: 12px; }
.dp-pulse-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.dp-pulse-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--dp-border);
  border-radius: 12px;
  background: var(--dp-surface-card);
  box-shadow: var(--dp-shadow-panel);
}
.dp-pulse-label { margin: 0; color: var(--nf-color-text-muted); font-size: 12px; font-weight: var(--nf-weight-semibold); }
.dp-pulse-value { margin-top: 5px; color: var(--nf-color-text); font-size: clamp(24px, 2.3vw, 29px); line-height: 1; font-variant-numeric: tabular-nums; }
.dp-pulse-note { margin-top: 4px; color: var(--nf-color-text-muted); font-size: 11px; line-height: 1.3; }
.dp-pulse-change { margin-top: 8px; font-size: 12px; font-weight: var(--nf-weight-semibold); font-variant-numeric: tabular-nums; }
.dp-pulse-prior { margin-top: 2px; color: var(--nf-color-text-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.dp-pulse-drill {
  align-self: flex-start;
  margin: 6px 0 0 -7px;
  padding: 3px 7px 0;
  border: 0;
  background: none;
  color: var(--nf-color-link);
  font: inherit;
  font-size: 11px;
  font-weight: var(--nf-weight-semibold);
  cursor: pointer;
}
.dp-pulse-drill:hover { color: #d3e4f8; text-decoration: underline; }

.dp-variable-workspace {
  display: grid;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--dp-border);
  border-radius: var(--dp-card-radius);
  background: var(--dp-surface-panel);
  box-shadow: var(--dp-shadow-panel);
}
.dp-variable-topline { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-width: 0; }
.dp-variable-heading { display: grid; grid-template-columns: auto auto; gap: 2px 10px; justify-content: start; flex: 0 0 auto; }
.dp-variable-heading h2 { grid-column: 1 / -1; margin: 0; font-size: 18px; line-height: 1.2; }
.dp-variable-heading span { color: var(--nf-color-text-muted); font-size: 11px; white-space: nowrap; }
.dp-variable-heading .dp-last-refreshed::before { content: '·'; margin-right: 10px; }
.dp-variable-period-controls { display: flex; align-items: center; gap: 8px; min-width: 0; }
.dp-variable-period-controls .dp-range-group { flex: 0 0 auto; }
.dp-variable-period-controls .dp-variable-range-btn { min-height: 34px; padding: 5px 10px; }
.dp-variable-period-controls > .dp-btn { min-height: 36px; padding: 7px 10px; }
.dp-variable-filter-row {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) minmax(150px, 180px) minmax(135px, 155px) auto;
  align-items: center;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--dp-border);
}
.dp-variable-filter-row .dp-variable-search { display: block; min-width: 0; }
.dp-variable-filter-row .dp-variable-select { min-width: 0; }
.dp-variable-filter-row .dp-input { width: 100%; min-width: 0; min-height: 36px; }
.dp-variable-filter-row .dp-prepared-summary { color: var(--nf-color-text-muted); font-size: 11px; text-align: right; white-space: nowrap; }

@media (max-width: 1100px) {
  .dp-variable-topline { align-items: flex-start; flex-direction: column; gap: 8px; }
  .dp-variable-period-controls { width: 100%; }
}

@media (max-width: 950px) {
  .dp-pulse-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .dp-variable-workspace { padding: 12px; }
  .dp-variable-heading { width: 100%; }
  .dp-variable-heading h2 { font-size: 16px; }
  .dp-variable-period-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .dp-variable-period-controls .dp-range-group { grid-column: 1 / -1; display: flex; width: 100%; }
  .dp-variable-period-controls .dp-variable-range-btn { flex: 1 1 0; min-width: 0; min-height: 40px; padding: 5px 4px; }
  .dp-variable-period-controls .dp-variable-date-menu { min-width: 0; }
  .dp-variable-period-controls .dp-variable-date-menu > summary { justify-content: center; min-height: 44px; }
  .dp-variable-period-controls > .dp-btn { width: 100%; min-height: 44px; }
  .dp-variable-period-controls > .dp-synthetic-toggle { grid-column: 1 / -1; grid-row: 3; }
  .dp-variable-filter-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dp-variable-filter-row .dp-variable-search { grid-column: 1 / -1; }
  .dp-variable-filter-row .dp-input { min-height: 44px; }
  .dp-variable-filter-row .dp-prepared-summary { grid-column: 1 / -1; text-align: left; }
}

@media (max-width: 480px) {
  .dp-pulse-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dp-pulse-card { padding: 12px; }
  .dp-pulse-value { font-size: 24px; }
  .dp-pulse-change { font-size: 11px; }
}
