/* =========================================================
   НЕБАРАХОЛКА — Unified Design System v3
   Single source of truth for all screens
   ========================================================= */

:root {
  --ink: #0d1426;
  --muted: #697386;
  --line: #e6e9f0;
  --surface: #ffffff;
  --soft: #f7f8fc;
  --accent: #5b3df5;
  --accent-2: #4930db;
  --accent-soft: #eef0ff;
  --success: #059669;
  --danger: #e11d48;
  --radius: 16px;
  --radius-sm: 12px;
  --radius-full: 9999px;
  --shadow: 0 14px 38px rgba(16, 24, 40, 0.07);
  --shadow-lg: 0 22px 50px rgba(16, 24, 40, 0.12);
  --header-h: 68px;
  --shell: 1280px;
  --font: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { background: #fff; scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  background: linear-gradient(180deg, #fff 0%, #fafbfe 480px, #fff 900px);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; }

.shell {
  width: min(var(--shell), calc(100% - 48px));
  margin-inline: auto;
}

/* -------------------- HEADER -------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-h);
  background: rgba(255,255,255,0.92);
  border-bottom: 1px solid #eceef4;
  backdrop-filter: blur(18px) saturate(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
}

.header-inner {
  width: min(var(--shell), calc(100% - 48px));
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover { color: var(--ink); }

.brand-symbol,
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(145deg, #6d5cff, #4c31dd);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.04em;
  box-shadow: 0 6px 16px rgba(76, 49, 221, 0.28);
}

.brand-mark.small { width: 30px; height: 30px; font-size: 13px; border-radius: 9px; }
.brand-mark span { line-height: 1; }

.brand-name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.brand-name i { display: none; }

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.brand-copy strong {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
}
.brand-copy small {
  font-size: 12px;
  color: #93a0b8;
}

.main-nav {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
}

.main-nav a {
  position: relative;
  padding: 8px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s;
}

.main-nav a:hover { color: var(--accent); }

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), #7c6bff);
  transition: width 0.25s;
}

.main-nav a:hover::after { width: 100%; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
}

.header-login {
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.header-login:hover {
  background: var(--soft);
  color: var(--accent);
}

.header-sell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 16px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff !important;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(91, 61, 245, 0.22);
  transition: transform 0.2s, box-shadow 0.2s;
}

.header-sell:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(91, 61, 245, 0.3);
  color: #fff !important;
}

.notification-link {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 16px;
  text-decoration: none;
}
.notification-link:hover { background: var(--soft); color: var(--accent); }
.notification-link span {
  position: absolute;
  top: 6px; right: 6px;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  border-radius: var(--radius-full);
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.menu-toggle {
  display: none !important;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 10px;
}
.menu-toggle span {
  display: block;
  width: 20px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

/* -------------------- TYPOGRAPHY -------------------- */
h1, h2, h3, h4 {
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 12px;
}

body:not(.home-page) main {
  padding-block: 40px 72px;
}

body:not(.home-page) h1 {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
}

body:not(.home-page) h2 {
  font-size: clamp(22px, 2.5vw, 28px);
  font-weight: 750;
}

.page-title p {
  margin: 8px 0 0;
  font-size: 15px;
  color: var(--muted);
  max-width: 640px;
  line-height: 1.55;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--muted);
}
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--accent); }

/* -------------------- BUTTONS -------------------- */
.btn,
button[type="submit"],
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(91, 61, 245, 0.2);
  transition: transform 0.15s, box-shadow 0.15s;
  text-decoration: none;
}

.btn:hover,
button[type="submit"]:hover,
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(91, 61, 245, 0.28);
  color: #fff;
}

.btn-secondary {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}
.btn-secondary:hover {
  background: var(--soft);
  color: var(--ink);
  box-shadow: none;
}

.full-btn { width: 100%; }

/* -------------------- FORMS -------------------- */
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid #dfe3ec;
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s;
}

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

input:focus, select:focus, textarea:focus {
  outline: 0;
  border-color: #8b78fa;
  box-shadow: 0 0 0 4px rgba(91, 61, 245, 0.1);
}

label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.django-form > div,
.django-form p {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.django-form ul.errorlist {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--danger);
  font-size: 13px;
}

/* -------------------- AUTH -------------------- */
.auth-page {
  display: flex;
  justify-content: center;
  padding-block: 48px 80px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  padding: 40px 36px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-card .eyebrow,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.auth-card h1 {
  font-size: 28px !important;
  margin: 0 0 8px;
}

.auth-card > p {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 15px;
}

.auth-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-top: 18px;
  font-size: 13px;
}
.auth-links a { font-weight: 600; }

.auth-alt {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}
.auth-alt a { font-weight: 700; }

.social-auth-grid {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}
.social-auth-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}
.social-auth-btn:hover {
  border-color: #c5c9d8;
  box-shadow: 0 4px 12px rgba(16,24,40,0.06);
  color: var(--ink);
}
.social-mark {
  display: grid;
  place-items: center;
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--soft);
  font-weight: 800;
  font-size: 13px;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 8px 0 20px;
  color: var(--muted);
  font-size: 13px;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* -------------------- CATALOG -------------------- */
.page-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 24px;
}

.catalog-meta {
  text-align: right;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}
.catalog-meta strong {
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.03em;
}

.catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
}

.catalog-search {
  position: relative;
  flex: 1;
  min-width: 220px;
}
.catalog-search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.catalog-search input {
  padding-left: 42px;
  min-height: 46px;
}

.sort-select {
  min-width: 180px;
  min-height: 46px;
  width: auto;
}

.catalog-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.filters {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow);
}

.filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.filter-head strong { font-size: 16px; font-weight: 750; }
.filter-reset { font-size: 13px; font-weight: 600; }

.filter-group {
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f0f2f7;
}
.filter-group:last-of-type { border-bottom: 0; margin-bottom: 12px; }
.filter-group h3 {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.filter-option {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
  font-weight: 500;
}
.filter-option input { accent-color: var(--accent); width: auto; min-height: auto; }

.price-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.price-grid input { min-height: 42px; }

.filter-apply,
.catalog-submit {
  width: 100%;
  margin-top: 4px;
}

/* -------------------- LISTING CARD -------------------- */
.listing-grid {
  display: grid;
  gap: 18px;
}

.listing-card {
  position: relative;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow);
  transition: transform 0.22s, box-shadow 0.22s;
}

.listing-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.listing-cover {
  position: relative;
  min-height: 200px;
  background: linear-gradient(145deg, #6d5cff, #4c31dd);
  overflow: hidden;
}
.listing-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.listing-cover-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 200px;
  color: rgba(255,255,255,0.9);
  font-size: 48px;
  font-weight: 800;
}

.listing-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.listing-badge {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.92);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}
.listing-badge.verified { background: #ecfdf5; color: var(--success); }
.listing-badge.auction { background: #fff7ed; color: #c2410c; }

.listing-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px 24px;
}

.listing-body h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.listing-body h2 a { color: var(--ink); }
.listing-body h2 a:hover { color: var(--accent); }

.listing-desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.listing-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
  margin-top: auto;
  padding: 14px;
  border-radius: 14px;
  background: var(--soft);
}

.listing-kpi { text-align: center; }
.listing-kpi small {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.listing-kpi strong {
  font-size: 15px;
  font-weight: 750;
  color: var(--ink);
}

.listing-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 4px;
}

.listing-price small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.listing-price strong {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.seller-mini {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 6px;
  border-radius: var(--radius-full);
  background: var(--soft);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.seller-mini:hover { color: var(--accent); }
.seller-avatar {
  display: grid;
  place-items: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(145deg, #6d5cff, #4c31dd);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.listing-compare,
.listing-fav {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px; height: 36px;
  border: 0;
  border-radius: 10px;
  background: rgba(255,255,255,0.92);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(16,24,40,0.08);
}
.listing-fav { right: 54px; }

/* -------------------- FOOTER -------------------- */
.footer {
  margin-top: 64px;
  padding: 56px 0 28px;
  background: #0d1529;
  color: #a8b0c4;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(4, 1fr) 1.2fr;
  gap: 28px 24px;
  margin-bottom: 40px;
}

.footer-grid > div {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-grid h3 {
  margin: 0 0 4px;
  color: #fff;
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.footer-grid a {
  color: #aeb6cc;
  font-size: 14px;
  line-height: 1.4;
  text-decoration: none;
}
.footer-grid a:hover { color: #fff; }

.footer-brand p {
  margin: 8px 0 0;
  font-size: 14px;
  color: #8b93a8;
  line-height: 1.5;
}

.subscribe form {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.subscribe input {
  min-height: 42px;
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
  color: #fff;
}
.subscribe input::placeholder { color: #7a849c; }
.subscribe button {
  min-height: 42px;
  min-width: 42px;
  padding: 0;
  border-radius: 10px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 13px;
  color: #7a849c;
}
.footer-bottom a {
  margin-left: 16px;
  color: #8b93a8;
  text-decoration: none;
}
.footer-bottom a:hover { color: #fff; }

/* -------------------- CARDS / PANELS -------------------- */
.panel, .card, .content-card, .form-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

/* -------------------- MESSAGES / WARNINGS -------------------- */
.account-warning {
  background: #fff7df;
  border-bottom: 1px solid #f1dfae;
  color: #5e4708;
  font-size: 14px;
  font-weight: 600;
}
.account-warning .shell { padding-block: 10px; }
.account-warning a { color: var(--accent); text-decoration: underline; }

.messages {
  position: fixed;
  top: 76px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1200;
  width: min(760px, calc(100% - 32px));
}
.message {
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(45,58,112,0.06);
  font-size: 14px;
  margin-bottom: 8px;
}
.message.success { border-color: #cceee2; background: #f4fcf9; }
.message.error { border-color: #f2d4d7; background: #fff8f8; }

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1300;
}

.ambient { display: none; }

/* -------------------- RESPONSIVE -------------------- */
@media (max-width: 1100px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

@media (max-width: 980px) {
  .catalog-layout { grid-template-columns: 1fr; }
  .filters { position: static; }
  .listing-card { grid-template-columns: 1fr; }
  .listing-cover { min-height: 160px; }
  .page-title-row { flex-direction: column; align-items: flex-start; }
  .catalog-meta { text-align: left; }
}

@media (max-width: 820px) {
  .menu-toggle { display: flex !important; }
  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s, opacity 0.25s;
    box-shadow: 0 12px 30px rgba(16,24,40,0.08);
  }
  .main-nav.is-open {
    max-height: 360px;
    opacity: 1;
  }
  .main-nav a {
    padding: 14px 24px;
    font-size: 15px;
    border-bottom: 1px solid #f1f3f8;
  }
  .main-nav a::after { display: none; }
  .header-sell span { display: none; }
  .header-inner { width: calc(100% - 32px); gap: 12px; }
  .shell { width: calc(100% - 32px); }
}

@media (max-width: 640px) {
  body:not(.home-page) main { padding-block: 24px 52px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .footer-bottom a { margin-left: 0; margin-right: 14px; }
  .auth-card { padding: 28px 20px; }
  .listing-kpis { grid-template-columns: 1fr 1fr; }
}

/* ===================== ASSET DETAIL ===================== */
.asset-page { padding-bottom: 40px; }

.asset-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.asset-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: none;
}
.icon-button:hover {
  border-color: #cfd5e4;
  background: var(--soft);
  transform: none;
  box-shadow: none;
  color: var(--ink);
}

.asset-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.85fr);
  gap: 28px;
  align-items: start;
  margin-bottom: 36px;
}

.asset-gallery {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.asset-main-image {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, #6d5cff, #4c31dd);
  min-height: 360px;
}
.asset-main-image img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
}
.asset-main-image .listing-badges {
  position: absolute;
  top: 16px;
  left: 16px;
}

.asset-thumbs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.asset-thumb {
  width: 72px;
  height: 56px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 12px;
  overflow: hidden;
  background: var(--soft);
  cursor: pointer;
  box-shadow: none;
  min-height: 0;
}
.asset-thumb.active,
.asset-thumb:hover {
  border-color: var(--accent);
  transform: none;
  box-shadow: none;
}
.asset-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.asset-buybox {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.asset-category-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.verified-line { color: var(--success); }

.asset-buybox h1 {
  font-size: clamp(24px, 3vw, 32px) !important;
  margin-bottom: 10px;
  line-height: 1.2;
}

.asset-short {
  margin: 0 0 20px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}

.asset-price-box {
  margin-bottom: 18px;
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--soft);
}
.asset-price-box small {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 4px;
}
.asset-price {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--ink);
}

.auction-panel {
  margin-bottom: 18px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid #e8e0ff;
  background: #faf8ff;
}
.auction-panel.live {
  border-color: #c7f0de;
  background: #f3fcf8;
}
.auction-heading {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 700;
}
.auction-price-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.auction-price-grid small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 2px;
}
.auction-price-grid strong {
  font-size: 18px;
  font-weight: 800;
}

.safe-note {
  margin: 12px 0 18px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

.buybox-actions {
  display: grid;
  gap: 10px;
}

.seller-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.seller-card .seller-avatar {
  width: 44px;
  height: 44px;
  font-size: 14px;
}
.seller-title {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.seller-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.seller-row > a {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
.seller-row small { font-size: 12px; color: var(--muted); }

.asset-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.75fr);
  gap: 28px;
  align-items: start;
}

.asset-main-col {
  display: grid;
  gap: 18px;
}

.content-block {
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow);
}
.content-block h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}
.stats-grid div {
  padding: 14px;
  border-radius: 14px;
  background: var(--soft);
}
.stats-grid small {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 4px;
}
.stats-grid strong {
  font-size: 16px;
  font-weight: 750;
}

.side-stack {
  display: grid;
  gap: 16px;
  position: sticky;
  top: calc(var(--header-h) + 16px);
}

.side-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow);
}
.side-card h2 {
  margin: 0 0 14px;
  font-size: 16px;
}

.deal-step {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}
.deal-step:last-child { margin-bottom: 0; }
.deal-step > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
}
.deal-step strong {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
}
.deal-step small {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

.trust-score {
  display: flex;
  gap: 14px;
  align-items: center;
}
.score-ring {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 20px;
  flex-shrink: 0;
}
.trust-score p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.45;
}
.trust-score strong { color: var(--ink); }

.similar-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 36px 0 16px;
}
.similar-head h2 { margin: 0; font-size: 22px; }
.similar-head a { font-size: 14px; font-weight: 600; }

.similar-grid {
  display: grid;
  gap: 16px;
}

/* ===================== DASHBOARD ===================== */
.dashboard-page { padding-bottom: 40px; }

.dashboard-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.dashboard-head h1 {
  margin-bottom: 6px;
}
.dashboard-head p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

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

.btn-ghost {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: none;
}
.btn-ghost:hover {
  background: var(--soft);
  color: var(--accent);
  transform: none;
  box-shadow: none;
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}
.dashboard-stat {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}
.dashboard-stat small {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}
.dashboard-stat strong {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.dashboard-section {
  margin-bottom: 28px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.section-head h2 {
  margin: 0;
  font-size: 18px;
}
.section-head a {
  font-size: 13px;
  font-weight: 600;
}

.dashboard-table {
  display: grid;
  gap: 10px;
}

.dashboard-row {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 14px;
  background: var(--soft);
}
.dashboard-row strong a { color: var(--ink); }
.dashboard-row strong a:hover { color: var(--accent); }
.dashboard-row small {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
}
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

.empty-state {
  padding: 20px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.saved-search-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.saved-search-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--soft);
}
.saved-search-item strong { font-size: 14px; }
.saved-search-item small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}
.saved-search-actions {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.saved-search-actions button {
  min-height: auto;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.saved-search-actions button:hover {
  transform: none;
  box-shadow: none;
}
.danger-link { color: var(--danger) !important; }

/* Catalog toolbar: search row, not full-width submit alone */
.catalog-toolbar .catalog-submit {
  width: auto;
  min-width: 120px;
  flex-shrink: 0;
}
.catalog-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px auto;
  gap: 12px;
}
@media (max-width: 760px) {
  .catalog-toolbar {
    grid-template-columns: 1fr;
  }
  .catalog-toolbar .catalog-submit { width: 100%; }
}

/* Detail responsive */
@media (max-width: 980px) {
  .asset-hero-grid,
  .asset-content-grid {
    grid-template-columns: 1fr;
  }
  .asset-buybox,
  .side-stack {
    position: static;
  }
  .saved-search-list {
    grid-template-columns: 1fr;
  }
  .dashboard-row {
    grid-template-columns: 12px 1fr;
  }
  .dashboard-row b,
  .dashboard-row .row-actions {
    grid-column: 2;
  }
}

/* Deal quote rows in buybox */
.deal-quote {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 16px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e8ecf4;
  font-size: 13px;
}
.deal-quote span { color: var(--muted); }
.deal-quote strong { font-weight: 750; color: var(--ink); text-align: right; }
.asset-payment {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

/* 404 page */
.page-error,
main .error-page {
  text-align: center;
  padding: 60px 20px;
}

/* ===================== FORM PAGES (sell / edit) ===================== */
.form-page { padding-bottom: 40px; }

.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.7fr);
  gap: 28px;
  align-items: start;
}

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

.form-card h1 {
  margin: 0 0 8px;
  font-size: clamp(26px, 3vw, 34px) !important;
}

.form-card > p {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.category-hint {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.form-help {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow);
}

.form-help h2 {
  margin: 0 0 16px;
  font-size: 16px;
}

.help-step {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
}
.help-step:last-child { margin-bottom: 0; }
.help-step > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
}
.help-step p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.45;
}
.help-step strong {
  color: var(--ink);
  font-size: 14px;
}

/* Django form help text & lists */
.django-form .helptext,
.django-form .form-help-text,
.form-help-text {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
  font-weight: 500;
}

.django-form ul:not(.errorlist) {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.django-form input[type="checkbox"],
.django-form input[type="radio"] {
  width: auto;
  min-height: auto;
  margin-right: 8px;
}

.django-form .checkbox-row,
.django-form div:has(> input[type="checkbox"]) {
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
}

/* ===================== CONTENT / INFO PAGES ===================== */
.content-page {
  max-width: 760px;
  padding: 32px 36px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.content-page h1 {
  margin-bottom: 18px;
}

.rich-text {
  font-size: 15px;
  line-height: 1.7;
  color: #3a4558;
}

.rich-text p { margin: 0 0 14px; }
.rich-text h2, .rich-text h3 {
  margin: 28px 0 12px;
  font-size: 20px;
}
.rich-text ul, .rich-text ol {
  margin: 0 0 16px;
  padding-left: 20px;
}
.rich-text li { margin-bottom: 6px; }

/* ===================== SUPPORT ===================== */
.app-main, .app-shell { width: 100%; }
.app-shell.shell,
.shell.app-shell {
  width: min(var(--shell), calc(100% - 48px));
  margin-inline: auto;
  padding-block: 40px 72px;
}

.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.page-heading h1 { margin-bottom: 6px; }
.page-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.support-list {
  display: grid;
  gap: 10px;
}

.support-ticket-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.15s, box-shadow 0.15s;
}
.support-ticket-row:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--ink);
}
.support-ticket-row strong {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
}
.support-ticket-row small {
  font-size: 12px;
  color: var(--muted);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--soft);
  color: var(--muted);
  white-space: nowrap;
}
.status-pill.status-open,
.status-pill.status-new { background: #eef2ff; color: var(--accent); }
.status-pill.status-answered,
.status-pill.status-in_progress { background: #fff7ed; color: #c2410c; }
.status-pill.status-closed,
.status-pill.status-resolved { background: #ecfdf5; color: var(--success); }

/* ===================== REVIEWS ===================== */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.review-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}

.review-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.review-top strong {
  color: #d97706;
  font-size: 15px;
}
.review-top small {
  font-size: 12px;
  color: var(--muted);
}
.review-card p {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.5;
  color: #3a4558;
}
.review-card > span {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}
.review-card > small {
  font-size: 12px;
  color: var(--muted);
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 28px 0 8px;
  font-size: 14px;
  color: var(--muted);
}
.pagination a {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--accent);
  font-weight: 700;
}
.pagination a:hover {
  background: var(--accent-soft);
}

@media (max-width: 900px) {
  .form-layout {
    grid-template-columns: 1fr;
  }
  .form-help { position: static; }
  .form-card { padding: 24px 20px; }
  .content-page { padding: 24px 20px; }
}

/* Fees public page */
.public-fee-grid {
  display: grid;
  gap: 12px;
  margin: 22px 0;
}
.public-fee-grid article {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--soft);
}
.public-fee-grid strong {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
}
.public-fee-grid small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}
.public-fee-grid b {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--accent);
  white-space: nowrap;
}
.public-fee-grid p {
  margin: 0;
  width: 100%;
  font-size: 12px;
  color: var(--muted);
}

.security-note-card {
  margin-top: 8px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid #e8e0ff;
  background: #faf8ff;
}
.security-note-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
}
.security-note-card p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.empty-state h2 {
  margin: 0 0 8px;
  font-size: 18px;
}
.empty-state p {
  margin: 0 0 16px;
}

/* Mobile menu: JS toggles class "open" */
@media (max-width: 820px) {
  .main-nav.open,
  .main-nav.is-open {
    max-height: 360px !important;
    opacity: 1 !important;
    display: flex !important;
    flex-direction: column !important;
  }

  /* Home page premium.css hid nav on mobile — restore when opened */
  .home-page .main-nav.open,
  .home-page .main-nav.is-open {
    display: flex !important;
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    z-index: 999;
    padding: 8px 0;
    box-shadow: 0 12px 30px rgba(16,24,40,0.08);
  }

  .home-page .menu-toggle {
    display: flex !important;
  }
}

/* 404 / error */
.error-page {
  display: flex;
  justify-content: center;
  padding-block: 64px 80px;
}

.error-card {
  width: 100%;
  max-width: 480px;
  text-align: center;
  padding: 48px 36px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.error-card > span {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.error-card h1 {
  margin-bottom: 10px;
  font-size: clamp(28px, 4vw, 36px) !important;
}

.error-card p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 15px;
}

.error-card small {
  display: block;
  margin-bottom: 24px;
  font-size: 12px;
  color: #9aa3b5;
  word-break: break-all;
}

.error-card .btn {
  margin-top: 8px;
}

/* Header scrolled state for all pages */
.site-header.is-scrolled {
  background: rgba(255,255,255,0.97);
  box-shadow: 0 8px 28px rgba(16, 24, 40, 0.06);
}

/* Slightly tighter catalog card on medium screens */
@media (max-width: 1100px) {
  .listing-card {
    grid-template-columns: 220px minmax(0, 1fr);
  }
}

/* Mobile header: prevent overflow */
@media (max-width: 820px) {
  .header-inner {
    width: calc(100% - 24px);
    gap: 8px;
  }
  .header-actions {
    gap: 6px;
  }
  .header-login {
    padding: 8px 8px;
    font-size: 13px;
  }
  .header-sell {
    height: 36px;
    padding: 0 12px;
    font-size: 12px;
    border-radius: 10px;
  }
  .header-sell span { display: none !important; }
  .brand-name {
    font-size: 13px;
    max-width: 42vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .menu-toggle {
    display: flex !important;
    flex-shrink: 0;
  }
}

@media (max-width: 400px) {
  .header-login { display: none; }
}

/* ===================== COMPARE ===================== */
.compare-page { padding-bottom: 40px; }

.compare-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.compare-head h1 { margin-bottom: 8px; }
.compare-head p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  max-width: 560px;
}

.compare-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow);
  -webkit-overflow-scrolling: touch;
}

.compare-table {
  display: grid;
  grid-template-columns: 160px repeat(var(--compare-cols, 2), minmax(200px, 1fr));
  min-width: max-content;
}

.compare-label {
  display: flex;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid #f0f2f7;
  border-right: 1px solid #f0f2f7;
  background: var(--soft);
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.compare-product {
  padding: 18px;
  border-bottom: 1px solid #f0f2f7;
  border-right: 1px solid #f0f2f7;
}
.compare-product a {
  display: grid;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}
.compare-product img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 14px;
  background: linear-gradient(145deg, #6d5cff, #4c31dd);
}
.compare-product strong {
  font-size: 14px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.compare-product small {
  font-size: 12px;
  color: var(--muted);
}
.compare-product b {
  display: block;
  margin: 8px 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.compare-product form button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  box-shadow: none;
  cursor: pointer;
}
.compare-product form button:hover {
  color: var(--danger);
  border-color: #f2d4d7;
  transform: none;
  box-shadow: none;
}

.compare-value {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid #f0f2f7;
  border-right: 1px solid #f0f2f7;
  font-size: 14px;
  color: var(--ink);
}
.compare-value a { color: var(--ink); font-weight: 600; }
.compare-value a:hover { color: var(--accent); }

.compare-empty {
  padding: 48px 24px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow);
}
.compare-empty .btn { margin-top: 12px; }

/* ===================== GALLERY EDITOR ===================== */
.gallery-editor {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 8px;
}

.gallery-editor-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--soft);
}

.gallery-editor-item img,
.gallery-placeholder {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 10px;
  background: #e8ecf4;
}

.gallery-placeholder {
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 300;
  color: var(--muted);
}

.gallery-fields {
  display: grid;
  gap: 8px;
  font-size: 12px;
}

.gallery-fields label {
  font-size: 12px;
  margin-bottom: 2px;
}

.gallery-fields input {
  min-height: 38px;
  font-size: 13px;
}

.delete-check {
  display: flex !important;
  align-items: center;
  gap: 6px;
  flex-direction: row !important;
  color: var(--danger);
  font-weight: 600;
}

.revision-mini {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.revision-mini h3 {
  margin: 0 0 10px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.revision-mini > div {
  margin-bottom: 10px;
  font-size: 13px;
}
.revision-mini strong { display: block; }
.revision-mini span { color: var(--ink); }
.revision-mini small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}

.form-errors {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff8f8;
  border: 1px solid #f2d4d7;
  color: var(--danger);
  font-size: 13px;
}

/* Dashboard stats: template uses bare divs */
.dashboard-stats > div {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}
.dashboard-stats > div small {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}
.dashboard-stats > div strong {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.2;
}

/* Auth header icons */
.notification-link {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: var(--ink);
  text-decoration: none;
  font-size: 16px;
  background: transparent;
  transition: background 0.15s;
}
.notification-link:hover {
  background: var(--soft);
  color: var(--accent);
}
.notification-link span {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
}

/* Django form field groups */
.django-form > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.django-form label {
  font-size: 13px;
  font-weight: 600;
  color: #3a4558;
}
.django-form input,
.django-form select,
.django-form textarea {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  box-shadow: none;
}
.django-form textarea {
  min-height: 120px;
  padding: 12px 14px;
  resize: vertical;
}
.django-form input:focus,
.django-form select:focus,
.django-form textarea:focus {
  outline: none;
  border-color: #c4b5fd;
  box-shadow: 0 0 0 4px rgba(91, 61, 245, 0.12);
}
.django-form .errorlist {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--danger);
  font-size: 12px;
  font-weight: 600;
}

/* Compact dashboard action wrap */
.dashboard-actions {
  max-width: 560px;
  justify-content: flex-end;
}

/* ===================== MESSAGES ===================== */
.messenger-list-page { padding-bottom: 40px; }
.messenger-page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.messenger-kicker {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.messenger-page-head h1 { margin-bottom: 6px; }
.messenger-page-head p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}
.messenger-list-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow);
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.messenger-empty {
  text-align: center;
  padding: 48px 24px;
  max-width: 420px;
}
.messenger-empty > span {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  border-radius: 16px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 20px;
}
.messenger-empty h2 {
  margin: 0 0 8px;
  font-size: 20px;
}
.messenger-empty p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
}

/* ===================== SECURITY ===================== */
.security-page .security-panel {
  margin-bottom: 16px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow);
}
.security-panel-copy {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.security-status {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: #fff7ed;
  color: #c2410c;
}
.security-session-list {
  display: grid;
  gap: 10px;
}
.security-session {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--soft);
}
.security-session.current {
  border: 1px solid #e8e0ff;
  background: #faf8ff;
}
.security-device-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--accent);
  font-size: 14px;
  flex-shrink: 0;
}
.security-session strong {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
}
.security-session small {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
.security-session p {
  margin: 4px 0 0;
  font-size: 12px;
  color: #9aa3b5;
  word-break: break-all;
}
.security-event-list {
  display: grid;
  gap: 8px;
}
.security-event-list article {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--soft);
  font-size: 13px;
}

/* ===================== FINANCE ===================== */
.finance-summary {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.finance-balance,
.finance-request {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow);
}
.finance-balance small {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
}
.finance-balance strong {
  display: block;
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 8px;
}
.finance-balance span {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}
.finance-request h2 {
  margin: 0 0 8px;
  font-size: 18px;
}
.finance-request p {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

/* ===================== NOTIFICATIONS ===================== */
.page-shell { padding-bottom: 40px; }
.page-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.page-title h1 { margin-bottom: 6px; }
.page-title p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}
.notification-list {
  display: grid;
  gap: 10px;
}
.notification-list article,
.notification-list a {
  display: block;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
  color: var(--ink);
  text-decoration: none;
}
.notification-list article:hover,
.notification-list a:hover {
  border-color: #d9deea;
}

/* ===================== ANALYTICS ===================== */
.analytics-page { padding-bottom: 40px; }
.analytics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.analytics-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}
.analytics-card small {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}
.analytics-card strong {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.analytics-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.analytics-table th,
.analytics-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #f0f2f7;
  text-align: left;
}
.analytics-table th {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ===================== MODERATION ===================== */
.moderation-page { padding-bottom: 40px; }
.moderation-section {
  margin-bottom: 16px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow);
}
.moderation-list {
  display: grid;
  gap: 10px;
}
.moderation-list article {
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--soft);
}

/* ===================== SHARED ===================== */
.form-card.narrow {
  max-width: 560px;
}
.panel {
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.narrow-shell {
  width: min(720px, calc(100% - 48px));
  margin-inline: auto;
}
.logout-form {
  margin-top: 24px;
}
.logout-form button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid #f2d4d7;
  border-radius: 12px;
  background: #fff;
  color: var(--danger);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: none;
}
.logout-form button:hover {
  background: #fff8f8;
  transform: none;
  box-shadow: none;
}
.follow-list {
  display: grid;
  gap: 10px;
}

@media (max-width: 900px) {
  .finance-summary {
    grid-template-columns: 1fr;
  }
}

/* ===================== NOTIFICATION ITEMS ===================== */
.notification-item {
  display: flex !important;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.15s, box-shadow 0.15s;
}
.notification-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--ink);
}
.notification-item.unread {
  border-color: #e8e0ff;
  background: #faf8ff;
}
.notification-kind {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.notification-item strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}
.notification-item p {
  margin: 0 0 4px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}
.notification-item small {
  font-size: 12px;
  color: #9aa3b5;
}

/* Privacy links panel */
.privacy-links h2 {
  margin: 0 0 12px;
  font-size: 16px;
}
.privacy-links a {
  display: block;
  padding: 10px 0;
  border-bottom: 1px solid #f0f2f7;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.privacy-links a:last-child { border-bottom: 0; }
.privacy-links a:hover { color: var(--accent); }
.privacy-links .danger-link { color: var(--danger); }
.privacy-links .danger-link:hover { color: #b91c1c; }

/* Checkbox fields in preferences */
.django-form p {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
}
.django-form input[type="file"] {
  min-height: auto;
  padding: 10px 0;
  border: 0;
  box-shadow: none;
}
.django-form input[type="file"]:focus {
  box-shadow: none;
}

.muted {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 16px;
}

/* Mobile dashboard */
@media (max-width: 820px) {
  .dashboard-head {
    flex-direction: column;
  }
  .dashboard-actions {
    max-width: none;
    justify-content: flex-start;
  }
  .dashboard-stats {
    grid-template-columns: 1fr 1fr;
  }
  .messenger-page-head {
    flex-direction: column;
  }
  .notification-item {
    flex-direction: column;
    gap: 8px;
  }
  .finance-balance strong {
    font-size: 28px;
  }
}

@media (max-width: 480px) {
  .dashboard-stats {
    grid-template-columns: 1fr;
  }
}

/* ===================== FINAL CONFLICT HARDENING ===================== */

/* Prevent legacy button chrome from leaking */
button.menu-toggle {
  width: 42px;
  height: 42px;
  min-height: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}
button.menu-toggle span {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
}
button.menu-toggle:hover {
  transform: none;
  box-shadow: none;
  background: var(--soft);
}

/* Forms: neutralize full-width accidental button stretch */
.django-form button[type="submit"],
.django-form .btn-primary {
  width: auto;
  min-width: 160px;
}
.django-form .full-btn,
.auth-card .full-btn,
.auth-card .btn-primary {
  width: 100%;
}

/* Similar / recent grids */
.similar-grid,
.recent-grid {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

/* Listing card: clamp long summary */
.listing-body p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Catalog layout safety */
.catalog-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
@media (max-width: 980px) {
  .catalog-layout {
    grid-template-columns: 1fr;
  }
}

/* Header sell must never be black outside intentional overrides */
.header-sell {
  background: var(--accent) !important;
  color: #fff !important;
  border-radius: 12px !important;
}
.header-sell:hover {
  background: var(--accent-2) !important;
}

/* Footer brand mark on dark */
.footer .brand-mark {
  box-shadow: none;
}
.footer .brand-copy strong { color: #fff; }
.footer .brand-copy small { color: #98a3b9; }

/* Auth card consistency */
.auth-page {
  display: flex;
  justify-content: center;
  padding-block: 48px 72px;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 36px 32px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}
.auth-card h1 {
  margin: 0 0 8px;
  font-size: 28px !important;
}
.auth-card > p {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 14px;
}
.auth-alt {
  margin-top: 18px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}
.auth-links {
  display: flex;
  gap: 16px;
  margin: 14px 0 0;
  font-size: 13px;
  font-weight: 600;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--muted);
  font-size: 12px;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* Remove underlines that look like AI placeholders in rich text */
.rich-text {
  overflow-wrap: anywhere;
}

/* ===================== SELLER PROFILE ===================== */
.seller-page { padding-bottom: 40px; }

.seller-profile-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 28px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.seller-profile-avatar {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: linear-gradient(145deg, #6d5cff, #4c31dd);
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 12px 28px rgba(91, 61, 245, 0.28);
}

.seller-name-line {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.seller-name-line h1 {
  margin: 0;
  font-size: clamp(24px, 3vw, 32px) !important;
}
.seller-name-line span {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: #ecfdf5;
  color: var(--success);
  font-size: 12px;
  font-weight: 700;
}

.seller-profile-card > div > p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
  max-width: 640px;
}

.seller-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 16px;
}
.seller-facts span {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.seller-follow-form { margin-top: 4px; }

.seller-trust-card {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 24px 28px;
  margin-bottom: 24px;
  border: 1px solid #e8e0ff;
  border-radius: 24px;
  background: linear-gradient(135deg, #faf8ff, #fff);
  box-shadow: var(--shadow);
}

.seller-trust-score {
  display: flex;
  align-items: baseline;
  gap: 4px;
  flex-shrink: 0;
}
.seller-trust-score strong {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--accent);
  line-height: 1;
}
.seller-trust-score span {
  font-size: 16px;
  font-weight: 700;
  color: var(--muted);
}

.seller-trust-card h2 {
  margin: 0 0 6px;
  font-size: 18px;
}
.seller-trust-card p {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  max-width: 560px;
}

.seller-trust-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}
.seller-trust-metrics span {
  font-size: 13px;
  color: var(--muted);
}
.seller-trust-metrics b {
  color: var(--ink);
  font-weight: 750;
}

/* Listing description readability */
.content-block .rich-text,
.content-block {
  white-space: normal;
}
.content-block p {
  margin: 0 0 12px;
  line-height: 1.65;
  color: #3a4558;
}

/* Stronger empty states */
.empty-state {
  padding: 28px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
.empty-state p { margin: 0 0 12px; }
.empty-state .btn { margin-top: 4px; }

@media (max-width: 720px) {
  .seller-profile-card,
  .seller-trust-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .seller-trust-score strong { font-size: 40px; }
}

/* ===================== FEES COMPETITIVE PAGE ===================== */
.fee-public-page { max-width: 820px; }
.fee-lead {
  margin: 0 0 24px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
}

.fee-hero-rate {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
  margin-bottom: 22px;
  padding: 22px;
  border-radius: 20px;
  background: linear-gradient(135deg, #f4f1ff, #faf8ff);
  border: 1px solid #e8e0ff;
}
.fee-hero-main small {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
}
.fee-hero-main strong {
  display: block;
  font-size: 56px;
  font-weight: 900;
  letter-spacing: -0.05em;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
}
.fee-hero-main span {
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
}
.fee-hero-points {
  margin: 0;
  padding: 8px 0 0 18px;
  color: #3a4558;
  font-size: 14px;
  line-height: 1.7;
}

.fee-section-title {
  margin: 28px 0 12px;
  font-size: 20px;
}
.fee-note {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.6;
  color: #3a4558;
}

.fee-compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 8px;
}
.fee-compare-card {
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--soft);
}
.fee-compare-card.ours {
  border-color: #e8e0ff;
  background: #faf8ff;
}
.fee-compare-label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.fee-compare-card strong {
  display: block;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}
.fee-compare-card.ours strong { color: var(--accent); }
.fee-compare-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.fee-example-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 16px 0 22px;
}
.fee-example-grid article {
  padding: 16px;
  border-radius: 16px;
  background: var(--soft);
  border: 1px solid var(--line);
}
.fee-example-grid small {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}
.fee-example-grid strong {
  display: block;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}
.fee-example-grid span {
  font-size: 12px;
  color: var(--muted);
}

.fee-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

@media (max-width: 720px) {
  .fee-hero-rate,
  .fee-compare-grid,
  .fee-example-grid {
    grid-template-columns: 1fr;
  }
  .fee-hero-main strong { font-size: 44px; }
}

/* ===================== PLATFORM / PAIN MATRIX ===================== */
.platform-page { max-width: 900px; }

.pain-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0 8px;
}
.pain-card {
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}
.pain-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
}
.pain-card p {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}
.pain-card p:last-child { margin-bottom: 0; }
.pain-bad, .pain-good {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.pain-bad { background: #fff1f2; color: var(--danger); }
.pain-good { background: #ecfdf5; color: var(--success); }

.platform-steps {
  display: grid;
  gap: 12px;
  margin: 16px 0 22px;
}
.platform-step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--soft);
  border: 1px solid var(--line);
}
.platform-step > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
}
.platform-step strong {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
}
.platform-step p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

@media (max-width: 720px) {
  .pain-grid { grid-template-columns: 1fr; }
}

/* ===================== DEAL PAGE ===================== */
.deal-page .shell,
main.deal-page { }
body.deal-page { }

.deal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.75fr);
  gap: 24px;
  align-items: start;
  padding-bottom: 40px;
}

.deal-main-card,
.deal-summary {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow);
}

.deal-kicker {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--accent);
  text-transform: uppercase;
}

.deal-state {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  margin-left: 8px;
}

.deal-progress {
  display: flex;
  gap: 8px;
  margin: 18px 0 22px;
  flex-wrap: wrap;
}
.deal-progress-item {
  flex: 1;
  min-width: 90px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--soft);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
}
.deal-progress-item.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.deal-section-title {
  margin: 20px 0 10px;
  font-size: 15px;
}

.deal-asset-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid #f0f2f7;
}
.deal-asset-price {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.deal-parties {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}
.deal-parties > div {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--soft);
  font-size: 13px;
}

.deal-main-actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}
.action-stack .btn { width: 100%; justify-content: center; }

.deal-history {
  margin-top: 16px;
  display: grid;
  gap: 8px;
}
.deal-history article {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--soft);
  font-size: 13px;
  color: var(--muted);
}

.deal-security {
  margin-top: 14px;
  padding: 14px;
  border-radius: 14px;
  background: #faf8ff;
  border: 1px solid #e8e0ff;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.dispute-panel {
  margin-top: 16px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid #f2d4d7;
  background: #fff8f8;
}
.dispute-panel.resolved {
  border-color: #c7f0de;
  background: #f3fcf8;
}

.handover-board {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.handover-board article {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--soft);
}

@media (max-width: 900px) {
  .deal-layout { grid-template-columns: 1fr; }
  .deal-parties { grid-template-columns: 1fr; }
}

/* Support SLA note */
.support-sla {
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}


/* ===================== FLASH MESSAGES ===================== */
.messages { display: grid; gap: 10px; margin: 16px auto; max-width: 1120px; padding: 0 20px; }
.messages .message {
  padding: 14px 16px; border-radius: 14px; font-size: 14px; font-weight: 600; line-height: 1.45;
  border: 1px solid var(--line); background: var(--soft); color: var(--ink);
}
.messages .message.success { background: #f0faf5; border-color: #c7ebd8; color: #0f6b3f; }
.messages .message.error { background: #fff5f5; border-color: #f0c7c7; color: #a11919; }
.messages .message.warning { background: #fff9eb; border-color: #f0e0b0; color: #8a5b00; }
.messages .message.info { background: var(--accent-soft); border-color: #ddd6ff; color: var(--accent); }

.deal-quote {
  display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; margin-top: 12px;
  padding: 12px 14px; border-radius: 14px; background: var(--soft); font-size: 13px;
}
.deal-quote span { color: var(--muted); }
.deal-quote strong { font-weight: 800; text-align: right; }


/* listing-card media fix */
.listing-card {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow-sm, 0 8px 24px rgba(15, 23, 42, 0.06));
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.listing-card:hover {
  border-color: #cfd5e4;
  box-shadow: var(--shadow, 0 16px 40px rgba(15, 23, 42, 0.1));
  transform: translateY(-2px);
}
.listing-cover {
  position: relative;
  display: block;
  min-height: 160px;
  background: linear-gradient(145deg, #6d5cff, #4c31dd);
  overflow: hidden;
}
.listing-cover img {
  width: 100%;
  height: 100%;
  min-height: 160px;
  object-fit: cover;
  display: block;
}
.listing-body {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.listing-body h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
}
.listing-body h2 a {
  color: var(--ink);
  text-decoration: none;
}
.listing-desc {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.listing-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}
.listing-kpi small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}
.listing-kpi strong {
  font-size: 15px;
  font-weight: 800;
}
.listing-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.listing-price {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

/* asset detail polish */
.asset-page .shell,
.asset-page {
  max-width: 1120px;
}
.deal-quote {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.deal-quote span { color: var(--muted); }
.deal-quote strong { text-align: right; font-weight: 700; }
.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.metric-card {
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--soft);
  border: 1px solid var(--line);
}
.metric-card small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}
.metric-card strong {
  font-size: 18px;
  font-weight: 800;
}
.asset-main-image img[src*="s3.amazonaws.com"],
.listing-cover img[src*="s3.amazonaws.com"],
.asset-thumb img[src*="s3.amazonaws.com"] {
  /* broken remote placeholders: hide broken layout jump */
  background: linear-gradient(145deg, #6d5cff, #4c31dd);
}
@media (max-width: 860px) {
  .listing-card { grid-template-columns: 1fr; }
  .listing-cover img { min-height: 180px; }
  .asset-hero-grid { grid-template-columns: 1fr; }
  .asset-buybox { position: static; }
}
