/* ═══════════════════════════════════════════
   OpenClaw Directory – Full CSS
   Dark theme inspired by cursor.directory
   ═══════════════════════════════════════════ */

/* ── Reset & Variables ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0a0a;
  --bg-card: #141414;
  --bg-card-hover: #1a1a1a;
  --bg-elevated: #1e1e1e;
  --border: #262626;
  --border-light: #333;
  --text: #e5e5e5;
  --text-muted: #a3a3a3;
  --text-dim: #737373;
  --accent: #f97316;
  --accent-hover: #fb923c;
  --accent-dim: rgba(249, 115, 22, 0.15);
  --green: #22c55e;
  --red: #ef4444;
  --blue: #3b82f6;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-lg: 0 4px 20px rgba(0,0,0,0.4);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --container: 1200px;
  --header-h: 64px;
}

html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; min-height: 100vh; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
input, textarea, select, button { font-family: inherit; font-size: inherit; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 1.5rem; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.625rem 1.25rem; border-radius: var(--radius); font-weight: 500;
  cursor: pointer; border: 1px solid transparent; transition: all 0.2s;
  font-size: 0.875rem; line-height: 1.4; white-space: nowrap;
}
.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.8125rem; }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn-secondary { background: var(--bg-elevated); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--bg-card-hover); border-color: var(--border-light); color: var(--text); }
.btn-ghost { background: transparent; color: var(--text-muted); border-color: transparent; }
.btn-ghost:hover { background: var(--bg-elevated); color: var(--text); }
.btn-danger { background: var(--red); color: #fff; }
.btn-google {
  background: #fff; color: #333; border-color: #ddd; width: 100%;
  padding: 0.75rem 1.25rem; font-size: 0.9375rem; font-weight: 500;
}
.btn-google:hover { background: #f5f5f5; color: #333; }

/* ── Header ── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,10,10,0.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border); height: var(--header-h);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.logo { display: flex; align-items: center; gap: 0.5rem; font-size: 1.125rem; font-weight: 700; color: var(--text); }
.logo:hover { color: var(--text); }
.logo-icon { font-size: 1.5rem; }
.logo-accent { color: var(--accent); }
.main-nav { display: flex; gap: 0.25rem; }
.nav-link {
  padding: 0.4rem 0.75rem; border-radius: var(--radius); color: var(--text-muted);
  font-size: 0.875rem; font-weight: 500; transition: all 0.2s;
}
.nav-link:hover { color: var(--text); background: var(--bg-elevated); }
.nav-link.active { color: var(--text); background: var(--bg-elevated); }
.header-actions { display: flex; align-items: center; gap: 0.5rem; }
.user-menu { position: relative; }
.user-avatar-btn { background: none; border: none; cursor: pointer; padding: 0; border-radius: 50%; }
.user-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.user-avatar-placeholder {
  width: 32px; height: 32px; border-radius: 50%; background: var(--accent);
  display: flex; align-items: center; justify-content: center; color: #fff;
  font-weight: 600; font-size: 0.875rem;
}
.user-dropdown {
  display: none; position: absolute; right: 0; top: calc(100% + 0.5rem);
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  min-width: 200px; box-shadow: var(--shadow-lg); z-index: 200;
}
.user-dropdown.open { display: block; }
.dropdown-header { padding: 0.75rem 1rem; }
.dropdown-name { display: block; font-weight: 600; font-size: 0.875rem; }
.dropdown-email { display: block; font-size: 0.75rem; color: var(--text-dim); }
.dropdown-divider { height: 1px; background: var(--border); }
.dropdown-item {
  display: block; padding: 0.5rem 1rem; color: var(--text-muted);
  font-size: 0.875rem; transition: all 0.15s;
}
.dropdown-item:hover { background: var(--bg-elevated); color: var(--text); }
.mobile-menu-btn {
  display: none; background: none; border: none; cursor: pointer;
  flex-direction: column; gap: 4px; padding: 4px;
}
.mobile-menu-btn span { display: block; width: 20px; height: 2px; background: var(--text-muted); border-radius: 2px; }
.mobile-menu { display: none; padding: 0.5rem 1.5rem 1rem; border-bottom: 1px solid var(--border); background: var(--bg); }
.mobile-menu.open { display: block; }
.mobile-nav-link { display: block; padding: 0.5rem 0; color: var(--text-muted); font-size: 0.9375rem; }

@media (max-width: 768px) {
  .main-nav { display: none; }
  .mobile-menu-btn { display: flex; }
}

/* ── Modal ── */
.modal-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  z-index: 500; align-items: center; justify-content: center; padding: 1rem;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  max-width: 400px; width: 100%; padding: 2rem; position: relative;
}
.modal-close {
  position: absolute; top: 0.75rem; right: 0.75rem; background: none; border: none;
  color: var(--text-dim); font-size: 1.5rem; cursor: pointer; line-height: 1;
}
.modal-body { text-align: center; }
.modal-icon { font-size: 3rem; display: block; margin-bottom: 1rem; }
.modal-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; }
.modal-subtitle { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 1.5rem; }

/* ── Page Header ── */
.page-header { padding: 3rem 0 2rem; }
.page-title { font-size: 2rem; font-weight: 700; margin-bottom: 0.5rem; }
.page-subtitle { font-size: 1rem; color: var(--text-muted); max-width: 600px; }

/* ── Section ── */
.section { padding: 3rem 0; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; flex-wrap: wrap; gap: 0.5rem; }
.section-title { font-size: 1.25rem; font-weight: 700; }

/* ── Hero ── */
.hero { padding: 4rem 0 3rem; text-align: center; }
.hero-title { font-size: 2.5rem; font-weight: 800; margin-bottom: 1rem; line-height: 1.2; }
.hero-title .highlight { color: var(--accent); }
.hero-subtitle { font-size: 1.125rem; color: var(--text-muted); max-width: 600px; margin: 0 auto 2rem; }
.hero-search {
  max-width: 560px; margin: 0 auto; position: relative;
}
.hero-search input {
  width: 100%; padding: 0.875rem 1.25rem; padding-right: 3rem;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  color: var(--text); font-size: 1rem; outline: none; transition: border-color 0.2s;
}
.hero-search input::placeholder { color: var(--text-dim); }
.hero-search input:focus { border-color: var(--accent); }
.hero-search .search-icon {
  position: absolute; right: 1rem; top: 50%; transform: translateY(-50%);
  color: var(--text-dim); font-size: 1.125rem;
}

/* ── Hero Stats ── */
.hero-stats { display: flex; justify-content: center; gap: 2rem; margin-top: 2rem; }
.hero-stat { text-align: center; color: var(--text-muted); font-size: 0.875rem; }
.hero-stat-value { display: block; font-size: 1.5rem; font-weight: 700; color: var(--text); }

@media (max-width: 768px) {
  .hero-title { font-size: 1.75rem; }
  .hero { padding: 2.5rem 0 2rem; }
  .hero-stats { gap: 1.25rem; }
  .hero-stat-value { font-size: 1.25rem; }
}

/* ── Cards ── */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.card-grid-2 { grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); }

.card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.25rem; transition: all 0.2s; display: flex; flex-direction: column;
}
.card:hover { border-color: var(--border-light); background: var(--bg-card-hover); }
.card-featured { border-color: var(--accent); background: var(--accent-dim); }
.card-header { display: flex; align-items: flex-start; gap: 0.75rem; margin-bottom: 0.75rem; }
.card-icon { font-size: 1.5rem; flex-shrink: 0; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; }
.card-img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: var(--surface-hover); }
.card-title { font-size: 1rem; font-weight: 600; color: var(--text); line-height: 1.4; }
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--accent); }
.card-desc { font-size: 0.8125rem; color: var(--text-muted); line-height: 1.5; margin-bottom: 0.75rem; flex-grow: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card-meta { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin-top: auto; }
.card-tag {
  display: inline-flex; align-items: center; padding: 0.2rem 0.5rem; border-radius: 4px;
  background: var(--bg-elevated); color: var(--text-muted); font-size: 0.6875rem;
  border: 1px solid var(--border); font-weight: 500;
}
.card-stat { font-size: 0.75rem; color: var(--text-dim); display: flex; align-items: center; gap: 0.25rem; }

/* ── Tags bar ── */
.tags-bar { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.tag-btn {
  padding: 0.35rem 0.75rem; border-radius: 20px; font-size: 0.8125rem; font-weight: 500;
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text-muted);
  cursor: pointer; transition: all 0.2s; white-space: nowrap;
}
.tag-btn:hover { border-color: var(--border-light); color: var(--text); }
.tag-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ── Job Card ── */
.job-card { padding: 1.25rem; }
.job-card-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.job-company-logo {
  width: 40px; height: 40px; border-radius: var(--radius); background: var(--bg-elevated);
  display: flex; align-items: center; justify-content: center; font-size: 1.125rem;
  font-weight: 700; color: var(--accent); flex-shrink: 0; overflow: hidden;
}
.job-company-logo img { width: 100%; height: 100%; object-fit: cover; }
.job-company { font-size: 0.8125rem; color: var(--text-muted); }
.job-title { font-size: 1rem; font-weight: 600; color: var(--text); margin-bottom: 0.5rem; }
.job-title a { color: var(--text); }
.job-title a:hover { color: var(--accent); }
.job-details { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.job-detail { font-size: 0.75rem; color: var(--text-dim); display: flex; align-items: center; gap: 0.25rem; }
.badge-featured {
  display: inline-flex; align-items: center; padding: 0.15rem 0.4rem; border-radius: 4px;
  background: var(--accent-dim); color: var(--accent); font-size: 0.6875rem; font-weight: 600;
}

/* ── Job List (cursor.directory style) ── */
.job-list { display: flex; flex-direction: column; gap: 0; }
.job-list-item { display: flex; align-items: center; gap: 1rem; padding: 1.25rem; border: 1px solid var(--border); border-bottom: none; text-decoration: none; color: var(--text); transition: background 0.15s; }
.job-list-item:first-child { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.job-list-item:last-child { border-bottom: 1px solid var(--border); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.job-list-item:only-child { border-radius: var(--radius-lg); border-bottom: 1px solid var(--border); }
.job-list-item:hover { background: var(--surface); }
.job-list-featured { background: var(--accent-dim); border-color: rgba(249,115,22,0.2); }
.job-list-featured:hover { background: rgba(249,115,22,0.08); }
.job-list-logo { width: 44px; height: 44px; border-radius: var(--radius); background: var(--bg-elevated); display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--accent); font-size: 1.125rem; flex-shrink: 0; overflow: hidden; }
.job-list-logo img { width: 100%; height: 100%; object-fit: cover; }
.job-list-content { flex: 1; min-width: 0; }
.job-list-top { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.25rem; }
.job-list-company { font-size: 0.8125rem; color: var(--text-muted); }
.job-list-time { font-size: 0.75rem; color: var(--text-dim); margin-left: auto; white-space: nowrap; }
.job-list-title { font-size: 1rem; font-weight: 600; margin-bottom: 0.375rem; }
.job-list-meta { display: flex; gap: 0.75rem; flex-wrap: wrap; font-size: 0.8125rem; color: var(--text-dim); }
.job-list-arrow { color: var(--text-dim); font-size: 1.25rem; flex-shrink: 0; }
@media (max-width: 600px) {
  .job-list-item { flex-wrap: wrap; }
  .job-list-arrow { display: none; }
  .job-list-time { margin-left: 0; }
}

/* ── Job Detail Page ── */
.job-detail-header { display: flex; align-items: center; gap: 1rem; }
.job-detail-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1rem; }
.job-tag { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.375rem 0.75rem; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; font-size: 0.8125rem; color: var(--text-muted); }
.job-description { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; }

/* ── Plan Selector ── */
.plan-options { display: flex; flex-direction: column; gap: 0.75rem; }
.plan-option { display: flex; align-items: flex-start; gap: 0.75rem; padding: 1rem; border: 2px solid var(--border); border-radius: var(--radius-lg); cursor: pointer; transition: all 0.15s; }
.plan-option:hover { border-color: var(--accent); }
.plan-option.selected { border-color: var(--accent); background: var(--accent-dim); }
.plan-option input[type="radio"] { margin-top: 0.25rem; accent-color: var(--accent); }
.plan-name { font-weight: 600; font-size: 0.9375rem; }
.plan-desc { font-size: 0.8125rem; color: var(--text-muted); margin-top: 0.25rem; }

/* ── Detail Page ── */
.detail-page { padding: 2rem 0 4rem; }
.detail-content { max-width: 800px; }
.detail-title { font-size: 1.75rem; font-weight: 700; margin-bottom: 0.5rem; }
.detail-meta { display: flex; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; align-items: center; }
.detail-author { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; color: var(--text-muted); }
.detail-author a { color: var(--primary); }
.detail-author-img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: var(--surface-hover); }
.detail-body { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; margin-bottom: 1.5rem; }
.detail-body pre {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem; overflow-x: auto; font-size: 0.8125rem; line-height: 1.6;
}
.detail-body code { font-family: 'SF Mono', 'Fira Code', monospace; font-size: 0.8125rem; }
.detail-sidebar { display: flex; flex-direction: column; gap: 1rem; }
.detail-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.copy-btn {
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0.5rem 1rem; color: var(--text-muted); cursor: pointer; font-size: 0.8125rem;
  transition: all 0.2s; display: inline-flex; align-items: center; gap: 0.5rem;
}
.copy-btn:hover { border-color: var(--border-light); color: var(--text); }
.copy-btn.copied { border-color: var(--green); color: var(--green); }

.vote-btn {
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0.5rem 1rem; color: var(--text-muted); cursor: pointer; font-size: 0.8125rem;
  transition: all 0.2s; display: inline-flex; align-items: center; gap: 0.5rem;
}
.vote-btn:hover { border-color: var(--accent); color: var(--accent); }
.vote-btn.voted { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }

/* ── Forms ── */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 0.375rem; color: var(--text); }
.form-hint { font-size: 0.75rem; color: var(--text-dim); margin-top: 0.25rem; }
.form-input, .form-textarea, .form-select {
  width: 100%; padding: 0.625rem 0.875rem; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text); font-size: 0.875rem; outline: none;
  transition: border-color 0.2s;
}
.form-input:focus, .form-textarea:focus, .form-select:focus { border-color: var(--accent); }
.form-textarea { min-height: 120px; resize: vertical; }
.form-select { cursor: pointer; }
.form-select option { background: var(--bg-card); }
.form-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2rem; max-width: 640px; }

/* ── Pricing ── */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; max-width: 960px; margin: 0 auto; }
.pricing-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 2rem; text-align: center; transition: all 0.2s;
}
.pricing-card.featured { border-color: var(--accent); }
.pricing-name { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 0.5rem; font-weight: 500; }
.pricing-price { font-size: 2.5rem; font-weight: 800; margin-bottom: 0.25rem; }
.pricing-price span { font-size: 0.875rem; font-weight: 400; color: var(--text-muted); }
.pricing-desc { font-size: 0.8125rem; color: var(--text-dim); margin-bottom: 1.5rem; }
.pricing-features { text-align: left; margin-bottom: 1.5rem; }
.pricing-features li { padding: 0.35rem 0; font-size: 0.875rem; color: var(--text-muted); }
.pricing-features .check { color: var(--green); margin-right: 0.5rem; font-weight: 600; }

/* ── Dashboard ── */
.dash-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.dash-stat {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.25rem; text-align: center;
}
.dash-stat-value { font-size: 1.75rem; font-weight: 700; }
.dash-stat-label { font-size: 0.75rem; color: var(--text-dim); margin-top: 0.25rem; }

/* ── Table ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 0.75rem; color: var(--text-dim); font-weight: 600; padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); text-transform: uppercase; letter-spacing: 0.05em; }
td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); font-size: 0.875rem; color: var(--text-muted); }
tr:hover td { background: var(--bg-card-hover); }

/* ── Status badges ── */
.status { display: inline-flex; align-items: center; padding: 0.15rem 0.5rem; border-radius: 4px; font-size: 0.6875rem; font-weight: 600; }
.status-approved { background: rgba(34,197,94,0.15); color: var(--green); }
.status-pending { background: rgba(249,115,22,0.15); color: var(--accent); }
.status-rejected { background: rgba(239,68,68,0.15); color: var(--red); }
.status-active { background: rgba(34,197,94,0.15); color: var(--green); }
.status-expired { background: rgba(115,115,115,0.15); color: var(--text-dim); }

/* ── Pagination ── */
.pagination { display: flex; gap: 0.5rem; justify-content: center; margin-top: 2rem; }
.pagination a, .pagination span {
  padding: 0.4rem 0.75rem; border-radius: var(--radius); font-size: 0.875rem;
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text-muted);
  transition: all 0.2s;
}
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ── Empty State ── */
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--text-dim); }
.empty-state-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state-title { font-size: 1.125rem; font-weight: 600; color: var(--text-muted); margin-bottom: 0.5rem; }

/* ── FAQ ── */
.faq-list { max-width: 700px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border); padding: 1.25rem 0; }
.faq-question { font-weight: 600; font-size: 0.9375rem; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.faq-answer { font-size: 0.875rem; color: var(--text-muted); margin-top: 0.75rem; line-height: 1.6; display: none; }
.faq-item.open .faq-answer { display: block; }

/* ── Footer ── */
.site-footer { border-top: 1px solid var(--border); padding: 3rem 0 2rem; margin-top: 4rem; }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(6, 1fr); gap: 2rem; margin-bottom: 2rem; }
.footer-brand .logo { margin-bottom: 0.75rem; }
.footer-desc { font-size: 0.8125rem; color: var(--text-dim); line-height: 1.5; }
.footer-links h4 { font-size: 0.8125rem; font-weight: 600; margin-bottom: 0.75rem; color: var(--text); }
.footer-links a { display: block; font-size: 0.8125rem; color: var(--text-dim); padding: 0.25rem 0; transition: color 0.2s; }
.footer-links a:hover { color: var(--text); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 1.5rem; }
.footer-bottom p { font-size: 0.75rem; color: var(--text-dim); text-align: center; }

@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 2fr repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .card-grid { grid-template-columns: 1fr; }
  .card-grid-2 { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
}

/* ── Utility ── */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.flex { display: flex; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }

/* ── Comments ── */
.comment-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.comment-avatar-placeholder { width: 36px; height: 36px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 0.875rem; flex-shrink: 0; }
.comment-input { width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 0.5rem; padding: 0.75rem 1rem; color: var(--text); font-size: 0.875rem; font-family: inherit; resize: vertical; min-height: 80px; transition: border-color 0.2s; }
.comment-input:focus { outline: none; border-color: var(--primary); }
.comment-item { display: flex; flex-direction: column; gap: 0.5rem; padding: 1rem 0; border-bottom: 1px solid var(--border); }
.comment-item:last-child { border-bottom: none; }
.comment-header { display: flex; align-items: center; gap: 0.75rem; }
.comment-author { font-weight: 600; font-size: 0.875rem; color: var(--text); margin-right: 0.5rem; }
.comment-date { font-size: 0.75rem; color: var(--text-dim); }
.comment-body { font-size: 0.875rem; color: var(--text-muted); line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.comment-submitted-msg { margin-top: 0.75rem; padding: 0.75rem 1rem; background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.3); border-radius: 0.5rem; color: #10b981; font-size: 0.8125rem; }

/* ── Profile ── */
.profile-header { display: flex; align-items: center; gap: 1.5rem; }
.profile-avatar { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.profile-avatar-placeholder { width: 80px; height: 80px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 700; flex-shrink: 0; }
.profile-name { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.25rem; }
.profile-bio { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 0.5rem; line-height: 1.5; }
.profile-meta { display: flex; gap: 1rem; color: var(--text-dim); font-size: 0.8125rem; flex-wrap: wrap; }

/* ── Inbox / Messages ── */
.badge-unread { background: var(--primary); color: #fff; font-size: 0.6875rem; font-weight: 700; padding: 0.125rem 0.4rem; border-radius: 999px; margin-left: 0.375rem; }
.inbox-item { display: flex; align-items: center; gap: 0.75rem; padding: 1rem; border-bottom: 1px solid var(--border); cursor: pointer; transition: background 0.15s; border-radius: var(--radius); }
.inbox-item:hover { background: var(--surface-hover); }
.inbox-item.unread { background: var(--accent-dim); }
.inbox-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.inbox-avatar-placeholder { width: 40px; height: 40px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 0.875rem; flex-shrink: 0; }
.inbox-info { flex: 1; min-width: 0; }
.inbox-name { font-weight: 600; font-size: 0.875rem; color: var(--text); }
.inbox-preview { font-size: 0.8125rem; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox-time { font-size: 0.75rem; color: var(--text-dim); white-space: nowrap; }

.thread-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.thread-partner { font-weight: 600; font-size: 1rem; }
.thread-messages { max-height: 400px; overflow-y: auto; margin-bottom: 1rem; display: flex; flex-direction: column; gap: 0.75rem; padding: 1rem 0; }
.thread-msg { max-width: 80%; padding: 0.75rem 1rem; border-radius: 1rem; font-size: 0.875rem; line-height: 1.5; word-break: break-word; }
.thread-msg.sent { align-self: flex-end; background: var(--primary); color: #fff; border-bottom-right-radius: 0.25rem; }
.thread-msg.received { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 0.25rem; }
.thread-msg-time { font-size: 0.6875rem; opacity: 0.6; margin-top: 0.25rem; }
.thread-compose { display: flex; flex-direction: column; border-top: 1px solid var(--border); padding-top: 1rem; }

@media (max-width: 600px) {
  .profile-header { flex-direction: column; text-align: center; }
  .profile-meta { justify-content: center; }
}
