/* Keep workspace pages on one surface scale; the studio cards retain their own motion. */
body.dashboard-page {
  --workspace-surface: #1b2027;
  --workspace-raised: #222933;
  --workspace-field: #121820;
  --workspace-border: #3b4551;
  --workspace-muted: #bbc3cf;
}

body.dashboard-page #settings :is(.user-settings-heading,.user-settings-nav,.settings-content-head,.settings-card,.settings-loading,.settings-error),
body.dashboard-page #branding :is(.brand-profiles-head,.brand-profile-item,.brand-profile-editor,.brand-profiles-empty) {
  background: var(--workspace-surface) !important;
  background-image: none !important;
  border-color: var(--workspace-border);
}
body.dashboard-page #settings .user-settings-nav button.active {
  background: #30283b !important;
}
body.dashboard-page #settings .user-settings-layout,
body.dashboard-page #settings .user-settings-content,
body.dashboard-page #settings .settings-form-grid > label {
  min-width: 0;
}
body.dashboard-page #settings .settings-content-head,
body.dashboard-page #settings .settings-card { border-radius: 15px; }
body.dashboard-page #settings .settings-card :is(input:not([type=checkbox]):not([type=radio]),select,textarea),
body.dashboard-page #settings .settings-meta-row > div {
  background: var(--workspace-field) !important;
  border-color: var(--workspace-border) !important;
}

body.dashboard-page #branding .brand-profile-list {
  grid-template-columns: repeat(auto-fill,minmax(min(100%,320px),1fr));
  align-items: start;
}
body.dashboard-page #branding .brand-profile-item { min-height: 0; }
body.dashboard-page #branding .brand-profile-item::before { display: none; }
body.dashboard-page #branding .brand-profile-item.active {
  border-color: #947ab7;
  box-shadow: inset -3px 0 #a987ef;
}
body.dashboard-page #branding .brand-profile-main { gap: 12px; }
body.dashboard-page #branding .brand-profile-actions { background: transparent; }
body.dashboard-page #branding .brand-profile-toggle,
body.dashboard-page #branding .brand-profile-enable {
  background: var(--workspace-raised);
  border-color: var(--workspace-border);
}
body.dashboard-page #branding .brand-profile-editor > :is(header,footer) {
  background: var(--workspace-raised);
  border-color: var(--workspace-border);
}

body.dashboard-page #notifications-center .notification-center-shell {
  background: transparent !important;
  background-image: none !important;
  border: 0;
  box-shadow: none;
}
body.dashboard-page #notifications-center .notification-center-list {
  grid-template-columns: repeat(auto-fill,minmax(min(100%,380px),1fr));
  align-items: start;
  align-content: start;
  gap: 12px;
  min-height: 0;
  background: transparent;
}
body.dashboard-page #notifications-center .notification-center-item {
  background: var(--workspace-surface);
  border: 1px solid var(--workspace-border);
}
body.dashboard-page #notifications-center .notification-center-item.unread { background: #222834; }
body.dashboard-page #notifications-center .notification-center-toolbar,
body.dashboard-page #notifications-center .notifications-empty.large {
  background: var(--workspace-surface);
  border-color: var(--workspace-border);
}

body.dashboard-page #billing :is(.billing-balance-hero,.billing-summary-grid article,.billing-plans-section,.billing-ledger) {
  background: var(--workspace-surface);
  border-color: var(--workspace-border);
}
body.dashboard-page #billing :is(.billing-plan-card,.balance-details > span,.ledger-toolbar) {
  background: var(--workspace-raised);
  border-color: var(--workspace-border);
}
body.dashboard-page #billing .billing-plan-card.featured {
  background: #2b2938;
  border-color: #9179b3;
}
body.dashboard-page #billing .billing-plan-grid { align-items: stretch; }
body.dashboard-page #billing .billing-plan-card { min-width: 0; }

body.dashboard-page #projects .library-toolbar,
body.dashboard-page #projects .library-summary > button,
body.dashboard-page #projects .library-card {
  background: var(--workspace-surface);
  border-color: var(--workspace-border);
}
body.dashboard-page #projects .library-heading,
body.dashboard-page #projects .library-heading > div { background: transparent !important; }
body.dashboard-page #projects .library-grid {
  grid-template-columns: repeat(auto-fill,minmax(min(100%,290px),330px));
  justify-content: start;
  align-items: stretch;
}
body.dashboard-page #projects .library-card { max-width: 330px; }
body.dashboard-page #projects .library-card:is(:hover,:focus-within) {
  background: var(--workspace-surface);
  border-color: #947ab7;
}
body.dashboard-page #projects .library-card :is(.library-detail,.card-progress) {
  background: var(--workspace-raised);
  border-color: var(--workspace-border);
}

body.dashboard-page .media-dialog {
  background: var(--workspace-surface);
  border-color: var(--workspace-border);
}
body.dashboard-page .media-content-grid { align-items: start; }
body.dashboard-page .media-content-grid .media-text-wrap,
body.dashboard-page .media-content-grid .media-player,
body.dashboard-page .media-project-videos {
  background: var(--workspace-field);
  border-color: var(--workspace-border);
}
body.dashboard-page .media-content-grid .media-text-wrap { align-self: start; }
body.dashboard-page .media-text { flex: none; max-height: min(570px,calc(100dvh - 265px)); }
body.dashboard-page .media-modal-skeleton { min-height: 0; }
body.dashboard-page .media-skeleton-layout { align-items: start; }
body.dashboard-page .media-skeleton-layout :is(section,article) {
  min-width: 0;
  background: var(--workspace-field);
  border-color: var(--workspace-border);
}
body.dashboard-page .media-modal-skeleton :is(i,b,span) { background: var(--workspace-raised); }

@media (min-width: 761px) {
  html.sidebar-collapsed body.dashboard-page .sidebar .brand,
  body.dashboard-page .sidebar.collapsed .brand,
  html.sidebar-collapsed body.dashboard-page .sidebar .workspace-switcher,
  body.dashboard-page .sidebar.collapsed .workspace-switcher {
    justify-content: center;
    width: 100%;
  }
  html.sidebar-collapsed body.dashboard-page .sidebar .main-nav .nav-item,
  body.dashboard-page .sidebar.collapsed .main-nav .nav-item {
    width: 100%;
    min-height: 46px;
    padding-inline: 5px;
  }
  html.sidebar-collapsed body.dashboard-page .sidebar .sidebar-actions,
  body.dashboard-page .sidebar.collapsed .sidebar-actions {
    grid-template-columns: 1fr 1fr;
    gap: 2px;
  }
  html.sidebar-collapsed body.dashboard-page .sidebar .sidebar-action,
  body.dashboard-page .sidebar.collapsed .sidebar-action { width: 100%; }
}

@media (max-width: 900px) {
  body.dashboard-page #billing .billing-plan-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body.dashboard-page #notifications-center .notification-center-list { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 760px) {
  body.dashboard-page #settings .user-settings-layout { display: block; }
  body.dashboard-page #branding .brand-profile-list,
  body.dashboard-page #projects .library-grid,
  body.dashboard-page #billing .billing-plan-grid { grid-template-columns: minmax(0,1fr); }
  body.dashboard-page #projects .library-card { max-width: none; }
  body.dashboard-page .media-content-grid { grid-template-columns: minmax(0,1fr); }
  body.dashboard-page .media-text { max-height: 42dvh; }
}
