:root {
  --input-padding-x: 1.5rem;
  --input-padding-y: .75rem;
  --primary-blue: #25AAE1;
  --primary-blue-dark: #1a8fc4;
  --gradient-start: #5bc4f0;
  --gradient-end: #1a8fc4;
}

* {
  font-family: 'Poppins', sans-serif;
}

body {
  background: linear-gradient(135deg, var(--gradient-start) 0%, var(--primary-blue) 40%, var(--gradient-end) 100%);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ============================
   Wave Background
   ============================ */
.wave-container {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 0;
  pointer-events: none;
}

.wave-container svg {
  display: block;
  width: 100%;
  height: 180px;
}

/* ============================
   Sparkle Decorations
   ============================ */
.sparkle {
  position: fixed;
  color: rgba(255,255,255,0.5);
  font-size: 24px;
  z-index: 0;
  animation: sparkle-pulse 3s ease-in-out infinite;
  pointer-events: none;
}

.sparkle-1 { top: 15%; left: 8%; animation-delay: 0s; font-size: 18px; }
.sparkle-2 { bottom: 20%; right: 5%; animation-delay: 1s; font-size: 28px; }
.sparkle-3 { bottom: 30%; left: 50%; animation-delay: 2s; font-size: 20px; }

@keyframes sparkle-pulse {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.3); }
}

/* ============================
   Floating Particles
   ============================ */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: rgba(255,255,255,0.4);
  border-radius: 50%;
  animation: float-up linear infinite;
}

.particle:nth-child(1) { left: 10%; animation-duration: 12s; animation-delay: 0s; width: 4px; height: 4px; }
.particle:nth-child(2) { left: 25%; animation-duration: 15s; animation-delay: 2s; width: 6px; height: 6px; }
.particle:nth-child(3) { left: 40%; animation-duration: 10s; animation-delay: 4s; width: 3px; height: 3px; }
.particle:nth-child(4) { left: 55%; animation-duration: 18s; animation-delay: 1s; width: 5px; height: 5px; }
.particle:nth-child(5) { left: 70%; animation-duration: 14s; animation-delay: 3s; width: 4px; height: 4px; }
.particle:nth-child(6) { left: 85%; animation-duration: 11s; animation-delay: 5s; width: 7px; height: 7px; }
.particle:nth-child(7) { left: 15%; animation-duration: 16s; animation-delay: 6s; width: 3px; height: 3px; }
.particle:nth-child(8) { left: 60%; animation-duration: 13s; animation-delay: 7s; width: 5px; height: 5px; }

@keyframes float-up {
  0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-10vh) rotate(720deg); opacity: 0; }
}

/* ============================
   Layout Wrapper
   ============================ */
.login-wrapper {
  position: relative;
  z-index: 1;
  padding: 20px 0;
}

.side-card-col {
  display: flex;
  justify-content: center;
}

/* ============================
   Center Login Card
   ============================ */
.card-signin {
  border: 0;
  border-radius: 1rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
  background: #fff;
  overflow: hidden;
}

.card-signin .card-title {
  margin-bottom: 1.8rem;
  font-weight: 600;
  font-size: 1.35rem;
}

.card-signin .card-title .custom-link {
  color: var(--primary-blue);
  text-decoration: none;
  transition: color 0.2s;
}

.card-signin .card-title .custom-link:hover {
  color: var(--primary-blue-dark);
}

.card-signin .card-body {
  padding: 2rem 2rem 1.5rem;
}

/* ============================
   Form Styles
   ============================ */
.form-signin {
  width: 100%;
}

.form-signin .btn {
  font-size: 80%;
  border-radius: 5rem;
  letter-spacing: .1rem;
  font-weight: 600;
  padding: 0.85rem;
  transition: all 0.3s;
}

.btn-signin {
  background: linear-gradient(135deg, #3db8f5, #1a8fc4);
  border: none;
  box-shadow: 0 4px 15px rgba(37, 170, 225, 0.35);
}

.btn-signin:hover {
  background: linear-gradient(135deg, #1a8fc4, #1578a8);
  box-shadow: 0 6px 20px rgba(37, 170, 225, 0.5);
  transform: translateY(-1px);
}

.btn-signin:active {
  transform: translateY(0);
}

.form-label-group {
  position: relative;
  margin-bottom: 1rem;
}

.form-label-group input {
  height: auto;
  border-radius: 2rem;
  border: 1.5px solid #e0e0e0;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-label-group input:focus {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(37, 170, 225, 0.15);
}

.form-label-group>input,
.form-label-group>label {
  padding: var(--input-padding-y) var(--input-padding-x);
}

.form-label-group>label {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  margin-bottom: 0;
  line-height: 1.5;
  color: #999;
  border: 1px solid transparent;
  border-radius: .25rem;
  transition: all .1s ease-in-out;
  cursor: text;
}

.form-label-group input::-webkit-input-placeholder { color: transparent; }
.form-label-group input:-ms-input-placeholder { color: transparent; }
.form-label-group input::-ms-input-placeholder { color: transparent; }
.form-label-group input::-moz-placeholder { color: transparent; }
.form-label-group input::placeholder { color: transparent; }

.form-label-group input:not(:placeholder-shown) {
  padding-top: calc(var(--input-padding-y) + var(--input-padding-y) * (2 / 3));
  padding-bottom: calc(var(--input-padding-y) / 3);
}

.form-label-group input:not(:placeholder-shown)~label {
  padding-top: calc(var(--input-padding-y) / 3);
  padding-bottom: calc(var(--input-padding-y) / 3);
  font-size: 12px;
  color: #999;
}

.toggle-password {
  color: var(--primary-blue);
  cursor: pointer;
  font-weight: 500;
  transition: color 0.2s;
}

.toggle-password:hover {
  color: var(--primary-blue-dark);
}

.hover-pointer {
  cursor: pointer;
}

.custom-control-label {
  font-size: 0.9rem;
  color: #555;
}

.custom-checkbox .custom-control-input:checked ~ .custom-control-label::before {
  background-color: var(--primary-blue);
  border-color: var(--primary-blue);
}

.register-link {
  color: var(--primary-blue);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}

.register-link:hover {
  color: var(--primary-blue-dark);
  text-decoration: underline;
}

.forgot-link {
  color: #999;
  font-size: 0.85rem;
  text-decoration: none;
  transition: color 0.2s;
}

.forgot-link:hover {
  color: var(--primary-blue);
}

/* ============================
   Side Cards
   ============================ */
.side-card {
  background: rgba(255,255,255,0.95);
  border-radius: 1rem;
  padding: 2rem 1.5rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  max-width: 300px;
  width: 100%;
  backdrop-filter: blur(10px);
}

.side-card-title {
  font-weight: 700;
  font-size: 1.15rem;
  color: #333;
  margin-bottom: 1.5rem;
  text-align: center;
  line-height: 1.4;
}

.text-highlight {
  color: var(--primary-blue);
  font-style: italic;
  font-weight: 700;
}

/* Left Card - Meterai Icon */
.side-card-icon {
  text-align: center;
  margin-bottom: 1.2rem;
}

.meterai-icon {
  position: relative;
  display: inline-block;
  width: 80px;
  height: 90px;
}

.meterai-icon i {
  font-size: 60px;
  color: #cce5ff;
}

.badge-stamp {
  position: absolute;
  top: 5px;
  right: -5px;
  background: linear-gradient(135deg, #5bc4f0, #25AAE1);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  transform: rotate(10deg);
  box-shadow: 0 2px 8px rgba(37, 170, 225, 0.3);
}

/* Left Card - Benefits List */
.benefit-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.benefit-list li {
  display: flex;
  align-items: flex-start;
  margin-bottom: 0.85rem;
  font-size: 0.85rem;
  color: #555;
  line-height: 1.4;
}

.benefit-check {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  background: #e8f8ee;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  margin-top: 1px;
}

.benefit-check i {
  font-size: 11px;
  color: #34c759;
}

.price-highlight {
  color: #fff;
  font-weight: 700;
  background: linear-gradient(135deg, #e53935, #c62828);
  padding: 2px 10px 2px 8px;
  border-radius: 4px;
  font-size: 0.85rem;
  white-space: nowrap;
  display: inline-block;
  position: relative;
  margin-left: 2px;
  box-shadow: 0 2px 6px rgba(198, 40, 40, 0.3);
  line-height: 1.5;
}

.price-highlight::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-right: 7px solid #e53935;
}

.price-highlight::after {
  content: '';
  position: absolute;
  left: -2px;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  background: #fff;
  border-radius: 50%;
}

/* Right Card - Steps */
.steps-list {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 14px;
}

.step-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.step-icon-upload {
  background: linear-gradient(135deg, #e3f2fd, #bbdefb);
  color: #1976d2;
}

.step-icon-stamp {
  background: linear-gradient(135deg, #fff8e1, #ffecb3);
  color: #f9a825;
}

.step-icon-download {
  background: linear-gradient(135deg, #e0f7fa, #b2ebf2);
  color: #00838f;
}

.step-text {
  font-size: 0.9rem;
  font-weight: 500;
  color: #444;
}

/* ============================
   Responsive
   ============================ */
@media (max-width: 991.98px) {
  .side-card-col {
    display: none !important;
  }
}

@media (max-width: 575.98px) {
  .card-signin .card-body {
    padding: 1.5rem 1.2rem 1rem;
  }
  
  .card-signin .card-title {
    font-size: 1.15rem;
  }
}

/* ============================
   reCAPTCHA Responsive
   ============================ */
.g-recaptcha {
  transform-origin: left top;
}

/* ============================
   Social Login Buttons (legacy)
   ============================ */
.btn-google {
  color: white;
  background-color: #ea4335;
}

.btn-facebook {
  color: white;
  background-color: #3b5998;
}

/* Fallback for Edge */
@supports (-ms-ime-align: auto) {
  .form-label-group>label {
    display: none;
  }
  .form-label-group input::-ms-input-placeholder {
    color: #777;
  }
}

/* Fallback for IE */
@media all and (-ms-high-contrast: none),
(-ms-high-contrast: active) {
  .form-label-group>label {
    display: none;
  }
  .form-label-group input:-ms-input-placeholder {
    color: #777;
  }
}