/* The Connection Post — design tokens + Bootstrap 5 overrides
 * Token values come from DEV_Notes/design/design_handoff_connection_post_ui/README.md
 * Class names are preserved so existing templates keep rendering.
 * Fonts (Plus Jakarta Sans + Inter) are loaded via <link> in base.html. */

/* --- Tokens --- */
:root {
  /* Primary brand */
  --cp-blue:        #1E5A96;
  --cp-blue-deep:   #164472;
  --cp-blue-tint:   #E8F1FB;

  /* Channel — Services (sage) */
  --cp-sage:        #3F6A5B;
  --cp-sage-tint:   #E4EFE9;

  /* Channel — Items (teal) */
  --cp-teal:        #3A8FA8;
  --cp-teal-tint:   #DCEDF2;

  /* Status / utility */
  --cp-amber:       #F4A93C;
  --cp-red:         #DC3545;

  /* Neutrals */
  --cp-ink:         #1A2332;
  --cp-slate:       #5A6B7E;
  --cp-cool:        #9AA5B5;
  --cp-border:      #D6DCE4;
  --cp-hairline:    #E8ECF1;
  --cp-surface:     #F7F9FC;
  --cp-white:       #FFFFFF;

  /* Shadows */
  --cp-shadow-sm:   0 1px 3px rgba(26, 35, 50, 0.06);
  --cp-shadow-md:   0 2px 6px rgba(26, 35, 50, 0.08);
  --cp-shadow-lg:   0 8px 24px rgba(26, 35, 50, 0.10);

  /* Radii */
  --cp-radius-input: 10px;
  --cp-radius-card:  14px;
  --cp-radius-pill:  999px;

  /* Type families */
  --cp-font-display: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --cp-font-body:    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --cp-font-mono:    ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

/* --- Bootstrap variable overrides ---
 * Re-target Bootstrap's primary to our brand blue so every utility class
 * (.text-primary, .bg-primary, .border-primary, etc.) picks it up. */
:root,
[data-bs-theme="light"] {
  --bs-primary:        var(--cp-blue);
  --bs-primary-rgb:    30, 90, 150;
  --bs-link-color:     var(--cp-blue);
  --bs-link-color-rgb: 30, 90, 150;
  --bs-link-hover-color:     var(--cp-blue-deep);
  --bs-link-hover-color-rgb: 22, 68, 114;

  --bs-body-color:        var(--cp-ink);
  --bs-body-color-rgb:    26, 35, 50;
  --bs-secondary-color:   var(--cp-slate);
  --bs-secondary-color-rgb: 90, 107, 126;
  --bs-tertiary-color:    var(--cp-cool);
  --bs-tertiary-color-rgb: 154, 165, 181;

  --bs-border-color:           var(--cp-border);
  --bs-border-color-translucent: var(--cp-hairline);

  --bs-body-bg:               var(--cp-white);
  --bs-tertiary-bg:           var(--cp-surface);
  --bs-tertiary-bg-rgb:       247, 249, 252;

  --bs-font-sans-serif:       var(--cp-font-body);
  --bs-body-font-family:      var(--cp-font-body);
  --bs-body-font-size:        15px;
  --bs-body-line-height:      1.5;

  --bs-border-radius:         var(--cp-radius-input);
  --bs-border-radius-sm:      8px;
  --bs-border-radius-lg:      var(--cp-radius-card);
}

/* --- Base typography --- */
body {
  font-family: var(--cp-font-body);
  color: var(--cp-ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
  font-family: var(--cp-font-display);
  color: var(--cp-ink);
  letter-spacing: -0.005em;
}
h1, .h1, .display-5 { font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; }
h2, .h2 { font-weight: 700; line-height: 1.25; }
h3, .h3 { font-weight: 600; line-height: 1.3; }

a { text-underline-offset: 3px; }
a:hover { color: var(--cp-blue-deep); }

/* --- Brand wordmark in navbar --- */
.brand-logo { display: inline-block; }
.brand-text {
  font-family: var(--cp-font-display);
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--cp-ink);
}
.navbar-brand { font-size: 1.05rem; }

/* --- Buttons (preserve existing override pattern) --- */
.btn {
  --bs-btn-border-width: 1.5px;
  font-weight: 600;
  border-radius: var(--cp-radius-input);
}
.btn-primary {
  --bs-btn-bg: var(--cp-blue);
  --bs-btn-border-color: var(--cp-blue);
  --bs-btn-color: var(--cp-white);
  --bs-btn-hover-bg: var(--cp-blue-deep);
  --bs-btn-hover-border-color: var(--cp-blue-deep);
  --bs-btn-hover-color: var(--cp-white);
  --bs-btn-active-bg: var(--cp-blue-deep);
  --bs-btn-active-border-color: var(--cp-blue-deep);
}
.btn-outline-primary {
  --bs-btn-color: var(--cp-blue);
  --bs-btn-border-color: var(--cp-blue);
  --bs-btn-hover-bg: var(--cp-blue-tint);
  --bs-btn-hover-border-color: var(--cp-blue);
  --bs-btn-hover-color: var(--cp-blue);
}
.btn-lg { --bs-btn-padding-y: 0.875rem; --bs-btn-padding-x: 1.5rem; --bs-btn-font-size: 1rem; }

/* --- Form controls --- */
.form-control,
.form-select {
  border-color: var(--cp-border);
  border-width: 1.5px;
  border-radius: var(--cp-radius-input);
  font-family: var(--cp-font-body);
}
.form-control:focus,
.form-select:focus {
  border-color: var(--cp-blue);
  box-shadow: 0 0 0 3px rgba(30, 90, 150, 0.15);
}

/* --- Hero (homepage gradient banner) --- */
.hero {
  background: linear-gradient(180deg, var(--cp-blue-tint) 0%, transparent 100%);
  border-radius: var(--cp-radius-card);
  padding: 3rem 2rem;
}

/* --- Category cards (homepage three-channel block) --- */
.category-card {
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius-card);
  padding: 1.5rem;
  background: var(--cp-white);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: block;
  color: inherit;
  text-decoration: none;
  height: 100%;
}
.category-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--cp-shadow-lg);
  color: inherit;
}

/* --- Listing cards (browse + homepage feed) --- */
.listing-card {
  background: var(--cp-white);
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--cp-shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  color: inherit;
}
.listing-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--cp-shadow-md);
  color: inherit;
}
.listing-card-photo {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--cp-surface) center/cover no-repeat;
}
.listing-card-photo-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--cp-cool);
  font-size: 1.75rem;
}
.listing-card-pill {
  position: absolute;
  top: 10px;
  left: 10px;
  box-shadow: 0 1px 3px rgba(26, 35, 50, 0.18);
}
.listing-card-body {
  padding: 14px 16px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.listing-card-title {
  font-family: var(--cp-font-display);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.3;
  color: var(--cp-ink);
  margin: 0;
  /* clamp to 2 lines so tall titles don't push the foot row out of line */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.listing-card-meta {
  font-family: var(--cp-font-body);
  font-size: 13px;
  color: var(--cp-slate);
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 19px;        /* keep card height stable when location is missing */
}
.listing-card-meta > i { font-size: 13px; color: var(--cp-cool); }
.listing-card-foot {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 4px;
}
.listing-card-price {
  font-family: var(--cp-font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--cp-blue);
}
.listing-card-price-empty { display: inline-block; }
.listing-card-date {
  font-family: var(--cp-font-body);
  font-size: 12px;
  color: var(--cp-cool);
}

/* Backwards-compat: legacy class names are preserved by the old templates
 * (review.html etc.) — keep .photo-wrap → behaves like .listing-card-photo. */
.listing-card .photo-wrap {
  aspect-ratio: 16 / 10;
  background: var(--cp-surface) center/cover no-repeat;
  position: relative;
}
.listing-card .photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--cp-cool);
  font-size: 1.75rem;
}
.listing-card .body { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.listing-card .title { font-weight: 600; font-family: var(--cp-font-display); }
.listing-card .meta { font-size: 0.85rem; color: var(--cp-slate); }

/* --- Channel badges (Opportunity / Service / Item) ---
 * Color is driven by category slug. Templates use:
 *   <span class="badge-cat badge-cat-{{ slug }}">…</span>
 * Falls back to brand blue if slug isn't recognised. */
.badge-cat {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--cp-radius-pill);
  background: var(--cp-blue-tint);
  color: var(--cp-blue);
  font-family: var(--cp-font-body);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  font-size: 0.7rem;
}
.badge-cat-opportunity { background: var(--cp-blue-tint); color: var(--cp-blue); }
.badge-cat-service     { background: var(--cp-sage-tint); color: var(--cp-sage); }
.badge-cat-item        { background: var(--cp-teal-tint); color: var(--cp-teal); }

/* Some current templates render badges via Bootstrap's .text-bg-primary —
 * keep that aligned with our blue. */
.text-bg-primary {
  background-color: var(--cp-blue) !important;
  color: var(--cp-white) !important;
}

/* --- Gallery (listing detail) --- */
.gallery img {
  width: 100%;
  border-radius: var(--cp-radius-input);
  margin-bottom: 0.75rem;
  object-fit: cover;
}

/* --- Telegram Login Widget --- */
.tg-login-wrap iframe { max-width: 100%; }

/* --- Photo upload thumbnails on the listing form --- */
.photo-thumb img,
.photo-thumb-preview {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  width: 100%;
  border-radius: var(--cp-radius-input);
  border: 1px solid var(--cp-border);
}
.photo-remove-toggle { color: var(--cp-slate); cursor: pointer; }
.photo-remove-toggle input:checked + * { color: var(--cp-red); }
.photo-remove-toggle:has(input:checked) { color: var(--cp-red); }
.photo-thumb:has(input:checked) img { opacity: 0.4; outline: 2px solid var(--cp-red); }

/* --- Review page (Telegram-style preview) --- */
.review-card .review-photos { background: #0f172a; }
.review-card .review-photos img,
.review-card .review-photos .img-fluid {
  object-fit: cover;
  aspect-ratio: 4 / 3;
}
.review-card .review-photos .row { margin: 0; }
.review-card .review-photos .col-6,
.review-card .review-photos .col-12 { padding: 0; }

/* --- Surface utility (page section backgrounds) --- */
.bg-surface { background-color: var(--cp-surface) !important; }

/* =====================================================================
 * Top navigation
 * ===================================================================== */

.cp-topnav {
  height: 72px;
  background: var(--cp-white);
  border-bottom: 1px solid var(--cp-hairline);
  z-index: 1030;
}
.cp-brand { color: inherit; }
.cp-brand-img { height: 32px; width: auto; display: block; }

.cp-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--cp-font-body);
  font-weight: 600;
  font-size: 14px;
  color: var(--cp-slate);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.cp-nav-link:hover,
.cp-nav-link:focus { color: var(--cp-blue); }
.cp-nav-link.active {
  color: var(--cp-blue);
  border-bottom-color: var(--cp-blue);
}

.cp-avatar-btn {
  border: none;
  background: transparent;
  padding: 0 4px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.cp-avatar-btn::after { margin-left: 4px; color: var(--cp-slate); }
.cp-avatar-btn:focus { outline: 2px solid var(--cp-blue); outline-offset: 2px; border-radius: 999px; }

.cp-avatar-img,
.cp-avatar-initial {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.cp-avatar-img { object-fit: cover; }
.cp-avatar-initial {
  background: var(--cp-blue-tint);
  color: var(--cp-blue);
  font-family: var(--cp-font-body);
  font-weight: 700;
  font-size: 13px;
  line-height: 1;
}

.cp-hamburger {
  border: none;
  background: transparent;
  font-size: 1.6rem;
  color: var(--cp-ink);
  padding: 4px 8px;
  line-height: 1;
}
.cp-hamburger:focus {
  outline: 2px solid var(--cp-blue);
  outline-offset: 2px;
  border-radius: 6px;
}

.cp-mobile-nav {
  background: var(--cp-white);
  border-top: 1px solid var(--cp-hairline);
  box-shadow: var(--cp-shadow-sm);
}

/* On mobile, shrink the topnav to 56px and the logo to 28px to match
 * the polish design's MobileNav. */
@media (max-width: 991.98px) {
  .cp-topnav { height: 56px; }
  .cp-brand-img { height: 28px; }
}

/* =====================================================================
 * Footer (dark / ink surface)
 * ===================================================================== */

.cp-footer {
  background: var(--cp-ink);
  color: rgba(255, 255, 255, 0.7);
}
.cp-footer-brand { color: var(--cp-white); }
.cp-footer-icon { display: block; }
.cp-footer-wordmark { display: inline-flex; flex-direction: column; line-height: 1; }
.cp-footer-the {
  font-family: var(--cp-font-display);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.55);
}
.cp-footer-name {
  font-family: var(--cp-font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--cp-white);
  margin-top: 2px;
}
.cp-footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.15s ease;
}
.cp-footer-links a:hover,
.cp-footer-links a:focus { color: var(--cp-white); }
.cp-footer-copy { color: rgba(255, 255, 255, 0.55); }

/* =====================================================================
 * Auth surface (Login, Register) — full-bleed split panel.
 * Triggered by `body.cp-auth-page`; uses {% block body %} override so
 * the standard navbar and footer are not rendered.
 * ===================================================================== */

.cp-auth-page { background: var(--cp-surface); }

.cp-auth-split {
  flex: 1;
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* --- Left pitch panel (blue gradient) --- */
.cp-auth-pitch {
  position: relative;
  width: 46%;
  padding: 60px 56px;
  background: linear-gradient(180deg, var(--cp-blue) 0%, var(--cp-blue-deep) 100%);
  color: var(--cp-white);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.cp-auth-pitch-inner {
  position: relative;
  z-index: 1;
  max-width: 460px;
}
.cp-auth-pitch-brand { color: var(--cp-white); margin-bottom: 28px; }
.cp-auth-pitch-icon { display: block; }
.cp-auth-pitch-wordmark {
  display: inline-flex;
  flex-direction: column;
  line-height: 1;
}
.cp-auth-pitch-the {
  font-family: var(--cp-font-display);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.7);
}
.cp-auth-pitch-name {
  font-family: var(--cp-font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.02em;
  color: var(--cp-white);
  margin-top: 3px;
}
.cp-auth-pitch-h1 {
  font-family: var(--cp-font-display);
  font-weight: 700;
  font-size: 36px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--cp-white);
  margin: 0 0 16px;
}
.cp-auth-pitch-body {
  font-family: var(--cp-font-body);
  font-size: 17px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.85);
  max-width: 420px;
  margin: 0;
}
.cp-auth-trust {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  font-weight: 500;
}
.cp-auth-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.cp-auth-trust-item i { font-size: 16px; }

/* Decorative blobs in the pitch panel */
.cp-auth-blob {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.cp-auth-blob-1 {
  bottom: -100px;
  right: -100px;
  width: 360px;
  height: 360px;
  background: rgba(255, 255, 255, 0.06);
}
.cp-auth-blob-2 {
  top: -60px;
  right: 80px;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.04);
}

/* --- Right form panel --- */
.cp-auth-form-pane {
  flex: 1;
  padding: 60px 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cp-white);
}
.cp-auth-form-inner {
  width: 100%;
  max-width: 380px;
}
.cp-auth-h2 {
  font-family: var(--cp-font-display);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.25;
  color: var(--cp-ink);
  margin: 0 0 6px;
}
.cp-auth-sub {
  font-size: 15px;
  color: var(--cp-slate);
  margin: 0 0 28px;
}
.cp-auth-link {
  color: var(--cp-blue);
  font-weight: 600;
  text-decoration: none;
}
.cp-auth-link:hover { color: var(--cp-blue-deep); text-decoration: underline; }
.cp-auth-link-muted {
  color: var(--cp-slate);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cp-auth-link-muted:hover { color: var(--cp-blue); }

/* Telegram widget wrapper — center the iframe button it injects */
.tg-login-wrap {
  display: flex;
  justify-content: center;
  min-height: 50px;
}
.tg-login-wrap iframe { max-width: 100%; }

.cp-auth-fineprint {
  font-size: 12px;
  color: var(--cp-slate);
  text-align: center;
  line-height: 1.5;
  margin: 6px 0 0;
}
.cp-auth-terms {
  margin-top: 24px;
  color: var(--cp-cool);
}

/* "or" divider */
.cp-auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--cp-cool);
  font-size: 12px;
  font-weight: 500;
}
.cp-auth-divider::before,
.cp-auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--cp-hairline);
}

/* Form fields */
.cp-auth-fields { margin: 0; }
.cp-auth-label {
  display: block;
  font-family: var(--cp-font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--cp-ink);
  margin: 14px 0 8px;
}
.cp-auth-fields .cp-auth-label:first-of-type { margin-top: 0; }

.cp-auth-input {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 14px;
  border: 1.5px solid var(--cp-border);
  border-radius: var(--cp-radius-input);
  background: var(--cp-white);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.cp-auth-input:focus-within {
  border-color: var(--cp-blue);
  box-shadow: 0 0 0 3px rgba(30, 90, 150, 0.15);
}
.cp-auth-input > i { color: var(--cp-cool); font-size: 16px; flex-shrink: 0; }
.cp-auth-input .form-control {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0;
  height: 100%;
  font-size: 15px;
  color: var(--cp-ink);
  box-shadow: none !important;
}
.cp-auth-input .form-control:focus { outline: none; box-shadow: none; }
.cp-auth-input .form-control::placeholder { color: var(--cp-cool); }
.cp-auth-input .form-control.is-invalid {
  background-image: none;
  padding-right: 0;
}
.cp-auth-input:has(.form-control.is-invalid) {
  border-color: var(--cp-red);
}
.cp-auth-eye {
  border: none;
  background: transparent;
  padding: 4px;
  color: var(--cp-cool);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}
.cp-auth-eye:hover { color: var(--cp-ink); }
.cp-auth-error {
  font-size: 13px;
  color: var(--cp-red);
  margin-top: 6px;
}
.cp-auth-submit { margin-top: 18px; height: 52px; }

.cp-auth-back { text-align: center; margin: 18px 0 0; }

/* --- Mobile (< lg): pitch becomes a top header, form below --- */
@media (max-width: 991.98px) {
  .cp-auth-split { flex-direction: column; min-height: auto; }
  .cp-auth-pitch {
    width: 100%;
    padding: 40px 24px 28px;
    min-height: auto;
  }
  .cp-auth-pitch-h1 { font-size: 26px; margin-bottom: 8px; }
  .cp-auth-pitch-body { font-size: 14px; }
  .cp-auth-trust { display: none; }      /* tight on phones; trust badges live on the form panel side */
  .cp-auth-blob-1,
  .cp-auth-blob-2 { display: none; }
  .cp-auth-form-pane { padding: 24px 20px 32px; }
  .cp-auth-form-inner { max-width: 480px; }
}

/* =====================================================================
 * Homepage — full-bleed sections
 * (page uses {% block main %} so it can break out of the standard
 *  .container py-4 wrapper; per-section .container handles width.)
 * ===================================================================== */

.cp-home { background: var(--cp-white); }

.cp-text-blue { color: var(--cp-blue); }

/* Caption: small uppercase eyebrow above section H2s */
.cp-caption {
  display: inline-block;
  font-family: var(--cp-font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--cp-blue);
  margin-bottom: 8px;
}

.cp-h2 {
  font-family: var(--cp-font-display);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: -0.005em;
  color: var(--cp-ink);
  margin: 0;
}

/* --- Hero --- */
.cp-hero {
  background: linear-gradient(180deg, var(--cp-surface) 0%, var(--cp-white) 100%);
  padding: 56px 0 40px;
}
.cp-hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 56px;
  align-items: center;
}
.cp-hero-copy { max-width: 560px; }
.cp-hero-h1 {
  font-family: var(--cp-font-display);
  font-weight: 700;
  font-size: 48px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--cp-ink);
  margin: 18px 0 16px;
}
.cp-hero-sub {
  font-family: var(--cp-font-body);
  font-size: 18px;
  line-height: 1.55;
  color: var(--cp-slate);
  margin: 0 0 28px;
  max-width: 520px;
}
.cp-hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Hero artwork — soft tinted frame around the stacked logo */
.cp-hero-art {
  display: flex;
  justify-content: center;
}
.cp-hero-art-frame {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 5 / 4;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.7) 0%, transparent 60%),
    linear-gradient(135deg, var(--cp-blue-tint) 0%, #d8e6f5 100%);
  border-radius: 20px;
  box-shadow: var(--cp-shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}
.cp-hero-art-logo {
  width: 70%;
  height: auto;
  max-height: 240px;
}

/* Hero pill */
.cp-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--cp-radius-pill);
  font-family: var(--cp-font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.cp-pill-blue { background: var(--cp-blue-tint); color: var(--cp-blue); }

/* --- Filter bar --- */
.cp-filter-bar {
  margin-top: 40px;
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr 1fr auto;
  gap: 10px;
  align-items: stretch;
}
.cp-filter-keyword,
.cp-filter-input {
  height: 52px;
  border: 1.5px solid var(--cp-border);
  border-radius: var(--cp-radius-input);
  background: var(--cp-white);
  padding: 0 14px;
  font-family: var(--cp-font-body);
  font-size: 15px;
  color: var(--cp-ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.cp-filter-keyword {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cp-filter-keyword > i { color: var(--cp-cool); font-size: 16px; flex-shrink: 0; }
.cp-filter-keyword > input {
  flex: 1;
  border: none;
  background: transparent;
  font: inherit;
  color: inherit;
  height: 100%;
  outline: none;
}
.cp-filter-keyword > input::placeholder,
.cp-filter-input::placeholder { color: var(--cp-cool); }
.cp-filter-keyword:focus-within,
.cp-filter-input:focus,
.cp-filter-select:focus {
  border-color: var(--cp-blue);
  box-shadow: 0 0 0 3px rgba(30, 90, 150, 0.15);
  outline: none;
}
.cp-filter-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235A6B7E' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.cp-filter-submit {
  height: 52px;
  padding: 0 22px;
  background: var(--cp-blue);
  color: var(--cp-white);
  border: none;
  border-radius: var(--cp-radius-input);
  font-family: var(--cp-font-body);
  font-weight: 600;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: background-color 0.15s ease;
  white-space: nowrap;
}
.cp-filter-submit:hover { background: var(--cp-blue-deep); }

/* --- Section heading row --- */
.cp-section { padding: 56px 0; }
.cp-section-tight { padding: 24px 0 56px; }
.cp-section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.cp-section-aside {
  font-size: 14px;
  color: var(--cp-slate);
  margin: 0;
  max-width: 360px;
}
.cp-section-link {
  font-family: var(--cp-font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--cp-blue);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cp-section-link:hover { color: var(--cp-blue-deep); }

/* --- Three-channel cards --- */
.cp-channels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.cp-channel-card {
  background: var(--cp-white);
  border: 1px solid var(--cp-border);
  border-top: 4px solid var(--cp-blue);   /* default; per-channel rules override */
  border-radius: var(--cp-radius-card);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--cp-shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cp-channel-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--cp-shadow-md);
  color: inherit;
}
.cp-channel-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--cp-blue-tint);  /* default */
  color: var(--cp-blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}
.cp-channel-title {
  font-family: var(--cp-font-display);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.3;
  color: var(--cp-ink);
  margin: 0 0 6px;
}
.cp-channel-tagline {
  font-family: var(--cp-font-body);
  font-size: 15px;
  line-height: 1.5;
  color: var(--cp-slate);
  margin: 0;
}
.cp-channel-body { flex: 1; }
.cp-channel-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--cp-hairline);
  font-family: var(--cp-font-body);
  font-size: 13px;
}
.cp-channel-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--cp-ink);
  font-weight: 600;
}
.cp-channel-count > i { font-size: 7px; color: var(--cp-teal); }
.cp-channel-cta {
  color: var(--cp-blue);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Per-channel accent (top stripe + icon container) */
.cp-channel-card-opportunity { border-top-color: var(--cp-blue); }
.cp-channel-card-opportunity .cp-channel-icon { background: var(--cp-blue-tint); color: var(--cp-blue); }
.cp-channel-card-service     { border-top-color: var(--cp-sage); }
.cp-channel-card-service     .cp-channel-icon { background: var(--cp-sage-tint); color: var(--cp-sage); }
.cp-channel-card-service     .cp-channel-cta  { color: var(--cp-sage); }
.cp-channel-card-item        { border-top-color: var(--cp-teal); }
.cp-channel-card-item        .cp-channel-icon { background: var(--cp-teal-tint); color: var(--cp-teal); }
.cp-channel-card-item        .cp-channel-cta  { color: var(--cp-teal); }

/* --- Empty state --- */
.cp-empty {
  background: var(--cp-white);
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius-card);
  padding: 40px;
  text-align: center;
  color: var(--cp-slate);
  font-family: var(--cp-font-body);
}

/* --- Trust strip --- */
.cp-trust {
  background: var(--cp-surface);
  border-radius: var(--cp-radius-card);
  padding: 22px 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-around;
  align-items: center;
}
.cp-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--cp-slate);
  font-family: var(--cp-font-body);
  font-size: 14px;
  font-weight: 500;
}
.cp-trust-item > i {
  font-size: 18px;
  color: var(--cp-blue);
  flex-shrink: 0;
}

/* --- Telegram channels section ("Get every listing in your pocket") --- */
.cp-tg-section { background: var(--cp-surface); }

.cp-tg-section .cp-caption > i { font-size: 13px; vertical-align: -1px; margin-right: 2px; }

.cp-tg-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.cp-tg-card {
  position: relative;
  background: var(--cp-white);
  border: 1px solid var(--cp-border);
  border-top: 4px solid var(--cp-blue);    /* per-channel rules override */
  border-radius: var(--cp-radius-card);
  padding: 24px 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--cp-shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cp-tg-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--cp-shadow-md);
}

.cp-tg-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cp-tg-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--cp-blue-tint);
  color: var(--cp-blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.cp-tg-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #229ED91A;            /* Telegram blue at 10% */
  color: #229ED9;                   /* Telegram brand blue */
  font-family: var(--cp-font-body);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--cp-radius-pill);
  letter-spacing: 0.02em;
}
.cp-tg-badge > i { font-size: 14px; }

.cp-tg-name {
  font-family: var(--cp-font-display);
  font-weight: 700;
  font-size: 19px;
  line-height: 1.3;
  color: var(--cp-ink);
  margin: 4px 0 0;
}
.cp-tg-blurb {
  font-family: var(--cp-font-body);
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--cp-slate);
  margin: 0;
  flex: 1;
}

.cp-tg-cta {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #229ED9;              /* Telegram blue */
  color: #fff;
  font-family: var(--cp-font-body);
  font-weight: 600;
  font-size: 14px;
  padding: 11px 16px;
  border-radius: var(--cp-radius-input);
  text-decoration: none;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.cp-tg-cta:hover {
  background: #1c8cc0;
  color: #fff;
  transform: translateY(-1px);
}
.cp-tg-cta > i.bi-arrow-up-right { font-size: 13px; opacity: 0.85; }

.cp-tg-foot {
  text-align: center;
  margin: 24px 0 0;
  font-family: var(--cp-font-body);
  font-size: 14px;
  color: var(--cp-slate);
}
.cp-tg-foot a { color: var(--cp-blue); font-weight: 600; text-decoration: none; }
.cp-tg-foot a:hover { color: var(--cp-blue-deep); text-decoration: underline; }

/* Per-channel accent (top stripe + icon container) — mirrors .cp-channel-card */
.cp-tg-card-opportunity { border-top-color: var(--cp-blue); }
.cp-tg-card-opportunity .cp-tg-icon { background: var(--cp-blue-tint); color: var(--cp-blue); }
.cp-tg-card-service     { border-top-color: var(--cp-sage); }
.cp-tg-card-service     .cp-tg-icon { background: var(--cp-sage-tint); color: var(--cp-sage); }
.cp-tg-card-item        { border-top-color: var(--cp-teal); }
.cp-tg-card-item        .cp-tg-icon { background: var(--cp-teal-tint); color: var(--cp-teal); }

/* --- Dedicated /channels page --- */
.cp-channels-page { background: var(--cp-white); }

.cp-tg-hero {
  background: linear-gradient(180deg, var(--cp-surface) 0%, var(--cp-white) 100%);
  padding: 48px 0 24px;
}
.cp-tg-hero-h1 {
  font-size: 36px;
  margin: 14px 0 12px;
  max-width: 780px;
}
.cp-tg-hero-sub {
  font-family: var(--cp-font-body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--cp-slate);
  margin: 0;
  max-width: 720px;
}

.cp-tg-cards-large .cp-tg-card { padding: 28px 28px 26px; }
.cp-tg-cards-large .cp-tg-name { font-size: 22px; }
.cp-tg-list {
  list-style: none;
  margin: 8px 0 4px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--cp-font-body);
  font-size: 14px;
  line-height: 1.45;
  color: var(--cp-ink);
}
.cp-tg-list li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.cp-tg-list li > i {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--cp-sage);
  font-size: 16px;
}
.cp-tg-card-ctas {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
.cp-tg-secondary {
  text-align: center;
  font-family: var(--cp-font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--cp-slate);
  text-decoration: none;
  padding: 6px 0;
}
.cp-tg-secondary:hover { color: var(--cp-blue); }

/* --- Mobile (< lg) --- */
@media (max-width: 991.98px) {
  .cp-hero { padding: 32px 0 24px; }
  .cp-hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .cp-hero-art { display: none; }                 /* drop on phones, matches polish */
  .cp-hero-h1 { font-size: 28px; line-height: 1.15; margin-top: 12px; }
  .cp-hero-sub { font-size: 15px; }
  .cp-hero-ctas { flex-direction: column; align-items: stretch; }
  .cp-hero-ctas .btn { justify-content: center; }

  .cp-filter-bar {
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-areas:
      "kw kw kw"
      "ci st rg"
      "go go go";
    margin-top: 24px;
  }
  .cp-filter-keyword { grid-area: kw; height: 46px; }
  .cp-filter-bar > .cp-filter-input:nth-of-type(1) { grid-area: ci; height: 42px; }
  .cp-filter-bar > .cp-filter-input:nth-of-type(2) { grid-area: st; height: 42px; }
  .cp-filter-bar > .cp-filter-input:nth-of-type(3) { grid-area: rg; height: 42px; }
  .cp-filter-submit { grid-area: go; height: 46px; }

  .cp-section { padding: 32px 0; }
  .cp-section-tight { padding: 16px 0 32px; }
  .cp-section-head { align-items: flex-start; }
  .cp-section-aside { display: none; }            /* keep section heads tight on phones */

  .cp-h2 { font-size: 22px; }

  .cp-channels {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  /* Mobile channel cards: shift accent from top stripe to left stripe to
   * match the polish mobile design and keep the row compact. */
  .cp-channel-card {
    flex-direction: row;
    align-items: center;
    padding: 16px;
    border-top: 1px solid var(--cp-border);
    border-left: 4px solid var(--cp-blue);
  }
  .cp-channel-card-opportunity { border-top-color: var(--cp-border); border-left-color: var(--cp-blue); }
  .cp-channel-card-service     { border-top-color: var(--cp-border); border-left-color: var(--cp-sage); }
  .cp-channel-card-item        { border-top-color: var(--cp-border); border-left-color: var(--cp-teal); }
  .cp-channel-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    font-size: 20px;
    flex-shrink: 0;
  }
  .cp-channel-title { font-size: 16px; margin-bottom: 2px; }
  .cp-channel-tagline { display: none; }
  .cp-channel-foot {
    display: contents;
    border-top: none;
    padding-top: 0;
  }
  .cp-channel-count { font-size: 12px; }
  .cp-channel-cta { display: none; }              /* whole card is the link on mobile */

  .cp-trust {
    padding: 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .cp-trust-item { font-size: 13px; }

  /* Telegram cards: stack on phones, keep accent stripe on top */
  .cp-tg-cards { grid-template-columns: 1fr; gap: 14px; }
  .cp-tg-card { padding: 18px 18px 16px; }
  .cp-tg-cards-large .cp-tg-card { padding: 20px 20px 18px; }
  .cp-tg-name { font-size: 17px; }
  .cp-tg-cards-large .cp-tg-name { font-size: 19px; }
  .cp-tg-blurb { font-size: 14px; }
  .cp-tg-icon { width: 42px; height: 42px; font-size: 19px; border-radius: 10px; }
  .cp-tg-cta { padding: 10px 14px; font-size: 14px; }
  .cp-tg-foot { font-size: 13px; margin-top: 18px; }

  /* /channels page hero */
  .cp-tg-hero { padding: 28px 0 16px; }
  .cp-tg-hero-h1 { font-size: 24px; }
  .cp-tg-hero-sub { font-size: 15px; }
  .cp-tg-list { font-size: 13.5px; }
}

/* =====================================================================
 * Browse page (listings index)
 * ===================================================================== */

.cp-browse { background: var(--cp-surface); }

.cp-browse-head {
  margin: 8px 0 18px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.cp-browse-h1 {
  font-family: var(--cp-font-display);
  font-weight: 700;
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--cp-ink);
  margin: 0 0 6px;
}
.cp-browse-sub {
  font-family: var(--cp-font-body);
  font-size: 15px;
  color: var(--cp-slate);
  margin: 0;
  max-width: 640px;
}

/* --- Tab row (category) --- */
.cp-browse-tabs-wrap {
  background: var(--cp-white);
  border-top: 1px solid var(--cp-hairline);
  border-bottom: 1px solid var(--cp-hairline);
  margin-top: 8px;
}
.cp-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.cp-tabs::-webkit-scrollbar { display: none; }
.cp-tab {
  padding: 14px 18px;
  font-family: var(--cp-font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--cp-slate);
  border-bottom: 2px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.cp-tab:hover { color: var(--cp-ink); }
.cp-tab-count {
  display: inline-block;
  margin-left: 4px;
  font-weight: 500;
  color: var(--cp-cool);
}
.cp-tab-active { color: var(--cp-blue); border-bottom-color: var(--cp-blue); }
.cp-tab-active.cp-tab-service { color: var(--cp-sage); border-bottom-color: var(--cp-sage); }
.cp-tab-active.cp-tab-item    { color: var(--cp-teal); border-bottom-color: var(--cp-teal); }

/* --- Result bar (count) --- */
.cp-browse-resultbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 22px 0 18px;
  flex-wrap: wrap;
  gap: 12px;
}
.cp-browse-resultcount {
  font-family: var(--cp-font-body);
  font-size: 14px;
  color: var(--cp-slate);
  margin: 0;
}
.cp-browse-resultcount > b { color: var(--cp-ink); font-weight: 600; }
.cp-browse-resultwhere { color: var(--cp-slate); }

/* --- Pagination --- */
.cp-pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 32px 0 8px;
  flex-wrap: wrap;
}
.cp-pager-step,
.cp-pager-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  min-width: 36px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--cp-border);
  background: var(--cp-white);
  color: var(--cp-ink);
  font-family: var(--cp-font-body);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.cp-pager-step:hover,
.cp-pager-num:hover {
  background: var(--cp-blue-tint);
  border-color: var(--cp-blue);
  color: var(--cp-blue);
}
.cp-pager-num-active {
  background: var(--cp-blue);
  border-color: var(--cp-blue);
  color: var(--cp-white);
  cursor: default;
}
.cp-pager-disabled {
  color: var(--cp-cool);
  background: var(--cp-surface);
  cursor: not-allowed;
  opacity: 0.7;
}
.cp-pager-disabled:hover {
  background: var(--cp-surface);
  border-color: var(--cp-border);
  color: var(--cp-cool);
}
.cp-pager-gap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  min-width: 24px;
  color: var(--cp-cool);
  font-weight: 600;
  font-size: 14px;
}

/* --- Empty state (large) --- */
.cp-empty-large {
  padding: 56px 32px;
  text-align: center;
}
.cp-empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: var(--cp-blue-tint);
  color: var(--cp-blue);
  border-radius: 50%;
  font-size: 22px;
  margin-bottom: 14px;
}
.cp-empty-title {
  font-family: var(--cp-font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--cp-ink);
  margin: 0 0 6px;
}
.cp-empty-body {
  font-family: var(--cp-font-body);
  font-size: 14px;
  color: var(--cp-slate);
  margin: 0 0 16px;
}

/* --- Mobile (< lg) --- */
@media (max-width: 991.98px) {
  .cp-browse-h1 { font-size: 24px; }
  .cp-browse-sub { font-size: 14px; }
  .cp-tab { padding: 12px 14px; font-size: 13px; }
  .cp-pager-step,
  .cp-pager-num { height: 34px; min-width: 34px; font-size: 13px; padding: 0 10px; }
}

/* =====================================================================
 * Listing detail
 * ===================================================================== */

.cp-detail { background: var(--cp-surface); }
.cp-detail-container { padding-top: 20px; padding-bottom: 56px; }

/* --- Status banner (non-published) --- */
.cp-detail-banner {
  border: 1px solid #f1d68a;
  background: #fff7e3;
  color: #6b4c0a;
  border-radius: var(--cp-radius-card);
  padding: 14px 16px;
}
.cp-detail-banner-icon { color: var(--cp-amber); font-size: 20px; }

/* --- Breadcrumb --- */
.cp-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--cp-font-body);
  font-size: 13px;
  color: var(--cp-slate);
  margin: 8px 0 22px;
  flex-wrap: wrap;
}
.cp-breadcrumb a {
  color: var(--cp-slate);
  text-decoration: none;
}
.cp-breadcrumb a:hover { color: var(--cp-blue); }
.cp-breadcrumb > i { color: var(--cp-cool); font-size: 11px; }
.cp-breadcrumb-current {
  color: var(--cp-ink);
  font-weight: 500;
  /* truncate very long titles */
  max-width: 50ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --- Two-column grid (desktop) --- */
.cp-detail-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  align-items: start;
}
.cp-detail-main { min-width: 0; }    /* prevent grid blowout */

/* --- Header (left column) --- */
.cp-detail-pill { margin-bottom: 14px; }
.cp-detail-h1 {
  font-family: var(--cp-font-display);
  font-weight: 700;
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--cp-ink);
  margin: 0 0 14px;
}
.cp-detail-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}
.cp-detail-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--cp-font-body);
  font-size: 14px;
  color: var(--cp-slate);
}
.cp-detail-meta-item > i { font-size: 14px; color: var(--cp-cool); }
.cp-detail-meta-item:nth-of-type(1) > i { color: var(--cp-blue); }   /* first item = location pin in brand blue */
.cp-detail-meta-expiry {
  color: var(--cp-amber);
  font-weight: 600;
}
.cp-detail-meta-expiry > i { color: var(--cp-amber); }

/* --- Gallery --- */
.cp-gallery {
  margin-bottom: 22px;
}
.cp-gallery-primary {
  background: var(--cp-surface);
  border-radius: var(--cp-radius-card);
  border: 1px solid var(--cp-border);
  overflow: hidden;
  margin-bottom: 10px;
}
.cp-gallery-primary img {
  width: 100%;
  max-height: 480px;
  object-fit: contain;
  display: block;
  background: var(--cp-ink);
}
.cp-gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 10px;
}
.cp-gallery-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  border: 2px solid transparent;
  border-radius: 10px;
  background: var(--cp-surface);
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.cp-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cp-gallery-thumb:hover { border-color: var(--cp-cool); }
.cp-gallery-thumb-active { border-color: var(--cp-blue); }

.cp-gallery-empty {
  background: var(--cp-white);
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius-card);
  padding: 56px 32px;
  text-align: center;
  color: var(--cp-cool);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}
.cp-gallery-empty > i { font-size: 36px; color: var(--cp-cool); }

/* --- Cards (description / manage) --- */
.cp-detail-card {
  background: var(--cp-white);
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius-card);
  padding: 24px 28px;
  box-shadow: var(--cp-shadow-sm);
  margin-bottom: 18px;
}
.cp-detail-section-h {
  font-family: var(--cp-font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--cp-ink);
  margin: 0 0 12px;
}
.cp-detail-description {
  font-family: var(--cp-font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--cp-ink);
  white-space: pre-line;        /* preserve user's line breaks */
  margin: 0;
}
.cp-detail-attrs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--cp-hairline);
}
.cp-detail-attr {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cp-detail-attr-value {
  font-family: var(--cp-font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--cp-ink);
}

/* --- Manage actions --- */
.cp-detail-manage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* --- Sticky aside (contact card) --- */
.cp-detail-aside {
  position: sticky;
  top: 88px;          /* clears the 72px sticky topnav + 16px breathing */
  align-self: start;
}
.cp-detail-contact {
  background: var(--cp-white);
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius-card);
  padding: 24px;
  box-shadow: var(--cp-shadow-sm);
}
.cp-detail-aside-caption { display: inline-block; margin-bottom: 4px; }
.cp-detail-aside-h {
  font-family: var(--cp-font-display);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.3;
  color: var(--cp-ink);
  margin: 0 0 18px;
}
.cp-detail-price {
  font-family: var(--cp-font-display);
  font-weight: 700;
  font-size: 36px;
  line-height: 1;
  color: var(--cp-blue);
  margin: 0 0 4px;
}
.cp-detail-price-sub {
  font-family: var(--cp-font-body);
  font-size: 14px;
  color: var(--cp-slate);
  margin: 0 0 20px;
}

/* --- Seller block --- */
.cp-detail-seller {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--cp-surface);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
}
.cp-detail-seller-avatar-img,
.cp-detail-seller-avatar-init {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
}
.cp-detail-seller-avatar-img { object-fit: cover; }
.cp-detail-seller-avatar-init {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--cp-blue-tint);
  color: var(--cp-blue);
  font-family: var(--cp-font-display);
  font-weight: 700;
  font-size: 16px;
}
.cp-detail-seller-info { flex: 1; min-width: 0; }
.cp-detail-seller-name {
  font-family: var(--cp-font-display);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.3;
  color: var(--cp-ink);
}
.cp-detail-seller-meta {
  font-family: var(--cp-font-body);
  font-size: 12px;
  color: var(--cp-slate);
  margin-top: 2px;
}

/* --- Telegram-blue contact button --- */
.btn-tg {
  --bs-btn-bg: #229ED9;
  --bs-btn-border-color: #229ED9;
  --bs-btn-color: #ffffff;
  --bs-btn-hover-bg: #1B85B5;
  --bs-btn-hover-border-color: #1B85B5;
  --bs-btn-hover-color: #ffffff;
  --bs-btn-active-bg: #1B85B5;
  --bs-btn-active-border-color: #1B85B5;
  font-weight: 600;
  border-radius: var(--cp-radius-input);
  height: 52px;
}
.cp-detail-cta-primary { margin-bottom: 10px; }
.cp-detail-cta-stack { display: flex; flex-direction: column; gap: 0; }
.cp-detail-cta-stack .cp-detail-cta-primary:last-child { margin-bottom: 0; }

.cp-detail-contacts-extra {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0 4px;
}
.cp-detail-contacts-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--cp-font-body);
  font-size: 14px;
  color: var(--cp-slate);
  text-decoration: none;
}
.cp-detail-contacts-link:hover { color: var(--cp-blue); }
.cp-detail-contacts-link > i { color: var(--cp-cool); }

.cp-detail-contact-empty {
  font-family: var(--cp-font-body);
  font-size: 13px;
  color: var(--cp-slate);
  background: var(--cp-blue-tint);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 8px 0;
}
.cp-detail-contact-empty > i { color: var(--cp-blue); margin-right: 4px; }

.cp-detail-trust {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--cp-hairline);
}
.cp-detail-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--cp-font-body);
  font-size: 13px;
  color: var(--cp-slate);
}
.cp-detail-trust-item > i { font-size: 14px; flex-shrink: 0; }
.cp-detail-trust-item:nth-of-type(1) > i { color: var(--cp-teal); }   /* shield = success/teal */
.cp-detail-trust-item:nth-of-type(2) > i { color: var(--cp-blue); }   /* telegram = brand blue */

/* --- Mobile sticky bottom bar --- */
.cp-detail-stickybar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1020;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--cp-white);
  border-top: 1px solid var(--cp-hairline);
  box-shadow: 0 -2px 10px rgba(26, 35, 50, 0.08);
}
.cp-detail-stickybar-icon-btn {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: var(--cp-radius-input);
  border: 1.5px solid var(--cp-blue);
  background: var(--cp-white);
  color: var(--cp-blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 18px;
}
.cp-detail-stickybar-icon-btn:hover { background: var(--cp-blue-tint); }
.cp-detail-stickybar .btn { height: 48px; }

/* --- Mobile (< lg) --- */
@media (max-width: 991.98px) {
  .cp-detail-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .cp-detail-aside {
    position: static;
    top: auto;
  }
  .cp-detail-h1 { font-size: 22px; line-height: 1.25; }
  .cp-detail-meta-row { gap: 12px; }
  .cp-detail-meta-item { font-size: 13px; }
  .cp-detail-card { padding: 18px; }
  .cp-detail-section-h { font-size: 16px; }
  .cp-detail-price { font-size: 28px; }
  .cp-gallery-primary img { max-height: 320px; }
  .cp-detail-container { padding-bottom: 88px; }   /* clear sticky bottom bar */
  .cp-breadcrumb { font-size: 12px; }
  .cp-breadcrumb-current { max-width: 28ch; }
}

/* =====================================================================
 * Submit flow (Post a listing — Details / Photos / Review / Payment)
 * ===================================================================== */

.cp-submit { background: var(--cp-surface); }
.cp-submit-container {
  max-width: 880px;
  margin: 0 auto;
  padding: 32px 20px 56px;
}
.cp-submit-h1 {
  font-family: var(--cp-font-display);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.005em;
  color: var(--cp-ink);
  margin: 0 0 6px;
}
.cp-submit-sub {
  font-family: var(--cp-font-body);
  font-size: 15px;
  color: var(--cp-slate);
  margin: 0 0 28px;
}

/* --- Stepper (desktop): circles + connector lines --- */
.cp-stepper-desktop {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
}
.cp-stepper-step {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.cp-stepper-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--cp-font-display);
  font-weight: 700;
  font-size: 13px;
  background: var(--cp-white);
  color: var(--cp-cool);
  border: 1.5px solid var(--cp-border);
  flex-shrink: 0;
}
.cp-stepper-label {
  font-family: var(--cp-font-body);
  font-weight: 600;
  font-size: 14px;
  color: var(--cp-cool);
  white-space: nowrap;
}
.cp-stepper-connector {
  flex: 1;
  height: 2px;
  background: var(--cp-hairline);
  margin: 0 14px;
  min-width: 12px;
}
/* States */
.cp-stepper-step[data-state="current"] .cp-stepper-circle {
  background: var(--cp-blue);
  color: var(--cp-white);
  border-color: var(--cp-blue);
}
.cp-stepper-step[data-state="current"] .cp-stepper-label { color: var(--cp-blue); }
.cp-stepper-step[data-state="done"] .cp-stepper-circle {
  background: var(--cp-teal);
  color: var(--cp-white);
  border-color: var(--cp-teal);
}
.cp-stepper-step[data-state="done"] .cp-stepper-label { color: var(--cp-ink); }
.cp-stepper-step[data-state="done"] + .cp-stepper-connector { background: var(--cp-teal); }
.cp-stepper-num { display: inline; }
.cp-stepper-check { display: none; font-size: 16px; line-height: 1; }
.cp-stepper-step[data-state="done"] .cp-stepper-num { display: none; }
.cp-stepper-step[data-state="done"] .cp-stepper-check { display: inline; }

/* --- Stepper (mobile): compact header + thin progress bar --- */
.cp-stepper-mobile {
  display: none;
  margin: 0 -20px 20px;
}
.cp-stepper-mobile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 20px 14px;
  font-family: var(--cp-font-body);
  font-size: 13px;
}
.cp-stepper-mobile-title { font-weight: 700; color: var(--cp-ink); font-size: 14px; }
.cp-stepper-mobile-step { color: var(--cp-slate); font-weight: 500; }
.cp-stepper-progress {
  height: 4px;
  background: var(--cp-hairline);
  position: relative;
  overflow: hidden;
}
.cp-stepper-progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--cp-blue);
  transition: width 0.2s ease;
}

/* --- Pricing callout --- */
.cp-submit-pricing {
  display: flex;
  gap: 14px;
  padding: 14px 18px;
  margin-bottom: 18px;
  background: var(--cp-blue-tint);
  border: 1px solid var(--cp-blue);
  border-radius: 12px;
  align-items: flex-start;
}
.cp-submit-pricing > i {
  color: var(--cp-blue);
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}
.cp-submit-pricing-title {
  font-family: var(--cp-font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--cp-ink);
  margin: 0 0 2px;
}
.cp-submit-pricing-body {
  font-family: var(--cp-font-body);
  font-size: 13px;
  color: var(--cp-slate);
  margin: 0;
  line-height: 1.45;
}

/* --- Step card --- */
.cp-submit-card {
  background: var(--cp-white);
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius-card);
  padding: 28px 32px;
  box-shadow: var(--cp-shadow-sm);
  margin-bottom: 18px;
}
.cp-submit-card-h {
  font-family: var(--cp-font-display);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.25;
  color: var(--cp-ink);
  margin: 0 0 6px;
}
.cp-submit-card-sub {
  font-family: var(--cp-font-body);
  font-size: 14px;
  color: var(--cp-slate);
  margin: 0 0 22px;
}

/* --- Section caption (uppercase eyebrow above each field) --- */
.cp-submit-caption {
  display: block;
  font-family: var(--cp-font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--cp-ink);
  margin-bottom: 8px;
}

/* --- Channel selector cards (3-up grid) --- */
.cp-submit-channels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}
.cp-submit-channel {
  position: relative;
  padding: 14px;
  border-radius: 10px;
  border: 1.5px solid var(--cp-border);
  background: var(--cp-white);
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.cp-submit-channel:hover { border-color: var(--cp-cool); }
.cp-submit-channel input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.cp-submit-channel-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cp-submit-channel-row > i {
  font-size: 16px;
  color: var(--cp-slate);
  flex-shrink: 0;
}
.cp-submit-channel-label {
  font-family: var(--cp-font-body);
  font-weight: 700;
  font-size: 14px;
  color: var(--cp-ink);
}
.cp-submit-channel-sub {
  font-family: var(--cp-font-body);
  font-size: 12px;
  color: var(--cp-slate);
}
.cp-submit-channel:has(input:checked) {
  border-color: var(--cp-blue);
  background: var(--cp-blue-tint);
}
.cp-submit-channel:has(input:checked) .cp-submit-channel-row > i { color: var(--cp-blue); }
.cp-submit-channel:has(input:checked) .cp-submit-channel-label { color: var(--cp-blue); }
.cp-submit-channel:has(input:checked):focus-within {
  box-shadow: 0 0 0 3px rgba(30, 90, 150, 0.15);
}

/* --- Form rows / fields --- */
.cp-submit-row {
  margin-bottom: 18px;
}
.cp-submit-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}
.cp-submit-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}
.cp-submit-input,
.cp-submit-select {
  width: 100%;
  height: 48px;
  border: 1.5px solid var(--cp-border);
  border-radius: var(--cp-radius-input);
  padding: 0 14px;
  font-family: var(--cp-font-body);
  font-size: 15px;
  color: var(--cp-ink);
  background: var(--cp-white);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.cp-submit-input:focus,
.cp-submit-select:focus {
  border-color: var(--cp-blue);
  box-shadow: 0 0 0 3px rgba(30, 90, 150, 0.15);
  outline: none;
}
.cp-submit-input::placeholder { color: var(--cp-cool); }
.cp-submit-textarea {
  width: 100%;
  min-height: 120px;
  border: 1.5px solid var(--cp-border);
  border-radius: var(--cp-radius-input);
  padding: 12px 14px;
  font-family: var(--cp-font-body);
  font-size: 15px;
  line-height: 1.5;
  color: var(--cp-ink);
  background: var(--cp-white);
  resize: vertical;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.cp-submit-textarea:focus {
  border-color: var(--cp-blue);
  box-shadow: 0 0 0 3px rgba(30, 90, 150, 0.15);
  outline: none;
}
.cp-submit-textarea::placeholder { color: var(--cp-cool); }
.cp-submit-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235A6B7E' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
/* Wrapped input with leading icon or prefix */
.cp-submit-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 14px;
  border: 1.5px solid var(--cp-border);
  border-radius: var(--cp-radius-input);
  background: var(--cp-white);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.cp-submit-input-wrap:focus-within {
  border-color: var(--cp-blue);
  box-shadow: 0 0 0 3px rgba(30, 90, 150, 0.15);
}
.cp-submit-input-wrap > i { color: var(--cp-cool); font-size: 15px; flex-shrink: 0; }
.cp-submit-input-wrap-prefix {
  color: var(--cp-cool);
  font-size: 15px;
  flex-shrink: 0;
}
.cp-submit-input-wrap > input {
  flex: 1;
  border: none;
  background: transparent;
  font: inherit;
  color: inherit;
  height: 100%;
  outline: none;
  padding: 0;
  min-width: 0;
}
.cp-submit-input-wrap > input::placeholder { color: var(--cp-cool); }

.cp-submit-hint {
  font-family: var(--cp-font-body);
  font-size: 12px;
  color: var(--cp-cool);
  margin: -14px 0 18px;
}

/* --- Inline form error --- */
.cp-submit-error {
  display: none;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--cp-red);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 14px;
}
.cp-submit-error[data-shown="true"] { display: block; }

/* --- Photos zone (drop area) --- */
.cp-submit-photos-tip {
  display: flex;
  gap: 10px;
  background: var(--cp-blue-tint);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: var(--cp-font-body);
  font-size: 13px;
  color: var(--cp-ink);
  margin-bottom: 18px;
  align-items: flex-start;
}
.cp-submit-photos-tip > i { color: var(--cp-blue); font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.cp-submit-photos-tip b { font-weight: 700; }

.cp-submit-dropzone {
  border: 2px dashed var(--cp-blue);
  background: var(--cp-blue-tint);
  border-radius: var(--cp-radius-card);
  padding: 32px 20px;
  text-align: center;
  color: var(--cp-blue);
  font-family: var(--cp-font-body);
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  margin-bottom: 18px;
  display: block;
}
.cp-submit-dropzone:hover { background: #d8e6f5; }
.cp-submit-dropzone-icon {
  display: block;
  font-size: 32px;
  margin-bottom: 8px;
  color: var(--cp-blue);
}
.cp-submit-dropzone-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--cp-blue);
  margin: 0 0 4px;
}
.cp-submit-dropzone-sub {
  font-size: 13px;
  color: var(--cp-slate);
  margin: 0;
}
.cp-submit-dropzone input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

/* --- Photos grid (4-up tiles) --- */
.cp-submit-photos-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.cp-submit-photo-tile {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  background: var(--cp-surface);
  border: 1px solid var(--cp-border);
}
.cp-submit-photo-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cp-submit-photo-cover {
  position: absolute;
  top: 6px;
  left: 6px;
  background: var(--cp-blue);
  color: var(--cp-white);
  font-family: var(--cp-font-body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 3px 7px;
  border-radius: 999px;
  text-transform: uppercase;
}
.cp-submit-photo-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(26, 35, 50, 0.7);
  color: var(--cp-white);
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
}
.cp-submit-photo-remove:hover { background: var(--cp-red); }
.cp-submit-photo-remove input { position: absolute; opacity: 0; pointer-events: none; }
.cp-submit-photo-tile:has(input:checked) img { opacity: 0.35; }
.cp-submit-photo-tile:has(input:checked) {
  outline: 2px solid var(--cp-red);
  outline-offset: -2px;
}
.cp-submit-photo-tile:has(input:checked) .cp-submit-photo-removed-tag {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cp-red);
  font-family: var(--cp-font-body);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  pointer-events: none;
}
.cp-submit-photo-removed-tag { display: none; }

/* --- Footer actions row --- */
.cp-submit-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

/* --- Review-step (Step 3) layout: single card preview + actions --- */
.cp-submit-review-card {
  background: var(--cp-white);
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius-card);
  overflow: hidden;
  box-shadow: var(--cp-shadow-sm);
  margin-bottom: 18px;
}
.cp-submit-review-photos { background: #0f172a; }
.cp-submit-review-photos .row { margin: 0; }
.cp-submit-review-photos [class*="col-"] { padding: 0; }
.cp-submit-review-photos img {
  width: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  display: block;
}
.cp-submit-review-body { padding: 24px 28px; }
.cp-submit-review-pillrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.cp-submit-review-h2 {
  font-family: var(--cp-font-display);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.25;
  color: var(--cp-ink);
  margin: 0 0 10px;
}
.cp-submit-review-desc {
  font-family: var(--cp-font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--cp-ink);
  white-space: pre-line;
  margin: 0 0 18px;
}
.cp-submit-review-attrs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px 24px;
  padding-top: 16px;
  border-top: 1px solid var(--cp-hairline);
}
.cp-submit-review-attr-label {
  font-family: var(--cp-font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cp-slate);
  margin-bottom: 4px;
  display: block;
}
.cp-submit-review-attr-value {
  font-family: var(--cp-font-body);
  font-size: 14px;
  color: var(--cp-ink);
}

/* --- Success / payment-complete card --- */
.cp-submit-success {
  background: var(--cp-white);
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius-card);
  padding: 40px 32px;
  text-align: center;
  box-shadow: var(--cp-shadow-sm);
}
.cp-submit-success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--cp-teal-tint);
  color: var(--cp-teal);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin-bottom: 16px;
}
.cp-submit-success-h {
  font-family: var(--cp-font-display);
  font-weight: 700;
  font-size: 24px;
  color: var(--cp-ink);
  margin: 0 0 8px;
}
.cp-submit-success-body {
  font-family: var(--cp-font-body);
  font-size: 15px;
  color: var(--cp-slate);
  margin: 0 auto 24px;
  max-width: 480px;
  line-height: 1.55;
}
.cp-submit-success-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

/* =====================================================================
 * Admin (sidebar + main area, dark sidebar surface)
 * ===================================================================== */

/* Page wrapper that swaps the white topnav for an ink sidebar layout. */
.cp-admin-shell {
  display: flex;
  min-height: 100vh;
  background: var(--cp-surface);
}

/* --- Sidebar --- */
.cp-admin-side {
  width: 240px;
  background: var(--cp-ink);
  color: var(--cp-white);
  padding: 22px 16px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  overflow-y: auto;
}
.cp-admin-side-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--cp-white);
  margin-bottom: 24px;
  padding: 4px 8px;
}
.cp-admin-side-brand img {
  height: 28px;
  width: auto;
  display: block;
}
.cp-admin-side-brand-text {
  display: inline-flex;
  flex-direction: column;
  line-height: 1;
}
.cp-admin-side-brand-eyebrow {
  font-family: var(--cp-font-display);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.55);
}
.cp-admin-side-brand-name {
  font-family: var(--cp-font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--cp-white);
  margin-top: 3px;
}
.cp-admin-side-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.cp-admin-side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-family: var(--cp-font-body);
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.cp-admin-side-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--cp-white);
}
.cp-admin-side-link[aria-current="page"] {
  background: rgba(255, 255, 255, 0.08);
  color: var(--cp-white);
  font-weight: 600;
}
.cp-admin-side-link > i { font-size: 15px; flex-shrink: 0; }
.cp-admin-side-link-label { flex: 1; }
.cp-admin-side-badge {
  background: var(--cp-amber);
  color: var(--cp-ink);
  border-radius: var(--cp-radius-pill);
  padding: 1px 8px;
  font-family: var(--cp-font-body);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
}
.cp-admin-side-foot {
  margin-top: auto;
  padding: 12px 8px 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--cp-font-body);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cp-admin-side-foot a { color: rgba(255, 255, 255, 0.85); text-decoration: none; }
.cp-admin-side-foot a:hover { color: var(--cp-white); text-decoration: underline; }

/* --- Mobile dark top bar (replaces the sidebar on small screens) --- */
.cp-admin-topbar { display: none; }
@media (max-width: 991.98px) {
  .cp-admin-shell { flex-direction: column; }
  .cp-admin-side { display: none; }

  .cp-admin-topbar {
    display: flex;
    background: var(--cp-ink);
    color: var(--cp-white);
    padding: 12px 16px;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
    flex-wrap: wrap;
    gap: 10px;
  }
  .cp-admin-topbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--cp-white);
    text-decoration: none;
    font-family: var(--cp-font-display);
    font-weight: 700;
    font-size: 14px;
  }
  .cp-admin-topbar-brand img { height: 22px; }
  .cp-admin-topbar-pills {
    width: 100%;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .cp-admin-topbar-pills::-webkit-scrollbar { display: none; }
  .cp-admin-topbar-pill {
    padding: 6px 12px;
    border-radius: var(--cp-radius-pill);
    font-family: var(--cp-font-body);
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
    background: rgba(255, 255, 255, 0.08);
    text-decoration: none;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  .cp-admin-topbar-pill[aria-current="page"] {
    background: var(--cp-white);
    color: var(--cp-ink);
  }
  .cp-admin-topbar-pill > i { font-size: 13px; }
}

/* --- Main content area --- */
.cp-admin-main {
  flex: 1;
  min-width: 0;
  padding: 28px 32px 56px;
}

.cp-admin-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.cp-admin-eyebrow {
  display: block;
  font-family: var(--cp-font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--cp-blue);
  margin-bottom: 4px;
}
.cp-admin-h1 {
  font-family: var(--cp-font-display);
  font-weight: 700;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.005em;
  color: var(--cp-ink);
  margin: 0;
}

/* --- KPI tiles (4-up) — same shape as dashboard but tighter --- */
.cp-admin-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.cp-admin-kpi {
  background: var(--cp-white);
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius-card);
  padding: 16px 18px;
  box-shadow: var(--cp-shadow-sm);
}
.cp-admin-kpi-icon {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  margin-bottom: 10px;
}
.cp-admin-kpi-icon-attention { background: #FEF3C7; color: #B45309; }
.cp-admin-kpi-icon-published { background: var(--cp-sage-tint); color: var(--cp-sage); }
.cp-admin-kpi-icon-active    { background: var(--cp-blue-tint); color: var(--cp-blue); }
.cp-admin-kpi-icon-revenue   { background: var(--cp-surface);   color: var(--cp-ink); }
.cp-admin-kpi-icon-users     { background: var(--cp-teal-tint); color: var(--cp-teal); }

.cp-admin-kpi-label {
  font-family: var(--cp-font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--cp-slate);
  margin: 0 0 4px;
}
.cp-admin-kpi-value {
  font-family: var(--cp-font-display);
  font-weight: 700;
  font-size: 26px;
  line-height: 1;
  color: var(--cp-ink);
  margin: 0 0 4px;
}
.cp-admin-kpi-sub {
  font-family: var(--cp-font-body);
  font-size: 12px;
  color: var(--cp-slate);
  margin: 0;
  line-height: 1.4;
}

/* KPI as a clickable link (visitor mini-widget on admin home) */
.cp-admin-kpi-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.cp-admin-kpi-link:hover {
  transform: translateY(-1px);
  box-shadow: var(--cp-shadow-md);
  color: inherit;
}

/* --- Analytics page --- */
.cp-analytics-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--cp-sage-tint);
  color: var(--cp-sage);
  border-radius: var(--cp-radius-pill);
  font-family: var(--cp-font-body);
  font-size: 13px;
  font-weight: 600;
}
.cp-analytics-live > strong { font-weight: 700; }
.cp-analytics-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cp-sage);
  flex-shrink: 0;
  position: relative;
  display: inline-block;
}
.cp-analytics-live-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--cp-sage);
  opacity: 0.45;
  animation: cp-analytics-pulse 1.6s ease-out infinite;
}
@keyframes cp-analytics-pulse {
  0%   { transform: scale(0.6); opacity: 0.55; }
  70%  { transform: scale(1.6); opacity: 0; }
  100% { transform: scale(1.6); opacity: 0; }
}

.cp-analytics-period {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  margin: 16px 0 24px;
  padding: 12px 16px;
  background: var(--cp-white);
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius-card);
  box-shadow: var(--cp-shadow-sm);
}
.cp-analytics-period-buttons {
  display: inline-flex;
  background: var(--cp-surface);
  border-radius: var(--cp-radius-pill);
  padding: 3px;
  gap: 2px;
}
.cp-analytics-period-btn {
  padding: 6px 14px;
  border-radius: var(--cp-radius-pill);
  font-family: var(--cp-font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--cp-slate);
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.cp-analytics-period-btn:hover { color: var(--cp-ink); }
.cp-analytics-period-btn-active {
  background: var(--cp-white);
  color: var(--cp-blue);
  box-shadow: var(--cp-shadow-sm);
}
.cp-analytics-period-custom {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-left: auto;
}
.cp-analytics-period-label {
  font-family: var(--cp-font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--cp-slate);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cp-analytics-period-custom input[type="date"] {
  font-family: var(--cp-font-body);
  font-size: 13px;
  padding: 6px 8px;
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius-input);
  background: var(--cp-white);
  color: var(--cp-ink);
}

.cp-analytics-chart-card { margin: 8px 0 24px; }
.cp-analytics-chart-wrap {
  position: relative;
  height: 280px;
  margin-top: 12px;
}

.cp-analytics-path {
  font-family: var(--cp-font-mono);
  font-size: 12.5px;
  background: var(--cp-surface);
  padding: 2px 8px;
  border-radius: 6px;
  color: var(--cp-ink);
  word-break: break-all;
}

.cp-analytics-ref-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cp-analytics-ref-row {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  gap: 12px;
  align-items: center;
  font-family: var(--cp-font-body);
  font-size: 14px;
}
.cp-analytics-ref-label {
  font-weight: 600;
  color: var(--cp-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cp-analytics-ref-bar-wrap {
  height: 8px;
  background: var(--cp-hairline);
  border-radius: 999px;
  overflow: hidden;
}
.cp-analytics-ref-bar {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--cp-blue), var(--cp-teal));
  border-radius: 999px;
  min-width: 2px;
  transition: width 0.3s ease;
}
.cp-analytics-ref-stats {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-size: 13px;
}

@media (max-width: 768px) {
  .cp-analytics-period { padding: 10px; }
  .cp-analytics-period-custom { margin-left: 0; }
  .cp-analytics-ref-row { grid-template-columns: 100px 1fr auto; gap: 8px; font-size: 13px; }
  .cp-analytics-chart-wrap { height: 220px; }
}

/* --- Card (used for queue, tables, etc) --- */
.cp-admin-card {
  background: var(--cp-white);
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius-card);
  box-shadow: var(--cp-shadow-sm);
  overflow: hidden;
  margin-bottom: 20px;
}
.cp-admin-card-head {
  padding: 14px 20px;
  border-bottom: 1px solid var(--cp-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.cp-admin-card-h {
  font-family: var(--cp-font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--cp-ink);
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.cp-admin-card-h-count {
  font-family: var(--cp-font-body);
  font-weight: 500;
  color: var(--cp-cool);
}
.cp-admin-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* --- Moderation queue rows --- */
.cp-admin-queue-row {
  padding: 14px 20px;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border-bottom: 1px solid var(--cp-hairline);
}
.cp-admin-queue-row:last-child { border-bottom: none; }
.cp-admin-queue-row-flag-red {
  background: rgba(220, 53, 69, 0.03);
  border-left: 3px solid var(--cp-red);
  padding-left: 17px;          /* offset the 3px border */
}
.cp-admin-queue-thumb {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--cp-surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--cp-cool);
  font-size: 20px;
}
.cp-admin-queue-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cp-admin-queue-body { min-width: 0; }
.cp-admin-queue-pillrow {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 4px;
}
.cp-admin-queue-title {
  font-family: var(--cp-font-display);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.3;
  color: var(--cp-ink);
  margin: 0 0 3px;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cp-admin-queue-title:hover { color: var(--cp-blue); }
.cp-admin-queue-meta {
  font-family: var(--cp-font-body);
  font-size: 12px;
  color: var(--cp-slate);
}
.cp-admin-queue-actions {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* --- Flag chip (placeholder for future moderation signals) --- */
.cp-flag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: var(--cp-radius-pill);
  font-family: var(--cp-font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.cp-flag-chip > i { font-size: 11px; }
.cp-flag-chip-amber { background: #FEF3C7; color: #8A6100; }
.cp-flag-chip-red   { background: #FDE8E8; color: var(--cp-red); }

/* --- Filter / search bar (sits above tables) --- */
.cp-admin-filter {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.cp-admin-filter-search {
  flex: 1 1 260px;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 14px;
  background: var(--cp-white);
  border: 1.5px solid var(--cp-border);
  border-radius: var(--cp-radius-input);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.cp-admin-filter-search:focus-within {
  border-color: var(--cp-blue);
  box-shadow: 0 0 0 3px rgba(30, 90, 150, 0.15);
}
.cp-admin-filter-search > i { color: var(--cp-cool); font-size: 14px; flex-shrink: 0; }
.cp-admin-filter-search > input {
  flex: 1;
  border: none;
  background: transparent;
  font: inherit;
  color: var(--cp-ink);
  height: 100%;
  outline: none;
  padding: 0;
  min-width: 0;
}
.cp-admin-filter-search > input::placeholder { color: var(--cp-cool); }

.cp-admin-filter-pills {
  display: flex;
  gap: 4px;
  background: var(--cp-white);
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius-input);
  padding: 3px;
}
.cp-admin-filter-pill {
  padding: 7px 12px;
  border-radius: 8px;
  font-family: var(--cp-font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--cp-slate);
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.cp-admin-filter-pill:hover { color: var(--cp-ink); }
.cp-admin-filter-pill[aria-current="page"] {
  background: var(--cp-blue-tint);
  color: var(--cp-blue);
}
.cp-admin-filter-pill-count { color: var(--cp-cool); font-weight: 500; }
.cp-admin-filter-pill[aria-current="page"] .cp-admin-filter-pill-count { color: var(--cp-blue); }

/* --- Tables --- */
.cp-admin-table-wrap {
  background: var(--cp-white);
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius-card);
  box-shadow: var(--cp-shadow-sm);
  overflow: hidden;
  margin-bottom: 20px;
}
.cp-admin-table-scroll {
  overflow-x: auto;
}
.cp-admin-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-family: var(--cp-font-body);
  font-size: 14px;
  color: var(--cp-ink);
}
.cp-admin-table thead th {
  background: var(--cp-surface);
  font-family: var(--cp-font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--cp-slate);
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--cp-hairline);
  white-space: nowrap;
}
.cp-admin-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--cp-hairline);
  vertical-align: middle;
}
.cp-admin-table tbody tr:last-child td { border-bottom: none; }
.cp-admin-table tbody tr:hover td { background: var(--cp-surface); }
.cp-admin-table-id {
  color: var(--cp-cool);
  font-family: var(--cp-font-mono);
  font-size: 12px;
  white-space: nowrap;
}
.cp-admin-table-title {
  color: var(--cp-ink);
  font-weight: 600;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 360px;
}
.cp-admin-table-title:hover { color: var(--cp-blue); }
.cp-admin-table-muted {
  color: var(--cp-slate);
  font-size: 13px;
  white-space: nowrap;
}
.cp-admin-post-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  padding: 2px 9px;
  background: var(--cp-blue-tint);
  color: var(--cp-blue);
  border-radius: var(--cp-radius-pill);
  font-family: var(--cp-font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.cp-admin-post-badge > i { font-size: 11px; }
.cp-admin-table-actions {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.cp-admin-table-actions form { display: inline-flex; }
.cp-admin-table-empty {
  padding: 56px 32px;
  text-align: center;
  color: var(--cp-slate);
  font-family: var(--cp-font-body);
}
.cp-admin-table-empty > i {
  display: block;
  font-size: 28px;
  color: var(--cp-cool);
  margin-bottom: 8px;
}

/* --- Sidebar small-card meta (quick links / tools sidebar list) --- */
.cp-admin-side-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 18px;
}
.cp-admin-side-section-h {
  display: block;
  font-family: var(--cp-font-body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  padding: 8px 12px 4px;
}

/* --- Two-up split for Overview's queue + recent payments --- */
.cp-admin-split {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 1199.98px) {
  .cp-admin-split { grid-template-columns: 1fr; }
}

/* --- Mobile (< lg) tweaks for main content --- */
@media (max-width: 991.98px) {
  .cp-admin-main { padding: 18px 16px 32px; }
  .cp-admin-h1 { font-size: 20px; }
  .cp-admin-kpis {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .cp-admin-kpi { padding: 12px; }
  .cp-admin-kpi-icon { width: 24px; height: 24px; font-size: 11px; margin-bottom: 6px; }
  .cp-admin-kpi-label { font-size: 10px; }
  .cp-admin-kpi-value { font-size: 20px; }
  .cp-admin-kpi-sub { font-size: 11px; }

  .cp-admin-queue-row {
    grid-template-columns: 56px minmax(0, 1fr);
    grid-template-areas:
      "thumb body"
      "actions actions";
    padding: 12px 14px;
    gap: 10px;
  }
  .cp-admin-queue-row-flag-red { padding-left: 11px; }
  .cp-admin-queue-row > .cp-admin-queue-thumb { grid-area: thumb; width: 56px; height: 56px; }
  .cp-admin-queue-row > .cp-admin-queue-body { grid-area: body; }
  .cp-admin-queue-row > .cp-admin-queue-actions {
    grid-area: actions;
    flex-direction: row;
    width: 100%;
  }
  .cp-admin-queue-row > .cp-admin-queue-actions .btn { flex: 1; justify-content: center; }
  .cp-admin-queue-title { font-size: 14px; }
  .cp-admin-queue-meta { font-size: 11px; }

  .cp-admin-card-head { padding: 12px 14px; }
  .cp-admin-table thead { display: none; }
  .cp-admin-table tbody td { padding: 10px 14px; font-size: 13px; }
}

/* =====================================================================
 * Dashboard (My listings)
 * ===================================================================== */

.cp-dash { background: var(--cp-surface); }
.cp-dash-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px 56px;
}

/* --- Page header --- */
.cp-dash-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.cp-dash-eyebrow {
  display: block;
  font-family: var(--cp-font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--cp-blue);
  margin-bottom: 6px;
}
.cp-dash-h1 {
  font-family: var(--cp-font-display);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.005em;
  color: var(--cp-ink);
  margin: 0;
}

/* --- KPI tiles (3-up on desktop) --- */
.cp-dash-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}
.cp-dash-kpi {
  background: var(--cp-white);
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius-card);
  padding: 18px 20px;
  box-shadow: var(--cp-shadow-sm);
  position: relative;
  display: flex;
  flex-direction: column;
}
.cp-dash-kpi-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  margin-bottom: 12px;
  flex-shrink: 0;
}
.cp-dash-kpi-icon-active { background: var(--cp-sage-tint); color: var(--cp-sage); }
.cp-dash-kpi-icon-views  { background: var(--cp-blue-tint); color: var(--cp-blue); }
.cp-dash-kpi-icon-msgs   { background: #FEF3C7;             color: #B45309; }
.cp-dash-kpi-icon-spent  { background: var(--cp-surface);   color: var(--cp-ink); }

.cp-dash-kpi-label {
  font-family: var(--cp-font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--cp-slate);
  margin: 0 0 6px;
}
.cp-dash-kpi-value {
  font-family: var(--cp-font-display);
  font-weight: 700;
  font-size: 28px;
  line-height: 1;
  color: var(--cp-ink);
  margin: 0 0 6px;
}
.cp-dash-kpi-value-placeholder { color: var(--cp-cool); }
.cp-dash-kpi-sub {
  font-family: var(--cp-font-body);
  font-size: 13px;
  color: var(--cp-slate);
  margin: 0;
  line-height: 1.4;
}
.cp-dash-kpi-soon {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--cp-blue-tint);
  color: var(--cp-blue);
  font-family: var(--cp-font-body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--cp-radius-pill);
}

/* --- Tabs --- */
.cp-dash-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--cp-hairline);
  margin-bottom: 18px;
  overflow-x: auto;
  scrollbar-width: none;
}
.cp-dash-tabs::-webkit-scrollbar { display: none; }
.cp-dash-tab {
  background: transparent;
  border: none;
  padding: 12px 18px;
  font-family: var(--cp-font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--cp-slate);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.cp-dash-tab:hover { color: var(--cp-ink); }
.cp-dash-tab-count {
  display: inline-block;
  margin-left: 4px;
  font-weight: 500;
  color: var(--cp-cool);
}
.cp-dash-tab[aria-selected="true"] {
  color: var(--cp-blue);
  border-bottom-color: var(--cp-blue);
}
.cp-dash-tab[aria-selected="true"] .cp-dash-tab-count { color: var(--cp-blue); }
/* Channel-tinted active state for the expiring tab */
.cp-dash-tab[aria-selected="true"][data-tone="amber"] {
  color: #B45309;
  border-bottom-color: var(--cp-amber);
}
.cp-dash-tab[aria-selected="true"][data-tone="amber"] .cp-dash-tab-count { color: #B45309; }

/* --- Listing list --- */
.cp-dash-list {
  background: var(--cp-white);
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius-card);
  box-shadow: var(--cp-shadow-sm);
  overflow: hidden;
}
.cp-dash-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--cp-hairline);
}
.cp-dash-row:last-child { border-bottom: none; }
.cp-dash-thumb {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--cp-surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--cp-cool);
  font-size: 22px;
  flex-shrink: 0;
}
.cp-dash-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cp-dash-row-body { min-width: 0; }
.cp-dash-row-pillrow {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
}
.cp-dash-row-title {
  font-family: var(--cp-font-display);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.3;
  color: var(--cp-ink);
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
}
.cp-dash-row-title:hover { color: var(--cp-blue); }
.cp-dash-row-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-family: var(--cp-font-body);
  font-size: 12px;
  color: var(--cp-slate);
}
.cp-dash-row-meta-price {
  color: var(--cp-blue);
  font-weight: 600;
}
.cp-dash-row-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.cp-dash-row-meta-item > i { font-size: 12px; color: var(--cp-cool); }
.cp-dash-row-meta-placeholder { color: var(--cp-cool); }
.cp-dash-row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.cp-dash-row-action-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--cp-border);
  background: var(--cp-white);
  color: var(--cp-slate);
  border-radius: var(--cp-radius-input);
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  padding: 0;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}
.cp-dash-row-action-icon:hover {
  color: var(--cp-red);
  border-color: var(--cp-red);
  background: #fef2f2;
}
.cp-dash-row-action-icon-form { display: inline-flex; }

/* --- State pills (active / expiring / expired / draft / pending) --- */
.cp-state-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--cp-radius-pill);
  font-family: var(--cp-font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--cp-surface);
  color: var(--cp-slate);
  white-space: nowrap;
}
.cp-state-pill > i { font-size: 11px; }
.cp-state-pill-active { background: var(--cp-sage-tint); color: var(--cp-sage); }
.cp-state-pill-expiring { background: #FEF3C7; color: #B45309; }
.cp-state-pill-expired { background: var(--cp-surface); color: var(--cp-slate); }
.cp-state-pill-draft { background: var(--cp-blue-tint); color: var(--cp-blue); }
.cp-state-pill-pending { background: #FEF3C7; color: #B45309; }
.cp-state-pill-publishing { background: var(--cp-blue-tint); color: var(--cp-blue); }
.cp-state-pill-rejected { background: #fde8e8; color: var(--cp-red); }

/* Accent button — sage-tinted, used for "Renew now" on expiring listings */
.btn-accent {
  --bs-btn-bg: var(--cp-sage);
  --bs-btn-border-color: var(--cp-sage);
  --bs-btn-color: var(--cp-white);
  --bs-btn-hover-bg: #335849;
  --bs-btn-hover-border-color: #335849;
  --bs-btn-hover-color: var(--cp-white);
  --bs-btn-active-bg: #335849;
  --bs-btn-active-border-color: #335849;
  font-weight: 600;
  border-radius: var(--cp-radius-input);
}

/* --- Empty state --- */
.cp-dash-empty {
  background: var(--cp-white);
  border: 1px dashed var(--cp-border);
  border-radius: var(--cp-radius-card);
  padding: 56px 32px;
  text-align: center;
}
.cp-dash-empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: var(--cp-blue-tint);
  color: var(--cp-blue);
  border-radius: 50%;
  font-size: 22px;
  margin-bottom: 14px;
}
.cp-dash-empty-h {
  font-family: var(--cp-font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--cp-ink);
  margin: 0 0 6px;
}
.cp-dash-empty-body {
  font-family: var(--cp-font-body);
  font-size: 14px;
  color: var(--cp-slate);
  margin: 0 0 18px;
  max-width: 360px;
  display: inline-block;
}

/* --- Tab panel show/hide --- */
.cp-dash-panel { display: none; }
.cp-dash-panel.is-active { display: block; }

/* --- Mobile (< lg) --- */
@media (max-width: 991.98px) {
  .cp-dash-container { padding: 20px 16px 32px; }
  .cp-dash-head { align-items: stretch; gap: 14px; }
  .cp-dash-h1 { font-size: 22px; }
  .cp-dash-head .btn { width: 100%; }

  .cp-dash-kpis {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
  }
  .cp-dash-kpi { padding: 14px; }
  .cp-dash-kpi-icon { width: 28px; height: 28px; font-size: 13px; margin-bottom: 8px; }
  .cp-dash-kpi-label { font-size: 11px; }
  .cp-dash-kpi-value { font-size: 22px; }
  .cp-dash-kpi-sub { font-size: 11px; }
  .cp-dash-kpi-soon { font-size: 9px; padding: 2px 6px; top: 10px; right: 10px; }

  /* Tabs become scrolling pills on mobile */
  .cp-dash-tabs {
    border-bottom: none;
    gap: 6px;
    margin: 0 -16px 14px;
    padding: 0 16px;
  }
  .cp-dash-tab {
    padding: 8px 14px;
    border: 1px solid var(--cp-border);
    border-radius: var(--cp-radius-pill);
    background: var(--cp-white);
    font-size: 13px;
  }
  .cp-dash-tab[aria-selected="true"] {
    background: var(--cp-blue);
    color: var(--cp-white);
    border-color: var(--cp-blue);
  }
  .cp-dash-tab[aria-selected="true"] .cp-dash-tab-count { color: rgba(255, 255, 255, 0.85); }
  .cp-dash-tab[aria-selected="true"][data-tone="amber"] {
    background: var(--cp-amber);
    color: #fff;
    border-color: var(--cp-amber);
  }
  .cp-dash-tab[aria-selected="true"][data-tone="amber"] .cp-dash-tab-count { color: rgba(255, 255, 255, 0.85); }

  /* Listing list becomes stacked cards */
  .cp-dash-list {
    background: transparent;
    border: none;
    box-shadow: none;
    overflow: visible;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .cp-dash-row {
    background: var(--cp-white);
    border: 1px solid var(--cp-border);
    border-radius: var(--cp-radius-card);
    box-shadow: var(--cp-shadow-sm);
    grid-template-columns: 64px minmax(0, 1fr);
    grid-template-areas:
      "thumb body"
      "actions actions";
    padding: 14px;
    gap: 12px;
  }
  .cp-dash-row > .cp-dash-thumb { grid-area: thumb; width: 64px; height: 64px; }
  .cp-dash-row > .cp-dash-row-body { grid-area: body; }
  .cp-dash-row > .cp-dash-row-actions {
    grid-area: actions;
    flex-direction: row-reverse;
    justify-content: stretch;
    width: 100%;
  }
  .cp-dash-row > .cp-dash-row-actions .btn { flex: 1; justify-content: center; }
  .cp-dash-row > .cp-dash-row-actions .cp-dash-row-action-icon { flex: 0 0 36px; }
  .cp-dash-row-title { font-size: 14px; }
  .cp-dash-row-meta { font-size: 11px; gap: 10px; }
  .cp-dash-empty { padding: 32px 18px; }
}

/* --- Submit flow: mobile breakpoint --- */
@media (max-width: 991.98px) {
  .cp-submit-container { padding: 16px 16px 80px; }
  .cp-submit-h1 { font-size: 22px; }
  .cp-submit-sub { display: none; }    /* keep mobile tight; pricing callout covers the gist */
  .cp-stepper-desktop { display: none; }
  .cp-stepper-mobile { display: block; }
  .cp-submit-card { padding: 18px; }
  .cp-submit-card-h { font-size: 18px; }
  .cp-submit-channels {
    /* Compact pill row instead of 3-card grid (matches polish mobile design) */
    gap: 6px;
  }
  .cp-submit-channel {
    padding: 10px 8px;
    border-radius: 999px;
    align-items: center;
    text-align: center;
    gap: 0;
  }
  .cp-submit-channel-row { justify-content: center; gap: 6px; }
  .cp-submit-channel-row > i { font-size: 14px; }
  .cp-submit-channel-label { font-size: 13px; font-weight: 500; }
  .cp-submit-channel:has(input:checked) .cp-submit-channel-label { font-weight: 700; }
  .cp-submit-channel-sub { display: none; }
  .cp-submit-row-2 { grid-template-columns: 1fr; gap: 12px; }
  .cp-submit-row-3 { grid-template-columns: 1fr; gap: 12px; }
  .cp-submit-input,
  .cp-submit-select,
  .cp-submit-input-wrap { height: 44px; }
  .cp-submit-textarea { min-height: 96px; }
  .cp-submit-photos-grid { grid-template-columns: repeat(2, 1fr); }
  .cp-submit-actions { flex-direction: column-reverse; align-items: stretch; }
  .cp-submit-actions .btn { width: 100%; }
  .cp-submit-review-body { padding: 18px; }
  .cp-submit-success { padding: 28px 18px; }
  .cp-submit-success-h { font-size: 20px; }
}
