body {
  min-height: 100vh;
  margin: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(245, 247, 242, 0.96)), #f5f7f2;
  color: #1f2b22;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 15px;
}

main {
  width: 100%;
  max-width: 100%;
  padding: 3rem 2rem 1rem;
}

.page-header {
  align-items: end;
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
}

.organization-title {
  color: #9b6f2f;
  font-size: 12px;
  font-weight: 800;
  margin: 0 0 6px;
  text-transform: uppercase;
}

h1 {
  font-size: 42px;
  line-height: 1.05;
  margin: 0;
}

.toolbar {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d9e0d2;
  border-radius: 8px;
  box-shadow: 0 18px 38px rgba(40, 61, 45, 0.12);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  margin: 0 0 18px;
  padding: 14px;
}

.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

button {
  align-items: center;
  background: #2f5a43;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  gap: 8px;
  justify-content: center;
  min-height: 38px;
  padding: 9px 14px;
}

button.imageViewer {
  background: #1a6fa8;
  border-color: transparent;
  color: #fff;
}

button.imageViewer:hover {
  background: #145a8a;
}

button.edit-btn {
  background: #0e8a7a;
  border-color: transparent;
  color: #fff;
}

button.edit-btn:hover {
  background: #0a6b63;
}

button:hover {
  background: #203f30;
}

button:disabled {
  background: #919191;
}

input:focus-visible{
  outline: 3px solid rgba(155, 111, 47, 0.28);
}

button .fa-solid {
  margin: 0;
}

button.secondary {
  background: #eef3e7;
  border-color: #b8c5ae;
  color: #203f30;
}

button.secondary:hover {
  background: #e1ead8;
}

button.danger {
  background: #fff2ef;
  border-color: #e2afa5;
  color: #a74332;
}

button.danger:hover {
  background: #f8ddd7;
}

#collection-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  flex-basis: 100%;
}

.collection-btn {
  padding: 3px 10px;
  font-size: 0.8rem;
  line-height: 1.1;
  border-radius: 4px;
}
.collection-btn.active {
  background-color: #dce9ff;
  border-color: #7aa7e6;
  color: #003366;
  font-weight: 500;
}

.search-field {
  align-items: center;
  color: #667263;
  display: flex;
  flex: 1 1 400px;
  font-weight: 700;
  gap: 12px;
  min-width: 250px;
}

.search-input {
  align-items: center;
  display: flex;
  flex: 1;
  max-width: 500px;
  position: relative;
}

.search-input .fa-solid {
  color: #7f8b79;
  left: 10px;
  position: absolute;
}

input,
select {
  border: 1px solid #b8c5ae;
  border-radius: 6px;
  color: #1f2b22;
  font: inherit;
}

input[type="search"] {
  background: #fbfcfa;
  min-height: 42px;
  padding: 10px 12px 10px 40px;
  width: 100%;
}

.table-wrap {
  background: #ffffff;
  border: 1px solid #d9e0d2;
  border-radius: 10px;
  box-shadow: 0 18px 38px rgba(40, 61, 45, 0.12);
  overflow: auto;
  max-height: calc(100vh - 210px);
}

.img-desc-div{
  overflow:auto;
  max-height: 300px;
  margin:10px;
  padding: 10px;
}

.artifact-image-modal .modal-content {
  border: 0;
  border-radius: 12px;
  box-shadow: 0 18px 48px rgba(40, 61, 45, 0.18);
}

.artifact-image-modal #image-display-block {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 65vh;
  margin: 0 auto 18px;
  border-radius: 6px;
}

.artifact-image-modal .img-desc-div {
  margin: 0;
  box-shadow: none;
}

.table-status {
  color: #667263;
  font-weight: 700;
  padding: 42px 24px;
  text-align: center;
}

.table-status.error {
  color: #a74332;
}

.user-area {
  position: absolute;
  top: 15px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logged-user {
  font-weight: bold;
  color: #333;
}

table {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 980px;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid #d9e0d2;
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #e8efdf;
  border-bottom-color: #b8c5ae;
  color: #223527;
  font-size: 12px;
  font-weight: 850;
  position: sticky;
  text-transform: uppercase;
  top: 0;
  white-space: nowrap;
  z-index: 2;
}

td {
  color: #263328;
  line-height: 1.4;
  max-width: 340px;
}

tbody tr {
  background: #fff;
}

tbody tr:nth-child(even) {
  background: #fbfcf8;
}

tbody tr:hover {
  background: #f2f6ed;
}

th.sort-header {
  cursor: pointer;
}

th.actions-header,
td.actions {
  position: sticky;
  right: 0;
  box-shadow: -4px 0 8px -4px rgba(0, 0, 0, 0.15);
  text-align: center;
  vertical-align: middle;
}

th.actions-header {
  z-index: 6;
  background: #e8efdf;
}

td.actions {
  z-index: 5;
  background: #fff;
}

tbody tr:nth-child(even) td.actions {
  background: #fbfcf8;
}

tbody tr:hover td.actions {
  background: #f2f6ed;
}

.sort-label {
  align-items: center;
  display: inline-flex;
  white-space: nowrap;
}

.sort-arrow {
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 6px solid currentColor;
  display: inline-block;
  margin-left: 6px;
  transform-origin: center;
}

th[aria-sort="ascending"] .sort-arrow {
  transform: rotate(180deg);
}

.actions {
  min-width: 200px;
  white-space: nowrap;
}

.actions button {
  font-size: 13px;
  margin: 0 3px;
  padding: 0;
  width: 34px;
  height: 34px;
  min-width: 34px;
  max-width: 34px;
  min-height: 34px;
  max-height: 34px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  vertical-align: middle;
  box-sizing: border-box;
  flex-shrink: 0;
}

.actions button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.column-menu-button {
  background: transparent;
  border: 1px solid transparent;
  color: #2f5a43;
  margin-left: 6px;
  min-height: 26px;
  padding: 2px 6px;
}

.column-menu-button:hover {
  background: rgba(47, 90, 67, 0.1);
  border-color: rgba(47, 90, 67, 0.18);
  color: #203f30;
}

.filtered-column {
  box-shadow: inset 0 -3px 0 #9b6f2f;
}

.column-menu {
  background: #fff;
  border: 1px solid #d9e0d2;
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(31, 43, 34, 0.18);
  display: grid;
  gap: 9px;
  padding: 15px;
  position: absolute;
  width: 240px;
  z-index: 1000;
}

.column-menu strong {
  color: #1f2b22;
  font-size: 15px;
}

.column-menu-section-title {
  color: #667263;
  font-size: 11px;
  font-weight: 850;
  margin-top: 4px;
  text-transform: uppercase;
}

.column-menu button {
  min-height: 36px;
  width: 100%;
}

.column-menu input,
.column-menu select {
  padding: 8px 10px;
}


/* Column Filter Multi-Select */
.multi-select-title {
  margin-top: 10px;
}

.multi-select-container {
  max-height: 150px;
  overflow-y: auto;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 6px;
  margin-bottom: 8px;
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.multi-select-info {
  font-size: 12px;
  color: #666666;
}

.multi-select-error {
  font-size: 12px;
  color: #dc3545;
}

.multi-select-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  cursor: pointer;
  font-weight: normal;
  margin: 0;
  padding: 2px 4px;
}

.custom-column-card {
  border: 1px solid #dee2e6 !important;
}

.custom-column-card:hover {
  background-color: rgba(13, 110, 253, 0.03) !important;
  border-color: #0d6efd !important;
}

#columns-checkbox-container::-webkit-scrollbar {
  width: 6px;
}

#columns-checkbox-container::-webkit-scrollbar-track {
  background: #f8f9fa;
  border-radius: 4px;
}

#columns-checkbox-container::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

#columns-checkbox-container::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Column Drag and Drop Styles */
th.sort-header {
  cursor: pointer;
  user-select: none;
}

th.sort-header:hover {
  background-color: #dde5d6;
  transition: background-color 0.2s ease-in-out;
}

th.dragging {
  opacity: 0.5;
  background-color: #c4d0b8;
  box-shadow: inset 0 0 4px rgba(47, 90, 67, 0.3);
}

th.drag-over {
  background-color: #d4e0cc;
  border-left: 3px solid #2f5a43;
  box-shadow: inset 3px 0 8px rgba(47, 90, 67, 0.15);
}


#pagination-bttns {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  text-align: center;
  button {
    background: #f4f7f1;
    color: #2f5a43;
    min-height: 30px;
    width: 52px;
    margin: 0;
    padding: 4px 8px;
    font-size: 12px;
    border: 1px solid #cbd8c3;
    border-radius: 5px;
    box-shadow: 0 1px 2px rgba(40, 61, 45, 0.08);

    &:hover:not(:disabled) {
      background: #e5eee0;
      border-color: #9db394;
      color: #203f30;
      transform: translateY(-1px);
    }

    &:disabled {
      background: #e7ebe5;
      border-color: #d5ddd1;
      color: #8a9588;
      box-shadow: none;
      cursor: default;
    }
  }
  
}

#pageNumbers {
  margin-top: 4px;
  text-align: center;
  button {
    background: #f8faf6;
    color: #2f5a43;
    margin: 1px;
    min-height: 26px;
    width: 36px;
    padding: 3px 7px;
    font-size: 12px;
    border: 1px solid #cbd8c3;
    border-radius: 5px;
    box-shadow: 0 1px 2px rgba(40, 61, 45, 0.06);

    &:hover:not(:disabled) {
      background: #e5eee0;
      border-color: #9db394;
      transform: translateY(-1px);
    }

    &:disabled {
      background: #2f5a43 !important;
      border-color: #2f5a43;
      color: #fff;
      cursor: default;
    }
  }
}

#pagination-bttns {
  display: none;
}

#pageNumbers:empty {
  display: none;
}

.column-dragging th.sort-header * {
  pointer-events: none;
}


.print-tag-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 4px 8px;
    line-height: 1.2;
    border-radius: 4px;
    background: #e3f2fd;
    border: 1px solid #90caf9;
    color: #0d47a1;
    font-weight: 600;
    font-size: 0.75rem;
}

.print-tag-badge:hover {
    background: #bbdefb;
}

.print-tag-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.1rem;
    height: 1.1rem;
    min-height: 0;
    padding: 0 0 2px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #0d47a1;
    font-size: 0.9rem;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
}

.print-tag-remove:hover {
    background: rgba(13, 71, 161, 0.15);
    color: #0b3c8f;
}

#print-tags-list {
  gap: 0.5rem;
}

/* ==========================================
   Bulk Printing Area
   ========================================== */
#bulk-print-area {
    display: none;
}

.print-page {
    box-sizing: border-box;
}

.card {
    border-right: 1px dotted #000;
    border-bottom: 1px dotted #000;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
    background: white;
}

.card-inner {
    width: 3.4in;
    height: 2.5in;
    transform: rotate(-90deg);
    transform-origin: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
    padding: 12px 10px;
    flex-shrink: 0;
}

.card-section-top {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.card-section-bottom {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: auto;
    padding-top: 8px;
}

.card-row {
    display: flex;
    width: 100%;
    align-items: baseline;
}

.card-row.single {
    gap: 6px;
}

.left-col {
    flex: 1;
    display: flex;
    gap: 4px;
    align-items: baseline;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.right-col {
    width: 1.1in;
    display: flex;
    gap: 4px;
    align-items: baseline;
    white-space: nowrap;
}

.label {
    font-weight: bold;
    font-size: 10.5pt;
    color: #000;
}

.val {
    font-size: 10pt;
    color: #000;
    font-weight: normal;
}

.cat-val {
    font-size: 11pt;
    font-weight: normal;
    color: #000;
}

@media print {
    body > *:not(#bulk-print-area) {
        display: none !important;
    }

    #bulk-print-area {
        display: block !important;
        visibility: visible !important;
        background: white !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    #bulk-print-area * {
        visibility: visible !important;
    }

    .print-page {
        width: 8.5in !important;
        height: 11in !important;
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        grid-template-rows: repeat(3, 1fr) !important;
        border-top: 1px dotted #000 !important;
        border-left: 1px dotted #000 !important;
        page-break-after: always !important;
        box-sizing: border-box !important;
        background: white !important;
    }

    .print-page:last-child {
        page-break-after: avoid !important;
    }

    @page {
        size: letter !important;
        margin: 0 !important;
    }
}

#showing {
  color: #667263;
  font-size: 13px;
  margin: 4px 0 0;
  text-align: left;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type=number] {
  -moz-appearance: textfield;
}
