/* ========================================================
   SISTEM KEUANGAN U45 — Premium Luxury Theme
   ======================================================== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  font-family: 'Inter', -apple-system, Segoe UI, Roboto, sans-serif;
  background: #f4f6fb;
  color: #1a1a2e;
  font-size: 14px;
  line-height: 1.5;
}

/* ============================================================
   LOGIN PAGE — Premium Luxury
   ============================================================ */
.login-body {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #4c1d95 100%);
}

.login-bg-shapes { position: absolute; inset: 0; overflow: hidden; }
.login-bg-shapes .shape {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: .5;
  animation: floatShape 20s infinite ease-in-out;
}
.shape-1 { width: 500px; height: 500px; background: #3b82f6; top: -100px; left: -100px; }
.shape-2 { width: 400px; height: 400px; background: #8b5cf6; bottom: -100px; right: -50px; animation-delay: -5s; }
.shape-3 { width: 300px; height: 300px; background: #ec4899; top: 50%; left: 50%; animation-delay: -10s; }
@keyframes floatShape {
  0%,100% { transform: translate(0,0) scale(1); }
  50%     { transform: translate(30px,-30px) scale(1.1); }
}

.login-box {
  position: relative; z-index: 2;
  background: rgba(255,255,255,.98);
  padding: 48px 40px;
  border-radius: 24px;
  width: 400px;
  box-shadow: 0 25px 60px rgba(0,0,0,.35), 0 0 0 1px rgba(255,255,255,.1);
  backdrop-filter: blur(20px);
  animation: fadeInUp .6s ease-out;
}
@keyframes fadeInUp {
  from { opacity:0; transform: translateY(30px); }
  to   { opacity:1; transform: translateY(0); }
}

.login-logo { text-align: center; margin-bottom: 20px; }
.login-logo img { width: 90px; height: 90px; object-fit: contain; }

.login-box h1 {
  font-size: 20px; font-weight: 800; text-align: center;
  background: linear-gradient(135deg, #1e3a8a, #7c3aed);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.login-box .subtitle { text-align: center; color:#64748b; margin-bottom:28px; font-size:13px; font-weight:500; }

.input-group { position: relative; margin-bottom: 14px; }
.input-group .input-icon {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  font-size: 16px; opacity: .5; pointer-events: none;
}
.input-group input {
  width: 100%; padding: 14px 16px 14px 46px;
  border: 2px solid #e2e8f0; border-radius: 12px;
  font-size: 14px; font-family: inherit;
  transition: all .2s; background: #f8fafc;
}
.input-group input:focus {
  outline: none; border-color: #3b82f6; background: #fff;
  box-shadow: 0 0 0 4px rgba(59,130,246,.15);
}

.login-box button {
  width: 100%; padding: 15px; margin-top: 10px;
  background: linear-gradient(135deg, #1e3a8a, #4c1d95);
  color: #fff; border: 0; border-radius: 12px;
  font-weight: 700; font-size: 15px; cursor: pointer;
  transition: all .3s; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.login-box button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(76,29,149,.4);
}
.login-box .login-footer { text-align:center; color:#94a3b8; font-size:11px; margin-top:24px; }

/* ============================================================
   APP LAYOUT
   ============================================================ */
.app { display: flex; min-height: 100vh; }

/* ============================================================
   SIDEBAR — Premium Luxury Multi-Color
   ============================================================ */
.sidebar {
  width: 260px;
  background: linear-gradient(180deg,
    #0f172a 0%,
    #1e293b 30%,
    #312e81 70%,
    #4c1d95 100%);
  color: #cbd5e1;
  padding: 24px 0;
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
  box-shadow: 4px 0 24px rgba(0,0,0,.15);
}
.sidebar::before {
  content: '';
  position: absolute; top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle at 50% 0%, rgba(139,92,246,.25) 0%, transparent 50%);
  pointer-events: none;
}
.sidebar::after {
  content: '';
  position: absolute; bottom: -100px; right: -100px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(236,72,153,.15) 0%, transparent 70%);
  pointer-events: none;
}

.sidebar .brand {
  display: flex; align-items: center; gap: 12px;
  padding: 0 20px 24px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  position: relative; z-index: 1;
}
.brand-logo {
  width: 44px; height: 44px; object-fit: contain;
  background: rgba(255,255,255,.08);
  border-radius: 12px; padding: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
}
.brand-text h1 {
  font-size: 20px; font-weight: 800;
  background: linear-gradient(135deg, #fbbf24, #f59e0b, #ec4899);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: .5px;
}
.brand-text small { color: #94a3b8; font-size: 10px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; }

.sidebar nav { flex: 1; padding: 20px 0; overflow-y: auto; position: relative; z-index: 1; }
.sidebar nav::-webkit-scrollbar { width: 4px; }
.sidebar nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 2px; }

.sidebar nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 20px; color: #cbd5e1;
  text-decoration: none; font-size: 13.5px; font-weight: 500;
  margin: 2px 10px; border-radius: 10px;
  transition: all .2s; position: relative;
}
.sidebar nav a .nav-icon {
  font-size: 16px; width: 22px; text-align: center;
  filter: grayscale(.3);
  transition: filter .2s;
}
.sidebar nav a:hover {
  background: rgba(255,255,255,.08); color: #fff;
  transform: translateX(4px);
}
.sidebar nav a:hover .nav-icon { filter: grayscale(0); }
.sidebar nav a.active {
  background: linear-gradient(135deg, rgba(59,130,246,.9), rgba(139,92,246,.9));
  color: #fff; font-weight: 600;
  box-shadow: 0 8px 20px rgba(59,130,246,.35), inset 0 1px 0 rgba(255,255,255,.15);
}
.sidebar nav a.active .nav-icon { filter: grayscale(0); }
.sidebar nav a.active::before {
  content: ''; position: absolute; left: -10px; top: 50%; transform: translateY(-50%);
  width: 4px; height: 24px; background: linear-gradient(180deg, #fbbf24, #ec4899);
  border-radius: 0 4px 4px 0;
}

.sidebar .nav-group {
  padding: 18px 20px 6px;
  font-size: 10px; color: #64748b;
  text-transform: uppercase; font-weight: 700;
  letter-spacing: 1.2px;
}

.user-box {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 16px 20px; display: flex; align-items: center; gap: 12px;
  position: relative; z-index: 1;
  background: rgba(0,0,0,.15);
}
.user-avatar {
  width: 38px; height: 38px; border-radius: 12px;
  background: linear-gradient(135deg, #f59e0b, #ec4899);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 15px;
  box-shadow: 0 4px 12px rgba(236,72,153,.3);
}
.user-info { flex: 1; min-width: 0; }
.user-name { color: #fff; font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { color: #94a3b8; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; }
.user-box .logout {
  color: #f87171; font-size: 18px; text-decoration: none;
  padding: 6px 10px; border-radius: 8px;
  transition: all .2s;
}
.user-box .logout:hover { background: rgba(248,113,113,.15); }

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main { flex: 1; padding: 28px 32px; overflow-y: auto; }

.page-header { margin-bottom: 24px; }
.page-header h2 {
  font-size: 24px; font-weight: 800; color: #0f172a;
  letter-spacing: -.5px;
}
.page-sub { color: #64748b; font-size: 13px; margin-top: 2px; }

h2 { margin-bottom: 20px; color: #0f172a; font-size: 22px; font-weight: 800; letter-spacing: -.5px; }
h3 { margin-bottom: 14px; font-size: 15px; color: #1e293b; font-weight: 700; display: flex; align-items: center; gap: 8px; }
h3 small { font-weight: 400; color: #64748b; font-size: 12px; }

/* ============================================================
   CARDS
   ============================================================ */
.cards { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; margin-bottom: 26px; }
.cards-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 18px; margin-bottom: 20px; }

.card {
  background: #fff; padding: 22px;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04);
  border: 1px solid #eef2f7;
  transition: all .25s;
  position: relative; overflow: hidden;
}
.card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 4px; background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
  opacity: 0; transition: opacity .25s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(15,23,42,.1); }
.card:hover::before { opacity: 1; }
.card-label { font-size: 11.5px; color: #64748b; font-weight: 600; text-transform: uppercase; letter-spacing: .6px; margin-bottom: 10px; }
.card-value { font-size: 20px; font-weight: 800; color: #0f172a; letter-spacing: -.5px; }

.stat-card {
  background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
  padding: 24px; border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(15,23,42,.06);
}
.stat-card .stat-label { font-size: 12px; color: #64748b; font-weight: 600; text-transform: uppercase; letter-spacing: .6px; margin-bottom: 8px; }
.stat-card .stat-value { font-size: 22px; font-weight: 800; color: #0f172a; }
.stat-aman { background: linear-gradient(135deg, #ecfdf5, #d1fae5); border-color: #86efac; }
.stat-aman .stat-value { color: #065f46; }
.stat-waspada { background: linear-gradient(135deg, #fffbeb, #fef3c7); border-color: #fcd34d; }
.stat-waspada .stat-value { color: #92400e; }
.stat-bahaya { background: linear-gradient(135deg, #fef2f2, #fee2e2); border-color: #fca5a5; }
.stat-bahaya .stat-value { color: #991b1b; }

/* ============================================================
   PANEL PREMIUM
   ============================================================ */
.panel {
  background: #fff; padding: 24px;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(15,23,42,.06);
  border: 1px solid #eef2f7;
  margin-bottom: 22px;
}
.panel-premium { position: relative; }
.panel-premium::before {
  content: ''; position: absolute; top: 0; left: 24px; right: 24px;
  height: 2px; background: linear-gradient(90deg, transparent, #8b5cf6, transparent);
  opacity: .5;
}
.panel-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px; flex-wrap: wrap; gap: 10px;
}
.panel-head h3 { margin: 0; }
.panel-actions { display: flex; gap: 8px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }

/* ============================================================
   FORM
   ============================================================ */
label { display: block; font-size: 12px; color: #334155; margin: 12px 0 5px; font-weight: 600; }
input, select, textarea {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid #e2e8f0; border-radius: 10px;
  font-size: 13.5px; font-family: inherit;
  background: #f8fafc; color: #0f172a;
  transition: all .2s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: #3b82f6; background: #fff;
  box-shadow: 0 0 0 4px rgba(59,130,246,.12);
}
textarea { min-height: 70px; resize: vertical; }

.btn-premium {
  padding: 12px 26px;
  background: linear-gradient(135deg, #1e3a8a, #7c3aed);
  color: #fff; border: 0; border-radius: 10px;
  cursor: pointer; font-weight: 700; font-size: 13.5px;
  margin-top: 12px; transition: all .25s;
  box-shadow: 0 4px 12px rgba(124,58,237,.25);
}
.btn-premium:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(124,58,237,.4);
}

.btn-cancel {
  display: inline-block; padding: 12px 22px;
  background: #f1f5f9; color: #475569;
  text-decoration: none; border-radius: 10px;
  margin-left: 6px; font-size: 13.5px; font-weight: 600;
  transition: all .2s;
}
.btn-cancel:hover { background: #e2e8f0; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-inline { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.form-inline select { width: auto; min-width: 240px; }
.select-filter { width: auto; min-width: 260px; }

/* ============================================================
   TABLE PREMIUM
   ============================================================ */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  background: linear-gradient(180deg, #f8fafc, #f1f5f9);
  padding: 12px 14px; text-align: left;
  border-bottom: 2px solid #e2e8f0;
  font-size: 11px; color: #475569;
  text-transform: uppercase; font-weight: 700; letter-spacing: .6px;
}
.table td { padding: 13px 14px; border-bottom: 1px solid #f1f5f9; color: #1e293b; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover td { background: #f8fafc; }
.table .tr-total td { background: linear-gradient(90deg, #eff6ff, #f5f3ff); font-weight: 700; }
.text-right { text-align: right; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px;
  background: #f1f5f9; text-decoration: none;
  font-size: 14px; transition: all .2s; margin-right: 4px;
}
.btn-icon:hover { background: #dbeafe; transform: scale(1.05); }
.btn-icon-danger:hover { background: #fee2e2; }

.btn-sm {
  display: inline-block; padding: 6px 14px;
  background: #3b82f6; color: #fff; text-decoration: none;
  border-radius: 6px; font-size: 12px; font-weight: 600;
  transition: all .2s;
}
.btn-danger { background: #ef4444; }
.btn-sm:hover { opacity: .88; transform: translateY(-1px); }

.btn-export {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 8px;
  font-size: 12.5px; font-weight: 700;
  text-decoration: none; transition: all .2s;
}
.btn-excel { background: linear-gradient(135deg, #16a34a, #22c55e); color: #fff; box-shadow: 0 4px 10px rgba(34,197,94,.3); }
.btn-pdf   { background: linear-gradient(135deg, #dc2626, #ef4444); color: #fff; box-shadow: 0 4px 10px rgba(239,68,68,.3); }
.btn-export:hover { transform: translateY(-1px); filter: brightness(1.05); }

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-block; padding: 3px 10px;
  border-radius: 20px; font-size: 11px; font-weight: 700;
  letter-spacing: .3px;
}
.badge-blue   { background: #dbeafe; color: #1e40af; }
.badge-green  { background: #dcfce7; color: #166534; }
.badge-purple { background: #ede9fe; color: #5b21b6; }
.badge-gray   { background: #f1f5f9; color: #475569; }

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
  padding: 14px 18px; border-radius: 12px;
  margin-bottom: 16px; font-size: 13.5px;
  border-left: 4px solid;
  font-weight: 500;
}
.alert-success { background: linear-gradient(90deg, #ecfdf5, #d1fae5); color: #065f46; border-color: #10b981; }
.alert-error   { background: linear-gradient(90deg, #fef2f2, #fee2e2); color: #991b1b; border-color: #ef4444; }
.alert-warn    { background: linear-gradient(90deg, #fffbeb, #fef3c7); color: #92400e; border-color: #f59e0b; }
.info-bar {
  background: linear-gradient(90deg, #eff6ff, #eef2ff);
  color: #1e40af; padding: 14px 18px;
  border-radius: 12px; margin-bottom: 18px; font-size: 13px;
  border-left: 4px solid #3b82f6;
}

/* ============================================================
   LISTS
   ============================================================ */
.list-rekomendasi { list-style: none; padding: 0; }
.list-rekomendasi li {
  padding: 12px 16px; margin-bottom: 8px;
  background: #f8fafc; border-radius: 10px;
  border-left: 3px solid #8b5cf6;
  font-size: 13.5px; color: #334155;
}

/* ============================================================
   TEXT UTILS
   ============================================================ */
.text-green { color: #16a34a !important; font-weight: 600; }
.text-red   { color: #dc2626 !important; font-weight: 600; }
.text-right { text-align: right; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .cards { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 900px) {
  .app { flex-direction: column; }
  .sidebar { width: 100%; flex-direction: row; padding: 12px; }
  .sidebar .brand { padding: 0 12px; border: 0; }
  .sidebar nav { display: flex; overflow-x: auto; padding: 0; }
  .sidebar nav a { margin: 0 4px; white-space: nowrap; }
  .nav-group { display: none; }
  .user-box { border: 0; }
  .main { padding: 20px; }
  .cards, .cards-2, .grid-2, .form-grid { grid-template-columns: 1fr; }
}
/* ============================================================
   TANDA TANGAN — 4 KOLOM
   ============================================================ */
.laporan-ttd {
  margin-top: 40px;
  page-break-inside: avoid;
}

.laporan-ttd-intro {
  font-size: 11.5px;
  color: #475569;
  margin-bottom: 14px;
  line-height: 1.6;
}

.laporan-ttd-lokasi {
  font-size: 12px;
  color: #1a1a2e;
  margin-bottom: 24px;
  text-align: right;
  padding-right: 12px;
}

.laporan-ttd-table {
  width: 100%;
  border-collapse: collapse;
  border: 0;
  margin-top: 10px;
}

.laporan-ttd-table td {
  border: 0 !important;
  padding: 6px 4px;
  vertical-align: top;
  text-align: center;
}

/* Jabatan (Dibuat oleh, Diperiksa oleh, dst) */
.ttd-jabatan {
  font-size: 11px;
  color: #64748b;
  font-style: italic;
  margin-bottom: 2px;
}

/* Label jabatan utama (Kabag Keuangan, dst) */
.ttd-label {
  font-size: 12px;
  font-weight: 700;
  color: #1e3a8a;
  margin-bottom: 4px;
  letter-spacing: .3px;
}

/* Ruang kosong untuk tanda tangan */
.ttd-space {
  height: 75px;
  position: relative;
}

/* Nama (garis bawah) */
.ttd-nama {
  font-size: 12px;
  color: #1a1a2e;
  font-weight: 600;
  margin-bottom: 2px;
  letter-spacing: 1px;
}

/* NIP */
.ttd-nip {
  font-size: 10.5px;
  color: #64748b;
}

/* Garis pemisah di atas area ttd */
.laporan-ttd-table tr:first-child td::before {
  content: '';
  display: block;
  border-top: 2px solid #1e3a8a;
  width: 60%;
  margin: 0 auto 12px;
}

/* ============================================================
   PRINT — TTD 4 KOLOM
   ============================================================ */
@media print {
  .laporan-ttd {
    margin-top: 30px;
    page-break-inside: avoid;
    page-break-before: auto;
  }

  .laporan-ttd-intro {
    font-size: 9.5pt;
  }

  .laporan-ttd-lokasi {
    font-size: 10pt;
    margin-bottom: 20px;
  }

  .ttd-jabatan { font-size: 9pt; }
  .ttd-label   { font-size: 10pt; }
  .ttd-space   { height: 70px; }
  .ttd-nama    { font-size: 10pt; }
  .ttd-nip     { font-size: 8.5pt; }

  .laporan-ttd-table tr:first-child td::before {
    border-top: 2px solid #1e3a8a;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* Responsive untuk layar kecil */
@media screen and (max-width: 768px) {
  .laporan-ttd-table,
  .laporan-ttd-table tbody,
  .laporan-ttd-table tr,
  .laporan-ttd-table td {
    display: block;
    width: 100% !important;
  }
  .laporan-ttd-table td {
    margin-bottom: 30px;
  }
  .ttd-space { height: 60px; }
  .laporan-ttd-lokasi { text-align: center; }
}
/* ============================================================
   LAPORAN GABUNGAN — SIAP CETAK
   ============================================================ */
.laporan-gabungan {
  background: #fff;
  padding: 30px 40px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(15,23,42,.06);
  max-width: 1200px;
  margin: 0 auto;
  font-family: 'Inter', Arial, sans-serif;
  color: #1a1a2e;
}

/* Header */
.laporan-header {
  display: flex; align-items: center; gap: 20px;
  padding-bottom: 16px; border-bottom: 3px double #1e3a8a;
  margin-bottom: 8px;
}
.laporan-logo {
  width: 80px; height: 80px; object-fit: contain;
}
.laporan-header-text { flex: 1; }
.laporan-header-text h1 {
  font-size: 22px; font-weight: 800; color: #1e3a8a;
  letter-spacing: 1px; margin-bottom: 2px;
}
.laporan-sub {
  font-size: 14px; font-weight: 700; color: #4c1d95;
  letter-spacing: 1.5px; margin-bottom: 6px;
}
.laporan-periode {
  font-size: 12px; color: #475569; line-height: 1.5;
}
.laporan-tanggal { color: #64748b; font-size: 11px; }

.laporan-divider {
  border: 0; height: 2px;
  background: linear-gradient(90deg, #1e3a8a, #7c3aed, #ec4899);
  margin: 12px 0 24px;
}

/* Section */
.laporan-section { margin-bottom: 26px; page-break-inside: avoid; }
.laporan-section-title {
  font-size: 14px; font-weight: 800; color: #1e3a8a;
  background: linear-gradient(90deg, #eff6ff, transparent);
  padding: 8px 14px; border-left: 4px solid #3b82f6;
  margin-bottom: 12px; letter-spacing: .5px;
}

/* Cards */
.laporan-cards {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 12px;
}
.laporan-card {
  padding: 14px 16px; border-radius: 10px;
  border: 1px solid #e2e8f0; background: #f8fafc;
}
.laporan-card-label {
  font-size: 10.5px; color: #64748b;
  text-transform: uppercase; font-weight: 700;
  letter-spacing: .5px; margin-bottom: 6px;
}
.laporan-card-value {
  font-size: 16px; font-weight: 800; color: #0f172a;
}
.laporan-card-green  { background: #ecfdf5; border-color: #86efac; }
.laporan-card-green .laporan-card-value { color: #065f46; }
.laporan-card-red    { background: #fef2f2; border-color: #fca5a5; }
.laporan-card-red .laporan-card-value { color: #991b1b; }
.laporan-card-blue   { background: #eff6ff; border-color: #93c5fd; }
.laporan-card-blue .laporan-card-value { color: #1e40af; }
.laporan-card-purple { background: #f5f3ff; border-color: #c4b5fd; }
.laporan-card-purple .laporan-card-value { color: #5b21b6; }

/* Table */
.laporan-table {
  width: 100%; border-collapse: collapse;
  font-size: 11.5px; margin-bottom: 6px;
}
.laporan-table th {
  background: linear-gradient(180deg, #1e3a8a, #1e40af);
  color: #fff; padding: 8px 10px;
  font-weight: 700; font-size: 11px;
  text-transform: uppercase; letter-spacing: .4px;
  border: 1px solid #1e3a8a;
}
.laporan-table td {
  padding: 7px 10px; border: 1px solid #cbd5e1;
  vertical-align: top;
}
.laporan-table tbody tr:nth-child(even) td { background: #f8fafc; }
.laporan-table tfoot .laporan-total-row td {
  background: linear-gradient(90deg, #dbeafe, #e0e7ff) !important;
  font-weight: 700; border-top: 2px solid #1e3a8a;
}
.laporan-table tfoot .laporan-pct-row td {
  background: #f1f5f9 !important; color: #64748b;
  font-size: 10.5px;
}

.laporan-empty {
  padding: 14px; background: #f8fafc;
  border-left: 3px solid #cbd5e1;
  color: #64748b; font-style: italic; font-size: 12px;
}

.text-cocok { color: #16a34a; font-weight: 700; }
.text-selisih { color: #dc2626; font-weight: 700; }

.status-aman    { color: #16a34a; }
.status-waspada { color: #d97706; }
.status-bahaya  { color: #dc2626; }

/* Rekomendasi */
.laporan-rekomendasi {
  margin-top: 14px; padding: 14px 18px;
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border-left: 4px solid #f59e0b;
  border-radius: 8px;
}
.laporan-rekomendasi h3 {
  font-size: 12.5px; color: #92400e;
  margin-bottom: 8px; font-weight: 700;
}
.laporan-rekomendasi ol {
  padding-left: 20px; font-size: 12px;
  color: #78350f; line-height: 1.7;
}

/* TTD */
.laporan-ttd { margin-top: 40px; page-break-inside: avoid; }
.laporan-ttd p { font-size: 12px; margin-bottom: 4px; }

/* Footer */
.laporan-footer {
  margin-top: 30px; padding-top: 12px;
  border-top: 1px solid #e2e8f0;
  text-align: center; color: #64748b;
}
.laporan-footer p { font-size: 10.5px; margin-bottom: 3px; }

/* ============================================================
   PRINT STYLES — untuk cetak/save PDF dari browser
   ============================================================ */
@media print {
  @page {
    size: A4;
    margin: 15mm 12mm;
  }

  body {
    background: #fff !important;
    font-size: 10pt;
  }

  /* Sembunyikan elemen non-cetak */
  .sidebar,
  .no-print,
  .page-header,
  .panel,
  .alert,
  nav,
  header,
  footer:not(.laporan-footer) {
    display: none !important;
  }

  .app { display: block !important; }
  .main { padding: 0 !important; }

  .laporan-gabungan {
    box-shadow: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    max-width: 100% !important;
  }

  .laporan-section { page-break-inside: avoid; }

  .laporan-table {
    font-size: 9pt;
    page-break-inside: auto;
  }
  .laporan-table tr { page-break-inside: avoid; }
  .laporan-table th {
    background: #1e3a8a !important;
    color: #fff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .laporan-table tfoot .laporan-total-row td {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .laporan-cards {
    page-break-inside: avoid;
  }
  .laporan-card {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .laporan-rekomendasi {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Link tidak perlu ditampilkan URL-nya */
  a { color: inherit !important; text-decoration: none !important; }
  a[href]:after { content: "" !important; }
}