/*
 * Cashback Pro V36.7.136 — Seasonal header/card/table gradient refinement
 *
 * Base: V36.7.135 (which carries the V129 rollback baseline).
 *
 * Requested:
 * 1. Animated gradient header for Halloween, Winter and Ocean in portrait
 *    and landscape, using a dedicated background layer so older header reset
 *    rules cannot freeze the effect.
 * 2. Slightly softer and more translucent gradient colors for the 3 seasonal
 *    themes' four KPI cards.
 * 3. Animated gradient on the Recent Orders card.
 * 4. One continuous gradient across each table header row, not a separate
 *    gradient restarted in every TH cell.
 *
 * No layout/size edits, no data or business-logic edits.
 */

@property --v136-header-shift {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 0%;
}
@property --v136-card-shift {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 0%;
}
@property --v136-orders-shift {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 0%;
}
@property --v136-table-shift {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 0%;
}

/* -------------------------------------------------------------------------
   Shared: animated gradient background helper for the top app header.
   The pseudo-element is a background wash only, not an additional frame.
   Existing header content remains above it and fully interactive.
   ------------------------------------------------------------------------- */
html body.theme-halloween .app-header,
html body.halloween-active .app-header,
html body.theme-winter .app-header,
html body.theme-ocean .app-header {
  isolation: isolate !important;
  position: relative !important;
}

html body.theme-halloween .app-header::before,
html body.halloween-active .app-header::before,
html body.theme-winter .app-header::before,
html body.theme-ocean .app-header::before {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 0 !important;
  pointer-events: none !important;
  border: 0 !important;
  box-shadow: none !important;
  background-repeat: no-repeat !important;
  background-size: 240% 240%, 240% 240%, 260% 260% !important;
  animation: v367136SeasonalHeaderFlow 27s ease-in-out infinite alternate !important;
}

/* Header content must paint above the moving background layer. */
html body.theme-halloween .app-header > *,
html body.halloween-active .app-header > *,
html body.theme-winter .app-header > *,
html body.theme-ocean .app-header > * {
  position: relative !important;
  z-index: 1 !important;
}

/* HALLOWEEN — restrained violet / plum / ember, dark enough for the artwork. */
html body.theme-halloween .app-header::before,
html body.halloween-active .app-header::before {
  background-color: rgba(31, 18, 45, .28) !important;
  background-image:
    radial-gradient(ellipse 72% 125% at 4% 4%, rgba(163, 91, 195, .24), transparent 72%),
    radial-gradient(ellipse 76% 120% at 96% 96%, rgba(218, 111, 59, .16), transparent 73%),
    linear-gradient(115deg, rgba(82, 42, 112, .28), rgba(48, 27, 76, .24) 52%, rgba(112, 55, 77, .22)) !important;
}

/* WINTER — deep glacier blue / ice cyan / silver-blue. */
html body.theme-winter .app-header::before {
  background-color: rgba(8, 35, 65, .26) !important;
  background-image:
    radial-gradient(ellipse 72% 125% at 4% 4%, rgba(73, 158, 222, .25), transparent 72%),
    radial-gradient(ellipse 76% 120% at 96% 96%, rgba(147, 211, 247, .17), transparent 73%),
    linear-gradient(115deg, rgba(18, 88, 143, .30), rgba(13, 49, 91, .25) 52%, rgba(34, 112, 148, .22)) !important;
}

/* OCEAN — dark teal / cobalt / turquoise. */
html body.theme-ocean .app-header::before {
  background-color: rgba(3, 31, 43, .27) !important;
  background-image:
    radial-gradient(ellipse 72% 125% at 4% 4%, rgba(24, 174, 168, .23), transparent 72%),
    radial-gradient(ellipse 76% 120% at 96% 96%, rgba(64, 147, 207, .18), transparent 73%),
    linear-gradient(115deg, rgba(5, 101, 111, .28), rgba(5, 53, 78, .25) 52%, rgba(14, 112, 132, .22)) !important;
}

/* -------------------------------------------------------------------------
   Softened seasonal KPI cards. Keep the backdrop scene visible through glass.
   The ::before gradient is the animated color wash. Existing ::after sweep
   from the original seasonal styling is preserved.
   ------------------------------------------------------------------------- */
html body.theme-halloween #seasonal-dashboard .seasonal-main .seasonal-kpis > article.seasonal-kpi,
html body.halloween-active #seasonal-dashboard .seasonal-main .seasonal-kpis > article.seasonal-kpi,
html body.theme-winter #seasonal-dashboard .seasonal-main .seasonal-kpis > article.seasonal-kpi,
html body.theme-ocean #seasonal-dashboard .seasonal-main .seasonal-kpis > article.seasonal-kpi {
  position: relative !important;
  isolation: isolate !important;
  overflow: hidden !important;
  background: rgba(7, 24, 43, .34) !important;
  border-color: rgba(160, 192, 221, .30) !important;
  box-shadow: 0 9px 23px rgba(0, 0, 0, .18),
              inset 0 1px 0 rgba(235, 247, 255, .07) !important;
  -webkit-backdrop-filter: blur(16px) saturate(132%) !important;
  backdrop-filter: blur(16px) saturate(132%) !important;
}

html body.theme-halloween #seasonal-dashboard .seasonal-main .seasonal-kpis > article.seasonal-kpi::before,
html body.halloween-active #seasonal-dashboard .seasonal-main .seasonal-kpis > article.seasonal-kpi::before,
html body.theme-winter #seasonal-dashboard .seasonal-main .seasonal-kpis > article.seasonal-kpi::before,
html body.theme-ocean #seasonal-dashboard .seasonal-main .seasonal-kpis > article.seasonal-kpi::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 0 !important;
  pointer-events: none !important;
  border-radius: inherit !important;
  background-repeat: no-repeat !important;
  background-size: 250% 250%, 250% 250%, 270% 270% !important;
  animation: v367136CardColorFlow 29s ease-in-out infinite alternate !important;
}

html body.theme-halloween #seasonal-dashboard .seasonal-main .seasonal-kpis > article.seasonal-kpi > *,
html body.halloween-active #seasonal-dashboard .seasonal-main .seasonal-kpis > article.seasonal-kpi > *,
html body.theme-winter #seasonal-dashboard .seasonal-main .seasonal-kpis > article.seasonal-kpi > *,
html body.theme-ocean #seasonal-dashboard .seasonal-main .seasonal-kpis > article.seasonal-kpi > * {
  position: relative !important;
  z-index: 1 !important;
}

/* Seasonal KPI gradient palette — reduced intensity vs V134. */
html body.theme-halloween #seasonal-dashboard .seasonal-main .seasonal-kpis > article.seasonal-kpi::before,
html body.halloween-active #seasonal-dashboard .seasonal-main .seasonal-kpis > article.seasonal-kpi::before {
  background-color: rgba(36, 19, 53, .12) !important;
  background-image:
    radial-gradient(ellipse 76% 116% at 5% 8%, rgba(161, 89, 188, .19), transparent 74%),
    radial-gradient(ellipse 78% 118% at 96% 92%, rgba(211, 111, 71, .12), transparent 74%),
    linear-gradient(118deg, rgba(105, 54, 128, .22), rgba(58, 32, 84, .18) 52%, rgba(126, 54, 77, .17)) !important;
}

html body.theme-winter #seasonal-dashboard .seasonal-main .seasonal-kpis > article.seasonal-kpi::before {
  background-color: rgba(7, 35, 62, .12) !important;
  background-image:
    radial-gradient(ellipse 76% 116% at 5% 8%, rgba(76, 163, 224, .20), transparent 74%),
    radial-gradient(ellipse 78% 118% at 96% 92%, rgba(143, 211, 247, .14), transparent 74%),
    linear-gradient(118deg, rgba(26, 104, 158, .23), rgba(14, 58, 101, .19) 52%, rgba(36, 119, 151, .16)) !important;
}

html body.theme-ocean #seasonal-dashboard .seasonal-main .seasonal-kpis > article.seasonal-kpi::before {
  background-color: rgba(2, 31, 43, .12) !important;
  background-image:
    radial-gradient(ellipse 76% 116% at 5% 8%, rgba(26, 176, 168, .18), transparent 74%),
    radial-gradient(ellipse 78% 118% at 96% 92%, rgba(65, 151, 212, .15), transparent 74%),
    linear-gradient(118deg, rgba(7, 112, 119, .21), rgba(5, 60, 83, .18) 52%, rgba(12, 125, 143, .16)) !important;
}

/* Stagger cards to create a quiet, natural flow rather than flashing together. */
html body #seasonal-dashboard .seasonal-kpis > article.seasonal-kpi:nth-child(1)::before {
  animation-delay: 0s !important;
}
html body #seasonal-dashboard .seasonal-kpis > article.seasonal-kpi:nth-child(2)::before {
  animation-delay: -7s !important;
}
html body #seasonal-dashboard .seasonal-kpis > article.seasonal-kpi:nth-child(3)::before {
  animation-delay: -14s !important;
}
html body #seasonal-dashboard .seasonal-kpis > article.seasonal-kpi:nth-child(4)::before {
  animation-delay: -21s !important;
}

/* -------------------------------------------------------------------------
   Recent Orders card — add the same subdued animated gradient glass treatment.
   Only the card background is animated; content and horizontal table scroll
   remain above the color layer and keep their existing interaction.
   ------------------------------------------------------------------------- */
html body.theme-halloween #seasonal-dashboard .seasonal-orders,
html body.halloween-active #seasonal-dashboard .seasonal-orders,
html body.theme-winter #seasonal-dashboard .seasonal-orders,
html body.theme-ocean #seasonal-dashboard .seasonal-orders {
  position: relative !important;
  isolation: isolate !important;
  overflow: hidden !important;
  background: rgba(7, 24, 43, .34) !important;
  border-color: rgba(160, 192, 221, .30) !important;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .19),
              inset 0 1px 0 rgba(235, 247, 255, .07) !important;
  -webkit-backdrop-filter: blur(16px) saturate(132%) !important;
  backdrop-filter: blur(16px) saturate(132%) !important;
}

html body.theme-halloween #seasonal-dashboard .seasonal-orders::before,
html body.halloween-active #seasonal-dashboard .seasonal-orders::before,
html body.theme-winter #seasonal-dashboard .seasonal-orders::before,
html body.theme-ocean #seasonal-dashboard .seasonal-orders::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 0 !important;
  pointer-events: none !important;
  border-radius: inherit !important;
  background-repeat: no-repeat !important;
  background-size: 250% 250%, 250% 250%, 270% 270% !important;
  animation: v367136OrdersColorFlow 33s ease-in-out infinite alternate !important;
}

html body.theme-halloween #seasonal-dashboard .seasonal-orders::before,
html body.halloween-active #seasonal-dashboard .seasonal-orders::before {
  background-image:
    radial-gradient(ellipse 78% 120% at 5% 7%, rgba(164, 88, 190, .16), transparent 74%),
    radial-gradient(ellipse 78% 120% at 96% 94%, rgba(214, 108, 66, .11), transparent 74%),
    linear-gradient(118deg, rgba(103, 52, 126, .19), rgba(54, 31, 78, .17) 53%, rgba(119, 51, 74, .15)) !important;
}
html body.theme-winter #seasonal-dashboard .seasonal-orders::before {
  background-image:
    radial-gradient(ellipse 78% 120% at 5% 7%, rgba(73, 160, 222, .17), transparent 74%),
    radial-gradient(ellipse 78% 120% at 96% 94%, rgba(143, 212, 247, .12), transparent 74%),
    linear-gradient(118deg, rgba(23, 101, 153, .20), rgba(13, 55, 97, .17) 53%, rgba(32, 116, 149, .15)) !important;
}
html body.theme-ocean #seasonal-dashboard .seasonal-orders::before {
  background-image:
    radial-gradient(ellipse 78% 120% at 5% 7%, rgba(24, 172, 166, .16), transparent 74%),
    radial-gradient(ellipse 78% 120% at 96% 94%, rgba(64, 146, 207, .13), transparent 74%),
    linear-gradient(118deg, rgba(7, 107, 115, .19), rgba(4, 55, 79, .17) 53%, rgba(11, 118, 136, .15)) !important;
}

html body.theme-halloween #seasonal-dashboard .seasonal-orders > *,
html body.halloween-active #seasonal-dashboard .seasonal-orders > *,
html body.theme-winter #seasonal-dashboard .seasonal-orders > *,
html body.theme-ocean #seasonal-dashboard .seasonal-orders > * {
  position: relative !important;
  z-index: 1 !important;
}

/* -------------------------------------------------------------------------
   Table headings: one continuous moving gradient per entire header row.
   Every TH is transparent so the gradient does not restart at column edges.
   Applies to all app tables: dashboard orders, admin, knowledge base, finance.
   ------------------------------------------------------------------------- */
html body table thead,
html body table.custom-table thead {
  background: transparent !important;
}

html body table thead tr,
html body table.custom-table thead tr {
  background-repeat: no-repeat !important;
  background-size: 260% 100% !important;
  animation: v367136TableHeadingFlow 31s ease-in-out infinite alternate !important;
}

/* Reset cell-level colors/gradients set by V36.7.115 and older theme rules. */
html body table thead tr th,
html body table.custom-table thead tr th,
html body .custom-table thead tr th {
  background: transparent !important;
  background-image: none !important;
  background-color: transparent !important;
  background-clip: padding-box !important;
  box-shadow: none !important;
}

/* DEFAULT LIGHT — one pearl-blue to lavender line across all columns. */
html body.default-light-mode table thead tr,
html body.theme-default.default-light-mode table thead tr {
  background-image: linear-gradient(112deg,
    rgba(181, 207, 238, .96) 0%,
    rgba(205, 207, 239, .96) 52%,
    rgba(181, 222, 215, .94) 100%) !important;
  border-bottom: 1px solid rgba(106, 139, 183, .34) !important;
}
html body.default-light-mode table thead tr th,
html body.theme-default.default-light-mode table thead tr th {
  color: #2d405a !important;
  border-color: rgba(106, 139, 183, .24) !important;
}

/* DEFAULT DARK — continuous navy to muted indigo. */
html body.default-dark-mode table thead tr,
html body.theme-default:not(.default-light-mode) table thead tr {
  background-image: linear-gradient(112deg,
    rgba(29, 54, 86, .97) 0%,
    rgba(42, 53, 91, .96) 52%,
    rgba(56, 43, 82, .95) 100%) !important;
  border-bottom: 1px solid rgba(142, 168, 211, .28) !important;
}
html body.default-dark-mode table thead tr th,
html body.theme-default:not(.default-light-mode) table thead tr th {
  color: #f0f5ff !important;
  border-color: rgba(142, 168, 211, .20) !important;
}

/* HALLOWEEN — one connected plum / violet / ember header strip. */
html body.theme-halloween table thead tr,
html body.halloween-active table thead tr {
  background-image: linear-gradient(112deg,
    rgba(60, 34, 78, .97) 0%,
    rgba(82, 43, 91, .96) 52%,
    rgba(91, 47, 66, .95) 100%) !important;
  border-bottom: 1px solid rgba(201, 153, 219, .28) !important;
}
html body.theme-halloween table thead tr th,
html body.halloween-active table thead tr th {
  color: #fff2ff !important;
  border-color: rgba(201, 153, 219, .20) !important;
}

/* WINTER — one connected glacier / ice-blue header strip. */
html body.theme-winter table thead tr {
  background-image: linear-gradient(112deg,
    rgba(20, 66, 105, .97) 0%,
    rgba(29, 82, 120, .96) 52%,
    rgba(34, 75, 111, .95) 100%) !important;
  border-bottom: 1px solid rgba(151, 205, 240, .28) !important;
}
html body.theme-winter table thead tr th {
  color: #f1f8ff !important;
  border-color: rgba(151, 205, 240, .20) !important;
}

/* OCEAN — one connected teal / blue header strip. */
html body.theme-ocean table thead tr {
  background-image: linear-gradient(112deg,
    rgba(5, 62, 78, .97) 0%,
    rgba(7, 83, 96, .96) 52%,
    rgba(15, 70, 91, .95) 100%) !important;
  border-bottom: 1px solid rgba(111, 211, 214, .27) !important;
}
html body.theme-ocean table thead tr th {
  color: #eaffff !important;
  border-color: rgba(111, 211, 214, .19) !important;
}

/* One shared motion for all cells in the same table heading row. */
@keyframes v367136SeasonalHeaderFlow {
  from { --v136-header-shift: 0%; }
  to   { --v136-header-shift: 100%; }
}
@keyframes v367136CardColorFlow {
  from { --v136-card-shift: 0%; }
  to   { --v136-card-shift: 100%; }
}
@keyframes v367136OrdersColorFlow {
  from { --v136-orders-shift: 0%; }
  to   { --v136-orders-shift: 100%; }
}
@keyframes v367136TableHeadingFlow {
  from { --v136-table-shift: 0%; }
  to   { --v136-table-shift: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html body.theme-halloween .app-header::before,
  html body.halloween-active .app-header::before,
  html body.theme-winter .app-header::before,
  html body.theme-ocean .app-header::before,
  html body.theme-halloween #seasonal-dashboard .seasonal-kpis > article.seasonal-kpi::before,
  html body.halloween-active #seasonal-dashboard .seasonal-kpis > article.seasonal-kpi::before,
  html body.theme-winter #seasonal-dashboard .seasonal-kpis > article.seasonal-kpi::before,
  html body.theme-ocean #seasonal-dashboard .seasonal-kpis > article.seasonal-kpi::before,
  html body.theme-halloween #seasonal-dashboard .seasonal-orders::before,
  html body.halloween-active #seasonal-dashboard .seasonal-orders::before,
  html body.theme-winter #seasonal-dashboard .seasonal-orders::before,
  html body.theme-ocean #seasonal-dashboard .seasonal-orders::before,
  html body table thead tr {
    animation: none !important;
  }
}
