/* ================================================
   FILE: css/login.css  — Halaman Login
   ================================================ */
@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600&display=swap");

/* ── Tokens ────────────────────────────────────── */
:root {
  --pri: #6c63ff;
  --pri-dk: #5248d4;
  --bg-dark: #0c0831;
  --surface: #ffffff;
  --t1: #1c1848;
  --t2: #5b5e7a;
  --t3: #9497b0;
  --border: #e6e3f6;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 22px;
  --r-2xl: 28px;
  --t: all 0.22s ease;
  --t-spring: all 0.36s cubic-bezier(0.34, 1.56, 0.64, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  background: var(--bg-dark);
  overflow: hidden;
}

/* ── Animated blobs ────────────────────────────── */
.bg-gradient {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #0c0831 0%, #1a1466 60%, #2d1669 100%);
  z-index: 0;
}

.blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.28;
  z-index: 1;
  pointer-events: none;
}
.blob-1 {
  width: 480px;
  height: 480px;
  background: radial-gradient(#6c63ff, #4b44d4);
  top: -150px;
  left: -140px;
  animation: blobF 14s ease-in-out infinite;
}
.blob-2 {
  width: 380px;
  height: 380px;
  background: radial-gradient(#ff6b9d, #e040ab);
  bottom: -120px;
  right: -100px;
  animation: blobF 12s ease-in-out infinite 3s;
}
.blob-3 {
  width: 260px;
  height: 260px;
  background: radial-gradient(#10b981, #059669);
  top: 50%;
  left: 58%;
  opacity: 0.14;
  animation: blobF 16s ease-in-out infinite 6s;
}

@keyframes blobF {
  0%,
  100% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  }
  33% {
    border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
  }
  66% {
    border-radius: 50% 60% 30% 70% / 40% 40% 60% 50%;
  }
}
@keyframes floatUp {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0.5;
  }
  50% {
    opacity: 0.18;
  }
  100% {
    transform: translateY(-200px) rotate(300deg);
    opacity: 0;
  }
}
@keyframes fadeU {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes fadeL {
  from {
    opacity: 0;
    transform: translateX(-22px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes fadeD {
  from {
    opacity: 0;
    transform: translateY(-18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes spinA {
  to {
    transform: rotate(360deg);
  }
}

/* Particles */
.particles {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}
.particle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  animation: floatUp linear infinite;
}

/* ══════════════════════════════════════════════════
   LOGIN WRAPPER — split layout
   ══════════════════════════════════════════════════ */
.login-wrapper {
  position: relative;
  z-index: 10;
  display: flex;
  width: 100%;
  max-width: 960px;
  margin: auto;
  border-radius: var(--r-2xl);
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.55);
  animation: fadeU 0.6s ease both;
}

/* ══════════════════════════════════════════════════
   LEFT — Form Panel
   ══════════════════════════════════════════════════ */
.login-left {
  flex: 1;
  background: var(--surface);
  padding: 52px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 340px;
  position: relative;
  overflow: hidden;
}

/* Subtle corner accent */
.login-left::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(var(--pri), transparent 70%);
  opacity: 0.04;
  pointer-events: none;
}

/* Brand */
.brand-wrap {
  margin-bottom: 32px;
  animation: fadeD 0.5s ease both;
}
.brand-logo {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 8px;
}
.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--pri), #ff6b9d);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 19px;
  box-shadow: 0 6px 18px rgba(108, 99, 255, 0.4);
  flex-shrink: 0;
}
.brand-name-text {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1;
  background: linear-gradient(135deg, var(--pri), #ff6b9d);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.brand-tagline {
  font-size: 13px;
  color: var(--t3);
}

/* Form headings */
.form-title {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 21px;
  font-weight: 700;
  color: var(--t1);
  margin-bottom: 4px;
}
.form-subtitle {
  font-size: 13.5px;
  color: var(--t2);
  margin-bottom: 26px;
}

/* Error message */
.error-msg {
  display: none;
  align-items: center;
  gap: 8px;
  background: #fff2f2;
  border: 1px solid #ffcdd0;
  border-radius: var(--r-sm);
  padding: 11px 14px;
  font-size: 13px;
  color: #c0392b;
  margin-bottom: 14px;
}
.error-msg.show {
  display: flex;
  animation: fadeU 0.3s ease both;
}

/* Field group */
.field {
  margin-bottom: 16px;
  animation: fadeU 0.5s ease both;
}
.field-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--t1);
  margin-bottom: 7px;
}
.field-label i {
  color: var(--pri);
  font-size: 12px;
  width: 14px;
}

.input-wrap {
  position: relative;
}
.input-wrap input {
  width: 100%;
  padding: 12px 40px 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  font-size: 14px;
  color: var(--t1);
  background: #fafafe;
  font-family: "Inter", sans-serif;
  transition: var(--t);
}
.input-wrap input:focus {
  border-color: var(--pri);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(108, 99, 255, 0.11);
}
.input-wrap input::placeholder {
  color: var(--t3);
}

.input-suffix {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--t3);
  cursor: pointer;
  transition: var(--t);
  background: none;
  border: none;
  padding: 3px;
  display: flex;
}
.input-suffix:hover {
  color: var(--pri);
}

/* Extras row */
.field-extras {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.remember-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--t2);
  cursor: pointer;
}
.remember-label input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--pri);
  cursor: pointer;
}
.forgot-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--pri);
  transition: var(--t);
}
.forgot-link:hover {
  color: var(--pri-dk);
  text-decoration: underline;
}

/* Login button */
.btn-login {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--pri), var(--pri-dk));
  color: #fff;
  border: none;
  border-radius: var(--r-md);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--t);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 5px 18px rgba(108, 99, 255, 0.38);
  margin-bottom: 18px;
  animation: fadeU 0.5s 0.3s ease both;
  position: relative;
  overflow: hidden;
}
.btn-login::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.1);
  opacity: 0;
  transition: var(--t);
}
.btn-login:hover::after {
  opacity: 1;
}
.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(108, 99, 255, 0.48);
}
.btn-login:active {
  transform: scale(0.97);
}
.btn-login.loading {
  pointer-events: none;
  opacity: 0.78;
}
.spin {
  animation: spinA 0.8s linear infinite;
}

/* Footer */
.login-footer {
  text-align: center;
  font-size: 12.5px;
  color: var(--t3);
  animation: fadeU 0.5s 0.4s ease both;
}
.login-footer a {
  color: var(--pri);
  font-weight: 600;
}
.login-footer a:hover {
  text-decoration: underline;
}

/* ══════════════════════════════════════════════════
   RIGHT — Illustration Panel
   ══════════════════════════════════════════════════ */
.login-right {
  flex: 1;
  background: linear-gradient(145deg, #150f55 0%, #251a75 50%, #0c0831 100%);
  padding: 52px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Radial glow spots */
.login-right::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse at 30% 30%,
      rgba(108, 99, 255, 0.2) 0%,
      transparent 60%
    ),
    radial-gradient(
      ellipse at 70% 75%,
      rgba(255, 107, 157, 0.15) 0%,
      transparent 60%
    );
  pointer-events: none;
}

/* Grid dots decoration */
.right-dots {
  position: absolute;
  bottom: 28px;
  right: 28px;
  display: grid;
  grid-template-columns: repeat(6, 6px);
  gap: 7px;
  opacity: 0.12;
}
.right-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  display: block;
}

.right-content {
  position: relative;
  z-index: 2;
  color: #fff;
}

.right-eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 14px;
  animation: fadeL 0.6s ease both;
}
.right-headline {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.24;
  letter-spacing: -0.5px;
  margin-bottom: 14px;
  animation: fadeL 0.6s 0.08s ease both;
}
.right-headline span {
  background: linear-gradient(90deg, #a78bfa, #f9a8d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.right-desc {
  font-size: 14px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 30px;
  animation: fadeL 0.6s 0.16s ease both;
}

/* Feature pills */
.feature-pills {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.feature-pill {
  display: flex;
  align-items: center;
  gap: 13px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r-lg);
  padding: 12px 15px;
  backdrop-filter: blur(8px);
  transition: var(--t);
  animation: fadeL 0.6s ease both;
}
.feature-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateX(4px);
}
.pill-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.pill-icon.purple {
  background: rgba(108, 99, 255, 0.3);
  color: #a78bfa;
}
.pill-icon.pink {
  background: rgba(236, 72, 153, 0.25);
  color: #f9a8d4;
}
.pill-icon.green {
  background: rgba(16, 185, 129, 0.25);
  color: #6ee7b7;
}
.pill-icon.amber {
  background: rgba(245, 158, 11, 0.25);
  color: #fcd34d;
}
.pill-text h4 {
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 1px;
}
.pill-text p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.48);
}

/* ── Responsive ──────────────────────────────── */
@media (max-width: 820px) {
  body {
    align-items: flex-start;
    overflow: auto;
  }
  .login-wrapper {
    flex-direction: column;
    border-radius: 0;
    max-width: 100%;
    min-height: 100vh;
    box-shadow: none;
    margin: 0;
  }
  .login-right {
    display: none;
  }
  .login-left {
    padding: 36px 24px;
    min-width: unset;
    flex: unset;
  }
  .brand-icon {
    width: 38px;
    height: 38px;
    font-size: 16px;
  }
  .brand-name-text {
    font-size: 20px;
  }
}
@media (max-width: 380px) {
  .login-left {
    padding: 28px 16px;
  }
}
