:root {
  --oros-blue: #1d2f78;
  --oros-blue-mid: #0f4ea4;
  --oros-blue-light: #1360ae;
  --oros-cyan: #0a9be0;
  --oros-sky: #2fb3f1;
  --oros-yellow: #fcd92e;
  --oros-orange: #f58220;
  --oros-pink: #d41b6a;
  --oros-pink-hover: #ea2b7c;
  --oros-text: #14306f;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  background:
    radial-gradient(circle at 50% 30%, #253f75 0%, #17294f 48%, #0b1630 100%);
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
}
a { color: #fff; }
a:hover { color: var(--oros-yellow); }
input, select, button { font-family: inherit; }
input::placeholder { color: #9a9a9a; }

/* ---------- Stage sizing ----------
   Phones and tablets use the full viewport as the branded canvas. The
   composition itself keeps its 9/16 proportions in the centre, preventing
   wide tablets from stretching the artwork or changing its overlaps.
*/
.stage {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 55% at 50% 42%,
      var(--oros-blue-light) 0%, var(--oros-blue-mid) 45%, #2d3a8f 100%),
    var(--oros-blue);
  perspective: 1200px;
  --px: 0;
  --py: 0;
}

.screen {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  width: min(100%, calc(100dvh * 9 / 16));
  height: 100%;
  margin-inline: auto;
  container-type: inline-size;
  animation: fade-up 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  transform-style: preserve-3d;
}
.screen[hidden] { display: none; }

/* Larger desktop displays present the portrait experience as a tactile,
   embossed card while phones and tablets remain completely edge-to-edge. */
@media (min-width: 1200px) and (min-height: 700px) and (hover: hover) and (pointer: fine) {
  body { padding: 4vh 4vw; }

  .stage {
    width: min(90vw, calc(92dvh * 9 / 16));
    height: min(92dvh, calc(90vw * 16 / 9));
    border: 1px solid rgba(139, 183, 255, 0.42);
    border-radius: 1.2rem;
    outline: 1px solid rgba(5, 15, 40, 0.8);
    box-shadow:
      inset 2px 2px 0 rgba(255, 255, 255, 0.16),
      inset -3px -3px 0 rgba(0, 8, 36, 0.32),
      inset 0 0 2.5rem rgba(5, 15, 48, 0.22),
      0 1.5rem 3.5rem rgba(0, 0, 0, 0.48),
      0 0.35rem 0.8rem rgba(0, 0, 0, 0.32);
  }

  .screen { width: 100%; }
}

/* Decorative brand image: positioned via inline left/top/width,
   parallax shift via --depth driven by pointer/orientation. */
.deco {
  position: absolute;
  will-change: transform;
  pointer-events: none;
  transform: translate3d(
    calc(var(--px, 0) * var(--depth, 1) * 1cqw),
    calc(var(--py, 0) * var(--depth, 1) * 1cqw),
    0);
}
.deco img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 2cqw 3cqw rgba(0, 0, 0, 0.35));
}

@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(var(--r, 0deg)); }
  50% { transform: translate3d(0, -3cqw, 0) rotate(calc(var(--r, 0deg) + 3deg)); }
}
@keyframes bob {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(var(--r, 0deg)); }
  50% { transform: translate3d(0, -1.5cqw, 0) rotate(calc(var(--r, 0deg) - 2deg)); }
}
@keyframes spin {
  0% { transform: rotate(-6deg); }
  50% { transform: rotate(6deg); }
  100% { transform: rotate(-6deg); }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(6cqw) scale(0.96); }
  to { opacity: 1; transform: none; }
}
@keyframes pop {
  0% { opacity: 0; transform: scale(0.6); }
  70% { transform: scale(1.06); }
  100% { opacity: 1; transform: scale(1); }
}
.anim-float img { animation: float 6s ease-in-out infinite; }
.anim-bob img   { animation: bob   6s ease-in-out infinite; }
.anim-spin img  { animation: spin  7s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .anim-float img, .anim-bob img, .anim-spin img, .screen { animation: none !important; }
  .deco { transform: none !important; }
}
.stage[data-motion="off"] .anim-float img,
.stage[data-motion="off"] .anim-bob img,
.stage[data-motion="off"] .anim-spin img,
.stage[data-motion="off"] .screen {
  animation: none !important;
}
.stage[data-motion="off"] .deco { transform: none !important; }

/* ---------- Landing ---------- */
.screen.landing {
  width: 100%;
  container-type: size;
}

/* Artwork scales from the smaller of available width or height. This keeps
   the original visual scale on tall phones and prevents oversized artwork on
   wider tablets, while allowing the bottles and fruit to use the full width. */
.landing-fruit-left {
  left: 4%;
  width: min(11cqw, 6.1875cqh);
}
.landing-fruit-right {
  right: 4%;
  width: min(12cqw, 6.75cqh);
}
.landing-fruit-top {
  left: 30%;
  width: min(7cqw, 3.9375cqh);
}
.landing-bottle-left {
  left: -9%;
  width: min(40cqw, 22.5cqh);
  z-index: 3;
}
.landing-bottle-right {
  right: -6%;
  width: min(34cqw, 19.125cqh);
}

@media (min-width: 600px) {
  .landing-bottle-left {
    left: -10%;
    width: min(44cqw, 24.75cqh);
  }

  .landing-bottle-right {
    right: -7%;
    width: min(38cqw, 21.375cqh);
  }
}
.landing-wordmark {
  left: 0;
  right: 0;
  width: min(74cqw, 41.625cqh);
  margin-inline: auto;
}
.landing-badge {
  right: 7%;
  width: min(17cqw, 9.5625cqh);
}

.landing .promo-stack {
  position: absolute;
  left: 0;
  right: 0;
  top: 52.5%;
  height: 29.5%;
  display: grid;
  grid-template-rows: 10% 43% 17% 30%;
  align-items: center;
  justify-items: center;
  z-index: 2;
}
.landing .tagline {
  position: static;
  width: 100%;
  text-align: center;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 700;
  font-size: min(4.6cqw, 2.5875cqh);
  color: var(--oros-sky);
  line-height: 1;
}
.landing .big-win {
  position: static;
  width: 100%;
  text-align: center;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  font-size: min(27cqw, 15.1875cqh);
  line-height: 0.82;
  letter-spacing: -0.01em;
  animation: pop 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.25s both;
  text-shadow: 0 min(1.5cqw, 0.84375cqh) 0 rgba(0, 0, 0, 0.18);
}
.landing .share-of {
  position: static;
  width: 100%;
  text-align: center;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  font-size: min(9cqw, 5.0625cqh);
  line-height: 1;
}
.landing .prize {
  position: static;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pop 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.45s both;
}
.landing .prize .prize-text { display: none; }
.landing .prize .prize-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.yellow-base {
  position: absolute;
  left: -10%; top: 81.5%;
  width: 120%; height: 25%;
  background: var(--oros-yellow);
  border-radius: 50% 50% 0 0 / 28% 28% 0 0;
}
.orange-base {
  position: absolute;
  left: -10%; top: 97%;
  width: 120%; height: 10%;
  background: var(--oros-orange);
  border-radius: 50% 50% 0 0 / 40% 40% 0 0;
}

.landing .opt-prompt {
  position: absolute;
  left: 10%; top: 86.5%;
  width: 80%;
  text-align: center;
  font-weight: 700;
  font-size: min(3.6cqw, 2.025cqh);
  line-height: 1.35;
  color: var(--oros-text);
}
.landing .opt-buttons {
  position: absolute;
  left: 0; right: 0; top: 92.5%;
  width: min(52%, 29.25cqh);
  height: 5.2%;
  margin-inline: auto;
  display: flex;
  gap: 2.5cqw;
}

.btn-pill {
  flex: 1;
  border: 0;
  border-radius: 999px;
  background: var(--oros-pink);
  color: #fff;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  font-size: min(4.6cqw, 2.5875cqh);
  cursor: pointer;
  line-height: 1;
  box-shadow: 0 1.2cqw 2.5cqw rgba(0, 0, 0, 0.25);
  transition: transform 0.12s, background 0.15s;
}
.btn-pill:hover { background: var(--oros-pink-hover); }
.btn-pill:active { transform: scale(0.94); }
.btn-pill.ghost {
  background: #fff;
  color: var(--oros-pink);
  border: min(0.9cqw, 0.50625cqh) solid var(--oros-pink);
  box-shadow: 0 1.2cqw 2.5cqw rgba(0, 0, 0, 0.18);
}
.btn-pill.ghost:hover { background: #fff0f6; }

/* ---------- Form ---------- */
.screen.form {
  width: 100%;
  container-type: size;
}

.form .back-btn {
  position: absolute;
  left: 3%;
  top: 1.5%;
  width: min(9cqw, 5.0625cqh);
  height: min(9cqw, 5.0625cqh);
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--oros-pink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  z-index: 4;
  opacity: 0.65;
  box-shadow: 0 min(1cqw, 0.5625cqh) min(2.5cqw, 1.4cqh) rgba(0, 0, 0, 0.25);
  transition: transform 0.12s, background 0.15s, opacity 0.15s;
}
.form .back-btn:hover,
.form .back-btn:focus-visible { background: #fff; opacity: 1; }
.form .back-btn:active { transform: scale(0.9); }
.form .back-btn svg {
  width: 55%;
  height: 55%;
  display: block;
}

.form-fruit-top { width: min(8cqw, 4.5cqh); }
.form-fruit-right { width: min(11cqw, 6.1875cqh); }
.form-fruit-left { width: min(10cqw, 5.625cqh); }
.form-wordmark {
  left: 0;
  right: 0;
  width: min(44cqw, 24.75cqh);
  margin-inline: auto;
}

.form .yellow-sweep {
  position: absolute;
  left: -12%; top: 40%;
  width: 124%; height: 62%;
  background: var(--oros-yellow);
  border-radius: 50% 50% 0 0 / 22% 22% 0 0;
}
.form .ribbon {
  position: absolute;
  left: 12%; top: 30%;
  width: 76%;
  height: 6.5%;
  background: var(--oros-cyan);
  border-radius: min(4cqw, 2.25cqh);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 800;
  font-size: min(4.4cqw, 2.475cqh);
  line-height: 1.1;
  text-transform: uppercase;
}
.form .card {
  position: absolute;
  left: 6%; top: 37%;
  width: 88%;
  height: 55.5%;
  background: #fff;
  border-radius: min(6cqw, 3.375cqh);
  padding: min(3.6cqw, 2.025cqh) min(5cqw, 2.8125cqh);
  display: flex;
  flex-direction: column;
  gap: min(1.6cqw, 0.9cqh);
  color: var(--oros-text);
}
.form label.field {
  display: flex;
  flex-direction: column;
  gap: min(1.2cqw, 0.675cqh);
  font-weight: 800;
  font-size: min(3.6cqw, 2.025cqh);
}
.form input[type="text"],
.form input[type="tel"] {
  height: min(8.2cqw, 4.6125cqh);
  border: min(0.5cqw, 0.28125cqh) solid #c4c4c4;
  border-radius: 999px;
  padding: 0 min(4.5cqw, 2.53125cqh);
  font-size: min(4cqw, 2.25cqh);
  font-weight: 500;
  color: var(--oros-text);
  outline: none;
  width: 100%;
  background: #fff;
}
.form input:focus { border-color: var(--oros-cyan); }

/* ---------- Flavour bottle popup ----------
   Pops into the top-right of the form stage when a flavour pill is chosen.
   Starts off-stage (scaled, rotated, translated down), bounces in, then
   settles into a gentle wobble. */
.flavour-popup {
  position: absolute;
  left: auto;
  right: -5%;
  top: 2%;
  width: min(36cqw, 20.25cqh);
  pointer-events: none;
  opacity: 0;
  transform: translate3d(min(4cqw, 2.25cqh), min(18cqw, 10.125cqh), 0) scale(0.35) rotate(-35deg);
  transition:
    opacity 0.25s ease-out,
    transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 3;
  will-change: transform, opacity;
}
.flavour-popup img {
  display: block;
  width: 100%;
  filter: drop-shadow(0 min(2cqw, 1.125cqh) min(4cqw, 2.25cqh) rgba(0, 0, 0, 0.45));
  transition: filter 0.3s ease-out;
}
.flavour-popup.show {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1) rotate(-6deg);
}
.flavour-popup.show img {
  animation: bottle-wobble 2.8s ease-in-out infinite 0.5s;
}
@keyframes bottle-wobble {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  50%      { transform: translate3d(0, max(-1.8cqw, -1.0125cqh), 0) rotate(4deg); }
}
@media (prefers-reduced-motion: reduce) {
  .flavour-popup {
    transition: opacity 0.2s ease-out;
    transform: none;
  }
  .flavour-popup.show img { animation: none; }
}

.flavours {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: min(1.2cqw, 0.675cqh);
}
.flavour-pill {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: min(1cqw, 0.5625cqh);
  height: min(6.6cqw, 3.7125cqh);
  padding: 0 min(1.6cqw, 0.9cqh) 0 min(0.8cqw, 0.45cqh);
  border-radius: 999px;
  border: min(0.5cqw, 0.28125cqh) solid #c4c4c4;
  background: #fff;
  color: var(--oros-text);
  font-family: inherit;
  font-weight: 700;
  font-size: min(2.8cqw, 1.575cqh);
  cursor: pointer;
  line-height: 1;
  width: 100%;
  min-width: 0;
  transition: transform 0.15s, background 0.15s, border-color 0.15s, color 0.15s;
}
/* When 7 pills fall into a 3-column grid, the last pill is alone in its row
   - centre it in the middle column so it doesn't look stranded on the left. */
.flavour-pill:last-child:nth-child(3n+1) { grid-column: 2; }
.flavour-pill[aria-pressed="true"] {
  background: var(--oros-pink);
  color: #fff;
  border-color: var(--oros-pink);
}
.flavour-pill:active { transform: scale(0.94); }
.flavour-pill .dot {
  width: min(4.4cqw, 2.475cqh);
  height: min(4.4cqw, 2.475cqh);
  border-radius: 50%;
  flex: none;
  box-shadow:
    inset 0 max(-1cqw, -0.5625cqh) min(1.5cqw, 0.84375cqh) rgba(0, 0, 0, 0.18),
    inset 0 min(0.8cqw, 0.45cqh) min(1cqw, 0.5625cqh) rgba(255, 255, 255, 0.45);
}
.flavour-pill .pill-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: min(1.8cqw, 1.0125cqh);
  font-size: min(2.5cqw, 1.40625cqh);
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  color: var(--oros-text);
}
.consent input {
  width: min(4cqw, 2.25cqh);
  height: min(4cqw, 2.25cqh);
  margin-top: min(0.1cqw, 0.05625cqh);
  accent-color: var(--oros-pink);
  flex: none;
  cursor: pointer;
}
.consent a { color: var(--oros-pink); font-weight: 800; }

.error {
  text-align: center;
  font-size: min(2.8cqw, 1.575cqh);
  font-weight: 700;
  color: var(--oros-pink);
  line-height: 1.2;
}

.submit {
  margin-top: auto;
  flex: none;
  width: 100%;
  height: min(12cqw, 6.75cqh);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: var(--oros-pink);
  color: #fff;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  font-size: min(8.5cqw, 4.78125cqh);
  letter-spacing: 0.06em;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  box-shadow: 0 min(1.5cqw, 0.84375cqh) min(3cqw, 1.6875cqh) rgba(212, 27, 106, 0.35);
  transition: transform 0.12s, background 0.15s, box-shadow 0.15s;
}
.submit:hover { background: var(--oros-pink-hover); }
.submit:active {
  transform: scale(0.97);
  box-shadow: 0 min(0.6cqw, 0.3375cqh) min(1.5cqw, 0.84375cqh) rgba(212, 27, 106, 0.3);
}
.submit[disabled] { opacity: 0.6; cursor: wait; }

.form .footer {
  position: absolute;
  left: 5%; top: 94%;
  width: 90%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0 min(1.2cqw, 0.675cqh);
  font-weight: 700;
  font-size: min(2.6cqw, 1.4625cqh);
  line-height: 1.6;
  text-align: center;
}
.form .footer .fb-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(3.6cqw, 2.025cqh);
  height: min(3.6cqw, 2.025cqh);
  border-radius: 50%;
  background: #fff;
  color: #1877f2;
  font-weight: 800;
  font-size: min(2.8cqw, 1.575cqh);
  font-family: 'Baloo 2', sans-serif;
}
.form .footer a { color: #fff; text-decoration: none; font-weight: 800; }

/* ---------- Done ---------- */
.done .thankyou {
  position: absolute;
  left: 0; right: 0; top: 36%;
  text-align: center;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  font-size: 13cqw;
  line-height: 1;
  animation: pop 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s both;
}
.done .entered {
  position: absolute;
  left: 8%; width: 84%; top: 46%;
  text-align: center;
  font-weight: 700;
  font-size: 5cqw;
  line-height: 1.2;
}
.done .goodluck {
  position: absolute;
  left: 0; right: 0; top: 54%;
  text-align: center;
  font-weight: 700;
  font-size: 3.2cqw;
  line-height: 1.3;
  color: #cfe6ff;
}
.done .share {
  position: absolute;
  left: 14%; top: 58%; width: 72%; height: 7%;
  border-radius: 999px;
  background: #25d366;
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.4cqw;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  font-size: 5.6cqw;
  line-height: 1;
  box-shadow: 0 1.5cqw 3cqw rgba(0, 0, 0, 0.3);
  transition: transform 0.12s;
}
.done .share:hover { background: #2fe072; color: #fff; }
.done .share:active { transform: scale(0.96); }
.done .share svg { width: 6cqw; height: 6cqw; flex: none; }
.done .restart {
  position: absolute;
  left: 20%; top: 66.5%; width: 60%; height: 3.5%;
  border: 0;
  background: transparent;
  color: var(--oros-yellow);
  white-space: nowrap;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  font-size: 4.2cqw;
  cursor: pointer;
  line-height: 1;
  text-decoration: underline;
  text-underline-offset: 0.6cqw;
}
.done .restart:hover { color: #fff; }
.done .orange-base-done {
  position: absolute;
  left: -10%; top: 92%;
  width: 120%; height: 14%;
  background: var(--oros-orange);
  border-radius: 50% 50% 0 0 / 50% 50% 0 0;
}

/* ---------- Admin dashboard ---------- */
body.admin-page {
  display: block;
  overflow: auto;
  background:
    radial-gradient(ellipse 90% 70% at 50% -10%, #1b2a66 0%, #0f1538 55%, #090e2c 100%);
  align-items: initial;
  justify-content: initial;
  color: #e8ecff;
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
}
body.admin-page a { color: inherit; }
body.admin-page a:hover { color: var(--oros-yellow); }

.dashboard {
  max-width: 1360px;
  margin: 0 auto;
  padding: 28px clamp(16px, 3vw, 36px) 48px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.db-header {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.db-title {
  display: flex;
  align-items: center;
  gap: 14px;
}
.db-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  flex: none;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.35));
}
.db-title h1 {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: 0.01em;
  color: #fff;
  line-height: 1;
}
.db-sub {
  margin-top: 6px;
  color: #9fb0e8;
  font-size: 13px;
}
.db-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.db-user {
  color: #9fb0e8;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border: 0;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, transform 0.1s, box-shadow 0.15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--oros-pink);
  color: #fff;
  box-shadow: 0 4px 12px rgba(212, 27, 106, 0.25);
}
.btn-primary:hover { background: var(--oros-pink-hover); color: #fff; }
.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: #d6def7;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.btn-link {
  background: transparent;
  border: 0;
  color: var(--oros-sky);
  font-family: inherit;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  padding: 2px 4px;
}
.btn-link:hover { color: var(--oros-yellow); }

/* Card shell */
.card {
  background: linear-gradient(180deg, #1a2458 0%, #141c47 100%);
  border: 1px solid rgba(139, 165, 255, 0.12);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 6px 20px rgba(0, 0, 0, 0.25);
}
.card-h {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}
.card-h h2 {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.02em;
  color: #fff;
}
.card-h-note {
  color: #8ba0d8;
  font-size: 12px;
  font-weight: 600;
}

/* KPI row */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
@media (max-width: 900px) {
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .kpi-row { grid-template-columns: 1fr; }
}
.kpi {
  background: linear-gradient(180deg, #1a2458 0%, #141c47 100%);
  border: 1px solid rgba(139, 165, 255, 0.12);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  overflow: hidden;
}
.kpi::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(130deg, rgba(10, 155, 224, 0.12) 0%, transparent 55%);
  pointer-events: none;
}
.kpi-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8ba0d8;
}
.kpi-value {
  font-family: 'Baloo 2', sans-serif;
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}
.kpi-foot {
  font-size: 12px;
  color: #a7b7e8;
}

/* Dashboard grid */
.db-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}
@media (max-width: 1100px) {
  .db-grid { grid-template-columns: 1fr; }
}
.card-filters, .card-breakdown, .card-exports {
  min-height: 220px;
  display: flex;
  flex-direction: column;
}

/* Filters */
.filters {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 12px;
}
.fld {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.fld span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8ba0d8;
}
.fld input, .fld select {
  background: #0f1538;
  border: 1px solid rgba(139, 165, 255, 0.18);
  border-radius: 8px;
  padding: 8px 10px;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.fld input:focus, .fld select:focus {
  border-color: var(--oros-sky);
  background: #0a1030;
}
.fld input::-webkit-calendar-picker-indicator { filter: invert(1) opacity(0.6); }

/* Breakdown bars */
.breakdown {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.bar-row {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 10px;
  align-items: center;
}
.bar-label {
  font-size: 13px;
  font-weight: 600;
  color: #d6def7;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bar-track {
  height: 10px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  overflow: hidden;
}
.bar-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--oros-sky), var(--oros-cyan));
  border-radius: 999px;
  transition: width 0.3s ease;
}
.bar-val {
  font-size: 12px;
  color: #a7b7e8;
  font-variant-numeric: tabular-nums;
  min-width: 70px;
  text-align: right;
}

/* Exports */
.exports {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.exports .btn { width: 100%; }

/* Table card */
.card-table { padding: 18px 0 0; }
.card-table .card-h { padding: 0 20px; }
.table-wrap {
  overflow-x: auto;
  max-height: 70vh;
  overflow-y: auto;
  border-top: 1px solid rgba(139, 165, 255, 0.12);
}
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
.data-table th {
  position: sticky;
  top: 0;
  background: #11193f;
  text-align: left;
  padding: 0;
  border-bottom: 1px solid rgba(139, 165, 255, 0.18);
  z-index: 1;
}
.th-sort {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 12px 16px;
  color: #8ba0d8;
  font-family: inherit;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.th-sort:hover { color: #fff; }
.th-sort.sorted { color: #fff; }
.th-arrow { color: var(--oros-sky); }
.data-table th:first-child, .data-table td:first-child { padding-left: 20px; }
.data-table th:last-child, .data-table td:last-child { padding-right: 20px; }
.data-table td {
  padding: 10px 16px;
  border-bottom: 1px solid rgba(139, 165, 255, 0.08);
  color: #e2e8ff;
  vertical-align: middle;
}
.data-table tbody tr:hover td { background: rgba(10, 155, 224, 0.06); }
.data-table td.num { color: #8ba0d8; font-variant-numeric: tabular-nums; width: 1px; white-space: nowrap; }
.data-table td.mono { font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.data-table td.nowrap { white-space: nowrap; }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.badge-ok { background: rgba(37, 211, 102, 0.18); color: #6ff2a1; }
.badge-off { background: rgba(255, 255, 255, 0.07); color: #9fb0e8; }

.empty {
  text-align: center;
  padding: 48px 24px;
  opacity: 0.6;
  font-size: 14px;
}

/* ---------- Login ---------- */
body.admin-page.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  overflow: hidden;
}
.login-wrap {
  width: min(100%, 420px);
  padding: 24px;
}
.login-card {
  background: linear-gradient(180deg, #1a2458 0%, #141c47 100%);
  border: 1px solid rgba(139, 165, 255, 0.14);
  border-radius: 18px;
  padding: 32px 28px 28px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 20px 60px rgba(0, 0, 0, 0.5);
}
.login-brand {
  text-align: center;
  margin-bottom: 22px;
}
.login-mascot {
  width: 128px;
  height: 128px;
  object-fit: contain;
  margin-bottom: 14px;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.4));
}
.login-brand h1 {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  font-size: 24px;
  color: #fff;
  line-height: 1;
}
.login-brand p {
  margin-top: 4px;
  color: #9fb0e8;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.login-form .fld input {
  padding: 11px 12px;
  font-size: 14px;
}
.login-error {
  background: rgba(212, 27, 106, 0.15);
  border: 1px solid rgba(212, 27, 106, 0.4);
  color: #ffb3cf;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 600;
}
.login-submit {
  margin-top: 4px;
  padding: 12px 16px;
  font-size: 14px;
}
.login-submit[disabled] { opacity: 0.7; cursor: wait; }

@media print {
  body.admin-page { background: #fff; color: #000; }
  .db-header .db-nav,
  .card-filters,
  .card-exports,
  .card-breakdown { display: none !important; }
  .dashboard { padding: 0; max-width: none; }
  .card, .kpi {
    background: #fff;
    border: 1px solid #ccc;
    color: #000;
    box-shadow: none;
  }
  .kpi::after { display: none; }
  .kpi-label, .db-sub, .kpi-foot, .card-h-note { color: #555; }
  .kpi-value, .db-title h1, .card-h h2 { color: #000; }
  .table-wrap { max-height: none; overflow: visible; border-top: 1px solid #ccc; }
  .data-table th { background: #eee; color: #000; }
  .th-sort { color: #333; }
  .data-table td { color: #000; border-bottom: 1px solid #e0e0e0; }
  .badge-ok { background: #e2f8ec; color: #087439; }
  .badge-off { background: #f0f0f0; color: #555; }
}
