:root {
  --accent: #4f46e5;
  --accent-contrast: #ffffff;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-solid: #ffffff;
  --text: #000000;
  --text-muted: #52525b;
  --border: rgba(15, 23, 42, 0.14);
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  --pill-bg: #f3f4f6;
  --pill-border: rgba(15, 23, 42, 0.16);
  --radius: 14px;
}

html[data-mode="dark"] {
  --surface: rgba(24, 26, 36, 0.85);
  --surface-solid: #1b1d29;
  --text: #f1f2f6;
  --text-muted: #b7bacb;
  --border: rgba(255, 255, 255, 0.1);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  --pill-bg: rgba(255, 255, 255, 0.08);
  --pill-border: rgba(255, 255, 255, 0.2);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  /* --page-text/--page-muted diisi header.php dari KECERAHAN LATAR; tanpa itu (latar gambar) pakai warna mode. */
  color: var(--page-text, var(--text));
}

/* Permukaan (menu, kartu, form, tabel) mengikuti MODE terang/gelap, bukan latar halaman. */
.topbar,
.form-card,
.table-wrap,
.pending-item {
  color: var(--text);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--surface);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 8px;
}

.brand {
  display: flex;
  align-items: center;
}

.brand-logo {
  height: 22px;
  width: auto;
  display: block;
}

/* Logo hitam solid dibalik jadi putih supaya tetap terlihat di topbar mode gelap. */
html[data-mode="dark"] .brand-logo {
  filter: invert(1) brightness(1.1);
}

.topbar nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.topbar nav .who {
  color: var(--text-muted);
  margin-right: 6px;
}

/* Setiap pilihan menu berbentuk bubble. Yang sedang dibuka (.is-active) dan yang disorot
   (hover/fokus) terisi warna aksen; warna teksnya dipilih otomatis (hitam/putih) supaya
   tetap terbaca di atas aksen apa pun yang dipilih pengguna. */
.topbar nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border: 1px solid var(--pill-border);
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.topbar nav a:hover,
.topbar nav a:focus-visible,
.topbar nav a.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
}

.topbar nav a.is-active {
  font-weight: 700;
}

.topbar nav a:hover,
.topbar nav a:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.topbar nav a:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

@media (max-width: 480px) {
  .topbar nav a {
    padding: 6px 12px;
    font-size: 0.9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .topbar nav a {
    transition: none;
  }
  .topbar nav a:hover,
  .topbar nav a:focus-visible {
    transform: none;
  }
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 32px 24px;
}

.welcome h1 {
  margin-bottom: 4px;
}

.muted {
  color: var(--page-muted, var(--text-muted));
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);
}

.card-badge {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-contrast, #fff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.card-title {
  font-weight: 600;
  font-size: 1.05rem;
}

.card-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.notes-section {
  margin-top: 40px;
}

.notes-section h2 {
  font-size: 1.15rem;
  margin-bottom: 4px;
}

.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.sticky-note {
  background: #fef3a3;
  color: #4a3f0a;
  border-radius: 4px;
  padding: 16px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
  font-size: 0.9rem;
  line-height: 1.5;
}

.sticky-note-title {
  font-weight: 700;
  margin-bottom: 8px;
  color: #241f00;
}

.sticky-note-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  word-break: break-word;
}

.note-label {
  font-weight: 600;
}

.note-value.note-secret {
  letter-spacing: 2px;
}

.eye-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 2px;
  margin-left: 2px;
  color: inherit;
  opacity: 0.65;
  cursor: pointer;
}

.eye-toggle:hover {
  opacity: 1;
}

.sitefooter {
  text-align: center;
  padding: 24px;
  color: var(--page-muted, var(--text-muted));
  font-size: 0.85rem;
}

.reset-form {
  margin-top: 12px;
}

.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 520px;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
}

.field input[type="text"],
.field input[type="url"],
.field input[type="date"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  color: var(--text);
}

.field input[type="color"] {
  width: 60px;
  height: 36px;
  border: none;
  background: none;
  padding: 0;
}

.field input[type="file"] {
  color: var(--text);
}

.field select,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
}

.field textarea {
  resize: vertical;
}

.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  margin-top: 16px;
}

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

.table th,
.table td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.table-actions {
  white-space: nowrap;
}

.radio-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.radio-row label {
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: var(--accent-contrast, #fff);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover {
  filter: brightness(1.08);
}

.btn-danger {
  background: #dc2626;
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--page-text, var(--text));
  border: 1px solid var(--border);
}

.form-card .btn-secondary,
.table-wrap .btn-secondary,
.pending-item .btn-secondary {
  color: var(--text);
}

.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.alert-ok {
  background: #dcfce7;
  color: #166534;
}

.alert-warn {
  background: #fef9c3;
  color: #854d0e;
}

.alert-err {
  background: #fee2e2;
  color: #991b1b;
}

.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  padding: 20px;
}

.login-card {
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  width: 100%;
  max-width: 380px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.1);
}

.login-logo {
  height: 44px;
  width: auto;
  display: block;
  margin: 0 auto 12px;
}

.login-card .muted {
  text-align: center;
}

.login-card .field input[type="text"],
.login-card .field input[type="password"] {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #e2e2ea;
}

.login-card .btn {
  width: 100%;
  text-align: center;
  margin-top: 8px;
}

.setup-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  padding: 20px;
}

.setup-card {
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  max-width: 480px;
  width: 100%;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.1);
}

.setup-card code {
  background: #f1f1f5;
  padding: 2px 6px;
  border-radius: 4px;
}

.profile-photo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 8px 0 24px;
}

.profile-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--surface-solid);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  background: var(--surface-solid);
}

img.profile-photo {
  cursor: zoom-in;
}

.profile-photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-contrast, #fff);
  background: var(--accent);
}

.photo-upload-btn {
  display: inline-block;
  cursor: pointer;
}

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
  cursor: zoom-out;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

main.profile-page {
  max-width: 680px;
  text-align: center;
}

.profile-card {
  max-width: 640px;
  margin: 0 auto;
  text-align: left;
}

.profile-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.profile-row:last-child {
  border-bottom: none;
}

.profile-label {
  color: var(--text-muted);
  font-weight: 500;
  flex-shrink: 0;
}

/* ---- Pendingan ---- */

/* Alert merah penuh lebar. Warnanya sengaja solid dan tidak ikut tema, supaya
   tetap terlihat di latar apa pun (termasuk tema merah). Tidak bisa ditutup. */
.pendingan-alert {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 24px;
  background: #b91c1c;
  color: #fff;
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  border-bottom: 3px solid #7f1d1d;
  box-shadow: 0 4px 14px rgba(127, 29, 29, 0.45);
}

.pendingan-alert-icon {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fff;
  color: #b91c1c;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  animation: pendingan-pulse 1.6s ease-out infinite;
}

@keyframes pendingan-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); }
  70%  { box-shadow: 0 0 0 10px rgba(255, 255, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .pendingan-alert-icon {
    animation: none;
  }
}

.pendingan-alert-text {
  flex: 1 1 180px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pendingan-alert-text span {
  opacity: 0.95;
  font-size: 0.92rem;
}

.pendingan-alert-btn {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 8px;
  background: #fff;
  color: #991b1b;
  font-weight: 700;
  text-decoration: none;
}

.pendingan-alert-btn:hover {
  background: #fee2e2;
}

.nav-badge {
  display: inline-block;
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}

.btn-success {
  background: #15803d;
  color: #fff;
}

.pending-form {
  margin-bottom: 8px;
}

.pending-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.15rem;
  margin: 32px 0 12px;
}

.pending-count {
  display: inline-block;
  min-width: 24px;
  padding: 1px 8px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 0.8rem;
  text-align: center;
}

.pending-count-done {
  background: #15803d;
}

.pending-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Setiap pendingan adalah kartu lipat (<details>): ringkasan selalu tampak, detail muncul saat diklik. */
.pending-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 6px solid #dc2626;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.pending-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: calc(var(--radius) - 2px);
  list-style: none;
  cursor: pointer;
}

.pending-summary::-webkit-details-marker {
  display: none;
}

.pending-summary:hover {
  background: rgba(15, 23, 42, 0.04);
}

html[data-mode="dark"] .pending-summary:hover {
  background: rgba(255, 255, 255, 0.05);
}

.pending-summary:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: -2px;
}

.pending-summary-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pending-title {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.pending-chip {
  padding: 2px 10px;
  border: 1px solid var(--pill-border);
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--text);
  font-size: 0.78rem;
  white-space: nowrap;
}

.pending-chevron {
  flex-shrink: 0;
  width: 9px;
  height: 9px;
  margin: 0 4px 3px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}

.pending-item[open] > .pending-summary .pending-chevron {
  margin: 3px 4px 0;
  transform: rotate(-135deg);
}

.pending-item[open] > .pending-summary {
  border-bottom: 1px solid var(--border);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.pending-body {
  padding: 14px 20px 16px;
}

/* Saat kartu terbuka, isi lengkap sudah tampil di badan kartu; judul ringkasan disembunyikan agar tidak kembar. */
.pending-item[open] > .pending-summary .pending-title {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .pending-chevron {
    transition: none;
  }
}

.pending-item-done {
  border-left-color: #15803d;
}

.pending-item-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.pending-tag {
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.pending-tag-open {
  background: #fee2e2;
  color: #991b1b;
}

.pending-tag-done {
  background: #dcfce7;
  color: #166534;
}

.pending-meta {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.pending-wait {
  color: #b91c1c;
}

html[data-mode="dark"] .pending-wait {
  color: #f87171;
}

.pending-desc {
  margin: 0 0 8px;
  overflow-wrap: anywhere;
}

.pending-link {
  display: block;
  margin-bottom: 4px;
  color: #1d4ed8;
  overflow-wrap: anywhere;
}

/* Warna link dibuat tetap (bukan warna aksen pengguna) supaya selalu terbaca; lebih terang di mode gelap. */
html[data-mode="dark"] .pending-link {
  color: #a5b4fc;
}

.pending-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.pending-actions form {
  margin: 0;
}

/* Hijau tua resmi WhatsApp (#075e54): putih di atasnya 8:1, jauh di atas batas AA. */
.btn-whatsapp {
  background: #075e54;
  color: #fff;
}

.btn-inline {
  margin-left: 10px;
  padding: 6px 12px;
  font-size: 0.9rem;
}

.pending-item-cancelled {
  border-left-color: #6b7280;
}

.pending-tag-cancelled {
  background: #e5e7eb;
  color: #374151;
}

/* Varian banner untuk halaman 403 yang tidak memakai layout standar (body-nya flex di tengah layar). */
.pendingan-alert-fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
}

/* Penanda item yang sudah dikoreksi pelapornya (kuning, kontras 7:1) agar Maul tidak melewatkannya. */
.pending-tag-edited {
  background: #fef9c3;
  color: #854d0e;
}

/* Tombol yang sedang menunggu submit harus tampak nonaktif. */
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Tombol di area pendingan: <a> dan <button> dibuat sama tinggi dan sama hurufnya
   (<button> bawaan browser memakai font sendiri). Dibatasi di sini agar tombol
   di halaman lain tidak ikut berubah. */
.pending-item .btn,
.pending-form .btn {
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
}

/* Border tombol sekunder default hampir tak terlihat di atas kartu (rasio ~1,2:1). */
.pending-actions .btn-secondary {
  border-color: var(--text-muted);
}

/* ---- Lampiran pendingan ---- */

.field-hint {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.pending-fieldset {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  margin: 0 0 16px;
}

.pending-fieldset legend {
  padding: 0 6px;
  font-weight: 500;
}

/* Diawali .pending-fieldset agar menang atas ".field label" (display:block, bobot 500). */
.pending-fieldset .check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
  margin: 6px 0;
  overflow-wrap: anywhere;
}

.pending-files {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px;
  margin: 10px 0 4px;
}

.pending-file {
  margin: 0;
}

.pending-file-image img {
  display: block;
  max-width: 100%;
  max-height: 200px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-solid);
}

.pending-file-video video {
  display: block;
  width: 320px;
  max-width: 100%;
  border-radius: 8px;
  background: #000;
}

.pending-file figcaption {
  margin-top: 4px;
  max-width: 320px;
  font-size: 0.8rem;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.pending-file figcaption a {
  color: #1d4ed8;
}

html[data-mode="dark"] .pending-file figcaption a {
  color: #a5b4fc;
}

.pending-file-doc {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-solid);
  color: var(--text);
  text-decoration: none;
}

.pending-file-doc:hover {
  border-color: var(--accent);
}

.pending-file-ext {
  min-width: 44px;
  padding: 4px 6px;
  border-radius: 6px;
  background: #374151;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-align: center;
}

.pending-file-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.pending-file-name {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.pending-file-size {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ---- Pendingan: prioritas, tenggat, kategori, percakapan, kabar baru, filter ---- */

/* Tiga isian pendek (prioritas, tenggat, kategori) sebaris selama muat, turun ke bawah di layar sempit. */
.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0 12px;
}

/* Lencana "N baru" di menu untuk pelapor: hijau tua, putih di atasnya 5:1. */
.nav-badge-new {
  background: #15803d;
  margin-left: 2px;
}

.pending-item-urgent {
  border-left-width: 10px;
}

.pending-tag-urgent {
  background: #7f1d1d;
  color: #fff;
}

.pending-tag-overdue {
  background: #b91c1c;
  color: #fff;
}

.pending-tag-soon {
  background: #ffedd5;
  color: #9a3412;
}

.pending-tag-info {
  background: #fef3c7;
  color: #92400e;
}

.pending-tag-new {
  background: #dbeafe;
  color: #1e40af;
}

.pending-tag-replied {
  background: #ccfbf1;
  color: #115e59;
}

.pending-tag-rejected {
  background: #f3e8ff;
  color: #6b21a8;
}

.pending-item-rejected {
  border-left-color: #7e22ce;
}

/* Petunjuk di dalam kartu (mis. "menunggu jawaban pelapor"). */
.pending-hint {
  margin: 0 0 10px;
  padding: 8px 12px;
  border-left: 4px solid #f59e0b;
  border-radius: 0 8px 8px 0;
  background: rgba(245, 158, 11, 0.14);
  overflow-wrap: anywhere;
}

/* Catatan penyelesaian dan alasan penolakan. */
.pending-result {
  margin: 10px 0;
  padding: 8px 12px;
  border-left: 4px solid #15803d;
  border-radius: 0 8px 8px 0;
  background: rgba(21, 128, 61, 0.1);
  overflow-wrap: anywhere;
}

.pending-result-rejected {
  border-left-color: #7e22ce;
  background: rgba(126, 34, 206, 0.1);
}

.pending-files-title {
  margin: 12px 0 4px;
  font-size: 0.9rem;
  font-weight: 600;
}

.pending-thread {
  margin: 12px 0 4px;
}

.pending-thread .pending-files-title {
  margin-top: 0;
}

.pending-comment {
  margin: 0 0 8px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-solid);
}

.pending-comment-info {
  border-left: 4px solid #f59e0b;
}

.pending-comment-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 2px;
}

.pending-comment-text {
  overflow-wrap: anywhere;
}

/* Form kecil di dalam kartu (selesai, balas, tolak). */
.pending-subform {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

.pending-sub > summary {
  cursor: pointer;
  font-weight: 600;
  padding: 4px 0;
}

.pending-sub[open] > summary {
  margin-bottom: 8px;
}

.pending-sub-danger {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}

.pending-sub-danger > summary {
  color: #b91c1c;
}

html[data-mode="dark"] .pending-sub-danger > summary {
  color: #f87171;
}

.pending-sub-danger .pending-subform {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.pending-subform .check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
  margin: 4px 0 0;
}

/* Bilah filter penyelesai: pelapor, kategori, dan status. */
.pending-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin: 20px 0 0;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.pending-filter-field {
  flex: 1 1 180px;
  min-width: 0;
}

.pending-filter-field label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.pending-filter select {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  color: var(--text);
  font: inherit;
}

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

.pending-filter .btn {
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
  border-color: var(--text-muted);
}

.pending-filtered {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--page-muted, var(--text-muted));
}

/* Mode kontras tinggi (Windows): warna latar ditimpa sistem, jadi menu aktif dibedakan dengan garis bawah dan tepi tebal. */
@media (forced-colors: active) {
  .topbar nav a {
    border: 1px solid ButtonText;
  }
  .topbar nav a.is-active {
    border-width: 3px;
    text-decoration: underline;
  }
}
