:root {
  --cn-ink: #10243e;
  --cn-muted: #66758a;
  --cn-surface: #fff;
  --cn-canvas: #f3f6f9;
  --cn-line: #dfe5ec;
  --cn-primary: #1667d9;
  --cn-primary-dark: #0f4fae;
  --cn-success: #16835f;
  --cn-radius-sm: 8px;
  --cn-radius: 14px;
  --cn-radius-lg: 20px;
  --cn-btn-radius: 10px;
  --cn-shadow: 0 12px 32px rgba(16, 36, 62, 0.08);
}

/* Public content pages */
.public-layout {
  max-width: 980px;
}

.public-page {
  margin: 10px auto 32px;
  max-width: 900px;
}

.public-page__header {
  margin: 0 auto 24px;
  max-width: 720px;
  text-align: center;
}

.public-page__eyebrow {
  color: var(--cn-primary);
  display: inline-block;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.public-page__header h1,
.public-page__card h1 {
  color: var(--cn-ink);
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin: 0 0 12px;
}

.public-page__header p {
  color: var(--cn-muted);
  font-size: 17px;
  margin: 0;
}

.public-page__card {
  background: var(--cn-surface);
  border: 1px solid var(--cn-line);
  border-radius: var(--cn-radius-lg);
  box-shadow: var(--cn-shadow);
  padding: clamp(24px, 5vw, 46px);
}

.content-page__body {
  max-width: 860px;
}

.content-page__prose {
  color: #34465d;
  font-size: 16px;
  line-height: 1.75;
}

.content-page__prose h2,
.content-page__prose h3 {
  color: var(--cn-ink);
  font-weight: 750;
  letter-spacing: -0.02em;
  margin: 1.6em 0 0.55em;
}

.content-page__prose h2 {
  font-size: 1.35em;
}

.content-page__prose h3 {
  font-size: 1.12em;
  margin-top: 1.25em;
}

.content-page__prose p {
  margin: 0 0 1em;
}

.content-page__prose .content-lead {
  color: var(--cn-ink);
  font-size: 1.08em;
  margin-bottom: 1.25em;
}

.content-page__prose ul,
.content-page__prose ol {
  margin: 0 0 1.15em;
  padding-left: 1.2em;
}

.content-page__prose li {
  margin: 0.35em 0;
}

.content-page__prose li + li {
  margin-top: 0.45em;
}

.content-page__prose .content-steps {
  list-style: none;
  margin: 0 0 1.35em;
  padding: 0;
}

.content-page__prose .content-steps > li {
  background: #f7f9fc;
  border: 1px solid var(--cn-line);
  border-radius: var(--cn-radius-sm);
  counter-increment: step;
  margin: 0 0 0.7em;
  padding: 14px 16px 14px 54px;
  position: relative;
}

.content-page__prose .content-steps {
  counter-reset: step;
}

.content-page__prose .content-steps > li::before {
  align-items: center;
  background: var(--cn-primary);
  border-radius: 999px;
  color: #fff;
  content: counter(step, decimal-leading-zero);
  display: flex;
  font-size: 12px;
  font-weight: 750;
  height: 28px;
  justify-content: center;
  left: 14px;
  letter-spacing: 0.02em;
  position: absolute;
  top: 14px;
  width: 28px;
}

.content-page__prose .content-steps strong {
  color: var(--cn-ink);
  display: block;
  margin-bottom: 0.2em;
}

.content-page__prose .content-steps span {
  color: var(--cn-muted);
  display: block;
  font-size: 0.96em;
  line-height: 1.55;
}

.content-page__prose .content-note {
  background: #eef5ff;
  border: 1px solid #c9ddf8;
  border-radius: var(--cn-radius-sm);
  color: #234066;
  margin: 0 0 1.25em;
  padding: 14px 16px;
}

.content-page__prose .content-note--warn {
  background: #fff7ed;
  border-color: #f0d2a8;
  color: #6a4514;
}

.content-page__prose .content-note strong {
  display: inline;
}

.content-page__prose img {
  height: auto;
  max-width: 100%;
}

/* Contact */
.contact-card {
  margin: 0 auto;
  max-width: 780px;
}

.contact-card h2,
.contact-success h2 {
  color: var(--cn-ink);
  font-size: 24px;
  font-weight: 750;
  margin: 0 0 22px;
}

.contact-form__grid {
  display: grid;
  gap: 0 20px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.contact-form .form-group,
.auth-panel .form-group {
  margin-bottom: 18px;
}

.contact-form label,
.auth-panel label {
  color: var(--cn-ink);
  font-size: 14px;
  font-weight: 650;
}

.contact-form .form-control,
.auth-panel .form-control,
.comment-compose .form-control,
.seller-profile .form-control {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  box-shadow: none;
  color: var(--cn-ink);
  min-height: 46px;
  padding: 10px 13px;
}

.contact-form textarea.form-control,
.comment-compose textarea.form-control,
.seller-profile textarea.form-control {
  min-height: 110px;
  resize: vertical;
}

.contact-form .form-control:focus,
.auth-panel .form-control:focus,
.comment-compose .form-control:focus,
.seller-profile .form-control:focus {
  border-color: var(--cn-primary);
  box-shadow: 0 0 0 3px rgba(22, 103, 217, 0.14);
}

.contact-form__footer {
  align-items: center;
  border-top: 1px solid var(--cn-line);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-top: 22px;
  padding-top: 22px;
}

.contact-form__footer p {
  color: var(--cn-muted);
  font-size: 12px;
  margin: 0;
  max-width: 430px;
}

.contact-success {
  margin: 0 auto;
  max-width: 620px;
  text-align: center;
}

.contact-success__icon {
  align-items: center;
  background: #e8f7f1;
  border-radius: 50%;
  color: var(--cn-success);
  display: inline-flex;
  font-size: 28px;
  height: 64px;
  justify-content: center;
  margin-bottom: 18px;
  width: 64px;
}

/* Error page */
.site-error {
  max-width: 720px;
}

.error-card {
  overflow: hidden;
  position: relative;
}

.error-card__code {
  color: #edf2f7;
  font-size: clamp(120px, 25vw, 220px);
  font-weight: 900;
  line-height: 0.8;
  pointer-events: none;
  position: absolute;
  right: -18px;
  top: 16px;
  z-index: 0;
}

.error-card > *:not(.error-card__code) {
  position: relative;
  z-index: 1;
}

.error-card__message {
  color: var(--cn-muted);
  font-size: 17px;
  max-width: 500px;
}

.error-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

/* Shared public modals */
.public-modal .modal-content {
  border: 0;
  border-radius: var(--cn-radius-lg);
  box-shadow: 0 24px 70px rgba(16, 36, 62, 0.25);
  overflow: hidden;
}

.public-modal .modal-header {
  align-items: center;
  border-bottom: 1px solid var(--cn-line);
  padding: 20px 24px;
}

.public-modal .modal-title {
  color: var(--cn-ink);
  font-size: 22px;
  font-weight: 750;
  margin: 0;
}

.public-modal .modal-header .close {
  align-items: center;
  background: var(--cn-canvas);
  border-radius: 50%;
  display: inline-flex;
  height: 38px;
  justify-content: center;
  margin: -5px -5px -5px auto;
  opacity: 1;
  padding: 0;
  width: 38px;
}

.public-modal .modal-body {
  padding: 24px;
}

/* Authentication */
.auth-modal .modal-dialog {
  max-width: 520px;
}

.auth-modal .modal-body {
  padding-top: 0;
}

.auth-tabs {
  border-bottom: 1px solid var(--cn-line);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 -24px 24px;
  padding: 0 18px;
}

.auth-tabs .nav-link {
  border: 0;
  border-bottom: 3px solid transparent;
  color: var(--cn-muted);
  font-size: 13px;
  font-weight: 650;
  padding: 16px 6px 13px;
  text-align: center;
}

.auth-tabs .nav-link.active {
  border-bottom-color: var(--cn-primary);
  color: var(--cn-ink);
}

.auth-submit {
  border-radius: 10px;
  margin-top: 20px;
  min-height: 46px;
  width: 100%;
}

.auth-help {
  color: var(--cn-muted);
  font-size: 13px;
}

.social-login-wrap {
  border-top: 1px solid var(--cn-line);
  margin-top: 24px;
  padding-top: 20px;
  text-align: center;
}

.social-login-title {
  color: var(--cn-muted);
  font-size: 13px;
}

.social-icon-login {
  align-items: center;
  background: var(--cn-primary);
  border-radius: 10px;
  display: inline-flex;
  height: 44px;
  justify-content: center;
  width: 52px;
}

.social-icon-login img {
  height: 28px;
  width: 28px;
}

/* Region and city pickers */
.location-modal__hint {
  color: var(--cn-muted);
  margin: 0 0 20px;
}

.region-list,
.modal-city-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.region-list {
  column-count: 3;
  column-gap: 24px;
}

.region-list li {
  break-inside: avoid;
  margin-bottom: 5px;
}

.region-list a,
.modal-city-list a {
  border-radius: 7px;
  color: var(--cn-ink);
  display: block;
  padding: 8px 10px;
}

.region-list a:hover,
.region-list a:focus,
.modal-city-list a:hover,
.modal-city-list a:focus {
  background: #eef5ff;
  color: var(--cn-primary);
  text-decoration: none;
}

.city-groups {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.city-group {
  min-width: 0;
}

.modal-region-title {
  border-bottom: 1px solid var(--cn-line);
  color: var(--cn-muted);
  font-size: 13px;
  font-weight: 750;
  margin: 0 0 6px;
  padding: 0 10px 8px;
  text-transform: uppercase;
}

/* Seller modal and comments */
.seller-profile {
  padding: 6px;
}

.seller-profile .avatar-card {
  border: 1px solid var(--cn-line);
  border-radius: var(--cn-radius);
  box-shadow: none;
  overflow: hidden;
}

.seller-profile .avatar-card .title {
  color: var(--cn-ink);
  font-size: 18px;
  font-weight: 750;
}

.seller-card {
  border: 1px solid var(--cn-line);
  border-radius: var(--cn-radius);
  box-shadow: none !important;
  margin: 0;
}

.seller-card > .card-header {
  background: #fff !important;
  border-bottom: 1px solid var(--cn-line);
  box-shadow: none !important;
  margin: 0 !important;
  padding: 0 18px !important;
}

.seller-card .nav-link {
  background: transparent !important;
  border: 0;
  border-bottom: 3px solid transparent;
  color: var(--cn-muted) !important;
  font-size: 13px !important;
  letter-spacing: normal !important;
  padding: 15px 10px !important;
  text-transform: none !important;
}

.seller-card .nav-link.active {
  border-bottom-color: var(--cn-primary);
  color: var(--cn-ink) !important;
}

.seller-card .desc {
  list-style: none;
  margin: 0;
  padding: 0;
}

.seller-card .desc > li {
  border-bottom: 1px solid var(--cn-line);
  padding: 12px 0;
}

.seller-card .desc > li:last-child {
  border-bottom: 0;
}

.seller-card .seller-phone-button {
  background: none;
  border: 0;
  color: var(--cn-primary);
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.comment-compose {
  background: #f7f9fb;
  border: 1px solid var(--cn-line);
  border-radius: 14px;
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
  padding: 16px;
}

.comment-compose .form-control,
.comment-compose textarea.form-control {
  background: #fff;
  border: 1px solid #d5e0ec;
  border-radius: 10px;
  box-shadow: none;
  font-size: 14px;
  min-height: 96px;
  padding: 12px 14px;
  resize: vertical;
}

.comment-compose .form-control:focus,
.comment-compose textarea.form-control:focus {
  border-color: #9ebbe2;
  box-shadow: 0 0 0 3px rgba(22, 103, 217, 0.12);
}

.comments-wrap .comment-list,
#seller-comments-wrap .comment-list {
  background: transparent;
  border: 0;
}

.comments-wrap .comment-item,
#seller-comments-wrap .comment-item {
  border-top: 1px solid var(--cn-line);
  padding: 16px 0;
}

.comments-wrap .comment-item:first-of-type,
#seller-comments-wrap .comment-item:first-of-type {
  border-top: 0;
  padding-top: 8px;
}

/* Related listing cards */
.related-listings {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.related-listing {
  background: #fff;
  border: 1px solid var(--cn-line);
  border-radius: var(--cn-radius);
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
  min-width: 0;
  padding: 16px;
}

.related-listing__plate {
  align-items: center;
  background: var(--cn-canvas);
  border-radius: 10px;
  display: flex;
  justify-content: center;
  min-height: 90px;
  padding: 12px;
}

.related-listing__plate .img-nomer {
  height: auto;
  margin: 0;
  max-width: 100%;
}

.related-listing__content {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.related-listing__price {
  color: var(--cn-ink);
  font-size: 20px;
  font-weight: 800;
  white-space: nowrap;
}

.related-listing__meta {
  color: var(--cn-muted);
  display: flex;
  flex-direction: column;
  font-size: 12px;
  margin: 5px 0 12px;
}

.related-listing__photo {
  color: var(--cn-success);
}

.related-listing__link {
  font-size: 13px;
  font-weight: 700;
  margin-top: auto;
}

/* Seller page */
.seller-page {
  display: grid;
  gap: 18px;
}

.seller-hero {
  background:
    radial-gradient(circle at top right, rgba(22, 103, 217, 0.12), transparent 38%),
    linear-gradient(180deg, #fff 0%, #f7f9fb 100%);
  border: 1px solid var(--cn-line);
  border-radius: var(--cn-radius-lg);
  padding: 18px 20px;
}

.seller-hero__identity {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: 72px minmax(0, 1fr);
}

.seller-hero__avatar {
  border-radius: 50%;
  height: 72px;
  object-fit: cover;
  width: 72px;
}

.seller-hero__main {
  min-width: 0;
}

.seller-hero__eyebrow {
  color: var(--cn-muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.06em;
  margin: 0 0 4px;
  text-transform: uppercase;
}

.seller-hero h1,
.standalone-page .seller-page .seller-hero h1 {
  color: var(--cn-ink);
  font-family: inherit;
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 850;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 0 0 6px;
  text-transform: none;
}

.seller-hero__about {
  color: var(--cn-muted);
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 10px;
  max-width: 56ch;
}

.seller-hero__stats {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.seller-hero__stats li {
  align-items: baseline;
  background: #fff;
  border: 1px solid var(--cn-line);
  border-radius: 999px;
  display: inline-flex;
  gap: 6px;
  padding: 6px 12px;
  white-space: nowrap;
}

.seller-hero__stats strong {
  color: var(--cn-ink);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.seller-hero__stats span {
  color: var(--cn-muted);
  font-size: 13px;
}

.seller-actions {
  align-items: stretch;
  background: var(--cn-surface);
  border: 1px solid var(--cn-line);
  border-radius: var(--cn-radius);
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 16px;
}

.seller-actions .btn,
.seller-page .seller-actions .btn {
  align-items: center;
  border-radius: var(--cn-btn-radius);
  display: inline-flex;
  font-family: inherit;
  font-size: 15px;
  font-weight: 750;
  gap: 8px;
  justify-content: center;
  letter-spacing: normal;
  min-height: 46px;
  text-transform: none;
  width: 100%;
}

.seller-actions__note {
  align-items: center;
  color: var(--cn-muted);
  display: flex;
  font-size: 14px;
  justify-content: center;
  margin: 0;
}

.seller-page .seller-actions .seller-actions__phone .seller-phone-button.btn,
.seller-page .seller-actions .seller-actions__phone a.seller-phone-button.btn.is-phone-revealed {
  background: var(--cn-primary);
  border: 1px solid var(--cn-primary);
  box-shadow: none;
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 750;
  letter-spacing: normal;
  line-height: 1.2;
  margin: 0;
  text-decoration: none;
  text-transform: none;
}

.seller-page .seller-actions .seller-actions__phone .seller-phone-button.btn:hover,
.seller-page .seller-actions .seller-actions__phone .seller-phone-button.btn:focus,
.seller-page .seller-actions .seller-actions__phone a.seller-phone-button.btn.is-phone-revealed:hover,
.seller-page .seller-actions .seller-actions__phone a.seller-phone-button.btn.is-phone-revealed:focus {
  background: var(--cn-primary-dark);
  border-color: var(--cn-primary-dark);
  color: #fff;
  text-decoration: none;
}

.seller-page .seller-actions .seller-actions__phone a.seller-phone-button.btn.is-phone-revealed {
  align-items: center;
  display: inline-flex;
  justify-content: center;
}

.seller-page .seller-actions .seller-actions__phone a.seller-phone-button.btn.is-phone-revealed .prefix {
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.seller-reviews {
  background: var(--cn-surface);
  border: 1px solid var(--cn-line);
  border-radius: var(--cn-radius);
  padding: 22px;
  width: 100%;
}

.seller-reviews__head {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.seller-reviews__head h2 {
  color: var(--cn-ink);
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 4px;
}

.seller-reviews__head p {
  color: var(--cn-muted);
  font-size: 13px;
  margin: 0;
}

.seller-reviews__head .btn {
  border-radius: var(--cn-btn-radius);
  font-weight: 750;
  text-transform: none;
  white-space: nowrap;
}

.seller-comments {
  margin-top: 0;
}

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

.seller-modal-form .form-control {
  border: 1px solid var(--cn-line);
  border-radius: 10px;
  box-shadow: none;
  margin-bottom: 16px;
}

.seller-modal-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.seller-modal-form__actions .btn {
  border-radius: var(--cn-btn-radius);
  font-weight: 750;
  min-width: 120px;
  text-transform: none;
}

.seller-listings {
  background: var(--cn-surface);
  border: 1px solid var(--cn-line);
  border-radius: var(--cn-radius);
  padding: 22px;
}

.seller-listings__head {
  margin-bottom: 18px;
}

.seller-listings__head h2 {
  color: var(--cn-ink);
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 4px;
}

.seller-listings__head p {
  color: var(--cn-muted);
  font-size: 13px;
  margin: 0;
}

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

.seller-listing-card {
  background: #f7f9fb;
  border: 1px solid var(--cn-line);
  border-radius: 12px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.seller-listing-card__plate {
  align-items: center;
  background: #fff;
  border-radius: 10px;
  display: flex;
  justify-content: center;
  min-height: 88px;
  padding: 10px;
}

.seller-listing-card__price {
  color: var(--cn-ink);
  font-size: 18px;
  font-weight: 800;
}

.seller-listing-card__meta {
  color: var(--cn-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  gap: 8px;
  margin: 4px 0 10px;
}

.seller-listing-card__link {
  font-size: 13px;
  font-weight: 700;
}

.standalone-page .seller-page {
  max-width: 1100px;
}

/* Keep legacy panel helpers used in older seller fragments */
.seller-panel__label {
  color: var(--cn-muted);
  display: block;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

/* Footer */
.public-footer .footer-nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
}

@media (max-width: 767px) {
  .public-page {
    margin-top: 0;
  }

  .public-page__card {
    border-radius: var(--cn-radius);
    padding: 22px 18px;
  }

  .contact-form__grid,
  .city-groups,
  .related-listings {
    grid-template-columns: 1fr;
  }

  .contact-form__footer {
    align-items: stretch;
    flex-direction: column;
  }

  .contact-form__footer .btn {
    width: 100%;
  }

  .region-list {
    column-count: 2;
  }

  .auth-tabs {
    display: flex;
    overflow-x: auto;
    padding: 0 12px;
  }

  .auth-tabs .nav-item {
    flex: 0 0 auto;
  }

  .auth-tabs .nav-link {
    padding-left: 12px;
    padding-right: 12px;
    white-space: nowrap;
  }

  .seller-profile > .row > [class*="col-"] + [class*="col-"] {
    margin-top: 16px;
  }

  .seller-hero,
  .seller-hero__identity,
  .seller-actions,
  .seller-listings__grid {
    grid-template-columns: 1fr;
  }

  .seller-hero__stats {
    flex-wrap: wrap;
  }

  .seller-reviews__head {
    align-items: stretch;
    flex-direction: column;
  }

  .seller-reviews__head .btn {
    width: 100%;
  }

  .related-listing {
    grid-template-columns: 1fr;
  }

  .public-footer .footer-nav {
    align-items: flex-start;
    flex-direction: column;
    width: 100%;
  }
}

@media (max-width: 420px) {
  .region-list {
    column-count: 1;
  }

  .related-listing {
    grid-template-columns: 1fr;
  }
}
