/* style.css — Sensus Kendaraan Dinas Disdik */

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── Card ─────────────────────────────────────────────── */
.card {
  background: #ffffff;
  border-radius: 24px;
  padding: 24px;
  margin-bottom: 16px;
  border: 1px solid rgba(226, 232, 240, 0.7);
  box-shadow: 0 1px 3px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.03);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f1f5f9;
}

.card-header-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

.card-header-title { font-size: 14px; font-weight: 700; color: #1e293b; line-height: 1.3; }
.card-header-sub   { font-size: 11px; color: #94a3b8; margin-top: 2px; }

/* ─── Fields ────────────────────────────────────────────── */
.field-group { margin-bottom: 24px; }
.field-group:last-child { margin-bottom: 0; }

.field-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.input-text {
  width: 100%;
  border: 1.5px solid #e5e7eb;
  border-radius: 14px;
  padding: 13px 16px;
  font-size: 14px;
  font-family: inherit;
  color: #111827;
  background: #f9fafb;
  outline: none;
  transition: all 0.18s ease;
}

.input-text::placeholder { color: #c8d0d8; }

.input-text:focus {
  border-color: #3b82f6;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(59,130,246,0.10);
}

textarea.input-text { resize: none; line-height: 1.6; }

/* ─── Radio cards ───────────────────────────────────────── */
.radio-group { display: flex; flex-direction: column; gap: 10px; }

.radio-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1.5px solid #eef0f4;
  background: #fafbfc;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
}

/* hide native radio */
.radio-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

/* custom check circle — flex item at far right */
.radio-option::after {
  content: '';
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #d1d5db;
  background: #ffffff;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.radio-option:hover {
  border-color: #bfdbfe;
  background: #f5f9ff;
}

.radio-option:has(input:checked) {
  border-color: #3b82f6;
  background: linear-gradient(135deg, #eff6ff 0%, #f5f9ff 100%);
  box-shadow: 0 0 0 4px rgba(59,130,246,0.08);
}

.radio-option:has(input:checked)::after {
  border-color: #2563eb;
  background-color: #2563eb;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: 13px;
  background-position: center;
  background-repeat: no-repeat;
  border-color: #2563eb;
}

.radio-body { flex: 1; min-width: 0; }
.radio-title { font-size: 14px; font-weight: 600; color: #374151; line-height: 1.3; }
.radio-option:has(input:checked) .radio-title { color: #1d4ed8; }
.radio-desc  { font-size: 11px; color: #9ca3af; margin-top: 2px; line-height: 1.4; }

/* ─── Buttons ───────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 15px 24px;
  border-radius: 16px;
  background: linear-gradient(135deg, #2563eb 0%, #1e3a8a 100%);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  box-shadow: 0 4px 14px rgba(37,99,235,0.28);
  transition: all 0.18s ease;
}
.btn-primary:hover:not(:disabled) { box-shadow: 0 6px 20px rgba(37,99,235,0.38); }
.btn-primary:active { transform: scale(0.97); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  border-radius: 16px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: all 0.18s ease;
}
.btn-secondary:hover  { background: #e2e8f0; }
.btn-secondary:active { transform: scale(0.97); }

.btn-success {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 15px 24px;
  border-radius: 16px;
  background: linear-gradient(135deg, #059669 0%, #064e3b 100%);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  border: none;
  box-shadow: 0 4px 14px rgba(5,150,105,0.28);
  transition: all 0.18s ease;
}
.btn-success:hover:not(:disabled) { box-shadow: 0 6px 20px rgba(5,150,105,0.38); }
.btn-success:active  { transform: scale(0.97); }
.btn-success:disabled { opacity: 0.5; cursor: not-allowed; }

/* ─── Upload zone ───────────────────────────────────────── */
.upload-zone {
  display: block;
  border: 2px dashed #e2e8f0;
  border-radius: 20px;
  text-align: center;
  cursor: pointer;
  background: #f9fafb;
  transition: all 0.2s ease;
  overflow: hidden;
}

.upload-zone:hover {
  border-color: #93c5fd;
  background: linear-gradient(145deg, #eff6ff, #f8fbff);
}

.upload-zone.uploading {
  border-color: #60a5fa;
  background: linear-gradient(145deg, #eff6ff, #dbeafe);
  cursor: wait;
  pointer-events: none;
}

.upload-zone.done {
  border-color: #34d399;
  background: linear-gradient(145deg, #ecfdf5, #d1fae5);
}

.upload-zone.error {
  border-color: #f87171;
  background: linear-gradient(145deg, #fef2f2, #fee2e2);
}

/* ─── Spinner ───────────────────────────────────────────── */
.spin-ring {
  display: inline-block;
  width: 44px;
  height: 44px;
  border: 3px solid #dbeafe;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ─── Step indicator ────────────────────────────────────── */
.step-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.step-dot.active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  box-shadow: 0 0 0 6px rgba(59,130,246,0.14), 0 4px 12px rgba(37,99,235,0.35);
}

.step-dot.done {
  background: linear-gradient(135deg, #059669, #047857);
  color: #fff;
  box-shadow: 0 2px 8px rgba(5,150,105,0.3);
}

.step-dot.pending { background: #f1f5f9; color: #94a3b8; }

.step-line {
  flex: 1;
  height: 2px;
  background: #e2e8f0;
  margin: 0 4px;
  border-radius: 2px;
  transition: background 0.4s ease;
}

.step-line.done { background: linear-gradient(90deg, #059669, #10b981); }

/* ─── Summary ───────────────────────────────────────────── */
.summary-row {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f8fafc;
}
.summary-row:last-child { border-bottom: none; }

.summary-key {
  width: 128px;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-top: 1px;
}

.summary-val {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  word-break: break-all;
  flex: 1;
}

/* ─── Panel animation ───────────────────────────────────── */
.step-panel { animation: fadeUp 0.26s cubic-bezier(0.4, 0, 0.2, 1); }

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

/* ─── Success ───────────────────────────────────────────── */
.success-icon { animation: popIn 0.55s cubic-bezier(0.34, 1.56, 0.64, 1); }

@keyframes popIn {
  from { opacity: 0; transform: scale(0.5); }
  to   { opacity: 1; transform: scale(1); }
}

.success-card { animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.25s both; }

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