/* Dashboard details follow the portal theme even when MUI uses the admin palette. */
@media screen {
  .professional-layout:is(.professional-theme-dark, [data-theme="dark"]) .professional-my-day-patient {
    color: var(--professional-text);
    background: var(--professional-surface-soft);
    border-color: var(--professional-border);
  }

  .professional-layout:is(.professional-theme-dark, [data-theme="dark"]) .professional-my-day-patient .MuiTypography-body2 {
    color: var(--professional-text);
  }

  .professional-layout:is(.professional-theme-dark, [data-theme="dark"]) :is(
    .professional-my-day-patient .MuiTypography-caption,
    .professional-assistive-calendar__events > .MuiTypography-caption
  ) {
    color: var(--professional-muted);
  }

  .professional-layout:is(.professional-theme-dark, [data-theme="dark"]) .professional-my-day-patient .professional-status-chip {
    color: #e2e8f0;
    background: #334155;
    border-color: #64748b;
    box-shadow: none;
  }

  .professional-layout:is(.professional-theme-dark, [data-theme="dark"]) .professional-my-day-patient :is(
    .professional-status-chip--active,
    .professional-status-chip--running,
    .professional-status-chip--in_progress,
    .professional-status-chip--completed,
    .professional-status-chip--stopped,
    .professional-status-chip--finished
  ) {
    color: #a7f3d0;
    background: #173d35;
    border-color: #46b68d;
  }

  .professional-layout:is(.professional-theme-dark, [data-theme="dark"]) .professional-my-day-patient .professional-status-chip--scheduled {
    color: #bfdbfe;
    background: #182d44;
    border-color: #6089b3;
  }

  .professional-layout:is(.professional-theme-dark, [data-theme="dark"]) .professional-my-day-patient :is(
    .professional-status-chip--cancelled,
    .professional-status-chip--canceled
  ) {
    color: #fecaca;
    background: #3b202b;
    border-color: #bc7183;
  }

  .professional-layout:is(.professional-theme-dark, [data-theme="dark"]) .professional-my-day-patient .MuiButton-outlined {
    color: #a7f3d0;
    background: transparent;
    border-color: #64748b;
  }

  .professional-layout:is(.professional-theme-dark, [data-theme="dark"]) .professional-my-day-patient .MuiButton-outlined:hover {
    background: #173d35;
    border-color: #6ee7b7;
  }

  .professional-layout:is(.professional-theme-dark, [data-theme="dark"]) .professional-my-day-secondary-indicators {
    color: var(--professional-text);
    background: var(--professional-surface);
    border-color: var(--professional-border);
  }

  .professional-layout:is(.professional-theme-dark, [data-theme="dark"]) .professional-my-day-secondary-indicators summary {
    color: var(--professional-text);
  }

  .professional-layout:is(.professional-theme-dark, [data-theme="dark"]) .professional-my-day-secondary-indicators summary svg {
    color: #6ee7b7;
  }

  .professional-layout:is(.professional-theme-dark, [data-theme="dark"]) .professional-my-day-secondary-indicators summary:hover {
    background: var(--professional-surface-soft);
  }

  .professional-layout:is(.professional-theme-dark, [data-theme="dark"]) :is(
    .professional-my-day-secondary-indicators summary,
    .professional-my-day-patient .MuiButton-outlined
  ):focus-visible {
    outline: 2px solid #6ee7b7;
    outline-offset: 3px;
  }

  .professional-layout:is(.professional-theme-dark, [data-theme="dark"]) .professional-assistive-calendar__day.outside {
    opacity: 1;
  }

  .professional-layout:is(.professional-theme-dark, [data-theme="dark"]) .professional-assistive-calendar.mode-month .today .professional-calendar__day-header .MuiTypography-caption {
    color: #111827;
    background: #6ee7b7;
  }
}

/* The shared period filter and exchange toolbar follow the professional portal palette. */
@media screen {
  .professional-layout:is(.professional-theme-dark, [data-theme="dark"]) .professional-period-filter {
    color: var(--professional-text);
    background: var(--professional-surface);
    border-color: var(--professional-border);
    color-scheme: dark;
  }

  .professional-layout:is(.professional-theme-dark, [data-theme="dark"]) .professional-period-filter .MuiTypography-root {
    color: var(--professional-text);
  }

  .professional-layout:is(.professional-theme-dark, [data-theme="dark"]) :is(
    .professional-period-filter .MuiTypography-caption,
    .professional-period-filter .MuiInputLabel-root,
    .professional-period-filter .MuiFormHelperText-root,
    .professional-shift-exchange-tools .MuiTypography-root,
    .professional-shift-exchange-hint.MuiTypography-root
  ) {
    color: var(--professional-muted);
  }

  .professional-layout:is(.professional-theme-dark, [data-theme="dark"]) .professional-period-filter .MuiOutlinedInput-root {
    color: var(--professional-text);
    background: var(--professional-surface-soft);
    color-scheme: dark;
  }

  .professional-layout:is(.professional-theme-dark, [data-theme="dark"]) .professional-period-filter .MuiInputBase-input {
    color: var(--professional-text);
    -webkit-text-fill-color: var(--professional-text);
    color-scheme: dark;
  }

  .professional-layout:is(.professional-theme-dark, [data-theme="dark"]) .professional-period-filter .MuiOutlinedInput-notchedOutline {
    border-color: #64748b;
  }

  .professional-layout:is(.professional-theme-dark, [data-theme="dark"]) .professional-period-filter .MuiOutlinedInput-root:hover .MuiOutlinedInput-notchedOutline {
    border-color: #94a3b8;
  }

  .professional-layout:is(.professional-theme-dark, [data-theme="dark"]) .professional-period-filter .MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline {
    border-color: #6ee7b7;
  }

  .professional-layout:is(.professional-theme-dark, [data-theme="dark"]) .professional-period-filter .MuiInputLabel-root.Mui-focused {
    color: #6ee7b7;
  }

  .professional-layout:is(.professional-theme-dark, [data-theme="dark"]) :is(.professional-period-filter, .professional-shift-exchange-tools) .MuiButton-contained {
    color: #ffffff;
    background: #17684c;
  }

  .professional-layout:is(.professional-theme-dark, [data-theme="dark"]) :is(.professional-period-filter, .professional-shift-exchange-tools) .MuiButton-contained:hover {
    background: #12543d;
  }

  .professional-layout:is(.professional-theme-dark, [data-theme="dark"]) :is(.professional-period-filter, .professional-shift-exchange-tools) .MuiButton-outlined {
    color: #a7f3d0;
    background: transparent;
    border-color: #64748b;
  }

  .professional-layout:is(.professional-theme-dark, [data-theme="dark"]) :is(.professional-period-filter, .professional-shift-exchange-tools) .MuiButton-outlined:hover {
    background: #173d35;
    border-color: #6ee7b7;
  }

  .professional-layout:is(.professional-theme-dark, [data-theme="dark"]) :is(.professional-period-filter, .professional-shift-exchange-tools) .MuiButton-root.Mui-disabled {
    color: #94a3b8;
    background: #253247;
    border-color: #475569;
    box-shadow: none;
  }

  .professional-layout:is(.professional-theme-dark, [data-theme="dark"]) :is(.professional-period-filter, .professional-shift-exchange-tools) .MuiButton-root:focus-visible {
    outline: 2px solid #6ee7b7;
    outline-offset: 3px;
  }
}
