/* PRISM Phase 2IF — 2026-11-27
   Conservative Crystal-only recovery. Exact source: Phase 2IE Pages.
   Does not calculate procurement stages, edit roles, or touch backend data.
   IMPORTANT: Place last after all previously approved stylesheets. */

/* FIX 1 — PRIORITY: the legacy Phase 2IB `display:grid!important` for #homePage
   overrides the generic .hide utility. It left the dashboard visible above
   Calendar and other pages even though app.js successfully navigated. */
html.prismThemeCrystal #app#app.shell.hide,
html.prismThemeCrystal #app#app.shell[hidden],
html.prismThemeCrystal #app#app #homePage#homePage.prismReferenceDashboard.hide,
html.prismThemeCrystal #app#app #homePage#homePage.prismReferenceDashboard[hidden],
html.prismThemeCrystal #app#app #calendarPage.hide,
html.prismThemeCrystal #app#app #timelinePage.hide,
html.prismThemeCrystal #app#app .main > section.stack.hide,
html.prismThemeCrystal #app#app .main > section.stack[hidden]{
  display:none!important;visibility:hidden!important;
}
/* The new stylesheet must never force open authorization-gated tiles or actions. */
html.prismThemeCrystal #app#app .nav .hide,
html.prismThemeCrystal #app#app .prismModuleTile.hide,
html.prismThemeCrystal #app#app .prismModuleTile[hidden],
html.prismThemeCrystal #app#app [hidden]{display:none!important;}

/* FIX 2 — Remove the duplicate bird beside Refresh. The official emblem remains
   in the authenticated sidebar and the leading welcome emblem. */
html.prismThemeCrystal #app #homePage .prismReferenceHero::after{
  content:none!important;display:none!important;background:none!important;
}
html.prismThemeCrystal #app #homePage .prismReferenceHero{
  padding-right:13px!important;
}

/* FIX 3 — Keep chart/action/notification parents as real layout containers.
   Phase 2HZ `display:contents` converted them into stray grid cells; an admin-only
   Timeline Estimator tile could be squeezed to ~138px, with one letter per line.
   All original button and chart DOM elements remain untouched. */
html.prismThemeCrystal #app #homePage .prismReferenceLower{
  display:grid!important;grid-template-columns:minmax(0,2fr) minmax(280px,1fr)!important;
  grid-template-areas:'analytics alerts' 'actions actions'!important;
  grid-auto-flow:row!important;gap:14px!important;min-width:0!important;
  align-items:start!important;
}
html.prismThemeCrystal #app #homePage .prismRefAnalyticsStack{
  display:grid!important;grid-area:analytics!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  align-items:stretch!important;gap:13px!important;min-width:0!important;
}
html.prismThemeCrystal #app #homePage .prismRefNotifications{
  grid-area:alerts!important;min-width:0!important;min-height:290px!important;
  max-width:100%!important;align-self:stretch!important;
}
html.prismThemeCrystal #app #homePage .prismRefModules{
  grid-area:actions!important;display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  grid-auto-flow:row!important;grid-auto-rows:auto!important;
  gap:12px!important;min-width:0!important;width:100%!important;
  padding:12px 2px 6px!important;margin:0!important;
  overflow:visible!important;align-items:stretch!important;
}
html.prismThemeCrystal #app #homePage .prismRefModules::before{
  content:'Quick Actions'!important;display:block!important;
  grid-column:1/-1!important;height:auto!important;
  margin:0 0 2px!important;padding:0 4px!important;
  font:850 17px/1.35 Inter,'Segoe UI',sans-serif!important;
  color:#212347!important;min-width:0!important;
}
html.prismThemeCrystal #app #homePage .prismRefModules button.prismModuleTile,
html.prismThemeCrystal #app #homePage .prismRefModules button.prismModuleTile.prismModuleWide{
  width:100%!important;min-width:0!important;max-width:none!important;
  min-height:112px!important;height:auto!important;max-height:none!important;
  flex:auto!important;grid-column:auto!important;white-space:normal!important;
  overflow:hidden!important;border-radius:23px!important;
  padding:13px 12px!important;box-sizing:border-box!important;
}
html.prismThemeCrystal #app #homePage .prismRefModules button.prismModuleTile .prismModuleInfo,
html.prismThemeCrystal #app #homePage .prismRefModules button.prismModuleTile .prismModuleInfo :is(strong,small){
  min-width:0!important;max-width:none!important;white-space:normal!important;
  overflow-wrap:normal!important;word-break:normal!important;hyphens:auto!important;
}
html.prismThemeCrystal #app #homePage .prismRefModules button.prismModuleTile .prismModuleInfo strong{
  font-size:12px!important;line-height:1.28!important;
}
html.prismThemeCrystal #app #homePage .prismRefModules button.prismModuleTile .prismModuleInfo small{
  font-size:10px!important;line-height:1.34!important;max-height:none!important;
  overflow:visible!important;
}
html.prismThemeCrystal #app #homePage .prismRefAnalyticsStack :is(.prismRefProcessing,.prismRefAppStatus){
  min-width:0!important;width:100%!important;min-height:288px!important;height:auto!important;
}
@media(max-width:1350px){
  html.prismThemeCrystal #app #homePage .prismReferenceLower{
    grid-template-columns: minmax(0,1fr)!important;
    grid-template-areas:'analytics' 'actions' 'alerts'!important;
  }
  html.prismThemeCrystal #app #homePage .prismRefModules{grid-template-columns:repeat(3,minmax(0,1fr))!important;}
  html.prismThemeCrystal #app #homePage .prismRefNotifications{min-height:210px!important;}
}
@media(max-width:760px){
  html.prismThemeCrystal #app #homePage .prismRefAnalyticsStack{grid-template-columns:1fr!important;}
  html.prismThemeCrystal #app #homePage .prismRefModules{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}
@media(max-width:510px){
  html.prismThemeCrystal #app #homePage .prismRefModules{grid-template-columns:1fr!important;}
  html.prismThemeCrystal #app #homePage .prismRefModules button.prismModuleTile{min-height:86px!important;}
}
/* Restore the Admin Timeline Estimator page to the same usable content width as
   Classic. The estimator and its formulas are not changed. */
html.prismThemeCrystal #app #timelinePage,
html.prismThemeCrystal #app #timelinePage #prismTimelineRoot,
html.prismThemeCrystal #app #timelinePage .pteShell{
  min-width:0!important;max-width:100%!important;width:100%!important;
  box-sizing:border-box!important;
}
html.prismThemeCrystal #app #timelinePage .pteShell{
  display:grid!important;grid-template-columns:minmax(0,1fr)!important;
  overflow:visible!important;
}
html.prismThemeCrystal #app #timelinePage :is(.ptePanel,.pteGuided,.pteSetup){min-width:0!important;max-width:100%!important;}
html.prismThemeCrystal #app #timelinePage .pteTableScroll{max-width:100%!important;overflow-x:auto!important;}

/* FIX 4 — dark ruby-garnet heart with rainbow rotating optical rim.
   Current state comes ONLY from dashboard.js's existing .current class. */
@property --prism2ifHue{syntax:'<angle>';inherits:false;initial-value:0deg}
@keyframes prism2ifSpin{to{--prism2ifHue:360deg}}
@keyframes prism2ifRubyPulse{
  0%,100%{box-shadow:inset 0 3px 4px #fff9,inset 0 -8px 13px #110419aa,
    0 0 0 2px #fff,0 0 11px 4px #ff444dcc,0 0 24px 6px #9817dd9c,0 13px 20px #21092288;filter:saturate(1.15)}
  50%{box-shadow:inset 0 3px 5px #ffecbbee,inset 0 -9px 15px #09031bcc,
    0 0 0 3px #ffdbac,0 0 21px 8px #fa343ef0,0 0 33px 12px #27d9ffb6,0 15px 22px #32062ca6;filter:saturate(1.34)}
}
html.prismThemeCrystal #app #homePage .prismWorkflowStep.current{
  isolation:isolate!important;position:relative!important;z-index:12!important;
  background:radial-gradient(ellipse 70% 85% at 25% 0%,#f5386788,transparent 75%),
    radial-gradient(ellipse 70% 90% at 110% 100%,#6f29dfb0,transparent 80%),
    linear-gradient(171deg,#581228e8 0%,#320d38f5 48%,#170d36eb 100%)!important;
  border:2px solid rgba(255,248,243,.98)!important;
  color:#fff8f1!important;
  animation:prism2ifRubyPulse 3.2s ease-in-out infinite!important;
}
html.prismThemeCrystal #app #homePage .prismWorkflowStep.current::before{
  content:''!important;position:absolute!important;display:block!important;
  inset:-5px!important;padding:6px!important;border-radius:inherit!important;
  background:conic-gradient(from var(--prism2ifHue),#fff 0deg,#00ddff 32deg,#00a1ff 76deg,
    #fff6a0 104deg,#ff362d 137deg,#f22dbd 186deg,#c780ff 224deg,#fff 251deg,
    #fbbf4b 284deg,#04dcf9 318deg,#fff 360deg)!important;
  -webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0)!important;
  -webkit-mask-composite:xor!important;
  mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0)!important;
  mask-composite:exclude!important;
  opacity:1!important;pointer-events:none!important;z-index:4!important;
  filter:drop-shadow(0 0 6px #ff6b4c) drop-shadow(0 0 9px #2cddff)!important;
  animation:prism2ifSpin 2.5s linear infinite!important;
}
html.prismThemeCrystal #app #homePage .prismWorkflowStep.current::after{
  z-index:5!important;pointer-events:none!important;animation:prismICLensSweep 3.1s linear infinite!important;
}
html.prismThemeCrystal #app #homePage .prismWorkflowStep.current :is(strong,small){
  color:#fff9fa!important;text-shadow:0 1px 5px #08031d,0 0 6px #ff536b70!important;
  position:relative!important;z-index:6!important;
}
html.prismThemeCrystal #app #homePage .prismWorkflowStep.current .prismWorkflowCircle{
  color:#fff!important;border:2px solid #fff0c5!important;
  background:linear-gradient(135deg,#f78344,#b51646 50%,#661ac4)!important;
  box-shadow:inset 0 2px 2px #fff9,0 0 10px 4px #fc4457d1,0 0 19px 7px #8b66ff96!important;
  position:relative!important;z-index:7!important;
}
@media(prefers-reduced-motion:reduce){
  html.prismThemeCrystal #app #homePage .prismWorkflowStep.current,
  html.prismThemeCrystal #app #homePage .prismWorkflowStep.current::before,
  html.prismThemeCrystal #app #homePage .prismWorkflowStep.current::after,
  html.prismThemeCrystal #app #homePage .prismWorkflowStep.current .prismWorkflowCircle{
    animation:none!important;
  }
}

/* FIX 5 — render optical dimensionality AROUND the existing conic-gradient
   charts; never rewrite JS-generated colors, totals or percentages. */
html.prismThemeCrystal #app #homePage :is(#prismDonut,#prismAppDonut){
  position:relative!important;isolation:isolate!important;overflow:visible!important;
  border:1px solid #e6faff!important;
  box-shadow:inset 0 3px 4px #fff9,inset 0 -8px 10px #21175185,
    0 0 0 3px #fff8,0 8px 14px #23165165,-5px 7px 14px -10px #00ddff,
    5px 7px 14px -10px #e52efb!important;
  -webkit-backdrop-filter:saturate(140%)!important;backdrop-filter:saturate(140%)!important;
}
html.prismThemeCrystal #app #homePage :is(#prismDonut,#prismAppDonut)::before{
  content:''!important;position:absolute!important;inset:-3px!important;
  border:5px solid transparent!important;border-radius:50%!important;
  background:linear-gradient(125deg,#fff 7%,#64eaff 21%,#fff 32%,#b56cf7 57%,#fddc7d 76%,#fff 100%) border-box!important;
  -webkit-mask:linear-gradient(#fff 0 0) padding-box,linear-gradient(#fff 0 0)!important;
  -webkit-mask-composite:xor!important;mask:linear-gradient(#fff 0 0) padding-box,linear-gradient(#fff 0 0)!important;
  mask-composite:exclude!important;
  pointer-events:none!important;z-index:1!important;
  filter:drop-shadow(0 0 4px #43c9f1b9)!important;
}
html.prismThemeCrystal #app #homePage :is(#prismDonut,#prismAppDonut)::after{
  content:''!important;position:absolute!important;inset:6px 11px 53% 11px!important;
  border-top:3px solid rgba(255,255,255,.92)!important;border-radius:50% 50% 0 0!important;
  background:linear-gradient(180deg,#ffffff2c,transparent)!important;
  pointer-events:none!important;z-index:1!important;
}
html.prismThemeCrystal #app #homePage :is(#prismDonut,#prismAppDonut) .prismDonutHole{
  position:relative!important;z-index:2!important;
  background:radial-gradient(circle at 25% 12%,#fff,#e7f4ff 53%,#d5d7f7)!important;
  border:2px solid rgba(255,255,255,.96)!important;
  box-shadow:inset 0 2px 3px #fff,inset 0 -5px 9px #7389ba55,0 4px 9px #0b195c50!important;
}

/* FIX 6 — Crystal remains Crystal in the floating PR messaging dock.
   Scope to the theme, leaving chat permissions, attachments and logic intact. */
html.prismThemeCrystal .prismChatDock.hide,
html.prismThemeCrystal .prismChatPanel.hide{display:none!important;}
html.prismThemeCrystal .prismChatPanel{
  background:linear-gradient(162deg,rgba(245,247,255,.96),rgba(224,232,255,.94))!important;
  border:3px solid rgba(247,252,255,.95)!important;border-radius:24px!important;
  box-shadow:inset 0 2px 4px #fff,inset 0 -5px 12px #95aaff63,
    0 20px 45px rgba(29,18,87,.38),-6px 13px 22px -12px #05d6ff,
    6px 13px 24px -12px #fb40e3!important;
  -webkit-backdrop-filter:blur(19px) saturate(160%)!important;
  backdrop-filter:blur(19px) saturate(160%)!important;
}
html.prismThemeCrystal .prismChatHeader{
  background:linear-gradient(115deg,#172754,#4a1b80 58%,#193e7f)!important;
  border-bottom:2px solid #e7e8ff!important;
  box-shadow:inset 0 2px 3px #fff6,0 3px 10px #1d0b6e45!important;
}
html.prismThemeCrystal .prismChatBubble{
  background:linear-gradient(118deg,#1042a1,#481e95 65%,#ca2297)!important;
  border:3px solid #f2f7ff!important;color:#fff!important;
  box-shadow:inset 0 2px 3px #fffe,0 8px 16px #1b236d77,
    -4px 9px 12px -8px #00e6ff,4px 9px 12px -8px #fc55f9!important;
}
html.prismThemeCrystal :is(.prismChatPick,.prismChatMessages,.prismChatStatus,.prismChatComposer){
  background:linear-gradient(155deg,rgba(255,255,255,.76),rgba(218,221,255,.68))!important;
}
html.prismThemeCrystal .prismChatMsg{
  background:linear-gradient(165deg,#ffffffed,#e4effff0)!important;
  border:1.5px solid #fcfeff!important;
  box-shadow:inset 0 2px 2px #fff,0 4px 10px #3347842b!important;
}
html.prismThemeCrystal .prismChatMsg.own{
  background:linear-gradient(150deg,#e3fdff,#e9defb 74%)!important;
}
html.prismThemeCrystal :is(.prismChatComposer textarea,.prismChatPick select){
  background:#f9fbff!important;color:#22325b!important;border:2px solid #c5d5ff!important;
  box-shadow:inset 0 2px 5px #5f73a32c,inset 0 -1px 2px #fff!important;
}
html.prismThemeCrystal .prismChatComposer button:not(:disabled){
  background:linear-gradient(125deg,#008bd4,#4623a3 72%,#bb298e)!important;
  border:1px solid #fff!important;box-shadow:inset 0 2px 2px #fff9,0 5px 9px #33218666!important;
}
/* The old Phase 2HZ layout attached named grid areas/spans directly to action
   buttons and analytics cards. Explicitly clear them when using the fixed nested
   layout; otherwise CSS Grid creates phantom 5th-9th columns. */
html.prismThemeCrystal #app#app #homePage .prismRefModules > button.prismModuleTile,
html.prismThemeCrystal #app#app #homePage .prismRefModules > button.prismModuleTile.prismModuleWide,
html.prismThemeCrystal #app#app #homePage .prismRefAnalyticsStack > .prismGlassPanel{
  grid-area:auto!important;grid-column:auto!important;grid-row:auto!important;
}
/* Final contrast and authorization guards: beat the legacy ID-specific rules. */
html.prismThemeCrystal #app#app #homePage#homePage .prismWorkflowStep.current > strong,
html.prismThemeCrystal #app#app #homePage#homePage .prismWorkflowStep.current > small{
  color:#fffaf4!important;text-shadow:0 2px 3px #10031c,0 0 7px #ff7276bb!important;
  opacity:1!important;z-index:8!important;
}
html.prismThemeCrystal #app#app #homePage#homePage .prismWorkflowStep.current > .prismWorkflowCircle{
  color:#fff!important;z-index:8!important;
}
html.prismThemeCrystal #app#app #homePage#homePage .prismRefModules > button.prismModuleTile.hide,
html.prismThemeCrystal #app#app #homePage#homePage .prismRefModules > button.prismModuleTile[hidden]{
  display:none!important;visibility:hidden!important;
}
/* Prevent the old compact-height override from cutting off stage titles and
   placing the helper text over the bottom of the active lens. */
html.prismThemeCrystal #app#app #homePage#homePage .prismReferenceWorkflow .prismWorkflowViewport{
  height:auto!important;max-height:none!important;min-height:130px!important;
  padding:7px 2px 10px!important;overflow-x:auto!important;overflow-y:hidden!important;
}
html.prismThemeCrystal #app#app #homePage#homePage .prismReferenceWorkflow .prismWorkflowTrack{
  min-height:111px!important;margin-top:0!important;padding:2px 0 4px!important;
}
html.prismThemeCrystal #app#app #homePage#homePage .prismReferenceWorkflow .prismWorkflowStep{
  min-height:105px!important;height:auto!important;max-height:none!important;
  padding:8px 6px 7px!important;
}
html.prismThemeCrystal #app#app #homePage#homePage .prismReferenceWorkflow .prismWorkflowHint{
  position:relative!important;z-index:1!important;margin:4px 0 0!important;
}
/* Early optical CSS set -webkit-text-fill-color to dark mauve. That property
   survives a later `color:white` override, so the current-stage title looked
   nearly invisible on the new garnet lens. */
html.prismThemeCrystal #app#app #homePage#homePage .prismWorkflowStep.current > :is(strong,small){
  -webkit-text-fill-color:#fffaf4!important;
}
