/* ============================================
   MI Islamiyah Kepoh - Stylesheet Utama
   Tema: Islami Elegan
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Scheherazade+New:wght@400;600;700&family=Nunito:wght@300;400;600;700;800&family=Amiri:wght@400;700&display=swap');

:root {
  --hijau-tua: #1a5e2a;
  --hijau-mid: #2d7a3e;
  --hijau-muda: #4caf50;
  --hijau-pale: #e8f5e9;
  --emas: #c8960c;
  --emas-muda: #f0c940;
  --emas-pale: #fff8e1;
  --putih: #ffffff;
  --abu-gelap: #263238;
  --abu-mid: #546e7a;
  --abu-muda: #eceff1;
  --merah-soft: #e53935;
  --sidebar-w: 260px;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-md: 0 8px 30px rgba(0,0,0,0.12);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Nunito', sans-serif;
  background: #f0f4f1;
  color: var(--abu-gelap);
  min-height: 100vh;
}

/* ===== LOGIN PAGE ===== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0d3b1a 0%, #1a5e2a 40%, #2d7a3e 70%, #1a4a20 100%);
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 1;
}

.login-ornament {
  position: absolute;
  font-size: 8rem;
  opacity: 0.04;
  font-family: 'Amiri', serif;
  color: #fff;
  pointer-events: none;
}
.login-ornament.top-right { top: -20px; right: -20px; }
.login-ornament.bottom-left { bottom: -30px; left: -20px; }

.login-box {
  background: white;
  border-radius: 20px;
  padding: 48px 40px;
  width: 420px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.3);
  position: relative;
  z-index: 10;
  animation: fadeInUp 0.5s ease;
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo .logo-img {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--hijau-tua), var(--hijau-muda));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 36px;
  box-shadow: 0 8px 20px rgba(26,94,42,0.3);
}

.login-logo h1 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--hijau-tua);
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1.4;
}

.login-logo p {
  font-size: 0.8rem;
  color: var(--abu-mid);
  margin-top: 4px;
}

.login-bismillah {
  text-align: center;
  font-family: 'Amiri', serif;
  font-size: 1.5rem;
  color: var(--hijau-tua);
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--hijau-pale);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--abu-gelap);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--abu-muda);
  border-radius: 10px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
  transition: all 0.3s;
  background: #fafafa;
}

.form-control:focus {
  outline: none;
  border-color: var(--hijau-mid);
  background: white;
  box-shadow: 0 0 0 4px rgba(26,94,42,0.08);
}

.btn-login {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--hijau-tua), var(--hijau-mid));
  color: white;
  border: none;
  border-radius: 10px;
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 8px;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(26,94,42,0.3);
}

/* ===== LAYOUT ADMIN ===== */
.admin-wrapper {
  display: flex;
  min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #0d3b1a 0%, var(--hijau-tua) 50%, #1a4a20 100%);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 20px rgba(0,0,0,0.15);
}

.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  text-align: center;
}

.sidebar-logo {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--emas), var(--emas-muda));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 26px;
  box-shadow: 0 4px 15px rgba(200,150,12,0.4);
}

.sidebar-title {
  font-size: 0.75rem;
  font-weight: 800;
  color: rgba(255,255,255,0.95);
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1.5;
}

.sidebar-subtitle {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.5);
  margin-top: 4px;
  font-family: 'Amiri', serif;
}

.sidebar-nav {
  padding: 16px 12px;
  flex: 1;
}

.nav-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 12px 8px 6px;
  display: block;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.25s;
  margin-bottom: 3px;
}

.nav-item:hover {
  background: rgba(255,255,255,0.12);
  color: white;
  transform: translateX(4px);
}

.nav-item.active {
  background: linear-gradient(135deg, var(--emas), var(--emas-muda));
  color: var(--hijau-tua) !important;
  box-shadow: 0 4px 12px rgba(200,150,12,0.35);
}

.nav-item .icon {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255,255,255,0.1);
  font-size: 1rem;
  flex-shrink: 0;
}

.nav-item.active .icon {
  background: rgba(26,94,42,0.2);
}

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* MAIN CONTENT */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  background: white;
  padding: 0 28px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--hijau-tua);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--hijau-pale);
  padding: 8px 14px;
  border-radius: 30px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  background: var(--hijau-tua);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
}

.page-content {
  padding: 28px;
  flex: 1;
}

/* ===== CARDS / STATS ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow);
  transition: transform 0.3s;
  border-left: 4px solid transparent;
}

.stat-card:hover { transform: translateY(-3px); }
.stat-card.green { border-left-color: var(--hijau-mid); }
.stat-card.gold { border-left-color: var(--emas); }
.stat-card.blue { border-left-color: #1976d2; }
.stat-card.red { border-left-color: #e53935; }

.stat-icon {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.stat-icon.green { background: var(--hijau-pale); }
.stat-icon.gold { background: var(--emas-pale); }
.stat-icon.blue { background: #e3f2fd; }
.stat-icon.red { background: #ffebee; }

.stat-info h3 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--abu-gelap);
  line-height: 1;
}

.stat-info p {
  font-size: 0.8rem;
  color: var(--abu-mid);
  margin-top: 4px;
  font-weight: 600;
}

/* ===== TABLE ===== */
.card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-header {
  padding: 20px 24px;
  border-bottom: 2px solid var(--hijau-pale);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(to right, var(--hijau-pale), white);
}

.card-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--hijau-tua);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-body { padding: 24px; }

.table-responsive { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

thead tr {
  background: linear-gradient(135deg, var(--hijau-tua), var(--hijau-mid));
  color: white;
}

thead th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.2s;
}

tbody tr:hover { background: var(--hijau-pale); }

tbody td {
  padding: 12px 16px;
  vertical-align: middle;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 8px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s;
  border: none;
  text-decoration: none;
}

.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-xs { padding: 4px 10px; font-size: 0.75rem; }

.btn-primary {
  background: linear-gradient(135deg, var(--hijau-tua), var(--hijau-mid));
  color: white;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 15px rgba(26,94,42,0.3);
}

.btn-gold {
  background: linear-gradient(135deg, var(--emas), var(--emas-muda));
  color: var(--hijau-tua);
}
.btn-gold:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 15px rgba(200,150,12,0.3);
}

.btn-danger {
  background: linear-gradient(135deg, #c62828, #e53935);
  color: white;
}
.btn-danger:hover { transform: translateY(-1px); }

.btn-info {
  background: linear-gradient(135deg, #1565c0, #1976d2);
  color: white;
}
.btn-info:hover { transform: translateY(-1px); }

.btn-secondary {
  background: var(--abu-muda);
  color: var(--abu-gelap);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--hijau-mid);
  color: var(--hijau-mid);
}
.btn-outline:hover { background: var(--hijau-pale); }

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

.form-row.three { grid-template-columns: 1fr 1fr 1fr; }
.form-row.one { grid-template-columns: 1fr; }

.form-group { margin-bottom: 0; }

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--abu-gelap);
  margin-bottom: 7px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--abu-muda);
  border-radius: 8px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.9rem;
  transition: all 0.25s;
  background: #fafafa;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--hijau-mid);
  background: white;
  box-shadow: 0 0 0 3px rgba(26,94,42,0.08);
}

.form-textarea { min-height: 90px; resize: vertical; }

/* ===== ALERTS ===== */
.alert {
  padding: 12px 18px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-success { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.alert-danger { background: #ffebee; color: #c62828; border: 1px solid #ef9a9a; }
.alert-warning { background: #fff8e1; color: #e65100; border: 1px solid #ffe082; }
.alert-info { background: #e3f2fd; color: #1565c0; border: 1px solid #90caf9; }

/* ===== BADGES ===== */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-green { background: #e8f5e9; color: #2e7d32; }
.badge-red { background: #ffebee; color: #c62828; }
.badge-gold { background: #fff8e1; color: #e65100; }
.badge-blue { background: #e3f2fd; color: #1565c0; }

/* ===== SEARCH BAR ===== */
.search-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search-input-wrap input {
  width: 100%;
  padding: 10px 14px 10px 40px;
  border: 2px solid var(--abu-muda);
  border-radius: 8px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.875rem;
  transition: all 0.25s;
}

.search-input-wrap input:focus {
  outline: none;
  border-color: var(--hijau-mid);
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--abu-mid);
  font-size: 0.9rem;
}

/* ===== FOTO PESERTA ===== */
.foto-peserta {
  width: 40px;
  height: 50px;
  object-fit: cover;
  border-radius: 6px;
  border: 2px solid var(--hijau-pale);
}

.foto-placeholder {
  width: 40px;
  height: 50px;
  background: var(--abu-muda);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--abu-mid);
}


/* ===================================================================
   KARTU DEPAN — layout referensi MTs: logo atas, foto kiri, data kanan
   Ukuran KTP: 85.6mm × 54mm  →  323px × 204px @ 96dpi
   =================================================================== */

/* Wrapper kartu depan */
.kd-wrap {
  width: 323px;
  height: 204px;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(0,0,0,0.18);
  display: flex;
  flex-direction: column;
  font-family: 'Nunito', sans-serif;
  border: 1px solid #e0e0e0;
  position: relative;
}

/* ── Header: logo bulat + nama madrasah ── */
.kd-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px 6px;
  background: #ffffff;
  border-bottom: 2px solid var(--hijau-pale);
  flex-shrink: 0;
}

.kd-logo-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--hijau-pale);
  border: 2px solid var(--hijau-tua);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.kd-logo-circle img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.kd-logo-fallback {
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.kd-header-text {
  flex: 1;
  min-width: 0;
}

.kd-madrasah-name {
  font-size: 9px;
  font-weight: 900;
  color: var(--hijau-tua);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kd-madrasah-addr {
  font-size: 5.8px;
  color: var(--abu-mid);
  line-height: 1.4;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Body ── */
.kd-body {
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* Kolom foto — lebar tetap, background hijau muda */
.kd-foto-col {
  width: 82px;
  background: var(--hijau-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 8px;
  flex-shrink: 0;
  position: relative;
}

/* Sudut melengkung ke kanan seperti referensi */
.kd-foto-col::after {
  content: '';
  position: absolute;
  right: -10px;
  top: 0;
  bottom: 0;
  width: 20px;
  background: var(--hijau-pale);
  border-radius: 0 50% 50% 0;
}

.kd-foto {
  width: 62px;
  height: 78px;
  object-fit: cover;
  border: 2px solid var(--hijau-tua);
  border-radius: 4px;
  display: block;
  position: relative;
  z-index: 1;
}

.kd-foto-placeholder {
  width: 62px;
  height: 78px;
  background: #ccc;
  border: 2px solid var(--hijau-tua);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #888;
  position: relative;
  z-index: 1;
}

/* Kolom info — label KARTU PELAJAR + baris data + QR */
.kd-info-col {
  flex: 1;
  padding: 7px 8px 6px 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0;
  position: relative;
}

.kd-label-kartu {
  font-size: 10.5px;
  font-weight: 900;
  color: var(--hijau-tua);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 5px;
  line-height: 1;
}

.kd-row {
  display: flex;
  align-items: baseline;
  gap: 3px;
  margin-bottom: 2.5px;
}

.kd-key {
  font-size: 7px;
  font-weight: 700;
  color: var(--abu-gelap);
  min-width: 50px;
  flex-shrink: 0;
}

.kd-sep {
  font-size: 7px;
  color: var(--abu-mid);
  flex-shrink: 0;
}

.kd-val {
  font-size: 7px;
  color: var(--abu-gelap);
  font-weight: 600;
  line-height: 1.3;
}

.kd-bold {
  font-weight: 900;
  color: var(--abu-gelap);
  text-transform: uppercase;
}

/* QR code pojok kanan bawah */
.kd-qr-wrap {
  position: absolute;
  right: 6px;
  bottom: 6px;
}

.kd-qr-canvas {
  width: 38px !important;
  height: 38px !important;
  display: block;
}

/* ── Footer: catatan kecil ── */
.kd-footer {
  background: var(--hijau-pale);
  border-top: 1px solid rgba(26,94,42,0.12);
  padding: 3px 10px;
  flex-shrink: 0;
}

.kd-footer span {
  font-size: 5.5px;
  color: var(--abu-mid);
  font-style: italic;
}

/* ===== PRINT — kartu depan ===== */
@media print {
  .kd-wrap {
    width: 85.6mm !important;
    height: 54mm !important;
    box-shadow: none !important;
    border: 0.3mm solid #ccc !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .kd-madrasah-name { font-size: 6pt; }
  .kd-madrasah-addr { font-size: 4pt; }
  .kd-label-kartu   { font-size: 7pt; }
  .kd-key, .kd-sep, .kd-val { font-size: 5pt; }
  .kd-foto   { width: 16mm; height: 20mm; }
  .kd-foto-col { width: 22mm; }
  .kd-qr-canvas { width: 12mm !important; height: 12mm !important; }
}

/* ===== KARTU BELAKANG (Visi & Misi) ===== */
.kartu-peserta {
  width: 323px;
  height: 204px;
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  font-family: 'Nunito', sans-serif;
}

.kartu-belakang-baru {
  width: 323px;
  height: 204px;
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  font-family: 'Nunito', sans-serif;
  border: 1px solid #e0e0e0;
}

.kb-header {
  background: linear-gradient(135deg, var(--hijau-tua), var(--hijau-mid));
  padding: 5px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.kb-bismillah { font-family:'Amiri',serif; font-size:10px; color:rgba(255,255,255,.85); flex-shrink:0; }
.kb-nama { flex:1; font-size:7px; font-weight:800; color:white; text-transform:uppercase; letter-spacing:.3px; text-align:center; }
.kb-npsn { font-size:5.5px; color:var(--emas-muda); font-weight:700; flex-shrink:0; }

.kb-body {
  flex:1; display:flex; padding:6px 8px 4px; gap:0; overflow:hidden;
}
.kb-col { display:flex; flex-direction:column; gap:3px; }
.visi-col { width:42%; padding-right:6px; }
.kb-divider {
  width:1px;
  background:linear-gradient(to bottom, transparent, var(--hijau-pale), var(--hijau-mid), var(--hijau-pale), transparent);
  flex-shrink:0; margin:0 6px;
}
.misi-col { flex:1; }
.kb-section-label {
  font-size:6px; font-weight:800; color:var(--emas);
  text-transform:uppercase; letter-spacing:.8px;
  margin-bottom:3px; padding-bottom:2px;
  border-bottom:1px solid var(--hijau-pale);
}
.kb-visi-text {
  font-size:6px; color:var(--abu-gelap);
  line-height:1.55; font-style:italic; font-weight:600;
}
.kb-misi-list { list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:2.5px; }
.kb-misi-list li {
  font-size:5.8px; color:var(--abu-gelap);
  line-height:1.45; padding-left:7px; position:relative; font-weight:600;
}
.kb-misi-list li::before {
  content:'▸'; position:absolute; left:0;
  color:var(--hijau-mid); font-size:5px;
}
.kb-footer {
  background:linear-gradient(135deg, var(--emas), var(--emas-muda));
  height:34px; padding:4px 10px;
  display:flex; align-items:center; justify-content:space-between; flex-shrink:0;
}
.kb-ttd-area { display:flex; flex-direction:column; gap:0; }
.kb-ttd-label { font-size:5.5px; color:var(--hijau-tua); font-weight:700; }
.kb-ttd-space { height:10px; width:70px; border-bottom:1px solid var(--hijau-tua); opacity:.4; margin:2px 0; }
.kb-ttd-nama  { font-size:5.5px; color:var(--hijau-tua); font-weight:800; }
.kb-ornament  { font-size:18px; color:var(--hijau-tua); opacity:.35; font-family:serif; }

@media print {
  .kartu-belakang-baru {
    width:85.6mm !important; height:54mm !important;
    box-shadow:none; border:0.5mm solid #ccc;
    break-inside:avoid;
  }
  @page { size:A4; margin:0; }
  body { background:white !important; }
  .no-print { display:none !important; }
}

/* ===== UTILITIES ===== */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mt-4 { margin-top: 16px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.flex-wrap { flex-wrap: wrap; }
.justify-between { justify-content: space-between; }

.foto-upload-area {
  border: 2px dashed var(--hijau-mid);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  background: var(--hijau-pale);
}
.foto-upload-area:hover { background: #d8eeda; }
.foto-preview-large {
  width: 100px; height: 125px; object-fit: cover;
  border-radius: 8px; border: 3px solid var(--hijau-tua);
  margin: 0 auto; display: block;
}

.pagination { display:flex; gap:6px; align-items:center; justify-content:center; margin-top:20px; }
.page-btn {
  width:34px; height:34px; display:flex; align-items:center; justify-content:center;
  border-radius:8px; border:2px solid var(--abu-muda); background:white;
  font-size:.85rem; font-weight:700; cursor:pointer; text-decoration:none; color:var(--abu-gelap); transition:all .2s;
}
.page-btn:hover, .page-btn.active { background:var(--hijau-tua); border-color:var(--hijau-tua); color:white; }

.modal-overlay {
  position:fixed; inset:0; background:rgba(0,0,0,.5); z-index:1000;
  display:flex; align-items:center; justify-content:center; backdrop-filter:blur(4px);
}
.modal-box {
  background:white; border-radius:16px; width:90%; max-width:500px;
  max-height:90vh; overflow-y:auto; box-shadow:0 20px 60px rgba(0,0,0,.3);
  animation:fadeInUp .3s ease;
}
.modal-header { padding:20px 24px; border-bottom:2px solid var(--hijau-pale); display:flex; align-items:center; justify-content:space-between; }
.modal-body   { padding:24px; }
.modal-footer { padding:16px 24px; border-top:1px solid var(--abu-muda); display:flex; gap:12px; justify-content:flex-end; }

@keyframes fadeInUp { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:translateY(0)} }
.animate-in { animation:fadeInUp .4s ease both; }
