/* --- CHRISTMAS NIGHT THEME (Nov - Dec) --- */
/* Đêm Giáng sinh: trời đêm navy, tuyết rơi, dây đèn nhấp nháy, rừng thông phủ tuyết */
/* Lưu ý: đỏ/xanh lá chỉ dùng để trang trí nhẹ, để không lẫn với màu tăng/giảm KPI */

@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@400;700;800;900&family=Baloo+2:wght@700;800&family=Mountains+of+Christmas:wght@700&display=swap");

:root {
  --scale: 1;

  /* === CHRISTMAS NIGHT PALETTE === */
  --night-deep: #050b18;
  --night-mid: #0b1a33;
  --night-light: #16305a;
  --pine-dark: #0a2e22;
  --pine: #11583a;

  --snow: #f4f8ff;
  --ice: #cfe8ff;
  --ice-dim: #8fb4d9;

  --gold: #f5c542;
  --gold-soft: #ffe7a3;
  --gold-deep: #c8961e;

  --berry: #d6202f; /* decor only */
  --holly: #1f8a4c; /* decor only */
  --lavender: #c9b6ff;

  /* Semantic (KPI) */
  --positive: #3dff9a;
  --negative: #ff6b6b;
  --glow-gold: rgba(245, 197, 66, 0.4);
  --glow-ice: rgba(207, 232, 255, 0.35);
  --glow-berry: rgba(214, 32, 47, 0.45);
  --glow-positive: rgba(61, 255, 154, 0.3);
  --glow-negative: rgba(255, 107, 107, 0.3);

  --text-primary: #ffffff;
  --text-secondary: var(--ice);
  --text-muted: #7f9cc0;
  --border-color: rgba(207, 232, 255, 0.18);

  --bg-dark: var(--night-deep);
}

* {
  box-sizing: border-box;
}

/* ===== BODY + NIGHT SKY ===== */
body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  font-family: "Nunito", sans-serif;
  background: var(--bg-dark);
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(
      ellipse 60% 40% at 85% 8%,
      rgba(255, 240, 200, 0.12) 0%,
      transparent 60%
    ),
    radial-gradient(
      ellipse 80% 35% at 20% 0%,
      rgba(80, 140, 255, 0.12) 0%,
      transparent 70%
    ),
    linear-gradient(
      180deg,
      #040914 0%,
      #0b1a33 30%,
      #12284d 55%,
      #0f2a40 75%,
      #0a2e22 100%
    );
  z-index: 0;
}

/* Moon */
body::after {
  content: "";
  position: fixed;
  top: 4%;
  right: 6%;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 38% 38%,
    #fffdf2 0%,
    #fff4cf 45%,
    #f1dc9a 100%
  );
  box-shadow:
    0 0 40px 12px rgba(255, 240, 190, 0.35),
    0 0 120px 40px rgba(255, 230, 160, 0.12);
  opacity: 0.55;
  z-index: 0;
  pointer-events: none;
}

/* ===== TWINKLING STARS ===== */
.twinkle-star {
  position: fixed;
  border-radius: 50%;
  background: #ffffff;
  pointer-events: none;
  z-index: 0;
  animation: starTwinkle ease-in-out infinite;
}
@keyframes starTwinkle {
  0%,
  100% {
    opacity: 0.15;
    transform: scale(0.7);
  }
  50% {
    opacity: 0.95;
    transform: scale(1.15);
  }
}

/* ===== SNOWFALL ===== */
.snowflake {
  position: fixed;
  top: -5vh;
  color: #ffffff;
  pointer-events: none;
  z-index: 3;
  user-select: none;
  line-height: 1;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.6);
  animation-name: snowFall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  will-change: transform;
}
@keyframes snowFall {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  25% {
    transform: translate3d(var(--sway), 27vh, 0) rotate(90deg);
  }
  50% {
    transform: translate3d(0, 55vh, 0) rotate(180deg);
  }
  75% {
    transform: translate3d(calc(var(--sway) * -1), 82vh, 0) rotate(270deg);
  }
  100% {
    transform: translate3d(0, 110vh, 0) rotate(360deg);
  }
}

/* ===== STRING LIGHTS (top garland) ===== */
.xmas-lights {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: calc(70px * var(--scale));
  z-index: 4;
  pointer-events: none;
}
.xmas-lights svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.xmas-bulb {
  position: absolute;
  width: calc(16px * var(--scale));
  height: calc(24px * var(--scale));
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  transform: translateX(-50%);
  animation: bulbGlow 1.6s ease-in-out infinite;
}
.xmas-bulb::before {
  /* socket */
  content: "";
  position: absolute;
  top: calc(-6px * var(--scale));
  left: 50%;
  transform: translateX(-50%);
  width: calc(9px * var(--scale));
  height: calc(8px * var(--scale));
  background: #2b3a2f;
  border-radius: calc(2px * var(--scale));
}
.xmas-bulb.red {
  background: #ff3b4e;
  --bulb-glow: rgba(255, 59, 78, 0.85);
}
.xmas-bulb.gold {
  background: #ffd23f;
  --bulb-glow: rgba(255, 210, 63, 0.85);
}
.xmas-bulb.green {
  background: #3ddc84;
  --bulb-glow: rgba(61, 220, 132, 0.85);
}
.xmas-bulb.blue {
  background: #4fb3ff;
  --bulb-glow: rgba(79, 179, 255, 0.85);
}
@keyframes bulbGlow {
  0%,
  100% {
    opacity: 1;
    box-shadow:
      0 0 calc(10px * var(--scale)) calc(3px * var(--scale)) var(--bulb-glow),
      0 0 calc(26px * var(--scale)) calc(6px * var(--scale)) var(--bulb-glow);
  }
  50% {
    opacity: 0.35;
    box-shadow: 0 0 calc(4px * var(--scale)) 0 var(--bulb-glow);
  }
}

/* ===== PINE FOREST + SNOW GROUND ===== */
.pine-forest {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 16%;
  z-index: 0;
  pointer-events: none;
}
.pine-forest svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ===== SANTA SLEIGH ===== */
.sleigh-backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 45;
  background: radial-gradient(
    ellipse at 50% 50%,
    rgba(6, 15, 34, 0.42) 0%,
    rgba(4, 10, 24, 0.65) 100%
  );
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}
.sleigh-backdrop.active {
  opacity: 1;
}

.sleigh {
  position: fixed;
  top: 12vh;
  left: 0;
  width: 80vw;
  max-width: 1600px;
  height: 74vh;
  pointer-events: none;
  z-index: 50;
  opacity: 0;
  transform: translate3d(-100vw, 0, 0);
  will-change: transform, opacity;
  backface-visibility: hidden;
}
.sleigh-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform;
}
.sleigh svg {
  width: 100%;
  height: 100%;
  max-height: 74vh;
  display: block;
  overflow: visible;
}

/* 7.2s total flight: enters smoothly, cruises slowly across center (25% -> 72%) so everyone sees Santa, then glides out */
.sleigh.flying {
  animation: santaHorizontalCruise 7.2s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}
.sleigh.flying .sleigh-inner {
  animation: santaVerticalWave 2.4s ease-in-out infinite alternate;
}

@keyframes santaHorizontalCruise {
  0% {
    opacity: 0;
    transform: translate3d(-92vw, 4vh, 0) scale(0.92);
  }
  10% {
    opacity: 1;
  }
  28% {
    opacity: 1;
    transform: translate3d(2vw, 0vh, 0) scale(1);
  }
  70% {
    opacity: 1;
    transform: translate3d(18vw, -2vh, 0) scale(1.03);
  }
  90% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate3d(108vw, -6vh, 0) scale(0.94);
  }
}

@keyframes santaVerticalWave {
  0% {
    transform: translate3d(0, 12px, 0) rotate(-1.5deg);
  }
  100% {
    transform: translate3d(0, -14px, 0) rotate(1.5deg);
  }
}

.sleigh.flying .sleigh-reindeer-1 {
  animation: reindeerGallop 0.6s ease-in-out infinite alternate;
  transform-box: fill-box;
  transform-origin: center;
}
.sleigh.flying .sleigh-reindeer-2 {
  animation: reindeerGallop 0.6s ease-in-out 0.18s infinite alternate;
  transform-box: fill-box;
  transform-origin: center;
}
.sleigh.flying .sleigh-reindeer-3 {
  animation: reindeerGallop 0.6s ease-in-out 0.36s infinite alternate;
  transform-box: fill-box;
  transform-origin: center;
}
.sleigh.flying .sleigh-body-group {
  animation: sleighBob 0.85s ease-in-out infinite alternate;
  transform-box: fill-box;
  transform-origin: center;
}
.sleigh.flying .santa-wave-arm {
  animation: santaWaveHand 0.5s ease-in-out infinite alternate;
  transform-box: fill-box;
  transform-origin: 85% 85%;
}
.sleigh.flying .deer-legs-front {
  animation: deerLegsFront 0.6s ease-in-out infinite alternate;
  transform-box: fill-box;
  transform-origin: 20% 15%;
}
.sleigh.flying .deer-legs-back {
  animation: deerLegsBack 0.6s ease-in-out infinite alternate;
  transform-box: fill-box;
  transform-origin: 80% 15%;
}
.sleigh-rudolph-glow {
  animation: rudolphPulse 0.9s ease-in-out infinite alternate;
  transform-box: fill-box;
  transform-origin: center;
}
.sleigh.flying .sleigh-sparkle {
  animation: sparkleTwinkle 0.8s ease-in-out infinite alternate;
}

@keyframes reindeerGallop {
  0% { transform: translateY(6px) rotate(-3deg); }
  100% { transform: translateY(-12px) rotate(4deg); }
}
@keyframes deerLegsFront {
  0% { transform: rotate(-14deg); }
  100% { transform: rotate(16deg); }
}
@keyframes deerLegsBack {
  0% { transform: rotate(14deg); }
  100% { transform: rotate(-16deg); }
}
@keyframes sleighBob {
  0% { transform: translateY(4px) rotate(-1deg); }
  100% { transform: translateY(-7px) rotate(1.2deg); }
}
@keyframes santaWaveHand {
  0% { transform: rotate(-10deg); }
  100% { transform: rotate(18deg); }
}
@keyframes rudolphPulse {
  0% { opacity: 0.5; transform: scale(0.85); }
  100% { opacity: 1; transform: scale(1.3); }
}
@keyframes sparkleTwinkle {
  0% { opacity: 0.45; }
  100% { opacity: 1; }
}

/* ===== SLIDE CONTAINER ===== */
.slide-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  z-index: 2;
}

.slide {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: translate3d(0, 18px, 0) scale(0.985);
  transition:
    opacity 1.35s cubic-bezier(0.22, 1, 0.36, 1),
    transform 1.35s cubic-bezier(0.22, 1, 0.36, 1);
  padding: calc(28px * var(--scale));
  padding-top: calc(48px * var(--scale));
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  will-change: opacity, transform;
}
.slide.active {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  z-index: 1;
}

/* ===== HEADER ===== */
.header {
  height: 10%;
  min-height: calc(60px * var(--scale));
  display: flex;
  align-items: center;
  padding: calc(15px * var(--scale)) calc(25px * var(--scale));
  background: rgba(8, 18, 38, 0.68);
  border-radius: calc(16px * var(--scale));
  border: calc(1px * var(--scale)) solid rgba(245, 197, 66, 0.35);
  margin-bottom: calc(30px * var(--scale));
  box-shadow:
    0 calc(4px * var(--scale)) calc(24px * var(--scale)) rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
  position: relative;
  overflow: hidden;
}

/* Gold shimmer across header */
.header::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 231, 163, 0.08),
    transparent
  );
  animation: headerShimmer 5s linear infinite;
}
@keyframes headerShimmer {
  0% {
    left: -60%;
  }
  100% {
    left: 140%;
  }
}

/* Snow cap on top of header */
.header::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: calc(14px * var(--scale));
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 14' preserveAspectRatio='none'><path d='M0 0 H200 V5 C190 12 182 6 172 9 C160 13 150 5 138 8 C126 12 118 4 104 8 C92 12 80 5 68 9 C56 13 46 4 34 8 C22 12 12 5 0 9 Z' fill='%23f4f8ff'/></svg>")
    repeat-x;
  background-size: calc(400px * var(--scale)) 100%;
  opacity: 0.92;
  pointer-events: none;
}

.logo {
  height: calc(80px * var(--scale));
  width: auto;
  margin-right: calc(50px * var(--scale));
  filter: drop-shadow(0 0 calc(10px * var(--scale)) rgba(207, 232, 255, 0.35));
}

.header-time {
  margin-left: auto;
  color: var(--gold);
  font-size: calc(1.8rem * var(--scale));
  font-weight: 800;
  letter-spacing: calc(1px * var(--scale));
  padding: calc(8px * var(--scale)) calc(16px * var(--scale));
  background: rgba(245, 197, 66, 0.08);
  border-radius: calc(8px * var(--scale));
  border: calc(1px * var(--scale)) solid rgba(245, 197, 66, 0.25);
  text-shadow: 0 0 12px rgba(245, 197, 66, 0.45);
}

/* ===== UPDATE BUTTON ===== */
.update-btn {
  margin-left: calc(20px * var(--scale));
  background: linear-gradient(135deg, #e0313f 0%, #9e1623 100%);
  color: #fff4f4;
  border: calc(1.5px * var(--scale)) solid rgba(245, 197, 66, 0.6);
  border-radius: calc(12px * var(--scale));
  padding: calc(12px * var(--scale)) calc(24px * var(--scale));
  font-size: calc(2rem * var(--scale));
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: calc(10px * var(--scale));
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 calc(4px * var(--scale)) calc(20px * var(--scale))
    var(--glow-berry);
  text-transform: uppercase;
  letter-spacing: calc(1px * var(--scale));
  font-family: "Nunito", sans-serif;
}
.update-btn:hover {
  transform: translateY(calc(-3px * var(--scale))) scale(1.05);
  box-shadow: 0 calc(8px * var(--scale)) calc(30px * var(--scale))
    var(--glow-berry);
}
.update-btn:active {
  transform: translateY(0) scale(0.98);
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
.update-btn.loading .update-btn-icon {
  animation: rotate 1s linear infinite;
}

/* ===== CONTENT ===== */
.content {
  display: flex;
  height: calc(90% - 30px * var(--scale));
  width: 100%;
  gap: calc(30px * var(--scale));
}

/* ===== COLUMN CARD — frosted glass on a winter night ===== */
.column {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: rgba(10, 22, 46, 0.6);
  border-radius: calc(20px * var(--scale));
  padding: calc(30px * var(--scale));
  border: calc(1.5px * var(--scale)) solid rgba(207, 232, 255, 0.2);
  backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Candy-cane stripe top accent */
.column::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: calc(8px * var(--scale));
  background: repeating-linear-gradient(
    -45deg,
    #e0313f 0,
    #e0313f calc(12px * var(--scale)),
    #ffffff calc(12px * var(--scale)),
    #ffffff calc(24px * var(--scale))
  );
  background-size: calc(68px * var(--scale)) 100%;
  border-radius: calc(20px * var(--scale)) calc(20px * var(--scale)) 0 0;
  animation: candyMove 3s linear infinite;
  opacity: 0.9;
}
@keyframes candyMove {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: calc(68px * var(--scale)) 0;
  }
}

/* Soft frost glow overlay */
.column::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse 80% 40% at 50% 0%,
      rgba(207, 232, 255, 0.06) 0%,
      transparent 70%
    ),
    radial-gradient(
      ellipse 60% 30% at 80% 100%,
      rgba(245, 197, 66, 0.04) 0%,
      transparent 70%
    );
  pointer-events: none;
}

.section-title {
  font-family: "Baloo 2", sans-serif;
  font-size: calc(3rem * var(--scale));
  color: var(--snow);
  text-transform: uppercase;
  letter-spacing: calc(3px * var(--scale));
  text-align: center;
  margin-bottom: calc(10px * var(--scale));
  font-weight: 800;
  position: relative;
  padding-bottom: calc(15px * var(--scale));
  text-shadow: 0 0 20px rgba(207, 232, 255, 0.35);
}
.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: calc(120px * var(--scale));
  height: calc(3px * var(--scale));
  background: linear-gradient(
    90deg,
    transparent,
    var(--gold),
    var(--gold-soft),
    var(--gold),
    transparent
  );
  border-radius: calc(2px * var(--scale));
}

/* ===== MAIN METRIC ===== */
.main-metric {
  background: rgba(3, 8, 20, 0.62);
  border-radius: calc(20px * var(--scale));
  padding: calc(25px * var(--scale)) calc(20px * var(--scale));
  text-align: center;
  margin-bottom: calc(10px * var(--scale));
  border: calc(2px * var(--scale)) solid transparent;
  position: relative;
  overflow: hidden;
  min-height: calc(200px * var(--scale));
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: all 0.3s ease;
}
.main-metric::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 70% 50% at 50% 0%,
    rgba(255, 231, 163, 0.05),
    transparent
  );
  pointer-events: none;
}

.main-metric.positive {
  border-left: calc(6px * var(--scale)) solid var(--positive);
  box-shadow:
    calc(-16px * var(--scale)) 0 calc(40px * var(--scale)) var(--glow-positive),
    inset 0 0 30px rgba(61, 255, 154, 0.04);
}
.main-metric.negative {
  border-left: calc(6px * var(--scale)) solid var(--negative);
  box-shadow:
    calc(-16px * var(--scale)) 0 calc(40px * var(--scale)) var(--glow-negative),
    inset 0 0 30px rgba(255, 107, 107, 0.04);
}

.metric-label {
  font-size: calc(2.2rem * var(--scale));
  color: var(--ice);
  text-transform: uppercase;
  letter-spacing: calc(2px * var(--scale));
  font-weight: 800;
  margin-bottom: calc(12px * var(--scale));
  opacity: 0.8;
}

.metric-value {
  font-family: "Baloo 2", sans-serif;
  font-size: calc(12rem * var(--scale));
  line-height: 0.95;
  margin: calc(15px * var(--scale)) 0;
  font-weight: 900;
  background: linear-gradient(
    135deg,
    #ffffff 0%,
    var(--ice) 50%,
    var(--gold) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: calc(-2px * var(--scale));
  display: inline-block;
  filter: drop-shadow(0 2px 16px rgba(245, 197, 66, 0.25));
}

.metric-unit {
  font-size: calc(6rem * var(--scale));
  color: var(--gold);
  -webkit-text-fill-color: var(--gold);
  font-weight: 700;
  margin-left: calc(8px * var(--scale));
  vertical-align: baseline;
}

.metric-change {
  font-size: calc(4rem * var(--scale));
  font-weight: 800;
  margin-top: calc(12px * var(--scale));
  padding: calc(10px * var(--scale)) calc(24px * var(--scale));
  border-radius: calc(12px * var(--scale));
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: calc(2px * var(--scale));
}
.metric-change.positive {
  color: var(--positive);
  background: rgba(61, 255, 154, 0.1);
  box-shadow: 0 0 calc(20px * var(--scale)) var(--glow-positive);
  text-shadow: 0 0 10px rgba(61, 255, 154, 0.45);
}
.metric-change.negative {
  color: var(--negative);
  background: rgba(255, 107, 107, 0.1);
  box-shadow: 0 0 calc(20px * var(--scale)) var(--glow-negative);
  text-shadow: 0 0 10px rgba(255, 107, 107, 0.45);
}

/* ===== BREAKDOWN ===== */
.breakdown {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  gap: calc(25px * var(--scale));
  padding: calc(5px * var(--scale)) 0;
}

.breakdown-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: calc(30px * var(--scale)) calc(35px * var(--scale));
  background: rgba(18, 36, 70, 0.5);
  border-radius: calc(16px * var(--scale));
  border: calc(1px * var(--scale)) solid rgba(207, 232, 255, 0.14);
  position: relative;
  overflow: hidden;
  min-height: calc(130px * var(--scale));
  flex: 1;
  transition: all 0.3s ease;
}

.breakdown-item::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: calc(4px * var(--scale));
  background: linear-gradient(180deg, transparent, var(--gold), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.breakdown-item:hover {
  background: rgba(30, 56, 100, 0.45);
  transform: translateX(calc(5px * var(--scale)));
  border-color: rgba(245, 197, 66, 0.3);
}
.breakdown-item:hover::after {
  opacity: 1;
}

.breakdown-label {
  font-family: "Baloo 2", sans-serif;
  font-size: 2.3rem;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: calc(2px * var(--scale));
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.1;
}

/* HCM = icy blue */
.breakdown-label.hcm {
  color: var(--ice);
  text-shadow: 0 0 calc(18px * var(--scale)) rgba(207, 232, 255, 0.5);
}
/* HANOI = star gold */
.breakdown-label.hanoi {
  color: var(--gold);
  text-shadow: 0 0 calc(18px * var(--scale)) rgba(245, 197, 66, 0.45);
}
/* WEB/APP = winter lavender */
.breakdown-label.web-app {
  color: var(--lavender);
  text-shadow: 0 0 calc(18px * var(--scale)) rgba(201, 182, 255, 0.45);
}

.breakdown-value {
  display: flex;
  align-items: center;
  gap: calc(10px * var(--scale));
  flex-shrink: 1;
  justify-content: flex-end;
  max-width: 65%;
  overflow: hidden;
}

.breakdown-number {
  font-family: "Baloo 2", sans-serif;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: calc(-1px * var(--scale));
  white-space: nowrap;
  text-align: right;
  min-width: fit-content;
  line-height: 1;
  font-size: clamp(2.5rem, 4vw, 9rem);
}

.breakdown-change {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: calc(-3px * var(--scale));
  padding: calc(5px * var(--scale)) calc(10px * var(--scale));
  border-radius: calc(12px * var(--scale));
  display: inline-block;
  white-space: nowrap;
  min-width: fit-content;
  line-height: 1.1;
}
.breakdown-change.positive {
  color: var(--positive);
  background: rgba(61, 255, 154, 0.1);
  text-shadow: 0 0 8px rgba(61, 255, 154, 0.4);
}
.breakdown-change.negative {
  color: var(--negative);
  background: rgba(255, 107, 107, 0.1);
  text-shadow: 0 0 8px rgba(71, 6, 6, 0.4);
}

/* ===== HEADER TITLE ===== */
.header-title {
  background: linear-gradient(135deg, var(--pine) 0%, var(--pine-dark) 100%);
  color: white;
  padding: calc(10px * var(--scale)) calc(28px * var(--scale));
  font-family: "Baloo 2", sans-serif;
  font-size: calc(4rem * var(--scale));
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: calc(2px * var(--scale));
  border-radius: calc(12px * var(--scale));
  border: calc(1.5px * var(--scale)) solid rgba(245, 197, 66, 0.55);
  box-shadow:
    0 calc(4px * var(--scale)) calc(20px * var(--scale)) rgba(17, 88, 58, 0.55),
    inset 0 0 calc(12px * var(--scale)) rgba(245, 197, 66, 0.15);
  position: relative;
  overflow: visible;
}

/* Santa hat on the title */
.header-title::after {
  content: "";
  position: absolute;
  top: calc(-30px * var(--scale));
  left: calc(-34px * var(--scale));
  width: calc(80px * var(--scale));
  height: calc(80px * var(--scale));
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><path d='M20 70 C26 44 44 22 70 16 C82 13 92 20 90 34 C86 30 80 30 76 35 C68 46 66 58 68 70 Z' fill='%23d6202f'/><path d='M30 62 C38 44 52 30 70 24' stroke='%23a3121f' stroke-width='3' fill='none' opacity='0.6'/><rect x='12' y='64' width='66' height='17' rx='8.5' fill='%23ffffff'/><circle cx='89' cy='38' r='9' fill='%23ffffff'/></svg>")
    no-repeat center / contain;
  transform: rotate(-18deg);
  animation: hatWiggle 3s ease-in-out infinite;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.4));
  z-index: 10;
}
@keyframes hatWiggle {
  0%,
  100% {
    transform: rotate(-18deg);
  }
  50% {
    transform: rotate(-12deg) translateY(calc(-3px * var(--scale)));
  }
}

/* ===== LOGIN POPUP ===== */
#login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10000;
  width: 100vw;
  height: 100vh;
  background:
    radial-gradient(
      ellipse 60% 40% at 50% 100%,
      rgba(17, 88, 58, 0.55) 0%,
      transparent 70%
    ),
    linear-gradient(
      180deg,
      rgba(4, 9, 20, 0.95) 0%,
      rgba(11, 26, 51, 0.95) 55%,
      rgba(10, 46, 34, 0.97) 100%
    );
  backdrop-filter: blur(16px);
  display: flex;
  justify-content: center;
  align-items: center;
}

.login-box {
  background: rgba(10, 22, 46, 0.88);
  padding: 50px 40px;
  border-radius: 24px;
  border: 1.5px solid rgba(245, 197, 66, 0.4);
  text-align: center;
  width: 380px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.7),
    0 0 80px rgba(245, 197, 66, 0.1);
  backdrop-filter: blur(20px);
  position: relative;
}

.login-box::before {
  content: "VN - DATA TEAM";
  position: absolute;
  top: 20px;
  left: 20px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--ice), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-box::after {
  content: "🎄";
  position: absolute;
  top: -34px;
  right: -22px;
  font-size: 3.4rem;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
  transform: rotate(10deg);
}

.login-greeting {
  font-family: "Mountains of Christmas", "Baloo 2", cursive;
  color: var(--gold);
  font-size: 1.9rem;
  margin: 8px 0 4px;
  text-shadow: 0 0 14px rgba(245, 197, 66, 0.45);
}

.login-box h2 {
  color: var(--text-primary);
  margin-bottom: 30px;
  margin-top: 6px;
  font-family: "Baloo 2", sans-serif;
  font-size: 2rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 2px;
  background: linear-gradient(135deg, var(--snow), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.input-group {
  margin-bottom: 20px;
}

.login-box input {
  width: 100%;
  padding: 16px 20px;
  background: rgba(207, 232, 255, 0.06);
  border: 1.5px solid rgba(207, 232, 255, 0.2);
  color: white;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  font-family: "Nunito", sans-serif;
  transition: all 0.3s ease;
}
.login-box input:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(245, 197, 66, 0.06);
  box-shadow: 0 0 20px rgba(245, 197, 66, 0.18);
}
.login-box input::placeholder {
  color: var(--text-muted);
}

.login-box button {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #e0313f 0%, #9e1623 100%);
  color: #fff4f4;
  border: 1.5px solid rgba(245, 197, 66, 0.55);
  border-radius: 12px;
  cursor: pointer;
  font-weight: 900;
  font-size: 1.1rem;
  font-family: "Nunito", sans-serif;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  transition: all 0.3s ease;
  box-shadow: 0 8px 24px var(--glow-berry);
  margin-top: 10px;
}
.login-box button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px var(--glow-berry);
}
.login-box button:active {
  transform: translateY(0);
}

/* ===== LOADING OVERLAY ===== */
#loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(5, 11, 24, 0.92);
  backdrop-filter: blur(10px);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--snow);
  font-family: "Baloo 2", sans-serif;
  font-size: calc(3rem * var(--scale));
  font-weight: 800;
  flex-direction: column;
  gap: calc(20px * var(--scale));
}
#loading-overlay::after {
  content: "";
  width: calc(60px * var(--scale));
  height: calc(60px * var(--scale));
  border: calc(6px * var(--scale)) solid rgba(255, 255, 255, 0.85);
  border-top-color: #e0313f;
  border-bottom-color: #e0313f;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.hidden {
  display: none !important;
}

/* ===== RESPONSIVE (giữ nguyên như theme cũ) ===== */
@media (max-width: 1024px) {
  .content {
    flex-direction: column;
  }
  .metric-value {
    font-size: calc(10rem * var(--scale));
  }
  .breakdown-label {
    font-size: calc(3.7rem * var(--scale));
  }
  .breakdown-change {
    font-size: calc(45px * var(--scale));
  }
}
@media (max-height: 768px) {
  .header {
    height: 8%;
    min-height: calc(50px * var(--scale));
  }
  .metric-value {
    font-size: calc(10rem * var(--scale));
  }
  .breakdown-item {
    min-height: calc(210px * var(--scale));
    padding: calc(20px * var(--scale)) calc(25px * var(--scale));
  }
  .breakdown-label {
    font-size: calc(5.5rem * var(--scale));
  }
  .breakdown-change {
    font-size: calc(4rem * var(--scale));
  }
  .main-metric {
    min-height: calc(150px * var(--scale));
    padding: calc(20px * var(--scale)) calc(15px * var(--scale));
  }
  .breakdown {
    gap: calc(18px * var(--scale));
  }
}
@media (min-width: 1920px) {
  .breakdown-label {
    font-size: calc(80px * var(--scale));
  }
  .breakdown-change {
    font-size: calc(55px * var(--scale));
  }
}
@media (min-width: 2560px) {
  .breakdown-label {
    font-size: calc(80px * var(--scale));
  }
  .breakdown-change {
    font-size: calc(60px * var(--scale));
  }
}

/* Performance */
.slide,
.main-metric,
.breakdown-item {
  will-change: transform, opacity;
}
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Tôn trọng cài đặt giảm chuyển động */
@media (prefers-reduced-motion: reduce) {
  .snowflake,
  .sleigh {
    display: none;
  }
  .xmas-bulb,
  .twinkle-star,
  .column::before,
  .header::before,
  .header-title::after {
    animation: none;
  }
}

/* ===== SLIDE PROGRESS BAR ===== */
.progress-bar {
  position: fixed;
  bottom: 5%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
  align-items: center;
}

.progress-dot {
  width: 48px;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.25);
  border: none;
  transition: all 0.4s ease;
  cursor: pointer;
}

.progress-dot.active {
  background: var(--gold);
  box-shadow: 0 0 10px rgba(245, 197, 66, 0.6);
  transform: scaleY(1.6);
  width: 72px;
}
