/* Overview density polish: keep high-volume lists readable and independently scrollable. */
#moduleStage[data-active-module-tab="0"] .overview-command-deck {
  min-height: 0;
  scrollbar-gutter: stable;
}

#moduleStage[data-active-module-tab="0"] .overview-home-layout {
  min-height: 0;
  height: 100%;
}

#moduleStage[data-active-module-tab="0"] .overview-focus-panel,
#moduleStage[data-active-module-tab="0"] .overview-change-panel {
  display: flex;
  min-height: 0;
  flex-direction: column;
}

#moduleStage[data-active-module-tab="0"] .overview-task-list,
#moduleStage[data-active-module-tab="0"] .overview-change-list {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}

#moduleStage[data-active-module-tab="0"] .overview-task-row,
#moduleStage[data-active-module-tab="0"] .overview-change-row {
  min-width: 0;
  min-height: 68px;
  align-items: flex-start;
  gap: 10px;
  padding-top: 10px;
  padding-bottom: 10px;
}

#moduleStage[data-active-module-tab="0"] .overview-task-row > span:first-child,
#moduleStage[data-active-module-tab="0"] .overview-change-row > span:first-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

#moduleStage[data-active-module-tab="0"] .overview-task-row .overview-task-kind,
#moduleStage[data-active-module-tab="0"] .overview-change-row .tag,
#moduleStage[data-active-module-tab="0"] .overview-task-row > span > small:first-child {
  color: #e3bd6b !important;
  font-size: 10px;
  letter-spacing: .05em;
}

#moduleStage[data-active-module-tab="0"] .overview-task-row strong,
#moduleStage[data-active-module-tab="0"] .overview-change-row strong {
  color: #fffaf0 !important;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 700;
  overflow-wrap: anywhere;
  -webkit-line-clamp: 2;
}

#moduleStage[data-active-module-tab="0"] .overview-task-row > span:first-child > small:last-child,
#moduleStage[data-active-module-tab="0"] .overview-change-row > span:first-child > small {
  color: #c4d3cc !important;
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  -webkit-line-clamp: 2;
}

#moduleStage[data-active-module-tab="0"] .overview-task-row > .tag,
#moduleStage[data-active-module-tab="0"] .overview-change-row > .tag {
  flex: 0 0 auto;
  margin-top: 2px;
  white-space: normal;
  text-align: right;
  line-height: 1.25;
}

/* Keep long records on their own grid tracks instead of stretching every
   row to the same short height. The parent list remains scrollable. */
#moduleStage[data-active-module-tab="0"] .overview-task-list,
#moduleStage[data-active-module-tab="0"] .overview-change-list,
#moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="people-interactions"] > .panel > .list {
  grid-template-rows: none;
  grid-auto-rows: max-content;
  row-gap: 6px;
  align-content: start;
}

#moduleStage[data-active-module-tab="0"] .overview-task-row,
#moduleStage[data-active-module-tab="0"] .overview-change-row,
#moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="people-interactions"] > .panel > .list > .row {
  box-sizing: border-box;
  height: auto;
}

#moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="people-interactions"] > .panel > .list > .row > span:first-child {
  flex: 1 1 auto;
  min-width: 0;
}

#moduleStage[data-active-module-tab="0"] .overview-context-strip .overview-signal-card {
  gap: 7px 10px;
  padding-top: 13px;
  padding-bottom: 13px;
}

#moduleStage[data-active-module-tab="0"] .overview-context-strip .overview-signal-card > span {
  color: #c4d3cc !important;
  letter-spacing: .06em;
}

#moduleStage[data-active-module-tab="0"] .overview-context-strip .overview-signal-card > strong {
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
}

#moduleStage[data-active-module-tab="0"] .overview-context-strip .overview-signal-card > small {
  color: #b5c7bf !important;
  line-height: 1.35;
}

html[data-theme="night"] #moduleStage[data-active-module-tab="0"] .overview-task-row strong,
html[data-theme="night"] #moduleStage[data-active-module-tab="0"] .overview-change-row strong {
  color: #fffaf0 !important;
}

html[data-theme="night"] #moduleStage[data-active-module-tab="0"] .overview-task-row > span:first-child > small:last-child,
html[data-theme="night"] #moduleStage[data-active-module-tab="0"] .overview-change-row > span:first-child > small,
html[data-theme="night"] #moduleStage[data-active-module-tab="0"] .overview-context-strip .overview-signal-card > small {
  color: #c4d3cc !important;
}

html[data-theme="night"] #moduleStage[data-active-module-tab="0"] .overview-task-row .overview-task-kind,
html[data-theme="night"] #moduleStage[data-active-module-tab="0"] .overview-change-row .tag,
html[data-theme="night"] #moduleStage[data-active-module-tab="0"] .overview-task-row > span > small:first-child,
html[data-theme="night"] #moduleStage[data-active-module-tab="0"] .overview-context-strip .overview-signal-card > span {
  color: #e3bd6b !important;
}

/* The premium material layer intentionally uses a strong inherited-text rule;
   match that scope so semantic colors remain visible on the finished surface. */
body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="focus"] > .panel .overview-task-row .overview-task-kind,
body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="focus"] > .panel .overview-change-row .tag,
body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="focus"] > .panel .overview-task-row > span > small:first-child {
  color: #e3bd6b !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="focus"] > .panel .overview-task-row strong,
body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="focus"] > .panel .overview-change-row strong {
  color: #fffaf0 !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="focus"] > .panel .overview-task-row > span:first-child > small:last-child,
body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="focus"] > .panel .overview-change-row > span:first-child > small {
  color: #c4d3cc !important;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="focus"] > .panel .overview-task-row .overview-task-kind,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="focus"] > .panel .overview-change-row .tag,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="focus"] > .panel .overview-task-row > span > small:first-child {
  color: #e3bd6b !important;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="focus"] > .panel .overview-task-row strong,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="focus"] > .panel .overview-change-row strong {
  color: #fffaf0 !important;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="focus"] > .panel .overview-task-row > span:first-child > small:last-child,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="focus"] > .panel .overview-change-row > span:first-child > small {
  color: #c4d3cc !important;
}

@media (max-width: 760px) {
  #moduleStage[data-active-module-tab="0"] .overview-command-deck {
    height: min(78vh, 680px) !important;
    max-height: min(78vh, 680px) !important;
    overflow-x: clip !important;
    overflow-y: auto !important;
    scrollbar-gutter: stable;
  }

  #moduleStage[data-active-module-tab="0"] .overview-home-layout {
    height: auto;
    min-height: 0;
  }

  #moduleStage[data-active-module-tab="0"] .overview-focus-panel,
  #moduleStage[data-active-module-tab="0"] .overview-change-panel {
    min-height: 0;
  }

  #moduleStage[data-active-module-tab="0"] .overview-task-list,
  #moduleStage[data-active-module-tab="0"] .overview-change-list {
    max-height: min(38vh, 320px);
    overflow-y: auto !important;
  }

  #moduleStage[data-active-module-tab="0"] .overview-task-row,
  #moduleStage[data-active-module-tab="0"] .overview-change-row {
    min-height: 64px;
  }
}

/* Finance calendar headers use a dark material gradient; keep the weekday
   labels bright even when later card-art rules set inherited ink colors. */
body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-col-header-cell,
body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-col-header-cell-cushion,
body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-col-header-cell-cushion * {
  color: #f4f0df !important;
  text-shadow: 0 1px 2px rgba(4, 31, 31, 0.42);
}
