/* ============================================================
   District Solar — Cinematic Animated Sun & Illuminated Auth Card
   ============================================================ */
:root {
  --mx: 82%;
  --my: 12%;
}

body.auth-solar-body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 92% 6%, rgba(254, 240, 138, 0.34) 0%, rgba(251, 191, 36, 0.16) 24%, rgba(245, 158, 11, 0.05) 45%, transparent 66%),
    radial-gradient(circle at 10% 88%, rgba(34, 211, 238, 0.16) 0%, transparent 52%),
    linear-gradient(155deg, #020611 0%, #07142b 52%, #0c2146 100%);
  color: #f8fafc;
  position: relative;
  overflow-x: hidden;
}

/* Multi-depth Twinkling Starfield */
.auth-stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 16%, rgba(255,255,255,0.75), transparent),
    radial-gradient(1px 1px at 28% 9%, rgba(255,255,255,0.55), transparent),
    radial-gradient(2px 2px at 48% 22%, rgba(251,191,36,0.65), transparent),
    radial-gradient(1.5px 1.5px at 66% 12%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1.5px 1.5px at 18% 72%, rgba(34,211,238,0.6), transparent),
    radial-gradient(1.5px 1.5px at 84% 78%, rgba(255,255,255,0.45), transparent),
    radial-gradient(1px 1px at 38% 84%, rgba(253,224,71,0.5), transparent);
  animation: authTwinkle 4.5s ease-in-out infinite alternate;
}
@keyframes authTwinkle {
  0% { opacity: 0.45; transform: scale(1); }
  100% { opacity: 0.98; transform: scale(1.015); }
}

/* Canvas for God-Rays, Photon Streams, & Card Rim Energy */
#authSolarCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

/* Top-Right Cinematic Sun */
.auth-sun-wrap {
  position: fixed;
  top: -36px;
  right: -36px;
  width: 280px;
  height: 280px;
  pointer-events: none;
  z-index: 1;
}
.auth-sun-corona {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(254, 249, 195, 0.98) 0%,
    rgba(253, 224, 71, 0.68) 26%,
    rgba(251, 191, 36, 0.28) 50%,
    rgba(245, 158, 11, 0.08) 68%,
    transparent 78%
  );
  animation: sunCoronaPulse 3.4s ease-in-out infinite;
}
.auth-sun-rays {
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: repeating-conic-gradient(
    from 0deg,
    rgba(254, 240, 138, 0.36) 0deg 6deg,
    transparent 6deg 20deg
  );
  -webkit-mask-image: radial-gradient(circle, black 30%, transparent 74%);
  mask-image: radial-gradient(circle, black 30%, transparent 74%);
  animation: sunRaysSpin 26s linear infinite;
}
.auth-sun-rays::after {
  content: '';
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  background: repeating-conic-gradient(
    from 10deg,
    rgba(251, 191, 36, 0.26) 0deg 4deg,
    transparent 4deg 28deg
  );
  animation: sunRaysSpinRev 18s linear infinite;
}
.auth-sun-core {
  position: absolute;
  top: 84px;
  left: 84px;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: radial-gradient(circle at 42% 42%, #ffffff 0%, #fef08a 32%, #fbbf24 72%, #f59e0b 100%);
  box-shadow:
    0 0 42px rgba(254, 240, 138, 0.95),
    0 0 95px rgba(251, 191, 36, 0.72),
    0 0 170px rgba(245, 158, 11, 0.45);
  animation: coreBreathe 2.8s ease-in-out infinite alternate;
}

/* Volumetric Diagonal Sunlight Shafts anchored at Sun Center (104px, 104px from top-right) */
.auth-sun-beam {
  position: fixed;
  top: 104px;
  right: 104px;
  width: 82vw;
  max-width: 1050px;
  height: 540px;
  background: linear-gradient(225deg, rgba(254, 240, 138, 0.22) 0%, rgba(251, 191, 36, 0.09) 38%, transparent 74%);
  clip-path: polygon(100% 0%, 96% 0%, 0% 82%, 18% 100%);
  pointer-events: none;
  z-index: 1;
  filter: blur(10px);
  animation: beamBreathe 4.2s ease-in-out infinite alternate;
}

@keyframes sunCoronaPulse {
  0%, 100% { transform: scale(1); opacity: 0.86; }
  50% { transform: scale(1.14); opacity: 1; }
}
@keyframes coreBreathe {
  0% { transform: scale(0.98); }
  100% { transform: scale(1.04); }
}
@keyframes sunRaysSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes sunRaysSpinRev {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}
@keyframes beamBreathe {
  0% { opacity: 0.55; }
  100% { opacity: 0.98; }
}

/* ============================================================
   Illuminated Glass Card with Animated Solar Rim & Specular Sheen
   ============================================================ */
.auth-card-illuminated {
  position: relative;
  z-index: 5;
  background:
    radial-gradient(circle at var(--mx) var(--my), rgba(253, 224, 71, 0.14) 0%, transparent 52%),
    linear-gradient(148deg, rgba(20, 40, 78, 0.88) 0%, rgba(9, 19, 40, 0.95) 100%);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid rgba(251, 191, 36, 0.38);
  border-radius: 26px;
  box-shadow:
    0 28px 72px rgba(0, 0, 0, 0.65),
    16px -16px 56px rgba(251, 191, 36, 0.24),
    inset 0 1.5px 0 rgba(254, 249, 195, 0.35),
    inset -1.5px 0 0 rgba(251, 191, 36, 0.22);
  overflow: hidden;
  transition: transform 0.25s ease-out, box-shadow 0.3s ease;
  animation:
    cardEntrance 0.85s cubic-bezier(0.22, 1, 0.36, 1) both,
    cardSolarGlow 3.8s ease-in-out infinite alternate;
}

/* Top-Right Corner Sunlight Hot-Spot Flare on the Card */
.auth-card-illuminated::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(254, 240, 138, 0.32) 0%, rgba(251, 191, 36, 0.1) 45%, transparent 72%);
  pointer-events: none;
  animation: cornerFlarePulse 3.6s ease-in-out infinite alternate;
}

/* Diagonal Glass Shimmer Sweep */
.auth-card-illuminated::after {
  content: '';
  position: absolute;
  top: -120%;
  left: -60%;
  width: 55%;
  height: 300%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(254, 249, 195, 0.08) 50%,
    transparent 100%
  );
  transform: rotate(28deg);
  pointer-events: none;
  animation: glassSweep 6.5s ease-in-out infinite;
}

@keyframes cardEntrance {
  from { opacity: 0; transform: translateY(30px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes cardSolarGlow {
  0% {
    box-shadow:
      0 28px 72px rgba(0, 0, 0, 0.65),
      12px -12px 40px rgba(251, 191, 36, 0.16),
      inset 0 1.5px 0 rgba(254, 249, 195, 0.24);
  }
  100% {
    box-shadow:
      0 28px 72px rgba(0, 0, 0, 0.65),
      20px -20px 68px rgba(251, 191, 36, 0.34),
      inset 0 1.5px 0 rgba(254, 249, 195, 0.48);
  }
}
@keyframes cornerFlarePulse {
  0% { opacity: 0.65; transform: scale(0.95); }
  100% { opacity: 1; transform: scale(1.12); }
}
@keyframes glassSweep {
  0%, 35% { left: -75%; opacity: 0; }
  55% { opacity: 1; }
  80%, 100% { left: 140%; opacity: 0; }
}

/* Staggered Field Entrance */
.auth-card-illuminated form > .mb-3,
.auth-card-illuminated form .row > div {
  animation: fieldSlideUp 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.auth-card-illuminated form > .mb-3:nth-child(1),
.auth-card-illuminated form .row > div:nth-child(1) { animation-delay: 0.08s; }
.auth-card-illuminated form > .mb-3:nth-child(2),
.auth-card-illuminated form .row > div:nth-child(2) { animation-delay: 0.14s; }
.auth-card-illuminated form .row > div:nth-child(3) { animation-delay: 0.18s; }
.auth-card-illuminated form .row > div:nth-child(4) { animation-delay: 0.22s; }
.auth-card-illuminated form .row > div:nth-child(5) { animation-delay: 0.26s; }
.auth-card-illuminated form .row > div:nth-child(6) { animation-delay: 0.30s; }
.auth-card-illuminated form .row > div:nth-child(7) { animation-delay: 0.34s; }

@keyframes fieldSlideUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Inputs & Animated Solar Submit Button */
.auth-card-illuminated .form-control,
.auth-card-illuminated .form-select {
  background: rgba(5, 11, 24, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  border-radius: 12px;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.2s, background 0.25s;
}
.auth-card-illuminated .form-control:focus,
.auth-card-illuminated .form-select:focus {
  background: rgba(5, 11, 24, 0.94);
  color: #fff;
  border-color: #fde047;
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.25), 0 6px 20px rgba(251, 191, 36, 0.16);
  transform: translateY(-1px);
}

.btn-solar-anim {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #fef08a 0%, #fbbf24 45%, #f59e0b 100%);
  color: #09111e !important;
  font-weight: 800;
  border: none;
  border-radius: 12px;
  padding: 13px;
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.38);
  transition: transform 0.2s, box-shadow 0.25s;
}
.btn-solar-anim::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-20deg);
  animation: btnShine 3.2s ease-in-out infinite;
}
@keyframes btnShine {
  0%, 40% { left: -100%; }
  75%, 100% { left: 160%; }
}
.btn-solar-anim:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 38px rgba(245, 158, 11, 0.58);
}

/* ============================================================
   Photovoltaic Solar Panel Card Design (Login)
   ============================================================ */
.solar-panel-card {
  border: 4px solid #94a3b8 !important;
  border-radius: 18px !important;
  background-color: #091b42;
  background-image:
    radial-gradient(circle at var(--mx) var(--my), rgba(253, 224, 71, 0.22) 0%, transparent 48%),
    /* Busbars & Solar Cell Grid */
    repeating-linear-gradient(
      90deg,
      rgba(125, 211, 252, 0.14) 0px,
      rgba(125, 211, 252, 0.14) 1px,
      transparent 1px,
      transparent 54px
    ),
    repeating-linear-gradient(
      0deg,
      rgba(125, 211, 252, 0.14) 0px,
      rgba(125, 211, 252, 0.14) 1px,
      transparent 1px,
      transparent 54px
    ),
    /* Fine vertical silicon fingers */
    repeating-linear-gradient(
      90deg,
      rgba(56, 189, 248, 0.05) 0px,
      rgba(56, 189, 248, 0.05) 1px,
      transparent 1px,
      transparent 18px
    ),
    linear-gradient(145deg, #0d275c 0%, #0a1c44 55%, #06122e 100%) !important;
  box-shadow:
    0 28px 72px rgba(0, 0, 0, 0.72),
    18px -18px 60px rgba(251, 191, 36, 0.28),
    inset 0 0 0 2px rgba(226, 232, 240, 0.25),
    inset 0 0 36px rgba(14, 165, 233, 0.22) !important;
}

.solar-panel-card .form-control,
.solar-panel-card .form-select {
  background: rgba(4, 10, 26, 0.84);
  border: 1px solid rgba(125, 211, 252, 0.28);
}

.solar-panel-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(4, 10, 26, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 10px;
  padding: 6px 12px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #7dd3fc;
  margin-bottom: 18px;
}
.solar-panel-status .pv-led {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  margin-right: 6px;
  animation: pvLedPulse 1.4s ease-in-out infinite alternate;
}
@keyframes pvLedPulse {
  from { opacity: 0.5; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1.15); }
}

/* Lighter, airy Solar Panel variant for Register Card */
.solar-panel-card-light {
  border: 2px solid rgba(148, 163, 184, 0.36) !important;
  border-radius: 22px !important;
  background-color: rgba(10, 24, 54, 0.8);
  background-image:
    radial-gradient(circle at var(--mx) var(--my), rgba(253, 224, 71, 0.14) 0%, transparent 50%),
    repeating-linear-gradient(
      90deg,
      rgba(125, 211, 252, 0.055) 0px,
      rgba(125, 211, 252, 0.055) 1px,
      transparent 1px,
      transparent 72px
    ),
    repeating-linear-gradient(
      0deg,
      rgba(125, 211, 252, 0.055) 0px,
      rgba(125, 211, 252, 0.055) 1px,
      transparent 1px,
      transparent 72px
    ),
    linear-gradient(150deg, rgba(14, 34, 76, 0.82) 0%, rgba(7, 16, 38, 0.9) 100%) !important;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.58),
    14px -14px 48px rgba(251, 191, 36, 0.18),
    inset 0 1px 0 rgba(226, 232, 240, 0.18) !important;
}
.solar-panel-card-light .form-control,
.solar-panel-card-light .form-select {
  background: rgba(5, 12, 28, 0.68);
  border: 1px solid rgba(125, 211, 252, 0.2);
}
