/* v1.14.40: dedicated IMEI registry workspace. */
.dsp-imei-manager-modal[hidden] {
  display: none !important;
}

.dsp-imei-manager-modal {
  position: fixed;
  inset: 0;
  z-index: 1000002;
  display: grid;
  place-items: center;
  padding: 18px;
  font-family: "Prompt", sans-serif;
}

.dsp-imei-manager-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 38, 32, .52);
  backdrop-filter: blur(3px);
}

.dsp-imei-manager-dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(1180px, 96vw);
  max-height: min(92vh, 920px);
  overflow: hidden;
  border: 1px solid #cfe0d9;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(18, 49, 40, .22);
  color: #173a30;
}

.dsp-imei-manager-header {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid #dbe8e3;
  background: #fff;
}

.dsp-imei-manager-header h2 {
  margin: 2px 0 2px;
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: 0;
}

.dsp-imei-manager-header p {
  margin: 0;
  color: #6b7d77;
  font-size: 12px;
}

.dsp-imei-manager-close {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 1px solid #ccddd6;
  border-radius: 50%;
  background: #fff;
  color: #315b4e;
  cursor: pointer;
}

.dsp-imei-manager-close:hover {
  border-color: #0f8b64;
  color: #087653;
}

.dsp-imei-manager-close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.dsp-imei-manager-body {
  min-height: 0;
  overflow: auto;
  padding: 16px 20px 24px;
  overscroll-behavior: contain;
}

.dsp-imei-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid #d8e6e0;
  border-radius: 8px;
  overflow: hidden;
  background: #fbfdfc;
}

.dsp-imei-stat-grid > div {
  min-width: 0;
  padding: 12px 14px;
  border-right: 1px solid #e0ebe6;
}

.dsp-imei-stat-grid > div:last-child {
  border-right: 0;
}

.dsp-imei-stat-grid span,
.dsp-imei-stat-grid b {
  display: block;
}

.dsp-imei-stat-grid span {
  color: #71827c;
  font-size: 11px;
}

.dsp-imei-stat-grid b {
  margin-top: 2px;
  font-size: 22px;
  line-height: 1.2;
}

.dsp-imei-stat-grid .is-activated b {
  color: #07845f;
}

.dsp-imei-stat-grid .is-available b {
  color: #6c7874;
}

.dsp-imei-filter-form {
  display: grid;
  grid-template-columns: minmax(230px, 1.7fr) repeat(2, minmax(130px, .85fr)) repeat(2, minmax(135px, .9fr)) auto;
  align-items: end;
  gap: 9px;
  margin-top: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e0ebe6;
}

.dsp-imei-filter-form label,
.dsp-imei-bulk-form label {
  display: grid;
  gap: 4px;
  min-width: 0;
  margin: 0;
}

.dsp-imei-filter-form label > span,
.dsp-imei-bulk-form label > span {
  color: #62746d;
  font-size: 10px;
  font-weight: 600;
}

.dsp-imei-filter-form input,
.dsp-imei-filter-form select,
.dsp-imei-bulk-form select {
  width: 100%;
  min-width: 0;
  height: 38px;
  margin: 0;
  padding: 0 10px;
  border: 1px solid #c8dcd4;
  border-radius: 6px;
  background: #fff;
  color: #173a30;
  font: inherit;
  font-size: 12px;
}

.dsp-imei-filter-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.dsp-imei-filter-actions button,
.dsp-imei-filter-actions a,
.dsp-imei-bulk-form button,
.dsp-imei-export-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid #bfd6cd;
  border-radius: 6px;
  background: #fff;
  color: #087653;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.dsp-imei-filter-actions button,
.dsp-imei-bulk-form button {
  border-color: #07845f;
  background: #07845f;
  color: #fff;
}

.dsp-imei-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 0 10px;
}

.dsp-imei-toolbar-main {
  display: flex;
  align-items: end;
  gap: 8px;
  min-width: 0;
}

.dsp-imei-bulk-form,
.dsp-imei-export-actions {
  display: flex;
  align-items: end;
  gap: 8px;
}

.dsp-imei-bulk-form label {
  min-width: 170px;
}

.dsp-imei-bulk-form label:nth-of-type(2) {
  min-width: 245px;
}

.dsp-imei-export-actions a:last-child {
  border-color: #7aca36;
  color: #36790b;
}

.dsp-imei-table-wrap {
  overflow-x: auto;
  border: 1px solid #d8e6e0;
  border-radius: 8px;
}

.dsp-imei-table {
  width: 100%;
  min-width: 820px;
  border: 0;
  border-collapse: collapse;
  table-layout: fixed;
}

.dsp-imei-table th,
.dsp-imei-table td {
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid #e2ece8;
  color: #27473d;
  font-size: 11px;
  text-align: left;
  vertical-align: middle;
}

.dsp-imei-table th {
  background: #f0f8f4;
  color: #46665b;
  font-size: 10px;
  text-transform: uppercase;
}

.dsp-imei-table tbody tr:last-child td {
  border-bottom: 0;
}

.dsp-imei-table tbody tr:hover {
  background: #f9fcfa;
}

.dsp-imei-table th:nth-child(2) {
  width: 34%;
}

.dsp-imei-table th:nth-child(3) {
  width: 18%;
}

.dsp-imei-table th:nth-child(4) {
  width: 24%;
}

.dsp-imei-table th:nth-child(5) {
  width: 18%;
}

.dsp-imei-table .dsp-imei-check {
  width: 44px;
  padding-right: 4px;
  text-align: center;
}

.dsp-imei-table input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin: 0;
}

.dsp-imei-table td strong,
.dsp-imei-table td span,
.dsp-imei-table td small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.dsp-imei-table td strong {
  color: #173a30;
  font-size: 12px;
  font-weight: 600;
}

.dsp-imei-table td span {
  margin-top: 2px;
  color: #536b62;
}

.dsp-imei-table td small {
  margin-top: 2px;
  color: #82908b;
  font-size: 9px;
}

.dsp-imei-status {
  display: inline-flex !important;
  width: fit-content;
  margin: 0 0 3px !important;
  padding: 4px 8px;
  border-radius: 999px;
  font-weight: 600;
}

.dsp-imei-status.is-activated {
  background: #e1f7ec;
  color: #067955;
}

.dsp-imei-status.is-available {
  background: #edf1ef;
  color: #5f6d68;
}

.dsp-imei-empty {
  height: 110px;
  color: #768680 !important;
  text-align: center !important;
}

.dsp-imei-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: center;
  padding: 13px 0 2px;
}

.dsp-imei-pagination a {
  display: grid;
  min-width: 30px;
  height: 30px;
  padding: 0 7px;
  place-items: center;
  border: 1px solid #cbded6;
  border-radius: 5px;
  color: #315b4e;
  font-size: 11px;
  text-decoration: none;
}

.dsp-imei-pagination a.is-current {
  border-color: #07845f;
  background: #07845f;
  color: #fff;
}

.dsp-imei-import-panel {
  position: relative;
  flex: 0 0 auto;
  margin: 0;
  border: 0;
}

.dsp-imei-import-panel > summary {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  border: 1px solid #80c934;
  border-radius: 6px;
  background: #f4faed;
  color: #397d0c;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  list-style: none;
}

.dsp-imei-import-panel > summary::-webkit-details-marker {
  display: none;
}

.dsp-imei-import-panel[open] > summary {
  border-color: #07845f;
  background: #07845f;
  color: #fff;
}

.dsp-imei-import-panel > div {
  position: absolute;
  z-index: 8;
  top: calc(100% + 7px);
  right: 0;
  width: min(540px, 82vw);
  padding: 14px;
  border: 1px solid #cfe0d9;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(18, 49, 40, .18);
}

.dsp-imei-import-panel > div > p:first-child {
  margin: 0 0 10px;
  color: #687b74;
  font-size: 10px;
}

.dsp-imei-import-panel .dsp-device-imei-form {
  margin: 0;
}

body.dsp-modal-open {
  overflow: hidden;
}

@media (max-width: 960px) {
  .dsp-imei-filter-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dsp-imei-search {
    grid-column: span 2;
  }

  .dsp-imei-filter-actions {
    justify-content: flex-end;
  }

  .dsp-imei-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .dsp-imei-toolbar-main {
    flex-wrap: wrap;
  }

  .dsp-imei-export-actions {
    justify-content: flex-end;
  }
}

@media (max-width: 640px) {
  .dsp-imei-manager-modal {
    align-items: stretch;
    padding: 0;
  }

  .dsp-imei-manager-dialog {
    width: 100%;
    max-height: 100dvh;
    min-height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .dsp-imei-manager-header {
    padding: 14px 15px 11px;
  }

  .dsp-imei-manager-header h2 {
    font-size: 20px;
  }

  .dsp-imei-manager-body {
    padding: 12px 14px calc(24px + env(safe-area-inset-bottom));
  }

  .dsp-imei-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dsp-imei-stat-grid > div:nth-child(2) {
    border-right: 0;
  }

  .dsp-imei-stat-grid > div:nth-child(-n+2) {
    border-bottom: 1px solid #e0ebe6;
  }

  .dsp-imei-filter-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dsp-imei-search {
    grid-column: 1 / -1;
  }

  .dsp-imei-filter-form input,
  .dsp-imei-filter-form select,
  .dsp-imei-bulk-form select {
    font-size: 16px;
  }

  .dsp-imei-filter-actions {
    grid-column: 1 / -1;
  }

  .dsp-imei-filter-actions > * {
    flex: 1;
  }

  .dsp-imei-bulk-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    flex: 1 1 100%;
  }

  .dsp-imei-bulk-form label,
  .dsp-imei-bulk-form label:nth-of-type(2) {
    min-width: 0;
  }

  .dsp-imei-bulk-form button {
    grid-column: 1 / -1;
  }

  .dsp-imei-import-panel {
    flex: 1 1 100%;
  }

  .dsp-imei-import-panel > summary {
    width: 100%;
  }

  .dsp-imei-import-panel > div {
    position: static;
    width: 100%;
    margin-top: 7px;
    box-shadow: none;
  }

  .dsp-imei-export-actions > * {
    flex: 1;
  }

  .dsp-imei-table-wrap {
    overflow: visible;
    border: 0;
  }

  .dsp-imei-table {
    display: block;
    min-width: 0;
  }

  .dsp-imei-table thead {
    display: none;
  }

  .dsp-imei-table tbody,
  .dsp-imei-table tr,
  .dsp-imei-table td {
    display: block;
    width: 100%;
  }

  .dsp-imei-table tr {
    position: relative;
    margin-bottom: 8px;
    padding: 10px 11px 9px 43px;
    border: 1px solid #d8e6e0;
    border-radius: 7px;
  }

  .dsp-imei-table td {
    padding: 5px 0;
    border: 0;
  }

  .dsp-imei-table td::before {
    display: block;
    margin-bottom: 1px;
    color: #82908b;
    content: attr(data-label);
    font-size: 9px;
  }

  .dsp-imei-table td.dsp-imei-check {
    position: absolute;
    top: 13px;
    left: 12px;
    width: 20px;
    padding: 0;
  }

  .dsp-imei-table td.dsp-imei-check::before {
    display: none;
  }

  .dsp-imei-empty {
    height: auto;
    padding: 24px !important;
  }

  .dsp-imei-empty::before {
    display: none !important;
  }
}
