/* ==========================================
   css/step10.css
   Styling untuk Tahap 10: Pengajuan Sertifikat
   ========================================== */

.tab-header h1 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.35rem;
  margin-bottom: 8px;
}

/* ---------- Finance Block base ---------- */
.finance-block {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 22px;
  margin-bottom: 20px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.field-item {
  margin-bottom: 4px;
}

.field-item > label {
  display: block;
  font-weight: 600;
  font-size: 0.98rem;
  margin-bottom: 4px;
  color: #1f2937;
}

.field-desc {
  color: #6b7280;
  font-size: 0.85rem;
  line-height: 1.55;
  margin-bottom: 12px;
}

.finance-block input[type="text"],
.finance-block input[type="number"],
.finance-block input[type="date"],
.finance-block select {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 0.95rem;
  box-sizing: border-box;
  background: #fff;
}

.finance-block input:focus,
.finance-block select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* Select dibuat konsisten lintas HP (Android/iOS suka render panah bawaan
   yang beda-beda dan kadang kepotong). Panah custom + appearance:none
   supaya tinggi & tampilannya sama persis dengan input teks di sebelahnya.
   (Masih dipertahankan meski Skema Magang sekarang input teks manual,
   siapa tahu ada <select> lain yang dipakai di halaman ini nanti.) */
.finance-block select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 8l4 4 4-4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 36px;
}

/* ---------- Catatan / Info box ---------- */
.checklist-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #14532d;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 18px;
  font-size: 0.88rem;
  line-height: 1.6;
}

.checklist-note i {
  font-size: 1.1rem;
  color: #16a34a;
  margin-top: 2px;
  flex-shrink: 0;
}

/* ---------- Checklist ---------- */
.checklist-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 6px;
  margin-bottom: 16px;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.checklist-item:hover {
  background: #f9fafb;
}

.checklist-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: #16a34a;
  cursor: pointer;
}

.checklist-item span {
  font-size: 0.92rem;
  color: #1f2937;
}

/* ---------- Progress bar ---------- */
.checklist-summary {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#checklist-progress-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: #374151;
}

.progress-bar-track {
  width: 100%;
  height: 10px;
  background: #f3f4f6;
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  transition: width 0.25s ease, background 0.25s ease;
  background: #f59e0b; /* default: belum capai syarat minimal */
}

.progress-bar-fill.progress-ok {
  background: #16a34a; /* Tahap 1-4 sudah lengkap */
}

.progress-bar-fill.progress-warning {
  background: #f59e0b;
}

/* ==========================================================
   RESPONSIVE — TABLET (<=768px)
   ========================================================== */
@media (max-width: 768px) {
  .finance-block {
    padding: 18px;
  }
}

/* ==========================================================
   RESPONSIVE — MOBILE (<=640px)
   ========================================================== */
@media (max-width: 640px) {

  .tab-header h1 {
    font-size: 1.08rem;
    gap: 8px;
  }

  .tab-header p {
    font-size: 0.85rem;
  }

  .finance-block {
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 14px;
  }

  .section-title {
    font-size: 0.98rem;
  }

  .field-item > label {
    font-size: 0.92rem;
  }

  .field-desc {
    font-size: 0.82rem;
  }

  /* font-size 16px itu wajib di iOS: kalau lebih kecil dari 16px,
     Safari otomatis nge-zoom in tiap kali field ini di-tap, dan
     bikin layout kacau sampai user zoom out manual. */
  .finance-block input[type="text"],
  .finance-block input[type="number"],
  .finance-block input[type="date"],
  .finance-block select {
    font-size: 16px;
    padding: 10px 12px;
  }

  .checklist-note {
    padding: 12px 14px;
    font-size: 0.85rem;
    gap: 8px;
    margin-bottom: 14px;
  }

  .checklist-container {
    padding: 4px;
    margin-bottom: 14px;
  }

  /* teks checklist yang panjang perlu bisa turun ke baris berikutnya
     tanpa bikin checkbox-nya ikut turun ke tengah paragraf */
  .checklist-item {
    align-items: flex-start;
    padding: 10px;
    gap: 10px;
  }

  .checklist-item input[type="checkbox"] {
    margin-top: 2px;
  }

  .checklist-item span {
    font-size: 0.88rem;
    line-height: 1.5;
  }

  .progress-bar-track {
    height: 8px;
  }

  #checklist-progress-text {
    font-size: 0.82rem;
  }
}

@media (max-width: 380px) {
  .finance-block {
    padding: 12px;
  }
}