:root {
  --ink: #172033;
  --muted: #647084;
  --line: #dce3ec;
  --soft: #f5f7fa;
  --panel: #ffffff;
  --brand: #0f766e;
  --brand-strong: #0b5f59;
  --accent: #d97706;
  --danger: #b42318;
  --shadow: 0 14px 34px rgba(23, 32, 51, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #ffffff;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

.container {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 210px;
  font-weight: 800;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: block;
  object-fit: contain;
  flex: 0 0 auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  padding: 9px 12px;
  border-radius: 6px;
  color: #273449;
  font-size: 15px;
}

.auth-status {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  max-width: 220px;
  padding: 7px 10px;
  border: 1px solid #b9dcd7;
  border-radius: 6px;
  color: var(--brand-strong);
  background: #f1faf8;
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-action {
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #273449;
  background: #fff;
  font: inherit;
  font-size: 15px;
  cursor: pointer;
}

.nav-links a:hover,
.nav-links a.active,
.nav-action:hover {
  background: #e7f4f2;
  color: var(--brand-strong);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.button:hover {
  background: var(--brand-strong);
  color: #fff;
}

.button.secondary {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}

.button.warning {
  background: var(--accent);
}

.hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  background-image: linear-gradient(90deg, rgba(255,255,255,0.96), rgba(255,255,255,0.78) 42%, rgba(255,255,255,0.18)), url("/assets/hero-information-platform.png");
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid var(--line);
}

.hero-copy {
  width: min(620px, 100%);
  padding: 64px 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--brand-strong);
  font-weight: 800;
  margin-bottom: 14px;
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0 0 14px;
}

h1 {
  font-size: clamp(36px, 5vw, 58px);
  letter-spacing: 0;
}

h2 {
  font-size: 30px;
}

h3 {
  font-size: 20px;
}

.lead {
  color: var(--muted);
  font-size: 18px;
  margin: 0 0 24px;
}

.hero-actions,
.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.section {
  padding: 56px 0;
}

.section.alt {
  background: var(--soft);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 24px;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.market-hero {
  display: grid;
  grid-template-columns: minmax(240px, 360px) minmax(0, 1fr);
  gap: 24px;
  align-items: end;
  margin-bottom: 18px;
}

.market-title h1 {
  margin-bottom: 0;
}

.market-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  gap: 10px;
  padding: 10px;
  border: 2px solid #f59e0b;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(217, 119, 6, 0.1);
}

.market-search input {
  min-height: 44px;
  border: 0;
  padding: 10px 12px;
  font-size: 16px;
  background: transparent;
}

.market-search input:focus {
  outline: none;
}

.market-search .button {
  min-height: 44px;
}

.market-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.market-categories {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 0 8px;
}

.market-categories button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #39465a;
  background: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.market-categories button:hover,
.market-categories button.active {
  border-color: #f59e0b;
  color: #9a5b05;
  background: #fff7ed;
}

.market-result-line {
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 14px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.info-search-panel {
  display: grid;
  grid-template-columns: minmax(280px, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.info-card {
  display: flex;
  min-height: 230px;
  flex-direction: column;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(23, 32, 51, 0.04);
}

.info-card:hover {
  border-color: #b9dcd7;
  box-shadow: 0 14px 30px rgba(15, 118, 110, 0.1);
  transform: translateY(-2px);
}

.info-card h3 {
  font-size: 19px;
}

.info-card p {
  display: -webkit-box;
  margin: 0 0 12px;
  color: var(--muted);
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.info-photo {
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 2px 0 12px;
  overflow: hidden;
  border-radius: 8px;
  background: #eef2f7;
}

.info-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 1px 2px rgba(23, 32, 51, 0.04);
}

.listing-card {
  display: flex;
  flex-direction: column;
  min-height: 280px;
  overflow: hidden;
}

.product-card {
  border: 1px solid #eef1f5;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(23, 32, 51, 0.04);
}

.listing-card:hover {
  border-color: #ffd2a3;
  box-shadow: 0 14px 30px rgba(217, 119, 6, 0.12);
  transform: translateY(-2px);
}

.listing-photo {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #eef2f7;
  overflow: hidden;
}

.listing-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.listing-photo-placeholder {
  display: grid;
  place-items: center;
  color: #9a5b05;
  background: linear-gradient(135deg, #fff7ed, #eef9f7);
  font-weight: 900;
}

.photo-count {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #fff;
  background: rgba(23, 32, 51, 0.72);
  font-size: 12px;
  font-weight: 700;
}

.product-info {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 12px 12px 14px;
}

.tag-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #e7f4f2;
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 700;
}

.tag.neutral {
  background: #eef2f7;
  color: #526071;
}

.listing-card h3 {
  display: -webkit-box;
  min-height: 42px;
  margin-bottom: 8px;
  overflow: hidden;
  font-size: 16px;
  line-height: 1.32;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.listing-card p {
  display: -webkit-box;
  color: var(--muted);
  min-height: 40px;
  margin: 0 0 10px;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.5;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.product-price,
.detail-price {
  color: #e1251b;
  font-weight: 900;
  letter-spacing: 0;
}

.product-price {
  margin-top: auto;
  font-size: 22px;
  line-height: 1.1;
}

.seller-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  color: #667085;
  font-size: 13px;
}

.seller-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-price {
  margin: -6px 0 18px;
  font-size: 34px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: auto;
  color: var(--muted);
  font-size: 14px;
}

.category-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.category-tile {
  min-height: 116px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.category-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 12px;
  border-radius: 8px;
  background: #fff6e8;
  color: var(--accent);
  font-weight: 900;
}

.form-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}

.form-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 26px;
  box-shadow: var(--shadow);
}

.field {
  margin-bottom: 18px;
}

.field.compact {
  margin-bottom: 12px;
}

label {
  display: block;
  margin-bottom: 7px;
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cfd8e3;
  border-radius: 6px;
  padding: 11px 12px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}

input.readonly {
  color: var(--muted);
  background: #f7f9fb;
}

textarea {
  min-height: 150px;
  resize: vertical;
}

.order-form {
  margin: 18px 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.order-form h3 {
  margin-bottom: 12px;
}

.order-form textarea {
  min-height: 92px;
}

.file-upload-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.fee-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: -4px 0 18px;
  padding: 12px 14px;
  border: 1px solid #f3d19a;
  border-radius: 8px;
  color: #8a5200;
  background: #fff8e8;
}

.fee-panel span {
  font-weight: 800;
}

.fee-panel strong {
  color: #e1251b;
  font-size: 22px;
}

.native-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

.file-upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  margin: 0;
  padding: 8px 16px;
  border: 1px solid var(--brand);
  border-radius: 6px;
  color: #fff;
  background: var(--brand);
  font-weight: 800;
  cursor: pointer;
}

.file-upload-button:hover {
  background: var(--brand-strong);
}

.file-upload-summary {
  color: var(--muted);
  font-size: 14px;
}

.photo-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.photo-preview-grid figure {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.photo-preview-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: block;
  object-fit: cover;
  background: #eef2f7;
}

.photo-preview-grid figcaption {
  padding: 7px 8px;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hint,
.message {
  color: var(--muted);
  font-size: 14px;
}

.message {
  margin-top: 14px;
}

.message.error {
  color: var(--danger);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
}

.detail-content {
  white-space: pre-wrap;
}

.photo-carousel {
  margin: 24px 0;
}

.carousel-stage {
  position: relative;
  border-radius: 8px;
  background: #eef2f7;
  overflow: hidden;
}

.carousel-stage img {
  display: none;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.carousel-stage img.active {
  display: block;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  color: #fff;
  background: rgba(23, 32, 51, 0.62);
  font-size: 30px;
  line-height: 1;
  transform: translateY(-50%);
  cursor: pointer;
}

.carousel-btn:hover {
  background: rgba(23, 32, 51, 0.82);
}

.carousel-btn.prev {
  left: 12px;
}

.carousel-btn.next {
  right: 12px;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.carousel-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #c7d0dc;
  cursor: pointer;
}

.carousel-dots button.active {
  background: var(--brand);
}

.admin-shell {
  display: grid;
  gap: 24px;
}

.section-head.compact {
  margin-bottom: 14px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metric-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.metric-card span {
  display: block;
  color: var(--muted);
  font-size: 14px;
}

.metric-card strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 30px;
  line-height: 1;
}

.admin-panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(23, 32, 51, 0.04);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-size: 14px;
}

.admin-table th,
.admin-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: #39465a;
  background: #f7f9fb;
  font-weight: 800;
}

.admin-table tr:last-child td {
  border-bottom: 0;
}

.admin-table td span {
  display: block;
  color: var(--muted);
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.status.pending {
  color: #8a5200;
  background: #fff5d6;
}

.status.approved {
  color: var(--brand-strong);
  background: #e7f4f2;
}

.status.rejected {
  color: var(--danger);
  background: #fff0ed;
}

.status.offline {
  color: #526071;
  background: #eef2f7;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.table-actions button {
  min-height: 32px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #273449;
  background: #fff;
  cursor: pointer;
}

.table-actions button:hover {
  border-color: #b9dcd7;
  color: var(--brand-strong);
  background: #e7f4f2;
}

.site-footer {
  padding: 28px 0;
  background: #111827;
  color: #d9e1ec;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 14px;
}

.footer-inner a {
  color: #d9e1ec;
}

.empty {
  padding: 30px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fff;
}

@media (max-width: 860px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .hero {
    min-height: auto;
    background-image: linear-gradient(90deg, rgba(255,255,255,0.98), rgba(255,255,255,0.86)), url("/assets/hero-information-platform.png");
  }

  .market-hero,
  .market-search {
    grid-template-columns: 1fr;
  }

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

  .market-toolbar .button {
    width: 100%;
  }

  .category-strip,
  .form-shell,
  .detail-layout,
  .metric-grid,
  .info-grid {
    grid-template-columns: 1fr;
  }

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

  .photo-preview-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .grid {
    gap: 12px;
  }

  .product-info {
    padding: 10px;
  }

  .listing-card h3 {
    font-size: 15px;
  }

  .product-price {
    font-size: 20px;
  }
}
