:root {
  --primary: #0b3c88;
  --primary-dark: #062c63;
  --accent: #ffc107;
  --bg: #f8fafc;
  --card: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
}

/* Reset & Global */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; font-family: 'Inter', sans-serif; margin: 0; padding: 0; }
html, body { width: 100%; overflow-x: hidden; background: var(--bg); color: var(--text-main); min-height: 100vh; display: flex; flex-direction: column; }

/* HEADER */
header {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; padding: 15px; display: flex; align-items: center; gap: 12px;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); position: sticky; top: 0; z-index: 100;
}
header img { height: 38px; width: auto; flex-shrink: 0; }
header b { font-size: 14px; display: block; line-height: 1.2; }
header small { font-size: 10px; opacity: 0.8; text-transform: uppercase; }

/* STEPPER */
.steps { display: flex; background: #fff; padding: 15px 10px; border-bottom: 1px solid #e2e8f0; width: 100%; }
.step { flex: 1; text-align: center; }
.step span {
  width: 24px; height: 24px; border-radius: 50%; background: #f1f5f9; color: #94a3b8;
  display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; border: 1.5px solid #e2e8f0;
}
.step p { font-size: 8px; margin-top: 5px; font-weight: 700; color: #94a3b8; text-transform: uppercase; }
.step.active span { background: var(--primary); color: #fff; border-color: var(--primary); }
.step.active p { color: var(--primary); }
.step.done span { background: var(--success); color: #fff; border-color: var(--success); }

/* CONTENT WRAPPER */
.main-wrapper { flex: 1; width: 100%; padding: 20px 15px; display: flex; flex-direction: column; align-items: center; }
.container { width: 100%; max-width: 480px; }
.card { background: var(--card); border-radius: 16px; padding: 20px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); display: none; border: 1px solid #f1f5f9; width: 100%; }
.card.active { display: block; animation: fadeIn 0.3s ease; }

/* FORM & INPUT */
.form-group { margin-bottom: 15px; width: 100%; }
label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 6px; color: #334155; }
input, textarea { width: 100%; padding: 12px; border-radius: 10px; border: 1.5px solid #e2e8f0; background: #fff; font-size: 14px; outline: none; }

/* PLAT NOMOR VISUAL */
.plat-visual-box {
  background: #222; border: 3px solid #444; border-radius: 10px; padding: 10px;
  display: grid; grid-template-columns: 22% 1fr 28%; gap: 8px; margin-bottom: 8px;
  box-shadow: inset 0 0 5px rgba(0,0,0,0.5); width: 100%;
}
.plat-visual-box input {
  background: #fff; border: none; color: #000; font-weight: 800; font-size: 18px;
  text-align: center; padding: 10px 2px; text-transform: uppercase; border-radius: 5px; width: 100%; outline: none;
}

/* BUTTONS */
button { width: 100%; padding: 14px; border: none; border-radius: 12px; font-weight: 700; font-size: 14px; cursor: pointer; transition: 0.2s; }
.btn-main { background: var(--primary); color: #fff; margin-top: 10px; }
.btn-success { background: var(--success); color: #fff; }
.btn-ghost { background: transparent; color: var(--text-muted); font-size: 13px; margin-top: 8px; }

/* FOOTER */
footer { background: #1e293b; color: #f8fafc; width: 100%; margin-top: auto; }
.gov-strip { height: 4px; background: linear-gradient(to right, #ff0000 50%, #ffffff 50%); width: 100%; }
.footer-top { display: grid; grid-template-columns: 1fr; gap: 30px; max-width: 1100px; margin: 0 auto; padding: 40px 20px; }
@media (min-width: 768px) { .footer-top { grid-template-columns: 2fr 1fr 1fr; } }
.footer-brand img { height: 50px; margin-bottom: 15px; }
.footer-bottom { text-align: center; font-size: 10px; opacity: 0.6; border-top: 1px solid #334155; padding: 20px; }
.social-icons { display: flex; gap: 12px; margin-top: 15px; }
.social-icons img { width: 18px; height: 18px; filter: grayscale(1) invert(1); opacity: 0.6; }

/* MODAL */
.modal { display: none; position: fixed; inset: 0; background: rgba(15,23,42,0.85); backdrop-filter: blur(4px); z-index: 1000; align-items: flex-end; }
.modal-content { background: #fff; width: 100%; border-radius: 20px 20px 0 0; padding: 25px 20px; text-align: center; max-height: 90vh; overflow-y: auto; }
.qr-holder { background: #f1f5f9; padding: 15px; border-radius: 15px; margin: 15px auto; width: fit-content; }
#qrisImg { max-width: 100%; height: auto; width: 200px; display: block; }

/* UTILS & ANIMATIONS */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.status-badge { background: #fff3cd; color: #856404; display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 10px; font-weight: 700; margin: 10px 0; border: 1px solid #ffeeba; }
.pulse-icon { width: 10px; height: 10px; background: #f59e0b; border-radius: 50%; display: inline-block; margin-right: 5px; animation: pulse 1.5s infinite; }
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.3; } 100% { opacity: 1; } }
pre { white-space: pre-wrap; word-wrap: break-word; background: #f8fafc; padding: 15px; font-size: 11px; border-radius: 10px; border: 1px solid #e2e8f0; line-height: 1.6; color: #334155; width: 100%; text-align: left; }
.loader-container { margin: 20px 0; display: flex; justify-content: center; gap: 5px; }
.dot { width: 8px; height: 8px; background: var(--primary); border-radius: 50%; animation: dotPulse 1.4s infinite ease-in-out; }
@keyframes dotPulse { 0%, 80%, 100% { transform: scale(0); } 40% { transform: scale(1.0); } }

/* CUSTOM CLASSES */
.data-summary { background:#f8fafc; padding:15px; border-radius:10px; margin-bottom:15px; font-size:13px; border: 1px solid #e2e8f0; }
.warning-box { background: #fff8eb; border-left: 4px solid var(--warning); padding: 12px; border-radius: 4px; margin-bottom: 20px; }
.success-icon { background: #f0fdf4; color: #15803d; width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 15px; font-size: 30px; }
.info-system { background: #f1f5f9; padding: 15px; border-radius: 12px; text-align: left; margin: 20px 0; }
.sync-box { background: #f8fafc; border: 1px dashed #cbd5e1; padding: 15px; border-radius: 10px; margin: 20px 0; }
#previewUpload { width: 100%; border-radius: 10px; margin-top: 15px; border: 2px solid #e2e8f0; display: none; }