:root {
  --bg: #f0f7ff;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --primary: #1d4ed8;
  --border: #cbd5e1;
  --shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  --radius: 12px;
}


body.dark-mode {
  --bg: #0f172a;
  --card: #1e293b;
  --text: #f8fafc;
  --muted: #94a3b8;
  --border: #334155;
  --primary: #3b82f6;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  transition: background 0.3s ease;
}

.page { padding: 30px 15px; }

.biodata-card {
  max-width: 950px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-header {
  padding: 30px;
  border-bottom: 2px solid var(--border);
  background: linear-gradient(to right, rgba(29, 78, 216, 0.05), transparent);
}

.header-top { display: flex; justify-content: space-between; align-items: center; }

.badge {
  padding: 5px 15px;
  background: rgba(29, 78, 216, 0.1);
  color: var(--primary);
  border-radius: 20px;
  font-size: 13px;
  font-weight: bold;
}

.title { margin: 15px 0 5px; font-size: 32px; color: var(--text); }
.subtitle { margin: 0; color: var(--muted); font-size: 15px; }

.header-actions { margin-top: 25px; display: flex; gap: 12px; }

.section { padding: 25px 30px; border-bottom: 1px dashed var(--border); }
.section:last-of-type { border-bottom: none; }
.section-head h2 { font-size: 20px; color: var(--primary); margin: 0 0 15px 0; }

.top-grid { display: grid; grid-template-columns: 2.5fr 1fr; gap: 25px; }

.panel {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.02);
}

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: 1fr 1fr 1fr; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field-full { grid-column: 1 / -1; }
.checkbox-field { flex-direction: row; align-items: center; gap: 10px; padding: 5px 0; }

label { font-weight: 600; font-size: 13.5px; }

input[type="text"], input[type="date"], input[type="time"], input[type="tel"], input[type="email"], select, textarea {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card);
  color: var(--text);
  font-size: 14px;
  transition: border 0.2s;
}

input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); }

.helper-text { font-size: 12px; color: var(--primary); margin-top: 4px; font-weight: bold; }

.photo-wrap {
  width: 100%;
  height: 250px;
  border-radius: 8px;
  border: 2px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 12px;
}

.photo-wrap img { width: 100%; height: 100%; object-fit: cover; }

.upload {
  display: block;
  text-align: center;
  padding: 12px;
  background: var(--primary);
  color: white;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}

.file { display: none; }
.file-name { font-size: 12px; color: var(--muted); text-align: center; margin-top: 8px; }

.btn { padding: 12px 20px; border-radius: 6px; border: none; font-weight: bold; cursor: pointer; transition: 0.2s; }
.btn-secondary { background: var(--primary); color: white; }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }

.card-footer { padding: 20px; text-align: center; background: rgba(0,0,0,0.02); }
.footnote { font-size: 13px; color: var(--muted); margin: 0; }

@media (max-width: 850px) {
  .top-grid, .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

@media print {
  .header-actions, #themeToggle, .upload { display: none !important; }
  body { background: white; }
  .biodata-card { box-shadow: none; border: 0; max-width: 100%; }
  .section { padding: 10px 0; border-bottom: 1px solid #eee; page-break-inside: avoid; }
  input, select, textarea { border: 1px solid #ccc; }
}