/* =========================
   GLOBAL DATATABLES STYLE
   ========================= */

/* WRAPPER UMUM */
.dataTables_wrapper {
  font-size: 0.9rem;
}

/* TABLE BASE */
table.dataTable {
  width: 100% !important;
  border-collapse: separate;
  border-spacing: 0;
  background-color: #ffffff;
  border-radius: 0.75rem;
  overflow: hidden;
}

/* HEADER */
table.dataTable thead tr {
  background: linear-gradient(135deg, #1e4c8f, #3b8db7);
  color: #ffffff;
}

table.dataTable thead th {
  border-bottom: none !important;
  font-weight: 600;
  padding: 0.75rem 0.75rem;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* BODY ROWS */
table.dataTable tbody tr {
  transition: background-color 0.15s ease, transform 0.05s ease;
}

/* striping override bootstrap/datatable */
table.dataTable tbody tr:nth-child(even) {
  background-color: #f7f9fc !important;
}

table.dataTable tbody tr:nth-child(odd) {
  background-color: #ffffff !important;
}

table.dataTable tbody tr:hover {
  background-color: #e6f0ff !important;
}

/* CELL */
table.dataTable tbody td {
  border-top: 1px solid #e1e5ee;
  padding: 0.7rem 0.75rem;
  vertical-align: middle;
}

/* KOLOM PERTAMA & TERAKHIR RATA TENGAH */
table.dataTable tbody td:first-child,
table.dataTable thead th:first-child,
table.dataTable tbody td:last-child,
table.dataTable thead th:last-child {
  text-align: center;
  white-space: nowrap;
}

/* =========================
   TOP CONTROLS (length + search + buttons)
   ========================= */

/* BARIS BUTTONS */
.dataTables_wrapper .dt-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

/* LABEL LENGTH & FILTER */
.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
  font-weight: 500;
  color: #4a5568;
}

/* SELECT "SHOW ENTRIES" */
.dataTables_wrapper .dataTables_length select {
  display: inline-block;
  width: auto;
  margin: 0 0.25rem;
  padding: 0.25rem 1.75rem 0.25rem 0.5rem;
  border-radius: 999px;
  border: 1px solid #cbd5e0;
  background-color: #ffffff;
  font-size: 0.85rem;
}

/* SEARCH INPUT */
.dataTables_wrapper .dataTables_filter input {
  margin-left: 0.5rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid #cbd5e0;
  font-size: 0.85rem;
  min-width: 180px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.dataTables_wrapper .dataTables_filter input:focus {
  outline: none;
  border-color: #3182ce;
  box-shadow: 0 0 0 2px rgba(49, 130, 206, 0.2);
}

/* =========================
   DATATABLES BUTTONS (copy/excel/pdf/...)
   ========================= */

.dataTables_wrapper .dt-buttons .dt-button {
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  color: #374151;
  padding: 0.25rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: background-color 0.15s ease, color 0.15s ease,
    border-color 0.15s ease, box-shadow 0.15s ease;
}

.dataTables_wrapper .dt-buttons .dt-button:hover {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}

.dataTables_wrapper .dt-buttons .dt-button:active:not(.disabled),
.dataTables_wrapper .dt-buttons .dt-button.dt-button-active {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #ffffff;
}

/* =========================
   INFO & PAGINATION
   ========================= */

.dataTables_wrapper .dataTables_info {
  font-size: 0.8rem;
  color: #6b7280;
  padding-top: 0.6rem;
}

/* PAGINATION */
.dataTables_wrapper .dataTables_paginate {
  margin-top: 0.3rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.2rem 0.6rem;
  margin: 0 0.1rem;
  font-size: 0.8rem;
  color: #4b5563 !important;
  background: transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease,
    color 0.15s ease;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: #e5f0ff;
  border-color: #bfdbfe;
  color: #1f2937 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  background: #2563eb;
  color: #ffffff !important;
  border-color: #2563eb;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
  color: #cbd5e1 !important;
  background: transparent;
  border-color: transparent;
  cursor: default;
}

/* =========================
   SCROLL BODY (Y-scroll)
   ========================= */

.dataTables_wrapper .dataTables_scrollBody {
  border-radius: 0 0 0.75rem 0.75rem;
  border: 1px solid #e5e7eb;
  border-top: none;
}

/* Hilangkan garis ganda di dalam scroll body */
.dataTables_wrapper .dataTables_scrollBody table {
  border-top: none;
}
