:root {
  --bg: #F9F8F6;
  --surface: #FFFCF7;
  --text: #1D3044;
  --text-muted: #786F67;
  --accent: #B95032;
  --accent-hover: #9F402B;
  --border: #E6DCD1;
  --danger: #A7432E;
  --radius: 6px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

body {
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 100% 0%, rgba(185, 79, 50, 0.16) 0 15rem, transparent 15.1rem),
    radial-gradient(circle at 0% 52%, rgba(185, 79, 50, 0.12) 0 13rem, transparent 13.1rem),
    radial-gradient(ellipse 25rem 18rem at 100% 100%, rgba(29, 48, 68, 0.14) 0 60%, transparent 61%),
    radial-gradient(rgba(89, 71, 54, 0.09) 0.55px, transparent 0.75px);
  background-repeat: no-repeat, no-repeat, no-repeat, repeat;
  background-attachment: fixed, fixed, fixed, fixed;
  background-size: auto, auto, auto, 5px 5px;
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

header {
  position: sticky;
  top: 1rem;
  z-index: 100;
  max-width: 1200px;
  margin: 1rem auto 0 auto;
  padding: 0 2rem;
}

.nav-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(54, 42, 32, 0.045);
  padding: 0.75rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
  color: var(--accent);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.logo span {
  font-family: Monaco, Menlo, "SF Mono", monospace;
  font-size: 0.75rem;
  background: var(--accent);
  color: white;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

.nav-menu {
  display: flex;
  gap: 2rem;
  list-style: none;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
}

.nav-menu button {
  appearance: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: color 0.15s;
}

.nav-menu button:hover,
.nav-menu button.active {
  color: var(--accent);
  font-weight: 600;
}

.nav-menu button:focus-visible,
.mobile-menu-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

/* Tombol hamburger hanya muncul pada ukuran mobile/tablet. */
.mobile-menu-toggle {
  display: none;
  width: 42px;
  height: 40px;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

.hamburger-line {
  display: block;
  width: 19px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:first-child {
  transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:last-child {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

main {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 2rem;
}

.card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 2px rgba(54, 42, 32, 0.035);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group.full {
  grid-column: span 2;
}

label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

input[type="text"],
input[type="date"],
input[type="file"],
input[type="password"],
select,
textarea {
  width: 100%;
  padding: 0.625rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--text);
  transition: border-color 0.15s;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
}

textarea {
  resize: vertical;
  min-height: 100px;
}

.media-preview-container {
  margin-top: 0.5rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.media-preview-container img,
.media-preview-container video {
  max-height: 120px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  object-fit: cover;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background-color: var(--accent);
  color: white;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--accent);
  cursor: pointer;
  font-size: 0.875rem;
  transition: background-color 0.15s;
}

.btn:hover {
  background-color: var(--accent-hover);
}

.btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn-outline:hover {
  background: var(--bg);
  border-color: var(--text-muted);
}

.btn-danger {
  background-color: transparent;
  border-color: var(--border);
  color: var(--danger);
}

.btn-danger:hover {
  background-color: #FBEAE4;
  border-color: var(--danger);
}

.btn-sm {
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  background: #F4EEE7;
}

td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border);
}

tr:hover td {
  background: #F4EEE7;
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.4rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 4px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  font-family: Monaco, Menlo, "SF Mono", monospace;
}

.actions-group {
  display: flex;
  gap: 0.35rem;
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(25, 38, 51, 0.48);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 10px 25px rgba(44, 37, 31, 0.12);
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.modal-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.hidden {
  display: none !important;
}

@media (max-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-group.full {
    grid-column: span 1;
  }

  .nav-container {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 0.75rem;
  }

  .mobile-menu-toggle {
    display: inline-flex;
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .logo {
    grid-column: 1;
    grid-row: 1;
  }

  .nav-actions {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-end;
  }

  .nav-menu {
    display: flex;
    position: absolute;
    top: calc(100% + 0.55rem);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 8px 22px rgba(44, 37, 31, 0.12);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-0.35rem);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  }

  .nav-menu.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-menu li {
    width: 100%;
  }

  .nav-menu button {
    display: block;
    width: 100%;
    padding: 0.75rem 0.85rem;
    text-align: left;
    border-radius: 4px;
  }

  .nav-menu button[aria-current="page"] {
    background: var(--bg);
    color: var(--accent);
    font-weight: 600;
  }
}

@media (max-width: 480px) {
  header {
    padding: 0 0.875rem;
  }

  .nav-container {
    padding: 0.65rem 0.75rem;
    gap: 0.5rem;
  }

  .logo {
    white-space: nowrap;
    font-size: 0.9rem;
    gap: 0.35rem;
  }

  .logo span {
    font-size: 0.68rem;
  }

  .nav-actions {
    gap: 0.4rem;
  }

  .nav-actions .btn {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 0.35rem 0.5rem;
    font-size: 0.72rem;
  }

  .mobile-menu-toggle {
    width: 40px;
    height: 38px;
  }

  main {
    padding: 0 0.875rem;
  }

  .card {
    padding: 1.25rem 1rem;
  }
}


/* --- TABEL ARSIP DAN TOMBOL CRUD UNTUK LAYAR MOBILE --- */
@media (max-width: 640px) {
  #pageArchive {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  #pageArchive .section-header {
    align-items: flex-start;
    gap: 0.75rem;
  }

  .table-container {
    overflow: visible;
  }

  .table-container table,
  .table-container tbody {
    display: block;
    width: 100%;
  }

  .table-container thead {
    display: none;
  }

  .table-container tbody {
    display: grid;
    gap: 0.85rem;
  }

  .table-container tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    overflow: hidden;
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(54, 42, 32, 0.045);
  }

  .table-container tbody td {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-width: 0;
    padding: 0.7rem 0.75rem;
    border-bottom: 1px solid var(--border);
    overflow-wrap: anywhere;
  }

  .table-container tbody td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 0.35rem;
    color: var(--text-muted);
    font-size: 0.66rem;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: 0.055em;
    text-transform: uppercase;
  }

  .table-container tbody td:first-child {
    grid-column: 1 / -1;
    padding-top: 0.9rem;
    padding-bottom: 0.8rem;
  }

  .table-container tbody td:nth-child(4),
  .table-container tbody td:last-child {
    grid-column: 1 / -1;
  }

  .table-container tbody td:last-child {
    border-bottom: 0;
    padding-top: 0.8rem;
    padding-bottom: 0.85rem;
  }

  .actions-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 0.5rem;
  }

  .actions-group .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 42px;
    width: 100%;
    padding: 0.55rem 0.45rem;
    font-size: 0.78rem;
    line-height: 1.25;
    white-space: normal;
    text-align: center;
    overflow-wrap: anywhere;
    touch-action: manipulation;
  }


  .actions-group .action-read,
  .actions-group .action-edit {
      grid-column: auto;
      grid-row: auto;
  }

  .actions-group .action-download,
  .actions-group .action-delete {
      grid-column: 1 / -1;
      grid-row: auto;
  }

  @media (max-width: 360px) {

      .actions-group {
          grid-template-columns: 1fr;
      }

      .actions-group .btn {
          grid-column: 1;
          grid-row: auto;
      }

  }
}
/* Link unduhan ditampilkan setelah enkripsi selesai agar pengguna memulainya lewat klik langsung. */
.download-ready-link {
  display: flex;
  width: 100%;
  min-height: 44px;
  margin: 0 0 1rem;
  text-align: center;
  text-decoration: none;
}


/* --- ABOUT SECTION: E-REPORT & CREATOR PROFILE --- */
.about-section {
  overflow: hidden;
}

.about-hero {
  padding: 0.25rem 0 1.8rem;
  border-bottom: 1px solid var(--border);
}

.about-eyebrow {
  color: var(--text-muted);
  font-family: Monaco, Menlo, "SF Mono", monospace;

  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.11em;
  line-height: 1.5;
}

.about-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(220px, 0.75fr);
  align-items: end;
  gap: 2.25rem;
  margin-top: 1rem;
}

.about-main-title {
  max-width: 17ch;
  color: var(--text);
  font-size: clamp(1.8rem, 4vw, 3.15rem);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 1.1;
}

.about-lead {
  max-width: 66ch;
  margin-top: 1rem;
  color: var(--text-muted);
  font-size: 0.94rem;
  line-height: 1.85;
}

.about-project-facts {
  display: grid;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #F4EEE7;
  overflow: hidden;
}

.about-fact {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.8rem 0.9rem;
  border-bottom: 1px solid var(--border);
}

.about-fact:last-child {
  border-bottom: 0;
}

.about-fact span,
.about-feature-index {
  color: var(--text-muted);
  font-family: Monaco, Menlo, "SF Mono", monospace;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
}

.about-fact strong {
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 600;
}

.about-feature-area {
  padding: 1.7rem 0 1.8rem;
  border-bottom: 1px solid var(--border);
}

.about-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.about-section-heading h3 {
  margin-top: 0.3rem;
  font-size: 1.25rem;
  font-weight: 650;
  letter-spacing: -0.035em;
}

.about-section-heading > p {
  max-width: 40ch;
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.7;
}

.about-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.about-feature {
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.about-feature h4 {
  margin-top: 0.75rem;
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 650;
  letter-spacing: -0.025em;
}

.about-feature p {
  margin-top: 0.45rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.75;
}

.about-data-note {
  margin-top: 0.85rem;
  padding: 0.75rem 0.9rem;
  border-left: 3px solid var(--text-muted);
  background: #F1EAE1;
  color: var(--text-muted);
  font-size: 0.76rem;
  line-height: 1.7;
}

.about-data-note strong {
  color: var(--text);
}

.about-creator {
  display: grid;
  grid-template-columns: minmax(190px, 0.68fr) minmax(0, 1.5fr);
  gap: clamp(1.25rem, 4vw, 3rem);
  align-items: center;
  padding-top: 1.8rem;
}

.about-creator-photo-wrap {
  min-width: 0;
  margin: 0;
}

.about-creator-photo {
  display: block;
  width: 100%;
  max-height: 410px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 34%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #E8DED3;
}

.about-creator-photo-wrap figcaption {
  margin-top: 0.5rem;
  color: var(--text-muted);
  font-family: Monaco, Menlo, "SF Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.07em;
}

.about-creator-copy h3 {
  margin-top: 0.45rem;
  color: var(--text);
  font-size: clamp(1.7rem, 3.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 1.15;
}

.about-creator-copy h3 span {
  color: var(--text-muted);
}

.about-creator-role {
  margin-top: 0.45rem;
  color: var(--text-muted);
  font-family: Monaco, Menlo, "SF Mono", monospace;
  font-size: 0.74rem;
  letter-spacing: 0.035em;
}

.about-creator-description {
  max-width: 62ch;
  margin-top: 0.9rem;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.85;
}

.about-portfolio-link {
  gap: 0.7rem;
  margin-top: 1.2rem;
  text-decoration: none;
}

.about-portfolio-link span {
  font-size: 1rem;
}

.about-creator-caption {
  display: block;
  margin-top: 0.9rem;
  color: var(--text-muted);
  font-family: Monaco, Menlo, "SF Mono", monospace;
  font-size: 0.65rem;
}

@media (max-width: 768px) {
  .about-hero-grid {
    grid-template-columns: 1fr;
    gap: 1.1rem;
  }

  .about-main-title {
    max-width: 20ch;
  }

  .about-project-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .about-fact {
    padding: 0.7rem;
    border-right: 1px solid var(--border);
    border-bottom: 0;
  }

  .about-fact:last-child {
    border-right: 0;
  }

  .about-feature-grid {
    grid-template-columns: 1fr;
  }

  .about-section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.4rem;
  }

  .about-creator {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 1rem;
  }
}

@media (max-width: 560px) {
  .about-project-facts {
    grid-template-columns: 1fr;
  }

  .about-fact {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .about-fact:last-child {
    border-bottom: 0;
  }

  .about-creator {
    grid-template-columns: 1fr;
    gap: 1.1rem;
  }

  .about-creator-photo-wrap {
    width: min(100%, 300px);
  }

  .about-creator-photo {
    max-height: 360px;
  }

  .about-creator-copy h3 {
    font-size: 1.8rem;
  }
}

/* --- READ / DETAIL LAPORAN --- */

.read-modal-card {
    max-width: 680px;
    max-height: 88vh;
    overflow-y: auto;
}

.read-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.read-modal-eyebrow {
    font-family: Monaco, Menlo, "SF Mono", monospace;
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

.read-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.read-info-item {
    min-width: 0;
    padding: 0.85rem;
    background: #F4EEE7;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.read-info-item span {
    display: block;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.read-info-item p {
    margin-top: 0.3rem;
    font-size: 0.875rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.read-content-section {
    margin-top: 1.5rem;
}

.read-content-section h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
}

.read-content-box {
    padding: 1rem;
    background: #F4EEE7;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    line-height: 1.8;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    min-height: 70px;
}

.read-attachment-preview img,
.read-attachment-preview video {
    display: block;
    max-width: 100%;
    max-height: 340px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    object-fit: contain;
}

.read-modal-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

@media (max-width: 560px) {
    .read-modal-card {
        width: calc(100% - 1.5rem);
        padding: 1.25rem;
        max-height: 90vh;
    }

    .read-info-grid {
        grid-template-columns: 1fr;
    }
}