:root {
  color-scheme: light;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  color: #333;
  background: #fff;
  scrollbar-gutter: stable;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: #fff;
  scrollbar-gutter: stable;
}

body {
  min-height: 100vh;
  margin: 0;
  color: #333;
  background: #fff;
}

a {
  color: #000;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button,
input,
select {
  font: inherit;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 12px;
  background: #f1f1f1;
  border-bottom: 1px solid #808080;
  flex-wrap: wrap;
}

.container {
  width: 100%;
  padding: 12px;
  overflow-x: auto;
  scrollbar-gutter: stable;
}

.logo {
  display: flex;
  align-items: center;
  min-width: 0;
}

.logo a {
  display: inline-flex;
  align-items: center;
}

.logo img {
  width: 100px;
  height: auto;
  margin-right: 10px;
}

.logo h1 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.header-actions,
.button-container {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.button-link,
.dropdown-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 39px;
  padding: 10px 20px;
  color: #000;
  white-space: nowrap;
  cursor: pointer;
  background: #e0e0e0;
  border: 1px solid #808080;
  border-radius: 5px;
  font-size: 16px;
  text-decoration: none;
  transition: background-color .2s ease, box-shadow .2s ease, border-color .2s ease, transform .125s ease;
}

.button-link:hover,
.dropdown-toggle:hover {
  background: #f4f4f4;
  text-decoration: none;
}

.button-link:active,
.dropdown-toggle:active {
  background: #f1f1f1;
  border-color: #c7c7c7;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .05) inset;
  transform: scale(.97);
}

.button-link:focus-visible,
.dropdown-toggle:focus-visible,
.info-icon:focus-visible,
.modal-close:focus-visible {
  outline: 2px solid #4b47bf;
  outline-offset: 2px;
}

.header-dropdown {
  position: relative;
}

.dropdown-toggle {
  position: relative;
  padding-right: 34px;
}

.dropdown-toggle::after {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 0;
  height: 0;
  margin-top: -2px;
  content: "";
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
  border-top: 4px solid #777;
  transition: transform .15s ease;
}

.header-dropdown.open .dropdown-toggle::after {
  transform: rotate(-180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 10000;
  max-width: calc(100vw - 24px);
  max-height: min(75vh, 700px);
  overflow: auto;
  visibility: hidden;
  pointer-events: none;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .15);
  border-radius: 5px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .12);
  opacity: 0;
  transform: scale(.92);
  transform-origin: 90% 0;
  transition: transform .15s cubic-bezier(.25, 0, .25, 1.4), opacity .1s ease, visibility 0s linear .15s;
}

.header-dropdown.open .dropdown-menu {
  visibility: visible;
  pointer-events: auto;
  opacity: 1;
  transform: scale(1);
  transition-delay: 0s;
}

.dropdown-grid {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.dropdown-grid.cols-3 {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  min-width: 700px;
}

.dropdown-grid.cols-2 {
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  min-width: 520px;
}

.dd-col {
  min-width: 0;
}

.dropdown-title {
  padding: 6px 8px;
  margin-bottom: 6px;
  color: #222;
  font-weight: 600;
}

.dd-col a {
  display: block;
  padding: 8px 10px;
  color: #000;
  border-radius: 4px;
  transition: background-color .1s ease;
}

.dd-col a:hover,
.dd-col a:focus-visible {
  background: #f6f6f6;
  text-decoration: none;
}

.dropdown-sep {
  height: 1px;
  margin: 6px 0;
  background: #c9c9c9;
}

.info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  color: #716de0;
  cursor: help;
  background: transparent;
  border: 0;
  border-radius: 4px;
  appearance: none;
}

.info-icon:hover,
.info-icon:focus-visible {
  background: #f0efff;
}

.info-glyph {
  color: inherit;
  font-family: inherit;
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
}

.hover-content {
  display: none !important;
}

.info-tooltip {
  position: fixed;
  z-index: 100000;
  width: max-content;
  max-width: min(540px, calc(100vw - 16px));
  max-height: min(70vh, 560px);
  padding: 10px;
  overflow: auto;
  color: #000;
  text-align: left;
  overflow-wrap: anywhere;
  background: #e8e8e8;
  border: 1px solid #b7b7b7;
  border-radius: 4px;
  box-shadow: 0 5px 18px rgba(0, 0, 0, .18);
  font-size: 12px;
  line-height: 1.35;
}

.info-tooltip[hidden] {
  display: none;
}

.info-tooltip strong,
.info-tooltip em {
  color: inherit;
  font-size: inherit;
}

.archive-notice {
  display: none;
  margin: 12px 12px 0;
  padding: 10px 12px;
  color: #5d1b1b;
  background: #fff1f1;
  border: 1px solid #d9a4a4;
  border-radius: 4px;
}

.archive-notice.visible {
  display: block;
}

.duplicate-modal {
  position: fixed;
  width: min(1200px, 94vw);
  max-width: 94vw;
  max-height: 88vh;
  padding: 0;
  overflow: hidden;
  color: #333;
  background: #fff;
  border: 1px solid #999;
  border-radius: 8px;
  box-shadow: 0 12px 45px rgba(0, 0, 0, .28);
}

.duplicate-modal::backdrop {
  background: rgba(161, 161, 161, .45);
}

.modal-shell {
  display: flex;
  max-height: 88vh;
  flex-direction: column;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
  background: #dedede;
  border-bottom: 1px solid #b7b7b7;
  cursor: move;
  user-select: none;
  touch-action: none;
}

.modal-title {
  font-size: 16px;
  font-weight: 600;
}

.modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  color: #222;
  cursor: pointer;
  background: transparent;
  border: 0;
  border-radius: 4px;
  font-size: 25px;
  line-height: 1;
}

.modal-close:hover {
  background: rgba(0, 0, 0, .08);
}

.modal-body {
  padding: 12px;
  overflow: auto;
}

.modal-status {
  display: none;
  margin-bottom: 10px;
  padding: 8px 10px;
  background: #f5f5f5;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.modal-status.visible {
  display: block;
}

#duplicateTable {
  width: 100% !important;
  font-size: 12px;
}

th {
  text-align: left;
}

td {
  padding-left: 15px !important;
  vertical-align: top;
}

table.dataTable.no-footer,
table.dataTable thead th,
table.dataTable thead td {
  border-bottom: 1px solid #808080;
}

table.dataTable.display thead th {
  border-top: 1px solid #c9c9c9;
  border-right: 1px solid #c9c9c9;
}

table.dataTable.display thead th:first-child {
  border-left: 1px solid #c9c9c9;
}

table.dataTable.display tbody td {
  border-right: 1px solid #c9c9c9;
}

table.dataTable.display tbody td:first-child {
  border-left: 1px solid #c9c9c9;
}

table.dataTable.display tbody tr:hover > * {
  background: #f8f8f8 !important;
}

.load-duplicates,
.load-software-duplicates {
  float: right;
  margin-left: 8px;
  font-weight: 600;
}

.footer-meta {
  margin-top: 13px;
  color: #555;
}

.dt-container .dt-search input,
.dt-container .dt-length select,
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  padding: 5px 7px;
  background: #fff;
  border: 1px solid #b7b7b7;
  border-radius: 4px;
}

.dt-container .dt-search input:focus,
.dt-container .dt-length select:focus {
  outline: 2px solid #716de0;
  outline-offset: 1px;
}

.dt-container .dt-layout-row {
  align-items: center;
}

.dt-processing {
  z-index: 10;
}

@media (max-width: 900px) {
  .dropdown-grid.cols-3,
  .dropdown-grid.cols-2 {
    grid-template-columns: 1fr;
    min-width: min(92vw, 520px);
  }
}

@media (max-width: 700px) {
  header {
    align-items: flex-start;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .header-actions,
  .button-container {
    width: 100%;
  }

  .button-link,
  .dropdown-toggle {
    min-height: 36px;
    padding: 8px 12px;
    font-size: 14px;
  }

  .dropdown-toggle {
    padding-right: 30px;
  }

  .dropdown-menu {
    position: fixed;
    top: auto;
    right: 4vw;
    left: 4vw;
    max-width: none;
  }

  .duplicate-modal {
    width: 96vw;
    max-width: 96vw;
  }
}
