/* ========== CSS VARIABLES ========== */
:root {
  --primary: #1d6fce;
  --primary-dark: #155daa;
  --primary-light: #e8f1fc;
  --primary-ultra: #f0f6ff;
  --accent: #f59e0b;
  --success: #10b981;
  --success-light: #ecfdf5;
  --danger: #ef4444;
  --text-main: #1a202c;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --border-focus: #1d6fce;
  --bg-page: #f0f4fa;
  --bg-card: #ffffff;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 40px rgba(29,111,206,0.12);
  --font-heading: 'Plus Jakarta Sans', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --transition: 0.22s cubic-bezier(0.4,0,0.2,1);
}

/* ========== RESET & BASE ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-page);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ========== BACKGROUND DECORATION ========== */
.bg-decoration {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.bg-circle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.06;
  background: var(--primary);
}

.c1 { width: 600px; height: 600px; top: -200px; right: -100px; }
.c2 { width: 400px; height: 400px; bottom: 100px; left: -150px; background: var(--accent); opacity: 0.05; }
.c3 { width: 250px; height: 250px; top: 50%; left: 40%; }

/* ========== PAGE WRAPPER ========== */
.page-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ========== HEADER ========== */
.site-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
}

.logo-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  text-align: center;
}

.logo-placeholder {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  flex-shrink: 0;
}

.logo-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.logo-fallback {
  font-size: 24px;
  display: none;
  align-items: center;
  justify-content: center;
}

.school-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2px;
}

.school-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  font-family: var(--font-heading);
}

.school-name {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

.school-year {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ========== MAIN LAYOUT ========== */
.form-layout {
  max-width: 1200px;
  margin: 32px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
  align-items: start;
  flex: 1;
}

/* ========== SIDEBAR ========== */
.steps-sidebar {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 88px;
}

.steps-label {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.step-nav {
  display: flex;
  flex-direction: column;
}

.step-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: var(--transition);
  width: 100%;
}

.step-btn:hover {
  background: var(--primary-light);
}

.step-btn.active {
  background: var(--primary-light);
}

.step-btn.done .step-num {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.step-btn.done .step-num::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: white;
}

.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 13px;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: var(--transition);
  position: relative;
}

.step-btn.active .step-num {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

.step-info strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.step-info small {
  font-size: 11px;
  color: var(--text-muted);
}

.step-btn.active .step-info strong { color: var(--primary); }

.step-connector {
  width: 2px;
  height: 16px;
  background: var(--border);
  margin-left: 29px;
}

.sidebar-note {
  margin-top: 20px;
  padding: 12px;
  background: var(--primary-ultra);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--primary);
  display: flex;
  gap: 8px;
  align-items: flex-start;
  color: var(--primary);
  font-size: 12px;
  line-height: 1.5;
}

.sidebar-note svg { flex-shrink: 0; margin-top: 1px; }

/* ========== FORM MAIN ========== */
.form-main {
  min-width: 0;
}

/* ========== FORM STEPS ========== */
.form-step {
  display: none;
  animation: fadeSlideIn 0.35s ease forwards;
}

.form-step.active { display: block; }

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

/* ========== STEP HEADER ========== */
.step-header {
  margin-bottom: 24px;
}

.step-badge {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 10px;
}

.step-title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
}

.step-desc {
  color: var(--text-secondary);
  font-size: 14px;
}

/* ========== CARD SECTIONS ========== */
.card-section {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  transition: box-shadow var(--transition);
}

.card-section:hover {
  box-shadow: var(--shadow-lg);
}

.card-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--primary-light);
}

/* ========== FORM GRID ========== */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group.full {
  grid-column: span 2;
}

/* ========== LABELS ========== */
label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  font-family: var(--font-heading);
  letter-spacing: 0.01em;
}

.req {
  color: var(--danger);
  font-size: 13px;
}

/* ========== INPUTS & SELECTS ========== */
input[type="text"],
input[type="email"],
input[type="number"],
input[type="tel"],
input[type="date"],
select {
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--font-body);
  color: var(--text-main);
  background: #fafbfc;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  width: 100%;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

input:focus, select:focus {
  border-color: var(--border-focus);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(29,111,206,0.12);
}

input::placeholder { color: var(--text-muted); font-size: 13px; }

input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0.5;
  cursor: pointer;
}

/* ========== RADIO CARDS ========== */
.radio-group {
  display: flex;
  gap: 10px;
}

.radio-card {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  background: #fafbfc;
  font-size: 14px;
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--text-secondary);
}

.radio-card:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

.radio-card input[type="radio"] {
  display: none;
}

/* ========== NAVIGATION BUTTONS ========== */
.step-nav-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  padding-top: 8px;
}

.btn-prev {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-prev:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.btn-next {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(29,111,206,0.3);
}

.btn-next:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(29,111,206,0.4);
}

.btn-submit {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 30px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(16,185,129,0.35);
}

.btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(16,185,129,0.45);
}

.btn-submit.loading {
  background: var(--text-muted);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ========== SUMMARY CARD ========== */
.summary-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: linear-gradient(135deg, var(--primary-light), var(--primary-ultra));
  border: 1px solid rgba(29,111,206,0.2);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 24px;
  margin-top: 4px;
}

.summary-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.summary-card h4 {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 4px;
}

.summary-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ========== SUCCESS BANNER ========== */
.success-banner {
  display: none;
  align-items: center;
  gap: 16px;
  background: var(--success-light);
  border: 1px solid #a7f3d0;
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-top: 20px;
  animation: fadeSlideIn 0.4s ease;
}

.success-banner.show { display: flex; }

.success-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--success);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.success-banner strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 15px;
  color: #065f46;
  margin-bottom: 4px;
}

.success-banner p {
  font-size: 13px;
  color: #047857;
}

/* ========== FIELD ERROR ========== */
input.field-error,
select.field-error {
  border-color: var(--danger) !important;
  background: #fff5f5 !important;
  box-shadow: 0 0 0 3px rgba(239,68,68,0.12) !important;
  animation: shake 0.3s ease;
}

.radio-card.field-error {
  border-color: var(--danger) !important;
  background: #fff5f5 !important;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.step-error-msg {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff5f5;
  border: 1px solid #fca5a5;
  border-left: 4px solid var(--danger);
  color: #b91c1c;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 12px;
  animation: fadeSlideIn 0.25s ease;
}

.step-error-msg svg {
  flex-shrink: 0;
  color: var(--danger);
}

/* ========== FOOTER ========== */
.site-footer {
  text-align: center;
  padding: 20px;
  color: var(--text-muted);
  font-size: 12px;
  border-top: 1px solid var(--border);
  margin-top: auto;
  background: var(--bg-card);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
  .form-layout {
    grid-template-columns: 1fr;
  }

  .steps-sidebar {
    position: static;
    padding: 16px;
  }

  .step-nav {
    flex-direction: row;
    gap: 0;
    overflow-x: auto;
  }

  .step-connector {
    width: 24px;
    height: 2px;
    margin: 0;
    align-self: center;
    margin-top: 0;
  }

  .step-btn {
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 80px;
    padding: 8px;
  }

  .step-info strong { font-size: 11px; }
  .step-info small { display: none; }

  .sidebar-note { display: none; }
}

@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-group.full { grid-column: span 1; }
  .school-name { font-size: 15px; }
  .step-title { font-size: 20px; }
  .logo-placeholder { width: 42px; height: 42px; }
  .radio-group { flex-direction: column; }
  .header-inner { padding: 10px 16px; }
  .form-layout { padding: 0 12px; margin: 16px auto; }
  .card-section { padding: 16px; }
}

/* ========== UPLOAD DOKUMEN ========== */
.upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.upload-item {
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fafbfc;
  transition: var(--transition);
}

.upload-item:hover {
  border-color: var(--primary);
  background: var(--primary-ultra);
}

.upload-item.has-file {
  border-color: var(--success);
  background: var(--success-light);
  border-style: solid;
}

.upload-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
}

.upload-item.has-file .upload-icon {
  background: #d1fae5; color: var(--success);
}

.upload-info strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 13px; font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}

.upload-info span {
  font-size: 12px; color: var(--text-secondary);
}

.upload-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  background: var(--primary); color: white;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading); font-size: 12px; font-weight: 700;
  cursor: pointer; transition: var(--transition);
  width: fit-content;
}

.upload-btn:hover { background: var(--primary-dark); }

.upload-item.has-file .upload-btn {
  background: var(--success);
}

.upload-preview {
  display: none;
}

.upload-preview img {
  width: 100%; max-height: 120px;
  object-fit: cover; border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.upload-preview.pdf-preview {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: var(--radius-sm);
  font-size: 12px; color: #c2410c;
  font-weight: 600; font-family: var(--font-heading);
}

.upload-file-info {
  font-size: 11px; color: var(--success);
  font-weight: 600; font-family: var(--font-heading);
  display: none;
}

.upload-note {
  display: flex; align-items: flex-start; gap: 8px;
  background: var(--primary-ultra);
  border: 1px solid rgba(29,111,206,0.15);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 12px; margin-top: 16px;
  color: var(--text-secondary); font-size: 12px; line-height: 1.6;
}

.upload-note svg { flex-shrink: 0; color: var(--primary); margin-top: 1px; }

/* PROGRESS BAR */
.upload-progress-wrap { margin-bottom: 16px; }

.progress-bar-track {
  width: 100%; height: 8px;
  background: var(--primary-light);
  border-radius: 100px; overflow: hidden;
}

.progress-bar-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  border-radius: 100px;
  transition: width 0.4s ease;
}

.upload-spinner {
  width: 20px; height: 20px;
  border: 2.5px solid var(--primary-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

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

@media (max-width: 640px) {
  .upload-grid { grid-template-columns: 1fr; }
}
