/* =====================================================
   Arsip Dokumen – Frontend CSS
   ===================================================== */

.arsip-dok-wrap {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  max-width: 100%;
  margin: 1.5rem 0;
}

/* Header */
.arsip-dok-header { margin-bottom: 1rem; }
.arsip-dok-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.arsip-dok-title .dashicons { font-size: 22px; color: #555; }
.arsip-dok-hint { font-size: 13px; color: #666; margin: 0 0 1rem; }

/* Toolbar */
.arsip-dok-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.arsip-dok-search,
.arsip-dok-filter {
  padding: 7px 12px;
  border: 1px solid #d1d1d1;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
  transition: border-color .2s;
}
.arsip-dok-search { flex: 1; min-width: 200px; }
.arsip-dok-search:focus,
.arsip-dok-filter:focus { border-color: #0073aa; }

/* Table wrapper */
.arsip-dok-table-wrap {
  overflow-x: auto;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
}
.arsip-dok-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 860px;
}
.arsip-dok-table thead th {
  background: #f7f7f7;
  font-weight: 600;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #555;
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #e5e5e5;
  white-space: nowrap;
}
.arsip-dok-table tbody tr {
  border-bottom: 1px solid #e9e9e9;
  transition: background .15s;
}
.arsip-dok-table tbody tr:last-child { border-bottom: none; }
.arsip-dok-table tbody tr:hover { background: #f9f9f9; }
.arsip-dok-table td {
  padding: 10px 12px;
  vertical-align: middle;
  color: #1a1a1a;
  word-break: break-word;
}
td.arsip-dok-loading {
  text-align: center;
  padding: 2rem;
  color: #888;
  font-style: italic;
}
.arsip-dok-no { font-weight: 600; font-size: 12px; }
.arsip-dok-date { color: #666; white-space: nowrap; }
.arsip-dok-ket { font-size: 12px; color: #666; }
.arsip-dok-lokasi { font-size: 12px; }
.arsip-dok-lokasi a {
  font-size: 11.5px;
  color: #0073aa;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 2px;
}
.arsip-dok-lokasi a:hover { text-decoration: underline; }

/* Badge */
.arsip-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.arsip-badge-aktif  { background: #EAF3DE; color: #3B6D11; }
.arsip-badge-arsip  { background: #f1f1ef; color: #5F5E5A; }
.arsip-badge-revisi { background: #FEF3C7; color: #854F0B; }

/* View button */
.arsip-dok-btn-view {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fff;
  border: 1px solid #d1d1d1;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 12px;
  color: #1a1a1a;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  white-space: nowrap;
}
.arsip-dok-btn-view:hover {
  background: #f0f0f0;
  border-color: #aaa;
}

/* Pagination */
.arsip-dok-pagination {
  margin-top: 1rem;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.arsip-dok-pagination button {
  padding: 5px 12px;
  border: 1px solid #d1d1d1;
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
  cursor: pointer;
  transition: background .15s;
}
.arsip-dok-pagination button:hover { background: #f0f0f0; }
.arsip-dok-pagination button.active {
  background: #0073aa;
  color: #fff;
  border-color: #0073aa;
}
.arsip-dok-pagination .arsip-pag-info {
  font-size: 12px;
  color: #666;
  margin-left: 6px;
}

/* ---- MODAL ---- */
.arsip-dok-modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .48);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 1rem;
}
.arsip-dok-modal-bg.open { display: flex; }
.arsip-dok-modal {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e0e0e0;
  padding: 1.5rem;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 12px 50px rgba(0,0,0,.18);
  max-height: 90vh;
  overflow-y: auto;
}
.arsip-dok-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.1rem;
}
.arsip-dok-modal-head h3 {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
  line-height: 1.4;
}
.arsip-dok-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #888;
  font-size: 22px;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
  margin-left: 8px;
}
.arsip-dok-modal-close:hover { color: #333; }

/* Meta grid */
.arsip-dok-meta {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 6px 10px;
  font-size: 13px;
  margin-bottom: 1rem;
}
.arsip-dok-meta .m-lbl { font-weight: 600; color: #555; }
.arsip-dok-meta .m-val { color: #1a1a1a; }

/* Ext link */
.arsip-dok-ext-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: #0073aa;
  text-decoration: none;
  word-break: break-all;
}
.arsip-dok-ext-link:hover { text-decoration: underline; }
.arsip-dok-ext-link .dashicons { font-size: 15px; flex-shrink: 0; }

/* QR Code area */
.arsip-dok-qr {
  margin-top: 1.1rem;
  padding-top: 1.1rem;
  border-top: 1px solid #e5e5e5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.arsip-dok-qr-label {
  font-size: 11.5px;
  color: #888;
  font-weight: 500;
}
#arsipQrCanvas {
  border-radius: 8px;
  border: 1px solid #eee;
}
.arsip-dok-qr-url {
  font-size: 10.5px;
  color: #aaa;
  max-width: 240px;
  text-align: center;
  word-break: break-all;
}
