body {
  background-color: #f4f6f4;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.app-bar {
  background: linear-gradient(135deg, #2e7d32, #66bb6a) !important;
  position: sticky;
  top: 0;
  z-index: 1030;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.dashboard-container {
  padding-top: 0.5rem;
}

.dashboard-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.dashboard-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  padding: 20px 12px;
  text-align: center;
  color: #333;
  text-decoration: none;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 140px;
}

.dashboard-card:hover,
.dashboard-card:active {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.card-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.card-title {
  font-size: 16px;
  font-weight: 500;
}

.summary-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-bottom: 24px;
}

.summary-card {
  background: #fff;
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.summary-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.summary-label {
  font-size: 0.9rem;
  color: #4f4f4f;
  margin-bottom: 6px;
}

.summary-value {
  font-size: 1.2rem;
  font-weight: 600;
  color: #1b5e20;
}

.summary-list {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
  font-size: 0.9rem;
  color: #4f4f4f;
}

.summary-list li + li {
  margin-top: 2px;
}

.summary-subtitle {
  margin-top: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  color: #333;
}

.hidden {
  display: none;
}

.info-card {
  border-left: 4px solid #198754;
  box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.05);
}

.table thead th {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.04rem;
}

.foto-kecil {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.foto-slider {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 8px 0;
}

.foto-slider::-webkit-scrollbar {
  display: none;
}

.foto-slide {
  flex: 0 0 80%;
  max-width: 80%;
  scroll-snap-align: center;
  border-radius: 12px;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

.foto-slide img {
  max-width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 8px;
}

.foto-empty {
  color: #888;
  font-size: 0.9rem;
}

@media (min-width: 768px) {
  .foto-slide {
    flex: 0 0 40%;
    max-width: 40%;
  }
}

.form-upload-foto {
  margin-top: 8px;
}

.form-upload-foto .upload-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.form-upload-foto input[type="file"] {
  flex: 1;
}

.badge-arsip {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: #ffe0b2;
  color: #e65100;
  font-size: 0.85rem;
}

.row-clickable {
  cursor: pointer;
}

.row-clickable:hover {
  background: #f7f7f7;
}

.relation-card {
  background: #fdfdfd;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  padding: 12px;
  height: 100%;
}

.relation-card h6 {
  font-weight: 600;
}

.search-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 8px;
}

.search-form {
  display: flex;
  gap: 8px;
  flex: 1;
}

.search-form input[type="text"] {
  flex: 1;
}

.filter-toggle {
  padding: 8px 12px;
  border: 1px solid #cddc39;
  background: #f1f8e9;
  border-radius: 8px;
  cursor: pointer;
  min-width: 110px;
}

.filter-panel {
  background: #f9f9f9;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 12px;
  border: 1px solid #e0e0e0;
}

.filter-panel-open {
  display: block;
}

.filter-panel-closed {
  display: none;
}

.filter-row {
  margin-bottom: 8px;
}

.filter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 4px;
}

.anak-block {
  border: 1px dashed #cfd8dc;
  background: #f9fbfc;
  border-radius: 12px;
}

.anak-block h6 {
  font-weight: 600;
  margin-bottom: 12px;
}

.detail-tabs .nav-link {
  cursor: pointer;
}

.tab-section {
  width: 100%;
}

.card-header-inline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.btn-icon {
  border: none;
  background: #4caf50;
  color: #fff;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
}

#form-riwayat-penyakit.form-riwayat-closed {
  display: none;
}

#form-riwayat-penyakit.form-riwayat-open {
  display: block;
  margin-top: 8px;
}

.form-kelahiran-wrapper {
  margin-top: 12px;
}

.fab-tambah-kelahiran {
  position: fixed;
  bottom: 80px;
  right: 16px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #2e7d32, #66bb6a);
  color: #fff;
  font-size: 32px;
  line-height: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}

@media (min-width: 768px) {
  .fab-tambah-kelahiran {
    bottom: 24px;
  }
}

.form-kematian-wrapper {
  margin-top: 12px;
}

.fab-tambah-kematian {
  position: fixed;
  bottom: 80px;
  right: 16px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #2e7d32, #66bb6a);
  color: #fff;
  font-size: 32px;
  line-height: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  z-index: 1000;
}

@media (min-width: 768px) {
  .fab-tambah-kematian {
    bottom: 24px;
  }
}

.form-perkawinan-wrapper {
  margin-top: 12px;
}

.fab-add-perkawinan {
  position: fixed;
  bottom: 80px;
  right: 16px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #2e7d32, #66bb6a);
  color: #fff;
  font-size: 32px;
  line-height: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  z-index: 1000;
}

@media (min-width: 768px) {
  .fab-add-perkawinan {
    bottom: 24px;
  }
}
