/* =====================================================================
   MANSO — Shared Inner-Page Styles
   assets/css/pages.css
   "Find it. Fix it. Floor it."

   Styling shared by secondary pages (login, about, support, vendors,
   marketplace, etc.). References shared.css design tokens only — never
   redefines brand colours (PRD Appendix B.3 / C.4).
   ===================================================================== */


/* =====================================================================
   1. PAGE SHELL — clears the fixed header
   ===================================================================== */

.page-main {
  padding-top: var(--nav-height);
  min-height: 100vh;
}


/* =====================================================================
   2. PAGE HERO (inner-page banner)
   ===================================================================== */

.page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(3rem, 7vw, 6rem) 0 clamp(2.5rem, 5vw, 4rem);
  background:
    radial-gradient(circle at 18% 25%, rgba(45, 0, 136, 0.10), transparent 45%),
    linear-gradient(135deg, var(--color-royal-blue), var(--color-royal-blue-dark));
  color: #FFFFFF;
}

.page-hero__inner { max-width: var(--container-xl); margin-inline: auto; padding-inline: var(--space-6); }

.page-hero__eyebrow {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-silver);
  margin-bottom: var(--space-3);
}

.page-hero__title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #FFFFFF;
}

.page-hero__sub {
  margin-top: var(--space-4);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.82);
  max-width: 60ch;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: var(--space-4);
}

.breadcrumb a { color: inherit; }
.breadcrumb a:hover { color: #FFFFFF; }
.breadcrumb span { opacity: 0.6; }


/* =====================================================================
   3. GENERIC CONTENT SECTION
   ===================================================================== */

.page-section { padding: clamp(2.5rem, 5vw, 4.5rem) 0; }
.page-section--alt { background: var(--color-bg); }

.page-section__inner { max-width: var(--container-xl); margin-inline: auto; padding-inline: var(--space-6); }


/* =====================================================================
   4. AUTH PAGES (login / sign up)
   ===================================================================== */

.auth-section {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem, 5vw, 4rem) var(--space-4);
  background:
    radial-gradient(circle at 15% 20%, rgba(31, 0, 98, 0.06), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(31, 0, 98, 0.05), transparent 45%),
    var(--color-bg);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
  padding: clamp(1.75rem, 4vw, 2.75rem);
}

.auth-head { text-align: center; margin-bottom: var(--space-6); }

.auth-title {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
}

.auth-sub {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
}

.role-toggle { display: flex; gap: var(--space-2); margin-bottom: var(--space-5); }
.role-btn {
  flex: 1;
  padding: var(--space-2-5) var(--space-3);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  cursor: pointer;
  transition: border-color var(--duration-fast) var(--ease-out), background var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
}
.role-btn.is-active { border-color: var(--color-royal-blue); background: var(--color-primary-alpha); color: var(--color-royal-blue); }

/* Account hub */
.account-card {
  max-width: 640px;
  margin: 0 auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-sm);
  padding: clamp(1.75rem, 4vw, 2.5rem);
}
/* Wide variant (bulk upload): break out of the 1280px container and use
   the empty space on both sides, while staying centred on the viewport.
   On mobile it falls back to ~96vw with slimmer padding. */
.account-card--wide {
  max-width: none;
  width: min(1600px, 96vw);
  margin-left: 50%;
  transform: translateX(-50%);
}
@media (max-width: 700px) {
  .account-card--wide { padding: clamp(1rem, 4vw, 1.4rem); }
}
.account-role { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: var(--tracking-wide); padding: var(--space-1) var(--space-3); border-radius: 999px; background: var(--color-primary-alpha); color: var(--color-royal-blue); }
.account-actions { display: grid; gap: var(--space-3); margin-top: var(--space-6); }
.account-link { display: flex; align-items: center; justify-content: space-between; padding: var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-lg); color: var(--color-text-primary); font-weight: 600; text-decoration: none; transition: border-color var(--duration-fast) var(--ease-out), background var(--duration-fast) var(--ease-out); }
.account-link:hover { border-color: var(--color-royal-blue); background: var(--color-surface-subtle); }

/* Account dashboard grid */
.acct-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-3); margin-top: var(--space-6); }
.acct-tile {
  position: relative;
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  background: var(--color-surface); color: var(--color-text-primary);
  text-decoration: none; font-weight: 600; font-size: var(--text-sm);
  cursor: pointer; text-align: left; width: 100%; font-family: var(--font-body);
  transition: border-color var(--duration-fast) var(--ease-out), background var(--duration-fast) var(--ease-out);
}
.acct-tile:hover { border-color: var(--color-royal-blue); background: var(--color-surface-subtle); }
.acct-tile__icon { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 11px; background: var(--color-primary-alpha); color: var(--color-royal-blue); flex-shrink: 0; }
.acct-tile__icon svg { width: 20px; height: 20px; }
.acct-tile--soon { opacity: 0.6; }
.acct-tile--soon:hover { border-color: var(--color-border); background: var(--color-surface); cursor: default; }
.acct-soon { position: absolute; top: 8px; right: 10px; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-text-tertiary); background: var(--color-surface-subtle); padding: 2px 7px; border-radius: 999px; }

/* Inline settings form */
.acct-settings { margin-top: var(--space-5); padding: var(--space-5); border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface-subtle); }
.acct-settings h2 { font-family: var(--font-heading); font-size: var(--text-lg); font-weight: 700; margin-bottom: var(--space-4); }
.acct-signout { margin-top: var(--space-5); }

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

/* =====================================================================
   VENDOR DASHBOARD
   ===================================================================== */
.vd-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; margin-bottom: var(--space-5); }
.vd-status { display: inline-flex; align-items: center; font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: var(--tracking-wide); padding: var(--space-1) var(--space-3); border-radius: 999px; }
.vd-status--pending  { background: var(--color-warning-light); color: var(--color-warning-dark); }
.vd-status--approved { background: var(--color-success-light); color: var(--color-success-dark); }
.vd-status--rejected { background: var(--color-error-light); color: var(--color-error-dark); }
.vd-status--sold     { background: var(--color-surface-subtle); color: var(--color-text-tertiary); }

.vd-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3); margin-bottom: var(--space-6); }
.vd-stat { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-xl); padding: var(--space-4); text-align: center; }
.vd-stat__num { font-family: var(--font-heading); font-size: var(--text-2xl); font-weight: 800; color: var(--color-royal-blue); }
.vd-stat__label { font-size: var(--text-xs); color: var(--color-text-tertiary); }

.vd-section { margin-top: var(--space-7); }
.vd-section__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-4); flex-wrap: wrap; }

.vd-listing { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-3) var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-lg); margin-bottom: var(--space-2); }
.vd-listing__main { min-width: 0; }
.vd-listing__name { font-weight: 700; color: var(--color-text-primary); }
.vd-listing__meta { font-size: var(--text-xs); color: var(--color-text-tertiary); margin-top: 2px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.vd-listing__actions { display: flex; gap: var(--space-2); flex-shrink: 0; }
.vd-listing__actions .btn { padding: var(--space-1-5) var(--space-3); font-size: var(--text-xs); }

/* bulk select + delete */
.vd-bulkbar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; padding: var(--space-2) var(--space-1); margin-bottom: var(--space-2); }
.vd-check { display: inline-flex; align-items: center; gap: .5rem; font-size: var(--text-sm); font-weight: 600; color: var(--color-text-secondary); cursor: pointer; }
.vd-check input { width: 18px; height: 18px; cursor: pointer; }
.vd-sel { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; min-width: 28px; min-height: 28px; cursor: pointer; }
.vd-sel input { width: 20px; height: 20px; cursor: pointer; }
.vd-delsel:not(:disabled) { color: var(--color-error-dark, #b91c1c); border-color: var(--color-error-dark, #b91c1c); }
.vd-delsel:disabled { opacity: .5; cursor: not-allowed; }

/* bulk preview: per-row remove + quick actions */
.bulk-actions-row { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-2) 0 var(--space-3); }
.bulk-rm { border: 1px solid var(--color-border); background: #fff; color: var(--color-error-dark, #b91c1c); border-radius: 8px; padding: 4px 10px; font-size: var(--text-xs); font-weight: 600; cursor: pointer; white-space: nowrap; }
.bulk-rm:hover { background: var(--color-error-dark, #b91c1c); color: #fff; border-color: var(--color-error-dark, #b91c1c); }

/* paste-from-Excel box */
.bulk-paste { margin: var(--space-3) 0; }
.bulk-paste-area { width: 100%; box-sizing: border-box; border: 1px solid var(--color-border); border-radius: 10px; padding: .6rem .7rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.8rem; line-height: 1.5; resize: vertical; margin-bottom: .5rem; white-space: pre; overflow-x: auto; tab-size: 12; }
.bulk-paste-hint { margin-top: .4rem; color: var(--color-text-tertiary); }
/* marketplace search autocomplete */
.mk-field--suggest { position: relative; }
.mk-suggest { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 40; margin: 0; padding: .3rem; list-style: none; background: #fff; border: 1px solid var(--color-border); border-radius: 12px; box-shadow: 0 14px 36px rgba(0,0,0,.16); max-height: 320px; overflow-y: auto; }
.mk-suggest__item { padding: .55rem .7rem; border-radius: 8px; cursor: pointer; font-size: .9rem; color: var(--color-text-primary, #1a1a2e); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-suggest__item:hover { background: var(--color-surface-subtle, #f2f3f7); }

.feat-controls { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; margin: .3rem 0 .6rem; }
.feat-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .4rem; }
.lead-filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .5rem; }
.lead-filters input[type="search"] { flex: 1 1 220px; min-width: 0; }
.lead-filters select { flex: 0 0 auto; padding: .45rem .6rem; border: 1px solid var(--color-border); border-radius: 10px; background: #fff; font: inherit; font-size: var(--text-sm); }
.bulk-chk { display: flex; align-items: center; gap: .5rem; font-size: var(--text-sm); color: var(--color-text-secondary); margin: .1rem 0 .7rem; cursor: pointer; }
.bulk-chk input { width: 16px; height: 16px; flex: 0 0 auto; cursor: pointer; }
.bulk-paste-status { margin-top: .5rem; font-size: var(--text-sm); min-height: 1.2em; }
.bulk-paste-status.is-ok { color: var(--color-text-secondary); }
.bulk-paste-status.is-bad { color: var(--color-error-dark, #b91c1c); font-weight: 600; }

/* image column inputs in the preview */
.bulk-img-cell { white-space: nowrap; }
.bulk-img-url { width: 150px; max-width: 42vw; padding: 4px 7px; border: 1px solid var(--color-border); border-radius: 6px; font-size: var(--text-xs); }
.bulk-imgup { margin-left: 5px; border: 1px solid var(--color-border); background: #fff; border-radius: 6px; padding: 4px 9px; font-size: var(--text-xs); font-weight: 600; cursor: pointer; }
.bulk-imgup:hover { background: var(--color-surface-subtle); }
/* Inline edit of a bulk-upload row */
.bulk-row-actions { white-space: nowrap; }
.bulk-editbtn, .bulk-save { border: 1px solid var(--color-border); background: #fff; color: var(--color-primary, #1f0062); border-radius: 8px; padding: 4px 10px; font-size: var(--text-xs); font-weight: 600; cursor: pointer; white-space: nowrap; }
.bulk-save { background: var(--color-primary, #1f0062); color: #fff; border-color: var(--color-primary, #1f0062); }
.bulk-editbtn:hover { background: var(--color-surface-subtle); }
.bulk-save:hover { filter: brightness(1.08); }
.bulk-row-actions .bulk-rm, .bulk-row-actions .bulk-save { margin-left: 5px; }
.bulk-edit-in { width: 118px; max-width: 40vw; padding: 4px 7px; border: 1px solid var(--color-border); border-radius: 6px; font-size: var(--text-xs); font-family: inherit; }
.bulk-edit-yr { width: 52px; }
.bulk-edit-yr + .bulk-edit-yr { margin-left: 4px; }
.bulk-edit-num { width: 68px; }
.bulk-table tr.bulk-edit td { background: var(--color-surface-subtle, #f6f6fb); vertical-align: middle; }
.bulk-table tr.bulk-edit td:last-child { background: var(--color-surface-subtle, #f6f6fb); }

.vd-chip-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .5rem; }
.vd-check { display: inline-flex; align-items: center; gap: var(--space-1-5); font-size: var(--text-sm); padding: var(--space-1-5) var(--space-3); border: 1px solid var(--color-border); border-radius: 999px; cursor: pointer; color: var(--color-text-secondary); }
.vd-check input { margin: 0; }
/* Category checkboxes: clean grid rows so the box and label never detach on mobile.
   Explicit text-transform/letter-spacing/size beat ".form-field label", which
   otherwise uppercases the chip labels and makes them look broken. */
.vd-chip-cats .vd-check {
  display: flex; align-items: center; gap: .55rem; width: 100%;
  padding: .65rem .8rem; border-radius: 10px; font-weight: 600;
  white-space: normal; line-height: 1.25; text-align: left;
  text-transform: none; letter-spacing: normal;
  font-size: var(--text-sm); color: var(--color-text-secondary);
}
.vd-chip-cats .vd-check input { flex: 0 0 auto; width: 18px; height: 18px; margin: 0; }
.vd-chip-cats .vd-check { border: 1px solid var(--color-border); background: #fff; justify-content: flex-start; }
/* "Select all categories" — a clean full-width row, never reliant on inline
   styles so it can't break on mobile. */
/* High specificity (.form-field .vd-check-all) so it beats ".form-field label"
   and ".form-field { flex-direction:column }". Without this the label inherits
   the uppercase form-label styling and mis-lays out on mobile. */
.form-field .vd-check-all,
label.vd-check-all {
  display: flex; flex-direction: row; align-items: center; justify-content: flex-start;
  gap: .55rem; width: 100%; box-sizing: border-box;
  padding: .65rem .8rem; margin-bottom: .6rem;
  border: 1px solid var(--color-border); border-radius: 10px; background: #fff;
  font-weight: 700; font-size: .95rem; line-height: 1.25;
  text-transform: none; letter-spacing: normal; text-align: left;
  color: var(--color-text); cursor: pointer;
}
.form-field .vd-check-all input, label.vd-check-all input { flex: 0 0 auto; width: 18px; height: 18px; margin: 0; cursor: pointer; }
.form-field .vd-check-all span, label.vd-check-all span { flex: 1 1 auto; min-width: 0; text-transform: none; letter-spacing: normal; font-size: .95rem; font-weight: 700; color: var(--color-text); }

.plans-geo-note { text-align: center; font-size: var(--text-sm); color: var(--color-text-secondary); margin: 0 0 1.25rem; }

/* Vendor profile edits awaiting approval: vendor-side banner + admin diff view.
   Everything wraps; nothing overflows on narrow phones. */
.vd-editnote {
  margin-top: 1rem; padding: .7rem .9rem; border-radius: 10px;
  border: 1px solid #f0d48a; background: #fdf6e3; color: #7a5b00;
  font-size: var(--text-sm); font-weight: 600; line-height: 1.4;
}
.edit-diff { display: flex; flex-direction: column; gap: .4rem; margin: .6rem 0 .8rem; min-width: 0; }
.edit-diff__row {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem .6rem;
  font-size: var(--text-sm); line-height: 1.4; min-width: 0;
}
.edit-diff__field { flex: 0 0 auto; font-weight: 700; color: var(--color-text-primary, #1a1a2e); }
.edit-diff__old { color: var(--color-text-tertiary); text-decoration: line-through; overflow-wrap: anywhere; min-width: 0; }
.edit-diff__new { color: var(--color-text-primary, #1a1a2e); font-weight: 600; overflow-wrap: anywhere; min-width: 0; }
.edit-diff__arrow { flex: 0 0 auto; color: var(--color-text-tertiary); }

/* HER by MANSO */
.her-em { font-style: italic; }

.her-hero { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; padding: 1rem 0 2.75rem; }
.her-hero--noimg { grid-template-columns: 1fr; max-width: 760px; }
.her-kicker { display: inline-block; font-size: var(--text-xs); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--color-royal-blue); background: var(--color-primary-alpha); padding: .35rem .75rem; border-radius: 999px; }
.her-title { font-size: clamp(2.4rem, 5.5vw, 3.6rem); line-height: 1.02; margin: 1rem 0 0; letter-spacing: -0.01em; color: var(--color-text); }
.her-title em { font-style: italic; }
.her-tagline { font-size: clamp(1.05rem, 2.4vw, 1.3rem); font-style: normal; font-weight: 600; color: var(--color-royal-blue); margin: .6rem 0 0; }
.her-lead { font-size: clamp(1rem, 2vw, 1.1rem); color: var(--color-text-secondary); line-height: 1.55; margin: .9rem 0 0; max-width: 30rem; }
.her-cta { margin-top: 1.4rem; }
.her-hero__img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 22px; box-shadow: 0 24px 60px rgba(31, 0, 98, .20); display: block; }

.her-explainer { max-width: 760px; margin: 1rem auto 2.5rem; }
.her-explainer > p { color: var(--color-text-secondary); line-height: 1.65; font-size: 1.02rem; margin: 0 0 1rem; }
.her-sub { font-size: clamp(1.4rem, 4vw, 1.9rem); margin: 0 0 1rem; color: var(--color-text); }
.her-points { display: grid; gap: 1.1rem; margin-top: 1.75rem; }
.her-point { display: flex; gap: 1rem; align-items: flex-start; }
.her-point > div strong { color: var(--color-text); font-size: 1.05rem; }
.her-point > div p { margin: .25rem 0 0; color: var(--color-text-secondary); font-size: .95rem; line-height: 1.5; }
.her-dot { flex: 0 0 auto; width: 2.1rem; height: 2.1rem; border-radius: 999px; background: var(--color-royal-blue); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }

.her-request { max-width: 640px; margin: 0 auto; }
.her-gate-note { background: var(--color-primary-alpha); color: var(--color-royal-blue); font-size: .9rem; line-height: 1.45; padding: .75rem .9rem; border-radius: 10px; margin: .6rem 0 1rem; }
.her-form-title { font-size: clamp(1.35rem, 4vw, 1.6rem); color: var(--color-text); }
.auth-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.her-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
.her-form textarea { width: 100%; box-sizing: border-box; padding: .7rem .8rem; border: 1px solid var(--color-border); border-radius: 12px; font: inherit; font-size: .98rem; resize: vertical; min-height: 96px; background: #fff; }
.her-upload { border-style: dashed; }
.her-photo-ok { display: flex; align-items: center; gap: .7rem; margin-top: .6rem; padding: .6rem .7rem; background: var(--color-primary-alpha); border-radius: 12px; }
.her-photo-ok img { width: 60px; height: 60px; object-fit: cover; border-radius: 10px; border: 1px solid var(--color-border); }
.her-photo-ok > div { display: flex; flex-direction: column; gap: .2rem; }
.her-photo-ok span { color: var(--color-royal-blue); font-size: .9rem; font-weight: 600; }
.her-photo-remove { align-self: flex-start; background: none; border: 0; padding: 0; font: inherit; font-size: .8rem; color: var(--color-royal-blue); text-decoration: underline; cursor: pointer; }
.her-photo-status { font-size: .9rem; color: var(--color-text-secondary); margin: .6rem 0 0; }
.her-photo-status--err { color: #B00020; }
.her-done { text-align: center; padding: 1rem 0; }
.her-done .auth-sub { max-width: 460px; margin: .5rem auto 1.2rem; }

/* her by MANSO — live chat (used on the her page and in the control centre) */
.her-req-summary { background: var(--color-surface, #fff); border: 1px solid var(--color-border); border-radius: 12px; padding: .7rem .85rem; margin: .9rem 0 .6rem; font-size: .95rem; line-height: 1.5; }
.her-req-veh { display: block; margin-top: .25rem; color: var(--color-text-secondary); font-size: .85rem; }
.her-chat { max-height: 320px; overflow-y: auto; display: flex; flex-direction: column; gap: .5rem; padding: .6rem; margin-top: .6rem; background: var(--color-bg, #f6f6fb); border: 1px solid var(--color-border); border-radius: 12px; }
.her-chat-empty { color: var(--color-text-tertiary); font-size: .9rem; text-align: center; margin: .8rem 0; }
.her-msg { max-width: 82%; padding: .5rem .7rem; border-radius: 12px; font-size: .92rem; line-height: 1.45; overflow-wrap: anywhere; }
.her-msg__who { display: block; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; opacity: .7; margin-bottom: .15rem; }
.her-msg--them { align-self: flex-start; background: #fff; border: 1px solid var(--color-border); }
.her-msg--me { align-self: flex-end; background: var(--color-royal-blue); color: #fff; }
.her-chat-form { display: flex; gap: .5rem; margin-top: .6rem; }
.her-chat-form input { flex: 1; min-width: 0; padding: .6rem .8rem; border: 1px solid var(--color-border); border-radius: 999px; font: inherit; font-size: .95rem; background: #fff; }
.her-chat-form button { flex: 0 0 auto; }
.her-msg__img { display: block; width: auto; max-width: min(180px, 100%); max-height: 200px; border-radius: 8px; margin-top: .35rem; }
.her-chat-attach { flex: 0 0 auto; width: 40px; height: 40px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--color-border); background: #fff; border-radius: 50%; font-size: 22px; line-height: 1; cursor: pointer; color: var(--color-royal-blue); }
.her-chat-attach:disabled { opacity: .55; cursor: default; }
.access-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .45rem .9rem; margin-top: .7rem; }
.access-perm { display: flex; align-items: center; gap: .45rem; font-size: .9rem; color: var(--color-text-secondary); cursor: pointer; }
.access-perm input { width: auto; margin: 0; }
.her-chat-toggle { margin-top: .7rem; background: none; border: 1px solid var(--color-border); border-radius: 999px; padding: .35rem .95rem; font: inherit; font-size: .85rem; font-weight: 600; color: var(--color-royal-blue); cursor: pointer; }
.her-chat-toggle:hover { background: var(--color-primary-alpha); }
.her-adm-chat[hidden] { display: none; }
.her-req-head { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: .75rem; background: none; border: 0; padding: .2rem 0; font: inherit; text-align: left; cursor: pointer; }
.her-req-title { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; min-width: 0; }
.her-req-when { flex: 0 0 auto; display: flex; align-items: center; gap: .4rem; color: var(--color-text-tertiary); font-size: .78rem; }
.her-req-caret { transition: transform .2s ease; font-size: .8rem; }
.her-req-head[aria-expanded="true"] .her-req-caret { transform: rotate(180deg); }
.her-req-body[hidden] { display: none; }
.her-req-body { padding-top: .5rem; }
.lead-vhead { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: .75rem; background: none; border: 0; padding: .3rem 0; font: inherit; text-align: left; cursor: pointer; }
.lead-vname { font-weight: 700; font-size: 1rem; min-width: 0; }
.lead-vcount { flex: 0 0 auto; display: flex; align-items: center; gap: .4rem; color: var(--color-text-tertiary); font-size: .85rem; }
.lead-vhead[aria-expanded="true"] .her-req-caret { transform: rotate(180deg); }
.lead-vbody[hidden] { display: none; }
.lead-vbody { padding-top: .5rem; }
.req-edit { width: 100%; display: flex; flex-direction: column; gap: .55rem; }
.req-edit__l { display: flex; flex-direction: column; gap: .25rem; font-size: .8rem; font-weight: 600; color: var(--color-text-secondary); }
.req-edit__l input, .req-edit__l textarea, .req-edit__l select { padding: .5rem .6rem; border: 1px solid var(--color-border); border-radius: 8px; font: inherit; font-size: .92rem; width: 100%; box-sizing: border-box; }
.req-edit__row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .55rem; }
.req-edit__actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .2rem; }
@media (max-width: 560px) { .req-edit__row { grid-template-columns: 1fr; } }
.dg-total { font-weight: 700; font-size: 1.05rem; margin: 0 0 1rem; color: var(--color-text); }
.dg-block { margin: 0 0 1.4rem; }
.dg-title { font-size: 1rem; margin: 0 0 .6rem; }
.dg-row { display: grid; grid-template-columns: 110px 1fr 92px; align-items: center; gap: .6rem; margin-bottom: .4rem; }
.dg-label { font-size: .85rem; color: var(--color-text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dg-track { background: var(--color-primary-alpha); border-radius: 999px; height: 14px; overflow: hidden; }
.dg-bar { display: block; height: 100%; background: linear-gradient(90deg, var(--color-royal-blue), #5B21B6); border-radius: 999px; }
.dg-val { font-size: .78rem; color: var(--color-text-secondary); text-align: right; white-space: nowrap; }
@media (max-width: 560px) {
  .dg-row { grid-template-columns: 80px 1fr 70px; gap: .4rem; }
  .dg-label { font-size: .78rem; }
  .dg-val { font-size: .7rem; }
}
.vd-tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 1.25rem; }
.vd-tab { border: 1px solid var(--color-border); background: #fff; border-radius: 999px; padding: .5rem 1.05rem; font: inherit; font-size: .9rem; font-weight: 600; color: var(--color-text-secondary); cursor: pointer; }
.vd-tab:hover { border-color: var(--color-royal-blue); }
.vd-tab.is-active { background: var(--color-royal-blue); color: #fff; border-color: var(--color-royal-blue); }

@media (max-width: 800px) {
  .her-hero { grid-template-columns: 1fr; text-align: center; }
  .her-hero__media { order: -1; }
  .her-hero__img { max-width: 440px; margin: 0 auto; aspect-ratio: 16 / 10; }
  .her-lead { margin-left: auto; margin-right: auto; }
}
@media (max-width: 700px) { .her-grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .auth-grid-2, .her-grid-3 { grid-template-columns: 1fr; } }

/* her by MANSO — Lavender & Magenta theme. Scoped to .her-page ONLY so the
   rest of the site keeps its royal-blue identity. Do not reuse these vars elsewhere. */
.her-page {
  --her-bg: #ECE6F9;
  --her-ink: #35205C;
  --her-muted: #746A96;
  --her-accent: #C13391;
  --her-btn: #B02A83;
  --her-btn-hover: #9A2472;
  --her-card: #F8F4FD;
  --her-card-border: #E5DAF4;
  background: var(--her-bg);
}
.her-page .her-title,
.her-page .her-sub,
.her-page .her-form-title,
.her-page .her-point > div strong { color: var(--her-ink); }
.her-page .her-tagline { color: var(--her-accent); }
.her-page .her-lead,
.her-page .her-explainer > p,
.her-page .her-point > div p { color: var(--her-muted); }
.her-page .account-role,
.her-page .her-photo-ok span { color: var(--her-accent); }
.her-page .her-dot { background: var(--her-btn); }
.her-page .her-request.account-card { background: var(--her-card); border-color: var(--her-card-border); }
.her-page .her-gate-note { background: #F3E7F5; color: #8E2C7E; }
.her-page .her-form textarea { background: #FDFBFE; border-color: var(--her-card-border); }
.her-page .her-form textarea:focus { border-color: var(--her-accent); outline-color: var(--her-accent); }
.her-page .btn-primary { background: var(--her-btn); border-color: var(--her-btn); box-shadow: 0 10px 28px rgba(176, 42, 131, .28); }
.her-page .btn-primary:hover { background: var(--her-btn-hover); border-color: var(--her-btn-hover); }
.her-page .btn-outline.her-upload { color: var(--her-btn); border-color: #D9A8CE; }
.her-page .her-photo-ok { background: #F3E7F5; }
.her-page .her-photo-ok span { color: var(--her-ink); }
.her-page .her-photo-remove { color: var(--her-accent); }
.her-page .her-photo-status { color: var(--her-muted); }
.her-page .her-req-summary { background: #FBF7FE; border-color: var(--her-card-border); color: var(--her-ink); }
.her-page .her-chat { background: #FBF7FE; border-color: var(--her-card-border); }
.her-page .her-msg--me { background: var(--her-btn); }
.her-page .her-chat-form input { border-color: var(--her-card-border); }
.her-page .her-chat-form input:focus { border-color: var(--her-accent); outline-color: var(--her-accent); }
.her-page .her-chat-attach { color: var(--her-accent); border-color: var(--her-card-border); }
.her-page .her-hero__img { box-shadow: 0 24px 60px rgba(53, 32, 92, .22); }

/* Profile-completion gate (hard, non-dismissible). */
html.pg-locked, html.pg-locked body { overflow: hidden !important; }
.pg-overlay { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: flex-start; justify-content: center; padding: max(2.5vh, 1rem) 1rem; background: rgba(17, 12, 40, 0.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); overflow-y: auto; overscroll-behavior: contain; }
.pg-modal { width: 100%; max-width: 460px; margin: auto; background: var(--color-surface, #fff); border-radius: 18px; box-shadow: var(--shadow-lg, 0 24px 60px rgba(0,0,0,.28)); padding: 1.6rem 1.5rem; }
@media (max-width: 480px) { .pg-modal { padding: 1.25rem 1.1rem; border-radius: 14px; } }
/* iOS Safari gives <input type="date"> an intrinsic width and centres its value,
   which overflows narrow fields. Normalise so it sits left and fills its box. */
.pg-modal input[type="date"], .auth-field input[type="date"], .acct-settings input[type="date"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; box-sizing: border-box; min-height: 46px;
  text-align: left; background-color: #fff;
}
.pg-modal input[type="date"]::-webkit-date-and-time-value { text-align: left; }

.vd-plan { font-size: var(--text-sm); color: var(--color-text-secondary); background: var(--color-primary-alpha); border: 1px solid rgba(31, 0, 98, 0.12); border-radius: var(--radius-lg); padding: var(--space-3) var(--space-4); margin-bottom: var(--space-5); }
.vd-plan a { color: var(--color-royal-blue); font-weight: 600; }

/* Admin dashboard reuses vendor-dashboard styles; small extras */
.admin-select { padding: var(--space-1-5) var(--space-2); border: 1.5px solid var(--color-border); border-radius: var(--radius-md); font-size: var(--text-xs); font-family: var(--font-body); }
.admin-tabs { display: flex; gap: var(--space-2); margin-bottom: var(--space-5); flex-wrap: wrap; }
.admin-tab { padding: var(--space-2) var(--space-4); border: 1.5px solid var(--color-border); border-radius: 999px; background: var(--color-surface); font-weight: 600; font-size: var(--text-sm); cursor: pointer; color: var(--color-text-secondary); }
.admin-tab.is-active { background: var(--color-royal-blue); border-color: var(--color-royal-blue); color: #FFFFFF; }

/* Founder business dashboard */
.founder-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
.founder-stat { border: 1px solid var(--color-border); border-radius: var(--radius-lg, 14px); padding: var(--space-4); background: var(--color-surface); }
.founder-stat__value { font-family: "Urbanist", sans-serif; font-weight: 800; font-size: 1.6rem; color: var(--color-royal-blue); line-height: 1.1; }
.founder-stat__label { font-weight: 600; font-size: var(--text-sm); margin-top: var(--space-1); }
.founder-stat__sub { font-size: var(--text-xs); color: var(--color-text-tertiary); margin-top: 2px; }
.founder-plans { border: 1px solid var(--color-border); border-radius: var(--radius-lg, 14px); overflow: hidden; }
.founder-planrow { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--color-border); }
.founder-planrow:last-child { border-bottom: 0; }
.founder-planrow__name { font-weight: 700; }
.founder-planrow__meta { color: var(--color-text-tertiary); font-size: var(--text-sm); margin-left: auto; margin-right: var(--space-4); }
.founder-planrow__total { font-weight: 700; color: var(--color-royal-blue); }

/* Team / admin access management */
.team-form { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: flex-end; margin-bottom: var(--space-4); }
.team-form .auth-field { margin: 0; flex: 1 1 200px; }
.team-admin { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-3) var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-lg, 12px); margin-bottom: var(--space-2); }
.team-admin__meta { font-size: var(--text-sm); color: var(--color-text-tertiary); }
.team-expiry { font-size: var(--text-xs); font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--color-surface-subtle); }
.team-expiry--ok { background: var(--color-success-light); color: var(--color-success-dark); }
.team-expiry--expired { background: var(--color-error-light); color: var(--color-error-dark); }

@media (max-width: 560px) {
  .founder-grid { grid-template-columns: 1fr 1fr; }
  .founder-planrow { flex-wrap: wrap; }
  .founder-planrow__meta { margin-left: 0; }
  .team-admin { flex-direction: column; align-items: flex-start; }
}

/* Vendor dashboard header actions */
.vd-head-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; }

/* Vendor private Health Score panel */
.vd-health { display: flex; align-items: center; gap: var(--space-4); margin: var(--space-3) 0; flex-wrap: wrap; }
.vd-health__meta { display: flex; flex-direction: column; gap: var(--space-1); }

/* Owner: all-vendors overview rows */
.ov-row { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-3) var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-lg, 14px); margin-bottom: var(--space-3); }
.ov-row__ring { flex: 0 0 auto; }
.ov-row__main { flex: 1; min-width: 0; }
.ov-row__name { font-family: 'Urbanist', sans-serif; font-weight: 700; font-size: 1.05rem; display: flex; align-items: center; gap: var(--space-2); }
.ov-row__actions { flex: 0 0 auto; }
.vd-listing__note { margin-top: 4px; font-size: var(--text-xs); color: var(--color-warning-dark); background: var(--color-warning-light); border-radius: 6px; padding: 4px 8px; display: inline-block; }
.vd-thumb { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; flex: 0 0 auto; background: var(--color-surface-subtle); }
.vd-thumb--empty { display: flex; align-items: center; justify-content: center; font-size: 8px; line-height: 1.1; text-align: center; color: var(--color-text-tertiary); border: 1px dashed var(--color-border); }
/* category-icon placeholder behind the photo */
.vd-thumb-wrap { position: relative; width: 52px; height: 52px; flex: 0 0 auto; }
.vd-thumb-wrap .vd-thumb { position: absolute; inset: 0; margin: 0; }
.vd-thumb--cat { display: flex; align-items: center; justify-content: center; background: var(--color-surface-subtle); color: var(--color-text-tertiary); }
.vd-thumb--cat svg { width: 22px; height: 22px; }
.vd-thumb--over { object-fit: cover; }
.img-field { display: flex; align-items: center; gap: var(--space-3); }
.img-field__preview { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; border: 1px solid var(--color-border); }

/* Health Score tier explainer (public vendor profile) */
.tier-legend { margin-top: var(--space-5); border: 1px solid var(--color-border); border-radius: var(--radius-2xl, 18px); padding: var(--space-5) var(--space-6); background: var(--color-surface); }
.tier-legend__title { font-family: 'Urbanist', sans-serif; font-size: var(--text-lg); margin: 0 0 var(--space-2); }
.tier-legend__intro { color: var(--color-text-secondary); font-size: var(--text-sm); margin: 0 0 var(--space-4); }
.tier-legend__rows { display: grid; gap: 6px; }
.tier-legend__row { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-3); border-radius: var(--radius-md, 10px); }
.tier-legend__row.is-active { background: var(--color-primary-alpha, rgba(31,0,98,0.08)); }
.tier-legend__name { font-weight: 700; font-family: 'Urbanist', sans-serif; flex: 1; }
.tier-legend__range { color: var(--color-text-tertiary); font-size: var(--text-sm); font-weight: 600; }
.tier-dot { width: 14px; height: 14px; border-radius: 50%; flex: 0 0 auto; box-shadow: 0 0 0 3px rgba(0,0,0,0.04); }
.tier-dot--elite { background: var(--color-elite, #7C3AED); }
.tier-dot--platinum { background: var(--color-silver-tier, #9AA4B2); }
.tier-dot--gold { background: var(--color-gold, #D4A017); }
.tier-dot--silver { background: var(--color-silver-tier, #9AA4B2); }
.tier-dot--bronze { background: var(--color-bronze, #B45309); }
.tier-dot--improve { background: var(--color-improvement, #9AA4B2); }

/* Save (favourite) button state */
.btn-contact--save { cursor: pointer; }
.btn-contact--save.is-saved { background: var(--color-primary-alpha, rgba(31,0,98,0.10)); color: var(--color-royal-blue); border-color: var(--color-royal-blue); }
.btn-contact--save.is-saved .fav-label::before { content: '\2713 '; }
.fav-count { color: var(--color-royal-blue); font-weight: 600; }

/* Vendor-uploaded photos on cards + detail */
.listing-card__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
/* Featured promotion badge */
.featured-badge {
  position: absolute; top: .7rem; left: .7rem; z-index: 3;
  display: inline-flex; align-items: center; gap: .25rem;
  padding: .2rem .55rem; border-radius: 999px;
  font-size: .72rem; font-weight: 800; letter-spacing: .02em;
  color: #1a1206; background: linear-gradient(135deg, #ffd66b, #f5b301);
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
/* Inline featured chip for the vendor card's badges row (no overlap with the ring) */
.featured-chip { display: inline-flex; align-items: center; gap: .2rem; padding: .15rem .5rem; border-radius: 999px; font-size: .7rem; font-weight: 800; color: #1a1206; background: linear-gradient(135deg, #ffd66b, #f5b301); }
.vendor-card.is-featured { box-shadow: 0 0 0 2px #f5b301, var(--shadow-md, 0 8px 24px rgba(0,0,0,.1)); }
/* category-icon placeholder shown when there is no photo (or it fails) */
.listing-card__ph { position: absolute; inset: 0; z-index: 0; display: flex; align-items: center; justify-content: center; color: var(--color-royal-blue, #25389c); opacity: .22; }
.listing-card__ph svg { width: 38%; height: 38%; }
.listing-card__media .listing-card__cat, .listing-card__media .listing-availability, .listing-card__media .card-fav { z-index: 2; }
.listing-gallery__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.listing-gallery__main { position: relative; overflow: hidden; }

/* Heart save button on part cards */
.listing-card__media { position: relative; }
.card-fav { position: absolute !important; top: 12px !important; bottom: auto !important; right: 12px !important; left: auto !important; width: 42px !important; height: 42px !important; display: inline-flex !important; align-items: center !important; justify-content: center !important; padding: 0 !important; border: 0; border-radius: 999px !important; background: #fff; color: #cbd5e1; cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,.2); z-index: 5; transition: transform .12s ease, color .12s ease; }
.card-fav:hover { transform: scale(1.1); color: #fda4af; }
.card-fav svg { width: 24px !important; height: 24px !important; }
.card-fav.is-saved { color: #e11d48; }
.card-fav.is-saved svg { animation: heart-pop .32s ease; }
@keyframes heart-pop { 0% { transform: scale(1); } 40% { transform: scale(1.4); } 100% { transform: scale(1); } }
/* move the stock badge to bottom-left so it never collides with the heart */
.listing-card__media .listing-availability { top: auto; bottom: 12px; left: 12px; right: auto; }
.listing-card__years { font-size: .8rem; color: var(--color-text-tertiary, #7a7a88); margin: .1rem 0 0; display: block; min-height: 1.2em; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Health ring: keep tier colour-coding, but Elite = MANSO brand and Gold is
   a healthy green (not an alarming orange) since 80 is a strong starting score. */
.health-score-ring-progress.elite    { stroke: var(--color-royal-blue) !important; }
.health-score-ring-progress.gold     { stroke: #16a34a !important; }
.health-score-ring-progress.silver   { stroke: #0ea5e9 !important; }
.health-score-ring-progress.bronze   { stroke: #f59e0b !important; }
/* Tier name text: gold = green to match the ring (not orange) */
.health-score-tier-name.gold { color: #16a34a !important; }

/* Health Score breakdown rows */
.hs-break { border: 1px solid var(--color-border); border-radius: 12px; overflow: hidden; margin-top: .5rem; }
.hs-row { display: flex; align-items: center; justify-content: space-between; padding: .6rem .9rem; border-bottom: 1px solid var(--color-border); font-size: .88rem; }
.hs-row__label em { color: var(--color-text-tertiary, #8a8a96); font-style: normal; font-size: .82em; margin-left: .15rem; }
.hs-row__pts { font-weight: 700; font-variant-numeric: tabular-nums; }
.hs-row__pts.up { color: #16a34a; }
.hs-row__pts.down { color: #ef4444; }
.hs-row--base { background: rgba(31,0,98,.03); }
.hs-row--total { background: rgba(31,0,98,.06); font-weight: 700; }
.hs-row--total .hs-row__pts { color: var(--color-royal-blue); }
.hs-break .form-note { padding: .6rem .9rem; margin: 0; border-top: 1px solid var(--color-border); }

/* Smaller partner badges + a small "i" explainer (hover for the tier meaning) */
.gold-badge, .platinum-badge, .elite-badge { font-size: .66rem; padding: .2rem .55rem; gap: .28rem; letter-spacing: .01em; }
.gold-badge svg, .platinum-badge svg, .elite-badge svg { width: 12px; height: 12px; }
.tier-badge-wrap { display: inline-flex; align-items: center; gap: .35rem; }
.tier-info-btn { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; padding: 0; border-radius: 50%; border: 1.5px solid var(--color-royal-blue); background: #fff; color: var(--color-royal-blue); font-size: 12px; font-style: normal; font-weight: 700; font-family: Georgia, 'Times New Roman', serif; line-height: 1; cursor: pointer; flex: 0 0 auto; }
.tier-info-btn:hover { background: var(--color-royal-blue); color: #fff; }
.tier-tip-pop { position: fixed; z-index: 4000; max-width: 280px; background: #1a1a2e; color: #fff; font-size: .82rem; line-height: 1.5; padding: .8rem .95rem; border-radius: 10px; box-shadow: 0 12px 32px rgba(0,0,0,.3); }

/* Account / vendor ID search box (admin) */
/* Back-to-account bar (dashboards) */
.vd-backbar { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.vd-back { display: inline-flex; align-items: center; gap: .35rem; background: var(--color-royal-blue); color: #fff !important; text-decoration: none; font-weight: 600; font-size: .85rem; padding: .5rem .95rem; border-radius: 999px; margin: 0; border: 0; cursor: pointer; }
.vd-back:hover { filter: brightness(1.12); color: #fff !important; }
.vd-backbar .account-role { margin: 0; }

.acct-search { margin-bottom: 1rem; }
.acct-search input { width: 100%; max-width: 440px; padding: .6rem .85rem; border: 1px solid var(--color-border); border-radius: 10px; font: inherit; }

/* Mobile hamburger: keep header + menu above page content, visible bars */
.site-header { z-index: 1000; }
.nav-toggle__bar { background: var(--color-text-primary); }
.site-header.is-transparent .nav-toggle__bar { background: #fff; }
.drawer__backdrop { z-index: 1098; }
.drawer__panel { z-index: 1099; background: var(--color-surface, #fff); }
.drawer__body .nav__link, .drawer__head .brand__name { color: var(--color-text-primary) !important; }

/* Slimmer footer */
.site-footer { padding-top: 2.5rem; padding-bottom: 1.5rem; }
.footer__top { padding-bottom: 1.75rem; gap: 2.5rem; }
.footer__columns { gap: 2rem; }
.footer__bottom { padding-top: 1rem; }

/* Country-code phone picker */
.phone-wrap { display: flex !important; gap: .4rem; align-items: stretch; width: 100%; }
.phone-wrap .phone-num { flex: 1 1 auto !important; min-width: 0; width: auto !important; }

/* searchable country-code picker */
.phone-cc-field { position: relative; flex: 0 0 auto; }
.phone-cc {
  display: flex; align-items: center; gap: .35rem;
  height: 100%; min-height: 44px; padding: 0 .6rem;
  border: 1px solid var(--color-border); border-radius: 10px;
  background: #fff; cursor: pointer; font-size: .9rem; line-height: 1; white-space: nowrap;
}
.phone-cc:hover { border-color: var(--color-royal-blue); }
.phone-cc-flag { font-size: 1.1rem; }
.phone-cc-code { font-weight: 600; color: var(--color-text, #1a1a2e); }
.phone-cc-caret { font-size: .7rem; opacity: .6; margin-left: .1rem; }
.phone-cc-panel {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 60;
  width: 270px; max-width: 78vw; background: #fff;
  border: 1px solid var(--color-border); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,.16); padding: .5rem; overflow: hidden;
}
.phone-cc-search {
  width: 100%; box-sizing: border-box; padding: .5rem .6rem; margin-bottom: .4rem;
  border: 1px solid var(--color-border); border-radius: 8px; font-size: .85rem;
}
.phone-cc-search:focus { outline: none; border-color: var(--color-royal-blue); }
.phone-cc-list { list-style: none; margin: 0; padding: 0; max-height: 240px; overflow-y: auto; }
.phone-cc-opt {
  display: flex; align-items: center; gap: .5rem;
  padding: .45rem .5rem; border-radius: 8px; cursor: pointer; font-size: .85rem;
}
.phone-cc-opt:hover { background: var(--color-surface-2, #f2f3f7); }
.phone-cc-opt.is-sel { background: rgba(37,56,156,.08); }
.phone-cc-opt .phone-cc-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phone-cc-opt .phone-cc-dial { color: var(--color-muted, #6b7280); font-variant-numeric: tabular-nums; }
.phone-cc-empty { padding: .6rem .5rem; color: var(--color-muted, #6b7280); font-size: .85rem; }

/* Keep the header on one line now that it has more items (extra nav link + bell) */
.header__inner { gap: .8rem; max-width: 1560px; padding-inline: 1.1rem; }
.header__actions { gap: .3rem; }
.nav__list { gap: 0; }
.nav__link { padding-left: .5rem; padding-right: .5rem; font-size: .9rem; }
.site-header .lang-select { font-size: .78rem; }
.notif-bell svg { width: 20px; height: 20px; }
/* Collapse to the hamburger before the full nav (7 links + tagline + actions)
   can overflow, so "My Account" is never cut off. Bell stays visible. */
@media (max-width: 1300px) {
  /* Works for BOTH header structures: the current one (.header__inner, built by
     the latest nav.js) and the older one still live on the server (.container).
     Forcing the row + a single auto margin on the brand pins the brand hard-left
     and packs the bell + hamburger hard-right, with no centring. High specificity
     + !important so it wins even if shared.css on the server is stale. */
  .site-header .header__inner,
  .site-header .container {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    /* Fill the header: the base rule's auto side-margins + flex-grow:0 were
       collapsing this to ~300px and centring it (hamburger "stuck middle"). */
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    flex: 1 1 auto !important;
  }
  .site-header .nav,
  .site-header .header__actions { display: none !important; }
  /* Pin the hamburger to the far right by forcing it to be the last flex item
     and giving it an auto left margin. This depends ONLY on .nav-toggle (which
     exists in both the old and new header), so it works regardless of the
     brand's class name or which nav.js is deployed. */
  .site-header .nav-toggle {
    display: inline-flex !important;
    order: 99 !important;
    margin-left: auto !important;
  }
  .site-header .brand { order: 0 !important; margin-left: 0 !important; }
}

/* ---- Marketplace Demand Index ---- */
.mdi-section, .mdi { margin-top: 2rem; }
.mdi-head { margin-bottom: 1rem; border-left: 4px solid var(--color-royal-blue); padding-left: .85rem; }
.mdi-head__top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.mdi-download { background: var(--color-royal-blue); color: #fff; border: 0; border-radius: 10px; padding: .5rem .95rem; font-weight: 600; font-size: .82rem; cursor: pointer; white-space: nowrap; }
.mdi-download:hover { filter: brightness(1.12); }
.mdi-title { font-size: 1.1rem; margin: 0 0 .35rem; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.mdi-count { font-size: .72rem; font-weight: 600; color: var(--color-royal-blue); background: rgba(31,0,98,.08); border-radius: 999px; padding: .12rem .55rem; }
.mdi-intro { font-size: .85rem; color: var(--color-text-tertiary, #5a5a6a); margin: 0; max-width: 60ch; }
.mdi-tablewrap { overflow-x: auto; border: 1px solid var(--color-border); border-radius: 12px; }
.mdi-table { width: 100%; border-collapse: collapse; font-size: .85rem; min-width: 640px; }
.mdi-table th, .mdi-table td { padding: .6rem .75rem; text-align: left; border-bottom: 1px solid var(--color-border); vertical-align: top; }
.mdi-table thead th { background: rgba(31,0,98,.04); font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; color: var(--color-text-tertiary, #5a5a6a); font-weight: 700; }
.mdi-table tbody tr:last-child td { border-bottom: 0; }
.mdi-table tbody tr:hover { background: rgba(31,0,98,.025); }
.mdi-table .mdi-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mdi-part { font-weight: 600; }
.mdi-veh { font-size: .78rem; }
.mdi-sub { font-size: .72rem; color: var(--color-text-tertiary, #7a7a88); margin-top: .1rem; }
.mdi-opp { display: inline-block; font-size: .72rem; font-weight: 700; padding: .18rem .55rem; border-radius: 999px; white-space: nowrap; }
.mdi-opp--vh { background: #dcfce7; color: #15803d; }
.mdi-opp--hi { background: #e0f2fe; color: #0369a1; }
.mdi-opp--md { background: #fef9c3; color: #a16207; }
.mdi-opp--lo { background: #f1f5f9; color: #64748b; }
.mdi-empty { padding: 1.5rem; text-align: center; border: 1px dashed var(--color-border); border-radius: 12px; }
.mdi-empty p { margin: 0; }
.mdi-empty__sub { font-size: .82rem; color: var(--color-text-tertiary, #7a7a88); margin-top: .35rem !important; }
.mdi-searches { margin-top: 1.75rem; }
.mdi-subtitle { font-size: 1rem; margin: 0 0 .35rem; }
.mdi-search-list { display: flex; flex-direction: column; border: 1px solid var(--color-border); border-radius: 12px; overflow: hidden; margin-top: .6rem; }
.mdi-search-row { display: flex; align-items: center; justify-content: space-between; padding: .55rem .85rem; border-bottom: 1px solid var(--color-border); font-size: .88rem; }
.mdi-search-row:last-child { border-bottom: 0; }
.mdi-search-count { font-weight: 700; color: var(--color-royal-blue); }

/* ---- Parts Wanted board ---- */
.pw-head { margin-bottom: 1.25rem; }
.pw-intro { font-size: .9rem; color: var(--color-text-tertiary, #5a5a6a); max-width: 65ch; margin: 0 0 1rem; }
.pw-toolbar { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.pw-search { flex: 1 1 260px; max-width: 360px; padding: .6rem .85rem; border: 1px solid var(--color-border); border-radius: 10px; font: inherit; }
.pw-count { font-size: .8rem; font-weight: 600; color: var(--color-text-tertiary, #7a7a88); }
.pw-list { display: grid; gap: 1rem; }
.pw-card { display: flex; gap: 1rem; align-items: flex-start; justify-content: space-between; flex-wrap: wrap;
  border: 1px solid var(--color-border); border-radius: 14px; padding: 1.1rem 1.25rem; background: var(--color-surface, #fff); }
.pw-card__main { flex: 1 1 320px; min-width: 0; }
.pw-card__part { font-size: 1.02rem; margin: 0 0 .2rem; }
.pw-card__veh { font-size: .88rem; color: var(--color-text); margin: 0 0 .5rem; font-weight: 600; }
.pw-card__meta { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .5rem; }
.pw-tag { font-size: .72rem; font-weight: 700; padding: .16rem .5rem; border-radius: 999px; background: rgba(31,0,98,.07); color: var(--color-royal-blue); }
.pw-tag--open { background: #dcfce7; color: #15803d; }
.pw-date { font-size: .74rem; color: var(--color-text-tertiary, #8a8a96); }
.pw-card__desc { font-size: .85rem; color: var(--color-text-tertiary, #5a5a6a); margin: 0; }
.pw-card__action { flex: 0 0 auto; }
@media (max-width: 560px) { .pw-card__action { width: 100%; } .pw-card__action .btn { width: 100%; } }
/* Staff edit form on the Parts Wanted board */
.pw-card--edit { flex-direction: column; align-items: stretch; }
.pw-edit__grid { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.pw-edit__f { display: flex; flex-direction: column; gap: .2rem; font-size: .76rem; color: var(--color-text-tertiary, #6a6a78); }
.pw-edit__f--full { margin-top: .6rem; }
.pw-edit__f input { padding: .5rem .6rem; border: 1px solid var(--color-border); border-radius: 8px; font: inherit; color: var(--color-text); }

/* ---- Notification bell ---- */
.notif { position: relative; display: inline-flex; align-items: center; }
.notif-bell { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 0; background: #fff; color: var(--color-royal-blue); cursor: pointer; border-radius: 999px; box-shadow: 0 1px 5px rgba(0,0,0,.14); }
.notif-bell:hover { background: var(--color-light-gray, #f0f0f4); }
.notif-bell svg { width: 20px; height: 20px; }
.site-header.is-transparent .notif-bell { color: var(--color-royal-blue); background: #fff; }
.notif-bell svg { width: 21px; height: 21px; }
.notif-badge { position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: #e11d48; color: #fff; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; box-shadow: 0 0 0 2px var(--color-surface, #fff); }
.notif-panel { position: fixed; top: 66px; right: 14px; width: 340px; max-width: 92vw; background: var(--color-surface, #fff); color: var(--color-text); border: 1px solid var(--color-border); border-radius: 14px; box-shadow: 0 18px 50px rgba(0,0,0,.22); z-index: 2000; overflow: hidden; }
.notif-panel__head { display: flex; align-items: center; justify-content: space-between; padding: .75rem 1rem; border-bottom: 1px solid var(--color-border); font-weight: 700; font-size: .9rem; }
.notif-readall { border: 0; background: none; color: var(--color-royal-blue); font-size: .78rem; font-weight: 600; cursor: pointer; }
.notif-list { max-height: 380px; overflow-y: auto; }
.notif-item { display: flex; gap: .6rem; padding: .75rem 1rem; border-bottom: 1px solid var(--color-border); text-decoration: none; color: inherit; }
.notif-item:last-child { border-bottom: 0; }
.notif-item:hover { background: rgba(31,0,98,.03); }
.notif-item.is-unread { background: rgba(31,0,98,.045); }
.notif-item__dot { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 999px; margin-top: .35rem; background: transparent; }
.notif-item__dot.is-unread { background: var(--color-royal-blue); }
.notif-item__title { font-weight: 600; font-size: .85rem; }
.notif-item__text { font-size: .8rem; color: var(--color-text-tertiary, #5a5a6a); margin-top: .1rem; }
.notif-item__time { font-size: .72rem; color: var(--color-text-tertiary, #8a8a96); margin-top: .25rem; }
.notif-empty { padding: 1.75rem 1rem; text-align: center; font-size: .85rem; color: var(--color-text-tertiary, #8a8a96); }

/* ---- Bulk request group (admin) ---- */
.bulk-details { margin-top: .5rem; }
.bulk-details > summary { cursor: pointer; color: var(--color-royal-blue); font-weight: 600; font-size: .82rem; list-style: none; display: inline-flex; align-items: center; gap: .35rem; }
.bulk-details > summary::before { content: '▸'; font-size: .7rem; transition: transform .15s; }
.bulk-details[open] > summary::before { transform: rotate(90deg); }
.bulk-details > summary::-webkit-details-marker { display: none; }

.ov-sample { font-size: var(--text-2xs, 10px); font-weight: 700; letter-spacing: 0.08em; background: var(--color-warning-light); color: var(--color-warning-dark); padding: 2px 7px; border-radius: 999px; }
.ov-id { font-family: 'Inter', sans-serif; font-weight: 600; font-size: var(--text-xs); color: var(--color-text-tertiary); }
@media (max-width: 560px) {
  .ov-row { flex-wrap: wrap; }
  .ov-row__actions { width: 100%; }
  .ov-row__actions .btn { width: 100%; }
}

/* Bulk upload */
.bulk-steps { display: grid; gap: var(--space-3); margin: var(--space-4) 0; }
.bulk-step { display: flex; gap: var(--space-3); align-items: flex-start; border: 1px solid var(--color-border); border-radius: var(--radius-lg, 12px); padding: var(--space-3) var(--space-4); }
.bulk-step__n { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 999px; background: var(--color-royal-blue); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.bulk-step .btn { margin-top: var(--space-2); }
.bulk-summary { font-size: var(--text-sm); margin: var(--space-3) 0; }
.bulk-table-wrap { overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius-lg, 12px); }
.bulk-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.bulk-table th, .bulk-table td { text-align: left; padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--color-border); white-space: nowrap; }
.bulk-table thead th { background: var(--color-surface-subtle); font-weight: 700; }
/* Pin the Remove column to the right so it's reachable without scrolling */
.bulk-table th:last-child, .bulk-table td:last-child { position: sticky; right: 0; background: #fff; box-shadow: -6px 0 6px -6px rgba(0,0,0,.14); }
.bulk-table thead th:last-child { background: var(--color-surface-subtle); }
.bulk-table tr.bulk-bad td:last-child { background: var(--color-error-light); }
.bulk-table tr.bulk-bad td { background: var(--color-error-light); }

/* Bulk upload — drop zone + column-mapping wizard */
.bulk-drop { border: 2px dashed var(--color-border); border-radius: var(--radius-lg, 14px); padding: var(--space-5); text-align: center; margin: var(--space-4) 0; }
.map-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); margin: var(--space-3) 0; }
.map-row { display: flex; flex-direction: column; gap: 4px; }
.map-row label { font-size: var(--text-sm); font-weight: 600; color: var(--color-text-secondary); }
.map-row select { padding: var(--space-2) var(--space-3); border: 1.5px solid var(--color-border); border-radius: var(--radius-md, 10px); font: inherit; background: var(--color-surface); }
@media (max-width: 560px) { .map-grid { grid-template-columns: 1fr; } }

/* Admin grouped pending listings */
.admin-group { border: 1px solid var(--color-border); border-radius: var(--radius-lg, 12px); padding: var(--space-3) var(--space-4); margin-bottom: var(--space-4); }
.admin-group__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-3); flex-wrap: wrap; }
.admin-group__title { margin: 0; font-size: 1.05rem; }
.admin-group__count { font-size: var(--text-xs); font-weight: 600; color: var(--color-text-tertiary); margin-left: var(--space-2); }

/* Subscription controls (admin vendor detail) */
.sub-controls { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: flex-end; margin-top: var(--space-3); }
.sub-date-label { display: flex; flex-direction: column; gap: 4px; font-size: var(--text-sm); font-weight: 600; color: var(--color-text-secondary); }
.sub-date-label input { padding: var(--space-2) var(--space-3); border: 1.5px solid var(--color-border); border-radius: var(--radius-md, 10px); font: inherit; }

@media (max-width: 560px) {
  .vd-stats { grid-template-columns: 1fr 1fr; }
  .vd-listing { flex-direction: column; align-items: flex-start; }
  .vd-listing__actions { width: 100%; flex-wrap: wrap; }
  .vd-listing__actions .btn { flex: 0 0 auto; white-space: nowrap; }
  .vd-listing__actions .admin-select { flex: 1 1 140px; min-width: 0; }
  .feat-controls { width: 100%; }
  .feat-controls .sub-date-label, .feat-controls input[type="date"] { width: 100%; }
  .feat-actions .btn { flex: 1; }
}
/* lead lifecycle selects sit comfortably on a row */
.vd-listing__actions .admin-select { padding: .35rem .5rem; font-size: var(--text-xs); border: 1px solid var(--color-border); border-radius: 8px; background: #fff; }

.auth-social {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.btn-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  cursor: pointer;
  transition:
    border-color var(--duration-fast) var(--ease-out),
    background var(--duration-fast) var(--ease-out),
    transform var(--duration-fast) var(--ease-out);
}

.btn-social:hover {
  border-color: var(--color-border-strong);
  background: var(--color-surface-subtle);
  transform: translateY(-1px);
}

.btn-social svg { width: 20px; height: 20px; flex-shrink: 0; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-5) 0;
  color: var(--color-text-tertiary);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

.auth-form { display: flex; flex-direction: column; gap: var(--space-4); }

.auth-field { display: flex; flex-direction: column; gap: var(--space-1-5); }

.auth-field label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-secondary);
}

.auth-field input {
  width: 100%;
  padding: var(--space-3) var(--space-3-5);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  font-family: var(--font-body);
  color: var(--color-text-primary);
  background: var(--color-surface);
  transition: border-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
}

.auth-field input::placeholder { color: var(--color-text-disabled); }

.auth-field input:focus {
  outline: none;
  border-color: var(--color-royal-blue);
  box-shadow: 0 0 0 3px var(--color-primary-alpha);
}

.auth-submit { width: 100%; margin-top: var(--space-2); justify-content: center; }

.auth-foot {
  text-align: center;
  margin-top: var(--space-5);
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
}

.auth-switch {
  background: none;
  border: none;
  color: var(--color-royal-blue);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: inherit;
  cursor: pointer;
}

.auth-switch:hover { text-decoration: underline; }

.auth-note {
  margin-top: var(--space-4);
  text-align: center;
  font-size: var(--text-xs);
  line-height: 1.5;
  color: var(--color-text-tertiary);
}

.auth-note a { color: var(--color-royal-blue); font-weight: 600; }


/* =====================================================================
   5. RESPONSIVE
   ===================================================================== */

@media (max-width: 480px) {
  .auth-card { padding: 1.5rem 1.25rem; }
  .auth-title { font-size: var(--text-2xl); }
}


/* =====================================================================
   6. MARKETPLACE (browse parts)
   ===================================================================== */

.marketplace-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: clamp(1.25rem, 3vw, 2.25rem);
  align-items: start;
}

.mk-filters {
  position: sticky;
  top: calc(var(--nav-height) + 1rem);
  /* When the filter list is taller than the screen (e.g. with Country/City/
     Area added), let the sidebar scroll its OWN content so Price + Search stay
     reachable, instead of being stuck below the fold. */
  max-height: calc(100vh - var(--nav-height) - 2rem);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.mk-filters__card {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl);
  padding: var(--space-5);
  box-shadow: var(--shadow-xs);
}

.mk-field { display: flex; flex-direction: column; gap: var(--space-1-5); }

.mk-field label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-tertiary);
}

.mk-field input,
.mk-field select,
.mk-sort select {
  width: 100%;
  padding: var(--space-2-5) var(--space-3);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  font-family: var(--font-body);
  color: var(--color-text-primary);
  background: var(--color-surface);
  transition: border-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
}

.mk-field input:focus,
.mk-field select:focus,
.mk-sort select:focus {
  outline: none;
  border-color: var(--color-royal-blue);
  box-shadow: 0 0 0 3px var(--color-primary-alpha);
}

.mk-clear { margin-top: var(--space-1); width: 100%; }

.mk-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
  flex-wrap: wrap;
}

.mk-count { font-size: var(--text-sm); font-weight: 600; color: var(--color-text-secondary); }

.mk-sort { display: flex; align-items: center; gap: var(--space-2); }
.mk-sort label { font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; color: var(--color-text-tertiary); }
.mk-sort select { width: auto; padding-right: var(--space-6); }

.mk-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

/* Searchable brand combobox */
.combo { position: relative; }
.combo__list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 60;
  max-height: 260px;
  overflow-y: auto;
  margin: 0;
  padding: var(--space-1);
  list-style: none;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.combo__item {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.combo__item:hover { background: var(--color-surface-subtle); }
.combo__item.is-active { background: var(--color-primary-alpha); color: var(--color-royal-blue); font-weight: 600; }
.combo__empty { padding: var(--space-3); font-size: var(--text-sm); color: var(--color-text-tertiary); text-align: center; }

.mk-empty {
  text-align: center;
  padding: clamp(2.5rem, 6vw, 4.5rem) var(--space-4);
  background: var(--color-surface);
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-2xl);
}

.mk-empty h3 { font-family: var(--font-heading); font-size: var(--text-xl); color: var(--color-text-primary); margin-bottom: var(--space-2); }
.mk-empty p { font-size: var(--text-sm); color: var(--color-text-tertiary); max-width: 46ch; margin: 0 auto var(--space-5); line-height: 1.6; }

.pager { display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: center; margin-top: var(--space-8); }

.pager__btn {
  min-width: 40px;
  height: 40px;
  padding: 0 var(--space-3);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  font-weight: 600;
  font-size: var(--text-sm);
  cursor: pointer;
  transition: border-color var(--duration-fast) var(--ease-out), background var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
}

.pager__btn:hover:not(:disabled) { border-color: var(--color-royal-blue); color: var(--color-royal-blue); }
.pager__btn.is-active { background: var(--color-royal-blue); border-color: var(--color-royal-blue); color: #FFFFFF; }
.pager__btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* readable dropdown options (avoid white-on-white) */
.mk-field select option, .mk-sort select option { color: #0D0D0D; background: #FFFFFF; }

@media (max-width: 860px) {
  .marketplace-layout { grid-template-columns: 1fr; }
  /* On mobile the sidebar is NOT sticky, so it must not be an inner scroll
     box. Without this, max-height + overflow-y:auto + overscroll:contain
     trap the touch drag (Android can't scroll the page unless dragging the
     extreme edge). Release the cap so the whole page scrolls naturally. */
  .mk-filters { position: static; max-height: none; overflow: visible; overscroll-behavior: auto; }
  .mk-filters__card { flex-direction: row; flex-wrap: wrap; }
  .mk-field { flex: 1 1 160px; }
  .mk-clear { flex: 1 1 100%; }
}


/* =====================================================================
   7. BREADCRUMB (light background variant) + shared blocks
   ===================================================================== */

.breadcrumb--dark { color: var(--color-text-tertiary); margin-bottom: var(--space-5); }
.breadcrumb--dark a { color: var(--color-text-secondary); }
.breadcrumb--dark a:hover { color: var(--color-royal-blue); }
.breadcrumb--dark span { opacity: 0.5; }

.listing-block { margin-top: clamp(2rem, 4vw, 3rem); }
.listing-block__title {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
  margin-bottom: var(--space-5);
}

/* Tracked contact buttons (Call = brand blue, WhatsApp = WA green) */
.btn-contact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-lg);
  font-weight: 700;
  font-size: var(--text-sm);
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out), filter var(--duration-fast) var(--ease-out);
}
.btn-contact svg { width: 18px; height: 18px; }
.btn-contact--call { background: var(--color-royal-blue); color: #FFFFFF; box-shadow: var(--shadow-primary); }
.btn-contact--call:hover { transform: translateY(-2px); box-shadow: var(--shadow-primary-lg); }
.btn-contact--wa { background: #25D366; color: #FFFFFF; }
.btn-contact--wa:hover { transform: translateY(-2px); filter: brightness(1.05); }


/* =====================================================================
   8. LISTING DETAIL (PRD §5.5)
   ===================================================================== */

.listing-detail {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.listing-gallery__main {
  position: relative;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-2xl);
  background:
    radial-gradient(circle at 30% 25%, var(--color-primary-alpha-md), transparent 60%),
    var(--color-surface-subtle);
  border: 1px solid var(--color-border);
  overflow: hidden;
}
.listing-gallery__icon { width: 30%; height: 30%; color: var(--color-royal-blue); opacity: 0.55; }
.listing-gallery__cat {
  position: absolute; top: var(--space-4); left: var(--space-4);
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-size: var(--text-xs); font-weight: 600; color: var(--color-royal-blue);
  background: rgba(255,255,255,0.85); padding: var(--space-1-5) var(--space-3); border-radius: 999px;
  backdrop-filter: blur(4px);
}
.listing-gallery__cat svg { width: 15px; height: 15px; }
.listing-gallery__main .listing-availability { position: absolute; top: var(--space-4); right: var(--space-4); }
.listing-gallery__note { margin-top: var(--space-3); font-size: var(--text-xs); color: var(--color-text-tertiary); text-align: center; }

.listing-info__condition { font-size: var(--text-xs); font-weight: 600; letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--color-text-tertiary); }
.listing-info__name { font-size: clamp(1.6rem, 3vw, 2.25rem); font-weight: 800; letter-spacing: -0.02em; color: var(--color-text-primary); margin: var(--space-2) 0; line-height: 1.15; }
.listing-info__fit, .listing-info__oem { font-size: var(--text-sm); color: var(--color-text-tertiary); margin-bottom: var(--space-1); }
.listing-info__oem strong { color: var(--color-text-primary); }
.listing-info__pricerow { display: flex; align-items: baseline; gap: var(--space-4); flex-wrap: wrap; margin: var(--space-4) 0; }
.listing-info__price { font-family: var(--font-heading); font-size: var(--text-4xl); font-weight: 900; letter-spacing: -0.03em; color: var(--color-royal-blue); }

.vendor-mini { border: 1px solid var(--color-border); border-radius: var(--radius-2xl); padding: var(--space-5); background: var(--color-surface); box-shadow: var(--shadow-xs); }
.vendor-mini__id { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.vendor-mini__name { font-family: var(--font-heading); font-weight: 700; color: var(--color-text-primary); }
.vendor-mini__name:hover { color: var(--color-royal-blue); }
.vendor-mini__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 2px var(--space-1); font-size: var(--text-xs); color: var(--color-text-tertiary); margin-top: 2px; }
.vendor-mini__meta svg { width: 13px; height: 13px; }
.listing-contact { display: flex; gap: var(--space-3); margin-top: var(--space-4); }
.listing-contact .btn-contact { flex: 1; }
.listing-contact__note { font-size: var(--text-xs); color: var(--color-text-tertiary); margin-top: var(--space-3); text-align: center; }

.listing-actions { display: flex; gap: var(--space-4); margin-top: var(--space-4); }
.listing-action { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); font-weight: 600; color: var(--color-text-secondary); background: none; border: none; cursor: pointer; }
.listing-action svg { width: 16px; height: 16px; }
.listing-action:hover { color: var(--color-royal-blue); }

.spec-table { width: 100%; border-collapse: collapse; border: 1px solid var(--color-border); border-radius: var(--radius-lg); overflow: hidden; }
.spec-table th, .spec-table td { text-align: left; padding: var(--space-3) var(--space-4); font-size: var(--text-sm); border-bottom: 1px solid var(--color-divider); }
.spec-table th { width: 38%; color: var(--color-text-tertiary); font-weight: 600; background: var(--color-surface-subtle); }
.spec-table td { color: var(--color-text-primary); }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: none; }
.listing-desc { font-size: var(--text-md); line-height: 1.7; color: var(--color-text-secondary); max-width: 70ch; }


/* =====================================================================
   9. VENDOR PROFILE (PRD §5.6 + §7.15.18 Health Score)
   ===================================================================== */

.vendor-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-6); flex-wrap: wrap; }
.vendor-head__id { display: flex; gap: var(--space-4); align-items: flex-start; }
.vendor-logo-placeholder--lg { width: 84px; height: 84px; font-size: var(--text-lg); border-radius: var(--radius-xl); }
.vendor-head__badges { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-2); }
.vendor-head__name { font-size: clamp(1.75rem, 3.5vw, 2.5rem); font-weight: 800; letter-spacing: -0.025em; color: var(--color-text-primary); line-height: 1.1; }
.vendor-head__tagline { font-size: var(--text-md); color: var(--color-text-tertiary); margin-top: var(--space-1); }
.vendor-head__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-top: var(--space-3); font-size: var(--text-sm); color: var(--color-text-secondary); }
.vendor-head__meta svg { width: 16px; height: 16px; color: var(--color-royal-blue); }
.vendor-head__contact { display: flex; flex-direction: column; gap: var(--space-2); min-width: 220px; }
.vendor-head__contact .btn-contact { width: 100%; }
.vendor-head__maps { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); font-size: var(--text-sm); font-weight: 600; color: var(--color-royal-blue); }
.vendor-head__maps svg { width: 16px; height: 16px; }

.vendor-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4); margin: clamp(1.5rem, 3vw, 2.5rem) 0; }
.vendor-stat { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-xl); padding: var(--space-4); text-align: center; }
.vendor-stat__value { display: block; font-family: var(--font-heading); font-size: var(--text-2xl); font-weight: 800; color: var(--color-royal-blue); letter-spacing: -0.02em; }
.vendor-stat__label { font-size: var(--text-xs); color: var(--color-text-tertiary); }

.vendor-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(1.5rem, 3vw, 2.5rem); align-items: start; }
.vendor-block { }
.vendor-about { font-size: var(--text-sm); line-height: 1.7; color: var(--color-text-secondary); }
.vendor-subhead { font-family: var(--font-heading); font-size: var(--text-sm); font-weight: 700; text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--color-text-tertiary); margin: var(--space-5) 0 var(--space-3); }

.chip-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chip { display: inline-flex; align-items: center; font-size: var(--text-xs); font-weight: 600; color: var(--color-text-secondary); background: var(--color-surface-subtle); border: 1px solid var(--color-border); padding: var(--space-1-5) var(--space-3); border-radius: 999px; }
.chip--blue { color: var(--color-royal-blue); background: var(--color-primary-alpha); border-color: rgba(31,0,98,0.15); }


/* =====================================================================
   10. DETAIL PAGES — RESPONSIVE
   ===================================================================== */

@media (max-width: 860px) {
  .listing-detail { grid-template-columns: 1fr; }
  .vendor-grid { grid-template-columns: 1fr; }
  .vendor-stats { grid-template-columns: repeat(2, 1fr); }
  .vendor-head { flex-direction: column; }
  .vendor-head__contact { width: 100%; min-width: 0; }
  .health-score-card { flex-direction: column; text-align: center; align-items: center; }
  .health-component-label { width: 130px; }
}

@media (max-width: 480px) {
  .listing-contact { flex-direction: column; }
  .health-component-label { width: 110px; font-size: 11px; }
}


/* =====================================================================
   11. PRICING PLANS (PRD §9.2)
   ===================================================================== */

.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2.5vw, 1.75rem);
  align-items: stretch;
}

.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  box-shadow: var(--shadow-xs);
  transition: transform var(--duration-normal) var(--ease-out), box-shadow var(--duration-normal) var(--ease-out);
}
.plan-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.plan-card--popular {
  border: 2px solid var(--color-royal-blue);
  box-shadow: var(--shadow-primary);
}
.plan-badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--color-royal-blue); color: #FFFFFF;
  font-size: var(--text-xs); font-weight: 700; letter-spacing: var(--tracking-wide);
  text-transform: uppercase; padding: var(--space-1) var(--space-4); border-radius: 999px;
  white-space: nowrap;
}

.plan-name { font-family: var(--font-heading); font-size: var(--text-xl); font-weight: 800; color: var(--color-text-primary); }
.plan-best { font-size: var(--text-sm); color: var(--color-text-tertiary); margin-top: var(--space-1); min-height: 2.6em; }
.plan-price { display: flex; align-items: baseline; gap: var(--space-1); margin: var(--space-4) 0 var(--space-1); }
.plan-price__amount { font-family: var(--font-heading); font-size: var(--text-4xl); font-weight: 900; color: var(--color-royal-blue); letter-spacing: -0.03em; }
.plan-price__period { font-size: var(--text-sm); color: var(--color-text-tertiary); }
.plan-annual { font-size: var(--text-sm); color: var(--color-text-tertiary); min-height: 1.4em; }
.plan-limit { margin: var(--space-4) 0; padding: var(--space-3); background: var(--color-surface-subtle); border-radius: var(--radius-lg); font-size: var(--text-sm); font-weight: 600; color: var(--color-text-primary); text-align: center; }
.plan-features { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-5); flex: 1; }
.plan-feature { display: flex; align-items: flex-start; gap: var(--space-2); font-size: var(--text-sm); color: var(--color-text-secondary); }
.plan-feature svg { width: 16px; height: 16px; color: var(--color-success); flex-shrink: 0; margin-top: 2px; }
.plan-cta { width: 100%; justify-content: center; }


/* =====================================================================
   12. FEATURE / BENEFIT GRID + included features
   ===================================================================== */

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-5); }
.feature-item { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-xl); padding: var(--space-5); }
.feature-item__icon { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 12px; background: var(--color-primary-alpha); color: var(--color-royal-blue); margin-bottom: var(--space-3); }
.feature-item__icon svg { width: 24px; height: 24px; }
.feature-item h3 { font-family: var(--font-heading); font-size: var(--text-lg); font-weight: 700; color: var(--color-text-primary); margin-bottom: var(--space-2); }
.feature-item p { font-size: var(--text-sm); line-height: 1.6; color: var(--color-text-tertiary); }

.included-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-3); }
.included-item { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); color: var(--color-text-secondary); }
.included-item svg { width: 18px; height: 18px; color: var(--color-success); flex-shrink: 0; }


/* =====================================================================
   13. DEMAND INDEX teaser table (PRD §10.5)
   ===================================================================== */

.demand-table-wrap { overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius-xl); }
.demand-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.demand-table th, .demand-table td { padding: var(--space-3) var(--space-4); text-align: left; font-size: var(--text-sm); border-bottom: 1px solid var(--color-divider); white-space: nowrap; }
.demand-table th { background: var(--color-surface-subtle); color: var(--color-text-tertiary); font-weight: 600; font-size: var(--text-xs); text-transform: uppercase; letter-spacing: var(--tracking-wide); }
.demand-table td { color: var(--color-text-primary); }
.demand-table tr:last-child td { border-bottom: none; }
.opp { display: inline-flex; align-items: center; padding: var(--space-1) var(--space-3); border-radius: 999px; font-size: var(--text-xs); font-weight: 700; }
.opp--very-high { background: var(--color-success-light); color: var(--color-success-dark); }
.opp--high { background: var(--color-info-light); color: var(--color-info-dark); }
.opp--medium { background: var(--color-warning-light); color: var(--color-warning-dark); }


/* =====================================================================
   14. FAQ (native details/summary — no JS needed)
   ===================================================================== */

.faq-list { display: flex; flex-direction: column; gap: var(--space-3); max-width: 820px; }
.faq-item { border: 1px solid var(--color-border); border-radius: var(--radius-xl); background: var(--color-surface); overflow: hidden; }
.faq-item > summary {
  list-style: none; cursor: pointer; padding: var(--space-4) var(--space-5);
  font-family: var(--font-heading); font-weight: 600; font-size: var(--text-md); color: var(--color-text-primary);
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary::after { content: '+'; font-size: var(--text-xl); color: var(--color-royal-blue); transition: transform var(--duration-fast) var(--ease-out); }
.faq-item[open] > summary::after { transform: rotate(45deg); }
.faq-item__a { padding: 0 var(--space-5) var(--space-4); font-size: var(--text-sm); line-height: 1.65; color: var(--color-text-tertiary); }


/* =====================================================================
   15. FORMS (onboarding / request a part / bulk / support)
   ===================================================================== */

.form-card { max-width: 760px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-2xl); box-shadow: var(--shadow-sm); padding: clamp(1.5rem, 4vw, 2.5rem); }
/* minmax(0,1fr) instead of 1fr: a plain 1fr never shrinks below a cell's
   min-content, so one wide <select> option (e.g. a long plan name) used to
   blow the whole grid past the card edge. min-width:0 on fields for the
   same reason. This keeps every field inside the card on any width. */
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-4) var(--space-5); }
.form-field { display: flex; flex-direction: column; gap: var(--space-1-5); min-width: 0; }
.form-field--full { grid-column: 1 / -1; }
.form-field label { font-size: var(--text-xs); font-weight: 700; letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--color-text-tertiary); }
.form-field label .req { color: var(--color-error); }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; padding: var(--space-3) var(--space-3-5);
  border: 1.5px solid var(--color-border); border-radius: var(--radius-lg);
  font-size: var(--text-sm); font-family: var(--font-body); color: var(--color-text-primary); background: var(--color-surface);
  transition: border-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
}
.form-field textarea { resize: vertical; min-height: 110px; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { outline: none; border-color: var(--color-royal-blue); box-shadow: 0 0 0 3px var(--color-primary-alpha); }
.form-field select option { color: #0D0D0D; background: #FFFFFF; }
.form-hint { font-size: var(--text-xs); color: var(--color-text-tertiary); }
/* Multi-select dropdown (assets/js/multi-select.js): trigger styled like an
   input, panel with search + checkbox options. Shrink-safe, wraps on mobile. */
.ms { position: relative; min-width: 0; }
.ms-trigger {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  width: 100%; max-width: 100%; box-sizing: border-box; padding: var(--space-3) var(--space-3-5);
  border: 1.5px solid var(--color-border); border-radius: var(--radius-lg);
  background: var(--color-surface); font-family: var(--font-body); font-size: var(--text-sm);
  color: var(--color-text-primary); text-align: left; cursor: pointer;
}
.ms-trigger:focus { outline: none; border-color: var(--color-royal-blue); box-shadow: 0 0 0 3px var(--color-primary-alpha); }
.ms-label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-label--empty { color: var(--color-text-tertiary); }
.ms-caret { flex: 0 0 auto; font-size: .7rem; opacity: .6; }
.ms-panel {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60;
  background: #fff; border: 1px solid var(--color-border); border-radius: 12px;
  box-shadow: 0 14px 36px rgba(0,0,0,.16); padding: .5rem;
}
.ms-search { width: 100%; box-sizing: border-box; padding: .45rem .6rem; border: 1px solid var(--color-border); border-radius: 8px; font: inherit; font-size: var(--text-sm); margin-bottom: .4rem; }
.ms-search:focus { outline: none; border-color: var(--color-royal-blue); }
.ms-list { max-height: 230px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.ms-opt {
  display: flex; align-items: center; gap: .55rem; padding: .45rem .5rem;
  border-radius: 8px; cursor: pointer; font-size: var(--text-sm); font-weight: 500;
  color: var(--color-text-primary); text-transform: none; letter-spacing: normal;
}
.ms-opt:hover { background: var(--color-surface-subtle, #f2f3f7); }
.ms-opt input { width: 16px; height: 16px; flex: 0 0 auto; margin: 0; cursor: pointer; }
.ms-opt span { min-width: 0; overflow-wrap: anywhere; }
.ms-empty { padding: .5rem; color: var(--color-text-tertiary); font-size: var(--text-sm); }
.ms-item { padding: .5rem .55rem; border-radius: 8px; cursor: pointer; font-size: var(--text-sm); color: var(--color-text-primary); overflow-wrap: anywhere; }
.ms-item:hover { background: var(--color-surface-subtle, #f2f3f7); }
.ms-item.is-sel { background: rgba(37,56,156,.08); font-weight: 600; }
/* searchable suggestions under a free-text input (city/area) */
.ms-combo { position: relative; min-width: 0; display: block; width: 100%; }
.ms-combo-panel {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 60;
  background: #fff; border: 1px solid var(--color-border); border-radius: 12px;
  box-shadow: 0 14px 36px rgba(0,0,0,.16); padding: .35rem;
  max-height: 230px; overflow-y: auto;
}
.ms-other { display: flex; gap: .4rem; margin-top: .4rem; }
.ms-other-input { flex: 1 1 auto; min-width: 0; padding: .45rem .6rem; border: 1px solid var(--color-border); border-radius: 8px; font: inherit; font-size: var(--text-sm); }
.ms-other-input:focus { outline: none; border-color: var(--color-royal-blue); }
.ms-other-add { flex: 0 0 auto; border: 1px solid var(--color-border); background: #fff; border-radius: 8px; padding: .45rem .8rem; font-weight: 600; font-size: var(--text-sm); cursor: pointer; }
.ms-other-add:hover { border-color: var(--color-royal-blue); color: var(--color-royal-blue); }

/* Read-only field value that wraps instead of being cut off (e.g. the plan
   label in the vendor edit form). Looks like a disabled input but full-height. */
.form-readonly {
  width: 100%; max-width: 100%; box-sizing: border-box; min-width: 0;
  padding: var(--space-3) var(--space-3-5);
  border: 1.5px solid var(--color-border); border-radius: var(--radius-lg);
  font-size: var(--text-sm); font-family: var(--font-body);
  color: var(--color-text-secondary); background: var(--color-surface-subtle, #f7f7fb);
  line-height: 1.4; overflow-wrap: anywhere;
}

/* Subscription plan actions (request change / cancel) — wrap on mobile. */
.plan-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .5rem; }
.plan-actions select { flex: 1 1 220px; min-width: 0; }
.plan-actions .vp-cancel-sub { border-color: var(--color-error-dark, #b91c1c); color: var(--color-error-dark, #b91c1c); }
.plan-actions .vp-cancel-sub:hover { background: var(--color-error-dark, #b91c1c); color: #fff; }
.linklike { background: none; border: 0; padding: 0; color: var(--color-royal-blue); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }

/* Opening hours: day + time ranges. Each range is two selects side by side;
   the whole block wraps, shrink-safe on mobile. */
.hours-grid { display: flex; flex-direction: column; gap: .5rem; min-width: 0; }
.hours-sub { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.hours-sub__label { flex: 0 0 3.2rem; font-size: var(--text-xs); color: var(--color-text-tertiary); text-transform: uppercase; letter-spacing: var(--tracking-wide); }
.hours-range { display: flex; align-items: center; gap: .5rem; min-width: 0; flex: 1 1 auto; }
.hours-range select { flex: 1 1 0; min-width: 0; }
.hours-range .hours-sep { flex: 0 0 auto; font-size: var(--text-xs); color: var(--color-text-tertiary); text-transform: uppercase; }
.form-note { margin-top: var(--space-4); font-size: var(--text-xs); color: var(--color-text-tertiary); line-height: 1.5; }
.form-actions { margin-top: var(--space-6); display: flex; gap: var(--space-3); flex-wrap: wrap; }
.file-drop { border: 1.5px dashed var(--color-border-strong); border-radius: var(--radius-lg); padding: var(--space-5); text-align: center; color: var(--color-text-tertiary); font-size: var(--text-sm); }
.file-drop svg { width: 28px; height: 28px; color: var(--color-royal-blue); margin-bottom: var(--space-2); }


/* =====================================================================
   16. LEGAL / PROSE + 404
   ===================================================================== */

.prose { max-width: 800px; }
.prose h2 { font-family: var(--font-heading); font-size: var(--text-2xl); font-weight: 700; color: var(--color-text-primary); margin: var(--space-8) 0 var(--space-3); }
.prose h3 { font-family: var(--font-heading); font-size: var(--text-lg); font-weight: 700; color: var(--color-text-primary); margin: var(--space-5) 0 var(--space-2); }
.prose p { font-size: var(--text-md); line-height: 1.75; color: var(--color-text-secondary); margin-bottom: var(--space-4); }
.prose ul { margin: 0 0 var(--space-4) var(--space-5); display: flex; flex-direction: column; gap: var(--space-2); }
.prose li { font-size: var(--text-md); line-height: 1.6; color: var(--color-text-secondary); list-style: disc; }
.prose strong { color: var(--color-text-primary); }

.error-page { min-height: calc(100vh - var(--nav-height)); display: flex; align-items: center; justify-content: center; text-align: center; padding: var(--space-8) var(--space-4); }
.error-code { font-family: var(--font-heading); font-size: clamp(5rem, 18vw, 11rem); font-weight: 900; line-height: 1; letter-spacing: -0.05em; background: linear-gradient(135deg, var(--color-royal-blue), var(--color-royal-blue-light)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.error-title { font-family: var(--font-heading); font-size: var(--text-2xl); font-weight: 700; color: var(--color-text-primary); margin: var(--space-4) 0 var(--space-2); }
.error-text { font-size: var(--text-md); color: var(--color-text-tertiary); max-width: 44ch; margin: 0 auto var(--space-6); }


/* =====================================================================
   17. PHASE 3 — RESPONSIVE
   ===================================================================== */

@media (max-width: 860px) {
  .plans-grid { grid-template-columns: 1fr; max-width: 420px; margin-inline: auto; }
  .form-grid { grid-template-columns: 1fr; }
}

/* form validation + success */
.form-field input.is-error, .form-field select.is-error, .form-field textarea.is-error {
  border-color: var(--color-error);
  box-shadow: 0 0 0 3px var(--color-error-light);
}
/* Override the small inline ".form-success" flex rule in shared.css so the
   success CARD stacks normally (icon, heading, text, button) instead of
   cramming everything into one row. */
.form-success { display: block; text-align: center; font-size: var(--text-md); color: var(--color-text-primary); padding: var(--space-6) var(--space-2); }
.form-success__icon { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 50%; background: var(--color-success-light); color: var(--color-success-dark); margin-bottom: var(--space-4); }
.form-success__icon svg { width: 32px; height: 32px; }
.form-success h2 { font-family: var(--font-heading); font-size: var(--text-2xl); font-weight: 700; color: var(--color-text-primary); margin-bottom: var(--space-2); }
.form-success p { font-size: var(--text-md); color: var(--color-text-tertiary); max-width: 46ch; margin: 0 auto var(--space-5); line-height: 1.6; }

/* Buyer phone shown to owner/admin only on the Parts Wanted board (compliance). */
.pw-tag--phone { color: var(--color-royal-blue); font-weight: 600; text-decoration: none; }
.pw-tag--phone:hover { text-decoration: underline; }

/* Marketplace Search button — full width, sits directly under Clear filters. */
.mk-search-btn { width: 100%; margin-top: .5rem; }

/* The currency picker reuses the .lang-selector class, so it inherited the
   "Language" ::before label. Give it its own "Currency" label (used in the
   mobile drawer, which lives on <body> outside .site-header). */
.lang-selector.currency-selector::before { content: "Currency" !important; }

/* In the desktop header bar these text labels just clutter the nav (the
   KWD / English dropdowns are self-explanatory), so hide them there. They
   still show as field labels in the mobile drawer. */
.site-header .lang-selector::before { display: none !important; }

/* Contact Us / feedback messages (owner/admin). */
.fb-card { border: 1px solid var(--color-border); border-radius: 12px; padding: 1rem 1.1rem; margin-bottom: .75rem; background: var(--color-surface, #fff); }
.fb-card.is-done { opacity: .6; }
.fb-card__head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .4rem; }
.fb-topic { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--color-royal-blue); background: var(--color-surface-subtle); padding: 2px 9px; border-radius: 999px; }
.fb-when { font-size: .78rem; color: var(--color-text-tertiary); }
.fb-from { font-size: .9rem; margin-bottom: .4rem; }
.fb-msg { font-size: .95rem; line-height: 1.55; color: var(--color-text-secondary); white-space: pre-wrap; margin: 0 0 .75rem; }
.fb-reply { margin: 0 0 .75rem; }
.fb-reply__text { width: 100%; min-height: 70px; resize: vertical; padding: .6rem .75rem; border: 1px solid var(--color-border); border-radius: 10px; font: inherit; font-size: .9rem; margin-bottom: .5rem; }
.fb-replied { font-size: .85rem; color: var(--color-success-dark, #0f6e56); background: var(--color-success-light, #e1f5ee); border-radius: 8px; padding: .5rem .7rem; margin-bottom: .5rem; white-space: pre-wrap; }
.fb-noemail { font-size: .85rem; color: var(--color-text-tertiary); margin: 0 0 .75rem; }

/* Owner/admin Plans & Pricing editor. */
.plan-card { border: 1px solid var(--color-border); border-radius: 14px; padding: 1.1rem 1.25rem; margin-bottom: 1rem; background: var(--color-surface, #fff); }
.plan-card__grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-bottom: .6rem; }
.plan-fld { display: flex; flex-direction: column; gap: .25rem; font-size: .82rem; color: var(--color-text-secondary); }
.plan-fld input { padding: .5rem .65rem; border: 1px solid var(--color-border); border-radius: 8px; font: inherit; font-size: .9rem; }
.plan-prices { margin-top: .75rem; padding-top: .6rem; border-top: 1px solid var(--color-border); }
.plan-prices__title { font-size: .82rem; font-weight: 700; color: var(--color-text-secondary); margin-bottom: .5rem; }
.plan-price-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .45rem 0; font-size: .9rem; border-bottom: 1px solid var(--color-border); }
.plan-price-add { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; align-items: center; }
.plan-price-add select, .plan-price-add input { padding: .5rem .6rem; border: 1px solid var(--color-border); border-radius: 8px; font: inherit; font-size: .88rem; }
.plan-price-add input { width: 130px; }
@media (max-width: 560px) {
  .plan-card__grid { grid-template-columns: 1fr; }
  .plan-price-add { flex-direction: column; align-items: stretch; }
  .plan-price-add input { width: 100%; }
}
.plan-fld select { padding: .5rem .65rem; border: 1px solid var(--color-border); border-radius: 8px; font: inherit; font-size: .9rem; background: #fff; }

/* Country-specific plans accordion (owner-only). */
.cpc-add { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 0 0 1rem; }
.cpc-add select { padding: .55rem .65rem; border: 1px solid var(--color-border); border-radius: 8px; font: inherit; min-width: 200px; background: #fff; }
.cpc { border: 1px solid var(--color-border); border-radius: 14px; margin-bottom: .85rem; background: var(--color-surface, #fff); overflow: hidden; }
.cpc__head { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.15rem; background: none; border: 0; cursor: pointer; font: inherit; text-align: left; }
.cpc__head:hover { background: var(--color-bg-soft, #f7f7f8); }
.cpc__name { font-family: "Urbanist", sans-serif; font-weight: 700; font-size: 1.05rem; color: var(--color-text); }
.cpc__meta { font-size: .82rem; color: var(--color-text-secondary); display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; }
.cpc__chev { font-size: .9rem; }
.cpc__body { padding: 0 1.15rem 1.15rem; border-top: 1px solid var(--color-border); }
.cpc__body[hidden] { display: none; }
.ctier { border: 1px solid var(--color-border); border-radius: 12px; padding: .9rem 1rem; margin-top: .85rem; background: var(--color-bg-soft, #fafafb); }
.ctier__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .7rem; margin-bottom: .5rem; }
.ctier__grid .plan-fld { min-width: 0; }
.ctier__grid input, .ctier__grid select { width: 100%; min-width: 0; box-sizing: border-box; padding: .5rem .6rem; border: 1px solid var(--color-border); border-radius: 8px; font: inherit; font-size: .9rem; background: #fff; }
.ctier__opts { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem; }
.ctier__opts .bulk-chk { margin: 0; }
.cpc__actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
@media (max-width: 640px) {
  .ctier__grid { grid-template-columns: 1fr; }
  .cpc-add { flex-direction: column; align-items: stretch; }
  .cpc-add select { min-width: 0; }
  .cpc__actions { flex-direction: column; align-items: stretch; }
}

/* Owner/admin customer detail view. */
.cust-detail { display: grid; gap: 0; }
.cust-row { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--color-border); }
.cust-row:last-child { border-bottom: 0; }
.cust-row__k { color: var(--color-text-tertiary); font-size: .9rem; }
.cust-row__v { font-weight: 600; text-align: right; word-break: break-word; }
.cust-row__v em { font-weight: 400; color: var(--color-text-tertiary); }
