/* ==========================================================================
   EduRemarks Premium DataTables Framework
   Ultra-modern, responsive, sortable, searchable, and exportable tables
   ========================================================================== */

:root {
  --edt-primary: #1F3C88;
  --edt-primary-light: #2D6CDF;
  --edt-primary-subtle: rgba(31, 60, 136, 0.06);
  --edt-success: #10B981;
  --edt-success-subtle: #ECFDF5;
  --edt-danger: #EF4444;
  --edt-danger-subtle: #FEF2F2;
  --edt-warning: #F59E0B;
  --edt-border: #E2E8F0;
  --edt-bg-header: #F8FAFC;
  --edt-text-main: #1E293B;
  --edt-text-muted: #64748B;
  --edt-radius: 14px;
}

.edt-wrapper {
  background: #FFFFFF;
  border-radius: var(--edt-radius);
  border: 1px solid var(--edt-border);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
  margin-bottom: 24px;
  overflow: hidden;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.edt-toolbar {
  padding: 16px 20px;
  background: #FFFFFF;
  border-bottom: 1px solid var(--edt-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.edt-toolbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.edt-toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.edt-length {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--edt-text-muted);
  font-weight: 600;
}

.edt-length select {
  padding: 7px 28px 7px 12px;
  border: 1.5px solid var(--edt-border);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--edt-text-main);
  background: #FFFFFF;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
}

.edt-length select:focus {
  border-color: var(--edt-primary-light);
  box-shadow: 0 0 0 3px rgba(45, 108, 223, 0.12);
}

.edt-search-box {
  position: relative;
  min-width: 220px;
}

.edt-search-box i.fa-search {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94A3B8;
  font-size: 0.85rem;
  pointer-events: none;
}

.edt-search-input {
  width: 100%;
  padding: 8px 32px 8px 34px;
  border: 1.5px solid var(--edt-border);
  border-radius: 9px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--edt-text-main);
  background: #F8FAFC;
  outline: none;
  transition: all 0.25s ease;
}

.edt-search-input:focus {
  background: #FFFFFF;
  border-color: var(--edt-primary-light);
  box-shadow: 0 0 0 3.5px rgba(45, 108, 223, 0.14);
}

.edt-search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #94A3B8;
  cursor: pointer;
  padding: 2px;
  font-size: 0.85rem;
  display: none;
}

.edt-search-clear:hover {
  color: var(--edt-danger);
}

.edt-btn-group {
  display: flex;
  gap: 6px;
}

.edt-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid var(--edt-border);
  background: #FFFFFF;
  color: var(--edt-text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.edt-btn:hover {
  background: var(--edt-bg-header);
  color: var(--edt-primary);
  border-color: #CBD5E1;
  transform: translateY(-1px);
}

.edt-table-container {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table.edt-table,
.edt-wrapper table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0;
  font-size: 0.84rem;
  color: var(--edt-text-main);
}

.edt-wrapper table thead th {
  background: var(--edt-bg-header);
  color: #475569;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 13px 16px;
  border-bottom: 1.5px solid var(--edt-border);
  border-top: none;
  white-space: nowrap;
  user-select: none;
  position: relative;
  text-align: left;
}

.edt-wrapper table thead th.sortable {
  cursor: pointer;
  padding-right: 28px;
  transition: background 0.15s ease;
}

.edt-wrapper table thead th.sortable:hover {
  background: #EDF2F7;
  color: var(--edt-primary);
}

.edt-sort-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 1px;
  opacity: 0.35;
  font-size: 0.65rem;
}

th.sort-asc .edt-sort-icon .fa-sort-up,
th.sort-desc .edt-sort-icon .fa-sort-down {
  opacity: 1;
  color: var(--edt-primary);
}

.edt-wrapper table tbody tr {
  transition: background 0.15s ease;
}

.edt-wrapper table tbody tr:nth-child(even) {
  background: #FBFDFE;
}

.edt-wrapper table tbody tr:hover {
  background: #F1F5F9 !important;
}

.edt-wrapper table tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid #F1F5F9;
  vertical-align: middle;
  line-height: 1.45;
}

.edt-footer {
  padding: 14px 20px;
  background: #FFFFFF;
  border-top: 1px solid var(--edt-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.edt-info {
  font-size: 0.8rem;
  color: var(--edt-text-muted);
  font-weight: 600;
}

.edt-info strong {
  color: var(--edt-text-main);
}

.edt-pagination {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.edt-page-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid var(--edt-border);
  background: #FFFFFF;
  color: var(--edt-text-main);
  font-size: 0.8rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.edt-page-btn:hover:not(.disabled):not(.active) {
  background: var(--edt-bg-header);
  border-color: #CBD5E1;
  color: var(--edt-primary);
  transform: translateY(-1px);
}

.edt-page-btn.active {
  background: var(--edt-primary);
  border-color: var(--edt-primary);
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(31, 60, 136, 0.25);
  cursor: default;
}

.edt-page-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: #F8FAFC;
}

.edt-empty-state {
  text-align: center;
  padding: 45px 20px;
  color: var(--edt-text-muted);
}

.edt-empty-state i {
  font-size: 2.5rem;
  color: #CBD5E1;
  margin-bottom: 10px;
  display: block;
}

.edt-empty-state p {
  font-size: 0.86rem;
  font-weight: 600;
  margin: 0;
}

@media print {
  .edt-toolbar, .edt-footer { display: none !important; }
  .edt-wrapper { border: none !important; box-shadow: none !important; }
}

@media (max-width: 768px) {
  .edt-toolbar { flex-direction: column; align-items: stretch; gap: 12px; }
  .edt-toolbar-left, .edt-toolbar-right { justify-content: space-between; }
  .edt-search-box { min-width: 100%; }
  .edt-footer { flex-direction: column; text-align: center; gap: 12px; }
}

@media (max-width: 360px) {
  .edt-toolbar { padding: 10px 8px; gap: 8px; }
  .edt-toolbar-left, .edt-toolbar-right { width: 100%; justify-content: space-between; gap: 6px; }
  .edt-length { font-size: 0.72rem; }
  .edt-length select { padding: 4px 20px 4px 6px; font-size: 0.72rem; }
  .edt-btn-group { width: 100%; display: flex; gap: 3px; }
  .edt-btn { flex: 1; justify-content: center; padding: 5px 4px; font-size: 0.68rem; }
  .edt-search-input { padding: 6px 24px 6px 26px; font-size: 0.75rem; }
  .edt-wrapper table thead th, .edt-wrapper table tbody td { padding: 8px 6px; font-size: 0.72rem; }
  .edt-footer { padding: 10px 8px; gap: 8px; }
  .edt-info { font-size: 0.7rem; }
  .edt-page-btn { min-width: 26px; height: 26px; font-size: 0.68rem; padding: 0 4px; border-radius: 6px; }
}
