
:root {
  --primary: #1a3a5c;
  --primary-light: #2558a3;
  --primary-dark: #0f2338;
  --accent: #c8a951;
  --accent-light: #e8c96a;
  --danger: #dc3545;
  --success: #198754;
  --bg: #f0f4f8;
  --bg-card: #ffffff;
  --text-main: #1a2b3c;
  --text-muted: #6b7a8d;
  --border: #dce4ef;
  --shadow-sm: 0 2px 8px rgba(26,58,92,0.08);
  --shadow-md: 0 8px 32px rgba(26,58,92,0.13);
  --shadow-lg: 0 20px 60px rgba(26,58,92,0.18);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 0 60px 0;
  background-image:
    radial-gradient(ellipse at 10% 20%, rgba(37,88,163,0.07) 0%, transparent 50%),
    radial-gradient(ellipse at 90% 80%, rgba(200,169,81,0.06) 0%, transparent 50%);
}

/* ====== HEADER ====== */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 32px;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, var(--primary-light) 100%);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  height: 72px;
  box-shadow: 0 4px 20px rgba(15,35,56,0.35);
  border-bottom: 3px solid var(--accent);
}

.header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200,169,81,0.5), transparent);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-left {
  height: 52px;
  width: auto;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
}

.logo-right {
  height: 52px;
  width: auto;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.2));
}

.header-title {
  border-left: 2px solid rgba(200,169,81,0.5);
  padding-left: 14px;
}

.instansi-text {
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  margin: 0;
  letter-spacing: 0.1px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.25);
}



/* ====== CONTAINER ====== */
.container {
  max-width: 700px;
  width: 100%;
  margin-top: 92px;
  background: var(--bg-card);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid rgba(200,169,81,0.15);
}

/* ====== TITLE ====== */
.title {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: white;
  text-align: center;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 18px;
  font-weight: 700;
  padding: 28px 32px 24px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
}

.title::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

/* ====== CONTENT ====== */
.content {
  padding: 32px;
}

/* ====== SECTION GROUPS ====== */
.section-group {
  background: #f8fbff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary-light);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}

.section-group-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary-light);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-group-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ====== GLOBAL ERROR ====== */
#globalError {
  border-radius: var(--radius-sm);
  border-left: 4px solid #f39c12;
  background: #fff9e6;
  color: #8a6700;
  font-size: 14px;
  font-weight: 500;
  padding: 12px 16px;
  margin-bottom: 20px;
}

/* ====== PREVIEW BOX ====== */
#previewBox {
  border-radius: var(--radius-sm);
  background: #eef5ff;
  border: 1px solid #c3d9ff;
  border-left: 4px solid var(--primary-light);
  font-size: 14px;
  margin-bottom: 24px;
}

/* ====== INPUT BOXES ====== */
.input-box {
  margin-bottom: 18px;
}

.input-box label,
.form-label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
  line-height: 1.4;
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 15px;
  color: var(--text-main);
  background: white;
  transition: var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 4px rgba(37,88,163,0.1);
  background: #fafcff;
}

.form-control::placeholder {
  color: #64748B;
  font-size: 14px;
}

select.form-control {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

textarea.form-control {
  resize: vertical;
  min-height: 90px;
}

/* ====== INPUT GROUP (date with icon) ====== */
.input-group {
  display: flex;
  align-items: stretch;
}

.input-group .form-control {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: none;
}

.input-group-text {
  display: flex;
  align-items: center;
  padding: 0 14px;
  background: var(--primary);
  color: white;
  border: 2px solid var(--primary);
  border-left: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 15px;
}

/* ====== DROPDOWN ====== */
.dropdown-icon {
  position: relative;
}

.dropdown-icon .dropdown-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 18px;
  color: var(--primary);
  line-height: 1;
}

/* ====== INPUT ROW ====== */
.input-row {
  display: flex;
  gap: 16px;
}

.half-width {
  width: 50%;
}

/* ====== ERROR STATES ====== */
.error-text {
  color: var(--danger);
  font-size: 12px;
  font-weight: 500;
  margin-top: 5px;
  display: none;
  align-items: center;
  gap: 4px;
}

.error-text::before {
  content: '⚠';
  font-size: 11px;
}

.input-box.error .error-text {
  display: flex;
}

.input-box.error .form-control {
  border-color: var(--danger);
  background-color: #fff8f8;
}

.input-box.error .form-control:focus {
  box-shadow: 0 0 0 4px rgba(220,53,69,0.1);
}

/* ====== SECTION DIVIDER ====== */
.section-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 28px 0 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
}

.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ====== BUTTONS ====== */
.button-container {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 28px;
}

.btn-submit,
.btn-reset {
  flex: 1;
  padding: 13px 20px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-submit {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(26,58,92,0.3);
}

.btn-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(26,58,92,0.4);
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
}

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

.btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-reset {
  background: white;
  color: var(--danger);
  border: 2px solid #f5c6cb;
}

.btn-reset:hover {
  background: #fff0f1;
  border-color: var(--danger);
  transform: translateY(-2px);
}

/* ====== FILE UPLOAD ====== */
.file-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 20px;
  background: #fafbfc;
  transition: var(--transition);
}

.file-upload-area:hover {
  border-color: var(--primary-light);
  background: #f0f5ff;
}

.file-upload-area input[type="file"] {
  width: 100%;
  padding: 8px;
  font-size: 13px;
  cursor: pointer;
}

/* ====== NOTIFICATION / MODAL OVERLAY ====== */
.notification {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  color: var(--text-main);
  padding: 32px;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  z-index: 2000;
  text-align: center;
  font-size: 15px;
  font-weight: 500;
  max-width: 90%;
  width: 460px;
  animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  line-height: 1.7;
}

.notification::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.85);
  z-index: -1;
  backdrop-filter: blur(4px);
}

.notification.d-none {
  display: none;
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.85);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.notification ul {
  text-align: left;
  padding-left: 24px;
  margin: 14px 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-main);
}

.notification ul li {
  margin-bottom: 6px;
}

.notification p {
  text-align: center;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-main);
  margin-top: 8px;
}

.notification .button-container {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.notification .btn-refresh {
  flex: 1;
  padding: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
}

.notification .btn-refresh:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ====== CONTACT SECTION ====== */
.contact-us {
  text-align: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
}

.contact-us p {
  margin-bottom: 10px;
  line-height: 1.5;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 8px;
  margin-bottom: 4px;
}

.social-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  transition: var(--transition);
}

.social-link:hover {
  color: var(--primary);
  transform: translateY(-2px);
}

.social-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.social-link:hover .social-icon {
  box-shadow: var(--shadow-md);
}

/* ====== POPUP MODAL ====== */
/* ====== POPUP MODAL ====== */
.popup-modal {
  position: fixed;
  z-index: 3000;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(10, 20, 40, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(8px);
  padding: 16px;
}

.popup-content {
  background: white;
  padding: 28px 24px;
  border-radius: 24px;
  text-align: center;
  animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 92%;
  width: 440px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.35);
  border: 1px solid rgba(200,169,81,0.2);
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.popup-image {
  max-width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 28px;
  margin-bottom: 14px;
  box-shadow: 0 8px 24px rgba(26,58,92,0.2);
  flex-shrink: 0;
}

.popup-welcome-badge {
  display: inline-block;
  background: linear-gradient(135deg, #eef5ff, #dce8ff);
  color: var(--primary-light);
  font-size: 14px;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  border: 1px solid rgba(37,88,163,0.15);
  flex-shrink: 0;
}

.popup-title {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
  line-height: 1.3;
  flex-shrink: 0;
}

.popup-divider {
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
  margin: 10px auto;
  flex-shrink: 0;
}

.popup-tips {
  background: #f8fbff;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 10px;
  text-align: left;
  border: 1px solid var(--border);
  width: 100%;
  box-sizing: border-box;
  flex-shrink: 0;
}

.popup-tip-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-main);
  line-height: 1.5;
}

.popup-tip-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

.popup-tip-list {
  margin: 6px 0 0 0;
  padding-left: 18px;
  font-size: 13px;
  color: var(--text-main);
  line-height: 1.8;
}

.popup-ok {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 13px 24px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.3px;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(26,58,92,0.3);
  margin-top: 4px;
  flex-shrink: 0;
}

.popup-ok:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  box-shadow: 0 8px 20px rgba(26,58,92,0.4);
}

/* ====== LOADING MODAL ====== */
.modal-content {
  border-radius: 16px;
  border: none;
  box-shadow: var(--shadow-lg);
}

.loading-modal-content {
  border-radius: 20px !important;
  overflow: hidden;
}

.loading-modal-body {
  padding: 36px 32px !important;
}

/* Animasi lingkaran */
.loading-ring {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
}

.loading-ring-inner {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-right-color: var(--primary-light);
  animation: spinRing 1s linear infinite;
  position: absolute;
  top: 0; left: 0;
}

@keyframes spinRing {
  to { transform: rotate(360deg); }
}

.loading-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 28px;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.15); }
}

.loading-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px !important;
}

.loading-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 20px !important;
}

/* Progress bar */
.loading-progress-bar {
  width: 100%;
  height: 8px;
  background: var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 8px;
}

.loading-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light), var(--accent));
  border-radius: 10px;
  transition: width 0.5s ease;
  background-size: 200% 100%;
  animation: shimmer 1.5s linear infinite;
}

@keyframes shimmer {
  0% { background-position: 200% center; }
  100% { background-position: -200% center; }
}

.loading-progress-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary-light);
  margin-bottom: 20px !important;
}

/* Tips */
.loading-tips {
  background: #f8fbff;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  text-align: left;
}

.loading-tips-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px !important;
}

.loading-tips-text {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.5;
  margin-bottom: 0 !important;
  transition: opacity 0.3s ease;
}

/* ====== HINT TEXT ====== */
.section-hint {
  font-size: 12px;
  color: var(--text-muted);
  background: #f5f8ff;
  border-left: 3px solid var(--primary-light);
  padding: 8px 12px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 20px;
  line-height: 1.5;
}

/* ====== CONTOH GAMBAR ====== */
.img-thumbnail {
  border-radius: var(--radius-sm) !important;
  border: 2px solid var(--border) !important;
  box-shadow: var(--shadow-sm) !important;
}

/* ====== BOOTSTRAP OVERRIDES ====== */
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-weight: 600;
  padding: 10px 20px;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(26,58,92,0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(26,58,92,0.35);
}

/* ====== FOOTER ====== */
footer {
  width: 100%;
  text-align: center;
  padding: 20px;
  font-size: 13px;
  color: var(--text-muted);
  background: white;
  border-top: 1px solid var(--border);
  margin-top: 40px;
  line-height: 1.7;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 576px) {
  .header {
    padding: 0 14px;
    height: 62px;
  }

  .logo-left, .logo-right {
    height: 38px;
  }

  .instansi-text {
    font-size: 11.5px;
  }

  .progress-indicator {
    margin-top: 82px;
    gap: 0;
  }

  .progress-indicator .step {
    padding: 8px 12px;
    font-size: 11px;
  }

  .progress-indicator > span:not(.step) {
    padding: 0 3px;
    font-size: 16px;
  }

  .container {
    border-radius: 14px;
    margin: 78px 8px 16px;
    width: calc(100% - 16px);
  }

  .title {
    font-size: 15px;
    padding: 20px 16px 16px;
    letter-spacing: 0.5px;
  }

  .content {
    padding: 20px 16px;
  }

  .input-row {
    flex-direction: column;
    gap: 0;
  }

  .half-width {
    width: 100%;
  }

  /* button-container sudah flex-direction:column, btn-row-top tetap flex row */
  .btn-row-top {
    flex-direction: column;
  }

  .btn-row-top .btn-submit,
  .btn-row-top .btn-reset {
    width: 100%;
  }

  .btn-back-form {
    width: 100%;
    justify-content: center;
  }

  .notification {
    width: 92%;
    padding: 24px 18px;
    font-size: 14px;
  }

  .popup-content {
    padding: 20px 16px 12px 16px;
    max-height: 85vh;
  }

  .popup-wrapper {
    width: 96%;
  }

  .popup-image {
    height: 160px;
  }

  .popup-divider {
    margin: 8px auto;
  }

  .popup-tips {
    padding: 12px;
    margin-bottom: 8px;
  }

  .popup-tip-item {
    font-size: 12.5px;
  }

  .popup-ok {
    padding: 14px 20px;
    font-size: 14px;
    width: 100%;
  }

  .popup-back {
    font-size: 13px;
    padding: 8px 0;
  }

  .section-group {
    padding: 18px 14px;
  }

  /* Form label & input lebih nyaman di HP */
  .form-label {
    font-size: 13px;
  }

  .form-control, .form-select {
    font-size: 16px !important; /* mencegah zoom otomatis Safari iOS */
    padding: 10px 14px;
  }

  .input-group-text {
    font-size: 13px;
    padding: 10px 12px;
  }

  /* Section title lebih kecil */
  .section-group-title {
    font-size: 13px;
  }

  /* Kontak sosial */
  .social-links {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
  }
}

/* ====== DYNAMIC ANGGOTA PENELITI ====== */
.anggota-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  animation: fadeSlideIn 0.2s ease;
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.anggota-nomor {
  background: var(--primary);
  color: white;
  font-size: 13px;
  font-weight: 700;
  min-width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.anggota-row .form-control {
  flex: 1;
}

.btn-hapus-anggota {
  background: none;
  border: 2px solid #f5c6cb;
  color: var(--danger);
  border-radius: var(--radius-sm);
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition);
  font-size: 15px;
}

.btn-hapus-anggota:hover {
  background: #fff0f1;
  border-color: var(--danger);
}

.btn-tambah-anggota {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 10px 16px;
  background: white;
  color: var(--primary-light);
  border: 2px dashed var(--primary-light);
  border-radius: var(--radius-sm);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
  justify-content: center;
}

.btn-tambah-anggota:hover {
  background: #f0f5ff;
  border-style: solid;
}
/* ===== TOMBOL KEMBALI & LAYOUT BUTTON CONTAINER ===== */
.popup-back {
  display: block;
  text-align: center;
  margin-top: 12px;
  font-size: 13px;
  color: #6b7a8d;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.popup-back:hover {
  color: var(--primary);
  text-decoration: underline;
}

.btn-row-top {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-row-bottom {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

.btn-back-form {
  display: inline-flex;
  align-items: center;
  padding: 10px 28px;
  background: white;
  color: #6b7a8d;
  border: 2px solid #dce4ef;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.btn-back-form:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #f0f4f8;
}

/* ===== CUSTOM MODAL (alert & confirm) ===== */
.custom-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 40, 0.6);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeInOverlay 0.2s ease;
}

@keyframes fadeInOverlay {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.custom-modal-box {
  background: white;
  border-radius: 24px;
  padding: 32px 28px;
  width: 100%;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid rgba(200, 169, 81, 0.15);
}

.custom-modal-icon {
  font-size: 40px;
  margin-bottom: 14px;
  line-height: 1;
}

.custom-modal-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
}

.custom-modal-msg {
  font-size: 14px;
  color: #4a5568;
  line-height: 1.7;
  margin-bottom: 24px;
}

.custom-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.custom-modal-btn-primary {
  flex: 1;
  min-width: 120px;
  padding: 12px 20px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border: none;
  border-radius: 10px;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.custom-modal-btn-primary:hover {
  opacity: 0.9;
}

.custom-modal-btn-cancel {
  flex: 1;
  min-width: 120px;
  padding: 12px 20px;
  background: white;
  color: #6b7a8d;
  border: 2px solid #dce4ef;
  border-radius: 10px;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.custom-modal-btn-cancel:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.custom-modal-btn-danger {
  flex: 1;
  min-width: 120px;
  padding: 12px 20px;
  background: linear-gradient(135deg, #c0392b, #e74c3c);
  color: white;
  border: none;
  border-radius: 10px;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.custom-modal-btn-danger:hover {
  opacity: 0.9;
}

/* ====== TOMBOL KEMBALI KE MENU UTAMA ====== */
.btn-row-back {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

.btn-back-menu {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1.5px solid #aec6e8;
  color: #4a7aaa;
  padding: 9px 22px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  transition: all 0.2s ease;
  letter-spacing: 0.2px;
}

.btn-back-menu:hover {
  background: #eef4fb;
  border-color: #1a3a5c;
  color: #1a3a5c;
}

/* ====== POPUP BACK BUTTON ====== */
.popup-back {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px 20px;
  background: transparent;
  border: 1.5px solid #aec6e8;
  color: #4a7aaa;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  transition: all 0.2s ease;
  margin-top: 8px;
}

.popup-back:hover {
  background: #eef4fb;
  border-color: #1a3a5c;
  color: #1a3a5c;
}

@media (max-width: 576px) {
  .custom-modal-box {
    padding: 24px 20px;
  }
  .custom-modal-actions {
    flex-direction: column;
  }
}
/* ====== RIPPLE EFFECT ====== */
.btn-submit {
  position: relative;
  overflow: hidden;
}
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.32);
  transform: scale(0);
  animation: rippleAnim 0.55s linear;
  pointer-events: none;
}
@keyframes rippleAnim {
  to { transform: scale(4); opacity: 0; }
}

/* ====== SCROLL ENTRANCE ANIMATION ====== */
.section-hidden {
  opacity: 0;
  transform: translateY(18px);
}
.section-visible {
  animation: sectionEnter 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes sectionEnter {
  to { opacity: 1; transform: translateY(0); }
}

/* ====== SECTION GROUP HOVER ====== */
.section-group {
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.section-group:hover {
  box-shadow: 0 6px 24px rgba(26,58,92,0.09);
  transform: translateY(-1px);
}

/* ====== ERROR SHAKE ====== */
.input-box.error .form-control,
.input-box.error select,
.input-box.error .file-upload-area {
  animation: shakeX 0.35s ease;
}
@keyframes shakeX {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-5px); }
  40%       { transform: translateX(5px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}

/* ====== SMOOTH FOCUS GLOW ====== */
.form-control:focus,
select.form-control:focus {
  box-shadow: 0 0 0 3px rgba(37, 88, 163, 0.13), 0 1px 4px rgba(26,58,92,0.1) !important;
  border-color: var(--primary-light) !important;
  background: #fafcff !important;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

/* ====== INPUT GROUP TRANSITION ====== */
.input-group-text {
  transition: background 0.2s ease, border-color 0.2s ease;
}
.input-group:focus-within .input-group-text {
  background: var(--primary-light);
  border-color: var(--primary-light);
}

/* ====== FILE UPLOAD DRAG STATE ====== */
.file-upload-area.dragover {
  border-color: var(--primary-light);
  background: #eef5ff;
  box-shadow: 0 0 0 3px rgba(37,88,163,0.12);
}

/* ====== SOCIAL ICON HOVER ====== */
.social-link:hover .social-icon {
  transform: scale(1.08);
  box-shadow: var(--shadow-md);
}
.social-icon {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* ====== SUCCESS NOTIFICATION — fix posisi fixed + animasi ====== */
#notification {
  animation: successPop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes successPop {
  from { opacity: 0; transform: translate(-50%, calc(-50% + 28px)) scale(0.92); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* ====== POPUP MODAL entrance ====== */
#popupModal .popup-content {
  animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes popIn {
  from { opacity: 0; transform: scale(0.88) translateY(16px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ====== LOADING MODAL entrance ====== */
.loading-modal-content {
  animation: slideUp 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   V8 ADDITIONS — Multi-step, Stepper, Dropzone, Review, Toast
   Visual: V7 warmth + V8 structure
   ============================================================ */

/* ===== FORM HERO (V8 title with icon + subtitle) ===== */
.form-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, var(--primary-light) 100%);
  color: white;
  padding: 24px 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  border-bottom: 3px solid var(--accent);
}
.form-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.form-hero-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: rgba(255,255,255,0.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.form-hero-text { flex: 1; min-width: 0; position: relative; z-index: 1; }
.form-hero-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.2px;
  line-height: 1.3;
}
.form-hero-sub {
  font-size: 13px;
  color: rgba(255,255,255,0.65);
  margin-top: 3px;
  font-weight: 500;
}

@media (max-width: 576px) {
  .form-hero { padding: 20px 18px; gap: 12px; }
  .form-hero-icon { width: 42px; height: 42px; font-size: 19px; }
  .form-hero-title { font-size: 15px; }
  .form-hero-sub { font-size: 12px; }
}

/* ===== STEPPER ===== */
.stepper {
  display: flex; align-items: flex-start;
  padding: 22px 20px;
  background: #eef4fc;
  border-bottom: 1px solid #d5e2f0;
}
.stepper-item {
  display: flex; flex-direction: column;
  align-items: center; gap: 7px;
  flex: 1; min-width: 0;
  cursor: pointer;
  transition: opacity 0.2s;
}
.stepper-item:hover { opacity: 0.85; }
.stepper-circle {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px;
  border: 2.5px solid #c0cfdf;
  background: white; color: #8a9bb5;
  transition: all 0.25s ease;
}
.stepper-circle .step-check { display: none; font-size: 18px; }
.stepper-item.done .stepper-circle {
  background: var(--success); border-color: var(--success);
  color: white;
}
.stepper-item.done .stepper-circle .step-num { display: none; }
.stepper-item.done .stepper-circle .step-check { display: inline; }
.stepper-item.active .stepper-circle {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-color: var(--primary);
  color: white;
  box-shadow: 0 0 0 5px rgba(37,88,163,0.15);
}
.stepper-label {
  font-size: 12px; font-weight: 600;
  color: #8a9bb5; text-align: center;
  line-height: 1.3;
}
.stepper-item.done .stepper-label,
.stepper-item.active .stepper-label {
  color: var(--primary); font-weight: 700;
}
.stepper-bar {
  height: 2.5px; flex: 1; max-width: 70px;
  background: #c8d6e8;
  margin-top: 19px;
  transition: background 0.3s;
  border-radius: 2px;
}
.stepper-bar.done { background: var(--success); }

@media (max-width: 576px) {
  .stepper { padding: 16px 12px; }
  .stepper-circle { width: 36px; height: 36px; font-size: 13px; }
  .stepper-label { font-size: 10.5px; }
  .stepper-bar { max-width: 36px; margin-top: 17px; }
}

/* ===== STEP PANES ===== */
.step-pane { display: none; }
.step-pane.active {
  display: block;
  animation: fadeSlideIn 0.3s ease;
}

/* ===== STEP NAVIGATION ===== */
.step-nav {
  display: flex; gap: 12px;
  justify-content: space-between;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.step-nav .btn-nav {
  flex: 1; max-width: 220px;
  padding: 13px 20px;
  border: none; border-radius: var(--radius-sm);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px; font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: var(--transition);
}
.btn-nav-next {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  box-shadow: 0 4px 14px rgba(26,58,92,0.3);
  margin-left: auto;
}
.btn-nav-next:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(26,58,92,0.4); }
.btn-nav-prev {
  background: white;
  color: var(--primary);
  border: 2px solid var(--border) !important;
}
.btn-nav-prev:hover { border-color: var(--primary) !important; background: #f5f9ff; }
.btn-nav-submit {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  box-shadow: 0 4px 14px rgba(26,58,92,0.3);
  margin-left: auto;
}
.btn-nav-submit:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(26,58,92,0.4); }

/* ===== DROPZONE ===== */
.dropzone {
  position: relative;
  border: 2.5px dashed var(--border);
  border-radius: var(--radius);
  background: #fafbfc;
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}
.dropzone:hover { border-color: var(--primary-light); background: #f0f5ff; }
.dropzone.dragover {
  border-color: var(--primary);
  background: #e4efff;
  transform: scale(1.01);
}
.dropzone.has-file {
  border-style: solid; border-color: var(--success);
  background: #f0faf4;
}
.dropzone input[type=file] {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  opacity: 0; cursor: pointer;
}
.dropzone-icon { font-size: 36px; color: var(--primary-light); margin-bottom: 8px; }
.dropzone-title { font-weight: 600; font-size: 14px; color: var(--text-main); }
.dropzone-sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.dropzone-selected {
  display: flex; align-items: center; gap: 12px; text-align: left;
}
.dropzone-file-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  background: #e8f5e9; border: 1px solid var(--success);
  color: var(--success);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.dropzone-file-info { flex: 1; min-width: 0; }
.dropzone-file-name {
  font-weight: 600; font-size: 13px; color: var(--text-main);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dropzone-file-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.dropzone-remove {
  background: white; border: 1.5px solid #f5c6cb;
  border-radius: var(--radius-sm);
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--danger);
  transition: var(--transition); flex-shrink: 0; z-index: 2;
}
.dropzone-remove:hover { background: #fff0f1; border-color: var(--danger); }

/* ===== CHECKLIST (isi ZIP) ===== */
.checklist {
  background: #f0f5ff;
  border: 1px solid #c3d9ff;
  border-left: 4px solid var(--primary-light);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 16px;
}
.checklist-title {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 13px;
  color: var(--primary); margin-bottom: 10px;
}
.checklist-items { list-style: none; padding: 0; margin: 0; }
.checklist-items li {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-main);
  padding: 3px 0;
}
.checklist-items li i { color: var(--danger); font-size: 14px; }
.checklist-link {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600;
  color: var(--primary-light); margin-top: 10px;
  text-decoration: none;
}
.checklist-link:hover { text-decoration: underline; }

/* ===== REVIEW GRID (step 4) ===== */
.review-grid {
  display: grid; grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 600px) {
  .review-grid { grid-template-columns: 1fr 1fr; }
  .review-card.full { grid-column: span 2; }
}
.review-card {
  background: #f8fbff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
}
.review-card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.review-card-title {
  display: flex; align-items: center; gap: 6px;
  font-weight: 700; font-size: 13px; color: var(--primary);
}
.review-edit-btn {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600;
  color: var(--primary-light);
  background: white; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 10px; cursor: pointer;
  transition: var(--transition);
}
.review-edit-btn:hover { border-color: var(--primary-light); background: #f0f5ff; }
.review-list { font-size: 12px; }
.review-list dt { color: var(--text-muted); font-weight: 500; margin-top: 6px; }
.review-list dd { color: var(--text-main); font-weight: 600; word-break: break-word; margin-left: 0; white-space: pre-line; }

/* ===== V8 SCRIPT COMPATIBILITY ALIASES ===== */
/* V8 script uses .field + .has-error + .field-error + .is-invalid */
.field { /* alias for .input-box when used together */ }
.field.has-error .error-text,
.field.has-error .field-error { display: flex; }
.field.has-error .form-control,
.field.has-error .field-input {
  border-color: var(--danger);
  background-color: #fff8f8;
  animation: shakeX 0.35s ease;
}
.field.has-error .form-control:focus { box-shadow: 0 0 0 4px rgba(220,53,69,0.1); }
.form-control.is-invalid { border-color: var(--danger); }

/* ===== TOAST ===== */
.toast-notify {
  position: fixed; bottom: 20px; right: 20px;
  display: flex; align-items: center; gap: 10px;
  padding: 11px 18px;
  background: var(--primary-dark); color: white;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 28px rgba(10,42,94,0.3);
  z-index: 9999;
  transform: translateY(120%); opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s;
  font-size: 13px; font-weight: 600;
}
.toast-notify.show { transform: translateY(0); opacity: 1; }
.toast-notify i { font-size: 17px; }
.toast-notify.success i { color: #4ADE80; }
.toast-notify.error i { color: #F87171; }
.toast-notify.info i { color: #60A5FA; }

/* ===== DRAFT INDICATOR (collapsible) ===== */
.draft-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--success);
  background: #e8f5e9;
  border-radius: 20px;
  overflow: hidden;
  white-space: nowrap;
  /* Hidden state: zero size */
  max-height: 0;
  max-width: 0;
  opacity: 0;
  padding: 0;
  margin-bottom: 0;
  transition: max-height .3s ease, max-width .35s ease, opacity .25s ease,
              padding .3s ease, margin-bottom .3s ease;
}
.draft-indicator.show {
  max-height: 30px;
  max-width: 200px;
  opacity: 1;
  padding: 5px 12px;
  margin-bottom: 12px;
}

/* ===== COLLAPSIBLE GLOBAL ALERT ===== */
#globalError.alert {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
  border-width: 0 !important;
  transition: max-height .3s ease, opacity .25s ease,
              padding .3s ease, margin .3s ease, border-width .3s ease;
}
#globalError.alert.is-visible {
  max-height: 80px;
  opacity: 1;
  padding-top: 12px !important;
  padding-bottom: 12px !important;
  margin-bottom: 20px !important;
  border-left-width: 4px !important;
}

/* ===== SECONDARY ACTIONS (reset & kembali) ===== */
.secondary-actions {
  display: flex; gap: 8px;
  justify-content: center; flex-wrap: wrap;
  margin-top: 14px;
}

/* ===== OPD MODE (pilihan manual / lampiran) ===== */
.opd-help {
  display: block;
  font-size: 12px;
  color: #6c8194;
  margin-bottom: 10px;
  line-height: 1.5;
}
.opd-help i { margin-right: 4px; }
.opd-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.opd-mode-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 52px;
  padding: 8px 10px;
  background: #fff;
  color: var(--primary);
  border: 1.5px solid var(--border, #d5e0ee);
  border-radius: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.opd-mode-btn:hover { border-color: var(--primary); }
.opd-mode-btn:focus-visible { outline: 3px solid rgba(37, 99, 235, .35); outline-offset: 2px; }
.opd-mode-btn.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.opd-mode-title { font-size: 14px; font-weight: 700; line-height: 1.2; }
.opd-mode-sub { font-size: 11.5px; opacity: .8; line-height: 1.2; }
.opd-add-row { display: flex; align-items: center; gap: 10px; }
.opd-add-row .btn-tambah-anggota { width: auto; flex: 1; }
.opd-counter {
  font-size: 12.5px;
  font-weight: 600;
  color: #6c8194;
  white-space: nowrap;
  margin-top: 8px;
}
.opd-counter.is-full { color: var(--danger, #d64550); }

/* ===== Catatan kecil di bawah kolom ===== */
.field-hint { display: block; margin-top: 5px; font-size: 11.5px; color: #6c8194; }
.field-note { display: block; margin-top: 4px; font-size: 12px; font-weight: 600; color: #1f7a4d; }
.field-note:empty { display: none; }
.opd-lampiran-info {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #fff8e6;
  border: 1.5px solid #f0c04a;
  border-left: 4px solid #d4a017;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  color: #7a5200;
  line-height: 1.6;
  margin-top: 6px;
}
.opd-lampiran-info i {
  font-size: 17px;
  color: #d4a017;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ===== POPUP PILIHAN TIPE (Baru / Perpanjangan) ===== */
.popup-pilihan-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1.5px solid var(--border, #d5e0ee);
  border-radius: 12px;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 10px;
  text-align: left;
  background: #f4f8ff;
}
.popup-pilihan-btn:first-of-type {
  background: linear-gradient(135deg, #eef4ff, #deeaff);
  border-color: #b0ccf5;
}
.popup-pilihan-btn:last-of-type {
  background: linear-gradient(135deg, #fffbf0, #fef3dc);
  border-color: #f0d090;
}
.popup-pilihan-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37,88,163,0.15);
}
.popup-pilihan-btn:first-of-type:hover {
  border-color: #2558a3;
  background: linear-gradient(135deg, #e4efff, #d0e2ff);
}
.popup-pilihan-btn:last-of-type:hover {
  border-color: #d4a017;
  background: linear-gradient(135deg, #fff8e6, #fef0c0);
}
.popup-pilihan-icon {
  font-size: 24px;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255,255,255,0.7);
}
.popup-pilihan-text {
  flex: 1;
  min-width: 0;
}
.popup-pilihan-text strong {
  display: block;
  font-size: 14px;
  color: var(--primary-dark, #1a3a5c);
  font-weight: 700;
}
.popup-pilihan-text small {
  display: block;
  font-size: 12px;
  color: var(--text-muted, #6c8194);
  margin-top: 2px;
  font-weight: 400;
}
.popup-pilihan-btn > i.bi-arrow-right {
  color: var(--text-muted, #6c8194);
  font-size: 15px;
  flex-shrink: 0;
}

/* Perpanjangan view: sudah/belum pernah juga beda warna */
#popupPerpanjanganView .popup-pilihan-btn:first-of-type {
  background: linear-gradient(135deg, #e8faf2, #d4f5e4);
  border-color: #8dd4b0;
}
#popupPerpanjanganView .popup-pilihan-btn:first-of-type:hover {
  border-color: #1a9e5c;
  background: linear-gradient(135deg, #d4f5e4, #b8edcf);
}
#popupPerpanjanganView .popup-pilihan-btn:last-of-type {
  background: linear-gradient(135deg, #f5f0ff, #ede4ff);
  border-color: #c4a8f0;
}
#popupPerpanjanganView .popup-pilihan-btn:last-of-type:hover {
  border-color: #7c3aed;
  background: linear-gradient(135deg, #ede4ff, #ddd0ff);
}


/* ============================================================
   UI/UX REFRESH — menyatukan palet dengan tokens.css
   (ditaruh di akhir agar menimpa aturan lama)
   ============================================================ */
:root {
  --primary: #134074;
  --primary-light: #1E5AAE;
  --primary-dark: #0B2545;
  --accent: #C8A951;
  --bg: #F3F6FB;
  --text-main: #0F172A;
  --text-muted: #64748B;
  --border: #E2E8F0;
  --danger: #B91C1C;
  --success: #15803D;
}
:focus-visible { outline: 3px solid rgba(30,90,174,.45); outline-offset: 2px; }

/* Header: logo lebih rapi, tidak menempel */
.header { height: 68px; padding: 0 clamp(16px, 4vw, 40px); }
.logo-left, .logo-right { height: 44px; }

/* Kartu formulir lebih lega di desktop */
.container { max-width: 760px; border-radius: 20px; margin-top: 88px; border-color: var(--border); }

/* Input: fokus jelas, tinggi nyaman disentuh */
.form-control { min-height: 46px; border-radius: 10px; }
.form-control:focus { border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(30,90,174,.2); }

/* Tombol navigasi langkah: Sebelumnya di kiri, Lanjut di kanan, sejajar */
.step-nav { align-items: center; }
.step-nav .btn-nav { min-height: 48px; border-radius: 10px; max-width: 240px; }
.btn-nav-next, .btn-nav-submit { background: var(--primary); box-shadow: 0 4px 14px rgba(19,64,116,.28); }
.btn-nav-next:hover, .btn-nav-submit:hover { background: var(--primary-dark); }


.secondary-actions { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }
/* Reset/Kembali: tetap memakai gaya lama (pil dengan tepi) agar jelas bisa diketuk */

@media (max-width: 576px) {
  .container { margin-top: 76px; border-radius: 0; border-left: 0; border-right: 0; }
  /* Bilah aksi menempel di bawah layar supaya Lanjut selalu terjangkau ibu jari */
  .step-nav {
    position: sticky; bottom: 0; z-index: 50;
    margin: 20px -16px 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.96); backdrop-filter: blur(8px);
    border-top: 1px solid var(--border); box-shadow: 0 -6px 16px rgba(11,37,69,.06);
  }
  .step-nav .btn-nav { max-width: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation-duration: .001ms !important; transition-duration: .001ms !important; } }

/* ============================================================
   MOBILE-FIRST POLISH (mayoritas pengguna mengakses lewat HP)
   ============================================================ */
.popup-modal { height: 100dvh; inset: 0; width: auto; }
@supports not (height: 100dvh) { .popup-modal { height: 100vh; } }

@media (max-width: 576px) {
  /* Header: logo saja + label singkat, teks panjang disembunyikan agar tidak terpotong */
  .header { height: 64px; padding: 0 10px; gap: 8px; }
  .header-left { gap: 8px; min-width: 0; flex: 1; }
  .logo-left { height: 34px; }
  .logo-right { height: 30px; flex-shrink: 0; }
  .header-title { padding-left: 8px; min-width: 0; }
  .instansi-text { font-size: 11.5px; line-height: 1.3; letter-spacing: 0; }
  .header-title p[style] { font-size: 10.5px !important; letter-spacing: 1.2px !important; margin: 1px 0 0 !important; }
  .container { margin-top: 72px; }

  /* Popup menjadi bottom-sheet: tombol di jangkauan ibu jari, tidak terpotong address bar */
  .popup-modal { align-items: flex-end; padding: 0; }
  .popup-content {
    width: 100%; max-width: 100%; border-radius: 24px 24px 0 0;
    max-height: 92dvh; padding: 20px 16px calc(16px + env(safe-area-inset-bottom));
    animation: sheetUp .3s var(--ease-out, ease-out);
  }
  .popup-image { height: 84px; width: 84px; object-fit: cover; object-position: 50% 42%; border-radius: 22px; margin-bottom: 10px; }
  .popup-tips, .popup-tip-item { font-size: 13px; }

  /* Kartu bersarang dirampingkan agar kolom isian lebih lebar */
  .content { padding: 14px 10px; }
  .section-group { padding: 16px 14px; border-left-width: 3px; margin-bottom: 16px; }
  .section-group:hover { transform: none; box-shadow: none; }
  .form-hero { padding: 16px 14px; }

  /* Input 16px mencegah iOS memperbesar layar saat fokus */
  .form-control, select.form-control, textarea.form-control { font-size: 16px; }
  .stepper-label { font-size: 11.5px; }
  .secondary-actions .btn-back-menu { min-height: 44px; padding: 10px 16px; }
  .social-link { min-height: 44px; }
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }


/* ============================================================
   FORM: selaras dengan beranda (topbar + pita biru + kartu menimpa)
   ============================================================ */
body.form-page { padding-bottom: 0; background-color: #F3F6FB; background-image: none; }
body.form-page .container {
  margin-top: -64px; position: relative; z-index: 2;
  width: calc(100% - 32px); max-width: 760px;
  border-radius: 18px; border: 1px solid var(--border);
  box-shadow: 0 16px 40px rgba(11,37,69,.12), 0 4px 8px rgba(11,37,69,.04);
}
/* satu kartu putih saja: kartu bagian dalam diratakan */
body.form-page .section-group { background: transparent; border: 0; border-radius: 0; padding: 0; margin-bottom: 8px; box-shadow: none; transform: none; }
body.form-page .section-group:hover { box-shadow: none; transform: none; }
body.form-page .section-group-title {
  font-size: 13px; letter-spacing: .8px; color: #134074; margin-bottom: 22px;
}
body.form-page .section-group-title i {
  width: 30px; height: 30px; display: inline-grid; place-items: center; font-size: 15px;
  border-radius: 9px; background: #E8F0FB; color: #1E5AAE;
}
body.form-page .content { padding: 26px 32px 30px; }
body.form-page .stepper { border-radius: 18px 18px 0 0; }

/* layar sukses */
.notification { padding: 28px 24px 22px; width: 480px; text-align: left; font-weight: 500; z-index: 3000; }
.notification::before { display: none; }
.notification { box-shadow: 0 0 0 100vmax rgba(11,37,69,.58), 0 24px 60px rgba(0,0,0,.35); max-height: 92vh; overflow-y: auto; }
.notif-check {
  width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center;
  background: #DCFCE7; color: #15803D; font-size: 34px; box-shadow: 0 0 0 8px #F0FDF4;
}
.notification h3 { text-align: center; font-size: 20px; font-weight: 800; color: #0B2545; margin-bottom: 4px; }
.notification .notif-lead { text-align: center; font-size: 14px; color: #475569; margin-bottom: 16px; }
.notif-steps { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 10px; }
.notif-steps li { display: flex; gap: 12px; padding: 12px 14px; background: #F4F8FE; border: 1px solid #E2E8F0; border-radius: 12px; }
.notif-steps li > i { font-size: 18px; color: #1E5AAE; margin-top: 2px; flex-shrink: 0; }
.notif-steps strong { display: block; font-size: 13.5px; color: #0B2545; font-weight: 700; }
.notif-steps span { display: block; font-size: 12.5px; color: #475569; line-height: 1.55; font-weight: 500; }
.notif-actions { display: flex; gap: 10px; }
.notif-actions > * { flex: 1; min-height: 46px; border-radius: 10px; font: inherit; font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; text-decoration: none; }
.notif-btn-primary { background: #134074; color: #fff; border: 0; }
.notif-btn-primary:hover { background: #0B2545; }
.notif-btn-ghost { background: #fff; color: #134074; border: 1.5px solid #CBD5E1; }
.notif-btn-ghost:hover { background: #F4F8FE; }
.notification ul, .notification .button-container { display: none; }

@media (max-width: 576px) {
  body.form-page .container { margin-top: -52px; width: calc(100% - 20px); border-radius: 16px; }
  body.form-page .stepper { border-radius: 16px 16px 0 0; }
  body.form-page .content { padding: 16px 14px 20px; }
  .notification { width: 94%; padding: 22px 16px 16px; }
  .notif-actions { flex-direction: column-reverse; }
}
