/* ================================================================
   Incoplace — Stylesheet
   Palette: Navy #1b2d45 · Amber #f59e0b · Warm grays
   Fonts: DM Sans (UI) · Source Serif 4 (post body)
================================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Source+Serif+4:ital,wght@0,400;0,600;1,400&display=swap');

:root {
  --navy:        #1b2d45;
  --navy-mid:    #243852;
  --navy-light:  #2f4d72;
  --navy-hover:  #3a5f8a;
  --amber:       #f59e0b;
  --amber-dark:  #d97706;
  --amber-light: #fef3c7;
  --link:        #2563eb;
  --link-hover:  #1d4ed8;
  --bg:          #eceef1;
  --bg-card:     #ffffff;
  --bg-stripe:   #f7f8fa;
  --border:      #d1d5db;
  --border-dk:   #b0b7c3;
  --text:        #1f2937;
  --text-mid:    #4b5563;
  --text-muted:  #9ca3af;
  --success:     #059669;
  --danger:      #dc2626;
  --warning:     #d97706;
  --radius:      4px;
  --radius-lg:   8px;
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.08);
  --shadow:      0 2px 8px rgba(0,0,0,0.10);
  --shadow-lg:   0 4px 16px rgba(0,0,0,0.12);
}

/* ── Reset ────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; scroll-behavior: smooth; }
body { font-family: 'DM Sans', system-ui, sans-serif; background: var(--bg); color: var(--text); line-height: 1.55; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

/* ── Layout ───────────────────────────────────────────────────────────────── */
.layout {
  display: flex;
  flex-direction: row;
  flex: 1;
  gap: 16px;
  padding: 12px 16px;
  align-items: flex-start;
  width: 100%;
  max-width: 1260px;
  margin: 0 auto;
  box-sizing: border-box;
}
.main-col { flex: 1 1 0%; min-width: 0; }
.sidebar  { width: 200px; flex-shrink: 0; }

/* ── Poster rails (both sides) ────────────────────────────────────────────── */
.poster-rail {
  width: 175px;
  min-width: 175px;
  flex-shrink: 0;
  flex-grow: 0;
}

.poster-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.poster-label {
  background: #e5e7eb;
  color: #9ca3af;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 3px 8px;
  text-align: center;
}
.poster-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}
.poster-empty {
  width: 100%;
  height: 140px;
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 0.75rem;
  letter-spacing: 0.3px;
}
.poster-body { padding: 9px 10px; }
.poster-title { font-size: 0.82rem; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.poster-desc  { font-size: 0.72rem; color: var(--text-muted); line-height: 1.4; }
.poster-loc   { font-size: 0.68rem; color: var(--text-muted); margin-top: 4px; }
.poster-cta {
  display: block; text-align: center; margin-top: 8px; padding: 4px 0;
  background: #f3f4f6; border: 1px solid var(--border);
  color: var(--link); font-size: 0.74rem; border-radius: var(--radius);
}
.poster-cta:hover { background: #e5e7eb; text-decoration: none; }

/* ── Header ───────────────────────────────────────────────────────────────── */
.site-header {
  background: var(--navy);
  border-bottom: 3px solid var(--amber);
  position: sticky; top: 0; z-index: 200;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.header-inner {
  max-width: 1260px; margin: 0 auto;
  display: flex; align-items: center; gap: 14px;
  padding: 10px 16px;
}
.logo { display: flex; flex-direction: column; gap: 0; flex-shrink: 0; }
.logo a { display: flex; align-items: center; gap: 8px; color: #fff; font-size: 1.3rem; font-weight: 700; letter-spacing: -0.4px; text-decoration: none; }
.logo a:hover { color: var(--amber); text-decoration: none; }
.logo-icon { font-size: 1.45rem; }
.logo-name strong { color: var(--amber); }
.logo-tagline { font-size: 0.68rem; color: #7fa5c8; margin-left: 34px; letter-spacing: 0.2px; }

.header-search { flex: 1; max-width: 380px; display: flex; }
.header-search input {
  flex: 1; padding: 7px 12px;
  border: 1px solid rgba(255,255,255,0.15); border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  background: rgba(255,255,255,0.09); color: #fff;
  font-size: 0.85rem;
}
.header-search input::placeholder { color: #7fa5c8; }
.header-search input:focus { outline: none; background: rgba(255,255,255,0.15); }
.header-search button {
  background: var(--amber); border: none;
  padding: 7px 13px; border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--navy); font-weight: 700; font-size: 0.85rem;
}
.header-search button:hover { background: var(--amber-dark); }

.header-nav { display: flex; align-items: center; gap: 10px; flex-shrink: 0; margin-left: auto; }
.user-pill {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.09); padding: 5px 11px;
  border-radius: 20px; color: #c8daf0; font-size: 0.81rem;
}
.user-pill strong { color: #fff; }
.location-pill {
  background: rgba(245,158,11,0.2); color: var(--amber);
  padding: 2px 8px; border-radius: 12px; font-size: 0.71rem; white-space: nowrap;
}
.nav-link { color: #9bbfd8; font-size: 0.82rem; white-space: nowrap; padding: 4px 2px; }
.nav-link:hover { color: #fff; text-decoration: none; }
button.nav-link { background: none; border: none; cursor: pointer; font-family: inherit; }
.nav-btn { background: var(--amber); color: var(--navy) !important; padding: 5px 13px; border-radius: var(--radius); font-weight: 700; font-size: 0.82rem; }
.nav-btn:hover { background: var(--amber-dark); text-decoration: none; }
.admin-link { color: var(--amber) !important; font-weight: 600; }
.admin-link:hover { color: #fcd34d !important; }

/* ── Breadcrumb ───────────────────────────────────────────────────────────── */
.breadcrumb {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 6px 12px;
  font-size: 0.78rem; color: var(--text-muted); margin-bottom: 10px;
  display: flex; align-items: center; gap: 4px;
}
.breadcrumb a { color: var(--link); }
.breadcrumb .sep { color: var(--border-dk); }

/* ── Section header ───────────────────────────────────────────────────────── */
.section-hdr {
  background: var(--navy-mid); color: #fff;
  padding: 9px 14px; border-radius: var(--radius) var(--radius) 0 0;
  display: flex; align-items: center; justify-content: space-between;
}
.section-hdr h2 { font-size: 0.88rem; font-weight: 600; }

/* ── Category table ───────────────────────────────────────────────────────── */
.category-table {
  width: 100%; border-collapse: collapse;
  background: var(--bg-card); border: 1px solid var(--border);
  border-top: none; box-shadow: var(--shadow-sm);
}
.category-table th {
  background: #dde3ec; color: var(--text-mid);
  padding: 7px 13px; font-size: 0.73rem;
  text-transform: uppercase; letter-spacing: 0.6px; font-weight: 600;
  border-bottom: 1px solid var(--border-dk); text-align: left;
}
.category-table th.center { text-align: center; }
.category-table td { padding: 13px 13px; border-bottom: 1px solid #eaedf2; vertical-align: middle; }
.category-table tr:last-child td { border-bottom: none; }
.category-table tr:hover td { background: #f5f8ff; }

.cat-cell { display: flex; align-items: flex-start; gap: 12px; }
.cat-icon { font-size: 1.7rem; flex-shrink: 0; line-height: 1; padding-top: 2px; }
.cat-name-link { font-size: 0.97rem; font-weight: 700; color: var(--navy); display: block; }
.cat-name-link:hover { color: var(--link); text-decoration: none; }
.cat-desc { font-size: 0.78rem; color: var(--text-muted); margin-top: 3px; }
.stat-cell { text-align: center; color: var(--text-mid); font-size: 0.88rem; font-weight: 600; }
.stat-cell small { display: block; font-size: 0.71rem; font-weight: 400; color: var(--text-muted); }
.last-cell { font-size: 0.78rem; color: var(--text-muted); line-height: 1.65; }
.last-cell a { color: var(--link); font-weight: 600; font-size: 0.8rem; }
.no-posts { color: var(--text-muted); font-size: 0.8rem; font-style: italic; }

/* ── Thread table ─────────────────────────────────────────────────────────── */
.thread-table {
  width: 100%; border-collapse: collapse;
  background: var(--bg-card); border: 1px solid var(--border);
  border-top: none; box-shadow: var(--shadow-sm);
}
.thread-table th {
  background: #dde3ec; color: var(--text-mid);
  padding: 7px 13px; font-size: 0.73rem;
  text-transform: uppercase; letter-spacing: 0.6px; font-weight: 600;
  border-bottom: 1px solid var(--border-dk); text-align: left;
}
.thread-table th.right { text-align: right; }
.thread-table td { padding: 11px 13px; border-bottom: 1px solid #eaedf2; vertical-align: middle; }
.thread-table tr:last-child td { border-bottom: none; }
.thread-table tr:hover td { background: #f5f8ff; }
.thread-table tr.pinned td { background: #fffbeb; }
.thread-table tr.pinned:hover td { background: #fef3c7; }
.thread-table tr.sponsored td { background: #fffbeb; border-left: 3px solid var(--amber); }

.thread-title-link { font-size: 0.92rem; font-weight: 600; color: var(--navy); }
.thread-title-link:hover { color: var(--link); text-decoration: none; }
.thread-meta { font-size: 0.76rem; color: var(--text-muted); margin-top: 4px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.loc-tag { background: #e0eaf7; color: #2d5fa0; padding: 1px 7px; border-radius: 10px; font-size: 0.71rem; }
.badge-pinned    { background: #fef3c7; color: #92400e; padding: 1px 6px; border-radius: 3px; font-size: 0.7rem; font-weight: 700; border: 1px solid #fcd34d; }
.badge-sponsored { background: var(--amber); color: var(--navy); padding: 1px 6px; border-radius: 3px; font-size: 0.7rem; font-weight: 700; }
.badge-locked    { background: #6b7280; color: #fff; padding: 1px 6px; border-radius: 3px; font-size: 0.7rem; }

.col-stat { text-align: right; color: var(--text-mid); font-size: 0.85rem; white-space: nowrap; }

/* ── Filter bar ───────────────────────────────────────────────────────────── */
.filter-bar {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 9px 13px;
  display: flex; align-items: center; gap: 16px;
  font-size: 0.82rem; margin-bottom: 10px; flex-wrap: wrap;
}
.filter-bar strong { color: var(--text-mid); font-size: 0.78rem; }
.filter-bar label { display: flex; align-items: center; gap: 5px; cursor: pointer; color: var(--text-mid); }
.filter-bar input[type="radio"] { accent-color: var(--link); }
.filter-apply {
  background: var(--navy); color: #fff; border: none;
  padding: 4px 12px; border-radius: var(--radius);
  font-size: 0.79rem; font-weight: 500; margin-left: auto;
}
.filter-apply:hover { background: var(--navy-light); }

/* ── Search bar ───────────────────────────────────────────────────────────── */
.search-bar { display: flex; gap: 6px; margin-bottom: 10px; }
.search-input {
  flex: 1; padding: 8px 12px;
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 0.88rem; color: var(--text);
}
.search-input:focus { outline: none; border-color: var(--link); box-shadow: 0 0 0 2px rgba(37,99,235,0.14); }
.search-btn {
  background: var(--navy); color: #fff; border: none;
  padding: 8px 15px; border-radius: var(--radius); font-size: 0.85rem; font-weight: 500;
}
.search-btn:hover { background: var(--navy-light); }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 5px; border: none; border-radius: var(--radius); font-size: 0.85rem; font-weight: 500; cursor: pointer; text-decoration: none; padding: 7px 16px; transition: background 0.12s; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-light); color: #fff; }
.btn-amber { background: var(--amber); color: var(--navy); font-weight: 700; }
.btn-amber:hover { background: var(--amber-dark); color: var(--navy); }
.btn-ghost { background: var(--bg-stripe); color: var(--text-mid); border: 1px solid var(--border); }
.btn-ghost:hover { background: #e5e7eb; color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-warning:hover { background: #b45309; color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #047857; color: #fff; }
.btn-new { background: var(--success); color: #fff !important; font-weight: 600; }
.btn-new:hover { background: #047857; text-decoration: none; }
.btn-sm { padding: 4px 11px; font-size: 0.79rem; }
.btn-xs { padding: 3px 8px; font-size: 0.74rem; }
.btn-full { width: 100%; justify-content: center; padding: 10px 16px; font-size: 0.95rem; }

/* ── Thread page ──────────────────────────────────────────────────────────── */
.thread-hdr {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
  margin-bottom: 12px; box-shadow: var(--shadow-sm);
}
.thread-hdr h1 { font-size: 1.12rem; font-weight: 700; color: var(--navy); margin: 4px 0 8px; line-height: 1.35; }
.thread-hdr-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 0.78rem; color: var(--text-muted); }
.thread-hdr-meta span { display: flex; align-items: center; gap: 3px; }
.thread-admin-bar { margin-top: 11px; display: flex; gap: 6px; flex-wrap: wrap; }

.post {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 10px;
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.post-hdr {
  background: #edf1f7; border-bottom: 1px solid var(--border);
  padding: 7px 14px; display: flex; align-items: center; justify-content: space-between;
}
.post-author { font-weight: 700; color: var(--navy); font-size: 0.88rem; display: flex; align-items: center; gap: 8px; }
.post-author-link { display: flex; align-items: center; gap: 8px; color: var(--navy); text-decoration: none; font-weight: 700; }
.post-author-link:hover { color: var(--link); text-decoration: none; }
.post-author-loc { font-size: 0.75rem; color: var(--text-muted); font-weight: 400; }
.post-num-date { font-size: 0.75rem; color: var(--text-muted); display: flex; gap: 10px; align-items: center; }
.post-body {
  padding: 14px 16px; line-height: 1.8;
  font-family: 'Source Serif 4', Georgia, serif; font-size: 0.91rem;
  color: var(--text); white-space: pre-wrap; word-wrap: break-word;
}
.post-footer {
  background: #f7f9fc; border-top: 1px solid #e5e9f0;
  padding: 7px 14px; display: flex; align-items: center; gap: 10px;
}
.vote-btn {
  display: inline-flex; align-items: center; gap: 4px;
  background: none; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 3px 11px; font-size: 0.79rem; color: var(--text-mid); transition: all 0.12s;
}
.vote-btn:hover { background: #f0f5ff; border-color: var(--link); color: var(--link); }
.vote-btn.voted-up   { background: #dcfce7; border-color: var(--success); color: var(--success); }
.vote-btn.voted-down { background: #fee2e2; border-color: var(--danger); color: var(--danger); }
.admin-post-acts { margin-left: auto; display: flex; gap: 5px; }

/* ── Reply box ────────────────────────────────────────────────────────────── */
.reply-box {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); margin-top: 14px; overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.reply-hdr { background: var(--navy-mid); color: #fff; padding: 8px 14px; font-size: 0.85rem; font-weight: 600; }
.reply-body { padding: 14px; }
.reply-body textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: var(--radius); font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem; resize: vertical; min-height: 115px; color: var(--text);
}
.reply-body textarea:focus { outline: none; border-color: var(--link); box-shadow: 0 0 0 2px rgba(37,99,235,0.13); }
.reply-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: 0.78rem; color: var(--text-muted); }

.locked-notice {
  background: #f9fafb; border: 1px solid var(--border);
  padding: 14px; text-align: center; color: var(--text-muted);
  font-size: 0.88rem; border-radius: var(--radius); margin-top: 14px;
}
.login-to-post {
  background: #eff6ff; border: 1px solid #bfdbfe;
  padding: 14px; text-align: center; font-size: 0.88rem;
  border-radius: var(--radius); margin-top: 14px;
}
.login-to-post a { font-weight: 600; }

/* ── Pagination ───────────────────────────────────────────────────────────── */
.pagination { display: flex; align-items: center; gap: 4px; margin: 12px 0; font-size: 0.82rem; }
.pagination .label { color: var(--text-muted); margin-right: 4px; }
.page-link { padding: 4px 10px; border: 1px solid var(--border); border-radius: var(--radius); color: var(--link); background: var(--bg-card); }
.page-link:hover { background: #eff3ff; text-decoration: none; }
.page-link.current { background: var(--navy); color: #fff; border-color: var(--navy); pointer-events: none; }

/* ── Auth forms ───────────────────────────────────────────────────────────── */
.auth-wrap { min-height: calc(100vh - 120px); display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.auth-card {
  width: 100%; max-width: 450px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden;
}
.auth-card.wide { max-width: 520px; }
.auth-card-hdr { background: var(--navy); padding: 22px 24px; text-align: center; }
.auth-logo { font-size: 1.5rem; font-weight: 800; color: #fff; letter-spacing: -0.5px; }
.auth-logo span { color: var(--amber); }
.auth-tagline { font-size: 0.78rem; color: #7fa5c8; margin-top: 5px; }
.auth-card-body { padding: 24px; }
.auth-title { font-size: 1rem; font-weight: 700; color: var(--navy); margin-bottom: 18px; }

/* ── General forms ────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 15px; }
.form-group label { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 5px; color: var(--text-mid); }
.form-control {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 0.9rem; color: var(--text);
  background: #fff; transition: border-color 0.15s;
}
.form-control:focus { outline: none; border-color: var(--link); box-shadow: 0 0 0 2px rgba(37,99,235,0.13); }
.form-control:disabled { background: var(--bg-stripe); color: var(--text-muted); cursor: not-allowed; }
.form-hint { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }
.form-section { border-top: 1px solid var(--border); margin: 18px 0 14px; padding-top: 14px; }
.form-section-label { font-size: 0.79rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); margin-bottom: 12px; }
.form-footer-link { text-align: center; font-size: 0.82rem; color: var(--text-muted); margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }

/* ── Alerts ───────────────────────────────────────────────────────────────── */
.alert { padding: 10px 14px; border-radius: var(--radius); font-size: 0.85rem; margin-bottom: 16px; }
.alert-error   { background: #fee2e2; border: 1px solid #fca5a5; color: #991b1b; }
.alert-success { background: #dcfce7; border: 1px solid #86efac; color: #166534; }
.alert-info    { background: #eff6ff; border: 1px solid #93c5fd; color: #1e40af; }
.alert-warning { background: #fffbeb; border: 1px solid #fcd34d; color: #92400e; }

/* ── Sidebar ──────────────────────────────────────────────────────────────── */
.sidebar-label { font-size: 0.69rem; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-muted); margin-bottom: 6px; padding-left: 2px; font-weight: 600; }
.sidebar-nav { margin-bottom: 14px; }
.sidebar-nav a {
  display: block; padding: 7px 11px;
  background: var(--bg-card); border: 1px solid var(--border);
  font-size: 0.83rem; color: var(--text-mid);
  margin-bottom: 3px; border-radius: var(--radius);
}
.sidebar-nav a:hover { background: #eff3ff; color: var(--link); text-decoration: none; border-color: #c0d0f0; }

.sponsor-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; overflow: hidden; box-shadow: var(--shadow-sm); }
.sponsor-card-hdr { background: #6b7280; color: #fff; font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.8px; padding: 3px 9px; }
.sponsor-card-body { padding: 10px 11px; }
.sponsor-img { width: 100%; height: 100px; object-fit: cover; margin-bottom: 8px; border-radius: 2px; }
.sponsor-title { font-size: 0.84rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.sponsor-desc  { font-size: 0.76rem; color: var(--text-muted); line-height: 1.45; }
.sponsor-cta   { display: block; text-align: center; margin-top: 8px; padding: 4px 0; background: #f3f4f6; border: 1px solid var(--border); color: var(--link); font-size: 0.76rem; border-radius: var(--radius); }
.sponsor-cta:hover { background: #e5e7eb; text-decoration: none; }

/* ── Info bar / CTA ───────────────────────────────────────────────────────── */
.info-bar {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 7px 14px;
  font-size: 0.79rem; color: var(--text-muted);
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 7px;
}
.cta-bar {
  background: var(--navy); color: #e2e8f0;
  padding: 14px 18px; border-radius: var(--radius);
  margin-top: 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  font-size: 0.88rem;
}
.cta-bar strong { color: #fff; }
.cta-bar .cta-btns { display: flex; gap: 8px; margin-left: auto; }

/* ── Empty state ──────────────────────────────────────────────────────────── */
.empty-state {
  background: var(--bg-card); border: 1px solid var(--border);
  padding: 48px 24px; text-align: center; color: var(--text-muted);
  border-radius: var(--radius);
}
.empty-state .icon { font-size: 2.8rem; margin-bottom: 10px; }
.empty-state p { font-size: 0.9rem; }

/* ── Admin layout ─────────────────────────────────────────────────────────── */
.admin-wrap {
  display: flex; gap: 20px;
  max-width: 1100px; margin: 20px auto; padding: 0 16px;
  align-items: flex-start;
}
.admin-sidebar {
  width: 180px; flex-shrink: 0;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
}
.admin-sidebar-hdr {
  background: var(--navy-mid); color: #fff;
  padding: 10px 12px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.3px;
}
.admin-nav-link {
  display: block; padding: 8px 13px;
  font-size: 0.84rem; color: var(--text-mid); border-bottom: 1px solid var(--border);
  text-decoration: none;
}
.admin-nav-link:last-child { border-bottom: none; }
.admin-nav-link:hover { background: #eff3ff; color: var(--link); }
.admin-nav-link.active { background: var(--navy); color: #fff; font-weight: 600; }
.admin-nav-link.active:hover { background: var(--navy-light); }

.admin-main { flex: 1; min-width: 0; }
.admin-page-title { font-size: 1.3rem; color: var(--navy); font-weight: 700; margin-bottom: 18px; }

.stats-row { display: flex; gap: 12px; margin-bottom: 22px; flex-wrap: wrap; }
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 20px;
  flex: 1; min-width: 100px; text-align: center; box-shadow: var(--shadow-sm);
}
.stat-card .num { font-size: 1.7rem; font-weight: 700; color: var(--navy); }
.stat-card .lbl { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); margin-top: 2px; }

.admin-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 22px;
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.admin-card-hdr {
  background: #dde3ec; padding: 10px 14px;
  font-size: 0.85rem; font-weight: 700; color: var(--navy);
  border-bottom: 1px solid var(--border-dk);
  display: flex; align-items: center; justify-content: space-between;
}
.admin-card-body { padding: 16px; }

.admin-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.admin-table th {
  background: var(--bg-stripe); color: var(--text-muted);
  padding: 7px 12px; text-align: left;
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.admin-table td { padding: 9px 12px; border-bottom: 1px solid #eaedf2; vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: #f8faff; }
.admin-table .actions { display: flex; gap: 5px; align-items: center; }
.row-inactive td { opacity: 0.5; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 0.71rem; font-weight: 600; }
.badge-active   { background: #dcfce7; color: #166534; }
.badge-inactive { background: #f3f4f6; color: #6b7280; }
.badge-admin    { background: var(--amber); color: var(--navy); }
.badge-danger   { background: #fee2e2; color: #991b1b; }
.badge-sidebar  { background: #dbeafe; color: #1e40af; }

.flash-ok  { background: #ecfdf5; border: 1px solid #86efac; color: #166534; padding: 10px 14px; border-radius: var(--radius); margin-bottom: 16px; font-size: 0.88rem; }
.flash-err { background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b; padding: 10px 14px; border-radius: var(--radius); margin-bottom: 16px; font-size: 0.88rem; }

/* ── Locations (admin) ────────────────────────────────────────────────────── */
.loc-group { margin-bottom: 6px; }
.loc-country-row { font-weight: 700; color: var(--navy); font-size: 0.88rem; padding: 7px 10px; background: var(--bg-stripe); border-radius: var(--radius); display: flex; align-items: center; justify-content: space-between; margin-bottom: 2px; }
.loc-city-row    { padding: 5px 10px 5px 22px; font-size: 0.84rem; color: var(--text-mid); display: flex; align-items: center; justify-content: space-between; border-left: 2px solid var(--border); margin-left: 10px; margin-bottom: 2px; }
.loc-suburb-row  { padding: 4px 10px 4px 22px; font-size: 0.81rem; color: var(--text-muted); display: flex; align-items: center; justify-content: space-between; border-left: 2px solid #e5e9f0; margin-left: 22px; margin-bottom: 2px; }
.loc-actions { display: flex; gap: 5px; }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--navy); color: #7fa5c8;
  text-align: center; padding: 18px 16px;
  font-size: 0.79rem; margin-top: auto;
}
.site-footer strong { color: #fff; }
.site-footer a { color: #9bbfd8; }
.site-footer a:hover { color: #fff; }
.footer-links { margin-top: 7px; display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; }

/* ── Utility ──────────────────────────────────────────────────────────────── */
.text-muted  { color: var(--text-muted) !important; }
.text-right  { text-align: right; }
.text-center { text-align: center; }
.nowrap      { white-space: nowrap; }
.muted       { color: var(--text-muted); }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }

/* ── Func bar (right sidebar) ─────────────────────────────────────────────── */
.func-bar {
  width: 175px;
  min-width: 175px;
  flex-shrink: 0;
  flex-grow: 0;
}
.func-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.func-label {
  background: #e5e7eb;
  color: #6b7280;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 4px 10px;
  font-weight: 600;
}
.func-nav { padding: 4px 0; }
.func-link {
  display: block;
  padding: 6px 11px;
  font-size: 0.8rem;
  color: var(--text-mid);
  text-decoration: none;
  border-bottom: 1px solid #f0f2f5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.func-link:last-child { border-bottom: none; }
.func-link:hover { background: #eff3ff; color: var(--link); text-decoration: none; }
.func-action-btn {
  display: block; margin: 8px 10px 4px;
  background: var(--success); color: #fff;
  padding: 6px 10px; border-radius: var(--radius);
  font-size: 0.79rem; font-weight: 600; text-align: center;
  text-decoration: none;
}
.func-action-btn:hover { background: #047857; color: #fff; text-decoration: none; }
.func-search { padding: 8px 10px; }
.func-search-input {
  width: 100%; padding: 5px 8px; margin-bottom: 5px;
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 0.8rem; color: var(--text);
}
.func-search-input:focus { outline: none; border-color: var(--link); }
.func-search-btn {
  width: 100%; padding: 5px 8px;
  background: var(--navy); color: #fff; border: none;
  border-radius: var(--radius); font-size: 0.8rem; font-weight: 500;
}
.func-search-btn:hover { background: var(--navy-light); }

/* ── Sort bar ─────────────────────────────────────────────────────────────── */
.sort-bar {
  display: flex; align-items: center;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 7px 12px;
  font-size: 0.82rem; margin-bottom: 10px;
}
.sort-label { color: var(--text-mid); font-weight: 600; margin-right: 8px; white-space: nowrap; }
.sort-select {
  padding: 3px 8px; border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 0.82rem;
  color: var(--text); background: #fff;
}
.sort-select:focus { outline: none; border-color: var(--link); }

/* ── Post images ──────────────────────────────────────────────────────────── */
.post-images {
  padding: 8px 16px 12px;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.post-img-thumb {
  width: 120px; height: 90px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: opacity 0.15s;
}
.post-img-thumb:hover { opacity: 0.85; }

/* ── Image attach (reply / new thread) ───────────────────────────────────── */
.image-attach-row { margin: 10px 0 6px; }
.image-attach-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.8rem; color: var(--text-muted); cursor: pointer;
}
.image-attach-input { font-size: 0.8rem; }
.image-attach-previews { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.image-attach-previews img { width: 70px; height: 52px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--border); }

/* ── Avatars in posts ─────────────────────────────────────────────────────── */
.post-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.post-avatar-placeholder {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--navy-light);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 700;
  flex-shrink: 0;
}

/* ── Nav avatar ───────────────────────────────────────────────────────────── */
.nav-avatar {
  width: 24px; height: 24px;
  border-radius: 50%; object-fit: cover;
  border: 1px solid rgba(255,255,255,0.3);
  flex-shrink: 0;
}
.nav-avatar-placeholder {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--amber);
  color: var(--navy);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 700;
  flex-shrink: 0;
}

/* ── Notification badge ───────────────────────────────────────────────────── */
.nav-badge {
  position: absolute;
  top: -6px; right: -8px;
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 16px; height: 16px;
  border-radius: 8px;
  padding: 0 4px;
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 1;
}
.nav-badge-alert { background: #f59e0b; color: #1b2d45; }

/* ── Chat inbox ───────────────────────────────────────────────────────────── */
.chat-search-bar {
  display: flex; gap: 10px; align-items: center;
  background: #1e3452; border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px; padding: 12px 16px; margin-bottom: 14px;
}
.chat-search-bar input {
  flex: 1; background: #192d45; border: 1px solid rgba(255,255,255,0.1);
  border-radius: 7px; color: #d0dff0; padding: 8px 13px; font-size: 0.88rem;
  font-family: inherit;
}
.chat-search-bar input:focus { outline: none; border-color: var(--amber); }
.chat-search-results { margin-top: 12px; display: flex; flex-direction: column; gap: 4px; }
.chat-search-result {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px;
  border-radius: 8px; background: rgba(255,255,255,0.04);
}
.chat-inbox {
  border-radius: 10px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08); background: #1e3452;
}
.chat-inbox-item {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 18px; border-bottom: 1px solid rgba(255,255,255,0.06);
  text-decoration: none; color: inherit; transition: background 0.13s;
}
.chat-inbox-item:last-child { border-bottom: none; }
.chat-inbox-item:hover { background: rgba(255,255,255,0.06); text-decoration: none; }
.chat-inbox-item.unread .chat-inbox-name { font-weight: 700; color: #fff; }
.chat-inbox-item.unread .chat-inbox-preview { color: #b0c8e0; }
.chat-inbox-av {
  width: 46px; height: 46px; border-radius: 50%; object-fit: cover;
  flex-shrink: 0; border: 2px solid rgba(255,255,255,0.1);
}
.chat-inbox-av-ph {
  width: 46px; height: 46px; border-radius: 50%; background: var(--amber);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #1b2d45; font-size: 1.1rem; flex-shrink: 0;
}
.chat-inbox-body { flex: 1; min-width: 0; }
.chat-inbox-name { font-size: 0.9rem; color: #c8daf0; }
.chat-inbox-preview {
  font-size: 0.79rem; color: #5a7a99; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chat-inbox-meta { flex-shrink: 0; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.chat-inbox-time { font-size: 0.7rem; color: #4a607a; }
.chat-unread-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--amber); flex-shrink: 0;
}
.chat-empty { text-align: center; padding: 52px 24px; color: #4a607a; }
.chat-empty-icon { font-size: 2.8rem; margin-bottom: 12px; }

/* ── Chat conversation ────────────────────────────────────────────────────── */
.chat-conv-header {
  display: flex; align-items: center; gap: 13px;
  padding: 13px 18px; background: #1e3452;
  border: 1px solid rgba(255,255,255,0.08);
  border-bottom: none;
}
.chat-conv-header a { color: #5a7a99; font-size: 0.82rem; text-decoration: none; margin-right: 4px; }
.chat-conv-header a:hover { color: var(--amber); }
.chat-conv-av {
  width: 36px; height: 36px; border-radius: 50%; object-fit: cover;
  flex-shrink: 0; border: 2px solid rgba(255,255,255,0.1);
}
.chat-conv-av-ph {
  width: 36px; height: 36px; border-radius: 50%; background: var(--amber);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #1b2d45; font-size: 0.9rem; flex-shrink: 0;
}
.chat-conv-name { font-weight: 600; font-size: 0.95rem; color: #fff; }

/* Forum-comment style messages */
.chat-comments {
  border: 1px solid rgba(255,255,255,0.08);
  background: #192d45;
}
.chat-comment {
  display: flex; gap: 14px; padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background 0.12s;
}
.chat-comment:last-child { border-bottom: none; }
.chat-comment:hover { background: rgba(255,255,255,0.025); }
.chat-comment-mine {
  background: rgba(245,158,11,0.06);
}
.chat-comment-mine:hover { background: rgba(245,158,11,0.09); }
.chat-comment-av {
  width: 38px; height: 38px; border-radius: 50%; object-fit: cover;
  flex-shrink: 0; border: 2px solid rgba(255,255,255,0.1); margin-top: 2px;
}
.chat-comment-av-ph {
  width: 38px; height: 38px; border-radius: 50%; background: var(--amber);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #1b2d45; font-size: 0.9rem;
  flex-shrink: 0; margin-top: 2px;
}
.chat-comment-body { flex: 1; min-width: 0; }
.chat-comment-meta {
  display: flex; align-items: center; gap: 8px; margin-bottom: 5px; flex-wrap: wrap;
}
.chat-comment-name {
  font-weight: 600; font-size: 0.88rem; color: #c8daf0;
  text-decoration: none;
}
.chat-comment-name:hover { color: var(--amber); text-decoration: none; }
.chat-comment-you {
  font-size: 0.68rem; font-weight: 600; background: rgba(245,158,11,0.2);
  color: var(--amber); padding: 1px 6px; border-radius: 4px;
}
.chat-comment-time { font-size: 0.73rem; color: #4a607a; }
.chat-comment-text {
  font-size: 0.88rem; color: #d0dff0; line-height: 1.65;
  word-break: break-word; white-space: pre-wrap;
}
.chat-comment-img {
  max-width: 420px; width: 100%; border-radius: 8px;
  margin-top: 10px; display: block;
  border: 1px solid rgba(255,255,255,0.08);
}

/* Input bar */
.chat-input-bar {
  background: #1e3452; border: 1px solid rgba(255,255,255,0.08);
  border-top: none; border-radius: 0 0 10px 10px;
  padding: 12px 16px; display: flex; gap: 10px; align-items: flex-end;
}
.chat-input-bar textarea {
  flex: 1; background: #192d45; border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px; color: #d0dff0; padding: 9px 13px; font-size: 0.88rem;
  line-height: 1.55; resize: none; min-height: 42px; max-height: 180px;
  font-family: inherit; overflow-y: auto;
}
.chat-input-bar textarea:focus { outline: none; border-color: var(--amber); }
.chat-img-label {
  cursor: pointer; color: #5a7a99; font-size: 1.25rem; padding: 8px 2px;
  flex-shrink: 0; align-self: flex-end; transition: color 0.15s; line-height: 1;
}
.chat-img-label:hover { color: var(--amber); }
.chat-send-btn {
  background: var(--amber); color: #1b2d45; border: none; border-radius: 8px;
  padding: 9px 20px; font-weight: 700; font-size: 0.85rem;
  cursor: pointer; flex-shrink: 0; align-self: flex-end;
  transition: background 0.15s; font-family: inherit;
}
.chat-send-btn:hover { background: var(--amber-dark); }

/* ── Public profile page ─────────────────────────────────────────────────── */
.profile-hero {
  background: linear-gradient(135deg, #1e3452 0%, #243852 100%);
  border-radius: 10px; padding: 28px 24px 20px;
  margin-bottom: 16px; border: 1px solid rgba(255,255,255,0.08);
}
.profile-hero-top { display: flex; align-items: flex-start; gap: 20px; }
.profile-av-xl {
  width: 86px; height: 86px; border-radius: 50%; object-fit: cover;
  flex-shrink: 0; border: 3px solid rgba(255,255,255,0.15);
}
.profile-av-xl-ph {
  width: 86px; height: 86px; border-radius: 50%; background: var(--amber);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.1rem; font-weight: 700; color: #1b2d45; flex-shrink: 0;
}
.profile-info { flex: 1; min-width: 0; }
.profile-username-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.profile-username { font-size: 1.45rem; font-weight: 700; color: #fff; margin: 0; }
.profile-meta-row { display: flex; gap: 16px; flex-wrap: wrap; font-size: 0.79rem; color: #5a7a99; }
.profile-bio { margin-top: 11px; font-size: 0.87rem; color: #9bbfd8; line-height: 1.65; }
.profile-actions { flex-shrink: 0; display: flex; flex-direction: column; gap: 8px; }
.profile-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: rgba(255,255,255,0.06);
  border-radius: 8px; overflow: hidden; margin-top: 20px;
  border: 1px solid rgba(255,255,255,0.06);
}
.profile-stat { background: #192d45; padding: 13px 12px; text-align: center; }
.profile-stat-num { font-size: 1.35rem; font-weight: 700; color: var(--amber); line-height: 1; }
.profile-stat-num.rep-pos { color: #34d399; }
.profile-stat-num.rep-neg { color: #f87171; }
.profile-stat-lbl { font-size: 0.68rem; color: #5a7a99; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 4px; }
.profile-activity { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.profile-act-card {
  background: #1e3452; border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08); overflow: hidden;
}
.profile-act-hdr {
  padding: 11px 16px; font-size: 0.75rem; font-weight: 600;
  color: #6b8499; text-transform: uppercase; letter-spacing: 0.06em;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.profile-act-item {
  display: block; padding: 10px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  text-decoration: none; color: inherit; transition: background 0.12s;
}
.profile-act-item:last-child { border-bottom: none; }
.profile-act-item:hover { background: rgba(255,255,255,0.04); text-decoration: none; }
.profile-act-title { font-size: 0.83rem; color: #c8daf0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-act-sub { font-size: 0.71rem; color: #4a607a; margin-top: 2px; }
.profile-act-empty { padding: 16px; font-size: 0.82rem; color: #4a607a; }

/* ── Notifications ────────────────────────────────────────────────────────── */
.notif-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 13px 16px; border-bottom: 1px solid rgba(255,255,255,0.06);
  text-decoration: none; color: inherit; transition: background 0.13s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: rgba(255,255,255,0.04); text-decoration: none; }
.notif-item.unread { background: rgba(245,158,11,0.05); }
.notif-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.notif-body { flex: 1; min-width: 0; }
.notif-msg { font-size: 0.86rem; color: #c8daf0; }
.notif-time { font-size: 0.72rem; color: #4a607a; margin-top: 3px; }

/* ── Edit post ────────────────────────────────────────────────────────────── */
.post-edit-actions { display: flex; gap: 6px; margin-left: auto; }

@media (max-width: 768px) {
  .profile-activity, .profile-stats { grid-template-columns: 1fr 1fr; }
  .chat-comment-img { max-width: 100%; }
}
@media (max-width: 560px) {
  .profile-hero-top { flex-direction: column; align-items: center; text-align: center; }
  .profile-meta-row { justify-content: center; }
  .profile-actions { flex-direction: row; justify-content: center; }
  .profile-activity { grid-template-columns: 1fr; }
  .profile-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ── Profile settings ─────────────────────────────────────────────────────── */
.settings-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 16px;
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.settings-card-hdr {
  background: #dde3ec; padding: 9px 14px;
  font-size: 0.84rem; font-weight: 700; color: var(--navy);
  border-bottom: 1px solid var(--border-dk);
}
.settings-card-body { padding: 16px; }
.avatar-section { display: flex; gap: 20px; align-items: flex-start; }
.avatar-preview { flex-shrink: 0; }
.avatar-upload-area { flex: 1; }
.avatar-lg {
  width: 80px; height: 80px;
  border-radius: 50%; object-fit: cover;
  border: 2px solid var(--border);
}
.avatar-placeholder {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--navy-light);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; font-weight: 700;
  border: 2px solid var(--border);
}

/* ── Featured threads ─────────────────────────────────────────────────────── */
.badge-featured {
  display: inline-block; padding: 1px 7px;
  background: #fef3c7; color: #92400e;
  border: 1px solid #fcd34d;
  border-radius: 3px; font-size: 0.72rem; font-weight: 700;
  vertical-align: middle; margin-right: 4px;
}
tr.featured { background: #fffdf0; }
tr.featured:hover { background: #fef9d9; }
.unread-row { background: #fffbeb; }

/* ── Business Directory ───────────────────────────────────────────────────── */
.dir-filter-bar {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 14px; margin-bottom: 14px;
}
.dir-filter-bar label { font-size: 0.82rem; font-weight: 600; color: var(--text-mid); }
.dir-filter-bar select { font-size: 0.82rem; padding: 4px 8px; border: 1px solid var(--border); border-radius: var(--radius); }
.directory-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px; margin-bottom: 20px;
}
.biz-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px;
  box-shadow: var(--shadow-sm); transition: box-shadow 0.15s;
  text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 8px;
}
.biz-card:hover { box-shadow: var(--shadow); text-decoration: none; }
.biz-logo {
  width: 56px; height: 56px; border-radius: var(--radius);
  object-fit: cover; border: 1px solid var(--border); flex-shrink: 0;
}
.biz-logo-ph {
  width: 56px; height: 56px; border-radius: var(--radius);
  background: var(--navy-light); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; font-weight: 700; flex-shrink: 0;
  border: 1px solid var(--border);
}
.biz-card-top { display: flex; gap: 12px; align-items: flex-start; }
.biz-card-info { flex: 1; min-width: 0; }
.biz-card-name { font-weight: 700; font-size: 0.95rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.biz-card-meta { font-size: 0.76rem; color: var(--text-muted); margin-top: 2px; }
.biz-card-desc { font-size: 0.8rem; color: var(--text-mid); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.biz-cat-tag {
  display: inline-block; padding: 2px 8px;
  background: #e8edf5; color: var(--navy);
  border-radius: 99px; font-size: 0.72rem; font-weight: 600;
}
.badge-verified {
  display: inline-block; padding: 1px 7px;
  background: #d1fae5; color: #065f46;
  border: 1px solid #6ee7b7;
  border-radius: 3px; font-size: 0.72rem; font-weight: 700;
  vertical-align: middle;
}
.biz-detail-hdr {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px 24px; margin-bottom: 16px;
}
.biz-detail-top { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 12px; }
.biz-detail-logo { width: 80px; height: 80px; border-radius: var(--radius); object-fit: cover; border: 1px solid var(--border); flex-shrink: 0; }
.biz-detail-logo-ph {
  width: 80px; height: 80px; border-radius: var(--radius);
  background: var(--navy-light); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; font-weight: 700; flex-shrink: 0;
  border: 1px solid var(--border);
}
.biz-detail-name { font-size: 1.4rem; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.biz-detail-meta { font-size: 0.84rem; color: var(--text-mid); display: flex; gap: 12px; flex-wrap: wrap; }
.biz-detail-body { font-size: 0.9rem; color: var(--text); line-height: 1.65; margin-top: 10px; white-space: pre-wrap; }
.biz-contact-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.biz-contact-row a { font-size: 0.84rem; }
.dir-form-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px; max-width: 640px; margin: 0 auto 24px;
}
.dir-form-card h2 { font-size: 1.1rem; font-weight: 700; color: var(--navy); margin-bottom: 16px; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  /* Tablet: drop left rail, keep right */
  .poster-rail-left { display: none; }
  .admin-wrap { flex-direction: column; }
  .admin-sidebar { width: 100%; display: flex; flex-direction: row; overflow-x: auto; }
  .admin-sidebar-hdr { display: none; }
  .admin-nav-link { border-bottom: none; border-right: 1px solid var(--border); white-space: nowrap; }
  .admin-nav-link:last-child { border-right: none; }
  .col-stat { display: none; }
}
@media (max-width: 640px) {
  /* Phone: drop both rails */
  .layout { padding: 8px; gap: 8px; }
  .func-bar { display: none; }
  .sidebar { width: 100%; }
  .header-inner { flex-wrap: wrap; }
  .header-search { order: 3; max-width: 100%; width: 100%; }
  .user-pill { display: none; }
  .form-row { flex-direction: column; gap: 0; }
  .stats-row { gap: 8px; }
  .stat-card { padding: 12px; }
  .avatar-section { flex-direction: column; }
}
