:root {
  --primary: #0e673b;
  --secondary: #ffffff;
  --tertiary: #f4c430;
  --bg-soft: #f6f8f7;
}
* {
  box-sizing: border-box;
}
body {
  min-height: 100vh;
  margin: 0;
  font-family: "Abel", sans-serif;
  background: var(--bg-soft);
  color: #222;
}
footer {
  text-align: center;
  background: var(--primary);
  color: white;
  padding: 1.2rem;
  margin-top: 3rem;
}
h2 {
  color: var(--primary);
  border-left: 6px solid var(--tertiary);
  padding-left: 0.75rem;
}
h3 {
  margin-top: 2.5rem;
}
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--primary);
  color: var(--secondary);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
header img {
  height: 40px;
}
header .logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: bold;
  font-size: 2rem;
  text-decoration: none;
  color: inherit;
}
header .logo img {
  height: 45px;
}
.logo:hover {
  opacity: 0.8; /* Efek hover opsional */
}
header.scrolled {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}
input,
select,
textarea {
  width: 100%;
  padding: 0.55rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  margin-top: 0.3rem;
  font-family: "Abel", sans-serif;
}
label {
  font-size: 0.85rem;
}
nav ul {
  list-style: none;
  display: flex;
  gap: 1.2rem;
  margin: 0;
  padding: 0;
}
nav a {
  color: white;
  text-decoration: none;
}
nav a:hover {
  color: var(--tertiary);
}
nav a.active {
  color: var(--tertiary);
  position: relative;
}
nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 3px;
  background: var(--tertiary);
  border-radius: 2px;
}
nav.active + .hamburger span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
nav.active + .hamburger span:nth-child(2) {
  opacity: 0;
}
nav.active + .hamburger span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}
section,
main {
  scroll-margin-top: 100px;
}
table {
  min-width: 800px;
  border-collapse: collapse;
}
.table-wrapper {
  width: 100%;
  overflow-x: auto;
}
textarea {
  resize: vertical;
}
th,
td {
  padding: 10px;
  border-bottom: 1px solid #ddd;
}
th {
  background: #f4f4f4;
  text-align: left;
}
td.aksi a {
  margin-right: 10px;
  text-decoration: none;
}
td.aksi a:last-child {
  margin-right: 0;
}
td.aksi i {
  font-size: 16px;
  cursor: pointer;
}
.aksi {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}
.aksi .btn-sm {
  padding: 6px 8px;
  font-size: 13px;
}
.actions {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}
.admin-header {
  background: var(--primary);
  color: white;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.admin-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.admin-menu {
  background: #0f5132;
  padding: 0.8rem 2rem;
  display: flex;
  gap: 1rem;
}
.admin-menu a {
  color: white;
  text-decoration: none;
  font-size: 0.9rem;
}
.admin-menu a:hover {
  color: var(--tertiary);
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}
.admin-table th {
  background: #136e27;
  color: #fff;
  text-align: left;
  padding: 10px;
}
.admin-table td {
  padding: 10px;
  border-bottom: 1px solid #eee;
}
.admin-table tr:hover {
  background: #f8fafc;
}
.admin-table a {
  margin-right: 8px;
  color: #2563eb;
  cursor: pointer;
  text-decoration: none;
}
.btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.75rem 1rem;
  border-radius: 30px;
  cursor: pointer;
  font-size: 0.95rem;
}
.btn:hover {
  background: #145c46;
}
.btn-admin {
  background: red;
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
}
.btn-modal {
  padding: 8px 20px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: background 0.2s;
}
.btn-modal-cancel {
  background-color: #e2e6ea;
  color: #333;
}
.btn-modal-cancel:hover {
  background-color: #dbe2e8;
}
.btn-modal-confirm {
  color: white;
}
.btn-modal-confirm.danger {
  background-color: #dc3545;
}
.btn-modal-confirm.danger:hover {
  background-color: #c82333;
}
.btn-modal-confirm.warning {
  background-color: #f39c12;
}
.btn-modal-confirm.warning:hover {
  background-color: #d68910;
}
.btn-outline {
  background: green;
  border: 1px solid #fff;
  color: #fff;
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.15);
}
.btn-primary {
  background: var(--tertiary);
  color: #000;
}
.btn-small {
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
}
.btn-logout {
  background: var(--tertiary);
  color: #000;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  text-decoration: none;
  font-size: 0.85rem;
}
.btn-logout:hover {
  background: #ffd966;
}
.btn-sm {
  padding: 6px 10px;
  background: #046d22;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-size: 13px;
}
.badge {
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  font-size: 0.8rem;
  display: inline-block;
  min-width: 70px;
  text-align: center;
}
.badge.valid,
.badge.verified {
  background: #0f5132;
  color: white;
}
.badge.pending {
  background: #f4c430;
  color: black;
}
.badge.revisi {
  background: #b91c1c;
  color: white;
}
.badge.warning {
  background: #f4c430;
  color: #000;
}
.badge-notif {
    background: #dc3545;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: bold;
}
.notifikasi-container {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 5px;
}
.notifikasi-container::-webkit-scrollbar {
    width: 6px;
}
.notifikasi-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}
.notifikasi-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}
.notifikasi-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}
.notifikasi-item {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 10px;
    padding: 12px;
    background: white;
    transition: all 0.3s ease;
}
.notifikasi-item:hover {
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}
.notifikasi-item.baru {
    border-left: 4px solid #0066cc;
    background: #f0f8ff;
}
.notifikasi-item.dibaca {
    border-left: 4px solid #28a745;
    background: #f8f9fa;
}
.notifikasi-content {
    text-align: left;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: bold;
  font-size: 2rem;
  text-decoration: none;
  color: inherit;
}
.brand img {
  height: 45px;
}
.btn-hapus-notif {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 14px;
    padding: 2px 6px;
    border-radius: 50%;
    transition: all 0.2s ease;
}
.btn-hapus-notif:hover {
    background: #ffebee;
    color: #dc3545;
}
.notif-status {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
}
.notif-status.baru {
    background: #0066cc;
}
.notif-status.dibaca {
    background: #28a745;
}
.muted {
    color: #6c757d;
    font-style: italic;
    text-align: left;
}
.lihat-semua {
    text-align: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.modal-overlay.show {
    display: flex;
    opacity: 1;
    animation: fadeIn 0.3s ease;
}
.modal-content-popup {
    background: white;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    animation: slideUp 0.4s ease;
}
.modal-header-popup {
    background: linear-gradient(135deg, #0066cc 0%, #004d99 100%);
    color: white;
    text-align: center;
}
.modal-header-popup.success {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
}
.modal-header-popup.warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: #000;
}
.modal-header-popup.info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
}
.modal-header-popup h3 {
    margin: 0;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.modal-body-popup {
    padding: 25px;
    text-align: left;
}
.modal-body-popup p {
    margin-bottom: 20px;
    line-height: 1.6;
    color: #333;
}
.modal-footer-popup {
    padding: 15px 25px 25px;
    text-align: center;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}
.btn-modal-primary {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    min-width: 150px;
}
.btn-modal-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}
.btn-modal-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    min-width: 150px;
}
.btn-modal-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}
.btn-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}
.btn-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}
.status-info-box {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}
.status-info-box h4 {
    margin-top: 0;
    color: #0066cc;
    border-bottom: 2px solid #0066cc;
    padding-bottom: 5px;
}
.status-detail {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px dashed #dee2e6;
}
.status-detail:last-child {
    border-bottom: none;
    margin-bottom: 0;
}
.status-label {
    font-weight: bold;
    color: #495057;
}
.status-value {
    font-weight: bold;
}
.status-valid {
    color: #28a745;
}
.status-pending {
    color: #ffc107;
}
.status-revisi {
    color: #fd7e14;
}
.card {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.2s;
  border-top: 4px solid #3498db;
}
.card:hover {
  transform: translateY(-5px);
}
.card-icon {
  font-size: 2.5rem;
  margin-bottom: 10px;
  color: #3498db;
}
.card h3 {
  margin: 5px 0;
  font-size: 2rem;
  color: #2c3e50;
}
.card p {
  margin: 0;
  color: #7f8c8d;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 1px;
}
.card.valid {
  border-color: #2ecc71;
}
.card.valid .card-icon {
  color: #2ecc71;
}
.card.pending {
  border-color: #f1c40f;
}
.card.pending .card-icon {
  color: #f1c40f;
}
.card.revisi {
  border-color: #e74c3c;
}
.card.revisi .card-icon {
  color: #e74c3c;
}
.close {
  float: right;
  font-size: 24px;
  cursor: pointer;
}
.container {
  min-height: auto;
  max-width: 1100px;
  margin: 1rem auto;
  background: white;
  padding: 2rem;
  border-radius: 14px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}
.debug-info {
      background: #f8f9fa;
      padding: 10px;
      border-radius: 5px;
      margin: 10px 0;
      font-family: monospace;
      font-size: 12px;
      display: none;
    }
.detail-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}
.detail-table th {
  width: 30%;
  background: #f1f5f9;
  text-align: left;
  padding: 0.5rem;
}
.detail-table td {
  padding: 0.5rem;
  border-bottom: 1px solid #e5e7eb;
}
.doc-list li {
  margin-bottom: 0.4rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}
.hamburger span {
  width: 25px;
  height: 3px;
  background: white;
  border-radius: 2px;
  transition: 0.3s;
}
.hero {
  min-height: calc(100vh - 80px);
  background: linear-gradient(rgba(11, 61, 46, 0.75), rgba(11, 61, 46, 0.75)),
    url("../img/bg_header.jpeg") center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  padding: 3rem 1rem;
}
.hero-content {
  max-width: 900px;
}
.hero-logo {
  width: 140px;
  margin-bottom: 1.5rem;
}
.hero h1 {
  font-size: 2.1rem;
  line-height: 1.4;
  margin-bottom: 1rem;
  letter-spacing: 1px;
}
.hero-subtitle {
  font-size: 1rem;
  opacity: 0.9;
}
.hero-actions {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.list {
  max-width: 700px;
  margin: auto;
  line-height: 1.9;
}
.loading {
      opacity: 0.7;
      pointer-events: none;
    }
.loading-overlay {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(255, 255, 255, 0.9);
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      z-index: 9998;
      display: none;
    }
.loading-text {
      font-size: 18px;
      font-weight: bold;
      color: #333;
    }
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}
.modal.hidden {
  display: none;
}
.modal-box {
  background: #fff;
  padding: 20px;
  width: 400px;
  border-radius: 8px;
}
.modal-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}
.modal-content {
  background-color: #fff;
  padding: 24px;
  border-radius: 8px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  text-align: center;
  transform: translateY(-20px);
  transition: transform 0.3s ease;
}
.modal-icon {
  font-size: 48px;
  margin-bottom: 16px;
}
.modal-icon.warning {
  color: #f39c12;
}
.modal-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 8px;
  color: #333;
}
.modal-text {
  font-size: 14px;
  color: #666;
  margin-bottom: 24px;
  line-height: 1.5;
}
.modal.show {
      display: flex;
    }
.modal-header {
      padding: 20px 24px;
      border-bottom: 1px solid #e5e7eb;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
.modal-title {
      font-size: 1.25rem;
      font-weight: 600;
      color: #111827;
      display: flex;
      align-items: center;
      gap: 8px;
    }
.modal-close {
      background: none;
      border: none;
      font-size: 1.5rem;
      cursor: pointer;
      color: #6b7280;
      width: 32px;
      height: 32px;
      border-radius: 6px;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.2s;
    }
.modal-close:hover {
      background-color: #f3f4f6;
      color: #374151;
    }
.modal-body {
      padding: 24px;
      color: #374151;
      line-height: 1.5;
    }
.modal-footer {
      padding: 20px 24px;
      border-top: 1px solid #e5e7eb;
      display: flex;
      justify-content: flex-end;
      gap: 12px;
    }
.modal-btn {
      padding: 10px 20px;
      border-radius: 8px;
      border: none;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.2s;
      font-family: 'Abel', sans-serif;
    }
.modal-btn-primary {
      background-color: #2563eb;
      color: white;
    }
.modal-btn-primary:hover {
      background-color: #1d4ed8;
    }
.modal-btn-secondary {
      background-color: #f3f4f6;
      color: #374151;
    }
.modal-btn-secondary:hover {
      background-color: #e5e7eb;
    }
.modal-success .modal-title {
      color: #059669;
    }
.modal-error .modal-title {
      color: #dc2626;
    }
.modal-warning .modal-title {
      color: #d97706;
    }
.modal-info .modal-title {
      color: #2563eb;
    }
.notifikasi-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.notifikasi-list li {
  padding: 10px;
  border-bottom: 1px solid #eee;
}
.notifikasi-list li.baru {
  background: #f1f8ff;
  font-weight: bold;
}
.notifikasi-list li.dibaca {
  color: #555;
}
.notifikasi-list small {
  display: block;
  color: #888;
  margin-top: 4px;
}
.preview-box {
  margin-bottom: 6px;
}
.preview-box img {
  display: block;
  border-radius: 4px;
}
.section {
  padding: 4rem 1rem;
  max-width: 1100px;
  margin: auto;
}
.section.alt {
  background: #ffffff;
}
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}
.spinner {
      width: 60px;
      height: 60px;
      border: 6px solid #f3f3f3;
      border-top: 6px solid #3498db;
      border-radius: 50%;
      animation: spin 1s linear infinite;
      margin-bottom: 15px;
    }
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  min-width: 280px;
  max-width: 360px;
  padding: 14px 18px;
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.5s ease;
  z-index: 9999;
  white-space: pre-line;
  word-wrap: break-word;
  max-height: 300px;
  overflow-y: auto;
}
.toast.show {
  opacity: 1;
  transform: translateX(0);
}
.toast.error {
      background: #b91c1c;
      border-left: 4px solid #7f1d1d;
    }
.toast.success {
      background: #0f5132;
      border-left: 4px solid #14532d;
    }
.toast.warning {
      background: #d97706;
      border-left: 4px solid #92400e;
    }
.toast.info {
      background: #2563eb;
      border-left: 4px solid #1e40af;
    }
.toast-container {
      position: fixed;
      top: 20px;
      right: 20px;
      z-index: 9999;
      display: flex;
      flex-direction: column;
      align-items: flex-end;
    }
.toast.hiding {
      opacity: 0;
      transform: translateX(100%);
    }
.toast-content {
      flex-grow: 1;
      margin-right: 16px;
    }
.toast-title {
      font-weight: 600;
      margin-bottom: 4px;
      font-size: 16px;
    }
.toast-message {
      font-size: 14px;
      opacity: 0.9;
    }
.toast-close {
      background: none;
      border: none;
      color: white;
      font-size: 20px;
      cursor: pointer;
      padding: 0;
      width: 24px;
      height: 24px;
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 0.8;
      transition: opacity 0.2s;
      flex-shrink: 0;
    }
.toast-close:hover {
      opacity: 1;
    }
.welcome-section {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}
.welcome-icon {
  font-size: 1.5rem;
  color: #3498db;
}
@media (max-width: 768px) {
  header {
    gap: 1rem;
  }
  h2 {
    font-size: 18px;
  }
  .table th:nth-child(4),
  .table td:nth-child(4), /* NISN */
  .table th:nth-child(6),
  .table td:nth-child(6) { /* Dokumen */
    display: none;
  }
  .admin-header {
    flex-wrap: wrap;
  }
  nav {
    position: absolute;
    top: 64px;
    left: 0;
    width: 100%;
    background: var(--primary);
    max-height: 0;
    display: none;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,.1);
    transition: max-height 0.4s ease;
  }
  nav ul {
    flex-direction: column;
    padding: 1rem 0;
    gap: 1rem;
    align-items: center;
  }
  nav.active {
    max-height: 400px;
    display: block;
  }
  .hamburger {
    display: flex;
  }
}
@keyframes spin {
      0% { transform: rotate(0deg); }
      100% { transform: rotate(360deg); }
    }
@keyframes fadeIn {
      from { opacity: 0; }
      to { opacity: 1; }
    }
@keyframes slideIn {
      from {
        opacity: 0;
        transform: translateY(-20px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@media (max-width: 640px) {
  .modal-content {
    width: 95%;
    margin: 10px;
  }
  .modal-body {
    padding: 20px;
  }
  .modal-footer {
    padding: 16px 20px;
  }
}