/* =========================================================
   UPLOTNIST PROFILE TABLES — FIXED READABLE CSS
   Версия: 0.3.1-css-only
   Назначение: светлая таблица, липкая шапка, d не превращается в D,
   последний столбец не сливается с фоном.
========================================================= */

/* =========================================================
   ROOT WRAP
========================================================= */

.uplotnist-table-wrap,
.uplotnist-table-wrap * {
  box-sizing: border-box;
}

.uplotnist-table-wrap {
  width: 100%;
  margin: 28px 0;
  padding: 18px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, #071b2d 0%, #061724 62%, #0b2238 100%);
  border: 1px solid rgba(65, 126, 181, .38);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .22);
  font-family: Arial, sans-serif;
  color: #071b2d;
}

/* =========================================================
   HEADER ABOVE TABLE
========================================================= */

.uplotnist-table-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 14px;
  padding: 0 0 12px;
  border-bottom: 1px solid rgba(65, 126, 181, .35);
}

.uplotnist-table-title {
  margin: 0;
  color: #ffffff;
  font-size: 22px;
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: .2px;
  text-transform: none !important;
}

.uplotnist-table-title span {
  color: #ff7a00;
}

.uplotnist-table-note {
  margin: 0;
  color: #aebdca;
  font-size: 11px;
  line-height: 1.35;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

/* =========================================================
   SCROLL AREA
========================================================= */

.uplotnist-table-scroll {
  width: 100%;
  max-height: 760px;
  overflow: auto;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid rgba(7, 27, 45, .14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .65);
  -webkit-overflow-scrolling: touch;
}

.uplotnist-table-scroll::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.uplotnist-table-scroll::-webkit-scrollbar-track {
  background: #eef2f6;
  border-radius: 999px;
}

.uplotnist-table-scroll::-webkit-scrollbar-thumb {
  background: #aebdca;
  border-radius: 999px;
  border: 2px solid #eef2f6;
}

.uplotnist-table-scroll::-webkit-scrollbar-thumb:hover {
  background: #ff7a00;
}

/* =========================================================
   TABLE BASE
========================================================= */

.uplotnist-profile-table,
.table-uplotnist-classic .uplotnist-profile-table,
.uplotnist-table-wrap .uplotnist-profile-table {
  width: 100%;
  min-width: 680px;
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
  background: #ffffff;
  color: #071b2d;
  font-family: Arial, sans-serif;
  font-size: 12px;
  line-height: 1.35;
}

/* =========================================================
   STICKY TABLE HEAD
   Важно: text-transform отключён, чтобы d оставалась d, а D оставалась D.
========================================================= */

.uplotnist-profile-table thead th,
.table-uplotnist-classic .uplotnist-profile-table thead th,
.uplotnist-table-wrap .uplotnist-profile-table thead th {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 12px 14px;
  background: #071b2d;
  color: #ff7a00;
  border-bottom: 2px solid #ff7a00;
  border-right: 1px solid rgba(255, 255, 255, .12);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 900;
  text-align: left;
  white-space: nowrap;
  letter-spacing: .15px;
  text-transform: none !important;
}

.uplotnist-profile-table thead th:first-child,
.table-uplotnist-classic .uplotnist-profile-table thead th:first-child,
.uplotnist-table-wrap .uplotnist-profile-table thead th:first-child {
  border-top-left-radius: 13px;
}

.uplotnist-profile-table thead th:last-child,
.table-uplotnist-classic .uplotnist-profile-table thead th:last-child,
.uplotnist-table-wrap .uplotnist-profile-table thead th:last-child {
  border-right: 0;
  border-top-right-radius: 13px;
}

/* =========================================================
   TABLE BODY
========================================================= */

.uplotnist-profile-table tbody td,
.table-uplotnist-classic .uplotnist-profile-table tbody td,
.uplotnist-table-wrap .uplotnist-profile-table tbody td {
  padding: 10px 14px;
  color: #12263a !important;
  background: #ffffff;
  border-bottom: 1px solid #e3e8ee;
  border-right: 1px solid #edf1f5;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
  vertical-align: middle;
  text-transform: none !important;
}

.uplotnist-profile-table tbody td:last-child,
.table-uplotnist-classic .uplotnist-profile-table tbody td:last-child,
.uplotnist-table-wrap .uplotnist-profile-table tbody td:last-child {
  border-right: 0;
}

.uplotnist-profile-table tbody tr:nth-child(even) td,
.table-uplotnist-classic .uplotnist-profile-table tbody tr:nth-child(even) td,
.uplotnist-table-wrap .uplotnist-profile-table tbody tr:nth-child(even) td {
  background: #f6f8fa;
}

.uplotnist-profile-table tbody tr:hover td,
.table-uplotnist-classic .uplotnist-profile-table tbody tr:hover td,
.uplotnist-table-wrap .uplotnist-profile-table tbody tr:hover td {
  background: #fff3e6;
  color: #071b2d !important;
}

.uplotnist-profile-table tbody td:first-child,
.table-uplotnist-classic .uplotnist-profile-table tbody td:first-child,
.uplotnist-table-wrap .uplotnist-profile-table tbody td:first-child {
  font-weight: 900;
  color: #071b2d !important;
}

/* Пустые ячейки приглушаем, но не делаем белыми */
.uplotnist-profile-table td.uplotnist-table-empty,
.table-uplotnist-classic .uplotnist-profile-table td.uplotnist-table-empty,
.uplotnist-table-wrap .uplotnist-profile-table td.uplotnist-table-empty {
  color: rgba(18, 38, 58, .32) !important;
}

/* Артикул — акцентный, но читаемый на белом фоне */
.uplotnist-profile-table tbody td.uplotnist-col-article,
.table-uplotnist-classic .uplotnist-profile-table tbody td.uplotnist-col-article,
.uplotnist-table-wrap .uplotnist-profile-table tbody td.uplotnist-col-article,
.uplotnist-profile-table tbody td.uplotnist-col-article a,
.table-uplotnist-classic .uplotnist-profile-table tbody td.uplotnist-col-article a,
.uplotnist-table-wrap .uplotnist-profile-table tbody td.uplotnist-col-article a {
  color: #e96f00 !important;
  font-weight: 900;
  text-decoration: none;
}

/* Размер из источника — строго тёмный текст, чтобы не сливался со светлой строкой */
.uplotnist-profile-table tbody td.uplotnist-col-source,
.table-uplotnist-classic .uplotnist-profile-table tbody td.uplotnist-col-source,
.uplotnist-table-wrap .uplotnist-profile-table tbody td.uplotnist-col-source,
.uplotnist-profile-table tbody td.uplotnist-col-source a,
.table-uplotnist-classic .uplotnist-profile-table tbody td.uplotnist-col-source a,
.uplotnist-table-wrap .uplotnist-profile-table tbody td.uplotnist-col-source a {
  color: #12263a !important;
  font-weight: 800;
  text-decoration: none;
  background: transparent !important;
}

.uplotnist-profile-table tbody tr:hover td.uplotnist-col-source,
.table-uplotnist-classic .uplotnist-profile-table tbody tr:hover td.uplotnist-col-source,
.uplotnist-table-wrap .uplotnist-profile-table tbody tr:hover td.uplotnist-col-source {
  color: #071b2d !important;
}

/* Дополнительная страховка: последний столбец не должен становиться белым */
.uplotnist-profile-table tbody td:last-child,
.table-uplotnist-classic .uplotnist-profile-table tbody td:last-child,
.uplotnist-table-wrap .uplotnist-profile-table tbody td:last-child,
.uplotnist-profile-table tbody td:last-child a,
.table-uplotnist-classic .uplotnist-profile-table tbody td:last-child a,
.uplotnist-table-wrap .uplotnist-profile-table tbody td:last-child a {
  color: #12263a !important;
}

/* =========================================================
   FOOTER / SERVICE STATES
========================================================= */

.uplotnist-table-footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 10px;
  color: #aebdca;
  font-size: 10px;
  line-height: 1.35;
  font-weight: 700;
}

.uplotnist-table-empty-message {
  padding: 18px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e3e8ee;
  color: #12263a;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 800;
}

.uplotnist-table-empty-message b {
  color: #ff7a00;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 900px) {
  .uplotnist-table-wrap {
    margin: 22px 0;
    padding: 14px;
    border-radius: 16px;
  }

  .uplotnist-table-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .uplotnist-table-title {
    font-size: 20px;
  }

  .uplotnist-table-note {
    text-align: left;
    white-space: normal;
  }

  .uplotnist-table-scroll {
    max-height: 680px;
    border-radius: 12px;
  }

  .uplotnist-profile-table {
    min-width: 620px;
  }

  .uplotnist-profile-table thead th,
  .table-uplotnist-classic .uplotnist-profile-table thead th,
  .uplotnist-table-wrap .uplotnist-profile-table thead th {
    padding: 11px 12px;
    font-size: 11px;
  }

  .uplotnist-profile-table tbody td,
  .table-uplotnist-classic .uplotnist-profile-table tbody td,
  .uplotnist-table-wrap .uplotnist-profile-table tbody td {
    padding: 9px 12px;
    font-size: 11px;
  }
}

@media (max-width: 640px) {
  .uplotnist-table-wrap {
    margin: 18px 0;
    padding: 12px;
    border-radius: 14px;
  }

  .uplotnist-table-title {
    font-size: 18px;
  }

  .uplotnist-table-scroll {
    max-height: 620px;
  }

  .uplotnist-profile-table {
    min-width: 560px;
  }
}
