/**
 * TopTutorBD — assets/css/style.css
 * Author: RaKiBuL HaSaN - CEO & Founder, The One Stop BD (theonestopbd.com)
 * Developer Phone: +8801752986368
 * Developer Email: rhs.rakibul@gmail.com
 */
/* ==========================================================================
   TopTutorBD — assets/css/style.css
   Global design system. Every page includes this ONE file — no per-page
   stylesheets duplicating tokens. Dark mode = data-theme="dark" on <html>.
   ========================================================================== */

:root {
  --green: #006A4E;      /* বাংলাদেশ পতাকার সবুজ — Primary. FIXED brand color: solid buttons/topnav/badges with white text ONLY. Never use as text-on-tint. */
  --green-d: #00543E;
  --green-l: #E8F5F1;
  --green-ll: #f0faf6;
  --green-text: #006A4E; /* readable green for TEXT sitting on --green-l/--card-bg — theme-aware, see dark override below */
  --red: #F42A41;        /* বাংলাদেশ পতাকার লাল — FIXED brand color, same rule as --green above */
  --red-l: #FEF0F1;
  --red-text: #F42A41;   /* readable red for text-on-tint — theme-aware */
  --amber: #f59e0b;
  --amber-l: #fff8e1;
  --amber-text: #92400e; /* readable amber/brown for text-on-tint — theme-aware */
  --blue: #2563eb;
  --blue-l: #eff6ff;
  --blue-text: #1e40af;  /* readable blue for text-on-tint — theme-aware */

  --bg: #F0F2F5;
  --white: #ffffff;
  --card-bg: #ffffff;
  --text: #1C1E21;
  --text2: #65676B;
  --text3: #8A8D91;
  --border: #E4E6EB;
  --input: #F5F6F7;
  --shadow: 0 1px 3px rgba(0,0,0,.1);
  --shadow-md: 0 4px 16px rgba(0,0,0,.12);
  --r: 10px;
  --rs: 8px;
}

:root[data-theme="dark"] {
  --bg: #0f172a;
  --white: #1e293b;
  --card-bg: #1e293b;
  --text: #f1f5f9;
  --text2: #94a3b8;
  --text3: #64748b;
  --border: #334155;
  --input: #0f1a2e;
  --green-l: rgba(0,106,78,.22);
  --green-ll: rgba(0,106,78,.12);
  --green-text: #4ade80;   /* emerald-400 — readable on dark navy, dark green tint is NOT readable here */
  --red-l: rgba(244,42,65,.16);
  --red-text: #fb7185;     /* rose-400 */
  --amber-l: rgba(245,158,11,.16);
  --amber-text: #fbbf24;   /* amber-400 */
  --blue-l: rgba(37,99,235,.18);
  --blue-text: #93c5fd;    /* blue-300 */
  --shadow: 0 1px 3px rgba(0,0,0,.4);
  --shadow-md: 0 4px 16px rgba(0,0,0,.5);
}

* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }

/* ===== Smooth interaction feedback — every clickable control transitions instead of snapping
   instantly, so tapping a tab/button/card reads as a deliberate press rather than an abrupt jump. */
a, button, .card, .post, .stat-card {
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .12s ease;
}
.ft:active, .tab-btn:active, .tag-add-btn:active, .btn-outline:active, .admin-nav-item:active,
.menu-item:active, .pa-btn:active, .ph-primary-btn:active, .post-menu-item:active, .bn-item:active,
.tn-btn:active, .logo-back:active {
  transform: scale(.96);
}

/* NOT scroll-behavior: smooth — every "land back on the section you were on instead of at the very
   top" fix in this app (profile/index.php's tab-bar scrollIntoView, the #cv-section-content anchor
   actions/about.php redirects land on, admin-header.php's sidebar centering) fires on ordinary page
   loads, not real user-initiated smooth scrolling. With smooth behavior globally on, every one of
   those turns into a visible animated slide from the top of the page down to the target — which is
   exactly the "page jumps up from below" complaint: the browser paints at scrollY 0 for an instant,
   then visibly glides down. Instant (the default) makes it land in place with no perceptible motion. */
html { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }
body {
  font-family:'Hind Siliguri','Poppins',sans-serif;
  background:var(--bg); color:var(--text);
  min-height:100vh; padding-bottom:76px;
  transition:background .2s,color .2s;
}
a { text-decoration:none; color:inherit; }
button { cursor:pointer; font-family:inherit; }
img { max-width:100%; display:block; }

[data-lang="en"] .bn { display:none !important; }
[data-lang="bn"] .en { display:none !important; }

/* ===== TOP NAV ===== */
.topnav {
  position:sticky; top:0; z-index:100;
  background:var(--green);
  padding:.625rem 1rem;
  display:flex; align-items:center; gap:.75rem;
  box-shadow:0 2px 8px rgba(0,0,0,.15);
}
.tn-search { flex:1; max-width:320px; background:rgba(255,255,255,.15); border:1px solid rgba(255,255,255,.25); border-radius:20px; padding:.5rem 1rem; display:flex; align-items:center; gap:.5rem; }
.tn-search input { border:none; background:transparent; outline:none; width:100%; font-family:inherit; font-size:.875rem; color:#fff; }
.tn-search input::placeholder { color:rgba(255,255,255,.75); }
.tn-back { width:32px; height:32px; border-radius:50%; background:rgba(255,255,255,.15); border:none; color:#fff; font-size:1rem; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.tn-logo { display:flex; align-items:center; gap:.375rem; font-family:'Poppins',sans-serif; font-weight:800; font-size:1.125rem; color:#fff; white-space:nowrap; }
.tn-logo span { color:#ffcc00; }
.tn-actions { display:flex; align-items:center; gap:.5rem; margin-left:auto; }
.tn-btn {
  width:36px; height:36px; border-radius:50%;
  background:rgba(255,255,255,.15); border:none;
  display:flex; align-items:center; justify-content:center;
  font-size:1rem; color:#fff; position:relative;
}
/* Mobile top bar mirrors Facebook's: logo + search icon + messenger icon only — notifications,
   admin shortcut and the profile avatar move down into the bottom tab bar instead (bottomnav is
   mobile-only already, see the desktop media query below). The always-expanded inline search box
   only fits on wider screens, so mobile gets an icon button that jumps to the same search page. */
.tn-search-btn { display:none; }
@media (max-width:767px) {
  .tn-search { display:none; }
  .tn-search-btn { display:flex; }
  .tn-notif-btn, .tn-avatar-btn, .tn-admin-btn { display:none; }
  .tn-req-btn { display:flex; } /* the Requests button stays in the phone's top bar, next to Messenger */
}
.tn-badge {
  position:absolute; top:-2px; right:-2px; background:var(--red); color:#fff;
  width:16px; height:16px; border-radius:50%; font-size:8px; font-weight:700;
  display:flex; align-items:center; justify-content:center; border:2px solid var(--green);
}
/* Single button showing the language you'll SWITCH TO (not two side-by-side options) — e.g. while
   the page is in English this button reads "বাং", and clicking it switches to Bengali. */
.lang-toggle-btn { background:rgba(255,255,255,.15); border:none; color:#fff; border-radius:16px; padding:.3rem .625rem; font-size:.75rem; font-weight:700; cursor:pointer; font-family:inherit; }
.theme-btn { background:rgba(255,255,255,.15); border:none; color:#fff; border-radius:16px; padding:.3rem .625rem; font-size:.75rem; font-weight:700; display:flex; align-items:center; gap:.25rem; }

/* ===== BOTTOM NAV ===== */
.bottomnav {
  position:fixed; bottom:0; left:0; right:0; z-index:100;
  background:var(--card-bg); border-top:1px solid var(--border);
  display:flex; height:58px; box-shadow:0 -2px 8px rgba(0,0,0,.08);
}
.bn-item {
  flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:.125rem; border:none; background:transparent; color:var(--text2);
  font-family:inherit; font-size:.65rem; font-weight:600; position:relative;
}
.bn-item.active { color:var(--green-text); }
.bn-item.active::after { content:''; position:absolute; top:0; left:20%; right:20%; height:3px; background:var(--green); border-radius:0 0 3px 3px; }
.bn-icon { font-size:1.375rem; line-height:1; }
.bn-icon.post-fab { width:44px; height:44px; border-radius:50%; background:var(--green); color:#fff; display:flex; align-items:center; justify-content:center; margin-top:-8px; font-size:1.5rem; box-shadow:0 4px 12px rgba(0,106,78,.3); }

/* ===== SHARED PAGE / CARD ===== */
.page { max-width:40rem; margin:0 auto; padding:.875rem; }
.page-wide { max-width:60rem; margin:0 auto; padding:.875rem; }
.card { background:var(--card-bg); border-radius:var(--r); border:1px solid var(--border); box-shadow:var(--shadow); margin-bottom:.875rem; overflow:hidden; }
.card-head { padding:1.125rem 1.125rem .75rem; border-bottom:1px solid var(--border); }
.card-title { font-family:'Poppins',sans-serif; font-size:1.0625rem; font-weight:700; margin-bottom:.25rem; }
.card-sub { font-size:.8125rem; color:var(--text2); }
.card-body { padding:1.125rem; }

/* ===== FORM ===== */
.form-group { margin-bottom:1rem; }
.form-group:last-child { margin-bottom:0; }
.form-label { display:block; font-size:.875rem; font-weight:600; color:var(--text2); margin-bottom:.375rem; }
.req { color:var(--red-text); }
.form-input, .form-select, .form-textarea {
  width:100%; background:var(--input); border:1.5px solid var(--border); border-radius:var(--rs);
  padding:.75rem .875rem; font-family:inherit; font-size:.9375rem; color:var(--text);
  outline:none; transition:all .2s; -webkit-appearance:none; appearance:none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color:var(--green); background:var(--card-bg); box-shadow:0 0 0 3px rgba(0,106,78,.15); }
.form-textarea { resize:vertical; min-height:100px; line-height:1.6; }
.form-error { font-size:.8rem; color:var(--red-text); margin-top:.375rem; display:none; }
.form-error.show { display:block; }
.form-hint { font-size:.8rem; color:var(--text3); margin-top:.375rem; }
.form-row { display:grid; grid-template-columns:1fr 1fr; gap:.75rem; }
.select-wrap { position:relative; }
.select-wrap::after { content:'▾'; position:absolute; right:1rem; top:50%; transform:translateY(-50%); color:var(--text2); pointer-events:none; }
.select-wrap .form-select { padding-right:2.5rem; }
.other-wrap { margin-top:.625rem; }

.phone-wrap { display:flex; gap:.5rem; }
.phone-prefix { background:var(--input); border:1.5px solid var(--border); border-radius:var(--rs); padding:.75rem; font-size:.9375rem; font-weight:600; color:var(--text2); white-space:nowrap; display:flex; align-items:center; gap:.375rem; }
.input-wrap { position:relative; }
.pw-toggle { position:absolute; right:.75rem; top:50%; transform:translateY(-50%); border:none; background:transparent; color:var(--text2); font-size:1.05rem; cursor:pointer; }

.btn-primary {
  width:100%; background:var(--green); color:#fff; border:none; border-radius:var(--rs);
  padding:.9rem; font-family:inherit; font-weight:700; font-size:.9375rem;
  box-shadow:0 4px 12px rgba(0,106,78,.25); margin-top:.25rem;
}
.btn-primary:active { transform:scale(.99); }
.btn-outline {
  width:100%; background:transparent; color:var(--green-text); border:1.5px solid var(--green-text); border-radius:var(--rs);
  padding:.875rem; font-family:inherit; font-weight:700; font-size:.9375rem; margin-top:.625rem;
}
.btn-danger { background:var(--red); box-shadow:0 4px 12px rgba(244,42,65,.25); }

/* ===== ALERTS / TOAST ===== */
.alert { border-radius:var(--rs); padding:.75rem .875rem; font-size:.8375rem; margin-bottom:.875rem; display:flex; gap:.5rem; align-items:flex-start; }
.alert-green { background:var(--green-l); color:var(--green-text); }
.alert-red { background:var(--red-l); color:var(--red-text); }
.alert-amber { background:var(--amber-l); color:var(--amber-text); }

.toast {
  position:fixed; bottom:76px; left:50%; transform:translateX(-50%) translateY(20px);
  background:var(--text); color:var(--bg); padding:.75rem 1.25rem; border-radius:24px;
  font-size:.875rem; font-weight:600; opacity:0; pointer-events:none; transition:all .3s;
  z-index:400; white-space:nowrap; max-width:90vw;
}
.toast.show { opacity:1; transform:translateX(-50%) translateY(0); }

/* ===== AVATAR (deterministic solid colour by user id % 5 — see avatar_color_index()) =====
   Palette = brand green + calm neutrals only (master-prompt design rule: one brand colour + neutrals,
   no gradients / neon / purple-blue). */
.avatar { border-radius:50%; color:#fff; display:flex; align-items:center; justify-content:center; font-weight:700; flex-shrink:0; overflow:hidden; }
.avatar img { width:100%; height:100%; object-fit:cover; }
.av-0 { background:#006A4E; }
.av-1 { background:#475569; }
.av-2 { background:#0f766e; }
.av-3 { background:#8a5a2b; }
.av-4 { background:#374151; }

/* ===== COMPOSER ===== */
.composer { background:var(--card-bg); border-radius:var(--r); border:1px solid var(--border); box-shadow:var(--shadow); padding:.875rem; margin-bottom:.875rem; display:flex; align-items:center; gap:.75rem; }
.composer-box { flex:1; background:var(--input); border:1px solid var(--border); border-radius:20px; padding:.75rem 1.125rem; font-size:.9375rem; color:var(--text2); }

/* ===== FILTER TABS ===== */
.filter-tabs { display:flex; background:var(--card-bg); border-radius:var(--r); border:1px solid var(--border); padding:.375rem; gap:.25rem; margin-bottom:.875rem; overflow-x:auto; }
.ft { flex-shrink:0; padding:.5rem .875rem; border-radius:20px; border:none; background:transparent; font-family:inherit; font-size:.8375rem; font-weight:600; color:var(--text2); white-space:nowrap; }
.ft.active { background:var(--green); color:#fff; }

/* ===== POST CARD ===== */
.post { background:var(--card-bg); border-radius:var(--r); border:1px solid var(--border); margin-bottom:.875rem; overflow:hidden; }
.post-stripe { height:3px; }
.stripe-tutor { background:var(--green); }
.stripe-guardian { background:var(--text2); }
.post-head { display:flex; align-items:flex-start; gap:.75rem; padding:.875rem .875rem .5rem; }
.ph-info { flex:1; min-width:0; }
.ph-name { font-weight:700; font-size:.9375rem; display:flex; align-items:center; gap:.375rem; flex-wrap:wrap; margin-bottom:.125rem; }
.role-tag { padding:.125rem .5rem; border-radius:8px; font-size:.7rem; font-weight:700; }
.rt-tutor { background:var(--green-l); color:var(--green-text); }
.rt-guardian { background:var(--input); color:var(--text2); }
.ph-meta { font-size:.8rem; color:var(--text2); display:flex; align-items:center; gap:.375rem; flex-wrap:wrap; }
.post-body { padding:.25rem .875rem .625rem; }
.post-title { font-weight:700; font-size:.9875rem; margin-bottom:.5rem; }
.post-text { font-size:.9rem; color:var(--text2); line-height:1.7; margin-bottom:.75rem; white-space:pre-line; }
.detail-row { display:flex; flex-wrap:wrap; gap:.5rem; margin-bottom:.75rem; }
.detail-chip { display:flex; align-items:center; gap:.375rem; background:var(--input); border-radius:20px; padding:.375rem .75rem; font-size:.8125rem; font-weight:600; }
.tags { display:flex; flex-wrap:wrap; gap:.375rem; margin-bottom:.75rem; }
.tag { padding:.3125rem .75rem; border-radius:20px; font-size:.8rem; font-weight:500; display:inline-block; }
.tag-g { background:var(--green-l); color:var(--green-text); }
.tags { display:flex; flex-wrap:wrap; gap:.375rem; }

/* ===== MENU LIST (menu/index.php, settings/index.php) — plain rows inside a light .card, not
   to be confused with .admin-nav-item which is styled for the dark admin sidebar. ===== */
.menu-item { display:flex; align-items:center; gap:.75rem; padding:.875rem 1.125rem; color:var(--text); border-bottom:1px solid var(--border); }
.menu-item:last-child { border-bottom:none; }
.menu-item:hover { background:var(--input); }
.menu-item-icon { font-size:1.1rem; width:24px; text-align:center; flex-shrink:0; }

/* ===== CV BUILDER (profile/tabs/about.php) — 260px section sub-nav + content, side by side.
   On phone widths that fixed 260px column alone eats most of the screen and crushes the content
   column (cut off, per the user's own screenshot) — .cv-section-nav becomes a horizontal
   scrollable pill row instead, same look as .filter-tabs elsewhere on the same page.
   Deliberately its OWN styling, not reusing .admin-table-wrap — that class has its own
   max-width:640px override (turning INTO a stacked-card table layout) that collided with and
   silently killed this row's horizontal scroll at the exact same breakpoint. ===== */
.cv-layout { display:grid; grid-template-columns:260px 1fr; gap:1rem; align-items:start; }
.cv-section-nav { position:relative; background:var(--card-bg); border:1px solid var(--border); border-radius:var(--r); overflow-x:auto; -webkit-overflow-scrolling:touch; box-shadow:var(--shadow); }
.cv-section-nav .menu-item.active { background:var(--input); font-weight:700; }
@media (max-width:768px) {
  .cv-layout { display:block; }
  .cv-section-nav { display:flex; gap:.5rem; padding:.625rem; margin-bottom:1rem; }
  .cv-section-nav .menu-item { flex-shrink:0; white-space:nowrap; border:1px solid var(--border); border-radius:20px; padding:.5rem .875rem; }
  .cv-section-nav .menu-item:last-child { border-bottom:1px solid var(--border); }
  .cv-section-nav .menu-item.active { background:var(--green-l); color:var(--green-text); border-color:var(--green-text); }
}

/* ===== MENU GRID (menu/index.php's "Your Shortcuts") — Facebook-style icon grid, distinct from
   the plain-list .menu-item rows used for Help&Support/Settings/Logout on the same page. ===== */
.menu-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(84px,1fr)); gap:.25rem; padding:.625rem 1rem 1rem; }
.menu-grid-item { display:flex; flex-direction:column; align-items:center; gap:.375rem; text-decoration:none; color:var(--text); text-align:center; padding:.625rem .25rem; border-radius:10px; }
.menu-grid-item:hover { background:var(--input); }
.menu-grid-icon { width:48px; height:48px; border-radius:12px; background:var(--input); display:flex; align-items:center; justify-content:center; font-size:1.375rem; position:relative; }
.menu-grid-item span { font-size:.75rem; font-weight:600; line-height:1.2; }
.menu-grid-badge { position:absolute; top:-4px; right:-4px; background:var(--red); color:#fff; width:18px; height:18px; border-radius:50%; font-size:.625rem; font-weight:700; display:flex; align-items:center; justify-content:center; border:2px solid var(--card-bg); }
.tag-r { background:var(--red-l); color:var(--red-text); }
.tag-a { background:var(--amber-l); color:var(--amber-text); }
.post-stats { display:flex; align-items:center; gap:1rem; padding:.5rem .875rem; border-top:1px solid var(--border); font-size:.8125rem; color:var(--text2); }
.post-actions { display:flex; border-top:1px solid var(--border); }

/* post-head top-right: primary Apply/Hire button + "⋯" overflow menu */
.ph-actions { margin-left:auto; display:flex; align-items:center; gap:.375rem; flex-shrink:0; position:relative; }
.ph-primary-btn { display:inline-flex; align-items:center; gap:.3rem; padding:.4rem .75rem; border-radius:20px; border:none; background:var(--green); color:#fff; font-family:inherit; font-size:.75rem; font-weight:700; cursor:pointer; white-space:nowrap; }
.ph-primary-btn:disabled { opacity:.6; cursor:default; }
.post-menu-wrap { position:relative; }
.post-menu-btn { width:30px; height:30px; border-radius:50%; border:none; background:transparent; color:var(--text2); font-size:1.125rem; font-weight:700; cursor:pointer; display:flex; align-items:center; justify-content:center; }
.post-menu-btn:hover { background:var(--input); }
.post-menu-dropdown { position:absolute; top:34px; right:0; background:var(--card-bg); border:1px solid var(--border); border-radius:10px; box-shadow:var(--shadow-md,0 6px 20px rgba(0,0,0,.15)); min-width:170px; z-index:20; overflow:hidden; }
.post-menu-item { display:flex; align-items:center; gap:.625rem; width:100%; padding:.625rem .875rem; border:none; background:transparent; text-align:left; font-family:inherit; font-size:.8375rem; color:var(--text); cursor:pointer; }
.post-menu-item:hover { background:var(--input); }

/* inline comment panel */
.comments-panel { border-top:1px solid var(--border); padding:.875rem; }
.comments-list { margin-bottom:.75rem; }
.comment-form { display:flex; gap:.5rem; }
.comment-form input { flex:1; }
.pa-btn { flex:1; display:flex; align-items:center; justify-content:center; gap:.4rem; padding:.75rem .25rem; border:none; background:transparent; font-family:inherit; font-size:.8375rem; font-weight:700; color:var(--text2); border-right:1px solid var(--border); }
.pa-btn:last-child { border-right:none; }
.pa-btn.active-support { color:var(--green-text); }
.pa-btn.active-save { color:var(--blue-text); }

/* ===== MULTI-SELECT ADD TAG PATTERN (post-create, and any future multi-value dropdown) ===== */
.tag-list { display:flex; flex-wrap:wrap; gap:.5rem; margin-bottom:.625rem; }
.tag-list:empty { display:none; }
.tag-chip { display:flex; align-items:center; gap:.4rem; background:var(--green-l); color:var(--green-text); border-radius:20px; padding:.375rem .5rem .375rem .875rem; font-size:.8375rem; font-weight:600; }
.tag-chip button { width:18px; height:18px; border-radius:50%; background:rgba(0,106,78,.15); border:none; color:var(--green-text); font-size:.75rem; display:flex; align-items:center; justify-content:center; line-height:1; }
.tag-add-row { display:flex; gap:.5rem; }
.tag-add-row .form-select { flex:1; }
.tag-add-btn { background:var(--green-l); color:var(--green-text); border:1.5px solid var(--green-text); border-radius:var(--rs); padding:0 .875rem; font-family:inherit; font-weight:700; font-size:.8375rem; white-space:nowrap; flex-shrink:0; }

/* ===== CHECKBOX PILLS (days) ===== */
.pill-group { display:flex; flex-wrap:wrap; gap:.5rem; }
.pill { position:relative; }
.pill input { position:absolute; opacity:0; inset:0; cursor:pointer; margin:0; }
.pill span { display:inline-flex; align-items:center; justify-content:center; min-width:52px; padding:.5rem .75rem; border-radius:20px; border:1.5px solid var(--border); font-size:.8375rem; font-weight:600; color:var(--text2); }
.pill input:checked + span { background:var(--green); border-color:var(--green); color:#fff; }

/* ===== SALARY / SINGLE-CHOICE CHIPS ===== */
.chip-select { display:flex; flex-wrap:wrap; gap:.5rem; margin-bottom:.75rem; }
.chip-opt { position:relative; }
.chip-opt input { position:absolute; opacity:0; inset:0; cursor:pointer; margin:0; }
.chip-opt span { display:inline-flex; padding:.5rem .875rem; border-radius:20px; border:1.5px solid var(--border); font-size:.8125rem; font-weight:600; color:var(--text2); }
.chip-opt input:checked + span { background:var(--red-l); border-color:var(--red-text); color:var(--red-text); }

/* ===== RADIO CARDS (gender/expire/type) ===== */
.radio-cards { display:grid; gap:.5rem; }
.rc { position:relative; }
.rc input { position:absolute; opacity:0; inset:0; cursor:pointer; margin:0; }
.rc span { display:flex; flex-direction:column; align-items:center; gap:.25rem; padding:.75rem .5rem; border-radius:var(--rs); border:1.5px solid var(--border); font-size:.8125rem; font-weight:600; color:var(--text2); text-align:center; }
.rc input:checked + span { border-color:var(--green-text); background:var(--green-l); color:var(--green-text); }

/* ===== STICKY BOTTOM SUBMIT ===== */
.bottom-bar { position:fixed; bottom:0; left:0; right:0; background:var(--card-bg); border-top:1px solid var(--border); padding:.75rem .875rem; box-shadow:0 -2px 10px rgba(0,0,0,.08); z-index:90; }
.bottom-bar-inner { max-width:640px; margin:0 auto; display:flex; gap:.625rem; align-items:center; }

/* ===== MESSENGER (messages/index.php inbox + messages/view.php thread) ===== */
.msg-search-wrap { position:relative; margin-bottom:.875rem; }
.msg-search-wrap input { width:100%; background:var(--input); border:1.5px solid var(--border); border-radius:24px; padding:.6875rem 1rem .6875rem 2.5rem; font-family:inherit; font-size:.9rem; color:var(--text); }
.msg-search-icon { position:absolute; left:.9rem; top:50%; transform:translateY(-50%); color:var(--text3); pointer-events:none; }
.msg-inbox-item { display:flex; align-items:center; gap:.75rem; padding:.75rem .875rem; text-decoration:none; border-radius:var(--r); transition:background .15s; }
.msg-inbox-item:hover { background:var(--input); }
.msg-inbox-item.unread .msg-inbox-name, .msg-inbox-item.unread .msg-inbox-preview { font-weight:700; color:var(--text); }
.msg-inbox-preview { font-size:.8125rem; color:var(--text2); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.msg-inbox-name { font-weight:600; font-size:.9375rem; }

.msg-header { position:sticky; top:0; z-index:20; display:flex; align-items:center; gap:.75rem; padding:.75rem .875rem; background:var(--card-bg); border-bottom:1px solid var(--border); margin:0 -.875rem .875rem; }
.msg-back { color:var(--text2); font-size:1.375rem; line-height:1; flex-shrink:0; text-decoration:none; padding:.25rem; }
.msg-header-name { font-weight:700; font-size:.9375rem; color:inherit; text-decoration:none; }
.msg-header-sub { font-size:.75rem; color:var(--text3); }

.msg-thread { display:flex; flex-direction:column; gap:.125rem; padding:.5rem .25rem 1rem; }
.msg-date-sep { text-align:center; font-size:.75rem; color:var(--text3); font-weight:600; margin:.875rem 0 .5rem; }
.msg-row { display:flex; align-items:flex-end; gap:.5rem; max-width:78%; }
.msg-row.mine { align-self:flex-end; flex-direction:row-reverse; }
.msg-row.theirs { align-self:flex-start; }
.msg-row .avatar { width:26px; height:26px; font-size:.7rem; }
.msg-row .avatar-spacer { width:26px; flex-shrink:0; }
.msg-bubble { background:var(--input); color:var(--text); padding:.5rem .875rem; border-radius:18px; font-size:.9rem; line-height:1.45; word-break:break-word; }
.msg-row.mine .msg-bubble { background:var(--green); color:#fff; }
.msg-row.theirs .msg-bubble.grp-first { border-bottom-left-radius:18px; }
.msg-row.theirs .msg-bubble.grp-mid { border-top-left-radius:6px; border-bottom-left-radius:6px; }
.msg-row.theirs .msg-bubble.grp-last { border-top-left-radius:6px; }
.msg-row.mine .msg-bubble.grp-first { border-bottom-right-radius:18px; }
.msg-row.mine .msg-bubble.grp-mid { border-top-right-radius:6px; border-bottom-right-radius:6px; }
.msg-row.mine .msg-bubble.grp-last { border-top-right-radius:6px; }
.msg-time { font-size:.7rem; color:var(--text3); text-align:center; margin:.1875rem 34px 0; }
.msg-row.mine + .msg-time { text-align:right; }
.msg-bubble-col { display:flex; flex-direction:column; gap:.125rem; min-width:0; }
.msg-bubble-line { display:flex; align-items:center; gap:.25rem; }
.msg-row.mine .msg-bubble-line { flex-direction:row-reverse; }
.msg-react-wrap { position:relative; flex-shrink:0; }
.msg-react-trigger { background:none; border:none; cursor:pointer; font-size:.85rem; opacity:.35; padding:.125rem; line-height:1; }
.msg-react-trigger:hover { opacity:1; }
.msg-react-picker { position:absolute; top:-2.375rem; display:flex; gap:.125rem; background:var(--card-bg); border:1px solid var(--border); border-radius:20px; box-shadow:var(--shadow-md,0 6px 20px rgba(0,0,0,.15)); padding:.25rem .375rem; z-index:20; }
.msg-row.theirs .msg-react-picker { left:0; }
.msg-row.mine .msg-react-picker { right:0; }
.msg-react-picker form { display:inline-flex; }
.msg-react-emoji-btn { background:none; border:none; font-size:1.05rem; cursor:pointer; padding:.125rem .25rem; border-radius:6px; }
.msg-react-emoji-btn:hover { background:var(--input); }
.msg-react-emoji-btn.active { background:var(--input); box-shadow:inset 0 0 0 1.5px var(--green); }
.msg-react-pills { display:flex; gap:.25rem; }
.msg-row.mine .msg-react-pills { align-self:flex-end; }
.msg-react-pill { background:var(--card-bg); border:1px solid var(--border); border-radius:12px; font-size:.7rem; padding:.0625rem .375rem; line-height:1.4; }
.msg-react-pill.mine { border-color:var(--green); }

.msg-composer-pill { flex:1; display:flex; align-items:center; background:var(--input); border-radius:24px; padding:.25rem .25rem .25rem 1.125rem; }
.msg-composer-pill input { flex:1; background:transparent; border:none; font-family:inherit; font-size:.9375rem; color:var(--text); padding:.5rem 0; }
.msg-composer-pill input:focus { outline:none; }
.msg-send-btn { width:38px; height:38px; border-radius:50%; background:var(--green); color:#fff; border:none; display:flex; align-items:center; justify-content:center; font-size:1rem; flex-shrink:0; cursor:pointer; }

/* ===== MESSENGER — desktop 2-column split (mobile keeps the single full-screen pane it already
   had; .msg-inbox-pane/.msg-chat-pane are the same markup either way, only the layout mode changes) === */
.msg-composer-row { flex-shrink:0; background:var(--card-bg); border-top:1px solid var(--border); padding:.75rem .875rem; }
.msg-composer-row .bottom-bar-inner { max-width:none; margin:0; }
.msg-empty-chat { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; color:var(--text2); padding:2rem; gap:.5rem; }
.msg-empty-chat-icon { font-size:3rem; opacity:.5; }
@media (max-width:767px) {
  .msg-desktop-split.has-active .msg-inbox-pane { display:none; }
  .msg-desktop-split:not(.has-active) .msg-chat-pane { display:none; }
  .msg-composer-row { position:fixed; left:0; right:0; bottom:0; z-index:90; box-shadow:0 -2px 10px rgba(0,0,0,.08); }
}
@media (min-width:768px) {
  .msg-desktop-split { display:flex; height:78vh; border:1px solid var(--border); border-radius:var(--r); overflow:hidden; background:var(--card-bg); }
  .msg-inbox-pane { width:340px; flex-shrink:0; overflow-y:auto; border-right:1px solid var(--border); padding:.875rem; }
  .msg-chat-pane { flex:1; min-width:0; display:flex; flex-direction:column; overflow:hidden; }
  .msg-chat-pane .msg-header { position:static; margin:0; border-radius:0; }
  .msg-chat-pane .msg-thread { flex:1; overflow-y:auto; margin:0; }
  .msg-chat-pane .msg-composer-row { position:static; box-shadow:none; }
}

/* ===== ADMIN PANEL — separate shell from the Facebook-style user site (sidebar, not bottom-nav) ===== */
:root {
  --sb-bg: #14203a;     /* FIXED dark navy — deliberately does NOT invert with theme, same reasoning as toptutorbd2's --ink-block lesson: a sidebar that's "always dark" reads as a distinct admin console in both themes */
  --sb-text: #94a3b8;
  --sb-text-active: #fff;
  --sb-active-bg: rgba(0,106,78,.35);
  --sb-border: #24304a;
}
.admin-shell { display:flex; min-height:100vh; }
/* padding-bottom gives room to scroll PAST the last real item — without it, an active item near
   the very end of the list (e.g. Announcements, Settings) can never be scrolled to the vertical
   center on load, since the browser won't scroll further than the content actually goes. */
.admin-sidebar { width:230px; flex-shrink:0; background:var(--sb-bg); display:flex; flex-direction:column; position:sticky; top:0; height:100vh; overflow-y:auto; padding-bottom:45vh; }
.admin-brand { padding:1.25rem 1.125rem; font-family:'Poppins',sans-serif; font-weight:800; font-size:1.125rem; color:#fff; border-bottom:1px solid var(--sb-border); }
.admin-brand-row { display:flex; align-items:center; gap:.375rem; }
.admin-brand span { color:#ffcc00; }
.admin-brand small { display:block; font-size:.6875rem; font-weight:600; color:var(--sb-text); margin-top:.125rem; letter-spacing:.5px; }
.admin-nav { flex:1; padding:.75rem; }
.admin-nav-label { font-size:.6875rem; font-weight:700; color:var(--sb-text); text-transform:uppercase; letter-spacing:.6px; padding:.875rem .875rem .375rem; opacity:.7; }
.admin-nav-label:first-child { padding-top:0; }
.admin-nav-item { display:flex; align-items:center; gap:.75rem; padding:.75rem .875rem; border-radius:var(--rs); color:var(--sb-text); font-size:.875rem; font-weight:600; margin-bottom:.25rem; }
.admin-nav-item:hover { background:rgba(255,255,255,.05); color:#fff; }
.admin-nav-item.active { background:var(--sb-active-bg); color:var(--sb-text-active); }
.admin-nav-icon { font-size:1.0625rem; width:22px; text-align:center; }
.admin-nav-badge { margin-left:auto; background:var(--red); color:#fff; font-size:.7rem; font-weight:700; padding:.1rem .45rem; border-radius:8px; }
.admin-nav-badge.g { background:var(--green); }
.admin-nav-badge.a { background:var(--amber); color:#1c1e21; }
.admin-nav-badge.r { background:var(--red); }
.admin-sidebar-foot { padding:.75rem; border-top:1px solid var(--sb-border); }
.admin-sidebar-foot .admin-nav-item { color:var(--sb-text); }

.admin-main { flex:1; min-width:0; background:var(--bg); }
.admin-topbar { position:sticky; top:0; z-index:50; background:var(--card-bg); border-bottom:1px solid var(--border); padding:.875rem 1.25rem; display:flex; align-items:center; gap:.875rem; }
.admin-topbar-title { font-family:'Poppins',sans-serif; font-weight:700; font-size:1.0625rem; flex:1; }
/* .theme-btn / .lang-toggle-btn were designed for the solid-green user topnav (white text/borders) —
   the admin topbar sits on --card-bg instead, so override to theme-aware colors here. */
.admin-topbar .theme-btn { background:var(--input); color:var(--text2); }
.admin-topbar .lang-toggle-btn { background:var(--input); color:var(--text2); }
.admin-page { padding:1.25rem; max-width:1200px; }

.stat-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:.875rem; margin-bottom:1.25rem; }
.stat-card { background:var(--card-bg); border:1px solid var(--border); border-radius:var(--r); padding:1.125rem; box-shadow:var(--shadow); }
.stat-card .sn { font-family:'Poppins',sans-serif; font-size:1.625rem; font-weight:800; }
.stat-card .sl { font-size:.8125rem; color:var(--text2); margin-top:.25rem; }
.stat-card.c-green .sn { color:var(--green-text); }
.stat-card.c-red .sn { color:var(--red-text); }
.stat-card.c-amber .sn { color:var(--amber-text); }
.stat-card.c-blue .sn { color:var(--blue-text); }

.admin-table-wrap {
  position:relative; background:var(--card-bg); border:1px solid var(--border); border-radius:var(--r);
  overflow-x:auto; -webkit-overflow-scrolling:touch; box-shadow:var(--shadow);
}
.admin-table { width:100%; border-collapse:collapse; font-size:.875rem; white-space:nowrap; }
.admin-table th { text-align:left; padding:.75rem 1rem; background:var(--input); color:var(--text2); font-weight:700; font-size:.75rem; text-transform:uppercase; letter-spacing:.4px; }
.admin-table td { padding:.75rem 1rem; border-top:1px solid var(--border); }
/* A visual hint that there's more to see sideways — most mobile browsers give a scrollable
   container zero affordance on their own, so a table's extra columns silently go unnoticed.
   (Tablet-ish widths only — true phone widths below get the stacked-card treatment instead, see
   the 640px rule further down, so there's nothing left to hint at scrolling by then.) */
@media (max-width:860px) {
  .admin-table-wrap.scrollable::after {
    content:''; position:absolute; top:0; right:0; bottom:0; width:28px; pointer-events:none;
    background:linear-gradient(to right, transparent, var(--card-bg));
  }
}

/* Phone widths: instead of scrolling sideways through a wide table, each row becomes its own
   stacked card — every cell shows its own column name (read off the table's real <thead> at
   runtime by labelAdminTableCells() in main.js) as a small label above the value, so all the data
   fits in one column without losing which field is which. */
@media (max-width:640px) {
  .admin-table-wrap { overflow-x:visible; box-shadow:none; border:none; background:transparent; }
  .admin-table-wrap.scrollable::after { display:none; }
  .admin-table, .admin-table tbody, .admin-table tr, .admin-table td { display:block; width:100%; white-space:normal; }
  .admin-table thead { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }
  .admin-table tr { background:var(--card-bg); border:1px solid var(--border); border-radius:var(--r); box-shadow:var(--shadow); margin-bottom:.75rem; padding:.25rem 0; }
  .admin-table td { padding:.5rem .875rem; border-top:none; border-bottom:1px solid var(--border); }
  .admin-table td:last-child { border-bottom:none; }
  .admin-table td[data-label]::before {
    content:attr(data-label); display:block; font-weight:700; font-size:.6875rem; text-transform:uppercase;
    letter-spacing:.4px; color:var(--text2); margin-bottom:.25rem;
  }
}

/* mobile: sidebar becomes an off-canvas slide-out drawer (hamburger-triggered) instead of either a
   fixed column or a horizontal scroll strip — a ~20-item nav squeezed into one 4000px+-wide
   horizontal strip meant swiping through most of it just to reach "Settings", with no hint there
   was more to scroll to. A drawer keeps the normal vertical list (labels included) usable on any
   screen width. */
.admin-hamburger { display:none; }
.admin-drawer-backdrop { display:none; }
@media (max-width:860px) {
  .admin-shell { flex-direction:column; }
  .admin-hamburger {
    display:flex; align-items:center; justify-content:center; width:36px; height:36px; flex-shrink:0;
    background:var(--input); border:none; border-radius:8px; font-size:1.125rem; color:var(--text);
  }
  .admin-sidebar {
    position:fixed; top:0; left:0; width:82vw; max-width:300px; height:100vh; z-index:200;
    flex-direction:column; overflow-y:auto; overflow-x:hidden;
    transform:translateX(-100%); transition:transform .25s ease;
    box-shadow:4px 0 24px rgba(0,0,0,.25);
  }
  .admin-sidebar.open { transform:translateX(0); }
  .admin-brand { display:block; }
  .admin-nav { display:block; padding:.75rem; }
  .admin-nav-item { margin-bottom:.25rem; white-space:normal; }
  .admin-sidebar-foot { display:block; border-top:1px solid var(--sb-border); border-left:none; }
  .admin-drawer-backdrop {
    display:block; position:fixed; inset:0; background:rgba(0,0,0,.5); z-index:190;
    opacity:0; pointer-events:none; transition:opacity .25s ease;
  }
  .admin-drawer-backdrop.open { opacity:1; pointer-events:auto; }
}

/* ===== FLUID SCALE + FIXED HEADER =====
   Root font-size grows with the monitor (16px up to ~1100px wide, ~17.3px at 1440, 19px from 1920) so every
   rem-based size — text, cards, spacing — scales together instead of staying tiny on big screens. */
html { font-size:clamp(16px, 12px + .366vw, 19px); }
:root { --hdr-h:3.5rem; }
.topnav { height:var(--hdr-h); padding-top:0; padding-bottom:0; z-index:140; }
.tn-left { display:flex; align-items:center; gap:.75rem; flex:1; min-width:0; }
.tn-center, .tn-desktop-only { display:none; }
.tn-btn { width:2.375rem; height:2.375rem; }
.tn-avatar-img { width:100%; height:100%; object-fit:cover; border-radius:50%; }
.tn-pop-wrap { position:relative; }
.tn-pop { position:absolute; right:0; top:calc(100% + .625rem); z-index:130; background:var(--card-bg); color:var(--text); border:1px solid var(--border); border-radius:12px; box-shadow:var(--shadow-md); padding:.5rem; }
.tn-pop[hidden] { display:none; }
.tn-pop-title { font-family:'Poppins',sans-serif; font-weight:800; font-size:1.25rem; padding:.375rem .5rem .625rem; }
.tn-apps { width:min(92vw,25rem); }
.tn-apps-grid { display:grid; grid-template-columns:1fr 1fr; gap:.25rem; }
.tn-apps-grid a { display:flex; align-items:center; gap:.625rem; padding:.625rem; border-radius:10px; color:var(--text); font-size:.9rem; font-weight:600; }
.tn-apps-grid a:hover { background:var(--input); }
.tn-apps-grid a span { width:2.25rem; height:2.25rem; border-radius:50%; background:var(--input); display:flex; align-items:center; justify-content:center; font-size:1.1rem; flex-shrink:0; }
.tn-account { width:min(92vw,21rem); }
.tn-acc-card { display:flex; align-items:center; gap:.75rem; padding:.75rem; border-radius:10px; color:var(--text); background:var(--input); margin-bottom:.375rem; }
.tn-acc-card b { display:block; font-size:1rem; }
.tn-acc-card small { color:var(--text2); font-size:.8rem; }
.tn-acc-av { width:2.75rem; height:2.75rem; font-size:1.1rem; }
.tn-acc-row { display:flex; align-items:center; gap:.75rem; width:100%; padding:.625rem; border:none; background:transparent; border-radius:10px; color:var(--text); font-size:.9375rem; font-weight:600; text-align:left; font-family:inherit; }
.tn-acc-row:hover { background:var(--input); }
.tn-acc-row span { width:2.25rem; height:2.25rem; border-radius:50%; background:var(--input); display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.tn-acc-row i { margin-left:auto; font-style:normal; color:var(--text3); font-size:1.25rem; }

/* thin top progress bar shown while the next page loads (assets/js/nav.js) */
.nav-progress { position:fixed; top:0; left:0; height:3px; width:0; background:#ffcc00; z-index:300; opacity:0; pointer-events:none; }
.nav-progress.on { opacity:1; transition:width 8s cubic-bezier(.1,.6,.2,1); width:85%; }

/* Smooth page changes: the browser cross-fades old → new page instead of flashing white; the header
   keeps its own layer so it stays put while only the content fades. */
@view-transition { navigation:auto; }
.topnav { view-transition-name:topnav; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration:.14s; }

/* ===== DESKTOP ===== */
@media (min-width:768px) {
  body { padding-bottom:0; }
  .bottomnav { display:none; }
  .toast { bottom:1.5rem; }
  .tn-phone-only { display:none !important; }
  .tn-desktop-only { display:block; }
  .tn-credits { display:none; }
  .tn-credits-desktop { background:rgba(255,255,255,.15); color:#fff; border-radius:16px; padding:.3rem .75rem; font-size:.8125rem; font-weight:700; white-space:nowrap; }

  /* Facebook-style header: [logo + search] · [centred icon nav] · [actions] */
  .topnav { display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); gap:.5rem; }
  .tn-actions { justify-self:end; }
  .tn-center { display:flex; align-items:stretch; gap:.25rem; height:100%; }
  .tn-nav { position:relative; width:clamp(3.25rem,6vw,6rem); display:flex; align-items:center; justify-content:center; color:rgba(255,255,255,.72); border-radius:10px; margin:.375rem 0; }
  .tn-nav:hover { background:rgba(255,255,255,.14); color:#fff; }
  .tn-nav.active { color:#fff; }
  .tn-nav.active::after { content:''; position:absolute; left:.625rem; right:.625rem; bottom:-.375rem; height:3px; background:#fff; border-radius:3px 3px 0 0; }

  /* profile Overview/Posts: Facebook-style Intro sidebar + main content, side by side */
  .profile-2col { display:grid; grid-template-columns:19rem 1fr; gap:1.25rem; align-items:start; }
  .profile-intro-col { position:sticky; top:calc(var(--hdr-h) + 1rem); }

  /* ===== APP SHELL — the page scrolls normally (window scroll) under the fixed header.
     Every page except Home is just centred content (no side menu); the all-features menu and the
     account menu live in the header instead. ===== */
  .app-shell { max-width:none; margin:0 auto; padding:1rem 1.5rem 1.5rem; }
  .app-main { min-width:0; }

  /* HOME ONLY: left menu pinned to the left edge of the screen, right panel to the right edge,
     feed centred between them (like facebook.com on a wide monitor). */
  .app-shell.home-shell { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,44rem) minmax(0,1fr); gap:1.5rem; align-items:start; padding:1rem 1rem 1.5rem; }
  .home-shell > .app-sidebar { justify-self:start; width:min(100%,20rem); position:sticky; top:calc(var(--hdr-h) + 1rem); max-height:calc(100vh - var(--hdr-h) - 2rem); overflow-y:auto; scrollbar-width:thin; }
  .home-shell > .app-right { justify-self:end; width:min(100%,22rem); position:sticky; top:calc(var(--hdr-h) + 1rem); max-height:calc(100vh - var(--hdr-h) - 2rem); overflow-y:auto; scrollbar-width:thin; }
  .app-sidebar-profile { display:flex; align-items:center; gap:.75rem; background:var(--card-bg); border:1px solid var(--border); border-radius:var(--r); padding:.75rem; color:var(--text); margin-bottom:.875rem; box-shadow:var(--shadow); }
  .asb-av { width:2.75rem; height:2.75rem; font-size:1.1rem; }
  .asb-who { display:flex; flex-direction:column; min-width:0; }
  .asb-who b { font-size:.95rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .asb-who small { color:var(--text2); font-size:.78rem; }
  .app-sidebar-nav { background:var(--card-bg); border:1px solid var(--border); border-radius:var(--r); overflow:hidden; box-shadow:var(--shadow); margin-bottom:.875rem; }
  .app-sidebar-nav .menu-item.active { background:var(--green-l); color:var(--green-text); font-weight:700; }
  .asb-new { display:block; text-align:center; }
}
@media (min-width:768px) and (max-width:1099px) {
  .app-shell.home-shell { grid-template-columns:auto minmax(0,44rem); justify-content:center; }
  .home-shell > .app-right { display:none; }
}
@media (max-width:767px) {
  .app-sidebar, .tn-credits-desktop { display:none; }
}

/* h1/h2 used as the semantic page title keep the .card-title look (SEO: real headings, same design) */
h1.card-title, h2.card-title { margin: 0; }

/* Visible developer credit (master-prompt rule: "Developed with ❤️" linking to theonestopbd.com) */
.dev-credit { text-align:center; font-size:.75rem; color:var(--text3); padding:1rem .5rem 1.25rem; }
.dev-credit a { color:var(--green-text); font-weight:600; text-decoration:none; }

/* post ⋯ menu: section label + indented options for "Who can comment" */
.post-menu-label { padding:.5rem .875rem .125rem; font-size:.75rem; font-weight:700; color:var(--text3); }
.post-menu-sub { padding-left:2rem; font-size:.8125rem; }
.post-menu-dropdown { position:fixed; min-width:15rem; overflow-y:auto; overscroll-behavior:contain; }
.post-menu-dropdown { z-index:300; }

/* post ⋯ menu on phones: bottom sheet */
.post-menu-backdrop { position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:299; }
@media (max-width:640px) {
  .post-menu-dropdown { position:fixed !important; left:0 !important; right:0 !important; top:auto !important; bottom:0 !important; width:100%; min-width:0; max-height:78vh !important; border-radius:16px 16px 0 0; border-width:1px 0 0; padding:.375rem 0 calc(.5rem + env(safe-area-inset-bottom)); box-shadow:0 -8px 30px rgba(0,0,0,.25); }
  .post-menu-dropdown .post-menu-item { min-height:3rem; font-size:.9375rem; padding:.75rem 1.125rem; }
  .post-menu-dropdown .post-menu-sub { padding-left:2.5rem; }
  .post-menu-dropdown::before { content:''; display:block; width:2.5rem; height:4px; border-radius:2px; background:var(--border); margin:.25rem auto .5rem; }
}
.tn-badge[hidden] { display:none !important; }
@keyframes tnPulse { 0% { transform:scale(1); } 40% { transform:scale(1.5); } 100% { transform:scale(1); } }
.tn-badge.tn-pulse { animation:tnPulse .6s ease; }

/* phone top bar: logo, search, requests, messenger, dark mode, language must all fit */
@media (max-width:480px) {
  .topnav .theme-btn.tn-phone-only { padding:.4rem .55rem; font-size:1rem; }
  .topnav .theme-btn.tn-phone-only .bn, .topnav .theme-btn.tn-phone-only .en { display:none !important; }
  .topnav .tn-right { gap:.25rem; }
  .topnav .tn-btn { width:34px; height:34px; }
}

/* post ⋯ menu: compact, never stretched to the window edge */
.post-menu-dropdown { right:auto; width:max-content; max-width:min(22rem, calc(100vw - 16px)); }
.post-menu-dropdown .post-menu-item { padding:.5rem .875rem; font-size:.875rem; white-space:nowrap; }
.post-menu-seg { display:flex; gap:.25rem; padding:.125rem .75rem .5rem; }
.post-menu-seg button { flex:1; border:1px solid var(--border); background:transparent; color:var(--text); border-radius:999px; padding:.3rem .5rem; font:inherit; font-size:.8125rem; cursor:pointer; white-space:nowrap; }
.post-menu-seg button.on { background:var(--green); border-color:var(--green); color:#fff; font-weight:700; }
@media (max-width:640px) {
  .post-menu-dropdown { width:100%; max-width:none; }
  .post-menu-dropdown .post-menu-item { padding:.75rem 1.125rem; font-size:.9375rem; }
  .post-menu-seg { padding:.125rem 1.125rem .75rem; }
  .post-menu-seg button { padding:.5rem; font-size:.875rem; }
}

/* centre nav now carries Friends + Requests with their badges; the phone-style 🤝 button is for narrow screens only */
@media (min-width:768px) {
  .tn-req-btn { display:none !important; }
  .tn-nav .tn-badge { top:.125rem; right:calc(50% - 1.75rem); }
}
