body {
  background: #f7fbff;
}

.directory-page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 26px 50px;
}

.page-top {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-bottom: 22px;
}

.supplier-hero {
  position: relative;
  min-height: 270px;
  padding: 30px;
  overflow: hidden;
  border: 1px solid #dce9ff;
  border-radius: 8px;
  background:
    radial-gradient(circle at 72% 22%, rgba(15, 98, 254, 0.16), transparent 27%),
    linear-gradient(120deg, #ffffff 0%, #eff6ff 56%, #e8f2ff 100%);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

.back-link {
  color: #0f62fe;
  font-weight: 800;
  text-decoration: none;
}

.page-title h1 {
  margin: 12px 0 8px;
  font-size: 44px;
  letter-spacing: 0;
}

.page-title p {
  max-width: 760px;
  margin: 0;
  color: #475569;
  line-height: 1.6;
}

.supplier-graphic {
  position: relative;
  flex: 0 0 420px;
  height: 210px;
}

.trade-board {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 1px solid rgba(15, 98, 254, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(239, 246, 255, 0.5)),
    radial-gradient(circle at 72% 24%, rgba(15, 98, 254, 0.18), transparent 32%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 22px 46px rgba(15, 23, 42, 0.08);
}

.board-map {
  position: absolute;
  inset: 18px 18px 54px;
  border-radius: 8px;
  background:
    linear-gradient(rgba(15, 98, 254, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 98, 254, 0.06) 1px, transparent 1px),
    radial-gradient(circle at 20% 46%, rgba(15, 98, 254, 0.16), transparent 18%),
    radial-gradient(circle at 68% 36%, rgba(20, 184, 166, 0.14), transparent 20%);
  background-size: 22px 22px, 22px 22px, auto, auto;
}

.node {
  position: absolute;
  z-index: 2;
  width: 15px;
  height: 15px;
  background: #0f62fe;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 10px 22px rgba(15, 98, 254, 0.32);
}

.node-a { left: 54px; top: 74px; }
.node-b { left: 182px; top: 42px; background: #14b8a6; }
.node-c { right: 48px; top: 86px; }

.arc {
  position: absolute;
  border-top: 2px solid rgba(15, 98, 254, 0.34);
  border-radius: 50%;
  transform: rotate(-9deg);
}

.arc-one {
  left: 64px;
  top: 54px;
  width: 150px;
  height: 70px;
}

.arc-two {
  left: 194px;
  top: 62px;
  width: 142px;
  height: 82px;
  transform: rotate(14deg);
  border-color: rgba(20, 184, 166, 0.32);
}

.trade-metric {
  position: absolute;
  z-index: 3;
  width: 158px;
  padding: 12px 14px;
  border: 1px solid rgba(226, 232, 240, 0.94);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 15px 28px rgba(15, 23, 42, 0.1);
  backdrop-filter: blur(10px);
}

.trade-metric strong,
.trade-metric span {
  display: block;
}

.trade-metric strong {
  font-size: 18px;
}

.trade-metric span {
  margin-top: 3px;
  color: #64748b;
  font-size: 12px;
}

.metric-a {
  left: 24px;
  top: 22px;
}

.metric-b {
  right: 24px;
  bottom: 50px;
}

.port-strip {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 18px;
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 1fr 0.75fr;
  gap: 8px;
}

.port-strip span {
  height: 28px;
  border-radius: 5px;
  background: #0f62fe;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.port-strip span:nth-child(2) {
  background: #14b8a6;
}

.port-strip span:nth-child(3) {
  background: #f97316;
}

.port-strip span:nth-child(4) {
  background: #1e293b;
}

.directory-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
}

.directory-tabs a {
  padding: 10px 14px;
  border: 1px solid #c9ddff;
  border-radius: 7px;
  color: #0f62fe;
  background: white;
  text-decoration: none;
  font-weight: 800;
}

.directory-tabs a.active {
  color: white;
  background: #0f62fe;
}

.tools {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px;
  gap: 12px;
  margin-bottom: 16px;
}

.tools input,
.tools select {
  min-height: 46px;
  border: 1px solid #dbe5f2;
  border-radius: 7px;
  padding: 0 14px;
  background: white;
}

.search-studio {
  margin: 20px 0 18px;
  padding: 18px;
  border: 1px solid #dce9ff;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(10px);
}

.directory-panel {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.table-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px 0;
}

.table-title-row span {
  color: #0f62fe;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.table-title-row h2 {
  margin: 4px 0 10px;
  font-size: 22px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

th {
  color: #64748b;
  background: #f6f9ff;
  text-transform: uppercase;
  font-size: 12px;
}

tbody tr:hover {
  background: #f8fbff;
}

.level {
  display: inline-flex;
  justify-content: center;
  min-width: 76px;
  padding: 5px 9px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 12px;
}

.level.high {
  color: #15803d;
  background: #dcfce7;
}

.level.med {
  color: #a16207;
  background: #fef3c7;
}

.admin-page .tools input {
  min-height: 46px;
  border: 1px solid #cfe0f6;
  border-radius: 7px;
  padding: 0 14px;
  font: inherit;
}

.admin-table-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-table-actions input {
  width: min(360px, 42vw);
  min-height: 42px;
  border: 1px solid #cfe0f6;
  border-radius: 7px;
  padding: 0 13px;
  font: inherit;
}

.admin-result-note {
  margin: 4px 20px 10px;
}

.admin-security-editor {
  margin-bottom: 26px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e4ebf5;
}

.admin-security-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(190px, 1fr)) auto;
  gap: 10px;
  padding: 8px 20px 0;
}

.admin-security-fields input,
.password-reset-input {
  min-height: 42px;
  width: 100%;
  border: 1px solid #d8e2f1;
  border-radius: 6px;
  padding: 0 12px;
  font: inherit;
}

.password-reset-input {
  min-width: 182px;
  margin-bottom: 5px;
}

.admin-news-editor {
  margin-bottom: 30px;
  padding-bottom: 26px;
  border-bottom: 1px solid #e4ebf5;
}

.admin-news-editor .admin-result-note {
  margin: 12px 0 0;
}

.admin-news-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 16px;
}

.admin-news-grid label {
  display: grid;
  gap: 7px;
  padding: 15px;
  background: #f7faff;
  border: 1px solid #e3ebf8;
  border-radius: 7px;
}

.admin-news-grid label span {
  color: #526786;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.admin-news-grid input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #d8e2f1;
  border-radius: 6px;
  font: inherit;
}

.admin-contact-editor {
  margin-bottom: 28px;
  padding-bottom: 26px;
  border-bottom: 1px solid #e4ebf5;
}

.admin-contact-editor .admin-result-note {
  margin: 12px 0 0;
}

.admin-contact-fields {
  display: grid;
  grid-template-columns: minmax(210px, 0.7fr) minmax(280px, 1.3fr);
  gap: 18px;
  margin-top: 16px;
}

.admin-contact-fields label {
  display: grid;
  gap: 7px;
  padding: 15px;
  background: #f7faff;
  border: 1px solid #e3ebf8;
  border-radius: 7px;
}

.admin-contact-fields span {
  color: #526786;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.admin-contact-fields input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #d8e2f1;
  border-radius: 6px;
  font: inherit;
}

.admin-page table small {
  color: #64748b;
}

.inline-check {
  display: block;
  margin: 4px 0;
  white-space: nowrap;
}

.admin-page td select,
.admin-page td input[type="date"] {
  width: 100%;
  min-height: 38px;
}

.admin-link {
  display: inline-block;
  margin-top: 14px;
  color: #0f62fe;
  font-weight: 900;
  text-decoration: none;
}

.paid-request {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #cfe0f6;
  border-radius: 8px;
  background: #f6f9ff;
}

.paid-request strong {
  font-size: 14px;
}

.paid-request span {
  color: #475569;
  font-size: 13px;
  line-height: 1.5;
}

.paid-request a {
  color: #0f62fe;
  font-weight: 900;
  text-decoration: none;
}

.level.low {
  color: #1d4ed8;
  background: #dbeafe;
}

.directory-note {
  margin-top: 14px;
  color: #64748b;
  font-size: 13px;
}

.supplier-mode {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 14px;
}

.mode-button {
  min-width: 230px;
  color: #0f62fe;
  background: white;
  border-color: #c9ddff;
}

.mode-button.active {
  color: white;
  background: #0f62fe;
  border-color: #0f62fe;
}

.mode-button.access-locked,
.mode-button:disabled {
  color: #71839f;
  background: #eef3fa;
  border-color: #d9e3f1;
  cursor: not-allowed;
  opacity: 0.72;
}

.supplier-tools {
  grid-template-columns: minmax(320px, 1fr) 190px 240px 120px;
}

.buyer-tools {
  grid-template-columns: minmax(320px, 1fr) 190px 240px 120px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.summary-grid article {
  min-height: 96px;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.8)),
    white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.summary-grid article:nth-child(1) { border-top: 4px solid #0f62fe; }
.summary-grid article:nth-child(2) { border-top: 4px solid #16a34a; }
.summary-grid article:nth-child(3) { border-top: 4px solid #f97316; }
.summary-grid article:nth-child(4) { border-top: 4px solid #7c3aed; }
.summary-grid article:nth-child(5) { border-top: 4px solid #0891b2; }

.summary-grid span,
.summary-grid small {
  color: #64748b;
  font-size: 13px;
}

.summary-grid strong {
  display: block;
  margin: 8px 0 4px;
  font-size: 22px;
}

.report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  margin: 16px 0;
  padding: 16px;
  border: 1px solid #dce9ff;
  border-radius: 8px;
  background: #f8fbff;
}

.report-actions > div {
  min-width: 260px;
  margin-right: auto;
}

.report-actions span,
.report-actions small,
.report-actions strong {
  display: block;
}

.report-actions span {
  color: #0f62fe;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.report-actions strong {
  margin: 4px 0;
  font-size: 18px;
}

.report-actions small {
  color: #64748b;
}

.supplier-search-page table {
  min-width: 900px;
}

.detail-dialog {
  width: min(980px, calc(100vw - 34px));
  border: 0;
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 26px 80px rgba(15, 23, 42, 0.25);
}

.detail-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.dialog-head h2 {
  margin: 0;
  font-size: 22px;
}

.country-panel {
  margin-top: 20px;
}

.pager-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin: 12px 0 6px;
  color: #64748b;
  font-size: 13px;
}

.pager-row button {
  width: 42px;
  min-height: 36px;
  padding: 0;
  font-size: 20px;
}

.trend-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1.35fr) minmax(320px, 0.9fr);
  gap: 16px;
}

.trend-panel {
  min-height: 310px;
}

.trend-chart {
  height: 245px;
  margin: 0 18px 18px;
  overflow-x: auto;
  overflow-y: hidden;
}

.trend-bar-item {
  flex: 1;
  min-width: 72px;
  height: 100%;
  display: grid;
  grid-template-rows: 24px 1fr 30px;
  align-items: end;
  justify-items: center;
  gap: 6px;
}

.trend-bar-item strong {
  color: #334155;
  font-size: 11px;
  white-space: nowrap;
}

.trend-bar-item span {
  width: 100%;
  max-width: 44px;
  min-height: 10px;
  border-radius: 7px 7px 0 0;
  background: linear-gradient(180deg, #0f62fe, #7db8ff);
}

.trend-bar-item small {
  color: #64748b;
  font-size: 11px;
  text-align: center;
}

.trend-list {
  padding: 0 18px 18px;
}

.trend-list .rank-row {
  grid-template-columns: minmax(120px, 1fr) 1.1fr 86px;
  align-items: center;
}

.trend-product-row {
  min-height: 58px;
}

.trend-product-row > span:first-child {
  display: -webkit-box;
  max-height: 54px;
  overflow: hidden;
  color: #0b1736;
  line-height: 1.28;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.trend-product-row strong {
  white-space: nowrap;
}

.price-samples-panel {
  overflow-x: auto;
  overflow-y: visible;
}

.sample-description-cell {
  vertical-align: top;
}

.sample-description-text {
  display: block;
  max-height: none;
  min-height: 0;
  padding-bottom: 8px;
  color: #0b1736;
  line-height: 1.55;
  white-space: normal;
  word-break: normal;
  overflow: visible;
  overflow-wrap: break-word;
}

.price-samples-table {
  table-layout: fixed;
  min-width: 1180px;
  border-collapse: separate;
  border-spacing: 0;
}

.price-samples-table th,
.price-samples-table td {
  vertical-align: top;
  height: auto !important;
  overflow: visible !important;
}

.price-samples-table tbody tr,
.price-sample-row {
  height: auto !important;
}

.price-samples-table th:nth-child(1),
.price-samples-table td:nth-child(1) {
  width: 92px;
}

.price-samples-table th:nth-child(2),
.price-samples-table td:nth-child(2) {
  width: 92px;
}

.price-samples-table th:nth-child(3),
.price-samples-table td:nth-child(3) {
  width: 44%;
}

.price-samples-table th:nth-child(4),
.price-samples-table td:nth-child(4) {
  width: 130px;
}

.price-samples-table th:nth-child(5),
.price-samples-table td:nth-child(5) {
  width: 120px;
}

.price-samples-table th:nth-child(6),
.price-samples-table td:nth-child(6) {
  width: 120px;
}

.price-samples-table th:nth-child(7),
.price-samples-table td:nth-child(7) {
  width: 125px;
}

@media (max-width: 760px) {
  .page-top,
  .tools,
  .admin-security-fields {
    grid-template-columns: 1fr;
    display: grid;
  }

  .page-title h1 {
    font-size: 31px;
  }

  .directory-panel {
    overflow-x: auto;
  }

  .summary-grid,
  .supplier-tools,
  .admin-news-grid,
  .admin-contact-fields {
    grid-template-columns: 1fr;
  }

  .supplier-hero {
    display: grid;
  }

  .supplier-graphic {
    width: 100%;
    flex-basis: auto;
  }
}
