:root {
  --brand: #0f5257;
  --brand-2: #138086;
  --soft: #f4f7f7;
}

body { background: var(--soft); }
.bg-brand { background: var(--brand) !important; }
.text-brand { color: var(--brand) !important; }
.btn-brand { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn-brand:hover, .btn-brand:focus { background: var(--brand-2); color: #fff; border-color: var(--brand-2); }

.card { border: 0; box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 1px 6px rgba(0,0,0,.04); }
.card-header { background: #fff; font-weight: 600; }
.table > :not(caption) > * > * { vertical-align: middle; }
.table thead th { font-size: .82rem; text-transform: uppercase; letter-spacing: .02em; color: #555; white-space: nowrap; }
.table-sticky thead th { position: sticky; top: 0; background: #fff; z-index: 1; }
.stat .angka { font-size: 1.8rem; font-weight: 700; line-height: 1.1; }
.stat .label { font-size: .8rem; color: #6c757d; text-transform: uppercase; letter-spacing: .03em; }

.page-title { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.page-title h1 { font-size: 1.4rem; margin: 0; }

.nav-tabs .nav-link { color: #444; }
.nav-tabs .nav-link.active { font-weight: 600; color: var(--brand); }
.table-responsive { -webkit-overflow-scrolling: touch; }

/* ---------- Form penilaian (mobile-first) ---------- */
.penilaian-body { padding-bottom: 7.5rem; }
.target-card { border-left: 4px solid var(--brand); }
.kriteria-card .card-header { display: flex; justify-content: space-between; gap: .5rem; align-items: baseline; }
.kriteria-card.galat { outline: 2px solid var(--bs-danger); }
.kriteria-card.terisi .card-header { color: var(--brand); }
.level-pilih { display: grid; gap: .5rem; grid-template-columns: 1fr; }
@media (min-width: 576px) { .level-pilih { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .level-pilih.n4 { grid-template-columns: repeat(4, 1fr); } }
.level-pilih .btn {
  text-align: left; white-space: normal; padding: .7rem .85rem; min-height: 3.2rem;
  border-width: 2px; display: flex; flex-direction: column; gap: .15rem;
}
.level-pilih .btn .skor { font-weight: 700; font-size: 1.05rem; }
.level-pilih .btn .desk { font-size: .82rem; opacity: .85; }
.level-pilih .btn-check:checked + .btn { background: var(--brand); border-color: var(--brand); color: #fff; }
.input-skor { font-size: 1.4rem; max-width: 9rem; text-align: center; font-weight: 600; }

.bar-bawah {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; background: #fff;
  box-shadow: 0 -2px 10px rgba(0,0,0,.12); padding: .6rem .9rem calc(.6rem + env(safe-area-inset-bottom));
}
.bar-bawah .nilai { font-size: 1.6rem; font-weight: 700; color: var(--brand); line-height: 1; }
.autosave { font-size: .78rem; }
.autosave.ok { color: var(--bs-success); }
.autosave.err { color: var(--bs-danger); }
.autosave.lokal { color: var(--bs-warning-text-emphasis); }

.target-list .list-group-item { padding: .8rem 1rem; }
.target-list .judul { font-weight: 600; }

/* ---------- QR & cetak ---------- */
.qr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.qr-kartu { background: #fff; border: 1px dashed #999; border-radius: .5rem; padding: 1rem; text-align: center; page-break-inside: avoid; }
.qr-kartu img { width: 180px; height: 180px; }
.qr-kartu .judul { font-size: 1.6rem; font-weight: 700; }
@media print {
  body { background: #fff; }
  .qr-grid { grid-template-columns: repeat(3, 1fr); }
  .card { box-shadow: none; }
  a[href]::after { content: none; }
  .print-break { page-break-before: always; }
}
.ttd { height: 4.5rem; }

/* Logo PPG di navbar: latar putih agar warna merah-biru logo tetap terbaca di atas warna brand */
.logo-chip { background: #fff; border-radius: .4rem; padding: .15rem .4rem; display: inline-flex; align-items: center; }
.logo-chip img { height: 30px; width: auto; display: block; }
@media (max-width: 380px) { .logo-chip img { height: 24px; } }
