/* ─── Variables (identik dengan login/register) ─── */
:root {
  --bg-deep:      #040d1a;
  --bg-card:      rgba(8, 22, 46, 0.72);
  --border-card:  rgba(0, 200, 255, 0.12);
  --cyan:         #00c8ff;
  --cyan-dim:     rgba(0, 200, 255, 0.18);
  --cyan-glow:    rgba(0, 200, 255, 0.35);
  --blue:         #0072c6;
  --blue-bright:  #1a8fe3;
  --text:         #e2eaf4;
  --text-dim:     #7a90a8;
  --text-muted:   #3d5068;
  --success:      #00e5a0;
  --error:        #ff4d6d;
  --input-bg:     rgba(0, 30, 60, 0.55);
  --input-border: rgba(0, 160, 220, 0.22);
  --radius-sm:    8px;
  --font-display: 'Outfit', sans-serif;
  --font-mono:    'DM Mono', monospace;
  --transition:   0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  font-family: var(--font-display);
  background: var(--bg-deep);
  color: var(--text);
  overflow: hidden;
}

/* ─── Hide scrollbar, tetap scrollable ─── */
* { scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar { display: none; }

/* ─── Canvas & Blobs (fixed, tidak ikut scroll) ─── */
#bg-canvas { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

.blob {
  position: fixed; border-radius: 50%;
  filter: blur(90px); pointer-events: none; z-index: 0;
  animation: blobFloat 16s ease-in-out infinite;
}
.blob-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(0,114,198,0.17) 0%, transparent 70%);
  top: -120px; left: -80px; animation-duration: 19s;
}
.blob-2 {
  width: 360px; height: 360px;
  background: radial-gradient(circle, rgba(0,200,255,0.11) 0%, transparent 70%);
  bottom: -90px; right: -50px;
  animation-duration: 23s; animation-delay: -10s;
}
.blob-3 {
  width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(0,229,160,0.07) 0%, transparent 70%);
  top: 55%; left: 55%;
  animation-duration: 27s; animation-delay: -5s;
}
@keyframes blobFloat {
  0%,100% { transform: translate(0,0) scale(1); }
  33%      { transform: translate(24px,-18px) scale(1.04); }
  66%      { transform: translate(-18px,22px) scale(0.97); }
}

/* ─── Page Wrapper (scroll container utama) ─── */
.page-wrapper {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow-y: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 40px;
}

/* ─── Card ─── */
.fp-card {
  width: 100%;
  max-width: 1080px;
  background: var(--bg-card);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid var(--border-card);
  border-radius: 24px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(0,200,255,0.06),
    0 32px 80px rgba(0,0,0,0.55),
    0 0 120px rgba(0,114,198,0.12);
  animation: cardEntrance 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
  /* Desktop: card mengisi tinggi viewport */
  height: calc(100vh - 48px);
  align-self: flex-start;
}

.fp-card > .col-lg-5,
.fp-card > .col-lg-7 { height: 100%; }

@keyframes cardEntrance {
  from { opacity: 0; transform: translateY(28px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ─── Brand Panel (Kiri) ─── */
.brand-panel {
  background: linear-gradient(145deg,
    rgba(0,30,70,0.9) 0%,
    rgba(0,15,40,0.95) 100%);
  border-right: 1px solid var(--border-card);
  padding: 52px 40px;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative;
  overflow-y: auto;
}

/* grid overlay */
.brand-panel::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0,200,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,200,255,0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}
.brand-panel::after {
  content: '';
  position: absolute;
  bottom: -60px; left: -60px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(0,200,255,0.07) 0%, transparent 65%);
  pointer-events: none;
}

/* ─── Logo ─── */
.brand-logo {
  display: flex; align-items: center; gap: 12px;
  animation: fadeUp 0.6s 0.2s both;
}
.logo-icon {
  width: 46px; height: 46px;
  background: linear-gradient(135deg, var(--cyan) 0%, var(--blue) 100%);
  border-radius: 12px;
  display: grid; place-items: center;
  font-size: 22px; color: #fff;
  box-shadow: 0 0 24px var(--cyan-glow);
  position: relative; overflow: hidden; flex-shrink: 0;
}
.logo-icon::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.25) 0%, transparent 60%);
}
.logo-text {
  font-family: var(--font-mono);
  font-size: 13px; color: var(--text-dim); line-height: 1.3;
}
.logo-text strong {
  display: block; font-size: 16px; color: var(--text); letter-spacing: 0.02em;
}

/* ─── Brand Headline ─── */
.brand-headline {
  position: relative; z-index: 1;
  animation: fadeUp 0.6s 0.38s both;
}
.brand-tag {
  font-family: var(--font-mono);
  font-size: 11px; color: var(--cyan);
  letter-spacing: 2px; text-transform: uppercase;
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.brand-tag::before {
  content: '';
  display: inline-block; width: 24px; height: 1px;
  background: var(--cyan); opacity: 0.6;
}
.brand-headline h2 {
  font-size: clamp(24px, 2.8vw, 34px);
  font-weight: 800; line-height: 1.25;
  color: var(--text); margin-bottom: 14px;
}
.brand-headline h2 span {
  background: linear-gradient(90deg, var(--cyan), var(--blue-bright));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.brand-headline p {
  font-size: 13.5px; color: var(--text-dim);
  line-height: 1.7; max-width: 280px;
}

/* ─── Flow Steps (Brand Kiri) ─── */
.flow-section {
  position: relative; z-index: 1;
  animation: fadeUp 0.6s 0.55s both;
}
.flow-label {
  font-family: var(--font-mono);
  font-size: 10px; color: var(--text-muted);
  letter-spacing: 1.5px; text-transform: uppercase;
  margin-bottom: 14px;
}
.flow-steps { display: flex; flex-direction: column; gap: 0; }

.flow-item {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 12px 0;
  position: relative;
}
/* connector line */
.flow-item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 13px; top: 40px;
  width: 1px; height: calc(100% - 16px);
  background: linear-gradient(to bottom, rgba(0,200,255,0.25), rgba(0,200,255,0.05));
}

.flow-dot {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 12px; font-weight: 700;
  border: 1.5px solid rgba(0,200,255,0.2);
  background: rgba(0,200,255,0.07);
  color: var(--text-dim);
  transition: var(--transition);
  position: relative; z-index: 1;
}
.flow-item.active .flow-dot {
  background: var(--cyan); border-color: var(--cyan);
  color: #040d1a;
  box-shadow: 0 0 14px rgba(0,200,255,0.45);
}
.flow-item.done .flow-dot {
  background: var(--success); border-color: var(--success);
  color: #040d1a;
}
.flow-item.pending .flow-dot { opacity: 0.45; }

.flow-content { padding-top: 4px; }
.flow-title {
  font-size: 13px; font-weight: 600;
  color: var(--text-dim); margin-bottom: 2px;
  transition: color 0.25s;
}
.flow-item.active .flow-title { color: var(--text); }
.flow-item.done  .flow-title  { color: var(--success); }
.flow-desc {
  font-size: 12px; color: var(--text-muted); line-height: 1.5;
}

/* ─── Security note ─── */
.security-note {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: rgba(0,229,160,0.05);
  border: 1px solid rgba(0,229,160,0.12);
  border-radius: var(--radius-sm);
  font-size: 12px; color: var(--text-muted);
  line-height: 1.55;
  animation: fadeUp 0.6s 0.7s both;
}
.security-note i { color: var(--success); font-size: 18px; flex-shrink: 0; }

/* ─── Form Panel (Kanan) ─── */
.form-panel {
  display: flex; flex-direction: column;
  background: rgba(4,14,32,0.6);
  overflow: hidden; height: 100%;
}
.form-scroll-area {
  flex: 1; overflow-y: auto;
  padding: 52px 48px 44px;
  height: 100%;
}

/* ─── Form Header ─── */
.form-header {
  margin-bottom: 32px;
  animation: fadeUp 0.6s 0.28s both;
}
.welcome-tag {
  font-family: var(--font-mono);
  font-size: 11px; color: var(--cyan);
  letter-spacing: 2px; text-transform: uppercase;
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 6px;
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--success); box-shadow: 0 0 8px var(--success);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50%     { opacity:.6; transform:scale(.8); }
}
.form-header h1 {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700; color: var(--text);
  margin-bottom: 6px; line-height: 1.2;
}
.form-header p { font-size: 13.5px; color: var(--text-dim); line-height: 1.6; }

/* ─── Step Panels (3 views dalam 1 form) ─── */
.step-panel {
  display: none;
  animation: fadeUp 0.45s cubic-bezier(0.22,1,0.36,1) both;
}
.step-panel.active { display: block; }

/* ─── Field ─── */
.field-group {
  margin-bottom: 20px;
  animation: fadeUp 0.5s both;
}
.field-group:nth-child(1) { animation-delay: 0.36s; }
.field-group:nth-child(2) { animation-delay: 0.44s; }
.field-group:nth-child(3) { animation-delay: 0.52s; }

.field-label {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 500;
  color: var(--text-dim); letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 8px; transition: color var(--transition);
}
.field-group:focus-within .field-label { color: var(--cyan); }

.input-wrap { position: relative; }

.input-icon {
  position: absolute; left: 16px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted); font-size: 16px;
  pointer-events: none; transition: color var(--transition); z-index: 2;
}
.field-group:focus-within .input-icon { color: var(--cyan); }

.form-input {
  width: 100%; height: 52px;
  padding: 0 46px 0 46px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  color: var(--text); font-family: var(--font-display); font-size: 14px;
  outline: none; transition: var(--transition); -webkit-appearance: none;
}
.form-input::placeholder { color: var(--text-muted); }
.form-input:focus {
  border-color: var(--cyan);
  background: rgba(0,40,80,0.7);
  box-shadow: 0 0 0 3px rgba(0,200,255,0.1),
              inset 0 1px 0 rgba(0,200,255,0.08);
}
.form-input.is-valid   { border-color: rgba(0,229,160,0.5); }
.form-input.is-invalid { border-color: rgba(255,77,109,0.5); background: rgba(40,8,16,0.5); }

.input-line {
  position: absolute; bottom: 0; left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: calc(100% - 2px); height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
  pointer-events: none;
}
.form-input:focus ~ .input-line { transform: translateX(-50%) scaleX(1); }

.field-msg {
  min-height: 18px; font-size: 11.5px; margin-top: 5px;
  padding-left: 2px;
  display: flex; align-items: center; gap: 5px;
}
.field-msg.error   { color: #ff8fa3; }
.field-msg.success { color: var(--success); }
.field-msg.info    { color: var(--text-muted); }

/* ─── OTP Input Row ─── */
.otp-row {
  display: flex; gap: 10px; justify-content: center;
  margin: 8px 0 4px;
}
.otp-input {
  width: 52px; height: 60px;
  text-align: center;
  font-family: var(--font-mono); font-size: 22px; font-weight: 700;
  background: var(--input-bg);
  border: 1.5px solid var(--input-border);
  border-radius: var(--radius-sm);
  color: var(--text); outline: none;
  transition: var(--transition);
  -webkit-appearance: none; caret-color: var(--cyan);
}
.otp-input:focus {
  border-color: var(--cyan);
  background: rgba(0,40,80,0.7);
  box-shadow: 0 0 0 3px rgba(0,200,255,0.12);
  transform: translateY(-2px);
}
.otp-input.filled {
  border-color: rgba(0,200,255,0.5);
  color: var(--cyan);
}
.otp-input.error-otp {
  border-color: rgba(255,77,109,0.6);
  animation: shakeH 0.4s;
}
@keyframes shakeH {
  0%,100% { transform: translateX(0); }
  20%,60% { transform: translateX(-5px); }
  40%,80% { transform: translateX(5px); }
}

/* ─── Resend countdown ─── */
.resend-wrap {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 12px;
  font-size: 13px; color: var(--text-muted);
}
.btn-resend {
  background: none; border: none; padding: 0;
  color: var(--cyan); font-size: 13px; font-weight: 600;
  font-family: var(--font-display);
  cursor: pointer; transition: color var(--transition);
}
.btn-resend:disabled { color: var(--text-muted); cursor: not-allowed; }
.btn-resend:not(:disabled):hover { color: #fff; }

/* ─── Info box ─── */
.info-box {
  display: flex; gap: 12px;
  padding: 14px 16px;
  background: rgba(0,200,255,0.05);
  border: 1px solid rgba(0,200,255,0.12);
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
  animation: fadeUp 0.5s 0.3s both;
}
.info-box i { color: var(--cyan); font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.info-box p { font-size: 13px; color: var(--text-dim); line-height: 1.6; margin: 0; }
.info-box p strong { color: var(--text); }

/* ─── Success panel ─── */
.success-panel {
  text-align: center;
  padding: 24px 0 8px;
  animation: fadeUp 0.6s both;
}
.success-icon-wrap {
  width: 80px; height: 80px; border-radius: 50%;
  background: rgba(0,229,160,0.1);
  border: 2px solid rgba(0,229,160,0.25);
  display: grid; place-items: center;
  margin: 0 auto 20px;
  animation: scaleIn 0.5s 0.1s cubic-bezier(0.34,1.56,0.64,1) both;
  position: relative;
}
.success-icon-wrap::after {
  content: '';
  position: absolute; inset: -8px; border-radius: 50%;
  border: 1px solid rgba(0,229,160,0.1);
  animation: ringPulse 2.5s ease-in-out infinite;
}
@keyframes scaleIn {
  from { transform: scale(0.5); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
@keyframes ringPulse {
  0%,100% { transform: scale(1);   opacity: 0.5; }
  50%     { transform: scale(1.12); opacity: 0; }
}
.success-icon-wrap i { font-size: 32px; color: var(--success); }
.success-panel h3 {
  font-size: 22px; font-weight: 700; color: var(--text); margin-bottom: 8px;
}
.success-panel p {
  font-size: 14px; color: var(--text-dim); line-height: 1.65; max-width: 320px; margin: 0 auto;
}

/* ─── Password toggle ─── */
.input-icon-right {
  position: absolute; right: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted); font-size: 17px;
  cursor: pointer; z-index: 3; padding: 4px;
  border-radius: 4px; background: none; border: none;
  display: flex; align-items: center;
  transition: color var(--transition);
}
.input-icon-right:hover { color: var(--cyan); }

/* ─── Password strength ─── */
.strength-wrap { margin-top: 8px; }
.strength-bar {
  height: 3px; background: rgba(255,255,255,0.06);
  border-radius: 8px; overflow: hidden; margin-bottom: 5px;
}
.strength-fill {
  height: 100%; width: 0; border-radius: 8px;
  transition: width 0.5s cubic-bezier(0.4,0,0.2,1), background 0.4s;
}
.strength-label {
  font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: 0.05em; color: var(--text-muted);
  display: flex; justify-content: space-between;
}
.strength-checks {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 4px 12px; margin-top: 8px;
}
.strength-check {
  font-size: 11px; color: var(--text-muted);
  display: flex; align-items: center; gap: 5px;
  transition: color 0.25s;
}
.strength-check.pass { color: var(--success); }

/* ─── Submit Button ─── */
.btn-submit {
  width: 100%; height: 52px;
  background: linear-gradient(135deg, var(--blue) 0%, var(--cyan) 100%);
  border: none; border-radius: var(--radius-sm);
  color: #fff; font-family: var(--font-display);
  font-size: 15px; font-weight: 600; letter-spacing: 0.04em;
  cursor: pointer; position: relative; overflow: hidden;
  transition: var(--transition);
  box-shadow: 0 4px 24px rgba(0,114,198,0.35);
  margin-top: 8px;
}
.btn-submit::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--cyan) 0%, var(--blue) 100%);
  opacity: 0; transition: opacity var(--transition);
}
.btn-submit:hover { transform: translateY(-2px); box-shadow: 0 8px 36px rgba(0,200,255,0.35); }
.btn-submit:hover::before { opacity: 1; }
.btn-submit:active { transform: translateY(0); }
.btn-submit:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; }
.btn-submit span {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-submit::after {
  content: '';
  position: absolute; top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
  transform: skewX(-20deg);
  animation: shimmer 4s 2s ease-in-out infinite;
}
@keyframes shimmer { 0%{left:-100%} 40%,100%{left:160%} }

.spinner-ring {
  display: none; position: absolute;
  top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 22px; height: 22px;
}
.btn-submit.loading .spinner-ring { display: block; }
.btn-submit.loading span { opacity: 0; }
.spinner-ring svg { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Back link ─── */
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-muted);
  text-decoration: none; margin-bottom: 28px;
  transition: color var(--transition);
  font-family: var(--font-mono); letter-spacing: 0.02em;
  animation: fadeUp 0.5s 0.2s both;
}
.back-link:hover { color: var(--cyan); }
.back-link i { font-size: 14px; transition: transform var(--transition); }
.back-link:hover i { transform: translateX(-3px); }

/* ─── Login back row ─── */
.login-back {
  text-align: center; margin-top: 24px;
  font-size: 13px; color: var(--text-muted);
}
.login-back a {
  color: var(--cyan); text-decoration: none;
  font-weight: 600; transition: color var(--transition);
}
.login-back a:hover { color: #fff; }

.sys-info {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--text-muted); text-align: center;
  margin-top: 10px; letter-spacing: 0.06em;
}
.sys-info span { color: var(--cyan); opacity: 0.7; }

/* ─── Progress dots ─── */
.progress-dots {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; margin-bottom: 32px;
  animation: fadeUp 0.5s 0.24s both;
}
.pdot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(0,200,255,0.15);
  border: 1px solid rgba(0,200,255,0.2);
  transition: all 0.35s cubic-bezier(0.34,1.56,0.64,1);
}
.pdot.active {
  width: 24px; border-radius: 4px;
  background: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 10px rgba(0,200,255,0.4);
}
.pdot.done {
  background: var(--success); border-color: var(--success);
}

/* ─── Entrance animation ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Responsive ─── */
@media (max-width: 991.98px) {
  .page-wrapper { align-items: flex-start; }
  .fp-card {
    height: auto; align-self: auto;
    border-radius: 18px;
  }
  .fp-card > .col-lg-5,
  .fp-card > .col-lg-7 { height: auto; }
  .form-panel  { overflow: visible; height: auto; }
  .form-scroll-area { overflow-y: visible; height: auto; padding: 36px 32px 40px; }
  .brand-panel {
    overflow: hidden; overflow-y: visible;
    padding: 28px 28px 24px;
    border-right: none; border-bottom: 1px solid var(--border-card);
  }
  .flow-steps { flex-direction: row; flex-wrap: wrap; gap: 0 20px; }
  .flow-item { flex: 1 1 45%; }
  .flow-item:not(:last-child)::after { display: none; }
  .security-note { display: none; }
}

@media (max-width: 575.98px) {
  .page-wrapper { padding: 12px 10px 32px; }
  .brand-panel  { padding: 22px 18px 20px; }
  .brand-headline h2 { font-size: 21px; }
  .form-scroll-area  { padding: 26px 20px 32px; }
  .fp-card { border-radius: 16px; }
  .flow-item { flex: 1 1 100%; }
  .otp-row { gap: 7px; }
  .otp-input { width: 44px; height: 54px; font-size: 20px; }
  .strength-checks { grid-template-columns: 1fr; }
}

@media (min-width: 992px) {
  .page-wrapper { align-items: center; }
}
@media (min-width: 1400px) {
  .fp-card { max-width: 1120px; }
}

/* Autofill */
input:-webkit-autofill, input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px rgba(0,30,60,0.9) inset;
  -webkit-text-fill-color: var(--text);
  transition: background-color 9999s ease;
}

/* Particles */
.particle {
  position: fixed; border-radius: 50%;
  pointer-events: none; z-index: 0;
  animation: floatUp linear infinite; opacity: 0;
}
@keyframes floatUp {
  0%  { transform: translateY(0) translateX(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 0.4; }
  100%{ transform: translateY(-100vh) translateX(var(--drift)); opacity: 0; }
}
