/*
 * sekolahpesat-form.css — Form app specific styling
 * Extension dari sekolahpesat-brand.css (loaded SETELAH brand CSS).
 *
 * Berisi:
 * 1. Public layout styles (.sp-public-*) untuk homepage, about, 404, error
 * 2. Form builder UI styles
 * 3. Public form rendering styles
 * 4. Microsite styles (Phase 4)
 */

/* ============ Form Public Layout (no header) ============ */

body.sp-form-public-body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f7f8fb;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: #1f2937;
}

.sp-form-public-main {
  flex: 1;
}

.sp-form-public-footer {
  background: transparent;
  margin-top: 2rem;
  border-top: 1px solid #e5e7eb;
}

/* ============ Microsite V2 (sesuai sekolahpesat.com/welcome/smk) ============ */

.ms-hero-v2 {
  position: relative;
  background: linear-gradient(135deg, var(--theme-from) 0%, var(--theme-to) 100%);
  color: #fff;
  padding: 4rem 1.5rem 6rem;
  text-align: center;
  overflow: hidden;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Grid/dot pattern overlay */
.ms-hero-pattern {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

/* Subtle vignette dari sisi atas */
.ms-hero-v2::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at top, rgba(255,255,255,0.08) 0%, transparent 60%),
    radial-gradient(ellipse at bottom, rgba(0,0,0,0.2) 0%, transparent 70%);
  pointer-events: none;
}

.ms-hero-inner-v2 {
  position: relative;
  z-index: 2;
  max-width: 820px;
  margin: 0 auto;
}

.ms-hero-logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 90px;
  height: 90px;
  background: rgba(255,255,255,0.95);
  border-radius: 50%;
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
  margin-bottom: 1.5rem;
  padding: 12px;
}

.ms-hero-logo-v2 {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ms-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #fff;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}

.ms-hero-badge-dot {
  width: 8px;
  height: 8px;
  background: #4ade80;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.3);
  animation: ms-pulse 1.5s ease-in-out infinite;
}

@keyframes ms-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

.ms-hero-title-v2 {
  font-size: clamp(2rem, 5.5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.ms-hero-subtitle-v2 {
  font-size: clamp(1rem, 2vw, 1.2rem);
  opacity: 0.92;
  margin-bottom: 2rem;
  font-weight: 400;
  line-height: 1.6;
}

.ms-hero-scroll-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.4);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border-radius: 999px;
  font-size: 0.95rem;
  transition: all 0.2s;
}

.ms-hero-scroll-btn:hover {
  background: rgba(255,255,255,0.25);
  color: #fff;
  transform: translateY(2px);
  text-decoration: none;
}

.ms-hero-scroll-btn iconify-icon {
  animation: ms-bounce-down 2s ease-in-out infinite;
}

@keyframes ms-bounce-down {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

.ms-hero-curve {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  width: 100%;
  height: 80px;
  z-index: 2;
}

/* ============ CTA Section V2 ============ */

.ms-cta-v2 {
  padding: 3.5rem 1rem;
  background: #f7f8fb;
}

.ms-section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 2.5rem;
}

.ms-section-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.ms-section-title-v2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  color: #1f2937;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.ms-section-subtitle-v2 {
  font-size: 1.05rem;
  color: #6b7280;
  line-height: 1.5;
  margin: 0;
}

.ms-cta-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 720px;
  margin: 0 auto;
}

.ms-cta-card-v2 {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem;
  border-radius: 18px;
  text-decoration: none;
  color: #fff;
  position: relative;
  overflow: hidden;
  transition: all 0.25s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.ms-cta-card-v2:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.12);
  color: #fff;
  text-decoration: none;
}

.ms-cta-wa-v2 {
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  border: 2px solid #16A34A;
}

.ms-cta-form-v2 {
  background: linear-gradient(135deg, var(--accent, #FF7A1A) 0%, var(--accent-dark, #C2410C) 100%);
  border: 2px solid var(--accent-dark, #C2410C);
}

.ms-cta-icon-v2 {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  flex-shrink: 0;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.ms-cta-icon-wa { color: #fff; }
.ms-cta-icon-form { color: #fff; }

.ms-cta-content-v2 {
  flex: 1;
  min-width: 0;
}

.ms-cta-content-v2 h6 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.ms-cta-content-v2 p {
  margin: 0;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.92);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.ms-cta-status {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  background: rgba(255,255,255,0.22);
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #fff;
}

.ms-cta-status-dot {
  width: 6px;
  height: 6px;
  background: #4ade80;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.4);
  animation: ms-pulse 1.5s ease-in-out infinite;
}

.ms-cta-arrow-v2 {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.ms-cta-card-v2:hover .ms-cta-arrow-v2 {
  transform: translateX(4px);
  background: rgba(255,255,255,0.28);
}

/* ============ Trust Badges V2 ============ */

.ms-trust-badges {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2.5rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.ms-trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.ms-trust-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}

.ms-trust-item span {
  font-size: 0.85rem;
  font-weight: 600;
  color: #4b5563;
}

/* ============ Help Text ============ */

.ms-help-text {
  margin-top: 2.5rem;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 30%);
  border: 1px solid #FCD34D;
  border-radius: 14px;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  font-size: 0.92rem;
  color: #78350F;
  line-height: 1.6;
}

.ms-help-text iconify-icon {
  font-size: 22px;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ============ About V2 ============ */

.ms-about-v2 {
  padding: 3rem 1rem;
  background: #fff;
}

.ms-section-text-v2 {
  color: #4b5563;
  font-size: 1.05rem;
  line-height: 1.75;
  margin: 0;
}

/* ============ Features V2 ============ */

.ms-features-v2 {
  padding: 3rem 1rem;
  background: #f7f8fb;
}

.ms-feature-card-v2 {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 1.75rem 1.5rem;
  text-align: center;
  height: 100%;
  transition: all 0.2s;
}

.ms-feature-card-v2:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

.ms-feature-icon-v2 {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  margin: 0 auto 1rem;
}

.ms-feature-card-v2 h6 {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  color: #1f2937;
}

.ms-feature-card-v2 p {
  color: #6b7280;
  font-size: 0.92rem;
  margin: 0;
  line-height: 1.55;
}

/* ============ Unit Cards V2 (untuk umbrella) ============ */

.ms-unit-card-v2 {
  display: block;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.25s;
  height: 100%;
}

.ms-unit-card-v2:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.08);
  border-color: var(--theme-solid, #d1d5db);
  text-decoration: none;
  color: inherit;
}

.ms-unit-badge-v2 {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 28px;
  margin-bottom: 1rem;
}

.ms-unit-card-v2 h6 {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  color: #1f2937;
  line-height: 1.3;
}

.ms-unit-subtitle-v2 {
  font-size: 0.85rem;
  color: #6b7280;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.ms-unit-cta-v2 {
  font-weight: 600;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* ============ Responsive ============ */

@media (max-width: 600px) {
  .ms-hero-v2 { padding: 3rem 1rem 5rem; min-height: 55vh; }
  .ms-hero-logo-wrap { width: 72px; height: 72px; margin-bottom: 1rem; }
  .ms-trust-badges { gap: 1.25rem; }
  .ms-cta-card-v2 { padding: 1.25rem; gap: 1rem; }
  .ms-cta-icon-v2 { width: 52px; height: 52px; font-size: 26px; }
  .ms-cta-content-v2 h6 { font-size: 1rem; }
  .ms-cta-arrow-v2 { width: 40px; height: 40px; font-size: 18px; }
  .ms-cta-status { font-size: 0.65rem; padding: 0.2rem 0.5rem; }
}

/* ============ Microsite (legacy v1, kept for backward compat) ============ */

.ms-hero {
  color: #fff;
  padding: 4rem 1.5rem 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.ms-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.12) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,0.08) 0%, transparent 50%);
  pointer-events: none;
}
.ms-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}
.ms-hero-image {
  height: 80px;
  width: auto;
  margin-bottom: 1.25rem;
}
.ms-hero-title {
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 800;
  margin-bottom: 0.75rem;
  line-height: 1.15;
}
.ms-hero-subtitle {
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  opacity: 0.92;
  margin: 0;
  font-weight: 400;
  line-height: 1.6;
}

.ms-cta { padding: 2.5rem 1rem; }

.ms-cta-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.ms-cta-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  border-color: #d1d5db;
  text-decoration: none;
  color: inherit;
}
.ms-cta-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}
.ms-cta-text { flex: 1; min-width: 0; }
.ms-cta-text h6 {
  font-weight: 700;
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  color: #1f2937;
}
.ms-cta-text p {
  margin: 0;
  font-size: 0.85rem;
  color: #6b7280;
}
.ms-cta-arrow {
  font-size: 20px;
  color: #9ca3af;
  transition: transform 0.2s;
}
.ms-cta-card:hover .ms-cta-arrow {
  transform: translateX(4px);
  color: #1f2937;
}

.ms-units, .ms-about, .ms-features, .ms-badges {
  padding: 2.5rem 1rem;
}
.ms-section-title {
  font-size: 1.75rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.5rem;
  color: #1f2937;
}
.ms-section-subtitle {
  text-align: center;
  color: #6b7280;
  margin-bottom: 1rem;
}
.ms-section-text {
  color: #4b5563;
  font-size: 1.05rem;
  line-height: 1.7;
}

.ms-unit-card {
  display: block;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
  height: 100%;
}
.ms-unit-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  border-color: var(--theme-solid, #d1d5db);
  text-decoration: none;
  color: inherit;
}
.ms-unit-badge {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 28px;
  margin-bottom: 1rem;
}
.ms-unit-card h6 {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  color: #1f2937;
}
.ms-unit-subtitle {
  font-size: 0.85rem;
  color: #6b7280;
  margin-bottom: 1rem;
  line-height: 1.5;
}
.ms-unit-cta {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--theme-solid, #1A3A6E);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.ms-feature-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  height: 100%;
}
.ms-feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 1rem;
}
.ms-feature-card h6 {
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.ms-feature-card p {
  color: #6b7280;
  font-size: 0.92rem;
  margin: 0;
  line-height: 1.5;
}

.ms-badges {
  background: #fff;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}
.ms-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  background: #f3f4f6;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  color: #4b5563;
}
.ms-badge iconify-icon {
  color: #16a34a;
  font-size: 18px;
}

.ms-final-cta {
  color: #fff;
  padding: 3rem 1.5rem;
  margin-top: 2rem;
}
.ms-final-cta-title {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.ms-final-cta-subtitle {
  opacity: 0.9;
  font-size: 1.05rem;
  margin-bottom: 0;
}

/* ============ Public Layout (with header) ============ */

body.sp-public-body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f7f8fb;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: #1f2937;
}

.sp-public-main {
  flex: 1;
}

.sp-public-header {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 100;
}

.sp-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.sp-public-nav a.sp-nav-link {
  color: #4b5563;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.15s;
}

.sp-public-nav a.sp-nav-link:hover {
  color: #1A3A6E;
}

.sp-public-nav .sp-nav-cta {
  padding: 0.4rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #2563eb !important;
  border-color: #2563eb !important;
}

.sp-public-nav .sp-nav-cta:hover {
  background: #1d4ed8 !important;
  border-color: #1d4ed8 !important;
}

.sp-public-footer {
  background: #fff;
  border-top: 1px solid #e5e7eb;
  margin-top: 3rem;
}

/* ============ Hero ============ */

.sp-hero {
  background: linear-gradient(135deg, #1A3A6E 0%, #122a52 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.sp-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 60%;
  height: 200%;
  background: radial-gradient(circle, #FF7A1A 0%, transparent 70%);
  opacity: 0.08;
  pointer-events: none;
}

.sp-hero-badge {
  display: inline-block;
  background: rgba(255, 122, 26, 0.2);
  color: #ff944a;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid rgba(255, 122, 26, 0.4);
}

.sp-hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.sp-hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  opacity: 0.85;
  max-width: 720px;
  margin: 0 auto;
}

/* ============ Sections ============ */

.sp-section {
  padding: 3rem 0;
}

.sp-section-alt {
  background: #fff;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}

/* ============ Feature card (public) ============ */

.sp-feature-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 2rem;
  height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sp-feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 6px rgba(0,0,0,0.05), 0 2px 4px rgba(0,0,0,0.04);
}

.sp-feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1;
}

.sp-feature-card h5 {
  font-weight: 700;
  margin-bottom: 0.75rem;
}

/* ============ Roadmap ============ */

.sp-roadmap {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.sp-roadmap-item {
  display: flex;
  gap: 1.5rem;
  padding-bottom: 2rem;
  position: relative;
}

.sp-roadmap-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 19px;
  top: 40px;
  bottom: 0;
  width: 2px;
  background: #e5e7eb;
}

.sp-roadmap-marker {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f7f8fb;
  border: 2px solid #e5e7eb;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  z-index: 1;
}

.sp-roadmap-item.done .sp-roadmap-marker {
  background: #1A3A6E;
  border-color: #1A3A6E;
  color: #fff;
}

.sp-roadmap-content {
  flex: 1;
  padding-top: 0.25rem;
}

.sp-roadmap-content h5 {
  margin-bottom: 0.25rem;
  font-weight: 600;
}

/* ============ Toggle Switch — Clean override (no double-circle) ============ */

/* Hide native checkbox completely, build switch from scratch */
.form-check.form-switch {
  padding-left: 0;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.form-check.form-switch .form-check-input {
  /* Strip Bootstrap default styling */
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;

  /* Track */
  position: relative;
  width: 2.4rem !important;
  height: 1.35rem !important;
  margin: 0 !important;
  background-color: #cbd5e1 !important;
  /* Knob = lingkaran putih via BACKGROUND-IMAGE (SVG), BUKAN ::before.
     ::before tidak ter-render di <input> pada Chrome/Safari → knob hilang
     saat OFF. background-image reliable di semua browser (cara Bootstrap). */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='13' r='10' fill='%23000000' opacity='0.12'/%3E%3Ccircle cx='12' cy='12' r='10' fill='%23ffffff'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: left 0.18rem center !important;
  background-size: 1.05rem 1.05rem !important;
  border: none !important;
  border-radius: 999px !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08) !important;
  transition: background-color 0.18s ease, background-position 0.18s cubic-bezier(0.4, 0, 0.2, 1) !important;
  cursor: pointer;
  flex-shrink: 0;
}

/* Matikan knob ::before dari style.css/brand.css (kalau browser render-nya,
   mis. Firefox) → cegah dobel knob. Knob resmi = background-image di atas. */
.form-check.form-switch .form-check-input::before {
  display: none !important;
  content: none !important;
}

.form-check.form-switch .form-check-input:hover {
  background-color: #94a3b8 !important;
}

.form-check.form-switch .form-check-input:checked {
  background-color: #1A3A6E !important;
  /* knob geser ke kanan (image tetap, cuma posisi) */
  background-position: right 0.18rem center !important;
}

.form-check.form-switch .form-check-input:checked:hover {
  background-color: #122a52 !important;
}

.form-check.form-switch .form-check-input:checked:hover {
  background-color: #122a52 !important;
}

.form-check.form-switch .form-check-input:focus {
  outline: none !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08), 0 0 0 3px rgba(26, 58, 110, 0.2) !important;
  border: none !important;
}

.form-check.form-switch .form-check-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.form-check.form-switch .form-check-label {
  cursor: pointer;
  user-select: none;
  font-size: 0.92rem;
  color: #1f2937;
  margin: 0;
}

/* ============ Builder Layout (Full-screen 3-column) ============ */

body.builder-body {
  margin: 0;
  background: #f7f8fb;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  overflow: hidden;
  height: 100vh;
}

.builder-shell {
  display: grid;
  grid-template-rows: 60px 1fr;
  height: 100vh;
}

.builder-topbar {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 100;
}

.builder-topbar .topbar-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #4b5563;
  text-decoration: none;
  font-size: 0.9rem;
  padding-right: 1rem;
  border-right: 1px solid #e5e7eb;
}

.builder-topbar .topbar-back:hover {
  color: #1A3A6E;
}

.builder-topbar .topbar-form-info {
  flex: 1;
  min-width: 0;
}

.builder-topbar .form-title-edit {
  font-weight: 600;
  font-size: 1rem;
  border: none;
  outline: none;
  padding: 4px 8px;
  border-radius: 4px;
  margin-left: -8px;
  width: auto;
  min-width: 100px;
  max-width: 400px;
  background: transparent;
}

.builder-topbar .form-title-edit:hover {
  background: #f3f4f6;
}

.builder-topbar .form-title-edit:focus {
  background: #f3f4f6;
  outline: 2px solid #1A3A6E;
}

.builder-topbar .form-url {
  font-size: 0.78rem;
  color: #6b7280;
  font-family: 'SF Mono', Menlo, monospace;
  margin-top: 2px;
}

.builder-topbar .topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.builder-main {
  display: grid;
  grid-template-columns: 260px 1fr 320px;
  height: calc(100vh - 60px);
  overflow: hidden;
}

@media (max-width: 1100px) {
  .builder-main {
    grid-template-columns: 220px 1fr 280px;
  }
}

/* ===== Left Sidebar: Field Library ===== */

.builder-sidebar {
  background: #fff;
  border-right: 1px solid #e5e7eb;
  overflow-y: auto;
  padding: 1.25rem 1rem;
}

.builder-sidebar h6 {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #6b7280;
  letter-spacing: 0.04em;
  margin: 1rem 0 0.5rem;
}

.builder-sidebar h6:first-child {
  margin-top: 0;
}

.builder-sidebar .field-library-hint {
  font-size: 0.8rem;
  color: #9ca3af;
  margin-bottom: 1rem;
}

.field-type-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-size: 0.9rem;
  color: #1f2937;
  margin-bottom: 2px;
  transition: all 0.12s;
}
/* Deskripsi field tampil inline (subtitle) — sebelumnya tooltip ke-clip sidebar */
.field-type-btn { align-items: flex-start; }
.field-type-btn > iconify-icon { margin-top: 2px; flex-shrink: 0; }
.field-type-btn .ftb-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.field-type-btn .ftb-desc { font-size: 11px; color: #94a3b8; font-weight: 400; white-space: normal; margin-top: 1px; }

.field-type-btn:hover {
  background: #f3f4f6;
  border-color: #e5e7eb;
}

.field-type-btn iconify-icon {
  font-size: 18px;
  color: #6b7280;
  flex-shrink: 0;
}

.field-type-btn[data-type-group="primary"] iconify-icon { color: #1A3A6E; }
.field-type-btn[data-type-group="success"] iconify-icon { color: #16a34a; }
.field-type-btn[data-type-group="warning"] iconify-icon { color: #FF7A1A; }
.field-type-btn[data-type-group="info"] iconify-icon { color: #0EA5E9; }

/* ===== Center Canvas ===== */

.builder-canvas {
  overflow-y: auto;
  padding: 2rem 1.5rem;
  background: #f7f8fb;
}

.builder-canvas-inner {
  max-width: 720px;
  margin: 0 auto;
}

.step-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.step-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  color: #4b5563;
  transition: all 0.15s;
}

.step-tab:hover {
  border-color: #FF7A1A;
  color: #1A3A6E;
}

.step-tab.active {
  background: #FFEDD5;
  border-color: #FF7A1A;
  color: #C2410C;
  font-weight: 600;
}

.step-tab-add {
  background: transparent;
  border: 1px dashed #d1d5db;
  color: #6b7280;
}

.step-tab-add:hover {
  background: #fff;
  border-style: solid;
}

.step-section {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.5rem;
}

.step-section-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #f3f4f6;
}

.step-section-title-edit {
  background: transparent;
  border: none;
  outline: none;
  font-size: 1.25rem;
  font-weight: 700;
  width: 100%;
  padding: 4px 8px;
  border-radius: 4px;
  margin-left: -8px;
}

.step-section-title-edit:hover {
  background: #f3f4f6;
}

.step-section-title-edit:focus {
  background: #f3f4f6;
  outline: 2px solid #1A3A6E;
}

.canvas-fields {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 60px;
}

.canvas-fields-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: #9ca3af;
  font-size: 0.9rem;
  background: #fafbfc;
  border: 2px dashed #e5e7eb;
  border-radius: 8px;
}

/* ===== Field Card di Canvas ===== */

.field-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.75rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  transition: all 0.12s;
}

.field-card:hover {
  border-color: #d1d5db;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.field-card.active {
  border-color: #FF7A1A;
  background: #FFFBEB;
  box-shadow: 0 0 0 3px rgba(255, 122, 26, 0.12);
}

.field-card.sortable-ghost {
  opacity: 0.4;
  background: #f3f4f6;
}

.field-card .drag-handle {
  cursor: grab;
  color: #d1d5db;
  flex-shrink: 0;
  padding: 2px;
}

.field-card .drag-handle:active {
  cursor: grabbing;
}

.field-card.active .drag-handle {
  color: #FF7A1A;
}

.field-card .type-icon {
  font-size: 18px;
  color: #6b7280;
  flex-shrink: 0;
}

.field-card .field-info {
  flex: 1;
  min-width: 0;
}

.field-card .field-label {
  font-weight: 600;
  font-size: 0.92rem;
  color: #1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.field-card .field-meta {
  font-size: 0.75rem;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1px;
}

.field-card .type-label {
  text-transform: capitalize;
}

.field-card .key-chip {
  background: #f3f4f6;
  padding: 1px 6px;
  border-radius: 4px;
  font-family: 'SF Mono', Menlo, monospace;
  font-size: 0.7rem;
}

.field-card .field-actions {
  display: flex;
  gap: 0.15rem;
  opacity: 0;
  transition: opacity 0.15s;
}

.field-card:hover .field-actions,
.field-card.active .field-actions {
  opacity: 1;
}

.field-card .action-btn {
  background: transparent;
  border: none;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  cursor: pointer;
  color: #9ca3af;
}

.field-card .action-btn:hover {
  background: #f3f4f6;
  color: #1f2937;
}

.field-card .action-btn.danger:hover {
  background: #fee2e2;
  color: #dc2626;
}

/* Display-only fields look different */
.field-card[data-type="heading"] .field-label {
  font-size: 1.05rem;
}

.field-card[data-type="divider"] .field-info::after {
  content: '';
  display: block;
  border-top: 1px solid #e5e7eb;
  margin-top: 4px;
}

/* ===== Right Inspector ===== */

.builder-inspector {
  background: #fff;
  border-left: 1px solid #e5e7eb;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.inspector-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f3f4f6;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 10;
}

.inspector-header .header-icon {
  width: 32px;
  height: 32px;
  background: #FFEDD5;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FF7A1A;
  flex-shrink: 0;
}

.inspector-header .header-text {
  flex: 1;
  min-width: 0;
}

.inspector-header .header-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0;
}

.inspector-header .header-subtitle {
  font-size: 0.78rem;
  color: #6b7280;
}

.inspector-header .header-close {
  background: transparent;
  border: none;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  cursor: pointer;
  color: #9ca3af;
}

.inspector-header .header-close:hover {
  background: #f3f4f6;
  color: #1f2937;
}

.inspector-body {
  padding: 1rem 1.25rem;
  flex: 1;
}

.inspector-body .form-label {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: #374151;
}

.inspector-body .form-control,
.inspector-body .form-select {
  font-size: 0.88rem;
}

.inspector-body small.text-secondary-light {
  font-size: 0.75rem;
}

.inspector-empty {
  padding: 2.5rem 1.25rem;
  text-align: center;
  color: #9ca3af;
}

.inspector-empty iconify-icon {
  font-size: 48px;
  margin-bottom: 0.5rem;
  color: #d1d5db;
}

/* Toast (re-styled for builder) */
.builder-toast {
  position: fixed;
  top: 70px;
  right: 16px;
  z-index: 9999;
  min-width: 220px;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  background: #1A3A6E;
  color: #fff;
  font-size: 0.85rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.builder-toast.success { background: #16a34a; }
.builder-toast.danger  { background: #dc2626; }

/* ===== Mobile / Responsive ===== */

/* FAB & backdrop drawer builder — hanya tampil di mobile (default disembunyikan) */
.builder-mobile-fab,
.builder-mobile-backdrop { display: none; }

@media (max-width: 900px) {
  .builder-main {
    grid-template-columns: 1fr;
  }
  .builder-sidebar,
  .builder-inspector {
    display: none;
  }
  .builder-sidebar.mobile-open,
  .builder-inspector.mobile-open {
    display: block;
    position: fixed;
    top: 60px;
    bottom: 0;
    width: 85%;
    max-width: 320px;
    z-index: 200;
    background: #fff;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 84px; /* ruang untuk FAB bar */
    box-shadow: 0 0 28px rgba(0,0,0,0.25);
  }
  .builder-sidebar.mobile-open { left: 0; }
  .builder-inspector.mobile-open { right: 0; }

  /* FAB bar bawah: tombol buka Field Library & Inspector */
  .builder-mobile-fab {
    display: flex;
    gap: 10px;
    justify-content: center;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 210;
    padding: 10px 12px;
    background: rgba(255,255,255,0.97);
    border-top: 1px solid #e5e7eb;
  }
  [data-theme="dark"] .builder-mobile-fab { background: rgba(15,23,42,0.97); border-top-color: #1f2937; }

  /* Backdrop gelap saat drawer terbuka */
  .builder-mobile-backdrop.show {
    display: block;
    position: fixed;
    inset: 60px 0 0 0;
    background: rgba(0,0,0,0.45);
    z-index: 199;
  }
}

/* ============ Public Form: Hero V2 (match microsite style) ============ */

.sp-fhero {
  position: relative;
  background: linear-gradient(135deg, var(--theme-from, #FF7A1A) 0%, var(--theme-to, #EA580C) 100%);
  color: #fff;
  padding: 1.1rem 1.25rem 3.25rem; /* lebih kompak — title kecil + extra space wave */
  text-align: center;
  overflow: hidden;
}

@media (min-width: 768px) {
  .sp-fhero {
    padding: 1.5rem 1.5rem 3.75rem;
  }
}

.sp-fhero-pattern {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

.sp-fhero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at top, rgba(255,255,255,0.08) 0%, transparent 60%),
    radial-gradient(ellipse at bottom, rgba(0,0,0,0.15) 0%, transparent 70%);
  pointer-events: none;
}

.sp-fhero-inner {
  position: relative;
  z-index: 2;
  max-width: 720px;
  margin: 0 auto;
}

.sp-fhero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.32);
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #fff;
  margin-bottom: 0.7rem;
  text-transform: uppercase;
}

.sp-fhero-badge-dot {
  width: 7px;
  height: 7px;
  background: #4ade80;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.3);
  animation: ms-pulse 1.5s ease-in-out infinite;
}

/* PENTING: pakai !important untuk override Bootstrap default h1 (calc(1.375rem+1.5vw)
   sekitar 2.5rem desktop) yang dominasi dengan specificity sama (`.h1, h1`).
   Plus paksa color #fff supaya tidak inherit warna gelap dari WowDash reset. */
.sp-fhero-title {
  color: #fff !important;
  font-size: 1.15rem !important;     /* mobile default ~18.4px */
  font-weight: 800 !important;
  line-height: 1.25 !important;
  margin: 0 auto 0.5rem !important;
  letter-spacing: -0.01em;
  max-width: 820px;
  text-wrap: balance;
}

@media (min-width: 600px) {
  .sp-fhero-title {
    font-size: 1.55rem !important;   /* tablet ~24.8px */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
@media (min-width: 900px) {
  .sp-fhero-title { font-size: 1.9rem !important; }    /* desktop ~30.4px */
}
@media (min-width: 1200px) {
  .sp-fhero-title { font-size: 2.15rem !important; }   /* large ~34.4px */
}

.sp-fhero-subtitle {
  font-size: 0.82rem;            /* mobile default */
  opacity: 0.94;
  margin: 0 auto;
  line-height: 1.55;
  font-weight: 400;
  max-width: 720px;              /* lebih lega untuk subtitle multi-line */
  /* Preserve newline \n di description sebagai line break di render.
     Pakai pre-line: newline → <br>, whitespace lain collapsed normal. */
  white-space: pre-line;
}

@media (min-width: 900px) { .sp-fhero-subtitle { font-size: 0.92rem; max-width: 780px; } }

/* Decorative wave bottom — smooth, low-profile transition ke form area */
.sp-fhero-wave {
  position: absolute;
  bottom: -1px; /* hindari hairline gap akibat browser rounding */
  left: 0;
  right: 0;
  width: 100%;
  height: 48px;
  display: block;
  pointer-events: none;
  z-index: 1;
}

@media (min-width: 768px) {
  .sp-fhero-wave { height: 60px; }
}

/* ============ Public Form: Stepper Card (replaces progress card) ============ */

.sp-stepper-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 1.25rem 1.25rem 1rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 20px rgba(17, 24, 39, 0.05);
}

/* Stepper dots list — visible di >=720px, hidden di mobile (pakai pill + progress) */
.sp-stepper-list {
  display: none;
  list-style: none;
  padding: 0;
  margin: 0 0 0.85rem;
  gap: 0;
  align-items: flex-start;
}

@media (min-width: 720px) {
  .sp-stepper-list { display: flex; }
}

.sp-stepper-item {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  text-align: center;
}

/* Connecting line antar dot */
.sp-stepper-item:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 15px; /* tengah dot 32px = 16; -1 supaya line align baseline tengah */
  left: calc(50% + 20px);
  right: calc(-50% + 20px);
  height: 2px;
  background: #e5e7eb;
  z-index: 0;
}

.sp-stepper-item.is-done:not(:last-child)::after {
  background: var(--theme-solid, #FF7A1A);
}

.sp-stepper-dot {
  position: relative;
  z-index: 1;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #e5e7eb;
  color: #9ca3af;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.sp-stepper-item.is-active .sp-stepper-dot {
  background: var(--theme-solid, #FF7A1A);
  border-color: var(--theme-solid, #FF7A1A);
  color: #fff;
  box-shadow: 0 0 0 5px rgba(255, 122, 26, 0.18);
  transform: scale(1.08);
}

/* Done state: tampilkan checkmark ✓ (lebih jelas "selesai" daripada hanya
   ganti warna). Pakai CSS pseudo-element (BUKAN iconify) + sembunyikan angka —
   reliable, tidak kena masalah iconify web-component. */
.sp-stepper-item.is-done .sp-stepper-dot {
  background: var(--theme-solid, #FF7A1A);
  border-color: var(--theme-solid, #FF7A1A);
  color: #fff;
}
.sp-stepper-item.is-done .sp-stepper-num { display: none; }
.sp-stepper-item.is-done .sp-stepper-dot::after {
  content: '✓';
  color: #fff;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
  animation: spStepCheck 280ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes spStepCheck {
  0% { transform: scale(0.4); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.sp-stepper-item.is-pending .sp-stepper-dot {
  background: #fff;
  border-color: #e5e7eb;
  color: #9ca3af;
}

.sp-stepper-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: #6b7280;
  line-height: 1.3;
  padding: 0 4px;
  /* Wrap maks 2 baris dengan ellipsis di line ke-2 — supaya label panjang
     seperti "Unit Tujuan & Sekolah Asal" atau "Pembayaran & Konfirmasi"
     tidak terpotong di tengah kata. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.sp-stepper-item.is-active .sp-stepper-label {
  color: var(--theme-solid, #FF7A1A);
  font-weight: 700;
}

.sp-stepper-item.is-done .sp-stepper-label {
  color: #1f2937;
}

/* Meta row: pill + progress bar (selalu visible — di mobile = satu-satunya indikator) */
.sp-stepper-meta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding-top: 0.4rem;
}

.sp-stepper-pill {
  font-size: 0.78rem;
  font-weight: 600;
  color: #4b5563;
  white-space: nowrap;
  padding: 0.3rem 0.75rem;
  background: #f3f4f6;
  border-radius: 999px;
}

.sp-stepper-pill strong {
  color: var(--theme-solid, #FF7A1A);
  font-weight: 800;
}

.sp-stepper-progress {
  flex: 1;
  height: 6px;
  background: #f3f4f6;
  border-radius: 999px;
  overflow: hidden;
}

.sp-stepper-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--theme-from, #FF7A1A) 0%, var(--theme-to, #FB923C) 100%);
  border-radius: 999px;
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============ Public Form: Progress Bar (legacy, kept untuk backward-compat) ============ */

.sp-progress-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.sp-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.sp-progress-label { font-size: 0.85rem; font-weight: 600; color: #6b7280; }
.sp-progress-count { font-size: 0.85rem; font-weight: 700; color: var(--theme-solid, #FF7A1A); }
.sp-progress-bar { height: 6px; background: #f3f4f6; border-radius: 999px; overflow: hidden; }
.sp-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--theme-from, #FF7A1A) 0%, var(--theme-to, #FB923C) 100%);
  border-radius: 999px;
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============ Public Form: Resume Banner ============ */

.sp-resume-banner {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.sp-resume-banner-icon {
  width: 40px;
  height: 40px;
  background: #DBEAFE;
  color: #2563eb;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 22px;
}

.sp-resume-banner-content {
  flex: 1;
  min-width: 0;
}

.sp-resume-banner-title {
  font-weight: 700;
  color: #1e3a8a;
  font-size: 1rem;
  margin: 0 0 0.25rem;
}

.sp-resume-banner-text {
  color: #1e40af;
  font-size: 0.88rem;
  margin: 0 0 0.75rem;
}

.sp-resume-banner-close {
  background: transparent;
  border: none;
  color: #6b7280;
  cursor: pointer;
  padding: 4px;
  font-size: 18px;
  flex-shrink: 0;
}

.sp-resume-banner-close:hover {
  color: #1f2937;
}

/* ============ Public Form Rendering ============ */

.sp-public-form-container {
  max-width: 760px;
  margin: 2rem auto;
  padding: 0 1.25rem;
  position: relative;
  z-index: 2;
}

/* Modifier: "lifted" — angkat ke atas supaya overlap dengan hero wave bottom.
   Pakai negative margin proporsional dengan padding-bottom hero & tinggi wave. */
.sp-public-form-container--lifted {
  margin-top: -2.5rem;
}

@media (min-width: 768px) {
  .sp-public-form-container--lifted {
    margin-top: -3rem;
  }
}

.sp-form-card {
  background: #fff;
  border: 1px solid #eef0f3;
  border-radius: 16px;
  padding: 2.5rem 2.25rem;
  box-shadow:
    0 1px 3px rgba(17, 24, 39, 0.04),
    0 12px 32px -8px rgba(17, 24, 39, 0.08);
}

.sp-form-step-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--theme-solid, #FF7A1A);
  margin-bottom: 0.4rem;
}

/* Step title (h2) — 2x lebih besar per user request. Force dengan !important
   supaya tidak ke-override Bootstrap default h2 atau WowDash rules. */
.sp-form-step-title {
  font-size: 1.55rem !important;     /* mobile ~25px — diperkecil dari 1.9 supaya
                                        tidak dorong field pertama ke bawah layar */
  font-weight: 800 !important;
  color: #111827 !important;
  margin: 0 0 1.5rem !important;
  padding-bottom: 0.95rem !important;
  border-bottom: 1px solid #f3f4f6;
  letter-spacing: -0.02em;
  line-height: 1.2 !important;
}

@media (min-width: 600px) {
  .sp-form-step-title { font-size: 1.85rem !important; } /* tablet ~30px */
}

@media (min-width: 900px) {
  .sp-form-step-title { font-size: 2.1rem !important; }  /* desktop ~34px */
}

.sp-form-card .form-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: #1A3A6E;
  line-height: 1.2;
}

.sp-form-card .form-description {
  color: #6b7280;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* Field wrapper — more breathing room */
.sp-form-field {
  margin-bottom: 1.5rem;
}

.sp-form-field > label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #111827;
  font-size: 0.95rem;
  line-height: 1.4;
}

.sp-form-field > label .required-mark {
  color: #dc2626;
  margin-left: 4px;
  font-weight: 700;
}

.sp-form-field .helper-text {
  font-size: 0.825rem;
  color: #6b7280;
  margin-top: -0.25rem;
  margin-bottom: 0.65rem;
  line-height: 1.5;
}

/* Input fields — taller, more modern */
.sp-form-field .form-control,
.sp-form-field .form-select {
  padding: 0.78rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 0.95rem;
  background: #fff;
  color: #111827;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  height: auto;
  line-height: 1.45;
  width: 100%;
}

.sp-form-field .form-control:hover:not(:focus),
.sp-form-field .form-select:hover:not(:focus) {
  border-color: #9ca3af;
}

.sp-form-field .form-control:focus,
.sp-form-field .form-select:focus {
  border-color: var(--theme-solid, #1A3A6E);
  box-shadow: 0 0 0 4px rgba(26, 58, 110, 0.12);
  outline: none;
}

.sp-form-field .form-control::placeholder {
  color: #9ca3af;
}

.sp-form-field .form-control.is-invalid,
.sp-form-field .form-select.is-invalid {
  border-color: #dc2626;
  background: #fef2f2;
}

.sp-form-field .form-control.is-invalid:focus,
.sp-form-field .form-select.is-invalid:focus {
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.14);
}

/* Textarea: minimum height */
.sp-form-field textarea.form-control {
  min-height: 90px;
  resize: vertical;
}

/* Locked / readonly: visual cue field di-prefill dari link & tidak bisa diubah */
.sp-form-field .form-control[readonly],
.sp-form-field .form-control.sp-locked {
  background: #f9fafb;
  color: #4b5563;
  cursor: not-allowed;
  border-color: #d1d5db;
}

.sp-form-field .form-control[readonly]:focus,
.sp-form-field .form-control.sp-locked:focus {
  border-color: #d1d5db;
  box-shadow: none;
  outline: none;
}

/* Radio & Checkbox as Card — taller, more clickable, dengan custom indicator */
.sp-form-field .sp-option-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.95rem 1.05rem;   /* +tinggi sedikit → tap target lebih ramah */
  min-height: 48px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  cursor: pointer;
  /* Scope transition ke properti spesifik (bukan `all`) → hindari jank
     karena `all` ikut animasikan layout props. */
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
  margin-bottom: 0.55rem;
  background: #fff;
  user-select: none;
}

.sp-form-field .sp-option-card:hover {
  border-color: var(--theme-solid, #93c5fd);
  background: #fafbfc;
}

/* Hide native radio/checkbox secara visual — replaced by .option-indicator
   custom yang konsisten cross-browser. Keep accessible (focusable via
   keyboard tab → label-nya juga focus, native input tetap di DOM). */
.sp-form-field .sp-option-card input[type="radio"],
.sp-form-field .sp-option-card input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

/* Custom indicator: kotak/lingkaran di kiri label */
.sp-form-field .sp-option-card .option-indicator {
  width: 20px;
  height: 20px;
  border: 1.5px solid #d1d5db;
  background: #fff;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

/* Radio: lingkaran. Checkbox: square rounded. */
.sp-form-field .sp-option-card:has(input[type="radio"]) .option-indicator {
  border-radius: 50%;
}
.sp-form-field .sp-option-card:has(input[type="checkbox"]) .option-indicator {
  border-radius: 5px;
}

.sp-form-field .sp-option-card .option-label {
  font-size: 0.94rem;
  color: #1f2937;
  margin: 0;
  cursor: pointer;
  flex: 1;
  line-height: 1.4;
}

/* Selected state: highlight card + filled indicator + checkmark inside */
.sp-form-field .sp-option-card:has(input:checked) {
  border-color: var(--theme-solid, #2563eb);
  background: #fff7ed; /* light theme tint */
}

.sp-form-field .sp-option-card:has(input:checked) .option-indicator {
  background: var(--theme-solid, #FF7A1A);
  border-color: var(--theme-solid, #FF7A1A);
}

.sp-form-field .sp-option-card:has(input:checked) .option-indicator::after {
  content: '';
  width: 11px;
  height: 11px;
  /* SVG check icon inline (theme-agnostic — white untuk kontras vs filled bg) */
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'%3E%3Cpath d='M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  display: block;
}

.sp-form-field .sp-option-card:has(input:checked) .option-label {
  color: var(--theme-dark, #1e40af);
  font-weight: 600;
}

/* Focus state untuk a11y — outline pada card saat input focused */
.sp-form-field .sp-option-card:has(input:focus-visible) {
  outline: 3px solid rgba(26, 58, 110, 0.4);
  outline-offset: 2px;
}

/* Form heading (h3 display-only) — force smaller dengan !important.
   Tanpa !important, Bootstrap h3 (~1.75rem) atau WowDash override
   bikin section heading sangat besar (60-80px di desktop). */
.sp-form-card .form-heading {
  font-size: 0.78rem !important;     /* mobile ~12.5px */
  font-weight: 700 !important;
  margin: 1.5rem 0 0.85rem !important;
  color: #111827 !important;
  padding-bottom: 0.3rem !important;
  border-bottom: 2px solid var(--theme-solid, #FF7A1A);
  display: inline-block;
  letter-spacing: 0.02em;
  line-height: 1.3 !important;
  text-transform: uppercase;          /* lebih jelas sebagai section divider */
}

.sp-form-card .form-heading:first-child {
  margin-top: 0 !important;
}

@media (min-width: 900px) {
  .sp-form-card .form-heading {
    font-size: 0.85rem !important;    /* desktop ~13.6px */
  }
}

.sp-form-card .form-paragraph {
  color: #4b5563;
  line-height: 1.6;
  margin-bottom: 1rem;
  padding: 0.95rem 1.15rem;
  background: #f9fafb;
  border-left: 3px solid var(--theme-solid, #FF7A1A);
  border-radius: 0 8px 8px 0;
}

.sp-form-card .form-divider {
  margin: 1.75rem 0;
  border: none;
  border-top: 1px dashed #e5e7eb;
}

/* Navigation buttons */
.sp-form-nav {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #f3f4f6;
}

.sp-form-nav .btn {
  padding: 0.7rem 1.5rem;
  min-height: 48px;            /* tap target ramah jempol (≥44px Apple HIG) */
  font-weight: 600;
  border-radius: 8px;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.sp-btn-back {
  background: #fff;
  color: #4b5563;
  border: 1px solid #d1d5db;
}

.sp-btn-back:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.sp-btn-next,
.sp-btn-submit {
  background: linear-gradient(135deg, #FF7A1A 0%, #EA580C 100%);
  color: #fff;
  border: none;
  box-shadow: 0 1px 2px rgba(234, 88, 12, 0.2);
}

.sp-btn-next:hover,
.sp-btn-submit:hover {
  background: linear-gradient(135deg, #EA580C 0%, #C2410C 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(234, 88, 12, 0.25);
  color: #fff;
}

.sp-btn-next:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ============ Utilities ============ */

.text-navy { color: #1A3A6E !important; }
.text-orange { color: #FF7A1A !important; }
.bg-navy { background-color: #1A3A6E !important; }
.bg-orange { background-color: #FF7A1A !important; }

/* ============ Responsive ============ */

@media (max-width: 768px) {
  .sp-form-card {
    padding: 1.5rem 1.25rem;
    margin: 0;
    border-radius: 14px;
  }
  .sp-form-card .form-heading {
    font-size: 0.88rem;
    margin: 1.5rem 0 0.75rem;
  }
  /* ANTI iOS ZOOM: input <16px bikin Safari auto-zoom + geser layout tiap
     field di-tap. Paksa ≥16px di semua input form publik. */
  .sp-public-form-container input,
  .sp-public-form-container select,
  .sp-public-form-container textarea,
  .sp-public-form-container .ts-control,
  .sp-public-form-container .ts-control input {
    font-size: 16px !important;
  }
  /* Tap target lebih besar untuk tombol kecil (Edit di review, resume) */
  .sp-review-edit-btn,
  .sp-resume-banner-content .btn {
    min-height: 40px;
    padding: 0.5rem 0.9rem;
  }
}

/* Tombol nav: di mobile sempit, stack vertical dengan submit di atas
   supaya label panjang ("Kirim Pendaftaran") tidak overflow */
@media (max-width: 480px) {
  .sp-form-nav {
    flex-direction: column-reverse;
    gap: 0.5rem;
  }
  .sp-form-nav .btn {
    width: 100%;
    justify-content: center;
  }
  /* Stepper card: padding lebih kecil di very-narrow */
  .sp-stepper-card {
    padding: 0.85rem 0.9rem 0.75rem;
  }
}

/* ============ A11y: focus-visible ring ============ */
/* Keyboard user butuh ring fokus jelas di tombol & link (mouse user tidak
   terganggu karena :focus-visible cuma muncul saat navigasi keyboard). */
.sp-public-form-container .btn:focus-visible,
.sp-public-form-container a:focus-visible,
.sp-public-form-container button:focus-visible,
.sp-public-form-container .sp-stepper-item:focus-visible {
  outline: 3px solid rgba(26, 58, 110, 0.6);
  outline-offset: 2px;
}

/* ============ Error state di kartu pilihan ============ */
/* Saat grup radio/checkbox wajib tapi belum dipilih, tandai kartu border merah
   supaya error langsung "nempel" ke pilihannya (bukan cuma pesan di bawah). */
.sp-option-card.sp-option-invalid {
  border-color: #ef4444 !important;
  background: #fef2f2;
}
.sp-field-group-error {
  color: #dc2626;
  font-size: 0.82rem;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  animation: spFadeIn 200ms ease-out;
}

/* ============ Cascade loading indicator ============ */
/* Saat Tom Select fetch data wilayah (emsifa) lagi jalan, ia otomatis kasih
   class `.loading` ke .ts-wrapper. Tampilkan spinner kecil di kanan control
   supaya user di sinyal lambat tahu sedang memuat (bukan nge-hang). */
.ts-wrapper.loading .ts-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24'%3E%3Cpath fill='%23FF7A1A' d='M12 2a10 10 0 1 0 10 10h-2a8 8 0 1 1-8-8z'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='0.7s' repeatCount='indefinite'/%3E%3C/path%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  padding-right: 38px !important;
}
/* Tom Select default kadang sembunyikan spinner bawaan; pastikan ada ruang */
.ts-wrapper.loading.single .ts-control { padding-right: 38px !important; }

/* ============ Inline step error banner (ganti alert HP) ============ */
.sp-step-error-banner {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-left: 4px solid #ef4444;
  border-radius: 10px;
  padding: 12px 14px;
  margin: 0 0 1.25rem;
  animation: spFadeInUp 280ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.sp-step-error-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.9rem;
  color: #b91c1c;
  margin-bottom: 8px;
}
.sp-step-error-head iconify-icon { font-size: 1.1rem; }
.sp-step-error-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.sp-step-error-link {
  background: #fff;
  border: 1px solid #fca5a5;
  color: #b91c1c;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease;
}
.sp-step-error-link:hover { background: #fee2e2; }
.sp-step-error-link:active { transform: scale(0.96); }

/* ============ Reassurance line di bawah stepper ============ */
.sp-stepper-reassure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: 0.6rem 0 0;
  font-size: 0.76rem;
  color: #059669;
  font-weight: 600;
  text-align: center;
}
.sp-stepper-reassure iconify-icon { font-size: 0.95rem; flex-shrink: 0; }

/* ============ Form Builder — entrance animations ============ */
/* Builder dulu tidak ada animasi sama sekali (terasa kaku vs form publik).
   Tambah fade-up halus pada field card (stagger) + fade inspector. */
@keyframes spbFadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes spbFade   { from { opacity: 0; } to { opacity: 1; } }
.canvas-fields .field-card { animation: spbFadeUp 300ms cubic-bezier(0.16, 1, 0.3, 1) both; }
.canvas-fields .field-card:nth-child(1) { animation-delay: 30ms; }
.canvas-fields .field-card:nth-child(2) { animation-delay: 65ms; }
.canvas-fields .field-card:nth-child(3) { animation-delay: 100ms; }
.canvas-fields .field-card:nth-child(4) { animation-delay: 135ms; }
.canvas-fields .field-card:nth-child(5) { animation-delay: 170ms; }
.canvas-fields .field-card:nth-child(n+6) { animation-delay: 200ms; }
/* card baru ditambahkan (kalau di-append tanpa reload) — pop bouncy */
.field-card.just-added { animation: spbFadeUp 320ms cubic-bezier(0.34, 1.56, 0.64, 1) both; }
/* inspector muncul saat field dipilih — fade lembut */
#inspector-content { animation: spbFade 220ms ease-out; }
@media (prefers-reduced-motion: reduce) {
  .canvas-fields .field-card,
  .field-card.just-added,
  #inspector-content { animation: none !important; }
}

/* ============================================================
   BUILDER VISUAL POLISH (redesign v1 — "poles dulu")
   Blok di AKHIR file → menimpa nilai sebelumnya (CSS cascade).
   Hanya kelas builder (.builder-*, .field-*, .step-*) — TIDAK
   menyentuh tampilan form publik. Mudah di-iterasi / revert.
   ============================================================ */

/* Kanvas: gradient halus → terasa berdimensi (bukan datar) */
.builder-canvas { background: linear-gradient(180deg, #f6f8fc 0%, #edf1f8 100%); }

/* Bar atas: elevasi lembut + garis aksen brand tipis di paling atas */
.builder-topbar {
  border-bottom: 1px solid #eef0f4;
  box-shadow: 0 1px 0 rgba(16,24,40,.03), 0 6px 18px rgba(16,24,40,.05);
  position: relative;
}
.builder-topbar::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #1A3A6E 0%, #2D5BA8 55%, #FF7A1A 100%);
}

/* Field Library: ikon jadi "chip" berwarna + tombol mengangkat saat hover */
.field-type-btn { border-radius: 10px; }
.field-type-btn iconify-icon {
  width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center;
  background: #f1f5f9; border-radius: 8px; transition: transform .15s ease, background .15s ease;
}
.field-type-btn:hover {
  background: #fff; border-color: #e6e9f0;
  box-shadow: 0 3px 10px rgba(16,24,40,.07); transform: translateY(-1px);
}
.field-type-btn:hover iconify-icon { transform: scale(1.08); }
.field-type-btn[data-type-group="primary"] iconify-icon { background: #eaf0fb; }
.field-type-btn[data-type-group="success"] iconify-icon { background: #e7f7ee; }
.field-type-btn[data-type-group="warning"] iconify-icon { background: #fff1e6; }
.field-type-btn[data-type-group="info"]    iconify-icon { background: #e6f6fe; }

/* Step section: kartu mengambang, sudut lebih lembut */
.step-section {
  border-radius: 16px; border-color: #eef0f4;
  box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 12px 32px rgba(16,24,40,.05);
}

/* Step tab aktif: gradient brand + bayangan */
.step-tab { box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.step-tab.active {
  background: linear-gradient(135deg, #FF7A1A, #EA580C);
  border-color: transparent; color: #fff;
  box-shadow: 0 4px 14px rgba(234,88,12,.30);
}

/* Field card: lebih membulat, mengambang, lift saat hover, aksen warna di kiri */
.field-card {
  border-radius: 12px; border-color: #eef0f4;
  box-shadow: 0 1px 2px rgba(16,24,40,.04);
  position: relative; overflow: hidden;
}
.field-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: #e2e8f0; transition: background .15s ease;
}
.field-card:hover {
  border-color: #e2e8f0; transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(16,24,40,.08);
}
.field-card:hover::before { background: #cbd5e1; }
.field-card.active {
  border-color: #FF7A1A; background: #fff8ee;
  box-shadow: 0 0 0 3px rgba(255,122,26,.14), 0 10px 24px rgba(234,88,12,.10);
}
.field-card.active::before { background: linear-gradient(180deg, #FF7A1A, #EA580C); }
.field-card .type-icon {
  width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  background: #f1f5f9; border-radius: 9px;
}
.field-card.active .type-icon { background: #fff3e6; color: #EA580C; }

/* Empty state lebih ramah */
.canvas-fields-empty {
  border-radius: 14px; border-color: #dfe5ee;
  background: radial-gradient(circle at 50% 0%, #ffffff 0%, #fafbff 72%);
}

/* Scrollbar tipis & modern di panel builder */
.builder-sidebar::-webkit-scrollbar, .builder-canvas::-webkit-scrollbar, #inspector::-webkit-scrollbar { width: 9px; }
.builder-sidebar::-webkit-scrollbar-thumb, .builder-canvas::-webkit-scrollbar-thumb, #inspector::-webkit-scrollbar-thumb {
  background: #d8dee9; border-radius: 9px; border: 2px solid transparent; background-clip: content-box;
}
.builder-sidebar::-webkit-scrollbar-thumb:hover, .builder-canvas::-webkit-scrollbar-thumb:hover, #inspector::-webkit-scrollbar-thumb:hover {
  background: #c2cad8; background-clip: content-box;
}

@media (prefers-reduced-motion: reduce) {
  .field-type-btn, .field-type-btn iconify-icon, .field-card, .field-card::before { transition: none; }
  .field-type-btn:hover, .field-card:hover { transform: none; }
}

/* ============================================================
   BUILDER KANVAS WYSIWYG (redesign v2)
   Kartu field di kanvas = pratinjau hidup field. Preview
   non-interaktif (pointer-events:none) → klik kartu tetap
   memilih field utk diedit; drag pakai .drag-handle.
   ============================================================ */
.field-card.fc-wys { display: block; padding: 0; align-items: stretch; gap: 0; }

/* Bar kontrol atas (geser + jenis field + tombol) */
.fc-wys .fc-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px 7px 13px; background: #fbfcfe; border-bottom: 1px solid #f1f3f7;
}
.fc-wys .drag-handle { color: #c2cad8; font-size: 16px; cursor: grab; padding: 0; }
.fc-wys .drag-handle:active { cursor: grabbing; }
.fc-wys.active .drag-handle { color: #FF7A1A; }
.fc-wys .fc-type-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .72rem; font-weight: 600; color: #64748b;
  background: #eef2f7; padding: 2px 10px; border-radius: 999px; white-space: nowrap;
}
.fc-wys .fc-type-badge iconify-icon { font-size: 13px; color: #64748b; }
.fc-wys .fc-bar-spacer { flex: 1; }
.fc-wys .field-actions { display: flex; gap: 4px; opacity: 0; transition: opacity .15s ease; }
.fc-wys:hover .field-actions, .fc-wys.active .field-actions { opacity: 1; }

/* Body + label field */
.fc-wys .fc-body { padding: 12px 16px 14px; }
.fc-label { display: block; font-weight: 600; font-size: .95rem; color: #1f2937; }
.fc-req { color: #dc2626; }
.fc-helper { font-size: .8rem; color: #94a3b8; margin-top: 2px; }
.fc-preview { margin-top: 9px; pointer-events: none; }

/* Faux input (teks/email/tanggal/dropdown) */
.fc-faux-input {
  border: 1.5px solid #e2e8f0; border-radius: 8px; padding: 9px 12px;
  color: #aab4c2; font-size: .9rem; background: #fff;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.fc-faux-textarea { min-height: 52px; align-items: flex-start; }
.fc-faux-input iconify-icon { color: #cbd5e1; font-size: 18px; flex-shrink: 0; }

/* Opsi radio / checkbox */
.fc-opts { display: flex; flex-direction: column; gap: 8px; }
.fc-opt { display: flex; align-items: center; gap: 9px; font-size: .9rem; color: #475569; }
.fc-radio, .fc-check { width: 17px; height: 17px; border: 2px solid #cbd5e1; flex-shrink: 0; background: #fff; }
.fc-radio { border-radius: 50%; }
.fc-check { border-radius: 5px; }
.fc-more { font-size: .78rem; color: #94a3b8; padding-left: 26px; }
.fc-wys.active .fc-radio, .fc-wys.active .fc-check { border-color: var(--fc-accent, #FF7A1A); }

/* Ya / Tidak */
.fc-yesno { display: flex; gap: 10px; }
.fc-pill { border: 1.5px solid #e2e8f0; border-radius: 9px; padding: 7px 22px; font-size: .88rem; font-weight: 600; color: #64748b; }

/* Rating bintang */
.fc-stars { font-size: 24px; letter-spacing: 4px; color: #fbbf24; line-height: 1; }

/* Matriks */
.fc-matrix { width: 100%; border-collapse: collapse; font-size: .8rem; }
.fc-matrix th, .fc-matrix td { padding: 5px 6px; text-align: center; color: #64748b; font-weight: 500; border-bottom: 1px solid #f1f3f7; }
.fc-matrix th:first-child, .fc-matrix td:first-child { text-align: left; color: #475569; }
.fc-matrix td .fc-radio { margin: 0 auto; }

/* File upload */
.fc-faux-file { border: 1.5px dashed #cbd5e1; border-radius: 8px; padding: 14px; text-align: center; color: #94a3b8; font-size: .88rem; }
.fc-faux-file iconify-icon { font-size: 18px; vertical-align: -3px; }

/* Tampilan-saja (heading/paragraph/divider) */
.fc-heading { font-size: 1.1rem; font-weight: 700; color: #1f2937; }
.fc-paragraph { color: #475569; font-style: italic; font-size: .92rem; }
.fc-divider { border: 0; border-top: 2px solid #e2e8f0; margin: 2px 0; }

/* ============================================================
   BUILDER REDESIGN v3 — empty state, toggle device, micro-interaction
   ============================================================ */

/* Empty state lebih ramah */
.canvas-fields-empty { padding: 2.75rem 1.25rem; }
.canvas-fields-empty .ce-icon {
  width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #eaf0fb, #e7eefb); color: #2851a3; font-size: 30px;
}
.canvas-fields-empty .ce-title { font-size: 1.05rem; font-weight: 700; color: #334155; margin-bottom: 4px; }
.canvas-fields-empty .canvas-empty-hint { max-width: 430px; margin: 0 auto; line-height: 1.6; }
.canvas-fields-empty .ce-arrow {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 14px;
  font-size: .82rem; font-weight: 600; color: #FF7A1A;
}
.canvas-fields-empty .ce-arrow iconify-icon { font-size: 17px; animation: ceArrow 1.4s ease-in-out infinite; }
@keyframes ceArrow { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-5px); } }

/* Toggle pratinjau Desktop / HP */
.canvas-device-toggle { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.cdt-btn {
  border: 1px solid #e2e8f0; background: #fff; color: #94a3b8;
  width: 38px; height: 32px; display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .12s ease;
}
.cdt-btn:first-child { border-radius: 8px 0 0 8px; }
.cdt-btn:last-child { border-radius: 0 8px 8px 0; border-left: 0; }
.cdt-btn iconify-icon { font-size: 17px; }
.cdt-btn:hover { color: #1A3A6E; }
.cdt-btn.active { background: #1A3A6E; color: #fff; border-color: #1A3A6E; }
/* Pratinjau mode HP: form menyempit + bingkai gawai */
.builder-canvas-inner { transition: max-width .3s ease; }
.builder-canvas-inner.canvas-mobile { max-width: 412px; }
.builder-canvas-inner.canvas-mobile .step-section {
  border: 9px solid #1f2937; border-radius: 30px;
  box-shadow: 0 22px 55px rgba(16,24,40,.22);
}

/* Konfeti saat Publish */
.sp-confetti {
  position: fixed; top: -14px; width: 9px; height: 14px; border-radius: 2px;
  z-index: 99999; pointer-events: none; opacity: .95;
  animation: spConfettiFall 2.2s cubic-bezier(.3,.65,.55,1) forwards;
}
@keyframes spConfettiFall { to { transform: translateY(106vh) rotate(620deg); opacity: .15; } }

/* Tombol Simpan: kilat hijau setelah sukses */
.btn-saved-flash { background: #16a34a !important; border-color: #16a34a !important; color: #fff !important; transition: background .2s ease; }

/* Panel Properti lebih rapi: tombol Simpan menempel di bawah */
#ins-save { position: sticky; bottom: -1px; z-index: 5; box-shadow: 0 -10px 18px rgba(247,248,251,.92); }
.builder-inspector details > summary { cursor: pointer; font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  .canvas-fields-empty .ce-arrow iconify-icon { animation: none; }
  .builder-canvas-inner { transition: none; }
}

/* ============================================================
   BUILDER REDESIGN v3b — drag-drop Field Library + inspector accordion
   ============================================================ */
/* Elemen Field Library yang sedang diseret ke kanvas */
.field-type-btn { cursor: grab; }
.field-type-btn:active { cursor: grabbing; }
.field-type-btn.sortable-chosen, .field-type-btn.sortable-drag {
  box-shadow: 0 10px 26px rgba(16,24,40,.18); border-color: #1A3A6E; background: #fff; opacity: .96;
}
.canvas-fields .sortable-ghost { opacity: .4; }

/* Panel Properti lebih rapi: tiap <details> jadi seksi (Validasi, Logika, panduan) */
.builder-inspector #inspector-content details {
  border: 1px solid #eef0f4; border-radius: 10px; padding: 10px 12px;
  background: #fbfcfe; margin-bottom: 14px;
}
.builder-inspector #inspector-content details > summary {
  list-style: none; display: flex; align-items: center; gap: 7px;
  font-weight: 600; font-size: .9rem; color: #334155; cursor: pointer;
}
.builder-inspector #inspector-content details > summary::-webkit-details-marker { display: none; }
.builder-inspector #inspector-content details[open] > summary { margin-bottom: 8px; }
.builder-inspector #inspector-content details > summary iconify-icon { color: #2851a3; font-size: 16px; }

/* Editor branching (logika lompat langkah) di builder */
.sp-step-branching { border: 1px dashed #d8dee9; border-radius: 10px; padding: 10px 12px; background: #fbfcfe; }
.sp-step-branching > summary { cursor: pointer; font-weight: 600; font-size: .88rem; color: #334155; display: flex; align-items: center; gap: 6px; list-style: none; }
.sp-step-branching > summary::-webkit-details-marker { display: none; }
.sp-step-branching > summary iconify-icon { color: #2851a3; }

/* Penjaga tabrakan edit (banner builder) */
.sp-collab-warn { position: fixed; top: 0; left: 0; right: 0; z-index: 9998; display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: #fef3c7; border-bottom: 1px solid #fcd34d; color: #92400e; font-size: 14px; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.sp-collab-warn iconify-icon { font-size: 20px; flex-shrink: 0; }
.sp-collab-warn > span { flex: 1; }
.sp-collab-x { border: 0; background: transparent; font-size: 22px; line-height: 1; color: #92400e; cursor: pointer; padding: 0 4px; }
