* {
  box-sizing: border-box;
}

:root {
  --bg: #0a0d12;
  --bg-soft: #10151f;
  --panel: rgba(15, 20, 30, 0.82);
  --line: rgba(255, 255, 255, 0.1);
  --text: #e8edf7;
  --muted: #aab4c6;
  --red: #e64545;
  --red-deep: #8f1f26;
  --blue: #3b6cff;
  --blue-deep: #17308a;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.5);
  --page-bg:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(59, 108, 255, 0.14), transparent 55%),
    radial-gradient(ellipse 90% 70% at 100% 110%, rgba(230, 69, 69, 0.1), transparent 50%),
    radial-gradient(ellipse 70% 50% at 0% 80%, rgba(59, 108, 255, 0.06), transparent 45%),
    var(--bg);
}

html {
  scroll-behavior: smooth;
  height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Inter", system-ui, sans-serif;
  background: var(--page-bg);
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: cover;
  color: var(--text);
}

main,
.market-main,
.lot-page,
.lot-form-page,
.legal-page {
  flex: 1 0 auto;
  width: 100%;
  box-sizing: border-box;
}

a {
  color: inherit;
  text-decoration: none;
}

.hero {
  position: relative;
  min-height: 100vh;
  padding: 100px clamp(20px, 4vw, 56px) 72px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(180deg, rgba(6, 8, 12, 0.25), rgba(6, 8, 12, 0.9)),
    linear-gradient(135deg, rgba(8, 12, 18, 0.4), rgba(8, 12, 18, 0.8)),
    url("https://images.unsplash.com/photo-1551103782-8ab07efe8122?auto=format&fit=crop&w=1600&q=80") center/cover;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(8, 10, 16, 0.72), rgba(8, 10, 16, 0.38));
  backdrop-filter: blur(1px);
}

.hero__content,
.section,
.footer {
  position: relative;
  z-index: 1;
}

.nav {
  position: fixed;
  top: 20px;
  left: clamp(20px, 4vw, 56px);
  right: clamp(20px, 4vw, 56px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 28px;
  background: rgba(25, 32, 48, 0.95);
  backdrop-filter: blur(12px);
  border-radius: 999px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand__mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--red), var(--blue));
  box-shadow: 0 10px 26px rgba(59, 108, 255, 0.25);
}

.nav__links {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav__links a {
  color: var(--muted);
  font-weight: 500;
  transition: color 0.15s ease;
}

.nav__links a:hover,
.footer a:hover {
  color: var(--text);
}



.button.nav__login {
  margin-left: auto;
  min-width: 0;
  width: auto;
  padding: 10px 22px;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.nav__avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
}

.hero__content {
  max-width: 760px;
  padding: clamp(32px, 6vw, 72px) 0 12px;
}

.eyebrow,
.section__label,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  color: #d7dded;
}

.eyebrow::before,
.section__label::before {
  content: "";
  width: 44px;
  height: 2px;
  background: linear-gradient(90deg, var(--red), var(--blue));
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  margin-top: 16px;
  font-size: clamp(2.8rem, 7vw, 6rem);
  line-height: 0.98;
  max-width: 11ch;
}

.hero__text {
  margin-top: 22px;
  max-width: 640px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.8;
}

.hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.button {
  min-width: 190px;
  padding: 16px 24px;
  border-radius: 999px;
  font-weight: 700;
  text-align: center;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button--primary {
  background: linear-gradient(135deg, var(--red), var(--red-deep));
  box-shadow: 0 18px 40px rgba(230, 69, 69, 0.28);
}

.button--secondary {
  background: linear-gradient(135deg, rgba(59, 108, 255, 0.24), rgba(23, 48, 138, 0.55));
  border-color: rgba(91, 126, 255, 0.3);
  box-shadow: 0 18px 40px rgba(59, 108, 255, 0.16);
}

.button--steam {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: linear-gradient(135deg, #1b2838, #2a475e);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 40px rgba(27, 40, 56, 0.35);
  color: #ffffff;
}

.button--steam:hover {
  border-color: rgba(255, 255, 255, 0.28);
}

.section {
  padding: 92px clamp(20px, 4vw, 56px);
}

.section__head {
  max-width: 760px;
  margin-bottom: 30px;
}

.section__head h2 {
  margin-top: 14px;
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  line-height: 1.1;
}

.section__desc {
  margin-top: 16px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 640px;
}

.about-grid,
.lots-grid,
.reviews-grid {
  display: grid;
  gap: 20px;
}

.about-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.lots-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.reviews-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.info-card,
.lot-card {
  border-radius: 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.info-card {
  padding: 28px;
}

.info-card p {
  color: var(--muted);
  line-height: 1.75;
  margin-top: 14px;
}

/* Stats band */
.section--stats {
  padding-top: 0;
  padding-bottom: 0;
}

.stats-panel {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  border-radius: 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 32px 20px;
  border-right: 1px solid var(--line);
}

.stat-item:last-child {
  border-right: none;
}

.stat-item__icon {
  width: 30px;
  height: 30px;
  color: var(--blue);
  margin-bottom: 4px;
}

.stat-item__icon svg {
  width: 100%;
  height: 100%;
}

.stat-item__value {
  position: relative;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 800;
  color: #edf1ff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.stat-item__live {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #6fe3b0;
  box-shadow: 0 0 0 0 rgba(111, 227, 176, 0.6);
  animation: pulse-live 1.8s infinite;
}

@keyframes pulse-live {
  0% {
    box-shadow: 0 0 0 0 rgba(111, 227, 176, 0.55);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(111, 227, 176, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(111, 227, 176, 0);
  }
}

.stat-item__label {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
  max-width: 16ch;
}

/* Reviews */
.review-card {
  padding: 32px 28px 28px;
  border-radius: 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.review-card::before {
  content: "\201C";
  position: absolute;
  top: -6px;
  right: 20px;
  font-size: 5.5rem;
  font-family: Georgia, serif;
  color: rgba(59, 108, 255, 0.16);
  line-height: 1;
  pointer-events: none;
}

.review-card:hover {
  transform: translateY(-6px);
  border-color: rgba(59, 108, 255, 0.4);
  box-shadow: 0 30px 70px rgba(59, 108, 255, 0.18);
}

.review-card__stars {
  color: #ffb84d;
  letter-spacing: 3px;
  font-size: 1rem;
}

.review-card__text {
  color: var(--muted);
  line-height: 1.75;
  margin: 0;
  position: relative;
  z-index: 1;
}

.review-card__author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.review-card__avatar {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red), var(--blue));
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
}

.review-card__author strong {
  display: block;
  color: #ffffff;
}

.review-card__meta {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 2px;
}

.lot-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.lot-card__image {
  height: 180px;
  display: grid;
  place-items: center;
  color: rgba(232, 237, 247, 0.85);
}

.lot-card__image svg {
  width: 56px;
  height: 56px;
}

.lot-card__image--base {
  background: linear-gradient(135deg, rgba(59, 108, 255, 0.45), rgba(23, 48, 138, 0.65));
}

.lot-card__image--resources {
  background: linear-gradient(135deg, rgba(230, 69, 69, 0.4), rgba(143, 31, 38, 0.6));
}

.lot-card__image--service {
  background: linear-gradient(135deg, rgba(91, 200, 170, 0.4), rgba(23, 100, 90, 0.6));
}

.lot-card__body {
  padding: 24px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lot-card__title {
  margin: 0;
}

.lot-card__desc {
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.92rem;
  margin: 0;
}

.lot-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.lot-card__price {
  font-weight: 700;
  font-size: 1.05rem;
  color: #edf1ff;
}

.lot-card__price--free {
  color: #6fe3b0;
}

.lot-card__seller {
  font-size: 0.8rem;
  color: var(--muted);
}

.footer {
  margin-top: auto;
  padding: 40px clamp(20px, 4vw, 56px) 28px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.footer__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
  padding-bottom: 24px;
}

.footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  color: var(--text);
}

.brand__mark--sm {
  width: 34px;
  height: 34px;
  font-size: 0.7rem;
}

.footer__logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: cover;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.footer__links a {
  font-size: 0.9rem;
  transition: color 0.15s ease;
}

.footer__email {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  transition: color 0.15s ease;
}

.footer__email:hover {
  color: var(--blue);
}

.footer__bottom {
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  text-align: center;
}

.footer__bottom p {
  margin: 0;
}

@media (max-width: 640px) {
  .footer__top {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 980px) {
  .about-grid,
  .lots-grid,
  .reviews-grid {
    grid-template-columns: 1fr;
  }

  .stats-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stat-item:nth-child(3) {
    border-right: none;
  }

  .stat-item:nth-child(n + 4) {
    border-top: 1px solid var(--line);
  }

  .nav,
  .footer {
    flex-direction: column;
    align-items: flex-start;
  }

  h1 {
    max-width: 14ch;
  }
}

@media (max-width: 640px) {
  .hero {
    min-height: auto;
  }

  .hero__actions,
  .nav__links,
  .lot-card__footer {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .button.nav__login {
    width: auto;
  }

  .section {
    padding-top: 72px;
    padding-bottom: 72px;
  }

  .stats-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-item {
    border-right: 1px solid var(--line);
  }

  .stat-item:nth-child(even) {
    border-right: none;
  }

  .stat-item:nth-child(3),
  .stat-item:nth-child(4),
  .stat-item:nth-child(5) {
    border-top: 1px solid var(--line);
  }
}

/* ---------- Auth (login / register) ---------- */

.brand__logo {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  object-fit: cover;
}

.nav__user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  font-family: "Inter", system-ui, sans-serif;
  background: var(--page-bg);
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: cover;
  color: var(--text);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 36px;
  box-shadow: var(--shadow);
}

.auth-card .brand {
  margin-bottom: 24px;
}

.auth-card h1 {
  margin: 0 0 20px;
  font-size: 1.6rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--muted);
}

.auth-form input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--text);
  font-size: 0.95rem;
}

.auth-form input:focus {
  outline: none;
  border-color: var(--blue);
}

.auth-form button {
  margin-top: 4px;
  border: none;
  cursor: pointer;
}

.auth-switch {
  margin: 20px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
}

.auth-switch a {
  color: var(--blue);
  font-weight: 600;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.legal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px clamp(20px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
}

.legal-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px clamp(20px, 4vw, 56px) 40px;
}

.legal-page h1 {
  margin: 8px 0 20px;
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
  line-height: 1.15;
  max-width: none;
}

.legal-page p {
  color: var(--muted);
  line-height: 1.75;
}

.legal-page p a {
  color: var(--blue);
}

.legal-page__meta {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 24px;
}

.legal-page__body {
  padding: 16px 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  line-height: 1.75;
  margin-bottom: 24px;
}

.legal-page__stub {
  padding: 16px 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text) !important;
}

.form-error {
  background: rgba(230, 69, 69, 0.12);
  border: 1px solid rgba(230, 69, 69, 0.4);
  color: #ffb4b4;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.85rem;
  margin: 0 0 14px;
}

.form-success {
  background: rgba(59, 108, 255, 0.12);
  border: 1px solid rgba(59, 108, 255, 0.4);
  color: #bcd0ff;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.85rem;
  margin: 0 0 14px;
}

/* ---------- Admin panel ---------- */

.admin-body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", system-ui, sans-serif;
  background: var(--page-bg);
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: cover;
  color: var(--text);
}

.admin-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(20px, 4vw, 56px);
  background: rgba(25, 32, 48, 0.95);
  border-bottom: 1px solid var(--line);
}

.admin-nav__links {
  display: flex;
  gap: 24px;
}

.admin-nav__links a {
  color: var(--muted);
  font-weight: 500;
  padding: 6px 4px;
  border-bottom: 2px solid transparent;
}

.admin-nav__links a:hover,
.admin-nav__links a.is-active {
  color: var(--text);
  border-bottom-color: var(--blue);
}

.admin-dropdown {
  position: relative;
}

.admin-dropdown__trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  font: inherit;
  color: var(--muted);
  font-weight: 500;
  padding: 6px 4px;
  border-bottom: 2px solid transparent;
  cursor: pointer;
}

.admin-dropdown__trigger:hover,
.admin-dropdown__trigger.is-active {
  color: var(--text);
  border-bottom-color: var(--blue);
}

.admin-dropdown__chevron {
  transition: transform 0.15s ease;
}

.admin-dropdown.is-open .admin-dropdown__chevron {
  transform: rotate(180deg);
}

.admin-dropdown__menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  padding: 8px;
  background: rgba(20, 26, 38, 0.98);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
  z-index: 20;
}

.admin-dropdown.is-open .admin-dropdown__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.admin-dropdown__menu a {
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.admin-dropdown__menu a:hover,
.admin-dropdown__menu a.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.admin-nav__user {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.9rem;
  color: var(--muted);
}

.admin-main {
  max-width: 980px;
  margin: 0 auto;
  padding: 40px clamp(20px, 4vw, 56px) 80px;
}

.admin-main h1 {
  margin: 0 0 24px;
  font-size: 2rem;
  max-width: none;
  white-space: nowrap;
}

.admin-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
}

.admin-panel h2 {
  margin: 0 0 16px;
  font-size: 1.1rem;
}

.admin-panel__hint {
  font-size: 0.85rem;
  color: var(--muted);
  margin: -8px 0 16px;
  line-height: 1.5;
}

.admin-panel__hint code {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.85em;
}

.admin-link-rows {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-link-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.admin-link-row:last-child {
  border-bottom: none;
}

.admin-link-row label {
  margin-bottom: 0;
}

@media (max-width: 640px) {
  .admin-link-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.admin-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 12px;
}

.admin-form input[type="text"],
.admin-form input[type="number"],
.admin-form input[type="email"],
.admin-form select,
.admin-form textarea {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}

.admin-file {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-file__input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.admin-file__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  cursor: pointer;
  min-width: auto;
  padding: 10px 18px;
  font-size: 0.85rem;
}

.admin-file__input:focus-visible + .admin-file__button {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.admin-file__name {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1;
}

.admin-card-edit {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 4px;
}

.admin-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.admin-card-preview {
  text-align: left;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.admin-card-preview:hover {
  border-color: rgba(59, 108, 255, 0.5);
  background: rgba(59, 108, 255, 0.08);
}

.admin-card-preview__num {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.admin-card-preview__title {
  font-size: 1rem;
  font-weight: 600;
}

.admin-card-preview__text {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.4;
}

.admin-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 12, 0.7);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}

.admin-modal-overlay.is-open {
  display: flex;
}

.admin-modal {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-modal__head h3 {
  margin: 0;
  font-size: 1.1rem;
}

.admin-modal__close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.admin-modal__close:hover {
  color: var(--text);
}

.admin-modal label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--muted);
}

.admin-modal input[type="text"],
.admin-modal textarea {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}

.admin-search {
  margin-bottom: 16px;
}

.admin-search input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
}

.admin-search input:focus {
  outline: none;
  border-color: rgba(59, 108, 255, 0.5);
}

.admin-media-row {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.admin-media-col {
  display: flex;
  flex-direction: column;
  min-width: 200px;
}

.admin-media-label {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0 0 8px;
}

.admin-media-preview-wrap {
  display: flex;
  align-items: center;
  height: 64px;
  margin-bottom: 10px;
}

.admin-media-preview {
  display: block;
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 14px;
  margin: 0;
}

.admin-media-preview--small {
  width: 40px;
  height: 40px;
}

.admin-media-hint {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0 0 10px;
  min-height: 1.4em;
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-x: auto;
}

.admin-list__head {
  display: grid;
  grid-template-columns: 1.4fr 1.2fr 1.6fr 0.8fr 0.6fr 0.8fr;
  gap: 12px;
  padding: 0 12px 8px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.admin-list__head--users {
  grid-template-columns: 1fr 1.4fr 0.8fr 1fr 1fr;
}

.admin-list__row {
  display: grid;
  grid-template-columns: 1.4fr 1.2fr 1.6fr 0.8fr 0.6fr 0.8fr;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
}

.admin-list__row--users {
  grid-template-columns: 1fr 1.4fr 0.8fr 1fr 1fr;
}

.admin-user-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.admin-user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge--steam {
  background: linear-gradient(135deg, #1b2838, #2a475e);
  color: #ffffff;
}

.admin-inline-form {
  display: contents;
}

.admin-inline-form input,
.admin-inline-form select {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
  color: var(--text);
  font-size: 0.85rem;
}

.button--danger {
  background: transparent;
  border: 1px solid rgba(230, 69, 69, 0.5);
  color: #ffb4b4;
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 0.85rem;
}

.button--danger:hover {
  background: rgba(230, 69, 69, 0.15);
}

button.button {
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
}

.admin-inline-form .button,
.admin-list__row .button {
  min-width: auto;
  padding: 8px 16px;
  font-size: 0.85rem;
}

@media (max-width: 720px) {
  .admin-list__head {
    display: none;
  }

  .admin-list__row,
  .admin-list__row--users {
    grid-template-columns: 1fr;
  }
}

/* ---------- Market ---------- */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.market-body {
  padding-top: 100px;
}

.market-hero {
  padding: 40px clamp(20px, 4vw, 56px) 12px;
}

.market-hero__inner {
  max-width: 760px;
}

.market-hero h1 {
  max-width: none;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
}

.market-hero__text {
  margin-top: 18px;
  color: var(--muted);
  line-height: 1.75;
  max-width: 640px;
}

.market-main {
  padding: 24px clamp(20px, 4vw, 56px) 80px;
}

.market-toolbar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 22px;
}

.market-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.market-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(15, 20, 30, 0.65);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.92rem;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.market-tab span {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.75rem;
  color: var(--text);
}

.market-tab:hover,
.market-tab.is-active,
.nav__links a.is-active {
  color: var(--text);
  border-color: rgba(91, 126, 255, 0.45);
  background: linear-gradient(135deg, rgba(59, 108, 255, 0.22), rgba(23, 48, 138, 0.4));
}

.market-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.market-search {
  flex: 1 1 280px;
}

.market-search input,
.market-sort .custom-select__trigger {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid rgba(140, 160, 200, 0.28);
  background: rgba(42, 52, 74, 0.95);
  color: var(--text);
  font: inherit;
}

.market-search input::placeholder {
  color: rgba(170, 180, 198, 0.7);
}

.market-sort {
  flex: 0 1 220px;
}

.market-search__btn {
  min-width: 140px;
  padding: 12px 22px;
}

.market-meta {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.95rem;
}

.market-meta strong {
  color: var(--text);
}

.market-empty {
  padding: 56px 28px;
  text-align: center;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.market-empty h2 {
  margin-bottom: 10px;
}

.market-empty p {
  color: var(--muted);
  margin-bottom: 22px;
}

.market-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.lot-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lot-card__tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(59, 108, 255, 0.18);
  color: #c9d6ff;
}

.lot-card__tag--muted {
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}

.lot-card__tag--status {
  background: rgba(230, 69, 69, 0.2);
  color: #ffb4b4;
}

.lot-card--link {
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.lot-card--link:hover {
  transform: translateY(-4px);
  border-color: rgba(91, 126, 255, 0.4);
}

.lot-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.market-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.lot-page,
.lot-form-page,
.profile-page {
  padding: 24px clamp(20px, 4vw, 56px) 40px;
  max-width: 1100px;
  margin: 0 auto;
}

.lot-page__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.lot-page__back {
  margin: 0;
}

.lot-page__back a {
  color: var(--muted);
  font-weight: 500;
}

.lot-page__back a:hover {
  color: var(--text);
}

.lot-page__edit {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.lot-page__edit:hover {
  color: var(--text);
  border-bottom-color: rgba(255, 255, 255, 0.35);
}

.lot-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 28px;
  align-items: start;
}

.lot-detail__media {
  border-radius: 28px;
  overflow: hidden;
  min-height: 320px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
}

.lot-detail__media img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
}

.lot-detail__placeholder {
  color: rgba(232, 237, 247, 0.7);
  font-weight: 600;
  padding: 40px;
}

.lot-detail__body h1 {
  margin-top: 14px;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  max-width: none;
  line-height: 1.15;
}

.lot-detail__price {
  margin-top: 14px;
  font-size: 1.6rem;
  font-weight: 800;
}

.lot-detail__seller {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.lot-detail__seller img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
}

.lot-detail__seller strong {
  display: block;
}

.lot-detail__seller span {
  color: var(--muted);
  font-size: 0.85rem;
}

.lot-detail__desc {
  margin-top: 20px;
  color: var(--muted);
  line-height: 1.8;
}

.lot-detail__actions,
.lot-detail__order {
  margin-top: 28px;
}

.lot-detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.lot-detail__order h2 {
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.lot-form-page h1 {
  max-width: none;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.lot-form--panel {
  margin-top: 24px;
  padding: 28px;
  border-radius: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  max-width: 720px;
}

.lot-form-page .form-error,
.lot-form-page .form-success {
  max-width: 720px;
  box-sizing: border-box;
}

.lot-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  font-weight: 600;
}

.lot-form input[type="text"],
.lot-form input[type="number"],
.lot-form input[type="file"],
.lot-form select,
.lot-form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
}

.lot-form textarea {
  resize: vertical;
  min-height: 120px;
}

.lot-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field-hint {
  font-weight: 500;
  color: var(--muted);
  font-size: 0.85rem;
}

.lot-form__preview {
  margin-bottom: 16px;
}

.lot-form__preview img {
  max-width: 220px;
  border-radius: 16px;
  border: 1px solid var(--line);
}

.lot-quick-status {
  margin: 18px 0 8px;
}

.lot-quick-status__form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.lot-delete-form {
  margin-top: 28px;
  max-width: 720px;
  box-sizing: border-box;
}

.lot-delete-form .button {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.my-lots-page__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.my-section {
  margin-top: 36px;
}

.my-section h2 {
  font-size: 1.35rem;
  margin-bottom: 16px;
}

.muted {
  color: var(--muted);
}

.admin-list__row--lots {
  grid-template-columns: minmax(0, 2.2fr) 110px 100px 120px;
  gap: 12px;
  align-items: center;
}

.admin-list__row--lots .muted {
  display: block;
  font-size: 0.8rem;
  margin-top: 4px;
}

.my-lots-list__row {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) 110px 120px 120px;
  gap: 12px;
  align-items: center;
}

.admin-list__head.my-lots-list__row {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) 110px 120px 120px;
  align-items: center;
}

.admin-list__head.my-lots-list__row > span:nth-child(2),
.admin-list__head.my-lots-list__row > span:nth-child(3) {
  text-align: center;
}

.my-lots-list__title {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  color: inherit;
}

.my-lots-list__title strong {
  color: var(--text);
  transition: color 0.15s ease;
}

.my-lots-list__title:hover strong {
  color: #c9d6ff;
}

.my-lots-list__title .muted {
  display: block;
  font-size: 0.8rem;
}

.my-lots-list__price,
.my-lots-list__status {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: inherit;
  align-self: center;
}

.my-lots-list__status .badge {
  justify-content: center;
}

.badge--lot-active {
  background: rgba(111, 227, 176, 0.16);
  color: #8ef0c0;
}

.badge--lot-sold {
  background: rgba(59, 108, 255, 0.18);
  color: #c9d6ff;
}

.badge--lot-hidden {
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.admin-list__row--admin-lots {
  grid-template-columns: minmax(0, 2fr) 120px 100px 100px minmax(180px, 1fr);
  gap: 12px;
  align-items: center;
}

.admin-lot-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-search--filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.admin-search--filters input {
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.orders-list {
  display: grid;
  gap: 14px;
}

.order-card {
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.order-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.order-card__meta {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.88rem;
}

.order-card__msg {
  margin-top: 12px;
  color: var(--text);
  line-height: 1.6;
}

.order-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.profile-page {
  max-width: 720px;
}

.profile-card {
  padding: 28px;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.profile-card__head {
  display: flex;
  gap: 18px;
  align-items: center;
}

.profile-card__avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
}

.profile-card__avatar--placeholder {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--red), var(--blue));
  font-weight: 800;
  font-size: 1.4rem;
}

.profile-card h1 {
  max-width: none;
  font-size: 1.8rem;
  margin: 0;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 28px 0;
}

.profile-stats div {
  text-align: center;
  padding: 16px 10px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.profile-stats strong {
  display: block;
  font-size: 1.4rem;
}

.profile-stats span {
  color: var(--muted);
  font-size: 0.82rem;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.profile-actions .button {
  min-width: 0;
}

@media (max-width: 980px) {
  .market-grid {
    grid-template-columns: 1fr;
  }

  .lot-detail,
  .lot-form__row,
  .profile-stats {
    grid-template-columns: 1fr;
  }

  .admin-list__row--lots,
  .admin-list__row--admin-lots,
  .my-lots-list__row {
    grid-template-columns: 1fr;
  }

  .admin-list__head.my-lots-list__row > span:nth-child(2),
  .admin-list__head.my-lots-list__row > span:nth-child(3),
  .my-lots-list__price,
  .my-lots-list__status {
    justify-content: flex-start;
    text-align: left;
  }
}

@media (max-width: 640px) {
  .market-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .market-sort,
  .market-search__btn {
    width: 100%;
  }
}

/* ---------- Custom select & file ---------- */

.custom-select {
  position: relative;
  width: 100%;
}

.custom-select--compact {
  min-width: 200px;
  width: auto;
}

.custom-select__trigger {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid rgba(140, 160, 200, 0.28);
  background: rgba(42, 52, 74, 0.95);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.lot-form .custom-select__trigger {
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  padding: 12px 14px;
  min-height: auto;
}

.lot-form .custom-select__trigger:hover,
.lot-form .custom-select.is-open .custom-select__trigger {
  border-color: rgba(91, 126, 255, 0.5);
  background: rgba(255, 255, 255, 0.06);
}

.lot-form .custom-select__chevron {
  color: var(--muted);
}

.lot-form .custom-select__menu {
  background: #1a2233;
  border-color: rgba(91, 126, 255, 0.35);
}

.custom-select__trigger:hover,
.custom-select.is-open .custom-select__trigger {
  border-color: rgba(120, 155, 255, 0.7);
  background: rgba(58, 74, 108, 0.98);
}

.custom-select__value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

.custom-select__chevron {
  flex-shrink: 0;
  color: #c5d0e6;
  transition: transform 0.15s ease;
}

.custom-select.is-open .custom-select__chevron {
  transform: rotate(180deg);
}

.custom-select__menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 8px;
  list-style: none;
  border-radius: 16px;
  border: 1px solid rgba(120, 155, 255, 0.45);
  background: #2a364f;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
  max-height: 260px;
  overflow: auto;
}

.custom-select--compact .custom-select__menu {
  min-width: 100%;
}

.custom-select__option {
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text);
  cursor: pointer;
  font-weight: 500;
  transition: background 0.12s ease, color 0.12s ease;
}

.custom-select__option:hover {
  background: rgba(91, 140, 255, 0.35);
}

.custom-select__option.is-selected {
  background: linear-gradient(135deg, rgba(91, 140, 255, 0.55), rgba(45, 80, 180, 0.7));
  color: #ffffff;
}

.custom-file {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.custom-file__input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.custom-file__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(91, 126, 255, 0.35);
  background: linear-gradient(135deg, rgba(59, 108, 255, 0.24), rgba(23, 48, 138, 0.55));
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.custom-file__button:hover {
  transform: translateY(-1px);
  border-color: rgba(91, 126, 255, 0.6);
}

.custom-file__name {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  word-break: break-all;
}

.custom-file.has-file .custom-file__name {
  color: var(--text);
}

.market-sort .custom-select__trigger,
.admin-search--filters .custom-select__trigger {
  min-height: 48px;
  background: rgba(42, 52, 74, 0.95);
}

.admin-search--filters .custom-select {
  flex: 0 1 220px;
}

.admin-search--filters .custom-select__menu {
  z-index: 50;
}

/* ---------- Chats & payments ---------- */

.nav__chats {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
  margin-right: 4px;
}

.nav__chats:hover {
  color: var(--text);
}

.lot-detail__fee {
  margin-top: 8px;
  font-size: 0.9rem;
}

.lot-detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
  align-items: center;
}

.lot-detail__actions form {
  margin: 0;
}

.lot-detail__actions .button {
  min-width: 0;
}

.lot-chat {
  margin-top: 36px;
  max-width: 1100px;
}

.lot-chat__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.lot-chat__head h2 {
  font-size: 1.35rem;
  margin: 0;
}

.lot-chat__head a {
  color: var(--muted);
  font-size: 0.9rem;
}

.lot-chat__head a:hover {
  color: var(--text);
}

.chat-page {
  flex: 1 0 auto;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 24px clamp(20px, 4vw, 56px) 40px;
  box-sizing: border-box;
}

.chat-page__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.chat-page__head h1 {
  max-width: none;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 8px 0 6px;
}

.chat-page__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-start;
}

.chat-page__actions form {
  margin: 0;
}

.chat-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 480px;
}

.chat-panel--lot {
  min-height: 320px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 520px;
}

.chat-messages__empty {
  margin: auto;
  text-align: center;
}

.chat-bubble {
  max-width: min(80%, 520px);
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  align-self: flex-start;
}

.chat-bubble.is-mine {
  align-self: flex-end;
  background: rgba(59, 108, 255, 0.18);
  border-color: rgba(91, 126, 255, 0.35);
}

.chat-bubble__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  font-size: 0.78rem;
  color: var(--muted);
}

.chat-bubble p {
  margin: 0;
  line-height: 1.55;
  color: var(--text);
}

.chat-compose {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 16px;
  border-top: 1px solid var(--line);
  align-items: end;
}

.chat-compose textarea {
  width: 100%;
  min-height: 52px;
  resize: vertical;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
}

.chat-compose .button {
  min-width: 0;
  padding: 12px 20px;
}

.chats-list {
  display: grid;
  gap: 10px;
  max-width: 820px;
}

.chat-list-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.chat-list-item:hover {
  border-color: rgba(91, 126, 255, 0.4);
  transform: translateY(-1px);
}

.chat-list-item__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.chat-list-item__avatar--placeholder {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--red), var(--blue));
  font-weight: 800;
}

.chat-list-item__top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 2px;
}

.chat-list-item__top span {
  color: var(--muted);
  font-size: 0.8rem;
  white-space: nowrap;
}

.chat-list-item__lot {
  margin: 0;
  font-size: 0.85rem;
  color: #c9d6ff;
}

.chat-list-item__preview {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-list-item__badge {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--red);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
}

.payment-card {
  margin-top: 20px;
  max-width: 560px;
  padding: 24px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.payment-card__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.payment-card__row strong {
  color: var(--text);
}

.payment-card__row--total {
  border-bottom: none;
  padding-top: 16px;
  font-size: 1.05rem;
}

.payment-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.payment-card__actions form {
  margin: 0;
}

.payment-card__actions .button {
  min-width: 0;
}

@media (max-width: 640px) {
  .chat-compose {
    grid-template-columns: 1fr;
  }
}
