/**
 * MRSTORE Shift Mode — fun, glanceable UI for c-store owners on shift.
 */
@keyframes shift-bg-drift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
@keyframes shift-shine {
  0% { transform: translateX(-120%) skewX(-12deg); }
  100% { transform: translateX(220%) skewX(-12deg); }
}
@keyframes shift-pulse-soft {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
  50% { box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12); }
}
@keyframes shift-urgent-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.2); }
  50% { box-shadow: 0 0 0 5px rgba(249, 115, 22, 0.28); }
}
@keyframes shift-celebrate-pop {
  0% { transform: scale(1); }
  35% { transform: scale(1.02); }
  100% { transform: scale(1); }
}
@keyframes shift-float-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes shift-coin-wiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-8deg); }
  75% { transform: rotate(8deg); }
}

body.app-shift-mode:not(.guest-mode) {
  background: linear-gradient(165deg, #f0fdf4 0%, #f8fafc 35%, #fff7ed 70%, #f8fafc 100%);
  background-size: 200% 200%;
  animation: shift-bg-drift 18s ease infinite;
}

.shift-greeting-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.35rem;
  padding: 0.45rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.6875rem;
  line-height: 1.35;
  animation: shift-float-in 0.45s ease;
  border: 1px solid rgba(16, 185, 129, 0.2);
  background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(236,253,245,0.9) 100%);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.08);
}
.shift-greeting-emoji { font-size: 1.1rem; line-height: 1; flex-shrink: 0; }
.shift-greeting-text { color: #3f3f46; min-width: 0; }
.shift-greeting-text strong { color: #047857; font-weight: 800; }
.shift-vibe-night { border-color: rgba(99, 102, 241, 0.25); background: linear-gradient(135deg, #eef2ff 0%, #fff 100%); }
.shift-vibe-night .shift-greeting-text strong { color: #4338ca; }
.shift-vibe-close { border-color: rgba(245, 158, 11, 0.3); background: linear-gradient(135deg, #fffbeb 0%, #fff 100%); }
.shift-vibe-close .shift-greeting-text strong { color: #b45309; }
.shift-vibe-midday { border-color: rgba(249, 115, 22, 0.25); }
.shift-vibe-midday .shift-greeting-text strong { color: #c2410c; }

#app-header-subtitle.app-shift-sub { color: #047857; font-weight: 600; }

.store-dock-curve-shell {
  background: linear-gradient(135deg, #ffffff 0%, #ecfdf5 40%, #fef3c7 100%) !important;
  border-color: rgba(16, 185, 129, 0.28) !important;
  box-shadow: 0 6px 22px rgba(16, 185, 129, 0.16), inset 0 1px 0 rgba(255,255,255,0.95) !important;
}
.store-slide-chip.active {
  border-color: #059669 !important;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%) !important;
  color: #065f46 !important;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.22);
  transform: scale(1.02);
}
.store-slide-chip:not(.active):hover {
  border-color: rgba(16, 185, 129, 0.35);
  background: #fff;
}

#btn-header-money.header-money-desktop {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  position: relative;
  overflow: hidden;
}
#btn-header-money.header-money-desktop .money-nav-coin {
  display: inline-block;
  animation: shift-coin-wiggle 2.5s ease-in-out infinite;
}
#btn-header-money.header-money-desktop::after {
  display: none;
}

#section-quick-add.shift-today-card {
  border-color: rgba(16, 185, 129, 0.15);
  background: linear-gradient(165deg, #fff 0%, #f0fdf4 40%, #fff 100%);
  box-shadow: 0 10px 36px -12px rgba(6, 78, 59, 0.12);
}
#section-quick-add .quick-store-title {
  background: linear-gradient(135deg, #047857, #059669);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.quick-btn {
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 18px -6px rgba(0,0,0,0.25);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.mr-pro-quick-add .quick-btn {
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.mr-pro-quick-add .quick-btn[data-type="daily_sale"],
.mr-pro-quick-add .quick-btn.quick-btn-reports {
  box-shadow: 0 6px 18px rgba(5, 150, 105, 0.22);
}
.mr-pro-quick-add .quick-btn.quick-btn-reports {
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.2);
}
.quick-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 42%, rgba(255,255,255,0.22) 50%, transparent 58%);
  transform: translateX(-120%);
  transition: transform 0.6s ease;
  pointer-events: none;
}
.quick-btn:hover::after,
.quick-btn:focus-visible::after {
  transform: translateX(120%);
}
.quick-btn:active {
  transform: scale(0.97);
  box-shadow: 0 3px 10px -4px rgba(0,0,0,0.2);
}
.quick-btn-icon {
  font-size: 1.35rem;
  margin-bottom: 0.15rem;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.15));
}

.brain-strip {
  background: linear-gradient(135deg, #ffffff 0%, #d1fae5 100%) !important;
  border-color: #6ee7b7 !important;
  box-shadow: 0 8px 28px -8px rgba(6, 78, 59, 0.2);
}
.brain-pillar {
  position: relative;
  overflow: hidden;
}
.brain-pillar-ring {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: conic-gradient(#10b981 calc(var(--ring, 0) * 1%), #e4e4e7 0);
  opacity: 0.85;
}
.brain-pillar-ok {
  animation: shift-pulse-soft 3s ease infinite;
}
.brain-pillar-warn .brain-pillar-ring { background: conic-gradient(#f59e0b calc(var(--ring, 60) * 1%), #fde68a 0); }
.brain-pillar-bad .brain-pillar-ring { background: conic-gradient(#ef4444 calc(var(--ring, 30) * 1%), #fecaca 0); }
.brain-next-step {
  background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%) !important;
  border-style: solid !important;
  border-color: #a5b4fc !important;
  font-size: 0.6875rem !important;
  transition: transform 0.12s ease;
}
.brain-next-step:active { transform: scale(0.98); }
.brain-os-badge {
  background: linear-gradient(135deg, rgba(99,102,241,0.15) 0%, rgba(16,185,129,0.12) 100%) !important;
}

#tools-hub.shift-tools-hub {
  background: linear-gradient(165deg, #fff 0%, #faf5ff 35%, #fff 100%);
  border-color: rgba(139, 92, 246, 0.12);
  box-shadow: 0 12px 40px -16px rgba(88, 28, 135, 0.1);
}
.tools-hub-section[data-hub-section="money"] .tools-hub-head {
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
}
.tools-hub-section[data-hub-section="inventory"] .tools-hub-head {
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
}
.tools-hub-section[data-hub-section="lottery"] .tools-hub-head {
  background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
}
.tools-hub-section.is-open .tools-hub-head {
  box-shadow: inset 0 -1px 0 rgba(0,0,0,0.04);
}
.tools-hub-body .nav-tool {
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}
.tools-hub-body .nav-tool:active {
  transform: scale(0.97);
}
.tools-hub-body .nav-tool-primary {
  box-shadow: 0 4px 12px -4px rgba(0,0,0,0.15);
}

.home-shelf-overview-tile,
.shelf-pulse-tile {
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.home-shelf-overview-tile:hover,
.shelf-pulse-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px -6px rgba(249, 115, 22, 0.25);
}
.shelf-pulse-urgent {
  animation: shift-urgent-glow 2.2s ease infinite;
}
.shelf-pulse-urgent.home-shelf-tile-status-empty,
.shelf-pulse-urgent.home-shelf-tile-status-low {
  box-shadow: 0 0 0 1px rgba(254, 202, 202, 0.6);
}

.insight-mood-banner {
  border-radius: 1.15rem;
  overflow: hidden;
}
.today-card-ok {
  background: linear-gradient(135deg, #ecfdf5 0%, #fff 60%) !important;
}
.shift-celebrate {
  animation: shift-celebrate-pop 0.65s ease;
}

.page-enter.order-1 { animation: shift-float-in 0.4s ease both; }
.page-enter.order-3 { animation: shift-float-in 0.5s 0.08s ease both; }
.page-enter.order-4 { animation: shift-float-in 0.5s 0.14s ease both; }

#home-dashboard-status { animation: shift-float-in 0.45s 0.05s ease both; }

.shift-streak-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.5625rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
  border: 1px solid #fcd34d;
}

/* Store switch visuals live in mrstore-app.css (v357+) — keep dock glow here */
body.store-switching .store-dock-curve-shell {
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.4), 0 6px 22px rgba(16, 185, 129, 0.18) !important;
  transition: box-shadow 0.2s ease;
}

/* Stop animated cream gradient bleeding through modal scrims at viewport edges */
html:has(body.app-shift-mode.mr-catalog-open):not(:has(body.guest-mode)),
html:has(body.app-shift-mode.mr-dshelf-open):not(:has(body.guest-mode)),
html:has(body.app-shift-mode:has(#catalog-modal:not(.hidden))):not(:has(body.guest-mode)),
html:has(body.app-shift-mode:has(#digital-shelf-modal:not(.hidden))):not(:has(body.guest-mode)),
body.app-shift-mode.mr-catalog-open:not(.guest-mode),
body.app-shift-mode.mr-dshelf-open:not(.guest-mode),
body.app-shift-mode:has(#catalog-modal:not(.hidden)):not(.guest-mode),
body.app-shift-mode:has(#digital-shelf-modal:not(.hidden)):not(.guest-mode),
body.app-shift-mode:has(#vendor-order-modal:not(.hidden)):not(.guest-mode),
body.app-shift-mode:has(#vendor-hub-modal:not(.hidden)):not(.guest-mode) {
  animation: none !important;
  background: #52525b !important;
  background-size: auto !important;
}

@media (prefers-reduced-motion: reduce) {
  body.app-shift-mode,
  .quick-btn::after,
  #btn-header-money.header-money-desktop::after,
  .brain-pillar-ok,
  .shelf-pulse-urgent,
  .store-slide-chip.active { animation: none !important; }
  .page-enter { animation: none !important; }
}