/* ==========================================
   DATATABLE COMPONENT
   ========================================== */

.datatable-wrapper {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  margin: 20px 0;
  border: 1px solid #e0e0e0;
}

.datatable-container {
  overflow-x: auto;
}

.datatable {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}
.datatable th,
.datatable td,
.datatable tr {
  border: none;
}
/* ── HEADER ── */
.datatable thead th {
  background: #f4f4f4;
  color: #0f4c9f;
  padding: 13px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
  border-bottom: 2px solid #ddd;
  border-right: 1px solid #e0e0e0;
}

.datatable thead th:last-child {
  border-right: none;
}

.datatable thead th.col-center {
  text-align: center;
}

.datatable thead th.col-right {
  text-align: right;
}

/* ── BODY ROWS ── */
.datatable tbody tr:nth-child(odd) {
  background: #f9f9f9;
}

.datatable tbody tr:nth-child(even) {
  background: #ffffff;
}

.datatable tbody tr {
  border-bottom: 1px solid #e0e0e0;
}

.datatable tbody tr:last-child {
  border-bottom: none;
}

/* ── BODY CELLS ── */
.datatable tbody td {
  padding: 12px 16px;
  color: #000000;
  vertical-align: middle;
  line-height: 1.5;
  border-right: 1px solid #e8e8e8;
}

.datatable tbody td:last-child {
  border-right: none;
}

.datatable tbody td.col-center {
  text-align: center;
}

.datatable tbody td.col-right {
  text-align: right;
}

/* ── FILE LINK ── */
.datatable tbody td .file-link {
  color: #fff;
  text-decoration: underline;
  font-size: 14px;
}

.datatable tbody td .file-link:hover {
  color: #f2f2f2;
}

/* ── NO DATA ── */
.datatable tbody tr.no-data td {
  text-align: center;
  padding: 40px 16px;
  color: #000000;
  font-style: italic;
  border-right: none;
}

/* ==========================================
   BOTTOM BAR — Pagination Only, Centered
   ========================================== */

.datatable-bottom {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 14px 20px;
  border-top: 1px solid #e0e0e0;
  background: #fafbfc;
}

/* ── PAGINATION ── */
.pagination-container {
  display: flex;
  align-items: center;
  gap: 2px;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 6px;
  font-size: 14px;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: #555;
  background: none;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  outline: none;
  transition:
    background 0.15s,
    color 0.15s;
}

.pagination-btn:hover:not(.disabled):not(.active) {
  background: #eee;
  color: #222;
}

.pagination-btn.active {
  background: #2980b9;
  color: #fff;
  font-weight: 600;
  cursor: default;
}

.pagination-arrow {
  font-size: 20px;
  font-weight: 600;
  color: #444;
}

.pagination-arrow:hover:not(.disabled) {
  background: #eee;
  color: #111;
}

.pagination-btn.disabled {
  color: #ccc;
  cursor: not-allowed;
}

.pagination-dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 32px;
  font-size: 14px;
  color: #999;
  letter-spacing: 1px;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .datatable thead th {
    padding: 10px 12px;
    font-size: 12px;
  }

  .datatable tbody td {
    padding: 10px 12px;
    font-size: 13px;
  }

  .datatable-bottom {
    padding: 12px 16px;
  }

  .pagination-btn {
    min-width: 28px;
    height: 28px;
    font-size: 13px;
  }

  .pagination-arrow {
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .datatable thead th {
    padding: 8px 10px;
    font-size: 11px;
  }

  .datatable tbody td {
    padding: 8px 10px;
    font-size: 12px;
  }

  .pagination-btn {
    min-width: 26px;
    height: 26px;
    font-size: 12px;
  }

  .pagination-arrow {
    font-size: 16px;
  }
}
