/* ============================================================
   SIMKIN — tema VibeCoder (indigo/violet, kartu kaca)
   ============================================================ */

:root {
  --indigo: #4F46E5;
  --indigo-deep: #4338CA;
  --violet: #8B5CF6;
  --pink: #EC4899;
  --sky: #0EA5E9;
  --grad: linear-gradient(135deg, #4F46E5 0%, #8B5CF6 100%);
  --grad-lembut: linear-gradient(135deg, rgba(79, 70, 229, .12) 0%, rgba(139, 92, 246, .12) 100%);

  --ink: #1F1B3A;
  --ink-2: #3D3663;
  --muted: #635F82;
  --muted-2: #7C7899;

  --ok: #0E9F6E;
  --ok-soft: #E4F7EF;
  --biru: #2563EB;
  --biru-soft: #E7EEFE;
  --kuning: #B45309;
  --kuning-soft: #FEF3C7;
  --oranye: #EA580C;
  --oranye-soft: #FFEDD5;
  --merah: #DC2626;
  --merah-soft: #FEE2E2;
  --ungu: #7C3AED;
  --ungu-soft: #F1E9FE;

  --kaca: rgba(255, 255, 255, .62);
  --kaca-solid: rgba(255, 255, 255, .92);
  --garis: rgba(79, 70, 229, .14);
  --garis-kuat: rgba(79, 70, 229, .26);
  --radius: 18px;
  --radius-sm: 12px;
  --bayang: 0 18px 40px rgba(79, 70, 229, .10);
  --bayang-sm: 0 4px 14px rgba(79, 70, 229, .08);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: #F3F0FF;
  background-attachment: fixed;
}

.blob { position: fixed; border-radius: 50%; filter: blur(80px); opacity: .55; z-index: 0; pointer-events: none; }
.blob-1 { width: 460px; height: 460px; background: #A5B4FC; top: -160px; left: -140px; }
.blob-2 { width: 400px; height: 400px; background: #F5D0FE; top: 18%; right: -150px; opacity: .5; }
.blob-3 { width: 380px; height: 380px; background: #BAE6FD; bottom: -170px; left: 28%; opacity: .45; }

a { color: var(--indigo-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { margin: 0; line-height: 1.25; color: var(--ink); font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.18rem; }
h3 { font-size: 1rem; }
p { margin: 0; }
small { font-size: .78rem; }
strong { font-weight: 700; }

.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.text-right { text-align: right; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0 !important; }
.mb-24 { margin-bottom: 24px; }

/* ---------------- Topbar ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: rgba(255, 255, 255, .72);
  border-bottom: 1px solid var(--garis);
}
.topbar-inner {
  max-width: 1420px; margin: 0 auto; padding: 12px 22px;
  display: flex; align-items: center; gap: 18px;
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; flex: 0 0 auto; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center;
  background: var(--grad); color: #fff;
  box-shadow: 0 10px 22px rgba(79, 70, 229, .32);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1.02rem; letter-spacing: .02em; }
.brand-text small { color: var(--muted-2); font-size: .7rem; max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.nav { display: flex; gap: 4px; flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: thin; }
.nav-link {
  padding: 8px 12px; border-radius: 999px; color: var(--ink-2); font-weight: 600; font-size: .86rem;
  text-decoration: none; transition: .18s; white-space: nowrap; flex: 0 0 auto;
}
.nav-link:hover { background: rgba(79, 70, 229, .1); color: var(--indigo-deep); text-decoration: none; }
.nav-link.is-active { background: var(--grad); color: #fff; box-shadow: 0 8px 18px rgba(79, 70, 229, .28); }

.userbox { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.userbox-link {
  display: flex; align-items: center; gap: 10px; text-decoration: none;
  padding: 4px 10px 4px 4px; border-radius: 999px; transition: .16s;
}
.userbox-link:hover { background: rgba(79, 70, 229, .1); text-decoration: none; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--grad); color: #fff; font-weight: 700; font-size: .85rem; flex: 0 0 auto;
}
.userbox-text { display: flex; flex-direction: column; line-height: 1.2; }
.userbox-text strong { font-size: .85rem; }
.userbox-text small { color: var(--muted-2); font-size: .7rem; }

/* ---------------- Layout ---------------- */
.wrap { position: relative; z-index: 1; max-width: 1420px; margin: 0 auto; padding: 28px 22px 60px; }

.page-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px;
  margin-bottom: 26px; flex-wrap: wrap;
}
.page-head h1 { font-size: 1.75rem; }
.page-head p { color: var(--muted); margin-top: 5px; max-width: 78ch; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.section { margin-top: 40px; }
.section-head { margin-bottom: 18px; display: flex; flex-direction: column; gap: 4px; }
.section-head p { color: var(--muted); }

.grid { display: grid; gap: 20px; }
/* Anak grid/flex tidak boleh melebihi kolomnya (tabel lebar di dalam kartu). */
.grid > *, .stat-grid > * { min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.stat-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

/* ---------------- Kartu kaca ---------------- */
.card {
  background: var(--kaca);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: var(--radius);
  box-shadow: var(--bayang);
  padding: 22px;
}
.card-pad { padding: 22px; }
.card h2, .card h3 { margin-bottom: 8px; }
.card > p { color: var(--muted); }
.card-ketat { padding: 0; overflow: hidden; }

.stat-card {
  background: var(--kaca);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: var(--radius);
  box-shadow: var(--bayang-sm);
  padding: 20px;
  display: flex; flex-direction: column; gap: 4px;
  position: relative; overflow: hidden;
}
.stat-card::after {
  content: ''; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--grad); opacity: .85;
}
.stat-label { font-size: .78rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.stat-value { font-size: 1.7rem; line-height: 1.15; }
.stat-note { font-size: .78rem; color: var(--muted-2); }
.stat-ok::after { background: linear-gradient(180deg, #0E9F6E, #34D399); }
.stat-kuning::after { background: linear-gradient(180deg, #F59E0B, #FBBF24); }
.stat-merah::after { background: linear-gradient(180deg, #DC2626, #F87171); }
.stat-biru::after { background: linear-gradient(180deg, #2563EB, #60A5FA); }

/* ---------------- Tombol ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 12px; border: 1px solid transparent;
  background: var(--grad); color: #fff; font-weight: 600; font-size: .88rem; font-family: var(--font);
  cursor: pointer; transition: .18s; text-decoration: none; line-height: 1.2;
  box-shadow: 0 10px 20px rgba(79, 70, 229, .22);
}
.btn:hover { transform: translateY(-1px); text-decoration: none; color: #fff; box-shadow: 0 14px 26px rgba(79, 70, 229, .28); }
.btn:active { transform: translateY(0); }
.btn-ghost {
  background: rgba(255, 255, 255, .7); color: var(--indigo-deep); border-color: var(--garis-kuat); box-shadow: none;
}
.btn-ghost:hover { background: #fff; color: var(--indigo-deep); box-shadow: var(--bayang-sm); }
.btn-sm { padding: 7px 12px; font-size: .8rem; border-radius: 10px; }
.btn-lg { padding: 13px 24px; font-size: .95rem; }
.btn-danger { background: linear-gradient(135deg, #DC2626, #F87171); box-shadow: 0 10px 20px rgba(220, 38, 38, .22); }
.btn-ok { background: linear-gradient(135deg, #0E9F6E, #34D399); box-shadow: 0 10px 20px rgba(14, 159, 110, .22); }
.btn-baris { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn:disabled, .btn.is-off { opacity: .55; cursor: not-allowed; box-shadow: none; }

/* ---------------- Formulir ---------------- */
.form { display: flex; flex-direction: column; gap: 20px; }
.form-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-weight: 600; font-size: .84rem; color: var(--ink-2); }
.field .hint, .hint { font-size: .76rem; color: var(--muted-2); }
input[type=text], input[type=password], input[type=email], input[type=number], input[type=date],
input[type=search], input[type=url], select, textarea {
  width: 100%; padding: 10px 13px; border-radius: var(--radius-sm);
  border: 1px solid var(--garis-kuat); background: rgba(255, 255, 255, .86);
  font-family: var(--font); font-size: .9rem; color: var(--ink); transition: .16s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(79, 70, 229, .14); background: #fff;
}
textarea { min-height: 92px; resize: vertical; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 18px, calc(100% - 13px) 18px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.form-aksi { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; border-top: 1px solid var(--garis); padding-top: 20px; }
.check { display: flex; align-items: center; gap: 8px; font-size: .87rem; color: var(--ink-2); }
.check input { width: auto; }
.filter-bar {
  display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end;
  background: var(--kaca); border: 1px solid rgba(255, 255, 255, .6); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--bayang-sm); margin-bottom: 22px;
}
.filter-bar .field { min-width: 165px; flex: 0 1 auto; }
.filter-bar .field input, .filter-bar .field select { min-width: 150px; }

/* ---------------- Tabel ---------------- */
.table-wrap {
  overflow-x: auto; border-radius: var(--radius); border: 1px solid rgba(255, 255, 255, .6);
  background: var(--kaca); backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: var(--bayang);
}
table.table { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.table th, table.table td { padding: 12px 15px; text-align: left; vertical-align: middle; }
table.table thead th {
  background: rgba(79, 70, 229, .07); font-size: .76rem; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); font-weight: 700; white-space: nowrap;
}
table.table tbody tr { border-top: 1px solid var(--garis); }
table.table tbody tr:hover { background: rgba(255, 255, 255, .5); }
table.table td.kecil { font-size: .8rem; color: var(--muted); }
table.table .angka { font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-aksi { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------------- Badge / pill ---------------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px;
  font-size: .74rem; font-weight: 700; white-space: nowrap; border: 1px solid transparent;
}
.badge-ok { background: var(--ok-soft); color: var(--ok); border-color: rgba(14, 159, 110, .22); }
.badge-biru { background: var(--biru-soft); color: var(--biru); border-color: rgba(37, 99, 235, .22); }
.badge-kuning { background: var(--kuning-soft); color: var(--kuning); border-color: rgba(180, 83, 9, .22); }
.badge-oranye { background: var(--oranye-soft); color: var(--oranye); border-color: rgba(234, 88, 12, .22); }
.badge-merah { background: var(--merah-soft); color: var(--merah); border-color: rgba(220, 38, 38, .22); }
.badge-ungu { background: var(--ungu-soft); color: var(--ungu); border-color: rgba(124, 58, 237, .22); }
.badge-netral { background: rgba(99, 95, 130, .1); color: var(--muted); border-color: rgba(99, 95, 130, .18); }

.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px;
  background: rgba(79, 70, 229, .1); color: var(--indigo-deep); font-size: .78rem; font-weight: 600;
}
.pill-lembut { background: rgba(255, 255, 255, .75); color: var(--muted); border: 1px solid var(--garis); }
.meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* ---------------- Progres & grafik ---------------- */
.progres-wrap { display: flex; flex-direction: column; gap: 5px; min-width: 120px; }
.progres { height: 9px; border-radius: 999px; background: rgba(79, 70, 229, .12); overflow: hidden; }
.progres-isi { display: block; height: 100%; border-radius: 999px; background: var(--grad); }
.progres-isi.bar-ok { background: linear-gradient(135deg, #0E9F6E, #34D399); }
.progres-isi.bar-kuning { background: linear-gradient(135deg, #F59E0B, #FBBF24); }
.progres-teks { font-size: .76rem; color: var(--muted-2); }

.grafik { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.grafik-baris { display: grid; grid-template-columns: 128px 1fr 84px; gap: 12px; align-items: center; }
.grafik-label { display: flex; }
.grafik-bar { height: 12px; border-radius: 999px; background: rgba(79, 70, 229, .1); overflow: hidden; }
.grafik-isi { display: block; height: 100%; border-radius: 999px; background: var(--grad); }
.grafik-isi.warna-ok { background: linear-gradient(135deg, #0E9F6E, #34D399); }
.grafik-isi.warna-biru { background: linear-gradient(135deg, #2563EB, #60A5FA); }
.grafik-isi.warna-kuning { background: linear-gradient(135deg, #F59E0B, #FBBF24); }
.grafik-isi.warna-oranye { background: linear-gradient(135deg, #EA580C, #FB923C); }
.grafik-isi.warna-merah { background: linear-gradient(135deg, #DC2626, #F87171); }
.grafik-isi.warna-ungu { background: var(--grad); }
.grafik-nilai { font-size: .8rem; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }

/* ---------------- Kartu nilai ---------------- */
.nilai-card { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.nilai-bulat {
  width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center; line-height: 1.1;
  background: var(--grad-lembut); border: 2px solid rgba(79, 70, 229, .2); flex: 0 0 auto; text-align: center;
}
.nilai-bulat strong { font-size: 1.9rem; display: block; }
.nilai-bulat small { font-size: .7rem; color: var(--muted-2); }
.nilai-bulat.nilai-ok { background: rgba(14, 159, 110, .12); border-color: rgba(14, 159, 110, .3); color: var(--ok); }
.nilai-bulat.nilai-biru { background: rgba(37, 99, 235, .1); border-color: rgba(37, 99, 235, .28); color: var(--biru); }
.nilai-bulat.nilai-kuning { background: rgba(245, 158, 11, .14); border-color: rgba(245, 158, 11, .3); color: var(--kuning); }
.nilai-bulat.nilai-oranye { background: rgba(234, 88, 12, .12); border-color: rgba(234, 88, 12, .3); color: var(--oranye); }
.nilai-bulat.nilai-merah { background: rgba(220, 38, 38, .1); border-color: rgba(220, 38, 38, .28); color: var(--merah); }
.nilai-rinci { display: flex; flex-direction: column; gap: 9px; min-width: 240px; flex: 1 1 260px; }
.nilai-baris { display: flex; justify-content: space-between; gap: 14px; align-items: center; border-bottom: 1px dashed var(--garis); padding-bottom: 7px; }
.nilai-baris span { color: var(--muted); font-size: .85rem; }

/* ---------------- Daftar & detail ---------------- */
.kv { display: flex; flex-direction: column; gap: 10px; }
.kv-baris { display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px dashed var(--garis); padding-bottom: 8px; }
.kv-baris span { color: var(--muted); font-size: .84rem; }
.kv-baris strong { text-align: right; }

.list-baris { display: flex; flex-direction: column; gap: 12px; }
.item-baris {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 14px 16px; border-radius: var(--radius-sm); background: rgba(255, 255, 255, .55);
  border: 1px solid var(--garis);
}
.item-baris:hover { background: rgba(255, 255, 255, .8); }

.empty {
  padding: 34px 24px; text-align: center; border-radius: var(--radius);
  border: 1px dashed var(--garis-kuat); background: rgba(255, 255, 255, .45); color: var(--muted);
}
.empty p { margin-bottom: 14px; }

.alert { padding: 13px 17px; border-radius: var(--radius-sm); font-size: .88rem; font-weight: 500; border: 1px solid transparent; }
.alert-ok { background: var(--ok-soft); color: #0A6B4A; border-color: rgba(14, 159, 110, .25); }
.alert-info { background: var(--biru-soft); color: #1D4ED8; border-color: rgba(37, 99, 235, .2); }
.alert-warn { background: var(--kuning-soft); color: #92400E; border-color: rgba(180, 83, 9, .22); }
.alert-err { background: var(--merah-soft); color: #991B1B; border-color: rgba(220, 38, 38, .22); }
.flash-stack { display: flex; flex-direction: column; gap: 10px; max-width: 1420px; margin: 18px auto 0; padding: 0 22px; }

.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }

/* ---------------- Halaman depan ---------------- */
.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 32px; align-items: start; margin: 18px 0 8px; }
.hero h1 { font-size: 2.15rem; line-height: 1.18; }
.lead { color: var(--muted); font-size: 1rem; margin-top: 14px; }
.hero-kartu { padding: 24px; }
.langkah { display: flex; flex-direction: column; gap: 16px; }
.langkah-item { display: flex; gap: 13px; align-items: flex-start; }
.langkah-no {
  width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; flex: 0 0 auto;
  background: var(--grad); color: #fff; font-weight: 700; font-size: .84rem;
}
.fitur { display: flex; flex-direction: column; gap: 8px; }
.fitur strong { font-size: .95rem; }

.auth-wrap { max-width: 460px; margin: 46px auto 0; }
.auth-wrap .card { padding: 30px; }
.auth-head { margin-bottom: 22px; }

/* ---------------- Rapor (siap cetak) ---------------- */
.rapor { background: #fff; border-radius: var(--radius); padding: 30px 34px; box-shadow: var(--bayang); border: 1px solid var(--garis); }
.rapor-kop { display: flex; align-items: center; gap: 18px; border-bottom: 3px double var(--garis-kuat); padding-bottom: 16px; margin-bottom: 6px; }
.rapor-kop .mark { width: 58px; height: 58px; border-radius: 16px; background: var(--grad); display: grid; place-items: center; color: #fff; flex: 0 0 auto; }
.rapor-kop h2 { font-size: 1.25rem; letter-spacing: .02em; }
.rapor-kop p { color: var(--muted); font-size: .84rem; }
.rapor-judul { text-align: center; margin: 18px 0 22px; }
.rapor-judul h3 { font-size: 1.05rem; text-transform: uppercase; letter-spacing: .06em; }
.rapor-identitas { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px 26px; margin-bottom: 22px; }
.rapor-identitas .kv-baris { border-bottom: 1px dotted var(--garis); }
.rapor-kotak { border: 1px solid var(--garis-kuat); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 18px; background: rgba(79, 70, 229, .04); }
.rapor-ttd { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 34px; }
.ttd-blok { text-align: center; }
.ttd-ruang { height: 74px; }
.ttd-nama { font-weight: 700; text-decoration: underline; }
.bukti-thumb { width: 74px; height: 54px; object-fit: cover; border-radius: 8px; border: 1px solid var(--garis-kuat); }

.tabel-print { width: 100%; border-collapse: collapse; font-size: .84rem; }
.tabel-print th, .tabel-print td { border: 1px solid var(--garis-kuat); padding: 8px 10px; text-align: left; vertical-align: top; }
.tabel-print thead th { background: rgba(79, 70, 229, .08); font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; }
.tabel-print .angka { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tabel-print tfoot td { font-weight: 700; background: rgba(79, 70, 229, .05); }

.kop-cetak { display: none; }

/* ---------------- Footer ---------------- */
.footer { position: relative; z-index: 1; margin-top: 40px; border-top: 1px solid var(--garis); background: rgba(255, 255, 255, .5); }
.footer-inner {
  max-width: 1420px; margin: 0 auto; padding: 20px 22px; display: flex; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; font-size: .82rem; color: var(--muted);
}

/* ---------------- Responsif ---------------- */
@media (max-width: 1080px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .topbar-inner { flex-wrap: wrap; gap: 10px; }
  .nav { order: 3; width: 100%; }
  .userbox { margin-left: auto; }
  .userbox-text { display: none; }
}
@media (max-width: 720px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .wrap { padding: 20px 16px 48px; }
  .card { padding: 18px; }
  h1 { font-size: 1.4rem; }
  .grafik-baris { grid-template-columns: 96px 1fr 66px; }
  .rapor { padding: 20px 18px; }
  .rapor-ttd { grid-template-columns: 1fr; }
}

/* Wadah gulir horizontal untuk tabel lebar (mis. tabel rapor). */
.gulir-x { overflow-x: auto; max-width: 100%; }

/* ---------------- Cetak ---------------- */
@media print {
  body { background: #fff; font-size: 11pt; }
  .blob, .topbar, .footer, .no-print, .flash-stack, .btn, .filter-bar { display: none !important; }
  .wrap { max-width: none; padding: 0; }
  .card, .table-wrap, .rapor { box-shadow: none; border: 0; background: #fff; backdrop-filter: none; padding: 0; }
  .kop-cetak { display: block; }
  .gulir-x { overflow: visible; }
  .rapor { padding: 0; }
  .tabel-print th, .tabel-print td { border-color: #999; }
  a { color: #000; text-decoration: none; }
  @page { size: A4 portrait; margin: 14mm 12mm; }
}

/* Catatan: ukuran halaman A4 landscape untuk laporan disuntikkan per-halaman
   lewat <style> tambahan di laporan.php, karena @page tidak bisa dibatasi
   berdasarkan kelas pada <body>. */
@media print {
  body.cetak-lanskap .tabel-print { font-size: 9.5pt; }
  body.cetak-lanskap .tabel-print th, body.cetak-lanskap .tabel-print td { padding: 5px 7px; }
}
