:root {
  --blue: #174ea6;
  --text: #111;
  --muted: #666;
  --line: #e5e5e5;
  --soft: #f6f7f8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font-family: Arial, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

a {
  color: var(--blue);
  text-decoration: none;
}

input,
button {
  font: inherit;
}

.classifieds-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 14px max(16px, calc((100vw - 1120px) / 2));
}

.classifieds-brand {
  display: grid;
  color: var(--text);
  line-height: 1.15;
}

.classifieds-brand strong {
  font-size: 20px;
}

.classifieds-brand span,
.eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.classifieds-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  font-size: 14px;
  font-weight: 800;
}

.classifieds-main {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 22px 0 42px;
}

.classifieds-post-banner {
  display: flex;
  justify-content: center;
  border-bottom: 1px solid #d7c15a;
  background: #fff4c2;
  padding: 12px 16px;
  text-align: center;
}

.classifieds-post-banner a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 260px);
  margin: 0 auto;
  min-height: 44px;
  padding: 10px 24px;
  border: 1px solid #111;
  background: #111;
  color: #fff;
  font-size: 17px;
  font-weight: 900;
}

.classifieds-post-banner a:hover,
.classifieds-post-banner a:focus-visible {
  background: var(--blue);
  border-color: var(--blue);
}

.hero-panel,
.panel,
.auth-card,
.category-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.post-bottom-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
}

.post-bottom-panel h2 {
  margin: 0 0 6px;
  font-size: 22px;
}

.post-bottom-panel p {
  margin: 0;
}

.post-bottom-panel .primary-action {
  width: min(100%, 260px);
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 24px;
}

h1,
h2,
p {
  margin-top: 0;
}

.hero-panel h1,
.auth-card h1,
.panel h1 {
  margin-bottom: 10px;
  font-size: 30px;
  line-height: 1.2;
}

.hero-panel p,
.muted,
.form-note {
  color: var(--muted);
  line-height: 1.6;
}

.primary-action,
button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 5px;
  background: var(--blue);
  color: #fff;
  padding: 0 16px;
  font-weight: 900;
  cursor: pointer;
}

.panel,
.auth-card {
  margin-top: 18px;
  padding: 22px;
}

.search-form,
.auth-card form {
  display: grid;
  gap: 14px;
}

.search-form {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: end;
}

label {
  display: grid;
  gap: 7px;
  color: #333;
  font-weight: 900;
}

input {
  width: 100%;
  min-height: 46px;
  border: 1px solid #ccc;
  border-radius: 5px;
  padding: 0 12px;
  background: #fff;
}

select,
textarea {
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 5px;
  background: #fff;
  font: inherit;
}

select {
  min-height: 46px;
  padding: 0 12px;
}

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

fieldset {
  display: grid;
  gap: 14px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.is-hidden {
  display: none !important;
}

legend {
  padding: 0 6px;
  font-size: 18px;
  font-weight: 900;
}

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

.category-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  color: var(--text);
}

.category-card strong {
  font-size: 20px;
}

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

.section-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.section-title h2 {
  margin-bottom: 0;
}

.section-title span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.auth-card {
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
}

.auth-card.wide-form {
  max-width: 780px;
}

.flash {
  margin: 12px 0;
  border-radius: 5px;
  padding: 12px;
  font-weight: 800;
}

.flash.success {
  background: #e8f3ec;
  color: #116329;
}

.flash.error {
  background: #fdecec;
  color: #9d1c1c;
}

.flash.warning {
  background: #fff4d6;
  color: #684b00;
}

.account-panel dl {
  display: grid;
  gap: 12px;
}

.account-panel dl div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.account-panel dt {
  color: var(--muted);
  font-weight: 900;
}

.account-panel dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.placeholder-box {
  margin-top: 18px;
  border: 1px dashed #bbb;
  border-radius: 8px;
  background: var(--soft);
  padding: 16px;
}

.classifieds-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 18px;
  text-align: center;
  font-size: 13px;
}

.primary-action.small {
  min-height: 38px;
  font-size: 14px;
}

.safety-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.safety-row article {
  border: 1px solid var(--line);
  border-left: 4px solid #777;
  border-radius: 8px;
  background: var(--soft);
  padding: 16px;
}

.safety-row strong {
  display: block;
  font-size: 17px;
}

.safety-row p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.listing-list,
.admin-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.listing-row,
.admin-card {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.listing-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.listing-row h3,
.admin-card h2 {
  margin: 8px 0;
  line-height: 1.35;
}

.listing-row p,
.listing-description {
  color: #333;
  line-height: 1.75;
}

.listing-row b,
.listing-price {
  color: var(--blue);
  font-weight: 900;
  white-space: nowrap;
}

.listing-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.listing-meta > span:not(.verification-badge) {
  border-radius: 999px;
  background: var(--soft);
  padding: 4px 8px;
}

.verification-badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.verification-badge.verified {
  background: #e6f4ea;
  color: #137333;
}

.verification-badge.unverified {
  background: #fdecec;
  color: #b3261e;
}

.listing-detail h1 {
  margin-top: 12px;
}

.verification-note,
.contact-box,
.admin-verification-box {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 16px;
  color: #444;
  line-height: 1.65;
}

.contact-box h2,
.admin-verification-box h3 {
  margin: 0 0 8px;
}

.checkbox-row {
  display: flex;
  grid-template-columns: none;
  align-items: center;
}

.checkbox-row input {
  width: auto;
  min-height: auto;
}

.row-actions,
.admin-actions,
.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.verification-checklist {
  display: flex;
  flex: 1 1 100%;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.row-actions form,
.admin-actions form {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0;
}

.danger-button {
  background: #b3261e;
}

.error-text {
  color: #b3261e;
  font-weight: 800;
}

.admin-tabs {
  margin: 16px 0;
}

.admin-tabs a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--blue);
  font-weight: 900;
}

.admin-card {
  display: grid;
  gap: 12px;
}

.admin-detail-grid {
  display: grid;
  gap: 10px;
  margin: 0;
}

.admin-detail-grid div {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.admin-detail-grid dt {
  color: var(--muted);
  font-weight: 900;
}

.admin-detail-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.reject-form {
  flex: 1 1 320px;
}

@media (max-width: 720px) {
  .classifieds-header,
  .hero-panel,
  .search-form,
  .category-grid,
  .safety-row,
  .listing-row,
  .admin-detail-grid div,
  .account-panel dl div {
    grid-template-columns: 1fr;
  }

  .post-bottom-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .classifieds-header {
    align-items: start;
  }

  .classifieds-header nav {
    justify-content: start;
  }

  .hero-panel {
    padding: 18px;
  }

  .primary-action,
  .search-form button,
  .auth-card button {
    width: 100%;
  }
}
