/* ============================================================
   MyNeighbor — dashboard + onboarding styles
   ============================================================ */

.app-body { background: var(--bg); min-height: 100vh; }

/* ---------- App header ---------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(20, 20, 20, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.app-header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 20px;
}
.app-search {
  flex: 1;
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 6px 6px 14px;
  color: var(--text-dim);
}
.app-search input { flex: 1; background: none; border: none; outline: none; color: var(--text); font-size: 0.95rem; }
.ask-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 600;
  font-size: 0.9rem;
}
.ask-btn:hover { background: var(--green-hover); }

.app-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
}
.icon-btn:hover { background: var(--surface-2); }
.badge-dot { position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--cardigan-red); border: 2px solid var(--bg); }

.app-user { position: relative; display: flex; align-items: center; }
.avatar-btn { border: none; padding: 0; cursor: pointer; }
.avatar-btn:hover { filter: brightness(1.08); }
.avatar-btn[aria-expanded="true"] { box-shadow: 0 0 0 3px rgba(42, 163, 79, 0.35); }
.user-menu-btn { background: none; border: none; color: var(--text-muted); display: inline-flex; padding: 4px; }
.user-dropdown { right: 0; left: auto; min-width: 220px; }
.user-dropdown.open { display: flex; }

/* ---------- New posts pill (slides in from top) ---------- */
.new-posts-pill {
  position: fixed;
  top: calc(var(--header-h) + 12px);
  left: 50%;
  z-index: 70;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 18px 11px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(38, 38, 38, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transform: translate(-50%, -220%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.45s cubic-bezier(0.22, 0.9, 0.28, 1), opacity 0.35s ease;
}
.new-posts-pill.show {
  transform: translate(-50%, 0);
  opacity: 1;
  pointer-events: auto;
}
.new-posts-pill .np-icon { color: var(--green); flex: none; }
.new-posts-pill .np-refresh { color: var(--green); font-weight: 800; margin-left: 4px; }
.new-posts-pill:hover { filter: brightness(1.06); }
.menu-link { text-align: left; background: none; border: none; color: var(--text-muted); font-size: 0.92rem; padding: 10px 12px; border-radius: 8px; }
.menu-link:hover { background: var(--surface); color: var(--text); }

.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--green); color: #fff; font-weight: 700; font-size: 0.95rem; flex: 0 0 auto;
}
.avatar-lg { width: 44px; height: 44px; }

/* ---------- Guest banner ---------- */
.guest-banner { background: linear-gradient(90deg, rgba(31,138,61,0.16), rgba(255,207,92,0.12)); border-bottom: 1px solid var(--border); }
.guest-banner-inner {
  position: relative;
  max-width: 1400px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; justify-content: center; gap: 16px;
  font-size: 0.88rem; color: var(--text-muted); text-align: center;
}
.guest-banner-close { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--text-dim); font-size: 1.5rem; line-height: 1; }
.guest-banner-close:hover { color: var(--text); }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }

/* ---------- Dashboard shell ---------- */
.app-shell {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 20px 64px;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}

/* Left nav */
.dash-nav { position: sticky; top: calc(var(--header-h) + 20px); display: flex; flex-direction: column; gap: 8px; }
.dash-nav-list { display: flex; flex-direction: column; gap: 2px; }
.nav-link {
  display: flex; align-items: center; gap: 14px;
  padding: 11px 14px; border-radius: 10px;
  color: var(--text-muted); font-weight: 600; font-size: 0.98rem;
}
.nav-link svg { color: var(--text-dim); flex: 0 0 auto; }
.nav-link:hover { background: var(--surface); color: var(--text); }
.nav-link.active { color: var(--grass-green); }
.nav-link.active svg { color: var(--grass-green); }
.post-cta {
  margin: 12px 0;
  background: var(--green); color: #fff; border: none;
  border-radius: 999px; padding: 13px; font-weight: 700; font-size: 1rem;
}
.post-cta:hover { background: var(--green-hover); }
.dash-nav-foot { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.dash-nav-foot a { color: var(--text-muted); font-size: 0.92rem; }
.dash-nav-foot a:hover { color: var(--text); }

/* Center */
.dash-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.card { background: var(--bg-elev); border: 1px solid rgba(255,255,255,0.06); border-radius: var(--radius); }

.like-banner {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  z-index: 30;
  background: rgba(38, 38, 38, 0.72);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 44px 16px 18px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  transition: opacity .3s ease;
}
.like-banner-text { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--text); margin-bottom: 12px; }
.like-hearts { display: flex; gap: 14px; }
.like-hearts svg { color: var(--text-dim); transition: color .2s ease, transform .2s ease; }
.like-hearts svg.filled { color: var(--cardigan-red); transform: scale(1.1); }
.like-banner-close { position: absolute; top: 12px; right: 12px; background: none; border: none; color: var(--text-dim); font-size: 1.4rem; line-height: 1; }
.like-banner-close:hover { color: var(--text); }

.feed-tabs { display: flex; gap: 10px; }
.feed-tab {
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-muted); border-radius: 999px; padding: 8px 18px;
  font-weight: 600; font-size: 0.9rem;
}
.feed-tab:hover { color: var(--text); }
.feed-tab.active { background: var(--surface-2); color: var(--text); border-color: var(--text-dim); }

.composer { display: flex; gap: 12px; padding: 16px; }
.composer[hidden] { display: none; }
.composer-body { flex: 1; display: flex; flex-direction: column; gap: 12px; }
.composer-body textarea {
  width: 100%; resize: vertical; min-height: 60px;
  background: transparent; border: none; outline: none;
  color: var(--text); font-size: 1.02rem; font-family: inherit;
}
.composer-body textarea::placeholder { color: var(--text-dim); }
.composer-actions { display: flex; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 12px; }
.composer-actions button { background: var(--surface); border: 1px solid var(--border); color: var(--text-muted); border-radius: 8px; padding: 8px 12px; font-size: 0.85rem; font-weight: 600; }
.composer-actions button:hover { color: var(--text); border-color: var(--green-soft); }
.composer-cancel { margin-left: auto; }

.feed-list { display: flex; flex-direction: column; gap: 16px; }
.post { padding: 16px 18px; }
.post-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.post-head .menu { margin-left: auto; background: none; border: none; color: var(--text-dim); font-size: 1.3rem; padding: 4px 8px; border-radius: 8px; }
.post-head .menu:hover { background: var(--surface); color: var(--text); }
.post-author { font-weight: 700; font-size: 0.95rem; }
.post-id { min-width: 0; }
.post-meta { color: var(--text-dim); font-size: 0.8rem; }
.post-meta .globe { vertical-align: -2px; color: var(--text-dim); margin-left: 2px; }
.partner-badge { color: var(--text-dim); font-weight: 600; }
.see-more { background: none; border: none; color: var(--text); font-weight: 700; font-size: 0.95rem; padding: 0; }
.see-more:hover { text-decoration: underline; }
.post-body { color: var(--text); font-size: 0.98rem; line-height: 1.55; margin-bottom: 12px; }
.post-media { border-radius: 10px; overflow: hidden; margin-bottom: 12px; }
.post-media svg { width: 100%; height: 260px; display: block; }
.post-foot { display: flex; align-items: center; gap: 10px; }
.post-foot button { display: inline-flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border); color: var(--text-muted); font-size: 0.9rem; font-weight: 600; padding: 8px 16px; border-radius: 999px; }
.post-foot button:hover { background: var(--surface-2); color: var(--text); }
.post-foot button.liked { color: var(--cardigan-red); border-color: var(--cardigan-red); }
.share-btn { margin-left: auto; width: 42px; height: 42px; padding: 0; justify-content: center; border-radius: 50%; }

/* Right rail */
.dash-side { position: sticky; top: calc(var(--header-h) + 20px); display: flex; flex-direction: column; gap: 16px; }
.hood-card { padding: 18px; }
.hood-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.hood-pin { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--surface); color: var(--grass-green); }
.hood-name { font-weight: 700; font-size: 1.05rem; }
.hood-sub { color: var(--text-dim); font-size: 0.85rem; }
.side-link { display: flex; align-items: center; gap: 6px; color: var(--text); font-weight: 600; font-size: 0.92rem; border-top: 1px solid var(--border); padding-top: 14px; }
.side-link svg { color: var(--text-dim); }
.side-link:hover { color: var(--grass-green); }

.biz-card { overflow: hidden; }
.biz-art svg { width: 100%; height: 150px; }
.biz-body { padding: 16px 18px 8px; }
.biz-body h4 { font-size: 1.05rem; margin-bottom: 8px; }
.biz-body p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.5; }
.biz-card .side-link { margin: 0 18px; padding: 14px 0; }

.chats-dock {
  position: fixed; right: 20px; bottom: 0; z-index: 70;
  width: 340px; max-width: calc(100vw - 40px);
  padding: 0; overflow: hidden;
  border-radius: 14px 14px 0 0;
  border: 1px solid var(--border); border-bottom: none;
  background: var(--surface-2);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
.chats-dock-body { min-height: 480px; max-height: min(80vh, 700px); overflow-y: auto; }
.chats-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; font-weight: 700; border-bottom: 1px solid var(--border); }
.chats-tools { display: flex; gap: 12px; color: var(--text-dim); }
.chats-tool { background: none; border: none; color: var(--text-dim); cursor: pointer; display: inline-flex; padding: 2px; line-height: 0; }
.chats-tool:hover { color: var(--text); }
.chats-dock.collapsed .chats-head { border-bottom: none; }
.chats-dock.collapsed .chats-dock-body { display: none; }
.chats-dock.collapsed #chatsDockToggle svg { transform: rotate(180deg); }
.chats-dock-tabs { display: flex; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.chats-dock-list { list-style: none; display: flex; flex-direction: column; }
.dock-item { display: flex; gap: 10px; align-items: center; padding: 12px 16px; cursor: pointer; }
.dock-item:hover { background: var(--surface); }
.dock-item .avatar { width: 36px; height: 36px; flex: 0 0 auto; }
.dock-item-body { min-width: 0; }
.dock-item-name { font-weight: 700; font-size: 0.92rem; }
.dock-item-preview { color: var(--text-dim); font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chats-empty { padding: 18px; color: var(--text-dim); font-size: 0.9rem; }

/* ---------- Chat dock inline thread ---------- */
.dock-thread { display: flex; flex-direction: column; height: min(80vh, 700px); }
.dock-thread-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.dock-thread-head .avatar { width: 34px; height: 34px; flex: 0 0 auto; }
.dock-back { background: none; border: none; color: var(--text-dim); font-size: 1.6rem; line-height: 1; cursor: pointer; padding: 0 4px; }
.dock-back:hover { color: var(--text); }
.dock-thread-id { min-width: 0; }
.dock-thread-name { font-weight: 700; font-size: 0.95rem; }
.dock-thread-sub { color: var(--text-dim); font-size: 0.8rem; }
.dock-thread-scroll { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.dock-msg { max-width: 82%; padding: 8px 12px; border-radius: 14px; font-size: 0.9rem; line-height: 1.4; align-self: flex-start; }
.dock-msg.them { background: var(--surface); border: 1px solid var(--border); }
.dock-msg.me { align-self: flex-end; background: var(--grass-green); color: #fff; }
.dock-msg-time { display: block; margin-top: 4px; font-size: 0.7rem; color: var(--text-dim); }
.dock-msg.me .dock-msg-time { color: rgba(255, 255, 255, 0.75); }
.dock-thread-input { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border); }
.dock-thread-input input { flex: 1; min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 9px 14px; color: var(--text); font-size: 0.9rem; outline: none; }
.dock-send { background: var(--grass-green); border: none; color: #fff; width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: 0 0 auto; line-height: 0; }
.dock-send:hover { filter: brightness(1.08); }

/* ---------- Onboarding modal ---------- */
.onboard-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.onboard-overlay[hidden] { display: none; }
.onboard-modal {
  position: relative;
  width: 100%; max-width: 520px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px 28px;
  box-shadow: var(--shadow);
  animation: pop .18s ease;
}
@keyframes pop { from { transform: translateY(10px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.onboard-close { position: absolute; top: 14px; right: 16px; background: none; border: none; color: var(--text-dim); font-size: 1.6rem; line-height: 1; }
.onboard-close:hover { color: var(--text); }
.onboard-steps { display: flex; gap: 6px; margin-bottom: 18px; }
.onboard-steps i { height: 4px; flex: 1; border-radius: 4px; background: var(--border); }
.onboard-steps i.done { background: var(--green); }
.onboard-steps i.current { background: var(--green-soft); }
.onboard-title { font-size: 1.5rem; font-weight: 700; line-height: 1.3; margin-bottom: 20px; }
.onboard-fields { display: flex; flex-direction: column; gap: 12px; }
.onboard-field input, .onboard-field select {
  width: 100%; background: transparent; border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 16px; color: var(--text); font-size: 1rem;
  font-family: inherit; -webkit-appearance: none; appearance: none;
}
.onboard-field select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23b7b7b2' stroke-width='2'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
}
.onboard-field select:invalid, .onboard-field select option[value=""] { color: var(--text-dim); }
.onboard-field select option { background: var(--bg-elev); color: var(--text); }
.onboard-field input::placeholder { color: var(--text-dim); }
.onboard-field input:focus, .onboard-field select:focus { outline: none; border-color: var(--green-soft); }
.onboard-field input.invalid, .onboard-field select.invalid { border-color: var(--cardigan-red); }
.onboard-hint { color: var(--text-dim); font-size: 0.82rem; margin-top: 10px; min-height: 1em; }
.onboard-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 22px; }
.btn-ghost { background: none; color: var(--text); border: none; padding: 10px 22px; }
.btn-ghost:hover { background: var(--surface); }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .app-shell { grid-template-columns: 220px minmax(0, 1fr); }
  .dash-side { display: none; }
  .dash-messages { grid-column: 2 / 3; }
}
@media (max-width: 860px) {
  .app-search { display: none; }
  .app-shell { grid-template-columns: 1fr; padding-top: 16px; }
  .dash-nav { position: static; }
  .dash-nav-list { flex-direction: row; overflow-x: auto; padding-bottom: 6px; }
  .nav-link span { display: none; }
  .nav-link { padding: 10px; }
  .post-cta { display: none; }
  .dash-nav-foot { display: none; }
  .dash-messages { grid-column: 1 / -1; }
  .msgs-card { grid-template-columns: 1fr; min-height: 0; }
  .msgs-list-pane { border-right: none; border-bottom: 1px solid var(--border); }
  .msgs-detail-pane { min-height: 380px; }
}

/* ============================================================
   MESSAGES / CHATS VIEW
   ============================================================ */
.dash-messages { grid-column: 2 / 4; }
.msgs-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.msgs-title { font-size: 1.6rem; font-weight: 800; }
.new-msg-btn svg { margin-right: 6px; vertical-align: -3px; }

.msgs-card { display: grid; grid-template-columns: 1fr 1fr; min-height: 640px; padding: 0; overflow: hidden; }
.msgs-list-pane { border-right: 1px solid var(--border); padding: 18px; min-width: 0; }
.msgs-filters { display: flex; gap: 8px; margin-bottom: 14px; }
.msg-filter { border: 1px solid var(--border); background: transparent; color: var(--text-muted); padding: 6px 16px; border-radius: 8px; font-weight: 600; font-size: 0.9rem; cursor: pointer; }
.msg-filter.active { background: var(--surface); color: var(--text); border-color: var(--text-muted); }

.msgs-list { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.msg-item { display: flex; gap: 12px; align-items: center; padding: 10px 8px; border-radius: 10px; cursor: pointer; }
.msg-item:hover { background: var(--surface); }
.msg-item.active { background: var(--surface); }
.msg-item .avatar { flex: none; }
.msg-item-body { min-width: 0; }
.msg-item-name { font-weight: 700; }
.msg-item-preview { color: var(--text-dim); font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msgs-list-empty { color: var(--text-dim); padding: 16px 8px; font-size: 0.92rem; }

.msgs-detail-pane { display: flex; align-items: center; justify-content: center; padding: 30px; min-width: 0; }
.msgs-empty { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.msgs-art { color: #5b7fa6; width: 260px; max-width: 82%; height: auto; }
.msgs-empty-title { font-size: 1.5rem; font-weight: 800; color: var(--text); }

/* Thread view */
.msg-thread { display: flex; flex-direction: column; width: 100%; height: 100%; min-height: 560px; }
.msg-thread-head { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.msg-thread-head .back-btn { display: none; background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 4px; }
.msg-thread-name { font-weight: 700; }
.msg-thread-scroll { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 16px 4px; }
.msg-bubble { max-width: 74%; padding: 10px 14px; border-radius: 16px; font-size: 0.94rem; line-height: 1.35; word-break: break-word; }
.msg-bubble.them { align-self: flex-start; background: var(--surface); color: var(--text); border-bottom-left-radius: 5px; }
.msg-bubble.me { align-self: flex-end; background: var(--green); color: #fff; border-bottom-right-radius: 5px; }
.msg-bubble .msg-time { display: block; font-size: 0.7rem; opacity: 0.6; margin-top: 4px; }
.msg-thread-input { display: flex; gap: 10px; padding-top: 12px; border-top: 1px solid var(--border); }
.msg-thread-input input { flex: 1; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 11px 16px; color: var(--text); font: inherit; }
.msg-thread-input input:focus { outline: none; border-color: var(--green); }
@media (max-width: 860px) { .msg-thread-head .back-btn { display: inline-flex; } }

/* New message compose modal */
.msg-compose-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); display: flex; align-items: center; justify-content: center; z-index: 90; padding: 20px; }
.msg-compose-overlay[hidden] { display: none; }
.msg-compose { width: 100%; max-width: 440px; padding: 22px; position: relative; }
.msg-compose-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.msg-compose-head h3 { font-size: 1.2rem; font-weight: 800; }
.msg-compose-label { display: block; font-size: 0.82rem; color: var(--text-dim); margin: 12px 0 6px; font-weight: 600; }
.msg-compose-input { width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; color: var(--text); font: inherit; }
.msg-compose-input:focus { outline: none; border-color: var(--green); }
.msg-compose-text { resize: vertical; min-height: 90px; }
.msg-compose-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.msg-compose .invalid { border-color: var(--cardigan-red); }

/* ============================================================
   ALERTS / NOTIFICATIONS VIEW
   ============================================================ */
.alerts-view { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.alerts-view[hidden] { display: none; }
.alerts-tabs { display: flex; gap: 10px; flex-wrap: wrap; }
.alert-tab {
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-muted); border-radius: 999px; padding: 8px 18px;
  font-weight: 600; font-size: 0.9rem; cursor: pointer;
}
.alert-tab:hover { color: var(--text); }
.alert-tab.active { background: var(--surface-2); color: var(--text); border-color: var(--text-dim); }

.alerts-card { padding: 6px 0; overflow: hidden; }
.alerts-group { font-size: 1.05rem; font-weight: 800; padding: 14px 20px 8px; color: var(--text); }
.alert-item { display: flex; align-items: center; gap: 14px; padding: 14px 20px; cursor: pointer; }
.alert-item:hover { background: var(--surface); }
.alert-avatar { width: 44px; height: 44px; font-size: 1.05rem; }
.alert-text {
  flex: 1; min-width: 0; margin: 0; color: var(--text); font-size: 0.98rem; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.alert-text strong { font-weight: 700; }
.alert-thumb { flex: 0 0 auto; display: inline-flex; border-radius: 7px; overflow: hidden; line-height: 0; }
.alert-time { flex: 0 0 auto; color: var(--text-dim); font-size: 0.85rem; min-width: 26px; text-align: right; }

.alerts-empty { text-align: center; padding: 120px 20px; color: var(--text); }
.alerts-empty-title { font-size: 1.5rem; font-weight: 800; }
.alerts-empty-sub { color: var(--text-dim); font-size: 1.05rem; margin-top: 6px; }

@media (max-width: 560px) {
  .alert-thumb { display: none; }
  .alert-item { padding: 12px 14px; }
}

/* ============================================================
   FIXED VIEWPORT — only the center column scrolls (desktop)
   ============================================================ */
@media (min-width: 861px) {
  .app-body { height: 100vh; overflow: hidden; display: flex; flex-direction: column; }
  .app-shell { flex: 1 1 auto; min-height: 0; overflow: hidden; align-items: stretch; padding-bottom: 0; }
  .dash-nav { position: relative; top: auto; min-height: 0; overflow-y: auto; }
  .dash-main { min-height: 0; overflow-y: auto; }
  .dash-side { position: relative; top: auto; min-height: 0; overflow-y: auto; }
  .like-banner { top: 0; }
  .dash-messages { min-height: 0; overflow: hidden; }
  .msgs-card { height: 100%; min-height: 0; }
  .msgs-list-pane, .msgs-detail-pane { overflow-y: auto; }
}

/* Hide scrollbars everywhere but keep scrolling */
.dash-nav, .dash-main, .dash-side, .dash-messages,
.msgs-list-pane, .msgs-detail-pane, .msg-thread-scroll, .alerts-card {
  scrollbar-width: none;         /* Firefox */
  -ms-overflow-style: none;      /* IE/legacy Edge */
}
.dash-nav::-webkit-scrollbar, .dash-main::-webkit-scrollbar, .dash-side::-webkit-scrollbar,
.dash-messages::-webkit-scrollbar, .msgs-list-pane::-webkit-scrollbar, .msgs-detail-pane::-webkit-scrollbar,
.msg-thread-scroll::-webkit-scrollbar, .alerts-card::-webkit-scrollbar {
  width: 0; height: 0; display: none;  /* Chrome/Safari/Opera */
}

/* ============================================================
   POST DETAIL MODAL + FIRST-RUN FEATURE TOUR
   ============================================================ */
.post-modal-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); display: flex; align-items: center; justify-content: center; z-index: 95; padding: 40px 16px; }
.post-modal-overlay[hidden] { display: none; }
.post-modal-wrap { position: relative; width: 100%; max-width: 640px; display: flex; }
.pm-close { position: absolute; top: -14px; right: -14px; width: 42px; height: 42px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; z-index: 3; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5); }
.pm-close:hover { background: var(--surface); }
.post-modal { width: 100%; max-height: 86vh; display: flex; flex-direction: column; overflow: hidden; border-radius: 16px; }
#postModalBody { display: flex; flex-direction: column; min-height: 0; }
.pm-scroll { overflow-y: auto; padding: 4px 24px 8px; flex: 1; min-height: 0; }

.pm-head { display: flex; align-items: center; gap: 12px; padding-top: 16px; }
.pm-head .avatar { width: 44px; height: 44px; font-size: 1.1rem; flex: 0 0 auto; }
.pm-head-main { flex: 1; min-width: 0; }
.pm-name { font-weight: 700; font-size: 1rem; color: var(--text); }
.pm-meta { color: var(--text-dim); font-size: 0.85rem; margin-top: 2px; }
.pm-meta .globe { vertical-align: -2px; margin-left: 2px; }
.pm-menu { background: none; border: none; color: var(--text-dim); font-size: 1.3rem; line-height: 1; padding: 4px 8px; border-radius: 8px; cursor: pointer; }
.pm-menu:hover { background: var(--surface); color: var(--text); }
.pm-body { font-size: 1.12rem; line-height: 1.5; color: var(--text); margin: 16px 0 6px; }
.pm-media { border-radius: 12px; overflow: hidden; margin: 12px 0; }
.pm-media svg { width: 100%; height: 260px; display: block; }

.pm-actions { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 6px 0; margin: 14px 0; }
.pm-actions button { display: inline-flex; align-items: center; gap: 9px; background: none; border: none; color: var(--text-muted); font-weight: 600; font-size: 0.95rem; cursor: pointer; padding: 10px 16px; border-radius: 10px; }
.pm-actions button:hover { background: var(--surface); color: var(--text); }
.pm-actions .liked { color: var(--cardigan-red); }

.pm-comments { padding: 6px 0 4px; }
.pm-comments-head { display: flex; align-items: center; justify-content: space-between; color: var(--text-muted); font-size: 0.9rem; margin-bottom: 6px; }
.pm-sort { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 600; }
.pm-comment-list { list-style: none; }
.pm-comment { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.pm-comment:last-child { border-bottom: none; }
.pm-comment .avatar { width: 34px; height: 34px; flex: 0 0 auto; margin-top: 2px; }
.pm-c-main { flex: 1; min-width: 0; }
.pm-c-head { display: flex; align-items: baseline; gap: 8px; }
.pm-c-author { font-weight: 700; font-size: 0.95rem; color: var(--text); }
.pm-c-meta { color: var(--text-dim); font-size: 0.82rem; }
.pm-c-head .pm-menu { margin-left: auto; align-self: center; }
.pm-c-text { color: var(--text); font-size: 1rem; line-height: 1.45; margin: 4px 0 10px; }
.pm-c-actions { display: flex; gap: 22px; }
.pm-c-actions button { display: inline-flex; align-items: center; gap: 7px; background: none; border: none; color: var(--text-muted); font-size: 0.88rem; font-weight: 600; cursor: pointer; padding: 0; }
.pm-c-actions button:hover { color: var(--text); }

.pm-chips-row { display: flex; align-items: center; gap: 8px; padding: 14px 0 6px; }
.pm-chips { display: flex; gap: 8px; overflow-x: auto; flex: 1; }
.pm-chip { white-space: nowrap; background: var(--surface); border: 1px solid var(--border); color: var(--text); border-radius: 10px; padding: 10px 16px; font-size: 0.9rem; cursor: pointer; }
.pm-chip:hover { border-color: var(--green-soft); }
.pm-chips-more { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); color: var(--text-muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.pm-chips-more:hover { color: var(--text); }

.pm-composer { display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--border); padding: 14px 24px; }
.pm-composer .avatar { width: 34px; height: 34px; flex: 0 0 auto; }
.pm-input-wrap { flex: 1; position: relative; }
.pm-input-wrap input { width: 100%; background: transparent; border: 1px solid var(--border); border-radius: 999px; padding: 11px 50px 11px 18px; color: var(--text); font: inherit; }
.pm-input-wrap input:focus { outline: none; border-color: var(--green-soft); }
.pm-send { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 50%; background: none; border: none; color: var(--text-dim); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.pm-send:hover { color: var(--text); }
.pm-tools { display: flex; gap: 4px; }
.pm-tool { background: none; border: none; color: var(--text-muted); width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.pm-tool:hover { background: var(--surface); color: var(--text); }

.pm-scroll, .pm-chips { scrollbar-width: none; -ms-overflow-style: none; }
.pm-scroll::-webkit-scrollbar, .pm-chips::-webkit-scrollbar { width: 0; height: 0; display: none; }

/* Feature tour */
.tour-highlight { outline: 2px solid var(--grass-green); outline-offset: 4px; border-radius: 12px; }
.tour-tip { position: fixed; z-index: 110; max-width: 330px; background: var(--bg-elev); border: 1px solid var(--grass-green); border-radius: 14px; padding: 16px 18px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5); }
.tour-tip[hidden] { display: none; }
.tour-tip-x { position: absolute; top: 4px; right: 8px; background: none; border: none; color: var(--text-dim); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.tour-tip-x:hover { color: var(--text); }
.tour-tip-title { font-weight: 800; font-size: 1.02rem; margin: 0 0 6px; padding-right: 18px; color: var(--text); }
.tour-tip-text { color: var(--text-muted); font-size: 0.9rem; line-height: 1.45; margin: 0 0 14px; }
.tour-tip-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tour-tip-dots { display: flex; gap: 5px; }
.tour-tip-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--border); }
.tour-tip-dots i.on { background: var(--grass-green); }
