/* ===================================================================
   SEEKA DESIGN SYSTEM  —  Find the Right Home.
   =================================================================== */

/* ── Custom Properties ─────────────────────────────────────────────── */
:root {
  --bg:             #F7F8FA;
  --surface:        #FFFFFF;
  --surface-sunk:   #F0F1F4;
  --surface-hover:  #ECEDF1;
  --text:           #0B1220;
  --text-muted:     #5B6475;
  --text-faint:     #9AA1AE;
  --border:         #E5E7EB;
  --border-strong:  #D1D5DB;

  /* Brand gradient — matches the S‑logo */
  --p-start:        #2F6BFF;
  --p-end:          #6A3DF2;
  --p-solid:        #3D5BFF;
  --p-light:        rgba(47,107,255,.10);
  --p-glow:         rgba(47,107,255,.22);

  --success:        #16A34A;
  --success-bg:     #EAF8EF;
  --warning:        #B45309;
  --warning-bg:     #FEF3E2;
  --danger:         #DC2626;
  --danger-bg:      #FEE2E2;

  --font-head:  'Sora',  -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body:  'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:  'JetBrains Mono', 'Fira Code', 'SFMono-Regular', monospace;

  --rad-xs:  6px;
  --rad-sm:  12px;
  --rad-md:  18px;
  --rad-lg:  24px;
  --rad-xl:  32px;
  --rad-pill: 999px;

  --sh-xs:  0 1px 2px  rgba(11,18,32,.05);
  --sh-sm:  0 2px 8px  rgba(11,18,32,.07);
  --sh-md:  0 8px 24px rgba(11,18,32,.09);
  --sh-lg:  0 20px 48px rgba(47,107,255,.13);

  --w: 1180px;
}

/* ── Reset ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1,h2,h3,h4,h5 {
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.2;
  color: var(--text);
}
p { color: var(--text-muted); line-height: 1.65; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; appearance: none; -webkit-appearance: none; border: none; background: none; }
ul { list-style: none; }

:focus-visible {
  outline: 2px solid var(--p-solid);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Layout helpers ─────────────────────────────────────────────────── */
.container { max-width: var(--w); margin: 0 auto; padding: 0 24px; }
.section   { padding: 72px 0; }
.section--tinted { background: var(--surface); }

.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2,1fr); }
  .grid-4 { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 560px) {
  .grid-2,.grid-3,.grid-4 { grid-template-columns: 1fr; }
}

/* ── Typography helpers ─────────────────────────────────────────────── */
.gradient-text {
  background: linear-gradient(135deg, var(--p-start), var(--p-end));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ── Buttons ────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14.5px;
  padding: 11px 22px;
  border-radius: var(--rad-pill);
  border: 1.5px solid transparent;
  transition: transform .14s ease, box-shadow .14s ease, background .14s ease, border-color .14s ease;
  white-space: nowrap;
  cursor: pointer;
}
.btn:active { transform: scale(.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--p-start), var(--p-end));
  color: #fff;
  box-shadow: 0 4px 16px var(--p-glow);
}
.btn-primary:hover { box-shadow: 0 6px 24px rgba(47,107,255,.36); }

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
  box-shadow: var(--sh-xs);
}
.btn-secondary:hover { border-color: var(--text-muted); box-shadow: var(--sh-sm); }

.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { color: var(--text); background: var(--surface-sunk); }

.btn-block { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }

/* ── Navigation ─────────────────────────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(247,248,250,.88);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
}
.navbar .container {
  display: flex; align-items: center;
  justify-content: space-between; height: 68px; gap: 24px;
}
.nav-brand { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.nav-brand img { height: 34px; width: auto; }

.nav-links {
  display: flex; align-items: center; gap: 6px;
  margin: 0; padding: 0;
}
.nav-links a {
  font-size: 14px; font-weight: 500;
  color: var(--text-muted);
  padding: 7px 13px; border-radius: var(--rad-pill);
  transition: color .15s ease, background .15s ease;
}
.nav-links a:hover { color: var(--text); background: var(--surface-sunk); }

.nav-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.nav-toggle {
  display: none; padding: 8px; border-radius: var(--rad-sm);
  color: var(--text-muted);
}
.nav-toggle:hover { background: var(--surface-sunk); }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav-links.mobile-open {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; top: 68px; left: 0; right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 12px 20px 16px; gap: 4px;
    box-shadow: var(--sh-md);
  }
}

/* ── Hero ───────────────────────────────────────────────────────────── */
.hero {
  padding: 80px 0 60px;
  text-align: center;
}

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--p-solid);
  background: var(--p-light);
  border: 1px solid rgba(47,107,255,.2);
  padding: 6px 14px;
  border-radius: var(--rad-pill);
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(32px, 5.5vw, 54px);
  line-height: 1.1;
  max-width: 820px; margin: 0 auto 18px;
  letter-spacing: -.03em;
}

.hero-sub {
  font-size: 18px; line-height: 1.65;
  max-width: 540px; margin: 0 auto 44px;
  color: var(--text-muted);
}

/* ── Search box ─────────────────────────────────────────────────────── */
.search-wrap { max-width: 720px; margin: 0 auto; }

.search-box {
  display: flex; align-items: flex-end; gap: 10px;
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--rad-lg);
  padding: 18px 18px 16px 24px;
  box-shadow: var(--sh-md);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.search-box:focus-within {
  border-color: var(--p-solid);
  box-shadow: 0 0 0 4px var(--p-light), var(--sh-md);
}

.search-box textarea {
  flex: 1; border: none; outline: none; resize: none;
  background: transparent;
  font-family: var(--font-body); font-size: 16px;
  color: var(--text); line-height: 1.55; max-height: 140px;
  padding-top: 3px;
}
.search-box textarea::placeholder { color: var(--text-faint); }

.search-box-actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  background: var(--surface); color: var(--text-muted);
  cursor: pointer; flex-shrink: 0;
  transition: background .14s ease, color .14s ease, border-color .14s ease;
}
.icon-btn:hover { background: var(--surface-sunk); color: var(--text); border-color: var(--border-strong); }
.icon-btn.listening {
  color: #fff;
  background: linear-gradient(135deg, var(--p-start), var(--p-end));
  border-color: transparent;
  animation: pulse-ring 1.4s ease-out infinite;
}
@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0   rgba(106,61,242,.5); }
  100% { box-shadow: 0 0 0 14px rgba(106,61,242,0); }
}

.search-submit {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--p-start), var(--p-end));
  color: #fff; border: none; cursor: pointer;
  transition: transform .14s ease, box-shadow .14s ease;
  box-shadow: 0 4px 14px var(--p-glow);
}
.search-submit:hover { transform: scale(1.06); box-shadow: 0 6px 20px rgba(47,107,255,.38); }
.search-submit:disabled { opacity: .4; cursor: not-allowed; transform: none; box-shadow: none; }

/* Live parse chips */
.parse-preview {
  margin-top: 16px; min-height: 20px;
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
}
.parse-chip {
  display: inline-flex; align-items: baseline; gap: 5px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--rad-pill);
  padding: 6px 14px; font-size: 13.5px;
  box-shadow: var(--sh-xs);
  animation: chip-in .28s cubic-bezier(.16,1,.3,1) both;
}
.parse-chip .chip-label {
  font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-faint);
}
.parse-chip .chip-value {
  font-family: var(--font-mono); font-weight: 600; font-size: 13px;
  color: var(--p-solid);
}
@keyframes chip-in {
  from { opacity: 0; transform: translateY(8px) scale(.94); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.parse-status {
  margin-top: 12px; font-size: 13px; color: var(--text-faint); text-align: center;
}

/* Popular searches */
.popular-searches {
  margin-top: 28px; display: flex; flex-wrap: wrap;
  justify-content: center; gap: 10px;
}
.popular-pill {
  font-size: 13.5px; font-weight: 500; color: var(--text-muted);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--rad-pill); padding: 8px 18px;
  cursor: pointer; transition: all .14s ease;
  box-shadow: var(--sh-xs);
}
.popular-pill:hover {
  background: var(--surface); border-color: var(--p-solid);
  color: var(--p-solid); box-shadow: var(--sh-sm);
}

/* ── Section header ─────────────────────────────────────────────────── */
.section-head { text-align: center; max-width: 580px; margin: 0 auto 52px; }
.section-head h2 { font-size: clamp(26px,3.8vw,38px); margin-bottom: 14px; }

/* ── Feature & step cards ───────────────────────────────────────────── */
.feature-card, .step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--rad-md);
  padding: 28px 26px;
  box-shadow: var(--sh-xs);
  transition: box-shadow .18s ease, transform .18s ease;
}
.feature-card:hover, .step-card:hover {
  box-shadow: var(--sh-md); transform: translateY(-3px);
}
.feature-icon {
  width: 46px; height: 46px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(47,107,255,.12), rgba(106,61,242,.12));
  color: var(--p-solid); font-size: 20px;
  margin-bottom: 18px;
}
.feature-card h3, .step-card h3 {
  font-size: 16.5px; margin-bottom: 8px;
}
.feature-card p, .step-card p { font-size: 14px; margin: 0; }

/* ── Agent / property cards ─────────────────────────────────────────── */
.agent-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--rad-lg);
  padding: 24px; margin-bottom: 20px;
  box-shadow: var(--sh-sm);
  transition: box-shadow .18s ease;
}
.agent-card:hover { box-shadow: var(--sh-md); }

.agent-header {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 16px; flex-wrap: wrap;
}
.agent-avatar {
  width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--p-light), rgba(106,61,242,.12));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 700; font-size: 18px;
  color: var(--p-solid); object-fit: cover;
  border: 2px solid var(--border);
}
.agent-meta { flex: 1; min-width: 160px; }
.agent-name {
  display: flex; align-items: center; gap: 7px;
  font-size: 16.5px; font-weight: 700;
  font-family: var(--font-head); letter-spacing: -.01em;
}
.agent-sub { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

.match-score {
  font-family: var(--font-mono); font-weight: 700; font-size: 13px;
  color: var(--success); background: var(--success-bg);
  padding: 6px 13px; border-radius: var(--rad-pill); flex-shrink: 0;
}

.verified-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700; color: var(--success);
  background: var(--success-bg); padding: 3px 10px;
  border-radius: var(--rad-pill);
}

.agent-stats {
  display: flex; gap: 24px; flex-wrap: wrap;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}
.agent-stat { font-size: 12.5px; color: var(--text-muted); }
.agent-stat strong {
  display: block; font-family: var(--font-mono); font-size: 17px;
  font-weight: 700; color: var(--text); margin-bottom: 2px;
}

.property-row {
  display: flex; gap: 14px; align-items: center;
  border: 1px solid var(--border); border-radius: var(--rad-md);
  padding: 14px 16px; margin-bottom: 12px; flex-wrap: wrap;
  background: var(--surface); transition: box-shadow .14s ease;
}
.property-row:hover { box-shadow: var(--sh-sm); }

.property-thumb {
  width: 90px; height: 76px; border-radius: var(--rad-sm);
  background: var(--surface-sunk); object-fit: cover; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-faint); font-size: 22px;
}
.property-info { flex: 1; min-width: 140px; }
.property-title { font-weight: 600; font-size: 14.5px; margin-bottom: 5px; color: var(--text); }
.property-detail { font-size: 12.5px; color: var(--text-muted); }
.property-price {
  font-family: var(--font-mono); font-weight: 700; font-size: 15px;
  white-space: nowrap; color: var(--text);
}
.property-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ── Auth shell ─────────────────────────────────────────────────────── */
.auth-shell {
  min-height: calc(100vh - 68px);
  display: flex; align-items: center; justify-content: center;
  padding: 48px 24px;
  background: var(--bg);
}
.auth-card {
  width: 100%; max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--rad-xl);
  padding: 40px 36px;
  box-shadow: var(--sh-md);
}
.auth-card h1 { font-size: 24px; margin-bottom: 8px; }
.auth-card .sub { font-size: 14.5px; margin-bottom: 28px; }

/* ── Form fields ────────────────────────────────────────────────────── */
.field { margin-bottom: 18px; }
.field label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--text); margin-bottom: 7px;
}
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--rad-sm);
  font-family: var(--font-body); font-size: 15px;
  color: var(--text); background: var(--surface);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--p-solid);
  box-shadow: 0 0 0 3px var(--p-light);
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-faint); }
.field-hint { font-size: 12px; color: var(--text-faint); margin-top: 5px; }

.alert {
  padding: 12px 16px; border-radius: var(--rad-sm);
  font-size: 14px; margin-bottom: 20px;
  display: flex; align-items: flex-start; gap: 10px;
}
.alert::before { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.alert-error  { background: var(--danger-bg);  color: var(--danger);  border: 1px solid rgba(220,38,38,.2); }
.alert-error::before  { content: '⚠'; }
.alert-success{ background: var(--success-bg); color: var(--success); border: 1px solid rgba(22,163,74,.2); }
.alert-success::before{ content: '✓'; }

.auth-footer-link { text-align: center; margin-top: 22px; font-size: 14px; color: var(--text-muted); }
.auth-footer-link a { color: var(--p-solid); font-weight: 600; }
.auth-footer-link a:hover { text-decoration: underline; }

/* ── Dashboard stats grid ───────────────────────────────────────────── */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--rad-md);
  padding: 24px 20px;
  box-shadow: var(--sh-xs);
  position: relative; overflow: hidden;
}
.stat-card::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--p-start), var(--p-end));
  opacity: 0;
  transition: opacity .2s ease;
}
.stat-card:hover::after { opacity: 1; }
.stat-number {
  font-family: var(--font-mono); font-size: 30px; font-weight: 700;
  letter-spacing: -.02em; color: var(--text); margin-bottom: 6px;
}
.stat-label { font-size: 13px; color: var(--text-muted); font-weight: 500; }

/* ── Dashboard nav pills ────────────────────────────────────────────── */
.dash-nav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 32px; }
.dash-nav .btn-secondary { font-size: 13px; padding: 7px 16px; }
.dash-nav .btn-secondary.active {
  background: linear-gradient(135deg, var(--p-start), var(--p-end));
  color: #fff; border-color: transparent;
  box-shadow: 0 4px 12px var(--p-glow);
}

/* ── Footer ─────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 56px 0 28px;
  margin-top: 48px;
  background: var(--surface);
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px; margin-bottom: 36px;
}
.footer-grid h4 {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-faint); margin-bottom: 16px;
  font-family: var(--font-body);
}
.footer-grid ul li { margin-bottom: 10px; }
.footer-grid a { font-size: 14px; color: var(--text-muted); transition: color .14s ease; }
.footer-grid a:hover { color: var(--text); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px; border-top: 1px solid var(--border);
  font-size: 13px; color: var(--text-faint); flex-wrap: wrap; gap: 12px;
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* User dashboard two-column responsive */
@media (max-width: 860px) {
  .user-dash-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ── Modal ──────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(11,18,32,.52);
  display: none; align-items: center; justify-content: center;
  z-index: 100; padding: 20px;
  backdrop-filter: blur(4px);
}
.modal-overlay.open { display: flex; animation: fadein .2s ease; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

.modal-box {
  background: var(--surface); border-radius: var(--rad-xl);
  padding: 36px; max-width: 400px; width: 100%; text-align: center;
  box-shadow: var(--sh-lg);
  animation: scalein .22s cubic-bezier(.16,1,.3,1);
}
@keyframes scalein { from { transform: scale(.95); } to { transform: scale(1); } }
.modal-box h3 { font-size: 20px; margin-bottom: 10px; }
.modal-box p  { font-size: 15px; margin-bottom: 24px; }
.modal-actions { display: flex; flex-direction: column; gap: 10px; }

/* ── Empty state ────────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 64px 24px; color: var(--text-muted); }
.empty-state i { font-size: 36px; color: var(--text-faint); margin-bottom: 16px; display: block; }
.empty-state h3 { color: var(--text); margin-bottom: 8px; }
.empty-state p  { max-width: 360px; margin: 0 auto 20px; }

/* ── Messaging inbox ─────────────────────────────────────────────────── */
.inbox-shell {
  display: grid; grid-template-columns: 300px 1fr;
  border: 1px solid var(--border);
  border-radius: var(--rad-lg);
  background: var(--surface);
  overflow: hidden; height: 620px;
  box-shadow: var(--sh-md);
}
@media (max-width: 760px) {
  .inbox-shell { grid-template-columns: 1fr; height: auto; }
  .inbox-list  { max-height: 260px; }
}

.inbox-list { border-right: 1px solid var(--border); overflow-y: auto; }

.inbox-item {
  display: flex; gap: 12px; padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background .12s ease;
  text-decoration: none;
}
.inbox-item:hover { background: var(--surface-sunk); }
.inbox-item.active {
  background: var(--surface-sunk);
  border-left: 3px solid var(--p-solid); padding-left: 13px;
}

.inbox-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: var(--p-light);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 700; font-size: 14px;
  color: var(--p-solid);
}
.inbox-item-meta { min-width: 0; flex: 1; }
.inbox-item-top  { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.inbox-item-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.inbox-item-sub  { font-size: 12px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox-item-preview { font-size: 12.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }

.unread-dot {
  background: var(--p-solid); color: #fff;
  font-size: 11px; font-weight: 700;
  min-width: 18px; height: 18px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 5px; flex-shrink: 0;
}

.inbox-thread { display: flex; flex-direction: column; min-width: 0; }

.thread-header {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px; border-bottom: 1px solid var(--border);
  flex-shrink: 0; background: var(--surface);
}

.thread-messages {
  flex: 1; overflow-y: auto; padding: 20px;
  display: flex; flex-direction: column; gap: 4px;
  background: var(--bg);
}

.bubble-row {
  display: flex; flex-direction: column; align-items: flex-start;
  margin-bottom: 10px; max-width: 72%;
}
.bubble-row.mine { align-self: flex-end; align-items: flex-end; }

.bubble {
  background: var(--surface); color: var(--text);
  padding: 10px 14px; font-size: 14.5px; line-height: 1.5;
  border-radius: 16px 16px 16px 4px;
  border: 1px solid var(--border);
  word-break: break-word;
}
.bubble-row.mine .bubble {
  background: linear-gradient(135deg, var(--p-start), var(--p-end));
  color: #fff; border: none;
  border-radius: 16px 16px 4px 16px;
}
.bubble-time { font-size: 11px; color: var(--text-faint); margin-top: 4px; padding: 0 4px; }

.thread-composer {
  display: flex; align-items: flex-end; gap: 10px;
  padding: 14px 16px; border-top: 1px solid var(--border);
  flex-shrink: 0; background: var(--surface);
}
.thread-composer textarea {
  flex: 1; border: 1.5px solid var(--border-strong);
  border-radius: var(--rad-md); padding: 10px 14px;
  font-family: var(--font-body); font-size: 14.5px;
  resize: none; max-height: 100px; outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
  background: var(--bg);
}
.thread-composer textarea:focus {
  border-color: var(--p-solid);
  box-shadow: 0 0 0 3px var(--p-light);
  background: var(--surface);
}
.thread-composer .search-submit { width: 40px; height: 40px; flex-shrink: 0; }

/* ── Marketplace category cards ─────────────────────────────────────── */
.marketplace-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--rad-md);
  padding: 28px 24px;
  text-align: center;
  transition: box-shadow .18s ease, transform .18s ease;
  cursor: pointer;
}
.marketplace-card:hover { box-shadow: var(--sh-md); transform: translateY(-3px); }
.marketplace-icon {
  width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--p-light), rgba(106,61,242,.12));
  font-size: 24px; color: var(--p-solid);
}

/* ── Trust badge ────────────────────────────────────────────────────── */
.trust-bar {
  height: 6px; border-radius: 3px;
  background: var(--surface-sunk); overflow: hidden; margin-top: 6px;
}
.trust-bar-fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--p-start), var(--success));
  transition: width .4s ease;
}

/* ── Utilities ──────────────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.mt-4  { margin-top: 16px; }
.mt-8  { margin-top: 32px; }
.mb-4  { margin-bottom: 16px; }
.mb-8  { margin-bottom: 32px; }
