/* ── Palet Warna
   Background utama : soft pink pastel  → #FDE8EF / #FCE4EC / #F8BBD9
   Sekunder/aksen   : watermelon pink   → #E8476A
   Font             : putih             → #FFFFFF / #FFF0F3
   ────────────────────────────────────────────────────── */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  cursor: none !important;
}

body {
  font-family: "Lato", sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #fce4ec 0%, #f8bbd9 50%, #f48fb1 100%);
  overflow: hidden;
  position: relative;
}

/* ── Trail Canvas ──────────────────────────────────────── */
#trail-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
}

/* ── Custom Cursor ─────────────────────────────────────── */
.cursor {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.15s ease;
  transform-origin: 4px 4px;
  filter: drop-shadow(0 2px 6px rgba(232, 71, 106, 0.45));
}
.cursor svg {
  display: block;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.cursor.cursor-hover svg {
  transform: scale(1.25) rotate(10deg);
  filter: drop-shadow(0 4px 12px rgba(232, 71, 106, 0.7));
}
.cursor.cursor-click svg {
  transform: scale(0.85) rotate(-20deg);
}

/* ── Floating Particles ────────────────────────────────── */
.food-particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.particle {
  position: absolute;
  user-select: none;
  animation: floatParticle linear infinite;
  will-change: transform;
}
@keyframes floatParticle {
  0% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-30px) rotate(180deg);
  }
  100% {
    transform: translateY(0) rotate(360deg);
  }
}

/* ── Login Card ────────────────────────────────────────── */
.login-card {
  position: relative;
  z-index: 10;
  background: rgba(232, 71, 106, 0.18);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 44px 40px 36px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow:
    0 30px 60px rgba(200, 50, 80, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  width: 100%;
  max-width: 420px;
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease;
  will-change: transform;
  animation: cardSlideIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes cardSlideIn {
  from {
    transform: translateY(40px) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* ── Card Header ───────────────────────────────────────── */
.card-header {
  text-align: center;
  margin-bottom: 24px;
}

.logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
  animation: bounceIn 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.brand-logo {
  width: 210px;
  height: auto;
  filter: drop-shadow(0 6px 18px rgba(232, 71, 106, 0.3))
    drop-shadow(0 2px 6px rgba(0, 0, 0, 0.1));
  transition:
    transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
    filter 0.3s;
}

.brand-logo:hover {
  transform: scale(1.05) rotate(-1.5deg);
  filter: drop-shadow(0 10px 28px rgba(232, 71, 106, 0.5))
    drop-shadow(0 2px 8px rgba(0, 0, 0, 0.15));
}

@keyframes bounceIn {
  0% {
    transform: scale(0.5) translateY(-16px);
    opacity: 0;
  }
  65% {
    transform: scale(1.07) translateY(4px);
    opacity: 1;
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.subtitle {
  font-size: 0.87rem;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 300;
  letter-spacing: 0.4px;
}

/* ── Input Groups ──────────────────────────────────────── */
.input-group {
  margin-bottom: 18px;
  position: relative;
}

.input-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 7px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  transition: color 0.2s;
}
.input-group.focused label {
  color: #ffffff;
}
.label-icon {
  font-size: 14px;
}

.input-wrapper {
  position: relative;
}

.input-wrapper input {
  width: 100%;
  padding: 13px 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  outline: none;
  font-size: 14.5px;
  font-family: "Lato", sans-serif;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
  transition:
    border-color 0.25s,
    box-shadow 0.25s,
    background 0.25s;
  position: relative;
  z-index: 1;
}
.input-wrapper input::placeholder {
  color: rgba(255, 255, 255, 0.55);
  font-weight: 300;
}
.input-wrapper input:focus {
  border-color: #ffffff;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.28);
}
.input-group.filled .input-wrapper input {
  border-color: rgba(255, 255, 255, 0.6);
}

/* ── Password Toggle ───────────────────────────────────── */
.toggle-pw {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 16px;
  z-index: 2;
  padding: 4px;
  border-radius: 6px;
  transition: transform 0.2s;
  color: white;
}
.toggle-pw:hover {
  transform: translateY(-50%) scale(1.2);
}

/* ── Options Row ───────────────────────────────────────── */
.options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  margin-bottom: 22px;
  color: rgba(255, 255, 255, 0.8);
}

.remember-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.85);
}
.remember-label input[type="checkbox"] {
  display: none;
}

.custom-check {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 5px;
  display: inline-block;
  position: relative;
  transition:
    background 0.2s,
    border-color 0.2s;
  flex-shrink: 0;
}
.remember-label input:checked + .custom-check {
  background: #e8476a;
  border-color: #e8476a;
}
.remember-label input:checked + .custom-check::after {
  content: "✓";
  position: absolute;
  top: -1px;
  left: 2px;
  color: white;
  font-size: 12px;
  font-weight: bold;
}

.forgot-link {
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  transition: color 0.2s;
  opacity: 0.9;
}
.forgot-link:hover {
  opacity: 1;
  text-decoration: underline;
}

/* ── Login Button ──────────────────────────────────────── */
.login-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #e8476a, #c0304f);
  border: none;
  color: white;
  font-weight: 700;
  font-size: 15px;
  font-family: "Lato", sans-serif;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(232, 71, 106, 0.5);
  letter-spacing: 0.3px;
}
.login-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
  opacity: 0;
  transition: opacity 0.25s;
}
.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(232, 71, 106, 0.65);
}
.login-btn:hover::before {
  opacity: 1;
}
.login-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(232, 71, 106, 0.3);
}

.btn-icon {
  font-size: 16px;
  transition: transform 0.3s;
}
.login-btn:hover .btn-icon {
  transform: translateX(4px) rotate(-5deg);
}

.login-btn.loading .btn-text,
.login-btn.loading .btn-icon {
  opacity: 0;
}

.btn-loader {
  display: none;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.35);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  position: absolute;
}
.login-btn.loading .btn-loader {
  display: block;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── Divider ───────────────────────────────────────────── */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 16px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
}
.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(255, 255, 255, 0.35),
    transparent
  );
}

/* ── Footer ────────────────────────────────────────────── */
.footer {
  text-align: center;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.75);
}
.footer a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  transition: opacity 0.2s;
}
.footer a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* ── Toast ─────────────────────────────────────────────── */
.toast {
  position: absolute;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  background: #e8476a;
  color: #fff;
  padding: 10px 22px;
  border-radius: 50px;
  font-size: 13.5px;
  white-space: nowrap;
  box-shadow: 0 6px 20px rgba(232, 71, 106, 0.4);
  opacity: 0;
  transition:
    bottom 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.3s;
  pointer-events: none;
}
.toast.show {
  bottom: -48px;
  opacity: 1;
}

/* ── Stagger animations ────────────────────────────────── */
.input-group:nth-child(1) {
  animation: fadeUp 0.5s 0.2s both;
}
.input-group:nth-child(2) {
  animation: fadeUp 0.5s 0.35s both;
}
.options {
  animation: fadeUp 0.5s 0.45s both;
}
.login-btn {
  animation: fadeUp 0.5s 0.55s both;
}

@keyframes fadeUp {
  from {
    transform: translateY(16px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
.toast.error {
  background: #c0304f;
}
