@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800;900&display=swap');
@import url('https://cdn.jsdelivr.net/npm/@tabler/icons-webfont@2.47.0/tabler-icons.min.css');

/* ── TOKENS ─────────────────────────────────────────────────── */
:root {
  --blue:        #1a56db;
  --blue-dark:   #1140a0;
  --blue-mid:    #2563eb;
  --blue-light:  #dbeafe;
  --blue-xlight: #eff6ff;
  --navy:        #0f2057;
  --green:       #16a34a;
  --green-light: #dcfce7;
  --red:         #dc2626;
  --red-light:   #fee2e2;
  --orange:      #ea580c;
  --amber:       #d97706;
  --amber-light: #fef3c7;
  --white:       #ffffff;
  --bg:          #e7ebf0;
  --card:        #ffffff;
  --border:      #dde1e7;
  --text:        #1a1a2e;
  --muted:       #65676b;
  --radius:      8px;
  --radius-md:   12px;
  --radius-lg:   18px;
  --shadow:      0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.08);
  --shadow-md:   0 4px 16px rgba(0,0,0,0.10);
}

*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: 'Poppins', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
}

/* ── TOP NAV ─────────────────────────────────────────────────── */
.topnav {
  position: sticky; top: 0; z-index: 200;
  height: 56px;
  background: var(--blue);
  display: flex; align-items: center;
  padding: 0 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  gap: 12px;
}
.topnav-logo {
  display: flex; align-items: center; gap: 8px;
  color: #fff; font-size: 20px; font-weight: 800;
  letter-spacing: -0.5px; text-decoration: none;
  flex-shrink: 0;
}
.topnav-logo .logo-icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: #fff; display: flex; align-items: center;
  justify-content: center; font-size: 18px;
}
.topnav-search {
  flex: 1; max-width: 280px;
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.15); border-radius: 20px;
  padding: 6px 14px; border: none;
}
.topnav-search input {
  background: transparent; border: none; outline: none;
  color: #fff; font-size: 13px; font-family: 'Poppins',sans-serif;
  width: 100%;
}
.topnav-search input::placeholder { color: rgba(255,255,255,0.65); }
.topnav-search i { color: rgba(255,255,255,0.65); font-size: 16px; }

.topnav-tabs {
  flex: 1; display: flex; justify-content: center; gap: 2px;
}
.topnav-tab {
  width: 100px; height: 44px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.7); cursor: pointer; font-size: 22px;
  position: relative; border: none; background: transparent;
  transition: background 0.15s;
}
.topnav-tab:hover { background: rgba(255,255,255,0.1); color: #fff; }
.topnav-tab.active { color: #fff; }
.topnav-tab.active::after {
  content: ''; position: absolute; bottom: -6px; left: 0; right: 0;
  height: 3px; background: #fff; border-radius: 2px 2px 0 0;
}
.topnav-tab .badge {
  position: absolute; top: 4px; right: 8px;
  background: var(--red); color: #fff; font-size: 10px;
  font-weight: 700; border-radius: 10px; min-width: 18px;
  height: 18px; display: flex; align-items: center;
  justify-content: center; padding: 0 4px;
  border: 2px solid var(--blue);
}
.topnav-right {
  display: flex; align-items: center; gap: 6px; flex-shrink: 0;
}
.nav-icon-btn {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,0.15); border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: #fff; font-size: 18px;
  position: relative; transition: background 0.15s;
}
.nav-icon-btn:hover { background: rgba(255,255,255,0.25); }
.nav-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: #fff; color: var(--blue); font-size: 15px;
  font-weight: 800; display: flex; align-items: center;
  justify-content: center; cursor: pointer; border: 2px solid rgba(255,255,255,0.4);
}

/* ── PAGE LAYOUT ─────────────────────────────────────────────── */
.page {
  max-width: 1280px; margin: 0 auto;
  display: grid;
  grid-template-columns: 280px minmax(0,1fr) 320px;
  gap: 16px; padding: 16px;
  align-items: start;
}
.page.two-col {
  grid-template-columns: 340px minmax(0,1fr);
}
.page.full {
  grid-template-columns: 1fr;
  max-width: 960px;
}

/* ── CARDS ───────────────────────────────────────────────────── */
.card {
  background: var(--card); border-radius: var(--radius-md);
  box-shadow: var(--shadow); overflow: hidden;
  margin-bottom: 12px; border: 1px solid var(--border);
}
.card-body { padding: 14px; }
.card-title {
  font-size: 15px; font-weight: 700; margin-bottom: 12px;
  display: flex; align-items: center; justify-content: space-between;
}
.card-title a { font-size: 13px; color: var(--blue); font-weight: 600; cursor: pointer; }

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; padding: 8px 16px; border-radius: var(--radius);
  border: none; font-family: 'Poppins',sans-serif;
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: filter 0.15s, transform 0.1s; text-decoration: none;
}
.btn:hover { filter: brightness(0.93); }
.btn:active { transform: scale(0.98); }
.btn-blue    { background: var(--blue);   color: #fff; }
.btn-green   { background: var(--green);  color: #fff; }
.btn-red     { background: var(--red);    color: #fff; }
.btn-orange  { background: var(--orange); color: #fff; }
.btn-white   { background: #fff; color: var(--blue); border: 1.5px solid var(--blue); }
.btn-light   { background: var(--blue-xlight); color: var(--blue); }
.btn-gray    { background: #e4e6eb; color: var(--text); }
.btn-sm      { padding: 5px 12px; font-size: 12px; }
.btn-lg      { padding: 12px 24px; font-size: 15px; font-weight: 700; }
.btn-full    { width: 100%; }
.btn-icon    { padding: 8px; border-radius: 50%; }

/* ── FORMS ───────────────────────────────────────────────────── */
.form-group { margin-bottom: 14px; }
.form-label { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 5px; display: block; }
.form-input {
  width: 100%; height: 44px; border-radius: var(--radius);
  border: 1.5px solid var(--border); background: #f0f2f5;
  padding: 0 14px; font-size: 14px; font-family: 'Poppins',sans-serif;
  color: var(--text); outline: none; transition: border-color 0.15s;
}
.form-input:focus { border-color: var(--blue); background: #fff; }
.form-select {
  width: 100%; height: 44px; border-radius: var(--radius);
  border: 1.5px solid var(--border); background: #f0f2f5;
  padding: 0 12px; font-size: 14px; font-family: 'Poppins',sans-serif;
  outline: none;
}

/* ── BADGES ──────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 600;
}
.badge-blue   { background: var(--blue-light); color: var(--blue); }
.badge-green  { background: var(--green-light); color: var(--green); }
.badge-red    { background: var(--red-light); color: var(--red); }
.badge-amber  { background: var(--amber-light); color: var(--amber); }
.badge-gray   { background: #e4e6eb; color: var(--muted); }

/* ── DIVIDER ─────────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 10px 0; }

/* ── SIDEBAR MENU ────────────────────────────────────────────── */
.sidebar-menu { list-style: none; }
.sidebar-menu li {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--radius);
  cursor: pointer; font-size: 14px; font-weight: 600;
  color: var(--text); transition: background 0.12s;
  margin-bottom: 2px;
}
.sidebar-menu li:hover { background: var(--blue-xlight); color: var(--blue); }
.sidebar-menu li.active { background: var(--blue-xlight); color: var(--blue); }
.sidebar-menu li i { font-size: 20px; width: 24px; }
.sidebar-menu li .count {
  margin-left: auto; background: var(--red); color: #fff;
  font-size: 11px; padding: 1px 7px; border-radius: 10px;
}

/* ── PROFILE MINI (sidebar) ──────────────────────────────────── */
.profile-mini {
  display: flex; align-items: center; gap: 10px;
  padding: 12px; cursor: pointer; border-radius: var(--radius);
  transition: background 0.12s;
}
.profile-mini:hover { background: #f0f2f5; }
.profile-mini-av {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--blue); color: #fff; font-size: 16px;
  font-weight: 700; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.profile-mini-name { font-size: 14px; font-weight: 700; }
.profile-mini-sub  { font-size: 12px; color: var(--muted); }

/* ── STORY ROW ───────────────────────────────────────────────── */
.stories-row {
  display: flex; gap: 10px; padding: 14px;
  overflow-x: auto; scrollbar-width: none;
}
.stories-row::-webkit-scrollbar { display: none; }
.story-card {
  flex-shrink: 0; width: 112px; height: 196px;
  border-radius: var(--radius-md); overflow: hidden;
  position: relative; cursor: pointer;
  background: linear-gradient(135deg,var(--blue),var(--blue-mid));
  border: 3px solid var(--blue);
}
.story-card .story-bg {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 52px;
}
.story-card .story-av {
  position: absolute; top: 10px; left: 10px;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--blue); border: 3px solid #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: #fff;
}
.story-card .story-name {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent,rgba(0,0,0,0.75));
  color: #fff; font-size: 11px; font-weight: 700;
  padding: 20px 8px 8px; text-align: center;
}
.story-add .story-bg {
  background: #e4e6eb; flex-direction: column; gap: 6px;
  color: var(--text);
}
.story-add-icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--blue); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}

/* ── POST COMPOSER ───────────────────────────────────────────── */
.composer { padding: 12px 14px; }
.composer-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.composer-av {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--blue); color: #fff; font-size: 16px;
  font-weight: 700; display: flex; align-items: center;
  justify-content: center; flex-shrink: 0;
}
.composer-input-box {
  flex: 1; height: 42px; border-radius: 20px;
  background: #f0f2f5; border: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 16px;
  font-size: 14px; color: var(--muted); cursor: pointer;
  font-family: 'Poppins',sans-serif; font-weight: 500;
}
.composer-input-box:hover { background: #e4e6eb; }
.composer-actions {
  display: flex; border-top: 1px solid var(--border); padding-top: 10px;
}
.composer-action {
  flex: 1; display: flex; align-items: center; justify-content: center;
  gap: 7px; padding: 8px; border-radius: var(--radius);
  cursor: pointer; font-size: 13px; font-weight: 600;
  color: var(--muted); border: none; background: transparent;
  font-family: 'Poppins',sans-serif; transition: background 0.12s;
}
.composer-action:hover { background: #f0f2f5; }
.composer-action i { font-size: 18px; }
.ca-photo { color: #45bd62; }
.ca-video { color: #e41c38; }
.ca-vet   { color: var(--blue); }
.ca-live  { color: var(--amber); }

/* ── POST CARD ───────────────────────────────────────────────── */
.post-header { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px 0; }
.post-av {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--blue-xlight); display: flex; align-items: center;
  justify-content: center; font-size: 20px; flex-shrink: 0;
  border: 2px solid var(--blue-light);
}
.post-name { font-size: 14px; font-weight: 700; line-height: 1.3; }
.post-sub  { font-size: 12px; color: var(--muted); margin-top: 2px; }
.post-more {
  margin-left: auto; width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--muted); border: none; background: transparent;
}
.post-more:hover { background: #f0f2f5; }
.post-text { padding: 10px 14px; font-size: 14px; line-height: 1.6; }
.post-image {
  width: 100%; background: #e4e6eb;
  display: flex; align-items: center; justify-content: center;
  font-size: 80px; min-height: 280px; position: relative;
}
.post-tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 14px; }
.post-tag {
  background: var(--blue-xlight); color: var(--blue);
  font-size: 12px; font-weight: 600; padding: 3px 10px;
  border-radius: 20px; cursor: pointer;
}
.post-stats {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px; font-size: 13px; color: var(--muted);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  margin-top: 6px;
}
.post-actions { display: flex; padding: 4px 8px; }
.post-action {
  flex: 1; display: flex; align-items: center; justify-content: center;
  gap: 6px; padding: 8px; border-radius: var(--radius);
  cursor: pointer; font-size: 13px; font-weight: 600;
  color: var(--muted); border: none; background: transparent;
  font-family: 'Poppins',sans-serif; transition: background 0.12s;
}
.post-action:hover { background: #f0f2f5; }
.post-action i { font-size: 18px; }
.liked { color: var(--red); }

/* ── VET CARD ────────────────────────────────────────────────── */
.vet-strip {
  display: flex; gap: 10px; overflow-x: auto;
  padding: 0 14px 14px; scrollbar-width: none;
}
.vet-strip::-webkit-scrollbar { display: none; }
.vet-mini {
  flex-shrink: 0; width: 150px; border-radius: var(--radius-md);
  border: 1px solid var(--border); overflow: hidden; cursor: pointer;
  transition: box-shadow 0.15s;
}
.vet-mini:hover { box-shadow: var(--shadow-md); }
.vet-mini-cover {
  height: 70px; background: var(--blue-xlight);
  display: flex; align-items: center; justify-content: center; font-size: 36px;
}
.vet-mini-body { padding: 10px; }
.vet-mini-name { font-size: 13px; font-weight: 700; }
.vet-mini-spec { font-size: 11px; color: var(--muted); margin-top: 2px; }
.vet-mini-stars { color: var(--amber); font-size: 12px; margin: 4px 0; }
.vet-mini-btn {
  width: 100%; padding: 6px; border-radius: var(--radius);
  background: var(--blue); color: #fff; border: none;
  font-size: 12px; font-weight: 600; cursor: pointer;
  font-family: 'Poppins',sans-serif;
}

/* ── SCROLL ROW ──────────────────────────────────────────────── */
.scroll-x { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; }
.scroll-x::-webkit-scrollbar { display: none; }

/* ── GROUP CARD ──────────────────────────────────────────────── */
.group-card {
  display: flex; gap: 12px; padding: 12px;
  border-bottom: 1px solid var(--border); cursor: pointer;
  transition: background 0.12s;
}
.group-card:last-child { border-bottom: none; }
.group-card:hover { background: var(--blue-xlight); }
.group-av {
  width: 56px; height: 56px; border-radius: var(--radius);
  background: var(--blue-xlight); display: flex; align-items: center;
  justify-content: center; font-size: 28px; flex-shrink: 0;
}
.group-name { font-size: 14px; font-weight: 700; }
.group-meta { font-size: 12px; color: var(--muted); margin: 2px 0 6px; }

/* ── ONLINE DOT ──────────────────────────────────────────────── */
.online-dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: #31a24c; border: 2px solid #fff;
  position: absolute; bottom: 0; right: 0;
}

/* ── TRENDING TAG ────────────────────────────────────────────── */
.trend-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px; cursor: pointer; transition: background 0.12s;
  font-size: 13px;
}
.trend-item:hover { background: var(--blue-xlight); }
.trend-tag { font-weight: 700; color: var(--blue); }
.trend-count { font-size: 12px; color: var(--muted); }

/* ── MODAL ───────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  z-index: 999; display: none; align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: #fff; border-radius: var(--radius-lg);
  width: 520px; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 17px; font-weight: 700; }
.modal-close {
  width: 34px; height: 34px; border-radius: 50%;
  background: #e4e6eb; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--muted);
}
.modal-body { padding: 20px; }

/* ── TOAST ───────────────────────────────────────────────────── */
.toast-wrap {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  z-index: 9999; display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.toast {
  background: #333; color: #fff; padding: 12px 20px;
  border-radius: 24px; font-size: 13px; font-weight: 600;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  animation: toastIn 0.3s ease;
}
.toast.success { background: var(--green); }
.toast.error   { background: var(--red); }
.toast.info    { background: var(--blue); }
@keyframes toastIn {
  from { opacity:0; transform:translateY(8px); }
  to   { opacity:1; transform:translateY(0); }
}

/* ── UTILITY ─────────────────────────────────────────────────── */
.flex { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-6  { gap: 6px; }
.gap-10 { gap: 10px; }
.gap-12 { gap: 12px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.text-muted { color: var(--muted); font-size: 12px; }
.text-blue  { color: var(--blue); }
.text-green { color: var(--green); }
.text-red   { color: var(--red); }
.fw-700 { font-weight: 700; }
.fw-600 { font-weight: 600; }
.stars  { color: var(--amber); letter-spacing: 1px; }

/* ── COVER PHOTO STYLE ───────────────────────────────────────── */
.cover-photo {
  width: 100%; height: 300px;
  background: linear-gradient(135deg,var(--blue),var(--blue-mid),#38bdf8);
  position: relative; overflow: hidden;
  display: flex; align-items: flex-end;
}
.cover-photo .cover-emoji {
  position: absolute; right: 40px; bottom: 0;
  font-size: 160px; opacity: 0.25; line-height: 1;
}
.cover-edit-btn {
  position: absolute; bottom: 16px; right: 16px;
  background: rgba(0,0,0,0.4); color: #fff;
  border: none; border-radius: var(--radius);
  padding: 7px 12px; font-size: 13px; font-weight: 600;
  cursor: pointer; display: flex; align-items: center; gap: 6px;
  font-family: 'Poppins',sans-serif;
}

/* ── PROGRESS BAR ────────────────────────────────────────────── */
.progress-bar { height: 8px; background: #e4e6eb; border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--blue); border-radius: 4px; }

/* donation progress */
.progress-green .progress-fill { background: var(--green); }

/* ══════════════════════════════════════════════════════════════
   MOBILE RESPONSIVE — PawBook v2
   Breakpoints: 768px (tablet), 480px (phone)
   ══════════════════════════════════════════════════════════════ */

/* ── BOTTOM NAV (mobile only) ─────────────────────────────────── */
.bottomnav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  height: 56px; background: #fff;
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 8px rgba(0,0,0,.08);
  z-index: 300;
  align-items: center; justify-content: space-around;
}
.bnav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2px; cursor: pointer; padding: 6px 0;
  border: none; background: none;
  font-family: 'Poppins',sans-serif;
  color: var(--muted); transition: color .15s;
  text-decoration: none;
}
.bnav-item i { font-size: 22px; }
.bnav-item span { font-size: 9px; font-weight: 700; text-transform: uppercase; }
.bnav-item.active { color: var(--blue); }

/* ── TABLET (≤ 1024px) ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  .page {
    grid-template-columns: 240px minmax(0,1fr) 280px;
    gap: 12px; padding: 12px;
  }
}

/* ── MOBILE (≤ 768px) ──────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Show bottom nav, hide top nav tabs */
  .bottomnav { display: flex; }
  .topnav-tabs { display: none; }
  .topnav-search { max-width: 180px; }
  .topnav { padding: 0 12px; gap: 8px; }

  /* Page layout → single column, add bottom padding for nav */
  .page {
    grid-template-columns: 1fr !important;
    padding: 12px 12px 72px;
    gap: 10px;
  }

  /* Hide sidebars on mobile by default */
  .left-sidebar,
  .right-sidebar,
  .settings-nav,
  [class*="left-panel"]:not(.main-left),
  aside { display: none !important; }

  /* Home page: show left sidebar as hamburger drawer (handled by JS) */
  .left-sidebar.mobile-open { display: block !important; }

  /* Three-column → single column */
  .page.two-col { grid-template-columns: 1fr !important; }

  /* Cards full width */
  .card { margin-bottom: 10px; border-radius: 10px; }
  .modal-box { width: calc(100vw - 32px) !important; max-width: 100% !important; }

  /* Story row: smaller cards */
  .story-card { width: 88px; height: 152px; }

  /* Post actions: smaller text */
  .post-action { font-size: 12px; padding: 8px 4px; gap: 4px; }
  .post-action i { font-size: 16px; }

  /* Nav icon buttons: fewer on mobile */
  .nav-icon-btn.hide-mobile { display: none; }

  /* Full-width buttons */
  .btn-mobile-full { width: 100% !important; }

  /* Composer actions wrap */
  .composer-actions { flex-wrap: wrap; }
  .composer-action { min-width: 33%; font-size: 12px; }

  /* Messages layout */
  .msg-layout {
    grid-template-columns: 1fr !important;
    height: calc(100vh - 56px - 56px) !important;
    margin: 0 !important; padding: 0 !important;
    padding-top: 56px !important;
  }
  .msg-panel { display: none !important; }
  .msg-panel.active { display: flex !important; }
  .msg-list { border-right: none !important; }

  /* Settings page */
  .settings-page {
    grid-template-columns: 1fr !important;
    gap: 10px;
  }
  .settings-nav {
    display: flex !important;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px;
    border-radius: 10px;
  }
  .sn-section { display: none; }
  .sn-item {
    flex: 0 0 auto;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1.5px solid var(--border);
    font-size: 12px;
    border-left: 1.5px solid var(--border) !important;
  }
  .sn-item.active {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
  }

  /* Discover page */
  .main-content { flex-direction: column; }
  .left-panel { width: 100% !important; max-height: 60vh; overflow-y: auto; }
  .map-panel { height: 300px !important; }

  /* Vet booking */
  .vet-grid { grid-template-columns: 1fr !important; }

  /* Events */
  .events-layout { grid-template-columns: 1fr !important; }

  /* Profile page cover */
  .cover-photo { height: 180px; }
  .cover-photo .cover-emoji { font-size: 100px; }

  /* Training page */
  .training-grid { grid-template-columns: 1fr !important; }

  /* Filter bars: horizontal scroll */
  .filter-row, .filter-row1, .filter-row2 {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 4px;
  }
  .filter-row::-webkit-scrollbar,
  .filter-row1::-webkit-scrollbar,
  .filter-row2::-webkit-scrollbar { display: none; }
  .cat-chip, .filter-select { flex-shrink: 0; }

  /* Modal full screen on mobile */
  .modal-overlay { align-items: flex-end !important; }
  .modal-box {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
    max-height: 90vh !important;
    width: 100% !important;
  }

  /* Tables → scroll */
  .table-wrap { overflow-x: auto; }
  table { min-width: 500px; }

  /* Hide decorative elements */
  .hide-mobile { display: none !important; }

  /* Grid 2-col → 1-col */
  .grid-2, [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* Home feed: full width */
  #feed .card, #feed > div {
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
  }

  /* Topnav logo: smaller */
  .topnav-logo { font-size: 16px; }
  .topnav-logo .logo-icon { width: 30px; height: 30px; font-size: 14px; }
}

/* ── SMALL PHONE (≤ 480px) ─────────────────────────────────────── */
@media (max-width: 480px) {
  .topnav-search { display: none; }
  .topnav { padding: 0 10px; }
  .page { padding: 8px 8px 72px; }
  .card-body { padding: 12px; }
  .post-text { padding: 8px 12px; font-size: 13px; }
  .story-card { width: 76px; height: 136px; }
  .composer-action { font-size: 11px; }
  .btn-sm { padding: 4px 10px; font-size: 11px; }
  
  /* Filter chips: smaller */
  .cat-chip { font-size: 12px; height: 30px; padding: 0 10px; }
  
  /* Place cards */
  .place-card { padding: 10px 12px; gap: 10px; }
  .place-img { width: 52px; height: 52px; }
  
  /* Modals: full height */
  .modal-box { max-height: 95vh !important; }
  
  /* Vet booking: stack everything */
  .vet-card-actions { flex-direction: column; }
}

/* ── SAFE AREA (notch phones) ──────────────────────────────────── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .bottomnav {
    padding-bottom: env(safe-area-inset-bottom);
    height: calc(56px + env(safe-area-inset-bottom));
  }
  .page { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  body { padding-top: env(safe-area-inset-top, 0px); }
}

/* ── HAMBURGER + DRAWER ─────────────────────────────────────── */
.burger-btn {
  display: none !important;
  width: 36px; height: 36px; border-radius: 50%;
  border: none; background: rgba(255,255,255,.2);
  cursor: pointer; color: #fff; font-size: 20px;
  align-items: center; justify-content: center;
  flex-shrink: 0; font-family: inherit;
}
@media (max-width: 768px) {
  .burger-btn { display: flex !important; }
}

/* Drawer overlay */
.drawer-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.5); z-index: 450;
}
.drawer-overlay.open { display: block; }

/* Drawer panel */
.drawer-panel {
  position: fixed; top: 0; left: -320px; bottom: 0;
  width: 300px; background: #fff; z-index: 500;
  overflow-y: auto; transition: left .28s cubic-bezier(.4,0,.2,1);
  box-shadow: 4px 0 24px rgba(0,0,0,.18);
  display: flex; flex-direction: column;
}
.drawer-panel.open { left: 0; }

/* Drawer header */
.drawer-header {
  background: var(--blue);
  padding: 48px 16px 16px;
  display: flex; align-items: center; gap: 12px;
}
.drawer-close {
  position: absolute; top: 12px; right: 12px;
  width: 32px; height: 32px; border-radius: 50%;
  border: none; background: rgba(255,255,255,.2);
  color: #fff; font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.drawer-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.4);
  object-fit: cover; flex-shrink: 0;
}
.drawer-user-name { font-size: 16px; font-weight: 800; color: #fff; }
.drawer-user-handle { font-size: 12px; color: rgba(255,255,255,.75); margin-top: 2px; }
.drawer-stats {
  display: flex; gap: 16px; margin-top: 8px;
}
.drawer-stat { text-align: center; }
.drawer-stat-val { font-size: 16px; font-weight: 800; color: #fff; }
.drawer-stat-label { font-size: 10px; color: rgba(255,255,255,.7); font-weight: 600; }

/* Drawer nav items */
.drawer-body { flex: 1; padding: 8px 0; }
.drawer-section {
  font-size: 10px; font-weight: 800; color: #8a8d91;
  text-transform: uppercase; letter-spacing: .6px;
  padding: 12px 18px 4px;
}
.drawer-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 18px; cursor: pointer;
  font-size: 14px; font-weight: 600; color: var(--text);
  transition: background .12s; text-decoration: none;
  border: none; background: none; width: 100%;
  font-family: 'Poppins',sans-serif;
}
.drawer-item:hover { background: var(--blue-xlight); color: var(--blue); }
.drawer-item.active { background: var(--blue-xlight); color: var(--blue); }
.drawer-item i { font-size: 20px; width: 24px; flex-shrink: 0; }
.drawer-item .drawer-badge {
  margin-left: auto; background: var(--red); color: #fff;
  font-size: 10px; font-weight: 700; border-radius: 10px;
  padding: 1px 6px; min-width: 18px; text-align: center;
}
.drawer-footer {
  padding: 12px 0; border-top: 1px solid var(--border);
}
