
:root {
  --admin-bg: linear-gradient(180deg, #f9faf6 0%, #f5f7f0 100%);
  --admin-panel: #ffffff;
  --admin-border: #d9e4d2;
  --admin-text: #1c2c1f;
  --admin-muted: #5f6f62;
  --admin-green: #2e7d32;
  --admin-green-dark: #1b5e20;
  --admin-green-soft: #eef7ef;
  --admin-orange: #ff7a00;
  --admin-orange-dark: #e46d00;
  --admin-orange-soft: #fff3e5;
  --admin-red: #b42318;
  --admin-red-soft: #fef3f2;
  --admin-amber: #b54708;
  --admin-amber-soft: #fffaeb;
  --admin-blue: #2e7d32;
  --admin-blue-soft: #eef7ef;
  --admin-shadow: 0 18px 34px rgba(27, 94, 32, 0.08);
  --admin-radius-lg: 20px;
  --admin-radius-md: 14px;
}

body.admin-body {
  margin: 0;
  background: var(--admin-bg);
  color: var(--admin-text);
}

.admin-login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  background:
    radial-gradient(circle at top left, rgba(255, 122, 0, 0.12), transparent 34%),
    radial-gradient(circle at bottom right, rgba(46, 125, 50, 0.12), transparent 36%),
    linear-gradient(135deg, #f7f9f5 0%, #eff7ef 100%);
}

.admin-login-card {
  width: min(460px, 100%);
  background: #fff;
  border: 1px solid var(--admin-border);
  border-radius: 28px;
  padding: 32px;
  box-shadow: var(--admin-shadow);
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  font-weight: 800;
}

.admin-brand-logo {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  object-fit: cover;
  background: #fff;
  border: 1px solid rgba(255,255,255,0.35);
  box-shadow: 0 8px 20px rgba(16, 24, 40, 0.12);
}

.admin-brand-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.admin-brand-copy strong {
  font-size: 17px;
  line-height: 1.2;
}

.admin-brand-copy small {
  color: inherit;
  opacity: 0.82;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-login-card h1 {
  margin: 26px 0 8px;
  font-size: 30px;
}

.admin-login-card p {
  margin: 0 0 24px;
  color: var(--admin-muted);
  line-height: 1.6;
}

.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 18px 18px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
  background:
    radial-gradient(circle at bottom right, rgba(255, 122, 0, 0.22), transparent 28%),
    radial-gradient(circle at top left, rgba(255,255,255,0.08), transparent 24%),
    linear-gradient(180deg, #145a22 0%, #1d6e2a 58%, #14501f 100%);
  color: #fff;
  z-index: 30;
  border-right: 1px solid rgba(255,255,255,0.08);
}

.admin-sidebar .admin-brand {
  padding: 4px 6px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.admin-sidebar .admin-brand-logo {
  width: 64px;
  height: 64px;
  border-radius: 20px;
}

.admin-sidebar .admin-brand-copy strong {
  font-size: 20px;
}

.admin-nav {
  display: block;
  margin-top: 6px;
}

.admin-nav-group {
  margin-bottom: 18px;
}

.admin-nav-label {
  display: block;
  padding: 0 12px 8px;
  color: rgba(255,255,255,0.62);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 800;
}

.admin-nav-list {
  display: grid;
  gap: 6px;
}

.admin-nav a,
.admin-nav button {
  width: 100%;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.86);
  min-height: 48px;
  padding: 0 12px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-align: left;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.admin-nav a:hover,
.admin-nav button:hover,
.admin-nav a.active {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  transform: translateX(2px);
}

.admin-nav-icon {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255,255,255,0.1);
  font-size: 14px;
}

.admin-nav a.active .admin-nav-icon {
  background: rgba(255, 122, 0, 0.22);
}

.admin-nav-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  margin: 10px 0;
}

.admin-sidebar-footer {
  display: grid;
  gap: 12px;
  padding: 14px 8px 2px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.admin-user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(6px);
}

.admin-user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #ffffff 0%, #ffe2c2 100%);
  color: var(--admin-green-dark);
  font-weight: 900;
}

.admin-user-copy {
  min-width: 0;
}

.admin-user-copy strong,
.admin-user-copy span {
  display: block;
}

.admin-user-copy strong {
  font-size: 14px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-copy span {
  margin-top: 2px;
  font-size: 12px;
  color: rgba(255,255,255,0.74);
}

.admin-logout-btn {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.12);
  color: #fff;
  border-radius: 14px;
  font-weight: 800;
  cursor: pointer;
}

.admin-logout-btn:hover {
  background: rgba(255, 122, 0, 0.2);
}

.admin-main {
  min-width: 0;
  position: relative;
}

.admin-topbar {
  display: none !important;
}

.admin-mobile-menu,
.admin-mobile-fab {
  display: none;
}

.admin-content {
  width: min(1280px, calc(100% - 56px));
  margin: 0 auto;
  padding: 34px 0 48px;
}

.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
}

.page-heading h1 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  color: var(--admin-green-dark);
}

.page-heading p {
  margin: 8px 0 0;
  color: var(--admin-muted);
  line-height: 1.6;
}

.page-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-card {
  background: var(--admin-panel);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius-lg);
  box-shadow: 0 8px 20px rgba(31, 41, 55, 0.05);
}

.admin-card-header {
  padding: 20px 22px;
  border-bottom: 1px solid var(--admin-border);
}

.admin-card-header h2,
.admin-card-header h3 {
  margin: 0;
  font-size: 18px;
}

.admin-card-body {
  padding: 22px;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
}

.col-12 { grid-column: span 12; }
.col-8 { grid-column: span 8; }
.col-6 { grid-column: span 6; }
.col-4 { grid-column: span 4; }
.col-3 { grid-column: span 3; }

.dashboard-card {
  display: block;
  padding: 22px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.dashboard-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--admin-shadow);
  border-color: #bfd4b5;
}

.dashboard-card h2 {
  margin: 0 0 8px;
  font-size: 19px;
  color: var(--admin-green-dark);
}

.dashboard-card p {
  margin: 0;
  color: var(--admin-muted);
  line-height: 1.6;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.form-group { min-width: 0; }
.form-group.full { grid-column: 1 / -1; }

.form-group label {
  display: block;
  margin-bottom: 7px;
  font-size: 14px;
  font-weight: 700;
}

.form-group .hint {
  display: block;
  margin-top: 6px;
  color: var(--admin-muted);
  font-size: 12px;
  line-height: 1.45;
}

.form-control {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #cfdbcb;
  border-radius: 12px;
  background: #fff;
  color: var(--admin-text);
  outline: none;
}

textarea.form-control {
  min-height: 108px;
  resize: vertical;
}

.form-control:focus {
  border-color: var(--admin-green);
  box-shadow: 0 0 0 4px rgba(46, 125, 50, 0.12);
}

.form-control:disabled,
.form-control[readonly] {
  background: #f6f8f4;
  color: #667085;
}

.form-section-title {
  grid-column: 1 / -1;
  margin: 8px 0 -2px;
  padding-top: 16px;
  border-top: 1px solid var(--admin-border);
  font-weight: 800;
}

.form-section-title:first-child {
  border-top: 0;
  padding-top: 0;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.btn-sm {
  min-height: 38px;
  padding: 0 15px;
  border-radius: 10px;
  font-size: 14px;
}

.btn-danger {
  background: var(--admin-red);
  color: #fff;
}

.btn-danger:hover {
  background: #912018;
}

.btn-secondary {
  background: #f2f4ef;
  color: #344054;
  border-color: #d8e0d8;
}

.btn:disabled {
  opacity: 0.58;
  cursor: not-allowed;
  transform: none;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--admin-border);
}

.filter-chip {
  border: 1px solid var(--admin-border);
  background: #fff;
  color: #344054;
  border-radius: 999px;
  min-height: 36px;
  padding: 0 14px;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
}

.filter-chip.active {
  color: var(--admin-green-dark);
  border-color: #bfd4b5;
  background: var(--admin-green-soft);
}

.table-wrap { overflow-x: auto; }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 880px;
}

.admin-table th,
.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #edf1ed;
  text-align: left;
  vertical-align: middle;
}

.admin-table th {
  background: #fbfcfa;
  color: #5a685d;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.035em;
}

.admin-table td {
  font-size: 14px;
}

.table-primary { font-weight: 800; }

.table-secondary {
  margin-top: 4px;
  color: var(--admin-muted);
  font-size: 12px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.status-aktif { background: var(--admin-blue-soft); color: var(--admin-blue); }
.status-lunas { background: var(--admin-green-soft); color: var(--admin-green-dark); }
.status-menunggak { background: var(--admin-amber-soft); color: var(--admin-amber); }
.status-dibatalkan { background: var(--admin-red-soft); color: var(--admin-red); }
.status-valid { background: var(--admin-green-soft); color: var(--admin-green-dark); }
.status-menunggu { background: var(--admin-amber-soft); color: var(--admin-amber); }
.status-verifikasi { background: var(--admin-orange-soft); color: var(--admin-orange-dark); }
.status-revisi { background: #fff4e5; color: #9a4d00; }
.status-disetujui { background: var(--admin-green-soft); color: var(--admin-green-dark); }
.status-ditolak { background: var(--admin-red-soft); color: var(--admin-red); }

.empty-state,
.loading-state,
.error-state {
  padding: 44px 24px;
  text-align: center;
  color: var(--admin-muted);
}

.error-state { color: var(--admin-red); }

.pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
}

.pagination-info {
  color: var(--admin-muted);
  font-size: 13px;
}

.pagination-actions {
  display: flex;
  gap: 8px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.summary-box {
  padding: 17px;
  border-radius: 14px;
  background: #fafdf8;
  border: 1px solid var(--admin-border);
}

.summary-box span {
  display: block;
  color: var(--admin-muted);
  font-size: 12px;
  margin-bottom: 7px;
}

.summary-box strong { font-size: 18px; }

.detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 24px;
}

.detail-item {
  padding: 13px 0;
  border-bottom: 1px solid #edf1ed;
}

.detail-item span {
  display: block;
  color: var(--admin-muted);
  font-size: 12px;
  margin-bottom: 5px;
}

.detail-item strong,
.detail-item div {
  display: block;
  overflow-wrap: anywhere;
}

.alert {
  border: 1px solid var(--admin-border);
  border-radius: 14px;
  padding: 14px 16px;
  line-height: 1.55;
  margin-bottom: 18px;
}

.alert-info { background: var(--admin-orange-soft); border-color: #ffd7b0; color: #a44a00; }
.alert-warning { background: var(--admin-amber-soft); border-color: #fedf89; color: #93370d; }
.alert-danger { background: var(--admin-red-soft); border-color: #fecdca; color: #912018; }
.alert-success { background: var(--admin-green-soft); border-color: #b7dfbf; color: var(--admin-green-dark); }

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 40, 0.55);
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
}

.admin-modal {
  width: min(520px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--admin-shadow);
}

.admin-modal-header,
.admin-modal-body,
.admin-modal-footer { padding: 18px 20px; }

.admin-modal-header { border-bottom: 1px solid var(--admin-border); }
.admin-modal-header h3 { margin: 0; }

.admin-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--admin-border);
}

.toast-container {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 200;
  display: grid;
  gap: 10px;
  width: min(380px, calc(100% - 40px));
}

.admin-toast {
  background: #132519;
  color: #fff;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: var(--admin-shadow);
  line-height: 1.45;
}

.admin-toast.error { background: #912018; }
.admin-toast.success { background: #1b5e20; }

.muted { color: var(--admin-muted); }
.text-danger { color: var(--admin-red); }
.text-success { color: var(--admin-green-dark); }

.admin-card-stack { display: grid; gap: 18px; }

.admin-list-clean {
  list-style: none;
  margin: 0;
  padding: 0;
}

.admin-list-clean li {
  padding: 12px 0;
  border-bottom: 1px solid #edf1ed;
}

.admin-list-clean li:last-child { border-bottom: 0; }

.change-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) 1fr 1fr;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid #edf1ed;
}

.change-row:last-child { border-bottom: 0; }
.change-field { font-weight: 800; }
.change-old, .change-new { overflow-wrap: anywhere; }
.change-old { color: var(--admin-muted); }
.change-new { color: var(--admin-green-dark); }

.document-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.member-admin-card {
  border: 1px solid var(--admin-border);
  border-radius: 14px;
  padding: 16px;
  background: #fbfdfb;
}

.member-admin-card h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

.wilayah-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.wilayah-card {
  border: 1px solid var(--admin-border);
  border-radius: 14px;
  padding: 15px;
  background: #fafcfb;
}

.wilayah-card h3 { margin: 0 0 10px; }
.wilayah-card p { margin: 0; color: var(--admin-muted); line-height: 1.6; }

.gallery-admin-preview {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--admin-border);
  background: #f4f7f4;
}

@media (max-width: 960px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar {
    position: fixed;
    left: -320px;
    width: min(290px, calc(100vw - 48px));
    max-width: 290px;
    transition: left 0.25s ease;
    box-shadow: 0 24px 40px rgba(0,0,0,0.24);
  }
  body.sidebar-open .admin-sidebar { left: 0; }
  body.sidebar-open::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 25;
  }
  .admin-mobile-fab {
    display: inline-grid;
    place-items: center;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 40;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    border: 1px solid #d6e1d1;
    background: #fff;
    color: var(--admin-green-dark);
    box-shadow: var(--admin-shadow);
    cursor: pointer;
  }
  .admin-content {
    width: min(100% - 24px, 1260px);
    padding-top: 72px;
    padding-bottom: 28px;
  }
  .col-8, .col-6, .col-4, .col-3 { grid-column: span 12; }
}

@media (max-width: 700px) {
  .admin-content { width: min(100% - 20px, 1260px); }
  .page-heading { flex-direction: column; }
  .page-actions, .page-actions .btn { width: 100%; }
  .form-grid, .detail-list, .summary-grid { grid-template-columns: 1fr; }
  .form-group.full { grid-column: auto; }
  .admin-card-body { padding: 18px; }
  .pagination-bar { align-items: flex-start; flex-direction: column; }
  .change-row { grid-template-columns: 1fr; gap: 5px; }
}

/* ========================================= */
/* SIDEBAR RESPONSIVE FINAL */
/* ========================================= */
.admin-sidebar {
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.admin-sidebar .admin-brand-logo {
  width: 76px;
  height: 76px;
  flex: 0 0 76px;
  object-fit: contain;
  border-radius: 50%;
  background: transparent;
  border: 0;
}

.admin-nav {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.3) transparent;
}

.admin-nav::-webkit-scrollbar { width: 6px; }
.admin-nav::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.28);
  border-radius: 999px;
}

.admin-user-copy strong {
  max-width: 190px;
}

.admin-sidebar-backdrop {
  display: none;
}

@media (max-width: 960px) {
  .admin-sidebar {
    top: 0;
    bottom: 0;
    height: 100dvh;
    overflow: hidden;
  }

  body.sidebar-open {
    overflow: hidden;
  }

  body.sidebar-open::before {
    display: none !important;
    content: none !important;
  }

  .admin-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 25;
    border: 0;
    background: rgba(12, 24, 15, .48);
    padding: 0;
    cursor: default;
  }

  body.sidebar-open .admin-sidebar-backdrop {
    display: block;
  }
}

/* ========================================= */
/* DASHBOARD ADMIN MONITORING */
/* ========================================= */
.dashboard-section { margin-top: 28px; }
.dashboard-section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.dashboard-section-title h2 {
  margin: 0;
  color: var(--admin-green-dark);
  font-size: 22px;
}
.dashboard-section-title p {
  margin: 4px 0 0;
  color: var(--admin-muted);
  font-size: 14px;
}
.dashboard-shortcut {
  position: relative;
  min-height: 164px;
  padding: 22px;
  overflow: hidden;
}
.dashboard-shortcut::after {
  content: "↗";
  position: absolute;
  top: 18px;
  right: 18px;
  color: var(--admin-green);
  font-size: 20px;
  font-weight: 800;
}
.dashboard-shortcut h3 {
  margin: 0 34px 8px 0;
  color: var(--admin-green-dark);
  font-size: 18px;
}
.dashboard-shortcut p {
  margin: 0;
  color: var(--admin-muted);
  line-height: 1.65;
}
.dashboard-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.dashboard-summary-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 118px;
  padding: 18px;
}
.dashboard-summary-icon {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--admin-green-soft);
  font-size: 22px;
}
.dashboard-summary-card.orange .dashboard-summary-icon {
  background: var(--admin-orange-soft);
}
.dashboard-summary-card span {
  display: block;
  color: var(--admin-muted);
  font-size: 13px;
}
.dashboard-summary-card strong {
  display: block;
  margin-top: 4px;
  color: #142019;
  font-size: 28px;
}
.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, .75fr);
  gap: 18px;
}
.dashboard-chart-wrap {
  position: relative;
  min-height: 340px;
}
.dashboard-chart-wrap canvas {
  max-height: 330px;
}
.age-advanced-list { display: grid; gap: 14px; }
.age-advanced-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) 58px;
  gap: 10px;
  align-items: center;
  border: 0;
  width: 100%;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.age-progress {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1ed;
}
.age-progress > span {
  display: block;
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--admin-green), #66a95f);
}
.age-advanced-row:hover .age-progress > span {
  background: linear-gradient(90deg, var(--admin-orange), var(--admin-green));
}
.dashboard-utility-stack { display: grid; gap: 18px; }
.dashboard-utility-card .admin-card-body { padding: 20px; }
.dashboard-search-row {
  display: flex;
  gap: 10px;
}
.dashboard-search-row .form-control { flex: 1; }
.dashboard-map {
  height: 300px;
  border-radius: 14px;
  overflow: hidden;
  background: #eef3ec;
}
.dashboard-external-card {
  background: linear-gradient(135deg, #f5fbf3 0%, #fff8ed 100%);
}
.dashboard-external-card p {
  color: var(--admin-muted);
  line-height: 1.65;
}
.dashboard-table-link {
  font-weight: 800;
  color: var(--admin-green-dark);
}
.dashboard-empty-inline {
  padding: 18px;
  color: var(--admin-muted);
  text-align: center;
}

/* ========================================= */
/* DATA WARGA ADMIN */
/* ========================================= */
.admin-filter-grid {
  display: grid;
  grid-template-columns: 2fr repeat(4, minmax(130px, 1fr));
  gap: 12px;
}
.admin-filter-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

@media (max-width: 1100px) {
  .dashboard-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-layout { grid-template-columns: 1fr; }
  .admin-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .dashboard-summary-grid { grid-template-columns: 1fr; }
  .dashboard-shortcut { min-height: auto; }
  .dashboard-search-row { flex-direction: column; }
  .age-advanced-row { grid-template-columns: 92px minmax(0, 1fr) 48px; }
  .admin-filter-grid { grid-template-columns: 1fr; }
  .admin-filter-actions,
  .admin-filter-actions .btn { width: 100%; }
  .dashboard-section-title { align-items: flex-start; flex-direction: column; }
}

.admin-user-copy strong {
  max-width: 175px;
  white-space: normal;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ========================================= */
/* SIDEBAR ADMIN FIXED + DRAWER FINAL */
/* ========================================= */
.admin-shell {
  display: block;
  min-height: 100dvh;
}

.admin-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 292px;
  height: 100dvh;
  min-height: 100dvh;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  z-index: 40;
}

.admin-sidebar .admin-brand {
  min-width: 0;
  padding-right: 8px;
}

.admin-nav {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.admin-sidebar-footer {
  min-width: 0;
  overflow: hidden;
}

.admin-user-card,
.admin-user-copy {
  min-width: 0;
}

.admin-user-copy strong {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.admin-main {
  min-height: 100dvh;
  margin-left: 292px;
}

.admin-sidebar-close {
  display: none;
}

@media (max-width: 960px) {
  .admin-main {
    margin-left: 0;
  }

  .admin-sidebar {
    left: 0;
    width: min(320px, calc(100vw - 44px));
    max-width: 320px;
    height: 100dvh;
    min-height: 100dvh;
    transform: translateX(-105%);
    transition: transform .24s ease;
    box-shadow: 22px 0 44px rgba(0, 0, 0, .24);
  }

  body.sidebar-open .admin-sidebar {
    left: 0;
    transform: translateX(0);
  }

  .admin-sidebar .admin-brand {
    padding-right: 54px;
  }

  .admin-sidebar-close {
    position: absolute;
    top: 18px;
    right: 16px;
    z-index: 3;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 13px;
    background: rgba(255, 255, 255, .13);
    color: #fff;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
  }

  .admin-mobile-fab {
    z-index: 30;
  }

  body.sidebar-open .admin-mobile-fab {
    visibility: hidden;
    pointer-events: none;
  }

  .admin-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 35;
    display: block;
    visibility: hidden;
    opacity: 0;
    border: 0;
    background: rgba(12, 24, 15, .52);
    transition: opacity .2s ease, visibility .2s ease;
  }

  body.sidebar-open .admin-sidebar-backdrop {
    visibility: visible;
    opacity: 1;
  }
}

/* ========================================= */
/* INPUT DATA WARGA MANUAL */
/* ========================================= */
.manual-mode-card {
  margin-bottom: 18px;
}

.manual-mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.manual-mode-button {
  min-height: 50px;
  padding: 10px 16px;
  border: 1px solid var(--admin-border);
  border-radius: 14px;
  background: #fff;
  color: var(--admin-text);
  font-weight: 800;
  cursor: pointer;
  text-align: center;
}

.manual-mode-button.active {
  border-color: #9dc89f;
  background: var(--admin-green-soft);
  color: var(--admin-green-dark);
  box-shadow: inset 0 0 0 1px rgba(46, 125, 50, .08);
}

.manual-family-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.manual-family-search .form-group {
  margin: 0;
}

.manual-family-result {
  display: grid;
  gap: 5px;
  margin: 18px 0 22px;
  padding: 16px 18px;
  border: 1px solid #b8d9b6;
  border-radius: 14px;
  background: #f2faf1;
}

.manual-family-result strong {
  color: var(--admin-green-dark);
}

.manual-family-result span {
  color: var(--admin-muted);
  line-height: 1.45;
}

.manual-members-heading,
.manual-member-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.manual-members-heading {
  margin: 28px 0 14px;
}

.manual-members-heading h3,
.manual-member-card-heading h3 {
  margin: 0;
}

.manual-members-heading p {
  margin: 4px 0 0;
  color: var(--admin-muted);
}

.manual-members {
  display: grid;
  gap: 16px;
}

.manual-member-card {
  background: #fcfdfb;
}

.manual-member-card-heading {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e8eee5;
}

.manual-member-card-heading .muted {
  display: block;
  margin-top: 3px;
  font-size: 12px;
}

@media (max-width: 700px) {
  .manual-mode-switch,
  .manual-family-search {
    grid-template-columns: 1fr;
  }

  .manual-mode-button {
    text-align: left;
  }

  .manual-family-search .btn {
    width: 100%;
  }

  .manual-members-heading,
  .manual-member-card-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .manual-members-heading .btn,
  .manual-member-card-heading .btn {
    width: 100%;
  }
}


/* ========================================= */
/* RESPONSIVE DASHBOARD + TABLE OVERFLOW FIX */
/* ========================================= */
.admin-body,
.admin-shell,
.admin-main,
.admin-content,
.admin-card {
  max-width: 100%;
}

.admin-main,
.admin-content,
.admin-card,
.table-wrap {
  min-width: 0;
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

.dashboard-analytics-card {
  margin-bottom: 18px;
}

.dashboard-insight-grid,
.dashboard-operational-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.dashboard-status-card {
  margin-top: 18px;
}

.dashboard-card-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-pending-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--admin-amber-soft);
  color: var(--admin-amber);
  font-size: 12px;
  font-weight: 700;
}

.dashboard-pending-inline strong {
  font-size: 15px;
}

.dashboard-status-chart {
  min-height: 280px;
  max-width: 560px;
  margin: 0 auto;
}

@media (max-width: 900px) {
  .dashboard-insight-grid,
  .dashboard-operational-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .admin-content {
    width: calc(100% - 20px);
    max-width: calc(100% - 20px);
  }

  .dashboard-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .dashboard-summary-card {
    min-height: 112px;
    aspect-ratio: 1 / 0.78;
    padding: 14px;
    gap: 10px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
  }

  .dashboard-summary-icon {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    border-radius: 12px;
    font-size: 18px;
  }

  .dashboard-summary-card span {
    font-size: 11px;
    line-height: 1.25;
  }

  .dashboard-summary-card strong {
    margin-top: 2px;
    font-size: 24px;
  }

  .dashboard-chart-wrap {
    min-height: 280px;
  }

  .dashboard-card-heading-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .form-control,
  .admin-body input,
  .admin-body select,
  .admin-body textarea {
    font-size: 16px;
  }
}

/* ========================================= */
/* MANUAL LOCATION + REPORTS */
/* ========================================= */
.manual-location-box {
  margin-top: 12px;
  padding: 16px;
  border: 1px solid var(--admin-border);
  border-radius: 14px;
  background: #fafcf9;
}
.manual-location-box > p:first-child {
  margin-top: 0;
}
.manual-location-text {
  margin: 12px 0 0;
  font-size: 13px;
}
.manual-location-map {
  width: 100%;
  height: 300px;
  margin-top: 14px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--admin-border);
  background: #eef3ec;
}
.report-section {
  margin-bottom: 20px;
}
.report-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.report-note {
  margin: 12px 0 0;
  font-size: 13px;
}
.report-import-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 20px;
}
.report-import-steps span {
  padding: 10px 8px;
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  background: #f8faf7;
  color: var(--admin-muted);
  text-align: center;
  font-size: 12px;
  font-weight: 700;
}
.report-import-steps span.active {
  background: var(--admin-green-soft);
  color: var(--admin-green-dark);
  border-color: #b7d4b7;
}
.report-template-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding: 16px;
  border: 1px solid var(--admin-border);
  border-radius: 14px;
  background: #fbfdfb;
}
.report-template-row p {
  margin: 5px 0 0;
  line-height: 1.5;
}
.report-file-group {
  margin-top: 16px;
}
.report-validation {
  margin-top: 22px;
}
.report-error-list {
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid #f6c7c3;
  border-radius: 12px;
  background: #fff5f4;
  color: #8f251c;
}
.report-error-list ul {
  margin: 8px 0 0 18px;
  padding: 0;
}
.report-error-list li + li {
  margin-top: 5px;
}
.report-preview-wrap {
  margin-top: 14px;
  border: 1px solid var(--admin-border);
  border-radius: 12px;
}
.report-confirm-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 18px;
  line-height: 1.5;
}
.report-confirm-row input {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  margin-top: 2px;
}

@media (max-width: 900px) {
  .report-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .report-import-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .manual-location-map {
    height: 240px;
  }
  .report-filter-grid,
  .report-import-steps {
    grid-template-columns: 1fr;
  }
  .report-template-row {
    align-items: stretch;
    flex-direction: column;
  }
  .report-template-row .btn {
    width: 100%;
  }
}

.dashboard-chart-wrap,
.dashboard-chart-wrap canvas,
.dashboard-map,
.leaflet-container {
  max-width: 100%;
}


/* ========================================= */
/* FINAL MOBILE TABLE + SUMMARY + REPORT PASS */
/* ========================================= */
.admin-body,
.admin-shell,
.admin-main,
.admin-content,
.dashboard-section,
.dashboard-insight-grid,
.dashboard-operational-grid,
.admin-card,
.admin-card-body,
.admin-card-header {
  min-width: 0;
}

.admin-body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.table-wrap {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

.table-wrap .admin-table {
  width: max-content;
  min-width: max(100%, 760px);
  max-width: none;
}

.table-wrap .admin-table th,
.table-wrap .admin-table td {
  white-space: nowrap;
}

.pagination-info {
  display: none !important;
}

.report-summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.report-summary-card {
  padding: 16px;
  min-height: 104px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.report-summary-card span {
  color: var(--admin-muted);
  font-size: 12px;
}

.report-summary-card strong {
  color: var(--admin-green-dark);
  font-size: 26px;
}

.report-review-note {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-left: 4px solid var(--admin-green);
  border-radius: 12px;
  background: #f5faf4;
}

.report-review-note strong {
  color: var(--admin-green-dark);
}

.report-review-note p {
  margin: 6px 0 0;
  color: var(--admin-muted);
  line-height: 1.55;
}

.report-import-steps span.done {
  border-color: #a6cea8;
  background: #e8f5e9;
  color: var(--admin-green-dark);
}

.report-review-status {
  margin: 12px 0 4px;
}

.report-review-status p {
  margin: 8px 0 0;
  color: var(--admin-muted);
  line-height: 1.5;
}

@media (max-width: 1100px) {
  .report-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .admin-content {
    width: calc(100% - 20px);
    max-width: calc(100% - 20px);
    margin-left: auto;
    margin-right: auto;
  }

  .dashboard-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px;
  }

  .dashboard-summary-card {
    aspect-ratio: 1 / 1;
    min-height: 0;
    padding: 12px;
    gap: 8px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    overflow: hidden;
  }

  .dashboard-summary-icon {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 11px;
    font-size: 17px;
  }

  .dashboard-summary-card span {
    font-size: 10.5px;
    line-height: 1.2;
  }

  .dashboard-summary-card strong {
    margin-top: 2px;
    font-size: 23px;
    line-height: 1;
  }

  .report-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .report-summary-card {
    min-height: 92px;
    padding: 13px;
  }

  .report-summary-card strong {
    font-size: 23px;
  }

  .table-wrap {
    margin-left: 0;
    margin-right: 0;
    border-radius: 10px;
  }

  .table-wrap::after {
    content: "Geser tabel ke samping ↔";
    position: sticky;
    left: 8px;
    display: inline-block;
    margin: 8px;
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(27, 94, 32, .08);
    color: var(--admin-green-dark);
    font-size: 10px;
    font-weight: 700;
    pointer-events: none;
  }

  .table-wrap .admin-table {
    min-width: 760px;
  }

  .admin-body input,
  .admin-body select,
  .admin-body textarea {
    font-size: 16px !important;
  }
}


/* ========================================= */
/* DASHBOARD MOBILE COMPACT + CHART SCROLL V2 */
/* ========================================= */
.dashboard-search-section {
  margin-top: 24px;
}
.dashboard-search-card {
  max-width: 760px;
}
.dashboard-chart-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}
.dashboard-chart-canvas {
  position: relative;
  width: 100%;
  min-width: 0;
  height: 330px;
}
.dashboard-chart-canvas canvas {
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  max-height: none;
}
.dashboard-desil-card {
  max-width: 760px;
}
.dashboard-map-card {
  width: 100%;
}

@media (max-width: 700px) {
  body.admin-body .dashboard-summary-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-flow: row !important;
    gap: 10px !important;
    width: 100% !important;
  }

  body.admin-body .dashboard-summary-grid > .dashboard-summary-card {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    height: clamp(106px, 31vw, 138px) !important;
    aspect-ratio: auto !important;
    margin: 0 !important;
    padding: 12px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 8px !important;
  }

  body.admin-body .dashboard-summary-card > div:last-child {
    min-width: 0;
    width: 100%;
  }

  body.admin-body .dashboard-summary-card span {
    font-size: 10.5px !important;
    line-height: 1.2 !important;
    white-space: normal !important;
  }

  body.admin-body .dashboard-summary-card strong {
    font-size: 24px !important;
    line-height: 1 !important;
  }

  .dashboard-search-row {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .dashboard-search-row .btn {
    width: 100%;
  }

  .dashboard-chart-scroll {
    margin: 0;
    padding-bottom: 10px;
  }

  .dashboard-chart-scroll::after {
    content: "Geser grafik ke samping ↔";
    position: sticky;
    left: 8px;
    display: inline-block;
    margin: 8px 8px 0;
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(27, 94, 32, .08);
    color: var(--admin-green-dark);
    font-size: 10px;
    font-weight: 700;
    pointer-events: none;
  }

  .dashboard-chart-canvas {
    width: 720px;
    min-width: 720px;
    height: 300px;
  }

  .dashboard-status-chart {
    min-width: 0;
    width: 100%;
  }

  .dashboard-desil-card,
  .dashboard-search-card {
    max-width: 100%;
  }
}


/* =========================================
   GALERI ADMIN - KELOLA METADATA
   ========================================= */
.gallery-manage-card {
  overflow: hidden;
  padding: 0;
}
.gallery-manage-card .gallery-admin-preview {
  border: 0;
  border-radius: 0;
}
.gallery-manage-body {
  padding: 15px;
}
.gallery-manage-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.gallery-manage-heading h3 {
  margin: 0;
}
.gallery-caption-preview {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}


/* =========================================================
   ADMIN AUTH GATE / BFCache HARDENING
   Halaman Admin protected tidak pernah menampilkan isi sebelum
   Firebase Auth + cekSesiAdmin() selesai diverifikasi.
   ========================================================= */
.admin-body.admin-auth-pending {
  overflow: hidden !important;
}

.admin-body.admin-auth-pending > .admin-shell {
  visibility: hidden !important;
  pointer-events: none !important;
  user-select: none !important;
}

.admin-body.admin-auth-pending::before {
  content: "Memeriksa sesi Admin…";
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #f7faf7;
  color: #31533c;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .01em;
  text-align: center;
}

.admin-body.admin-auth-verified::before {
  content: none;
}

/* Galeri Admin: aksi edit/hapus tetap rapi di desktop dan mobile. */
.gallery-manage-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.gallery-manage-actions .btn {
  flex: 0 1 auto;
}

@media (max-width: 700px) {
  .gallery-manage-actions .btn {
    flex: 1 1 140px;
  }
}

/* =========================================================
   PORTAL PENGURUS - SESSION GATE & LAYOUT
   ========================================================= */
.admin-body.pengurus-auth-pending {
  overflow: hidden !important;
}

.admin-body.pengurus-auth-pending > .pengurus-page {
  visibility: hidden !important;
  pointer-events: none !important;
  user-select: none !important;
}

.admin-body.pengurus-auth-pending::before {
  content: "Memeriksa sesi Pengurus…";
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  background: #f7faf7;
  color: #31533c;
  font-weight: 700;
}

.pengurus-page {
  min-height: 100dvh;
  background: #f7faf7;
}

.pengurus-topbar {
  min-height: 88px;
  padding: 14px max(20px, calc((100vw - 1180px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: #175f28;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.pengurus-topbar .admin-brand {
  color: #fff;
}

.pengurus-account-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.pengurus-account-actions .btn-outline {
  color: #fff;
  border-color: rgba(255,255,255,.5);
}

.pengurus-content {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0 60px;
}

.admin-modal-card {
  width: min(620px, 100%);
}

.temporary-pin {
  font-size: 1.45em;
  letter-spacing: .18em;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 700px) {
  .pengurus-topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px;
  }

  .pengurus-account-actions {
    width: 100%;
    justify-content: space-between;
  }

  .pengurus-content {
    width: min(100% - 24px, 1180px);
    padding-top: 24px;
  }
}

/* Modal sederhana untuk Reset PIN Admin/Pengurus. */
.modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(16, 24, 40, 0.58);
}

.modal.hidden {
  display: none !important;
}

.modal-content {
  position: relative;
  max-height: calc(100dvh - 40px);
  overflow: auto;
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--admin-shadow);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: #edf4ee;
  color: #175f28;
  font-size: 24px;
  cursor: pointer;
}

/* ========================================= */
/* DASHBOARD MAP INTERACTION + LOCATION NAME */
/* ========================================= */
.dashboard-map {
  min-height: 320px;
  touch-action: pan-x pan-y;
}
.dashboard-location-marker-wrap {
  background: transparent;
  border: 0;
}
.dashboard-location-marker {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50% 50% 50% 10%;
  transform: rotate(-45deg);
  background: #1f7a34;
  color: #fff;
  border: 3px solid #fff;
  box-shadow: 0 5px 14px rgba(18, 62, 29, 0.28);
  font-size: 17px;
  font-weight: 900;
}
.dashboard-location-marker i {
  display: block;
  transform: rotate(45deg);
  font-style: normal;
}
.dashboard-location-tooltip {
  border: 1px solid #cfe0cb;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  color: #15391d;
  box-shadow: 0 4px 14px rgba(18, 62, 29, 0.14);
  font-weight: 800;
  padding: 5px 9px;
}
.dashboard-location-tooltip::before {
  border-top-color: #fff !important;
}
.dashboard-map-popup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 8px;
}
.dashboard-map-popup-actions a {
  color: #17652a;
  font-weight: 800;
}
.dashboard-contact-settings-card {
  max-width: 760px;
  margin-bottom: 18px;
}

/* =========================================================
   UMUR REALTIME - INPUT DATA WARGA
   ========================================================= */
.form-group .age-live {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 8px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #f3f7f1;
  border: 1px solid #d7e5d3;
  color: #5c6a60;
  font-size: 12px;
  font-weight: 700;
}

.form-group .age-live.age-ready {
  background: #eaf6e8;
  border-color: #b9d8b4;
  color: #146b29;
}

/* =========================================================
   PETUGAS DATA WARGA CRUD
   ========================================================= */
.pengurus-mini-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.pengurus-mini-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--border-color, #d9e3d8);
  border-radius: 12px;
  color: var(--green-800, #145f2c);
  font-weight: 700;
  text-decoration: none;
  background: #fff;
}

.pengurus-mini-nav a.active,
.pengurus-mini-nav a:hover {
  background: #edf7ef;
  border-color: #a9cfaf;
}

.petugas-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.petugas-meta-grid > div {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid #dce6dc;
  border-radius: 14px;
  background: #f8fbf8;
}

.petugas-meta-grid span {
  overflow-wrap: anywhere;
}

.detail-static-value {
  display: flex;
  align-items: center;
  min-height: 48px;
  white-space: normal;
}

.petugas-detail-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.danger-zone-card {
  border-color: #f0c9c5;
}

@media (max-width: 760px) {
  .pengurus-topbar {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
  }

  .pengurus-mini-nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    margin-left: 0;
  }

  .pengurus-mini-nav a {
    flex: 0 0 auto;
  }

  .petugas-meta-grid {
    grid-template-columns: 1fr;
  }

  .petugas-detail-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .petugas-detail-actions .page-actions {
    width: 100%;
  }

  .petugas-detail-actions .page-actions .btn {
    flex: 1 1 auto;
  }
}

/* =========================================================
   FAMILY DETAIL + HEAD FILTER + MAP HARDENING
   ========================================================= */
@media (min-width: 1081px) {
  .admin-filter-grid {
    grid-template-columns: 1.7fr 1.35fr repeat(4, minmax(120px, 1fr));
  }
}

.family-detail-header {
  align-items: flex-start;
}

.family-detail-header p {
  margin: 6px 0 0;
}

.family-member-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.family-member-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--admin-border);
  border-left: 4px solid var(--admin-green);
  border-radius: 16px;
  background: #fbfdfb;
}

.family-member-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--admin-border);
}

.family-member-card-head h3 {
  margin: 0 0 4px;
  color: var(--admin-green-dark);
  font-size: 17px;
}

.family-member-card-head p {
  margin: 0;
  color: var(--admin-muted);
  font-size: 13px;
}

.family-head-badge {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 999px;
  background: #e9f5e8;
  color: #17652a;
  font-size: 11px;
  font-weight: 800;
}

.family-member-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  margin-top: 14px;
}

.family-member-detail-grid > div {
  min-width: 0;
}

.family-member-detail-grid span,
.family-member-detail-grid strong {
  display: block;
}

.family-member-detail-grid span {
  margin-bottom: 3px;
  color: var(--admin-muted);
  font-size: 11px;
}

.family-member-detail-grid strong {
  overflow-wrap: anywhere;
  color: #1d3021;
  font-size: 13px;
  line-height: 1.45;
}

.family-member-card-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

/* Leaflet harus bebas dari aturan img global dan ukuran container berubah. */
.dashboard-map.leaflet-container {
  position: relative;
  width: 100%;
  min-height: 340px;
  isolation: isolate;
  touch-action: none;
}

.dashboard-map .leaflet-pane,
.dashboard-map .leaflet-map-pane,
.dashboard-map .leaflet-tile-pane {
  max-width: none;
}

.dashboard-map img.leaflet-tile,
.dashboard-map .leaflet-tile {
  width: 256px !important;
  height: 256px !important;
  max-width: none !important;
  max-height: none !important;
}

.dashboard-map .leaflet-control-zoom {
  z-index: 900;
}

@media (max-width: 820px) {
  .family-member-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .family-member-detail-grid {
    grid-template-columns: 1fr;
  }

  .family-member-card-head {
    flex-direction: column;
  }
}

/* =========================================================
   FAMILY LOCATION MAP V2 - DETAIL + DASHBOARD
   ========================================================= */
.dashboard-map-shell {
  position: relative;
  width: 100%;
  min-height: 340px;
  border-radius: 16px;
  overflow: hidden;
  background: #eef3ec;
}

.dashboard-map-shell .dashboard-map {
  width: 100%;
  height: 380px;
  min-height: 340px;
  border-radius: 16px;
  background: #eef3ec;
}

.dashboard-map-empty {
  min-height: 340px;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--admin-muted);
  text-align: center;
}

.dashboard-map-shell .leaflet-container,
.family-location-map.leaflet-container {
  width: 100% !important;
  max-width: none !important;
  background: #e9efe7;
  font: inherit;
}

.dashboard-map-shell .leaflet-container img,
.dashboard-map-shell .leaflet-container img.leaflet-tile,
.family-location-map.leaflet-container img,
.family-location-map.leaflet-container img.leaflet-tile {
  max-width: none !important;
  max-height: none !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
}

.dashboard-map-shell .leaflet-tile,
.family-location-map .leaflet-tile {
  width: 256px !important;
  height: 256px !important;
}

.family-location-block {
  margin-top: 8px;
}

.family-location-empty {
  min-height: 120px;
  display: grid;
  place-items: center;
  padding: 20px;
  border: 1px dashed #cddccc;
  border-radius: 16px;
  background: #f8fbf8;
  color: var(--admin-muted);
  text-align: center;
}

.family-location-panel {
  display: grid;
  gap: 16px;
}

.family-location-map {
  width: 100%;
  height: 340px;
  min-height: 300px;
  overflow: hidden;
  border: 1px solid var(--admin-border);
  border-radius: 16px;
  background: #eef3ec;
}

.family-location-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.family-location-meta-grid > div {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid #dce6dc;
  border-radius: 13px;
  background: #f8fbf8;
}

.family-location-meta-grid > div.full {
  grid-column: 1 / -1;
}

.family-location-meta-grid span,
.family-location-meta-grid strong {
  display: block;
}

.family-location-meta-grid span {
  margin-bottom: 4px;
  color: var(--admin-muted);
  font-size: 11px;
}

.family-location-meta-grid strong {
  overflow-wrap: anywhere;
  color: #1d3021;
  font-size: 13px;
  line-height: 1.5;
}

.family-location-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.family-location-marker-wrap {
  background: transparent;
  border: 0;
}

.family-location-marker {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 10%;
  transform: rotate(-45deg);
  background: #1f7a34;
  color: #fff;
  box-shadow: 0 5px 14px rgba(18, 62, 29, 0.28);
  font-size: 17px;
  font-weight: 900;
}

.family-location-marker i {
  display: block;
  transform: rotate(45deg);
  font-style: normal;
}

@media (max-width: 700px) {
  .dashboard-map-shell,
  .dashboard-map-empty {
    min-height: 300px;
  }

  .dashboard-map-shell .dashboard-map,
  .family-location-map {
    height: 300px;
    min-height: 280px;
  }

  .family-location-meta-grid {
    grid-template-columns: 1fr;
  }

  .family-location-meta-grid > div.full {
    grid-column: auto;
  }

  .family-location-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .family-location-actions .btn {
    width: 100%;
  }
}

.dashboard-map-shell .dashboard-map-empty {
  position: absolute;
  inset: 0;
  z-index: 5;
  min-height: 0;
  background: #eef3ec;
}

/* =========================================================
   POPUP PETUGAS — ERROR / KONFIRMASI AKSI
   ========================================================= */
body.petugas-dialog-open {
  overflow: hidden;
}

.petugas-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(10, 24, 15, 0.62);
  backdrop-filter: blur(3px);
}

.petugas-dialog-backdrop.hidden {
  display: none !important;
}

.petugas-dialog {
  width: min(540px, 100%);
  max-height: calc(100dvh - 40px);
  overflow: auto;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 16px 18px;
  padding: 24px;
  border: 1px solid var(--admin-border);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(13, 38, 19, 0.28);
}

.petugas-dialog-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--admin-green-soft);
  color: var(--admin-green-dark);
  font-size: 25px;
  font-weight: 900;
}

.petugas-dialog-copy h3 {
  margin: 1px 0 8px;
  color: var(--admin-green-dark);
  font-size: 1.25rem;
}

.petugas-dialog-copy p {
  margin: 0;
  color: #36463b;
  line-height: 1.6;
  white-space: pre-line;
}

.petugas-dialog-details {
  margin: 14px 0 0;
  padding: 12px 14px 12px 32px;
  border-radius: 14px;
  background: #f6f9f6;
  color: #324138;
  line-height: 1.55;
}

.petugas-dialog-details li + li {
  margin-top: 5px;
}

.petugas-dialog-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 4px;
}

.petugas-dialog-error .petugas-dialog-icon {
  background: var(--admin-red-soft);
  color: #912018;
}

.petugas-dialog-error .petugas-dialog-copy h3 {
  color: #912018;
}

.petugas-dialog-warning .petugas-dialog-icon {
  background: var(--admin-amber-soft);
  color: #93370d;
}

.petugas-dialog-warning .petugas-dialog-copy h3 {
  color: #93370d;
}

.petugas-dialog-success .petugas-dialog-icon {
  background: var(--admin-green-soft);
  color: var(--admin-green-dark);
}

.form-group-invalid .form-control,
.form-group-invalid input,
.form-group-invalid select,
.form-group-invalid textarea {
  border-color: #d92d20 !important;
  box-shadow: 0 0 0 3px rgba(217, 45, 32, 0.1) !important;
}

.filter-head-family-toggle {
  min-width: 190px;
}

.filter-head-family-toggle.active,
.filter-head-family-toggle[aria-pressed="true"] {
  border-color: var(--admin-green-dark);
  background: var(--admin-green-soft);
  color: var(--admin-green-dark);
  box-shadow: inset 0 0 0 1px rgba(27, 94, 32, 0.08);
}

@media (max-width: 700px) {
  .petugas-dialog {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 13px;
    padding: 18px;
    border-radius: 18px;
  }

  .petugas-dialog-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    font-size: 22px;
  }

  .petugas-dialog-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .petugas-dialog-actions .btn {
    width: 100%;
  }

  .petugas-dialog-actions .btn:only-child {
    grid-column: 1 / -1;
  }

  .filter-head-family-toggle {
    width: 100%;
  }
}

.petugas-dialog-input-wrap {
  margin-top: 14px;
}

.petugas-dialog-input-wrap label {
  display: block;
  margin-bottom: 7px;
  color: #20352a;
  font-weight: 800;
}


/* ========================================= */
/* QA UI DATA WARGA + PROFIL SIDEBAR 20260907 */
/* ========================================= */
.admin-user-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.admin-user-avatar {
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  aspect-ratio: 1 / 1;
  flex: 0 0 42px;
  line-height: 1;
  overflow: hidden;
}

.admin-user-copy {
  min-width: 0;
  overflow: hidden;
}

.admin-user-copy strong {
  max-width: 100%;
  font-size: 13px;
  line-height: 1.3;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.admin-filter-actions {
  align-items: stretch;
  flex-wrap: wrap;
}

.admin-filter-actions .btn {
  min-height: 50px;
  line-height: 1.2;
}

.filter-head-family-toggle {
  min-width: 190px;
  gap: 8px;
  white-space: nowrap;
  flex: 0 0 auto;
}

.filter-head-family-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  line-height: 1;
}

@media (max-width: 700px) {
  .admin-filter-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    width: 100%;
  }

  .admin-filter-actions .btn {
    width: 100%;
    min-width: 0;
    padding-left: 14px;
    padding-right: 14px;
  }

  .filter-head-family-toggle {
    grid-column: 1 / -1;
    min-width: 0;
  }
}

@media (max-width: 360px) {
  .admin-filter-actions {
    grid-template-columns: 1fr;
  }

  .filter-head-family-toggle {
    grid-column: auto;
  }
}

/* =========================================================
   RESPONSIVE ADMIN + LOGIN HARDENING 20260908
   ========================================================= */
.admin-login-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-login-topbar {
  margin-bottom: 24px;
}

.admin-login-back,
.admin-login-switch {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.admin-login-back {
  color: #17652a;
  background: #f5faf5;
  border: 1px solid #cfe0cb;
}

.admin-login-switch {
  color: #fff;
  background: #1f7a34;
  border: 1px solid #1f7a34;
}

.admin-login-note {
  margin-top: 22px !important;
  margin-bottom: 0 !important;
  font-size: 13px;
}

/* Collapse the permanent sidebar earlier so browser zoom / narrow desktop
   never squeezes the working area into an awkward half-desktop layout. */
@media (max-width: 1180px) {
  .admin-main {
    margin-left: 0;
  }

  .admin-sidebar {
    left: 0;
    width: min(320px, calc(100vw - 44px));
    max-width: 320px;
    height: 100dvh;
    min-height: 100dvh;
    transform: translateX(-105%);
    transition: transform .24s ease;
    box-shadow: 22px 0 44px rgba(0, 0, 0, .24);
  }

  body.sidebar-open .admin-sidebar {
    transform: translateX(0);
  }

  .admin-sidebar .admin-brand {
    padding-right: 54px;
  }

  .admin-sidebar-close {
    position: absolute;
    top: 18px;
    right: 16px;
    z-index: 3;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.24);
    border-radius: 13px;
    background: rgba(255,255,255,.13);
    color: #fff;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
  }

  .admin-mobile-fab {
    display: inline-grid;
    place-items: center;
    z-index: 30;
  }

  body.sidebar-open .admin-mobile-fab {
    visibility: hidden;
    pointer-events: none;
  }

  .admin-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 35;
    display: block;
    visibility: hidden;
    opacity: 0;
    border: 0;
    background: rgba(12,24,15,.52);
    transition: opacity .2s ease, visibility .2s ease;
  }

  body.sidebar-open .admin-sidebar-backdrop {
    visibility: visible;
    opacity: 1;
  }

  .admin-content {
    width: min(100% - 28px, 1180px);
    padding-top: 76px;
  }

  .page-heading {
    gap: 16px;
  }

  .admin-filter-grid,
  .petugas-warga-filter-grid,
  .report-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .admin-content {
    width: calc(100% - 20px);
    max-width: calc(100% - 20px);
  }

  .page-heading {
    flex-direction: column;
  }

  .page-actions,
  .page-actions .btn,
  .page-actions > a {
    width: 100%;
  }

  .admin-filter-grid,
  .petugas-warga-filter-grid,
  .report-filter-grid {
    grid-template-columns: 1fr;
  }

  .form-grid,
  .detail-list,
  .summary-grid,
  .manual-mode-switch,
  .family-location-meta-grid {
    grid-template-columns: 1fr;
  }

  .admin-card-header,
  .admin-card-body {
    padding-left: 16px;
    padding-right: 16px;
  }

  .table-wrap {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 520px) {
  .admin-login-page {
    padding: 18px 12px;
  }

  .admin-login-card {
    padding: 24px 18px;
    border-radius: 22px;
  }

  .admin-login-topbar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .admin-login-back,
  .admin-login-switch {
    width: 100%;
  }
}

/* =========================================================
   DASHBOARD MAP STABILITY 20260908
   ========================================================= */
.dashboard-map-shell {
  contain: layout paint;
}

.dashboard-map-shell .dashboard-map.leaflet-container {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  border-radius: inherit;
  overflow: hidden;
}

.dashboard-map-loading {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 24px;
  background: #eef3ec;
  color: #21452a;
  text-align: center;
}

.dashboard-map-loading small {
  max-width: 420px;
  color: var(--admin-muted);
  line-height: 1.5;
}

.dashboard-map-spinner {
  width: 34px;
  height: 34px;
  border: 4px solid #cfe0cb;
  border-top-color: #1f7a34;
  border-radius: 50%;
  animation: dashboard-map-spin .8s linear infinite;
}

@keyframes dashboard-map-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-map-spinner { animation: none; }
}

.dashboard-map-shell .leaflet-map-pane,
.dashboard-map-shell .leaflet-tile-pane,
.dashboard-map-shell .leaflet-overlay-pane,
.dashboard-map-shell .leaflet-marker-pane,
.dashboard-map-shell .leaflet-tooltip-pane,
.dashboard-map-shell .leaflet-popup-pane {
  max-width: none !important;
  max-height: none !important;
}

.dashboard-map-shell .leaflet-tile-container {
  width: auto !important;
  height: auto !important;
}

.dashboard-map-shell .leaflet-tile {
  max-width: none !important;
  max-height: none !important;
}

.dashboard-map-popup-actions a {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border: 1px solid #cfe0cb;
  border-radius: 8px;
  background: #f7fbf7;
  text-decoration: none;
}

/* LOCATION MAP RELIABILITY + FALLBACK LIST 20260908 */
.dashboard-map-shell {
  height: 380px;
  min-height: 340px;
  overflow: hidden;
}

.dashboard-location-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.dashboard-location-list.hidden {
  display: none;
}

.dashboard-location-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--admin-border, #d8e5d6);
  border-radius: 16px;
  background: #fff;
}

.dashboard-location-item-main {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.dashboard-location-item-main strong,
.dashboard-location-item-main span,
.dashboard-location-item-main small {
  overflow-wrap: anywhere;
}

.dashboard-location-item-main span,
.dashboard-location-item-main small {
  color: var(--admin-muted, #68776a);
}

.dashboard-location-item-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.dashboard-location-item-actions .btn {
  min-height: 42px;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .dashboard-map-shell {
    height: 320px;
    min-height: 300px;
  }

  .dashboard-location-item {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-location-item-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .dashboard-location-item-actions .btn {
    width: 100%;
  }
}

/* =========================================================
   PORTAL PENGURUS - SIDEBAR FINAL + LAPORAN FRONTEND
   ========================================================= */
.admin-body.pengurus-auth-pending > .admin-shell {
  visibility: hidden !important;
  pointer-events: none !important;
  user-select: none !important;
}

.admin-body.pengurus-auth-verified::before {
  content: none;
}

.pengurus-report-head-only {
  margin-top: 16px;
}

.pengurus-report-table-header {
  align-items: center;
}

.pengurus-report-table-header p {
  margin: 4px 0 0;
}

.pengurus-report-table {
  min-width: 920px;
}

.pengurus-report-age-table {
  min-width: 640px;
}

.pengurus-report-note {
  margin: 14px 0 0;
  font-size: 12px;
}

@media print {
  body.admin-body {
    background: #fff !important;
  }

  .admin-sidebar,
  .admin-mobile-fab,
  .admin-sidebar-backdrop,
  .pengurus-report-actions,
  .pengurus-report-filter-card,
  #pesanLaporanPengurus {
    display: none !important;
  }

  .admin-shell,
  .admin-main {
    display: block !important;
    min-height: 0 !important;
  }

  .admin-main {
    margin: 0 !important;
    width: 100% !important;
  }

  .admin-content {
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
  }

  .admin-card {
    box-shadow: none !important;
    break-inside: avoid;
  }

  .table-wrap {
    overflow: visible !important;
  }

  .pengurus-report-table,
  .pengurus-report-age-table {
    min-width: 0 !important;
    font-size: 10px;
  }
}
