/* Shared utility controls: retain a small offset shadow without heavy outlines. */
@layer workspace-alert-contrast {
  body.app-mode #credit-warning-banner {
    background: #f3edd4 !important; background-image: none !important;
    border: 1px solid #cec6bf !important; border-radius: 10px !important;
    padding: 16px !important; color: #302b36 !important; box-shadow: none !important;
  }
  body.app-mode #credit-warning-banner:is([data-credit-status="critical"], [data-credit-status="empty"]) { background: #f8e2df !important; }
  body.app-mode #credit-warning-banner[data-credit-status="onboarding"] { background: #e1eff2 !important; }
  body.app-mode #credit-warning-banner::before,
  body.app-mode #credit-warning-banner::after { display: none !important; }
  body.app-mode #credit-warning-banner > div:first-child { flex: 1 1 auto; min-width: 0; }
  body.app-mode #credit-warning-title { color: #302b36 !important; font-size: 14px !important; font-weight: 600 !important; letter-spacing: normal !important; text-transform: none !important; }
  body.app-mode #credit-warning-copy { max-width: 80ch; color: #302b36 !important; font-size: 14px !important; font-weight: 400 !important; line-height: 1.5 !important; }
  body.app-mode #credit-warning-banner .credit-warning-actions { flex-wrap: wrap; gap: 8px; }
  body.app-mode #credit-warning-banner button {
    min-height: 44px !important; padding: 10px 14px !important; border: 1px solid #b8b0c1 !important; border-radius: 8px !important;
    background: #e9e1f3 !important; color: #302b36 !important; font-size: 14px !important; font-weight: 600 !important;
    text-transform: none !important; box-shadow: none !important; transform: none !important;
  }
  body.app-mode #credit-warning-banner button:hover { background: #f2edf8 !important; }
  body.app-mode #credit-warning-banner button:focus-visible { outline: 2px solid #7761a7 !important; outline-offset: 3px !important; }
  body.app-mode[data-active-view="dashboard"] .dashboard-onboarding-action {
    background: #e9e1f3 !important; border: 1px solid #b8b0c1 !important; color: #302b36 !important;
    box-shadow: none !important; font-size: 14px !important; font-weight: 600 !important;
  }
  body.app-mode[data-active-view="dashboard"] .dashboard-onboarding-action b { color: #302b36 !important; }
  html[data-polxy-theme="calm-monochrome"] body.app-mode :is(#credit-warning-banner, #credit-warning-banner button, .dashboard-onboarding-action) { background: #eeede7 !important; border-color: #c9c5bc !important; }
  @media (max-width: 720px) {
    body.app-mode #credit-warning-banner { flex-direction: column; align-items: flex-start; padding: 14px 70px 14px 14px !important; }
    body.app-mode #credit-warning-banner .credit-warning-actions { flex-shrink: 1; max-width: 100%; }
  }
}
html body.app-mode #user-notification-center#user-notification-center :is(
  #user-notification-toggle, .appearance-quick-option,
  #ploxy-voice-studio-toggle, #polxy-composer-utility-toggle
) {
  box-sizing: border-box !important;
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  border: 1.5px solid #57565d !important;
  border-radius: 12px !important;
  background: #fff8ec !important;
  color: #24232b !important;
  box-shadow: 1.5px 2px 0 rgba(37, 35, 46, .32) !important;
  transition: background-color 150ms ease, box-shadow 150ms ease !important;
}
html body.app-mode #user-notification-center#user-notification-center#user-notification-center [data-polxy-quick-theme="colorful"][aria-pressed="true"] {
  background: #e8f4ad !important;
}
html body.app-mode #user-notification-center#user-notification-center#user-notification-center [data-polxy-quick-theme="calm-monochrome"][aria-pressed="true"] {
  background: #e4e4e7 !important;
}
html body.app-mode #user-notification-center#user-notification-center #ploxy-voice-studio-toggle {
  background: #ece5fa !important;
}
html body.app-mode #user-notification-center#user-notification-center #polxy-composer-utility-toggle {
  background: #d7eff3 !important;
}
html body.app-mode #user-notification-center#user-notification-center :is(
  #user-notification-toggle, .appearance-quick-option,
  #ploxy-voice-studio-toggle, #polxy-composer-utility-toggle
):is(:hover, [aria-expanded="true"]) {
  border-color: #36333f !important;
  box-shadow: 1px 1px 0 rgba(37, 35, 46, .25) !important;
  transform: none !important;
}
html body.app-mode #user-notification-center#user-notification-center :is(
  #user-notification-toggle, .appearance-quick-option,
  #ploxy-voice-studio-toggle, #polxy-composer-utility-toggle
):focus-visible {
  outline: 2px solid #7761a7 !important;
  outline-offset: 3px !important;
}
html body.app-mode #user-notification-center#user-notification-center #ploxy-voice-studio-toggle > .ploxy-voice-studio-mark {
  border: 1px solid #696074 !important;
  background: #d8c9ef !important;
}
html[data-polxy-theme="calm-monochrome"] body.app-mode #user-notification-center#user-notification-center :is(#ploxy-voice-studio-toggle, #polxy-composer-utility-toggle) {
  background: #eeece8 !important;
}
@media (prefers-reduced-motion: reduce) {
  html body.app-mode #user-notification-center#user-notification-center button { transition: none !important; }
}

/* Keep project ownership visible where the tool has no project selector of its own. */
html body.app-mode.app-mode:is([data-active-view="missions"], [data-active-view="connections"], [data-active-view="ads"], [data-active-view="analytics"], [data-active-view="influencers"], [data-active-view="outreach"], [data-active-view="pages"], [data-active-view="modules"]):not(.client-session) main > .global-project-console {
  display: block !important;
  box-sizing: border-box !important;
  width: min(calc(100% - 32px), var(--polxy-page-frame-max, 1260px)) !important;
  margin: 12px auto 16px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
html body.app-mode.app-mode:not([data-active-view="dashboard"]) main > .global-project-console > div { display: none !important; }
html body.app-mode.app-mode:not([data-active-view="dashboard"]) main > .global-project-console > label {
  width: min(100%, 420px) !important;
  gap: 6px !important;
  color: #514c5c !important;
  font-family: inherit !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
}
html body.app-mode.app-mode:not([data-active-view="dashboard"]) #global-project-select {
  box-sizing: border-box !important;
  width: 100% !important;
  min-height: 44px !important;
  padding: 10px 12px !important;
  border: 1px solid #b8afc7 !important;
  border-radius: 8px !important;
  background: #faf7ff !important;
  color: #282331 !important;
  box-shadow: none !important;
  font-size: 14px !important;
  font-weight: 500 !important;
}
html[data-polxy-theme="calm-monochrome"] body.app-mode.app-mode:not([data-active-view="dashboard"]) #global-project-select { background: #f6f5f2 !important; border-color: #bbb8b1 !important; }

/* Notification panel shares the softer workspace palette and simple divider rows. */
html body.app-mode #user-notification-panel {
  border: 1px solid #8e8996 !important;
  box-shadow: 2px 3px 0 rgba(37,35,46,.22) !important;
  border-radius: 14px !important;
  background: #fffaf2 !important;
}
html body.app-mode #user-notification-panel > header {
  background: #e4dcf4 !important;
  border-bottom: 1px solid #cec5dd !important;
}
html body.app-mode #user-notification-panel > header strong { font-weight: 650 !important; }
html body.app-mode #user-notification-panel :is(.user-notification-toolbar, footer) {
  background: #f9f5ef !important;
  border-color: #ded8d0 !important;
  border-width: 1px !important;
}
html body.app-mode #user-notification-panel button {
  box-shadow: none !important;
  font-weight: 500 !important;
}
html body.app-mode #user-notification-panel :is(.user-notification-toolbar button, footer button, .user-notification-close) {
  border: 1px solid #beb6c7 !important;
  border-radius: 8px !important;
}
html body.app-mode #user-notification-panel [data-notification-filter][aria-pressed="true"] {
  background: #e4dcf4 !important;
  color: #292331 !important;
}
html body.app-mode #user-notification-panel .user-notification-item {
  --notice-accent: #b7c8b1;
  background: #fffcf7 !important;
  border-bottom: 1px solid #e0dad2 !important;
  box-shadow: inset 3px 0 0 var(--notice-accent) !important;
}
html body.app-mode #user-notification-panel .user-notification-item[data-tone="error"] { --notice-accent: #d99393; }
html body.app-mode #user-notification-panel .user-notification-item[data-tone="warning"] { --notice-accent: #d6b776; }
html body.app-mode #user-notification-panel .user-notification-item[data-read="true"] { box-shadow: none !important; }
html body.app-mode #user-notification-panel .user-notification-icon {
  border: 1px solid var(--notice-accent) !important;
  background: #edf1e4 !important;
  color: #35422d !important;
  width: 28px; height: 28px;
}
html body.app-mode #user-notification-panel [data-tone="error"] .user-notification-icon { background: #f9e5e5 !important; color: #973d3d !important; }
html body.app-mode #user-notification-panel [data-tone="warning"] .user-notification-icon { background: #f7ecd6 !important; color: #74551d !important; }
html body.app-mode #user-notification-panel .user-notification-copy strong { font-size: 13px !important; font-weight: 650 !important; line-height: 1.4 !important; }
html body.app-mode #user-notification-panel .user-notification-copy span { font-size: 12px !important; font-weight: 400 !important; line-height: 1.5 !important; }
html body.app-mode #user-notification-panel .user-notification-copy small { font-family: inherit !important; font-weight: 400 !important; text-transform: none !important; }
html body.app-mode #user-notification-panel .user-notification-open:hover { background: #f1ecf7 !important; }
