/* KU SERVICE — gaya tunggal, tanpa build step. Mobile-first. */

:root {
  --biru: #1d4ed8;
  --biru-muda: #eff6ff;
  --hijau: #16a34a;
  --hijau-muda: #f0fdf4;
  --merah: #dc2626;
  --merah-muda: #fef2f2;
  --oranye: #f59e0b;
  --ungu: #8b5cf6;
  --abu: #94a3b8;
  --teks: #0f172a;
  --teks-lembut: #64748b;
  --garis: #e2e8f0;
  --latar: #f1f5f9;
  --kartu: #ffffff;
  --radius: 14px;
  --bayang: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 12px rgba(15, 23, 42, .04);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--latar);
  color: var(--teks);
  font-size: 15px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--biru); text-decoration: none; }
h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.25; }
h1 { font-size: 1.35rem; }
h2 { font-size: 1.1rem; }
h3 { font-size: .95rem; }
p { margin: 0 0 .75rem; }
small { color: var(--teks-lembut); }

/* ---------- rangka ---------- */
.wrap { max-width: 720px; margin: 0 auto; padding: 0 14px 90px; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  background: var(--kartu); border-bottom: 1px solid var(--garis);
  padding: 12px 14px; display: flex; align-items: center; gap: 10px;
}
.topbar .judul { font-weight: 700; font-size: 1.05rem; flex: 1; }
.topbar .logo { width: 34px; height: 34px; border-radius: 9px; object-fit: cover; background: var(--biru-muda); }
.topbar a { color: var(--teks-lembut); font-size: .85rem; }

.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
  background: var(--kartu); border-top: 1px solid var(--garis);
  display: flex; padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.tabbar a {
  flex: 1; text-align: center; padding: 6px 2px; color: var(--teks-lembut);
  font-size: .68rem; font-weight: 600; border-radius: 10px;
}
.tabbar a.aktif { color: var(--biru); background: var(--biru-muda); }
.tabbar .ikon { display: block; font-size: 1.15rem; line-height: 1.4; }

/* ---------- komponen ---------- */
.kartu {
  background: var(--kartu); border-radius: var(--radius); padding: 14px;
  box-shadow: var(--bayang); margin-bottom: 12px;
}
.kartu.rapat { padding: 10px 12px; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

.stat { background: var(--kartu); border-radius: var(--radius); padding: 12px; box-shadow: var(--bayang); }
.stat .label { font-size: .72rem; color: var(--teks-lembut); font-weight: 600; text-transform: uppercase; letter-spacing: .02em; }
.stat .angka { font-size: 1.3rem; font-weight: 700; margin-top: 2px; }
.stat .angka.kecil { font-size: 1.05rem; }
.stat.biru .angka { color: var(--biru); }
.stat.hijau .angka { color: var(--hijau); }
.stat.merah .angka { color: var(--merah); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--biru); color: #fff; border: 0; border-radius: 11px;
  padding: 11px 16px; font-size: .92rem; font-weight: 600; cursor: pointer;
  font-family: inherit; text-align: center;
}
.btn:active { transform: translateY(1px); }
.btn.blok { width: 100%; }
.btn.besar { padding: 15px; font-size: 1rem; border-radius: 13px; }
.btn.hijau { background: var(--hijau); }
.btn.merah { background: var(--merah); }
.btn.abu { background: #e2e8f0; color: var(--teks); }
.btn.garis { background: transparent; border: 1.5px solid var(--garis); color: var(--teks); }
.btn.kecil { padding: 7px 11px; font-size: .8rem; border-radius: 9px; }

label { display: block; font-size: .8rem; font-weight: 600; color: var(--teks-lembut); margin: 0 0 4px; }
input, select, textarea {
  width: 100%; padding: 11px 12px; border: 1.5px solid var(--garis);
  border-radius: 11px; font-size: 16px; /* 16px cegah zoom otomatis di iOS */
  font-family: inherit; background: #fff; color: var(--teks);
}
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--biru); }
textarea { min-height: 76px; resize: vertical; }
.baris { margin-bottom: 12px; }
.baris2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.centang { display: flex; align-items: flex-start; gap: 9px; font-size: .88rem; font-weight: 500; color: var(--teks); }
.centang input { width: auto; margin-top: 2px; }

.chip {
  display: inline-block; padding: 3px 9px; border-radius: 999px;
  font-size: .72rem; font-weight: 700; background: #e2e8f0; color: #334155;
}
.chip.masuk { background: #f1f5f9; color: #475569; }
.chip.dicek { background: #dbeafe; color: #1d4ed8; }
.chip.konfirmasi { background: #fef3c7; color: #b45309; }
.chip.proses { background: #ede9fe; color: #6d28d9; }
.chip.selesai { background: #dcfce7; color: #15803d; }
.chip.diambil { background: #d1fae5; color: #047857; }
.chip.batal { background: #fee2e2; color: #b91c1c; }
.chip.ready { background: #dcfce7; color: #15803d; }
.chip.menipis { background: #fef3c7; color: #b45309; }
.chip.habis { background: #fee2e2; color: #b91c1c; }

.pesan { padding: 11px 13px; border-radius: 11px; margin-bottom: 12px; font-size: .88rem; font-weight: 500; }
.pesan.sukses { background: var(--hijau-muda); color: #166534; border: 1px solid #bbf7d0; }
.pesan.error { background: var(--merah-muda); color: #991b1b; border: 1px solid #fecaca; }
.pesan.info { background: var(--biru-muda); color: #1e40af; border: 1px solid #bfdbfe; }

.daftar-item {
  display: flex; gap: 11px; align-items: center; padding: 11px 0;
  border-bottom: 1px solid var(--garis);
}
.daftar-item:last-child { border-bottom: 0; }
.daftar-item .isi { flex: 1; min-width: 0; }
.daftar-item .judul { font-weight: 600; font-size: .93rem; }
.daftar-item .sub { font-size: .78rem; color: var(--teks-lembut); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.daftar-item .kanan { text-align: right; white-space: nowrap; }

.saring { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 10px; -webkit-overflow-scrolling: touch; }
.saring a { padding: 6px 12px; border-radius: 999px; background: var(--kartu); border: 1px solid var(--garis); font-size: .8rem; font-weight: 600; color: var(--teks-lembut); white-space: nowrap; }
.saring a.aktif { background: var(--biru); border-color: var(--biru); color: #fff; }

table { width: 100%; border-collapse: collapse; font-size: .86rem; }
th, td { text-align: left; padding: 7px 4px; border-bottom: 1px solid var(--garis); }
th { font-size: .72rem; text-transform: uppercase; color: var(--teks-lembut); letter-spacing: .02em; }
td.angka, th.angka { text-align: right; white-space: nowrap; }

.kosong { text-align: center; padding: 32px 16px; color: var(--teks-lembut); }
.kosong .ikon { font-size: 2.2rem; display: block; margin-bottom: 8px; }

.fab {
  position: fixed; right: 16px; bottom: calc(74px + env(safe-area-inset-bottom)); z-index: 25;
  background: var(--biru); color: #fff; border-radius: 999px; padding: 14px 20px;
  font-weight: 700; box-shadow: 0 8px 20px rgba(29, 78, 216, .35); border: 0; font-size: .95rem;
}

/* ---------- nota ---------- */
.nota { background: #fff; border-radius: var(--radius); padding: 18px; box-shadow: var(--bayang); }
.nota .kop { text-align: center; border-bottom: 2px dashed var(--garis); padding-bottom: 12px; margin-bottom: 12px; }
.nota .kop img { width: 56px; height: 56px; object-fit: contain; margin-bottom: 6px; }
.nota .kop .nama { font-size: 1.15rem; font-weight: 800; letter-spacing: .01em; }
.nota .kop .alamat { font-size: .78rem; color: var(--teks-lembut); }
.nota .rincian { font-size: .86rem; }
.nota .total { border-top: 2px dashed var(--garis); margin-top: 10px; padding-top: 10px; }
.nota .kaki { text-align: center; font-size: .76rem; color: var(--teks-lembut); border-top: 2px dashed var(--garis); margin-top: 12px; padding-top: 10px; }

@media print {
  .topbar, .tabbar, .no-print, .fab { display: none !important; }
  body { background: #fff; }
  .wrap { padding: 0; max-width: 100%; }
  .nota { box-shadow: none; padding: 0; }
}

/* ---------- halaman publik ---------- */
.hero { text-align: center; padding: 40px 16px 26px; }
.hero .lambang { font-size: 3rem; }
.hero h1 { font-size: 1.8rem; margin-top: 10px; }
.hero p { color: var(--teks-lembut); max-width: 460px; margin: 0 auto 18px; }
.fitur { display: grid; gap: 10px; }
.fitur .item { background: var(--kartu); border-radius: var(--radius); padding: 13px; box-shadow: var(--bayang); display: flex; gap: 11px; }
.fitur .item .ikon { font-size: 1.4rem; }

@media (min-width: 640px) {
  .grid3 { gap: 10px; }
  .hero h1 { font-size: 2.1rem; }
}
