/* =====================================================
   Desa Kauniki — Design System
   Adaptasi desain project "desa" (Desa Uabau):
   biru profesional #0f4c81 · emerald #10b981 · slate #1e293b
   Font: Inter (body) + Poppins (heading)
   ===================================================== */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 300; font-display: swap; src: url('../vendor/fonts/inter-latin.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('../vendor/fonts/inter-latin.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('../vendor/fonts/inter-latin.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('../vendor/fonts/inter-latin.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 500; font-display: swap; src: url('../vendor/fonts/poppins-latin-500.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap; src: url('../vendor/fonts/poppins-latin-600.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 700; font-display: swap; src: url('../vendor/fonts/poppins-latin-700.woff2') format('woff2'); }

:root {
  --primary:    #0f4c81;
  --primary-hd: #0b3d69;
  --secondary:  #10b981;
  --accent:     #3b82f6;
  --dark:       #1e293b;
  --light:      #f1f5f9;
  --white:      #ffffff;
  --text-main:  #334155;
  --text-light: #64748b;
  --border:     #e2e8f0;
  --warning:    #f59e0b;
  --danger:     #ef4444;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-main);
  background: var(--white);
}
h1, h2, h3, h4, h5, h6 { font-family: 'Poppins', sans-serif; }

/* ---------- Utilitas kompatibilitas template lama ---------- */
.text-dk-primary { color: var(--primary) !important; }
.bg-dk-primary   { background-color: var(--primary) !important; }
.bg-dk-light     { background-color: var(--light) !important; }
.text-muted      { color: var(--text-light) !important; }

/* =====================================================
   TOMBOL
   ===================================================== */
.btn {
  border-radius: 8px;
  font-weight: 500;
  padding: .55rem 1.35rem;
  transition: all .3s ease;
}
.btn-dk {
  --bs-btn-bg: var(--primary);
  --bs-btn-border-color: var(--primary);
  --bs-btn-hover-bg: var(--primary-hd);
  --bs-btn-hover-border-color: var(--primary-hd);
  --bs-btn-active-bg: var(--primary-hd);
  --bs-btn-color: #fff;
}
.btn-outline-dk {
  --bs-btn-color: var(--primary);
  --bs-btn-border-color: var(--primary);
  --bs-btn-hover-bg: var(--primary);
  --bs-btn-hover-border-color: var(--primary);
  --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: var(--primary);
}

/* =====================================================
   NAVBAR PUBLIK — putih blur sticky ala project desa
   ===================================================== */
.navbar-dk {
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
  padding: .9rem 0;
}
.navbar-dk .logo {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: .5rem;
  text-decoration: none;
}
.navbar-dk .logo i { color: var(--primary); font-size: 1.4rem; }
.navbar-dk .logo small {
  display: block;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: .68rem;
  color: var(--text-light);
  margin-top: -4px;
}
.navbar-dk .nav-link {
  font-weight: 500;
  color: var(--text-main);
  margin: 0 .35rem;
}
.navbar-dk .nav-link:hover,
.navbar-dk .nav-link.active { color: var(--primary); }
.brand-logo {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

/* =====================================================
   HERO — gradient biru di atas foto, 85vh
   ===================================================== */
.hero {
  position: relative;
  background:
    linear-gradient(135deg, rgba(15, 76, 129, .55), rgba(30, 41, 59, .68)),
    url('../img/Kantor.jpeg') center center / cover no-repeat;
  color: #fff;
  min-height: 85vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-sm {
  min-height: 50vh;
  background-position: center center;
  background-size: cover;
}
.hero-header {
  background:
    linear-gradient(135deg, rgba(15, 76, 129, .55), rgba(30, 41, 59, .68)),
    url('../img/Kantor.jpeg') center center / cover no-repeat;
  color: #fff;
  padding: 60px 0;
  text-align: center;
}
.hero .badge-soft {
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 50px;
  padding: .5rem 1rem;
  font-weight: 500;
}
.hero-card {
  background: rgba(255, 255, 255, .08);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 16px;
}

/* =====================================================
   KARTU & IKON LAYANAN
   ===================================================== */
.card {
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .1);
}
.service-card {
  transition: transform .25s ease, box-shadow .25s ease;
  height: 100%;
}
.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 28px -8px rgba(15, 76, 129, .22);
}
.service-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.7rem;
  background: #e0f2fe;
  color: var(--primary);
  flex-shrink: 0;
}
.icon-green  { background: #dcfce7; color: #15803d; }
.icon-amber  { background: #fef3c7; color: #b45309; }
.section-title { font-weight: 700; }

/* =====================================================
   BADGE STATUS — pill pastel ala project desa
   ===================================================== */
.badge-status {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 50px;
  font-size: .75rem;
  font-weight: 600;
  line-height: 1.4;
}
.badge-pending    { background: #fff7ed; color: #c2410c; }
.badge-verifikasi { background: #eff6ff; color: #1d4ed8; }
.badge-disetujui  { background: #f0fdf4; color: #15803d; }
.badge-ditolak    { background: #fef2f2; color: #b91c1c; }
.badge-soft-dark  { background: #f1f5f9; color: #334155; }

/* =====================================================
   FORM
   ===================================================== */
.form-control, .form-select {
  padding: .65rem .95rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #f8fafc;
  font-size: .95rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 76, 129, .1);
  background: #fff;
}
.form-label { font-size: .88rem; color: var(--text-main); }

/* =====================================================
   TABEL
   ===================================================== */
.table { font-size: .92rem; }
.table thead th {
  font-family: 'Poppins', sans-serif;
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-light);
  border-bottom: 2px solid var(--border);
}
.table > :not(caption) > * > * { vertical-align: middle; }

/* =====================================================
   ALERT / FLASH
   ===================================================== */
.alert { border-radius: 12px; border: none; font-size: .93rem; }

/* =====================================================
   LOGIN SPLIT-SCREEN — dot-grid ala project desa
   ===================================================== */
.login-wrapper {
  min-height: calc(100vh - 64px);
  background: #eef2f6 radial-gradient(#cbd5e1 1px, transparent 1px);
  background-size: 20px 20px;
  display: flex;
  align-items: center;
  padding: 40px 15px;
}
.login-container {
  display: flex;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, .1), 0 8px 10px -6px rgba(0, 0, 0, .06);
  background: #fff;
}
.login-banner {
  flex: 0 0 42%;
  background: var(--primary);
  color: #fff;
  padding: 50px 40px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
.login-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../img/hero.svg') center / cover;
  opacity: .18;
}
.login-banner > * { position: relative; z-index: 1; }
.login-banner.dark { background: var(--dark); }
.login-form-side { flex: 1; padding: 50px; }

@media (max-width: 767.98px) {
  .login-banner { display: none; }
  .login-form-side { padding: 32px 24px; }
}

/* =====================================================
   DASHBOARD — sidebar gelap 260px (admin/kades),
   putih untuk warga; topbar putih 70px; konten #f1f5f9
   ===================================================== */
.dashboard-layout { display: flex; min-height: 100vh; background: var(--light); }
.dash-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--dark);
  color: #94a3b8;
  display: flex;
  flex-direction: column;
}
.dash-sidebar.sidebar-light {
  background: #ffffff;
  color: var(--text-main);
  border-right: 1px solid var(--border);
}
.sidebar-header {
  height: 70px;
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: 0 22px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}
.sidebar-light .sidebar-header {
  color: var(--primary);
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
}
.sidebar-menu { padding: 14px 12px; flex: 1; }
.menu-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 13px 16px;
  margin-bottom: 4px;
  border-radius: 10px;
  border-left: 3px solid transparent;
  color: inherit;
  text-decoration: none;
  font-weight: 500;
  font-size: .93rem;
  transition: all .2s ease;
}
.menu-item i { font-size: 1.05rem; width: 20px; text-align: center; }
.menu-item:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.sidebar-light .menu-item:hover { background: #e3f0ff; color: var(--primary); }
.menu-item.active {
  background: rgba(255, 255, 255, .07);
  color: #fff;
  border-left-color: var(--primary);
}
.sidebar-light .menu-item.active {
  background: #e3f0ff;
  color: var(--primary);
  border-left-color: var(--primary);
}
.user-profile {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 16px 22px;
  border-top: 1px solid rgba(255, 255, 255, .1);
}
.sidebar-light .user-profile { border-top: 1px solid var(--border); }
.avatar-circle {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.top-bar {
  height: 70px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.main-content { flex: 1; min-width: 0; padding: 28px; }

.stat-card {
  border-radius: 16px;
  border-bottom: 4px solid transparent;
  height: 100%;
}
.accent-blue   { border-bottom-color: var(--primary); }
.accent-green  { border-bottom-color: var(--secondary); }
.accent-amber  { border-bottom-color: var(--warning); }
.accent-red    { border-bottom-color: var(--danger); }
.accent-slate  { border-bottom-color: #64748b; }
.stat-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
}

/* Kartu kontak berwarna ala "Hubungi Kami" */
.contact-card {
  border-bottom: 4px solid transparent;
  transition: transform .25s ease, box-shadow .25s ease;
  height: 100%;
}
.contact-card:hover { transform: translateY(-4px); box-shadow: 0 14px 28px -8px rgba(0, 0, 0, .15); }
.contact-blue  { border-bottom-color: var(--primary); }
.contact-green { border-bottom-color: var(--secondary); }
.contact-amber { border-bottom-color: var(--warning); }

/* Timeline pelacakan status */
.timeline-step {
  display: flex;
  gap: 14px;
  position: relative;
  padding-bottom: 26px;
}
.timeline-step::before {
  content: '';
  position: absolute;
  left: 17px;
  top: 36px;
  bottom: 0;
  width: 2px;
  background: var(--border);
}
.timeline-step:last-child::before { display: none; }
.timeline-dot {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  z-index: 1;
}

/* =====================================================
   CETAK SURAT (A4) — Times New Roman ala project desa
   ===================================================== */
.surat-a4 {
  width: 210mm;
  min-height: 297mm;
  margin: 0 auto;
  padding: 18mm 22mm;
  background: #fff;
  font-family: 'Times New Roman', serif;
  color: #000;
  box-shadow: 0 4px 30px rgba(0, 0, 0, .12);
}
.kop-surat {
  display: flex;
  align-items: center;
  gap: 18px;
  border-bottom: 3px double #000;
  padding-bottom: 10px;
  margin-bottom: 24px;
}
.kop-surat img { height: 80px; }
.kop-teks { flex: 1; text-align: center; line-height: 1.45; }
.isi-surat p { text-align: justify; line-height: 1.75; }
.ttd-surat { page-break-inside: avoid; }
.stempel {
  width: 95px; height: 95px;
  border: 2px dashed #999;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #999;
  font-size: .65rem;
  text-align: center;
  line-height: 1.2;
  transform: rotate(-12deg);
}

@media print {
  body { background: #fff !important; }
  .no-print, .navbar, footer, .top-bar, .dash-sidebar { display: none !important; }
  .surat-a4 { width: auto; margin: 0; padding: 12mm 18mm; box-shadow: none !important; }
  @page { size: A4; margin: 0; }
}
