/* Shared SaaS table system. Keep table styling here, not inside page files. */
.content-wrapper {
  background:
    radial-gradient(circle at 10% 0%, rgba(20, 184, 166, 0.08) 0, rgba(20, 184, 166, 0) 30%),
    linear-gradient(180deg, #f5f7fb 0%, #f8fafc 42%, #eef3f8 100%) !important;
}

.content {
  padding: 4px 2px 8px;
}

.content .card {
  background: rgba(255, 255, 255, 0.94);
  border: 0;
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.content .app-table-card {
  background: transparent;
  border: 0 !important;
  border-radius: 0;
  box-shadow: none;
  display: block;
  height: auto;
  min-height: 0;
  overflow: visible;
}

.content .app-table-card .card-header {
  background: transparent;
  border-radius: 0 !important;
  min-height: 40px;
  padding: 4px 2px 6px !important;
}

.content .app-table-card .card-title {
  font-size: 16px;
}

.content .card-header {
  align-items: center;
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 0;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  min-height: 52px;
  padding: 10px 12px;
}

.content .card-title {
  color: var(--app-text);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0;
}

.content .card-tools {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin-left: auto;
}

.content .btn-tool {
  align-items: center;
  background: #ffffff !important;
  border: 1px solid var(--app-border) !important;
  border-radius: 9px !important;
  color: var(--app-muted) !important;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  padding: 0 !important;
  width: 34px;
}

.content .btn-tool:hover {
  background: var(--app-primary-soft) !important;
  color: var(--app-primary) !important;
}

.content .card-tools .btn-tool[data-card-widget] {
  display: none !important;
}

.content .card-tools:empty {
  display: none;
}

.content .create-btn,
.content .card-tools .btn-primary {
  align-items: center;
  background: var(--app-primary) !important;
  border: 1px solid var(--app-primary) !important;
  border-radius: 9px !important;
  color: #ffffff !important;
  display: inline-flex;
  font-size: 13px !important;
  font-weight: 800 !important;
  gap: 7px;
  min-height: 34px;
  padding: 7px 12px !important;
}

.content .create-btn:hover,
.content .card-tools .btn-primary:hover {
  background: var(--app-primary-hover) !important;
  border-color: var(--app-primary-hover) !important;
}

.content .card-body {
  padding: 2px 2px 8px !important;
}

.app-table-card .card-body,
.app-table-card .dataTables_wrapper {
  display: block;
  margin: 0 !important;
  min-height: 0;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.app-dt-table {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px #dbe4ee;
  display: block;
  max-height: calc(100vh - 315px);
  min-height: 0;
  overflow-x: auto;
  overflow-y: auto;
  scrollbar-color: #cbd5e1 transparent;
  scrollbar-width: thin;
}

.table-responsive,
.app-table-scroll {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.app-table-scroll {
  max-height: none;
  min-height: 0;
  position: relative;
  -webkit-overflow-scrolling: touch;
}

.table-responsive::-webkit-scrollbar,
.app-table-scroll::-webkit-scrollbar {
  display: none;
}

.app-dt-table::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}

.app-dt-table::-webkit-scrollbar-track {
  background: transparent;
}

.app-dt-table::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

.app-data-table,
.table.dataTable {
  border-collapse: separate !important;
  border-spacing: 0;
  color: var(--app-text);
  font-family: var(--app-font-family);
  margin: 0 !important;
  min-width: 840px;
  width: 100% !important;
}

.table.dataTable th:last-child,
.table.dataTable td:last-child,
.app-data-table th:last-child,
.app-data-table td:last-child,
.table.dataTable th.option-cell,
.table.dataTable td.option-cell,
.app-data-table th.option-cell,
.app-data-table td.option-cell {
  min-width: 260px;
  overflow: visible !important;
  text-align: center;
  text-overflow: clip !important;
  white-space: nowrap !important;
}

.app-data-table thead th,
.table.dataTable thead th {
  background: #f8fafc !important;
  border-bottom: 1px solid #dbe4ee !important;
  border-left: 0 !important;
  border-right: 0 !important;
  border-top: 0 !important;
  color: #263446 !important;
  font-size: 11px;
  font-weight: 800 !important;
  letter-spacing: 0.04em;
  padding: 10px 10px !important;
  text-transform: uppercase;
  white-space: nowrap;
}

.app-data-table thead th,
.table.dataTable thead th {
  position: sticky;
  top: 0;
  z-index: 5;
}

.app-data-table tbody td,
.table.dataTable tbody td {
  border-bottom: 1px solid #e8eef5 !important;
  border-left: 0 !important;
  border-right: 0 !important;
  color: var(--app-text);
  font-size: 13px;
  padding: 9px 10px !important;
  vertical-align: middle !important;
}

.app-data-table tbody tr:nth-child(even),
.table.dataTable tbody tr:nth-child(even) {
  background: #f8fafc;
}

.app-data-table tbody tr:hover,
.table.dataTable tbody tr:hover {
  background: #eef7f8 !important;
}

.app-data-table a,
.table.dataTable a {
  color: var(--app-primary);
  font-weight: 800;
}

.app-data-table img,
.table.dataTable img {
  border-radius: 999px;
  height: 42px !important;
  max-height: 42px !important;
  max-width: 42px !important;
  object-fit: cover;
  width: 42px !important;
}

table.table-bordered.dataTable,
table.table-bordered.dataTable th,
table.table-bordered.dataTable td,
table.table-bordered.dataTable tbody th,
table.table-bordered.dataTable tbody td,
table.table-bordered.dataTable thead th,
table.table-bordered.dataTable thead td {
  border-color: transparent !important;
  border-bottom-color: #e8eef5 !important;
  border-left: 0 !important;
  border-right: 0 !important;
  border-top: 0 !important;
}

.table-bordered,
table.table-bordered.dataTable {
  border: 0 !important;
}

.table-bordered,
.table-bordered th,
.table-bordered td {
  border-left: 0 !important;
  border-right: 0 !important;
}

table.dataTable thead .sorting,
table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_desc,
table.dataTable thead .sorting_asc_disabled,
table.dataTable thead .sorting_desc_disabled {
  background-image: none !important;
  padding-right: 24px !important;
  position: relative;
}

table.dataTable thead .sorting::after,
table.dataTable thead .sorting_asc::after,
table.dataTable thead .sorting_desc::after {
  color: #94a3b8 !important;
  display: inline-flex !important;
  font-family: "Font Awesome 5 Free";
  font-size: 10px;
  font-weight: 900;
  margin-left: 8px;
  opacity: 0.9 !important;
  position: static !important;
}

table.dataTable thead .sorting::after {
  content: "\f0dc" !important;
}

table.dataTable thead .sorting_asc::after {
  align-items: center;
  background: #dbeafe;
  border-radius: 999px;
  color: #2563eb !important;
  content: "\f0de" !important;
  height: 18px;
  justify-content: center;
  width: 18px;
}

table.dataTable thead .sorting_desc::after {
  align-items: center;
  background: #dbeafe;
  border-radius: 999px;
  color: #2563eb !important;
  content: "\f0dd" !important;
  height: 18px;
  justify-content: center;
  width: 18px;
}

table.dataTable thead .sorting::before,
table.dataTable thead .sorting_asc::before,
table.dataTable thead .sorting_desc::before,
table.dataTable thead .sorting_asc_disabled::before,
table.dataTable thead .sorting_asc_disabled::after,
table.dataTable thead .sorting_desc_disabled::before,
table.dataTable thead .sorting_desc_disabled::after {
  display: none !important;
}

.text-mobile-full {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-dt-toolbar {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  margin-bottom: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 0 6px;
  scrollbar-width: none;
  white-space: nowrap;
}

.app-dt-toolbar::-webkit-scrollbar,
.app-dt-actions .dt-buttons::-webkit-scrollbar,
.dataTables_scrollBody::-webkit-scrollbar {
  display: none;
}

.app-dt-actions .dt-buttons {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
}

.app-dt-actions,
.app-dt-product-box,
.app-dt-field-filter {
  flex: 0 0 auto;
}

.app-dt-search {
  flex: 1 1 280px;
  min-width: 220px;
}

.app-dt-actions .btn,
.dt-button-collection .dt-button {
  align-items: center;
  background: #f8fafc !important;
  border: 1px solid #dbe4ee !important;
  border-radius: 8px !important;
  box-shadow: none;
  color: var(--app-text) !important;
  display: inline-flex;
  font-size: 11.5px !important;
  font-weight: 800 !important;
  gap: 5px;
  min-height: 36px;
  padding: 7px 8px !important;
}

.app-dt-actions .btn:hover,
.dt-button-collection .dt-button:hover {
  background: var(--app-primary-soft) !important;
  color: var(--app-primary) !important;
}

.app-dt-search label {
  align-items: center;
  color: var(--app-muted);
  display: flex;
  font-size: 12px;
  font-weight: 800;
  gap: 6px;
  justify-content: flex-end;
  margin: 0;
  white-space: nowrap;
}

.app-dt-search input,
.app-dt-column-filter,
.app-dt-product-filter {
  background-color: #ffffff;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: var(--app-text);
  font-size: 13px;
  height: 36px;
  min-height: 36px;
  outline: none;
}

.app-dt-search input {
  min-width: 0;
  padding: 6px 12px;
  width: 100%;
}

.app-dt-product-box,
.app-dt-smart-search,
.app-dt-field-filter {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  box-shadow: none;
  display: flex;
  height: 36px;
  min-height: 36px;
  overflow: hidden;
}

.app-dt-smart-search {
  flex: 1 1 280px;
  min-width: 220px;
}

.app-dt-product-box i,
.app-dt-smart-search i,
.app-dt-field-filter i {
  color: #94a3b8;
  flex: 0 0 auto;
  font-size: 13px;
  padding-left: 10px;
}

.app-dt-product-box {
  flex: 0 0 210px;
  min-width: 210px;
}

.app-dt-field-filter {
  flex: 0 0 120px;
  min-width: 120px;
}

.app-dt-column-filter,
.app-dt-product-filter {
  cursor: pointer;
  min-width: 0;
  padding: 6px 8px;
  width: 100%;
}

.app-dt-search input:focus,
.app-dt-column-filter:focus,
.app-dt-product-filter:focus {
  border-color: var(--app-primary);
  box-shadow: none;
}

.dataTables_scroll {
  border: 0;
  border-radius: 0;
  overflow: visible;
}

.dataTables_scrollHead {
  display: none !important;
}

.dataTables_scrollHeadInner,
.dataTables_scrollHeadInner table {
  width: 100% !important;
}

.dataTables_scrollBody {
  border-top: 0 !important;
  max-height: none !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  scrollbar-width: none;
}

.app-dt-footer {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding-top: 8px;
}

.app-dt-info,
.dataTables_info {
  color: var(--app-muted) !important;
  font-size: 12px;
  font-weight: 700;
  padding: 0 !important;
}

.dataTables_paginate {
  padding: 0 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button,
.page-item .page-link {
  background: #ffffff !important;
  border: 1px solid var(--app-border) !important;
  border-radius: 8px !important;
  color: var(--app-muted) !important;
  font-size: 12px;
  font-weight: 800;
  margin: 0 2px;
  min-width: 32px;
  padding: 6px 9px !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.page-item.active .page-link {
  background: var(--app-primary) !important;
  border-color: var(--app-primary) !important;
  color: #ffffff !important;
}

.badge {
  border-radius: 999px;
  box-shadow: none;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  padding: 5px 9px;
}

.badge-success {
  background: #dcf5e7;
  color: #187345;
}

.badge-warning {
  background: #fef3c7;
  color: #92400e;
}

.badge-danger {
  background: #ffe0dc;
  color: var(--app-danger);
}

.badge-info,
.badge-primary {
  background: var(--app-primary-soft);
  color: var(--app-primary);
}

.btn-group-sm {
  align-items: center;
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 5px;
  overflow: visible;
  white-space: nowrap;
}

.btn-group-sm .btn {
  align-items: center;
  border-radius: 8px !important;
  display: inline-flex;
  font-size: 12px !important;
  font-weight: 800 !important;
  gap: 5px;
  min-height: 30px;
  padding: 5px 9px !important;
  white-space: nowrap;
}

.btn-group-sm .btn span,
.project-actions .btn span,
.table.dataTable td:last-child .btn span {
  display: inline !important;
}

.btn-group-sm .dropdown-toggle::after,
.table.dataTable td:last-child .dropdown-toggle::after {
  display: none !important;
}

.btn-group-sm .btn i {
  font-size: 12px;
}

.btn-group-sm .btn-primary,
.btn-group-sm .btn-info {
  background: var(--app-primary) !important;
  border-color: var(--app-primary) !important;
  color: #ffffff !important;
}

.btn-group-sm .btn-secondary {
  background: #eef2f6 !important;
  border-color: #eef2f6 !important;
  color: var(--app-text) !important;
}

.btn-group-sm .btn-success {
  background: #2f9e62 !important;
  border-color: #2f9e62 !important;
  color: #ffffff !important;
}

.btn-group-sm .btn-danger {
  background: var(--app-danger) !important;
  border-color: var(--app-danger) !important;
  color: #ffffff !important;
}

td.text-right.font-weight-bold {
  color: var(--app-text);
  font-weight: 800 !important;
  white-space: nowrap;
}

.dt-button-collection.dropdown-menu {
  border: 1px solid var(--app-border);
  border-radius: 12px;
  box-shadow: var(--app-shadow-md);
  padding: 8px;
}

.table.dataTable.app-people-table {
  min-width: 720px;
  table-layout: fixed;
}

.table.dataTable.app-people-table thead th,
.table.dataTable.app-people-table tbody td {
  font-size: 11.5px;
  line-height: 1.25;
  padding: 6px 7px !important;
}

.table.dataTable.app-people-table thead th:nth-child(1),
.table.dataTable.app-people-table tbody td:nth-child(1) {
  width: 38px;
}

.table.dataTable.app-people-table thead th:nth-child(2),
.table.dataTable.app-people-table tbody td:nth-child(2) {
  width: 145px;
}

.table.dataTable.app-people-table thead th:nth-child(3),
.table.dataTable.app-people-table tbody td:nth-child(3),
.table.dataTable.app-people-table thead th:nth-child(4),
.table.dataTable.app-people-table tbody td:nth-child(4),
.table.dataTable.app-people-table thead th:nth-child(6),
.table.dataTable.app-people-table tbody td:nth-child(6) {
  width: 100px;
}

.table.dataTable.app-people-table thead th:nth-child(5),
.table.dataTable.app-people-table tbody td:nth-child(5),
.table.dataTable.app-people-table thead th:nth-child(7),
.table.dataTable.app-people-table tbody td:nth-child(7),
.table.dataTable.app-people-table thead th:nth-child(8),
.table.dataTable.app-people-table tbody td:nth-child(8) {
  width: 118px;
}

.table.dataTable.app-people-table thead th:nth-child(9),
.table.dataTable.app-people-table tbody td:nth-child(9),
.table.dataTable.app-people-table thead th:nth-child(10),
.table.dataTable.app-people-table tbody td:nth-child(10) {
  width: 54px;
}

.table.dataTable.app-people-table thead th:nth-child(11),
.table.dataTable.app-people-table tbody td:nth-child(11) {
  width: 112px;
}

.table.dataTable.app-people-table tbody td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table.dataTable.app-people-table tbody td:last-child {
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
}

.table.dataTable.app-people-table tbody td br {
  display: none;
}

.table.dataTable.app-people-table tbody td b {
  color: #172033;
  display: inline;
  font-weight: 800;
  margin-right: 5px;
}

.table.dataTable.app-people-table img {
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px #dbe4ee;
  height: 28px !important;
  max-height: 28px !important;
  max-width: 28px !important;
  width: 28px !important;
}

.table.dataTable.app-people-table .project-actions {
  white-space: nowrap;
}

.table.dataTable.app-people-table .project-actions .btn,
.table.dataTable.app-people-table .project-actions .btn-icon-only {
  font-size: 10.5px !important;
  min-height: 26px;
  padding: 4px 6px !important;
}

@media (max-width: 991.98px) {
  .app-dt-actions .dt-buttons {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .app-dt-search label {
    justify-content: flex-start;
  }

  .app-dt-product-box,
  .app-dt-smart-search,
  .app-dt-field-filter {
    min-width: 180px;
  }

  .app-dt-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .text-mobile-full {
    max-width: 170px;
  }
}

@media (max-width: 575.98px) {
  .content .card-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .content .card-tools {
    justify-content: flex-start;
    width: 100%;
  }

  .content .card-body {
    padding: 2px !important;
  }

  .app-dt-table {
    max-height: calc(100vh - 245px);
  }

  .app-dt-toolbar {
    align-items: center;
    gap: 5px;
    overflow-x: auto;
    padding: 0 0 5px;
  }

  .app-dt-actions .dt-buttons {
    gap: 4px;
  }

  .app-dt-actions .btn {
    margin-bottom: 5px;
    min-height: 32px;
    padding: 5px 7px !important;
  }

  .app-dt-search,
  .app-dt-smart-search {
    flex: 0 0 190px;
    min-width: 190px;
  }

  .app-dt-product-box {
    flex: 0 0 185px;
    min-width: 185px;
  }

  .app-dt-field-filter {
    flex: 0 0 92px;
    min-width: 92px;
  }

  .app-dt-product-box,
  .app-dt-smart-search,
  .app-dt-field-filter,
  .app-dt-search input,
  .app-dt-column-filter,
  .app-dt-product-filter {
    height: 32px;
    min-height: 32px;
  }

  .dataTables_scrollBody {
    max-height: none !important;
  }
}

@media print {
  .app-dt-toolbar,
  .app-dt-footer,
  .dataTables_scrollHead,
  .dataTables_paginate {
    display: none !important;
  }

  .dataTables_scroll,
  .dataTables_scrollBody {
    border: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }
}
