/* PRISM Phase 2IP — Garnet Deep Crystal + Heritage hero de-duplication.
 * Visual presentation ONLY. Loaded AFTER 2IO. Existing PRISM records, permissions,
 * navigation, login, procurement stages, and public posting are untouched.
 * RED IS THE MATERIAL; spectral hues are edge refractions, not pink panel fills.
 */
@property --p2ip-angle {syntax:'<angle>'; inherits:false; initial-value:0deg;}
@keyframes p2ip-spectrum {to{--p2ip-angle:360deg}}
@keyframes p2ip-gleam {0%,13%{background-position:200% 0;opacity:.22}44%{opacity:.76}74%,100%{background-position:-200% 0;opacity:.25}}
@keyframes p2ip-starlight {0%,100%{opacity:.27;filter:brightness(.9)}40%{opacity:.9;filter:brightness(1.23)}72%{opacity:.42;filter:brightness(.98)}}
/* Heritage: older layered art is causing a duplicate/overlapping Sarimanok
 * beside Refresh. Remove decorative hero pseudo-elements, NOT the PRISM logo
 * in the sidebar or the official public-portal Sarimanok. */
html.prismThemeSarimanok #app#app #homePage#homePage .prismReferenceHero::before,
html.prismThemeSarimanok #app#app #homePage#homePage .prismReferenceHero::after {
  content:none!important;display:none!important;background:none!important;
  animation:none!important;filter:none!important;
}
/* The top-level black-garnet foundation: reds, not magenta. */
html.prismThemeCrystal body,
html.prismThemeCrystal #app {
  background:radial-gradient(ellipse at 70% 3%,#8a2c2c30 0,transparent 41%),
    radial-gradient(ellipse at 8% 90%,#b70e202c 0,transparent 43%),
    linear-gradient(142deg,#1c020a 0%,#39020e 35%,#540613 72%,#240309 100%)!important;
  color:#fff2e8!important;
}
html.prismThemeCrystal #app#app .main {
  background:radial-gradient(ellipse at 80% 7%,#bf523123 0,transparent 40%),
    radial-gradient(ellipse at 13% 65%,#8c0d1d42 0,transparent 58%),
    linear-gradient(147deg,#34020eea 0%,#530614e8 51%,#220307f0 100%)!important;
  color:#fff3e8!important;
}
html.prismThemeCrystal #app#app .side {
  background:linear-gradient(167deg,#360209 0%,#590815 45%,#19020b 100%)!important;
  border:2px solid #ffd0c6c7!important;
  box-shadow:inset 0 3px 3px #fff6e5a0,inset -4px 0 11px #ff7c665e,
    2px 0 2px #fff7,6px 4px 23px #090004b8,-5px 3px 21px #fe925348!important;
}
html.prismThemeCrystal #app#app #prismTopbar,
html.prismThemeCrystal #app#app .prismDateRibbon {
  background:linear-gradient(120deg,#250006ef,#45060ff0 47%,#2b0612ef)!important;
  border-bottom:1.5px solid #ffb88c9e!important;
  box-shadow:inset 0 1px 1px #fff7,0 3px 16px #180005ba!important;
}
/* Recessed crimson buttons with bright jewel edge, never pale pink fills. */
html.prismThemeCrystal #app#app .side .nav > :is(button,a.gdPublicNav):not(.hide):not([hidden]) {
  background:linear-gradient(122deg,#dd716232 0%,#490a1fe0 18%,#6b0d1ecb 77%,#7d1c25b0 100%)!important;
  border:2px solid #ffe2d2db!important;
  box-shadow:inset 0 2px 2px #fff7,inset 0 -5px 8px #1b000abc,
    0 5px 10px #130009cf,-4px 6px 12px -7px #8df1ff9e,
    4px 6px 12px -7px #ff76dca2!important;
}
html.prismThemeCrystal #app#app .side .nav > :is(button,a.gdPublicNav).active {
  background:linear-gradient(115deg,#a12135bb,#570a1eda 60%,#9a182cbb)!important;
  border-color:#ffeac7!important;
  box-shadow:inset 0 3px 3px #fffae897,inset 0 -4px 9px #20000dc9,
    0 0 12px #ff5a54ba,0 7px 18px #150008d8!important;
}
/* The crystal bevel is genuine CSS-layered translucent refractive material.
 * It works at different sizes and does not embed a screenshot of controls. */
html.prismThemeCrystal #app#app :is(#gdDashboardStage,#prismDeskPulse,.prismReferenceHero,
  .prismReferenceWorkflow,.prismRefKpi,.prismModuleTile,.prismGlassPanel,.prismSharedPanel) {
  border:2px solid transparent!important;
  background:
    url('prism-phase2ip-corner-facets.svg') center/100% 100% no-repeat padding-box,
    radial-gradient(ellipse at 8% 0%,#ffe3cc35 0%,transparent 31%) padding-box,
    linear-gradient(130deg,#640d1ac9 0%,#3c030fdc 38%,#650a1edb 65%,#28030bef 100%) padding-box,
    conic-gradient(from 230deg at 50% 50%,#ffad7f,#fce8ce 13%,#ffe6fe 21%,#adfffe 28%,
      #c1a5ff 34%,#7a0f36 46%,#ff90d1 63%,#ffe59e 76%,#ffad7f 100%) border-box!important;
  color:#fff6ed!important;
  box-shadow:inset 0 2px 1px #fff3dfab,inset 0 -5px 9px #1f010da4,
    inset 4px 0 9px #86dce93c,inset -3px 0 8px #ffa37a43,
    0 8px 18px #110009d9,0 0 13px #b6323555,
    -6px 7px 15px -10px #7beef7a6,6px 7px 16px -10px #ff91a8a2!important;
  backdrop-filter:blur(18px) saturate(165%)!important;
  -webkit-backdrop-filter:blur(18px) saturate(165%)!important;
}
/* Edge optical film: top white catchlight, left cyan and right amber;
 * a thin glitter sheen travels, without creating a large magenta patch. */
html.prismThemeCrystal #app#app #homePage#homePage :is(.prismReferenceWorkflow,.prismRefKpi,.prismModuleTile,.prismGlassPanel)::before {
  content:""!important;display:block!important;position:absolute!important;inset:0!important;
  z-index:0!important;pointer-events:none!important;border-radius:inherit!important;
  background:linear-gradient(174deg,#fff9e6ba 0%,#ffffff36 3%,transparent 16%,transparent 78%,#e6c7fc3c 96%,#fff2d87c 100%),
    radial-gradient(ellipse at 0% 95%,#45eeff67 0%,transparent 28%),
    radial-gradient(ellipse at 98% 94%,#ffc7777c 0%,transparent 26%)!important;
  box-shadow:inset 0 2px 1px #fff9dfb5,inset 0 0 0 1px #fbdbe484!important;
}
html.prismThemeCrystal #app#app #homePage#homePage :is(.prismReferenceWorkflow,.prismRefKpi,.prismModuleTile,.prismGlassPanel)::after {
  content:""!important;display:block!important;position:absolute!important;inset:0!important;
  z-index:1!important;pointer-events:none!important;border-radius:inherit!important;
  background:url('prism-phase2io-glitter.svg') center/cover no-repeat,
    linear-gradient(108deg,transparent 0%,#fff6de0f 28%,#fefbff43 42%,transparent 51%)!important;
  opacity:.48!important;animation:p2ip-starlight 8.2s ease-in-out infinite!important;
}
/* Every live label sits above the optical film. */
html.prismThemeCrystal #app#app #homePage#homePage :is(.prismRefKpi,.prismModuleTile,.prismReferenceWorkflow,.prismGlassPanel) > * {
  position:relative!important;z-index:3!important;
}
/* Welcome remains the actual PRISM heading, with the retained real Refresh.
 * Red translucent glass, limited pink to the prismatic edge/reflection. */
html.prismThemeCrystal #app#app#app #homePage#homePage#homePage .prismReferenceHero {
  background:radial-gradient(ellipse at 77% 53%,#8c1c2f75,transparent 55%),
    linear-gradient(111deg,#33000d,#5e0619 48%,#36030e 100%)!important;
  border:2px solid #ffd9c8e8!important;
  box-shadow:inset 0 2px 2px #fff2e3a6,inset 0 -3px 8px #ed63566d,
    0 8px 20px #170005ce,0 0 14px #c64d4c6b!important;
}
/* Replace pink fog behind the real feather vine with restrained gold sparkles. */
html.prismThemeCrystal #app#app#app #homePage#homePage#homePage .prismReferenceHero::before {
  background:url('prism-phase2io-glitter.svg') 100% 46%/cover no-repeat,
    radial-gradient(ellipse at 86% 55%,#a31b3036,transparent 57%)!important;
  opacity:.52!important;
}
/* Dense garnet priority/KPI/quick-action surfaces. */
html.prismThemeCrystal #app#app#app #homePage#homePage#homePage .prismDeskPulse,
html.prismThemeCrystal #app#app#app #homePage#homePage#homePage #gdDashboardStage,
html.prismThemeCrystal #app#app#app #homePage#homePage#homePage .prismReferenceWorkflow {
  background:url('prism-phase2ip-corner-facets.svg') center/100% 100% no-repeat padding-box,
    linear-gradient(130deg,#780f22bd,#3b0310db 62%,#4b0814da) padding-box,
    conic-gradient(from 214deg,#ffbf8e,#fff5e1 13%,#9ffffd 26%,#ed85dd 41%,#ffdb9d 57%,#8bdfff 71%,#ffcc94 100%) border-box!important;
  border:2px solid transparent!important;
}
html.prismThemeCrystal #app#app#app #homePage#homePage#homePage .prismReferenceKpis .prismRefKpi,
html.prismThemeCrystal #app#app#app #homePage#homePage#homePage .prismRefModules .prismModuleTile {
  background:url('prism-phase2ip-corner-facets.svg') center/100% 100% no-repeat padding-box,
    radial-gradient(ellipse at 10% 0%,#ffffff26,transparent 44%) padding-box,
    linear-gradient(138deg,#7b0e22c9,#3b020ce6 70%,#560614db) padding-box,
    conic-gradient(from 225deg,#ffc98c,#fff4e5,#7ef4ff,#d3a1ff,#fa93c7,#ffd99f,#ffb977) border-box!important;
  border:2px solid transparent!important;
}
html.prismThemeCrystal #app#app#app #homePage#homePage#homePage .prismStageNowSummary {
  background:linear-gradient(112deg,#8c26375c 0%,#400a15b8 48%,#820d2188 100%)!important;
  border:1.5px solid #ffe8decf!important;
  box-shadow:inset 0 2px 2px #fff7,inset 0 -4px 6px #1200099a,
    0 4px 11px #1a010a9b!important;
}
html.prismThemeCrystal #app#app#app #homePage#homePage#homePage .prismWorkflowStep:not(.current) {
  background:linear-gradient(155deg,#a85a6147 0%,#650c1bb5 33%,#380515e1 85%)!important;
  border:2px solid #ffe7e5dd!important;
  box-shadow:inset 0 3px 3px #ffeddfbd,inset 0 -4px 9px #15000a9b,
    0 5px 12px #1d010fc1,-4px 6px 13px -9px #68ebffc1,
    5px 6px 14px -9px #ffd2a2c8!important;
}
/* Multiple colored reflections on completed stages, without light/pink body fill. */
html.prismThemeCrystal #app#app #homePage#homePage .prismWorkflowStep:nth-child(4n + 1):not(.current){box-shadow:inset 0 3px #fff9,inset 0 -5px 10px #3df0f873,0 5px 13px #160007be,0 0 9px #56eeff68!important}
html.prismThemeCrystal #app#app #homePage#homePage .prismWorkflowStep:nth-child(4n + 2):not(.current){box-shadow:inset 0 3px #fff9,inset 0 -5px 10px #9570fe73,0 5px 13px #160007be,0 0 9px #b999ff68!important}
html.prismThemeCrystal #app#app #homePage#homePage .prismWorkflowStep:nth-child(4n + 3):not(.current){box-shadow:inset 0 3px #fff9,inset 0 -5px 10px #eb72b76c,0 5px 13px #160007be,0 0 9px #ff85c168!important}
html.prismThemeCrystal #app#app #homePage#homePage .prismWorkflowStep:nth-child(4n):not(.current){box-shadow:inset 0 3px #fff9,inset 0 -5px 10px #fec37070,0 5px 13px #160007be,0 0 9px #ffd88e70!important}
/* Current stage is black cherry with one rotating spectral perimeter. */
html.prismThemeCrystal #app#app#app #homePage#homePage#homePage .prismWorkflowStep.current {
  --p2io-spin:0deg;
  background:linear-gradient(142deg,#7f0d1fde,#2a000af2 69%,#570b1ce8) padding-box,
    conic-gradient(from var(--p2io-spin),#fff3da,#f66ba9,#6ceaf8,#ffcf88,#e1b1ff,#fff3da) border-box!important;
  border:3px solid transparent!important;
  animation:p2io-spectral-turn 5.6s linear infinite,p2io-active-halo 3.3s ease-in-out infinite!important;
}
html.prismThemeCrystal #app#app#app #homePage#homePage#homePage .prismWorkflowStep.current::before{
  background:linear-gradient(164deg,#fff6dc58,transparent 23%,#b6272724 67%,#f8b96034)!important;
}
/* Fix residual magenta tint on controls and chip counters, retaining focus. */
html.prismThemeCrystal #app#app #homePage#homePage :is(.prismPulseActions button,.prismFlowSelection button,.prismRefProcessing button,.prismRefNotifications button):not(:disabled){
  background:linear-gradient(125deg,#751228ed,#31030fec)!important;
  color:#fff8ee!important;border:1.5px solid #ffe2c7d2!important;
  box-shadow:inset 0 2px 2px #fff6e07e,0 4px 11px #18000daa!important;
}
/* Preserve chart wedge data and its distinct category colors. */
html.prismThemeCrystal #app#app #homePage#homePage :is(#prismDonut,#prismAppDonut){
  border-color:#ffe4c6!important;
  box-shadow:inset 0 3px 7px #fff7,0 6px 15px #21000eb2,0 0 9px #ffd08a6b!important;
}
/* Crystal general panels outside dashboard: edge polish only, don't recolor
 * input interiors and destroy form/dropdown contrast. */
html.prismThemeCrystal #app#app .main > section.stack:not(#homePage) :is(.gdCard,.phase2Mini,.prismSharedPanel) {
  border:2px solid #ffdab7ba!important;
  box-shadow:inset 0 2px 2px #fff7,0 7px 17px #20000bad,
    -3px 6px 12px -8px #8debff9e,4px 6px 12px -8px #ffb0a7a9!important;
}
/* Never display role-hidden controls or nonselected pages due to visual CSS. */
html.prismThemeCrystal #app#app .hide,
html.prismThemeCrystal #app#app [hidden],
html.prismThemeCrystal #app#app #homePage .prismModuleTile.hide,
html.prismThemeCrystal #app#app #homePage .prismWorkflowStep[hidden] {display:none!important}
@media(max-width:640px){
  html.prismThemeCrystal #app#app #homePage .prismReferenceHero{background:linear-gradient(116deg,#33010b,#520617)!important}
}
@media(prefers-reduced-motion:reduce){
  html.prismThemeCrystal #app#app #homePage :is(.prismReferenceWorkflow,.prismRefKpi,.prismModuleTile,.prismGlassPanel)::after,
  html.prismThemeCrystal #app#app #homePage .prismWorkflowStep.current,
  html.prismThemeCrystal #app#app #homePage .prismWorkflowStep.current::after {animation:none!important}
}
/* Optical finish must outrank Phase 2IO's triple-ID pseudo-element rules.
 * These surfaces carry light only at their rims, not washed-out pink panels. */
html.prismThemeCrystal #app#app#app #homePage#homePage#homePage :is(.prismReferenceWorkflow,.prismRefKpi,.prismModuleTile,.prismGlassPanel)::before {
  background:linear-gradient(175deg,#fff7e19e 0%,#ffffff22 4%,transparent 18%,transparent 78%,#ffe4ce31 95%,#fff8eb6b 100%),
    radial-gradient(ellipse at 0% 100%,#42eaff88 0%,transparent 27%),
    radial-gradient(ellipse at 100% 100%,#ffbf7d85 0%,transparent 28%)!important;
  box-shadow:inset 0 2px 1px #fffce4ba,inset 0 0 0 1px #fcece087!important;
}
html.prismThemeCrystal #app#app#app #homePage#homePage#homePage :is(.prismReferenceWorkflow,.prismRefKpi,.prismModuleTile,.prismGlassPanel)::after {
  background:url('prism-phase2io-glitter.svg') center/cover no-repeat,
    linear-gradient(112deg,transparent 4%,#ffffff10 32%,#ffe5ca42 46%,transparent 56%)!important;
  opacity:.41!important;animation:p2ip-starlight 8.2s ease-in-out infinite!important;
}
@media(prefers-reduced-motion:reduce){
  html.prismThemeCrystal #app#app#app #homePage#homePage#homePage :is(.prismReferenceWorkflow,.prismRefKpi,.prismModuleTile,.prismGlassPanel)::after{animation:none!important}
}
/* Ruby optical controls in the header: polished rim, glass core. */
html.prismThemeCrystal #app#app #prismTopbar .prismGlobalSearch,
html.prismThemeCrystal #app#app #prismTopbar .prismThemeMenu > summary,
html.prismThemeCrystal #app#app #prismTopbar :is(.prismAudioUnlock,.prismBell){
  color:#fff5e9!important;
  background:linear-gradient(120deg,#a03a4e69 0%,#510712e5 38%,#28030bf0 83%,#b94c626c 100%)!important;
  border:1.5px solid #ffe0c9d5!important;
  box-shadow:inset 0 2px 2px #fff2db91,inset 0 -3px 6px #170006b9,
    0 4px 11px #1b010b99,-4px 6px 9px -7px #81f1ffae,
    4px 6px 11px -7px #ffb77cd5!important;
}
html.prismThemeCrystal #app#app #prismTopbar .prismThemeMenu > summary > strong{color:#fff0cd!important}
html.prismThemeCrystal #app#app #prismTopbar .prismGlobalSearch input{
  color:#fff6ef!important; background:transparent!important;
  -webkit-text-fill-color:#fff6ef!important;
}
html.prismThemeCrystal #app#app #prismTopbar .prismGlobalSearch input::placeholder{
  color:#e4bdc0!important;-webkit-text-fill-color:#e4bdc0!important;opacity:1!important;
}
/* Accessibility: final high-specificity override of the inherited stage keyframes. */
@media(prefers-reduced-motion:reduce){
  html.prismThemeCrystal #app#app#app #homePage#homePage#homePage .prismWorkflowStep.current,
  html.prismThemeCrystal #app#app#app #homePage#homePage#homePage .prismWorkflowStep.current::after,
  html.prismThemeCrystal #app#app#app #homePage#homePage#homePage .prismReferenceHero::before,
  html.prismThemeCrystal #app#app#app #homePage#homePage#homePage .prismReferenceHero::after{
    animation:none!important;
  }
}
