html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}
/* Lightbox: pratinjau gambar lampiran ukuran penuh */
dialog.lightbox { border: 0; padding: 0; background: transparent; width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; }
dialog.lightbox::backdrop { background: rgba(0, 0, 0, .88); }
.lightbox-body { position: absolute; inset: 0; overflow: auto; display: flex; }
.lightbox-body img { margin: auto; max-width: 100%; max-height: 100%; object-fit: contain; cursor: zoom-in; background: #fff; }
.lightbox-body img.actual { max-width: none; max-height: none; object-fit: none; cursor: zoom-out; }
.lightbox-close { position: fixed; top: 14px; right: 18px; z-index: 2; width: 2.4rem; height: 2.4rem; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .92); color: #000; font-size: 1.5rem; line-height: 1; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, .5); }
.lightbox-close:hover, .lightbox-close:focus-visible { background: #fff; outline: 3px solid #0d6efd; }
.lightbox-hint { position: fixed; bottom: 12px; left: 50%; transform: translateX(-50%); z-index: 2; color: #fff; background: rgba(0, 0, 0, .6);
  padding: .2rem .8rem; border-radius: 1rem; font-size: .8rem; pointer-events: none; }
img.zoomable, [data-zoom] { cursor: zoom-in; }

/* Checklist pemeriksaan: kuning Bootstrap di atas putih kontrasnya rendah (<2:1); gelapkan teks saat belum dipilih. */
.checklist .btn-outline-warning { color: #7a5c00; border-color: #e0a800; }
.checklist .btn-check:checked + .btn-outline-warning { color: #000; background-color: #ffc107; border-color: #ffc107; }
.checklist .btn-check:focus-visible + .btn { outline: 3px solid #0d6efd; outline-offset: 1px; }

/* Slot foto inspeksi */
.photo-slot .photo-thumb { width: 96px; height: 72px; object-fit: cover; border-radius: .25rem; border: 1px solid #ced4da; background: #f8f9fa; }
.photo-slot .photo-empty { width: 96px; height: 72px; display: flex; align-items: center; justify-content: center; border: 1px dashed #adb5bd; border-radius: .25rem; color: #6c757d; font-size: .75rem; }
.photo-slot.uploading { opacity: .6; }

/* Dashboard */
.kpi { display: block; background: #fff; border: 1px solid #dee2e6; border-radius: .5rem; padding: .9rem 1rem; text-decoration: none; color: inherit; height: 100%; }
.kpi:hover { border-color: #0d6efd; }
.kpi-n { font-size: 2rem; font-weight: 700; line-height: 1.1; color: #0d6efd; }
.kpi-l { font-weight: 600; } .kpi-s { font-size: .85rem; color: #6c757d; }
.chart { width: 100%; height: auto; max-height: 280px; }
.chart-grid { stroke: #dee2e6; stroke-width: 1; } .chart-axis { font-size: 11px; fill: #6c757d; }
.chart-s0 { fill: #2563eb; background: #2563eb; } .chart-s1 { fill: #0f9d8a; background: #0f9d8a; } .chart-s2 { fill: #d97706; background: #d97706; }
.chart-s3 { fill: #7c3aed; background: #7c3aed; } .chart-s4 { fill: #db2777; background: #db2777; } .chart-s5 { fill: #475569; background: #475569; }
.progress-bar.chart-s0, .progress-bar.chart-s1, .progress-bar.chart-s2, .progress-bar.chart-s3, .progress-bar.chart-s4, .progress-bar.chart-s5 { fill: none; }
.chart-key { display: inline-block; width: .8rem; height: .8rem; border-radius: 2px; margin-right: .3rem; vertical-align: -1px; }
.chart-legend { font-size: .85rem; color: #495057; }
