/* ============================================================================
   BHILWARAMART — DESIGN SYSTEM
   Fonts: Manrope (headings/Latin) + Hind (Hindi body)
   Palette: Deep blue #1e4d8f (primary) + Terracotta #e0663a (accent)
   IMPORTANT: never apply `transform` to <body> or any ancestor of a
   position:fixed element (bottom-nav) — it breaks fixed positioning.
   ========================================================================= */

:root {
  --primary: #1e4d8f;
  --primary-dark: #163a6b;
  --primary-light: #eaf1fb;
  --accent: #e0663a;
  --accent-dark: #c14f27;
  --accent-light: #fdefe9;
  --ink: #1a2233;
  --ink-soft: #4a5568;
  --muted: #7a8699;
  --bg: #f7f8fb;
  --surface: #ffffff;
  --border: #e6e9f0;
  --success: #1a9d5c;
  --warning: #d99a1b;
  --danger: #d94141;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(26,34,51,0.08);
  --shadow-md: 0 6px 20px rgba(26,34,51,0.10);
  --shadow-lg: 0 16px 40px rgba(26,34,51,0.14);
  --header-h: 64px;
  --bottom-nav-h: 64px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Hind', 'Manrope', sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  /* NEVER add transform here — it detaches position:fixed descendants (bottom-nav) */
  padding-bottom: calc(var(--bottom-nav-h) + 12px);
}
h1, h2, h3, h4, h5, .brand-text, button, .btn {
  font-family: 'Manrope', 'Hind', sans-serif;
}
h1 { font-size: 1.6rem; font-weight: 800; margin: 0 0 8px; }
h2 { font-size: 1.3rem; font-weight: 700; margin: 0; }
h3 { font-size: 1.05rem; font-weight: 700; margin: 24px 0 12px; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.muted-sm { color: var(--muted); font-size: 0.8rem; }
.block { display: block; }
.section { padding: 20px 16px 8px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.section-title { font-size: 1.15rem; font-weight: 800; }
.subsection-title { font-size: 1rem; font-weight: 700; margin: 20px 0 10px; color: var(--primary-dark); }
.view-all-link { color: var(--accent); font-weight: 600; font-size: 0.9rem; }
.empty-state { text-align: center; color: var(--muted); padding: 32px 16px; }

/* ===================== Card entrance animation ===================== */
@keyframes cardIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.card-anim { animation: cardIn 0.35s ease both; }
.card-anim:nth-child(2) { animation-delay: 0.03s; }
.card-anim:nth-child(3) { animation-delay: 0.06s; }
.card-anim:nth-child(4) { animation-delay: 0.09s; }
.card-anim:nth-child(5) { animation-delay: 0.12s; }
@media (prefers-reduced-motion: reduce) {
  .card-anim { animation: none; }
  html { scroll-behavior: auto; }
}

/* ===================== Buttons ===================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 20px; border-radius: 100px; border: none; font-weight: 700;
  font-size: 0.92rem; cursor: pointer; transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease;
}
.btn:active { transform: scale(0.96); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: #fff; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:hover { background: var(--primary-light); }
.btn-whatsapp { background: #22a955; color: #fff; }
.icon-whatsapp { color: #22a955; vertical-align: -3px; margin-right: 2px; }
.btn-whatsapp .icon-whatsapp { color: #fff; }
.btn-danger { background: #fff; color: var(--danger); border: 1.5px solid var(--danger); }
.btn-danger:hover { background: #fdeeee; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 0.82rem; }
.btn-icon {
  display: inline-flex; align-items: center; gap: 5px; background: #fff; border: 1px solid var(--border);
  border-radius: 100px; padding: 8px 14px; font-size: 0.85rem; cursor: pointer; color: var(--ink-soft);
  transition: transform 0.1s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn-icon:active { transform: scale(0.94); }
.btn-icon.active { color: var(--accent); border-color: var(--accent); background: var(--accent-light); }

/* ===================== Top nav (desktop) ===================== */
.topnav { display: none; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 40; }
.topnav-inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.15rem; color: var(--primary); flex-shrink: 0; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 0.95rem; font-weight: 800; }
.topnav-search { flex: 1; display: flex; max-width: 440px; background: #fff; border: 1.5px solid var(--border); border-radius: 100px; padding: 3px; transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.topnav-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.topnav-search input { flex: 1; border: none; border-radius: 100px; padding: 8px 16px; font-family: inherit; font-size: 0.9rem; outline: none; background: transparent; }
.topnav-search button { border: none; background: var(--primary); color: #fff; border-radius: 100px; padding: 0 18px; cursor: pointer; }
.topnav-links { display: flex; align-items: center; gap: 18px; margin-left: auto; font-weight: 600; font-size: 0.9rem; }
.topnav-links a.active { color: var(--accent); }
.topnav-links a:hover { color: var(--primary); }
.lang-toggle { border: 1.5px solid var(--border); border-radius: 100px; padding: 5px 12px; font-weight: 700; }
.icon-link { font-size: 1.15rem; }
.avatar-link img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 2px solid var(--primary-light); }

/* ===================== Mobile top bar ===================== */
.mobile-topbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--surface); position: sticky; top: 0; z-index: 40; border-bottom: 1px solid var(--border); }
.mobile-topbar-actions { display: flex; align-items: center; gap: 14px; }
.lang-toggle-sm { border: 1.5px solid var(--border); border-radius: 100px; padding: 4px 10px; font-size: 0.78rem; font-weight: 700; }

@media (min-width: 900px) {
  .topnav { display: block; }
  .mobile-topbar { display: none; }
  body { padding-bottom: 24px; }
}

/* ===================== Hero ===================== */
.hero { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); padding: 36px 0 46px; color: #fff; position: relative; overflow: hidden; }
.hero::after { content: ''; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(224,102,58,0.35), transparent 70%); pointer-events: none; z-index: 0; }
.hero-inner { position: relative; z-index: 1; }
.hero h1 { font-size: 1.5rem; font-weight: 800; margin-bottom: 18px; max-width: 480px; }
.hero-search { display: flex; align-items: center; background: #fff; border-radius: 100px; padding: 6px 6px 6px 20px; box-shadow: var(--shadow-lg); max-width: 520px; transition: box-shadow 0.15s ease, transform 0.1s ease; }
.hero-search:focus-within { box-shadow: 0 20px 48px rgba(30,77,143,0.25); }
.hero-search-inline { margin: 8px 0 20px; box-shadow: var(--shadow-sm); padding: 5px 5px 5px 18px; }
.hero-search input { flex: 1; border: none; outline: none; padding: 10px 8px; font-family: inherit; font-size: 0.95rem; border-radius: 100px; min-width: 0; }
.hero-search button { border: none; background: var(--accent); color: #fff; border-radius: 100px; padding: 11px 26px; font-weight: 700; cursor: pointer; flex-shrink: 0; transition: background 0.15s ease, transform 0.1s ease; }
.hero-search button:hover { background: var(--accent-dark); }
.hero-search button:active { transform: scale(0.96); }
@media (min-width: 900px) { .hero h1 { font-size: 2.1rem; } }

/* ===================== Category grid ===================== */
.category-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.category-chip { background: var(--surface); border-radius: var(--radius-md); padding: 16px 8px; text-align: center; box-shadow: var(--shadow-sm); font-size: 0.8rem; font-weight: 600; color: var(--ink-soft); transition: transform 0.15s ease, box-shadow 0.15s ease; }
.category-chip:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.cat-icon { display: block; font-size: 1.6rem; margin-bottom: 6px; }
@media (min-width: 700px) { .category-grid { grid-template-columns: repeat(6, 1fr); } }

/* ===================== Card grids ===================== */
.card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.list-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 700px) { .card-grid { grid-template-columns: repeat(3, 1fr); } .list-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .card-grid { grid-template-columns: repeat(4, 1fr); } }

.biz-card, .property-card { background: var(--surface); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform 0.15s ease, box-shadow 0.15s ease; }
.biz-card:hover, .property-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.biz-card-img { position: relative; aspect-ratio: 4/3; background: var(--primary-light); }
.biz-card-img img { width: 100%; height: 100%; object-fit: cover; }
.biz-card-body { padding: 10px 12px 14px; }
.biz-card-body h3 { font-size: 0.92rem; margin: 0 0 3px; font-weight: 700; }
.stars { color: var(--warning); font-size: 0.8rem; font-weight: 700; }

.badge { position: absolute; top: 8px; left: 8px; font-size: 0.68rem; font-weight: 700; padding: 4px 9px; border-radius: 100px; background: rgba(255,255,255,0.95); }
.badge-open { color: var(--success); }
.badge-closed { color: var(--danger); }
.badge-verified { top: 8px; right: 8px; left: auto; color: var(--primary); }
.badge-info { position: static; display: inline-block; background: var(--primary-light); color: var(--primary); }
.badge-post-type { position: static; background: var(--accent-light); color: var(--accent-dark); margin-left: auto; }
.badge-stock-in_stock { background: #e6f7ee; color: var(--success); }
.badge-stock-limited_stock { background: #fff6e0; color: var(--warning); }
.badge-stock-out_of_stock { background: #fdeeee; color: var(--danger); }
.badge-stock-in_stock, .badge-stock-limited_stock, .badge-stock-out_of_stock { position: static; display: inline-block; padding: 4px 10px; border-radius: 100px; font-size: 0.75rem; font-weight: 700; }
.badge-feed-post { background: #eaf1fb; color: var(--primary); position: static; display: inline-block; }
.badge-feed-business { background: var(--accent-light); color: var(--accent-dark); position: static; display: inline-block; }
.badge-feed-product { background: #f0eafd; color: #6b3fc4; position: static; display: inline-block; }
.badge-feed-property { background: #e6f7ee; color: var(--success); position: static; display: inline-block; }

.product-card { background: var(--surface); border-radius: var(--radius-md); padding: 10px; box-shadow: var(--shadow-sm); transition: transform 0.15s ease; }
.product-card:hover { transform: translateY(-4px); }
.product-card img { aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-sm); margin-bottom: 8px; background: var(--primary-light); }
.product-card h4 { font-size: 0.85rem; margin: 0 0 4px; font-weight: 700; }
.price { color: var(--accent-dark); font-weight: 800; font-size: 0.9rem; }
.price-lg { color: var(--accent-dark); font-weight: 800; font-size: 1.5rem; margin: 6px 0; }

.job-card, .job-chip-card { background: var(--surface); border-radius: var(--radius-md); padding: 14px 16px; box-shadow: var(--shadow-sm); }
.job-strip, .post-strip { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.job-chip-card, .post-mini-card { min-width: 220px; scroll-snap-align: start; }
.post-mini-card { background: var(--surface); border-radius: var(--radius-md); padding: 12px 14px; box-shadow: var(--shadow-sm); }
.post-mini-author { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; font-weight: 600; margin-bottom: 6px; }
.post-mini-author img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.salary { color: var(--accent-dark); font-weight: 700; font-size: 0.85rem; margin-top: 6px; }

/* ===================== Filter chips ===================== */
.filter-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 10px; }
.chip { flex-shrink: 0; background: var(--surface); border: 1.5px solid var(--border); border-radius: 100px; padding: 7px 16px; font-size: 0.82rem; font-weight: 600; white-space: nowrap; }
.chip-active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ===================== Forms ===================== */
.form-page { max-width: 620px; }
form label { display: block; font-weight: 700; font-size: 0.85rem; margin: 14px 0 6px; color: var(--ink-soft); }
form input[type=text], form input[type=tel], form input[type=email], form input[type=password],
form input[type=number], form input[type=time], form input[type=date], form select, form textarea {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 0.92rem; outline: none; transition: border-color 0.15s ease; background: #fff;
}
form input:focus, form select:focus, form textarea:focus { border-color: var(--primary); }
form input[type=file] { padding: 10px; border: 1.5px dashed var(--border); border-radius: var(--radius-sm); width: 100%; }
.upload-hint { margin-top: 6px; margin-bottom: 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.otp-row { display: flex; gap: 8px; align-items: flex-end; }
.otp-row input { flex: 1; }

/* ===================== SMS verification (send-code-to-fixed-number flow) ===================== */
.verify-instructions { background: var(--primary-light); border-radius: var(--radius-md); padding: 16px; text-align: center; margin: 10px 0; }
.verify-instructions p { margin: 4px 0; font-size: 0.88rem; color: var(--ink-soft); }
.verify-target-number { font-size: 1.3rem !important; font-weight: 800; color: var(--primary) !important; letter-spacing: 1px; }
.verify-code { font-size: 1.6rem !important; font-weight: 800; color: var(--accent-dark) !important; letter-spacing: 3px; background: #fff; border-radius: var(--radius-sm); padding: 8px; margin-top: 8px !important; }
.verify-status { text-align: center; font-weight: 700; font-size: 0.9rem; padding: 10px; border-radius: var(--radius-sm); margin-top: 10px; }
.verify-status.waiting { background: #fff6e0; color: var(--warning); }
.verify-status.success { background: #e6f7ee; color: var(--success); }
.verify-status.error { background: #fdeeee; color: var(--danger); }
.auth-page { max-width: 440px; padding-top: 30px; padding-bottom: 30px; }
.auth-card { background: var(--surface); border-radius: var(--radius-lg); padding: 28px 24px; box-shadow: var(--shadow-md); }
.auth-links { display: flex; justify-content: space-between; margin-top: 16px; font-size: 0.85rem; font-weight: 600; }
.auth-links a { color: var(--primary); }
.alert { padding: 10px 14px; border-radius: var(--radius-sm); font-size: 0.85rem; margin-bottom: 12px; }
.alert-error {
  background: #fdeeee; color: var(--danger); border: 1.5px solid #f5b8b8;
  font-weight: 600; display: flex; align-items: center; gap: 8px;
  animation: alertShake 0.4s ease;
}
.alert-error::before { content: '⚠️'; font-size: 1.1rem; flex-shrink: 0; }
@keyframes alertShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}
.alert-info { background: var(--primary-light); color: var(--primary); }
.existing-images { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.existing-img { width: 84px; }
.existing-img img { width: 84px; height: 84px; object-fit: cover; border-radius: var(--radius-sm); margin-bottom: 4px; }
.existing-img label { font-size: 0.68rem; font-weight: 500; margin: 0; display: flex; gap: 4px; align-items: center; }

/* Real upload progress bar (XHR-driven), not a generic spinner */
.upload-progress { height: 8px; background: var(--border); border-radius: 100px; margin-top: 10px; overflow: hidden; }
.upload-progress-bar { height: 100%; width: 0%; background: linear-gradient(90deg, var(--primary), var(--accent)); transition: width 0.15s ease; }

.star-picker { font-size: 1.6rem; color: var(--border); margin-bottom: 8px; cursor: pointer; }
.star-picker .star { transition: color 0.1s ease; }
.star-picker .star.filled, .star-picker .star:hover { color: var(--warning); }
.rating-form { background: var(--surface); border-radius: var(--radius-md); padding: 14px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.rating-form textarea { margin-bottom: 10px; }

/* ===================== Detail page ===================== */
.detail-page { display: grid; grid-template-columns: 1fr; gap: 20px; padding-top: 16px; }
.detail-page-nogallery { max-width: 700px; }
.detail-gallery { }
.gallery-main { aspect-ratio: 4/3; border-radius: var(--radius-lg); overflow: hidden; background: var(--primary-light); box-shadow: var(--shadow-sm); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; }
.gallery-thumb { width: 64px; height: 64px; object-fit: cover; border-radius: var(--radius-sm); cursor: pointer; flex-shrink: 0; border: 2px solid transparent; }
.gallery-thumb:hover { border-color: var(--primary); }
.detail-header { display: flex; align-items: center; gap: 10px; }
.description { color: var(--ink-soft); line-height: 1.7; margin: 12px 0; }
.action-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.owner-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.map-embed { border-radius: var(--radius-md); overflow: hidden; margin: 14px 0; box-shadow: var(--shadow-sm); }
.specs-list { padding-left: 20px; color: var(--ink-soft); }
.job-details-box { background: var(--primary-light); border-radius: var(--radius-md); padding: 14px 16px; margin: 14px 0; }
.job-details-box h3 { margin: 0 0 8px; }
.job-details-box p { margin: 4px 0; font-size: 0.9rem; }
.reviews-list { display: flex; flex-direction: column; gap: 12px; }
.review-item { background: var(--surface); border-radius: var(--radius-md); padding: 12px 14px; box-shadow: var(--shadow-sm); }
@media (min-width: 900px) { .detail-page { grid-template-columns: 1fr 1fr; align-items: start; } }

/* ===================== Posts / Feed ===================== */
.post-list { display: flex; flex-direction: column; gap: 14px; }
.post-card { background: var(--surface); border-radius: var(--radius-md); padding: 14px; box-shadow: var(--shadow-sm); }
.post-card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.post-card-header img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.post-card-content p { margin: 0 0 8px; }
.post-media img, .post-media video { width: 100%; border-radius: var(--radius-sm); max-height: 340px; object-fit: cover; }
.post-media-full { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.post-media-full img, .post-media-full video { width: 100%; border-radius: var(--radius-md); }

.feed-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (min-width: 700px) { .feed-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .feed-grid { grid-template-columns: repeat(4, 1fr); } }
.feed-item { background: var(--surface); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform 0.15s ease; }
.feed-item:hover { transform: translateY(-4px); }
.feed-thumb { aspect-ratio: 1; background: var(--primary-light); }
.feed-thumb img, .feed-thumb video { width: 100%; height: 100%; object-fit: cover; }
.feed-body { padding: 8px 10px 12px; }
.feed-body p { font-size: 0.82rem; margin: 6px 0 4px; }

/* ===================== Comments (nested, unlimited depth) ===================== */
.comment-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.comment-form textarea { min-height: 44px; }
.comments-list { display: flex; flex-direction: column; gap: 14px; }
.comment-item { display: flex; gap: 10px; }
.comment-item img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.comment-body { flex: 1; background: var(--surface); border-radius: var(--radius-md); padding: 10px 12px; box-shadow: var(--shadow-sm); }
.comment-body p { margin: 3px 0 6px; }
.comment-meta { display: flex; gap: 12px; align-items: center; }
.reply-btn { background: none; border: none; color: var(--primary); font-weight: 700; font-size: 0.78rem; cursor: pointer; padding: 0; }
.comment-replies { margin-top: 10px; padding-left: 14px; border-left: 2px solid var(--border); display: flex; flex-direction: column; gap: 10px; }

/* ===================== Infinite scroll / loading ===================== */
.load-more-trigger { display: flex; justify-content: center; padding: 20px 0; }
.spinner { width: 26px; height: 26px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.end-of-list { color: var(--muted); font-weight: 600; font-size: 0.85rem; }

/* ===================== Profile / Saved / Notifications ===================== */
.profile-header { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.profile-avatar { width: 68px; height: 68px; border-radius: 50%; object-fit: cover; border: 3px solid var(--primary-light); }
.profile-avatar-sm { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; margin-bottom: 8px; }
.profile-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.search-history-list { display: flex; flex-direction: column; gap: 6px; }
.search-history-item { background: var(--surface); border-radius: var(--radius-sm); padding: 9px 12px; font-size: 0.85rem; display: flex; justify-content: space-between; box-shadow: var(--shadow-sm); }
.notif-list { display: flex; flex-direction: column; gap: 8px; }
.notif-item { background: var(--surface); border-radius: var(--radius-md); padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; box-shadow: var(--shadow-sm); }
.notif-item.unread { border-left: 3px solid var(--accent); }
.notif-body strong { font-size: 0.9rem; }
.notif-body p { margin: 3px 0 0; font-size: 0.82rem; color: var(--ink-soft); }
.stats-grid, .admin-stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 700px) { .stats-grid, .admin-stats-grid { grid-template-columns: repeat(4, 1fr); } }
.stat-card { background: var(--surface); border-radius: var(--radius-md); padding: 18px; text-align: center; box-shadow: var(--shadow-sm); }
.stat-num { display: block; font-size: 1.6rem; font-weight: 800; color: var(--primary); }
.stat-label { font-size: 0.78rem; color: var(--muted); font-weight: 600; }

/* ===================== Footer (desktop, real) ===================== */
.site-footer { display: none; background: var(--primary-dark); color: rgba(255,255,255,0.85); margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; padding: 40px 16px 24px; }
.footer-brand p { font-size: 0.85rem; margin-top: 8px; color: rgba(255,255,255,0.6); }
.footer-links h4 { color: #fff; font-size: 0.9rem; margin-bottom: 10px; }
.footer-links a { display: block; font-size: 0.85rem; padding: 4px 0; color: rgba(255,255,255,0.75); }
.footer-links a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.15); padding: 14px 16px; font-size: 0.78rem; text-align: center; color: rgba(255,255,255,0.6); display: flex; flex-direction: column; gap: 4px; }
.build-marker { font-size: 0.68rem; opacity: 0.6; }
.build-marker-mobile { text-align: center; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); font-size: 0.68rem; color: var(--muted); background: var(--bg); }
@media (min-width: 900px) { .build-marker-mobile { display: none; } }
@media (min-width: 900px) { .site-footer { display: block; } }

/* ===================== Mobile bottom nav (position:fixed — NEVER put transform on ancestors) ===================== */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  display: flex; background: var(--surface); border-top: 1px solid var(--border);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  box-shadow: 0 -2px 12px rgba(26,34,51,0.06);
}
.bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 0.66rem; font-weight: 600; color: var(--muted); padding: 4px 0; transition: color 0.15s ease; }
.bottom-nav a.active { color: var(--primary); }
.bn-icon { font-size: 1.25rem; }
.bn-post-btn { position: relative; top: -14px; }
.bn-post-btn .bn-icon { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-md); font-size: 1.3rem; }
@media (min-width: 900px) { .bottom-nav { display: none; } }

/* ===================== Error pages ===================== */
.error-page { max-width: 420px; margin: 15vh auto; text-align: center; padding: 0 20px; }
.error-page h1 { font-size: 4rem; color: var(--primary); margin: 0; }
.error-page p { margin: 6px 0; }
.error-page .btn { margin-top: 18px; }

/* ===================== Admin panel ===================== */
.admin-body { background: #f2f4f8; padding-bottom: 0; }
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar { width: 230px; background: var(--primary-dark); color: #fff; flex-shrink: 0; padding: 20px 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-brand { font-weight: 800; padding: 0 20px 20px; font-size: 1.05rem; }
.admin-brand span { display: block; font-size: 0.7rem; color: rgba(255,255,255,0.5); font-weight: 600; }
.admin-sidebar nav { display: flex; flex-direction: column; }
.admin-sidebar a, .admin-sidebar button { display: block; text-align: left; color: rgba(255,255,255,0.8); padding: 11px 20px; font-size: 0.86rem; font-weight: 600; background: none; border: none; cursor: pointer; font-family: inherit; }
.admin-sidebar a:hover, .admin-sidebar button:hover { background: rgba(255,255,255,0.08); color: #fff; }
.nav-badge { display: inline-block; background: var(--accent); color: #fff; font-size: 0.7rem; font-weight: 800; padding: 1px 7px; border-radius: 100px; margin-left: 4px; }
.admin-content { flex: 1; padding: 28px 32px; min-width: 0; }
.admin-content h1 { margin-bottom: 18px; }
.admin-stat { background: #fff; border-radius: var(--radius-md); padding: 18px; box-shadow: var(--shadow-sm); text-align: center; }
.admin-stat .num { display: block; font-size: 1.8rem; font-weight: 800; color: var(--primary); }
.admin-stat.warn .num { color: var(--warning); }
.admin-stat.danger .num { color: var(--danger); }
.admin-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); margin-top: 12px; }
.admin-table th, .admin-table td { padding: 11px 14px; text-align: left; font-size: 0.85rem; border-bottom: 1px solid var(--border); }
.admin-table th { background: var(--bg); font-weight: 700; color: var(--ink-soft); }
.admin-table button { margin-right: 6px; background: var(--primary-light); border: none; color: var(--primary); padding: 5px 10px; border-radius: 6px; font-size: 0.78rem; font-weight: 700; cursor: pointer; }
.status-pill { padding: 3px 10px; border-radius: 100px; font-size: 0.72rem; font-weight: 700; }
.status-active { background: #e6f7ee; color: var(--success); }
.status-pending { background: #fff6e0; color: var(--warning); }
.status-suspended, .status-hidden { background: #fdeeee; color: var(--danger); }
.status-banned, .status-deleted { background: #f0d9d9; color: #7a1f1f; }
.admin-search-form, .admin-inline-form { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.admin-search-form input, .admin-inline-form input, .admin-inline-form select { padding: 8px 12px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-family: inherit; }
@media (max-width: 800px) { .admin-shell { flex-direction: column; } .admin-sidebar { width: 100%; height: auto; position: static; } .admin-content { padding: 16px; } }

/* ===================== SweetAlert2 brand overrides (premium look) ===================== */
.swal2-popup { border-radius: var(--radius-lg) !important; font-family: 'Hind','Manrope',sans-serif !important; }
.swal2-title { font-family: 'Manrope',sans-serif !important; }
.swal2-confirm { background: var(--primary) !important; border-radius: 100px !important; }
.swal2-cancel { border-radius: 100px !important; }
.swal2-timer-progress-bar { background: linear-gradient(90deg, var(--primary), var(--accent)) !important; }
