/* ==========================================================================
   THE TRUST SPACE — Social Community App
   Warm & Vibrant · Mobile-first · Social media feel
   Author: Sadik Mohamud
   ========================================================================== */

/* --- Variable Fonts (self-hosted) --------------------------------------- */

@font-face {
  font-family: "Geist";
  src: url("../fonts/GeistVF.b39676298197.woff2") format("woff2 supports variations"),
       url("../fonts/GeistVF.b39676298197.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/GeistMonoVF.8383036bed6b.woff2") format("woff2 supports variations"),
       url("../fonts/GeistMonoVF.8383036bed6b.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* --- Design Tokens ------------------------------------------------------- */

:root {
  /* Palette */
  --bg: #f0f2f5;
  --bg-soft: #f0f2f5;
  --card: #ffffff;
  --panel: #ffffff;
  --foreground: #1c1e21;
  --text: #1c1e21;
  --muted: #65676b;
  --muted-soft: #f0f2f5;
  --border: #e4e6eb;

  /* Brand */
  --accent: #7c3aed;
  --accent-foreground: #ffffff;
  --accent-soft: #f3e8ff;
  --orange: #f97316;
  --orange-soft: #fff7ed;
  --pink: #ec4899;
  --green: #10b981;
  --green-soft: #ecfdf5;

  /* Fonts */
  --font-heading: "Geist", "SF Pro Display", system-ui, sans-serif;
  --font-body: "Geist", "SF Pro Display", system-ui, sans-serif;
  --font-mono: "Geist Mono", "SF Mono", Menlo, monospace;

  /* Border radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Shadows — clean, subtle */
  --shadow-card: 0 1px 2px rgba(0,0,0,.1);
  --shadow-hover: 0 4px 12px rgba(0,0,0,.12);
  --shadow-pop: 0 4px 16px rgba(0,0,0,.14);
  --shadow-btn: 0 1px 4px rgba(0,0,0,.18);

  /* Layout */
  --container-width: 640px;
  --container-wide: 1100px;
  --transition: all 0.18s ease;
  --transition-bounce: all 0.18s ease;
  --nav-height: 80px;
  --topbar-height: 56px;
}

/* --- Reset & Base -------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.9375rem;
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

/* --- Ambient layer (hidden) --------------------------------------------- */
.ambient-video-layer,
.ambient-video,
.ambient-fallback-bubbles,
.ambient-glass-overlay {
  display: none;
}

body.nav-hidden .bottom-nav {
  transform: translateY(120%);
}

/* --- Base elements ------------------------------------------------------- */

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.75rem;
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--foreground);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.25rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.75rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; font-weight: 600; }
h5, h6 { font-size: 0.95rem; font-weight: 600; }

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

/* --- Layout ------------------------------------------------------------- */

.container {
  width: min(var(--container-width), calc(100% - 1.25rem));
  margin: 0 auto;
}

.container-wide {
  width: min(var(--container-wide), calc(100% - 1.25rem));
  margin-inline: auto;
}

.app-shell {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  overflow-x: hidden;
}

.app-main {
  padding-top: 0.75rem;
  padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom) + 1.5rem);
}

/* ==========================================================================
   TOP BAR
   ========================================================================== */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  min-height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--accent);
  letter-spacing: -0.3px;
}

.site-brand strong::after {
  display: none;
}

.topbar-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0.45rem 1.1rem;
  background: var(--accent);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-bounce);
  text-decoration: none;
  box-shadow: var(--shadow-btn);
}

.topbar-chip:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-pop);
}

.topbar-chip:focus-visible {
  outline: 3px solid var(--accent-soft);
  outline-offset: 2px;
}

.topbar-auth-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.inline-auth-form {
  margin: 0;
}

.inline-auth-form .topbar-chip {
  cursor: pointer;
}

/* ==========================================================================
   BOTTOM NAV — Instagram-style
   ========================================================================== */

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 0.5rem 0.5rem max(0.5rem, env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.97);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(16px);
  transition: transform 0.25s ease;
}

.bottom-nav-link {
  position: relative;
  display: flex;
  min-height: 52px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.35rem 0.25rem;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.bottom-nav-form { margin: 0; }

.bottom-nav-button {
  width: 100%;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.bottom-nav-link:hover {
  background: var(--muted-soft);
}

.bottom-nav-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-md);
}

.bottom-nav-link.is-active {
  color: var(--accent);
}

.bottom-nav-link.is-active .bottom-nav-label {
  color: var(--accent);
  font-weight: 700;
}

.bottom-nav-link.is-active .bottom-nav-icon img {
  filter: none;
}

.bottom-nav-icon {
  font-size: 1.1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: color 0.15s ease;
}

/* SVG icons in bottom nav */
.bottom-nav-icon svg {
  display: block;
}

/* Legacy PNG icons */
.bottom-nav-icon img {
  width: 1.25rem;
  height: 1.25rem;
  object-fit: contain;
  opacity: 0.45;
  transition: opacity 0.15s ease;
}

.bottom-nav-link.is-active .bottom-nav-icon {
  color: var(--accent);
}

.bottom-nav-link.is-active .bottom-nav-icon img {
  opacity: 1;
  filter: invert(27%) sepia(97%) saturate(1200%) hue-rotate(250deg) brightness(80%);
}

.bottom-nav-label {
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1;
  color: var(--muted);
}

.bottom-nav-link.is-active .bottom-nav-label {
  color: var(--accent);
  font-weight: 700;
}

/* ==========================================================================
   HERO GRADIENT — Home page welcome
   ========================================================================== */

.hero-gradient {
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 40%, #f97316 100%);
  padding: clamp(2rem, 6vw, 3.5rem) 1.25rem clamp(2.5rem, 7vw, 4rem);
  color: #ffffff;
  overflow: hidden;
  position: relative;
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
  max-width: 100%;
}

.hero-gradient::before {
  content: "";
  position: absolute;
  top: -4rem;
  right: -4rem;
  width: 20rem;
  height: 20rem;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 50%;
}

.hero-gradient::after {
  content: "";
  position: absolute;
  bottom: -6rem;
  left: -3rem;
  width: 18rem;
  height: 18rem;
  background: rgba(249, 115, 22, 0.18);
  border-radius: 50%;
}

.hero-gradient .container {
  position: relative;
  z-index: 1;
}

.hero-gradient .hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 0.3rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-bottom: 1.25rem;
}

.hero-gradient .display-heading {
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  color: #ffffff;
  margin: 0 0 1rem;
}

.hero-gradient .hero-body {
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.88);
  max-width: 480px;
  margin: 0 0 2rem;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.hero-gradient .button {
  background: #ffffff;
  color: var(--accent);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.hero-gradient .button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.hero-gradient .button.secondary {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  box-shadow: none;
}

.hero-gradient .button.secondary:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   LAYOUT / SECTIONS
   ========================================================================== */

.hero {
  position: relative;
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 1.25rem;
  margin-top: 1rem;
  box-shadow: var(--shadow-card);
}

.panel {
  position: relative;
  background: var(--card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 1rem;
  box-shadow: var(--shadow-card);
}

.grid {
  display: grid;
  gap: 1rem;
}

.grid-3 {
  grid-template-columns: 1fr;
}

/* Home quick-links grid */
.home-quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .65rem;
}
.home-quick-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  padding: .85rem .5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--foreground);
  text-align: center;
  transition: box-shadow .15s ease;
}
.home-quick-card:hover { box-shadow: var(--shadow-hover); }
.home-quick-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: .1rem;
}
.home-quick-label { font-weight: 700; font-size: .88rem; }
.home-quick-sub { font-size: .75rem; color: var(--muted); line-height: 1.2; }

.stack {
  display: grid;
  gap: 1rem;
}

/* --- Social-media style post cards -------------------------------------- */

.card {
  position: relative;
  padding: 1rem;
  background: var(--card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  color: var(--text);
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}

.card.is-pressing {
  transform: scale(0.995);
}

.card h2 a,
.card h3 a {
  text-decoration: none;
}

.card a:not(.button):not(.btn) {
  font-weight: 600;
  color: var(--accent);
}

.card a:not(.button):not(.btn):hover {
  text-decoration: underline;
}

/* ==========================================================================
   BADGES
   ========================================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  width: fit-content;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
}

.badge-warning {
  background: var(--orange-soft);
  color: var(--orange);
}

.badge-success {
  background: var(--green-soft);
  color: var(--green);
}

.muted {
  color: var(--muted);
}

.list-clean {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.65rem 1.35rem;
  border: none;
  border-radius: var(--radius-full);
  background: var(--accent);
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-bounce);
  text-decoration: none;
  white-space: nowrap;
  box-shadow: var(--shadow-btn);
}

.button:hover,
.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-pop);
}

.button:active,
.btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-btn);
}

.button:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--accent-soft);
  outline-offset: 2px;
}

/* Secondary — outlined */
.button.secondary,
.btn.secondary {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
  box-shadow: none;
}

.button.secondary:hover,
.btn.secondary:hover {
  background: var(--accent-soft);
  box-shadow: none;
  transform: translateY(-1px);
}

/* Liked state — warm pink */
.button.is-liked {
  background: #fdf2f8;
  color: var(--pink);
  border: 1.5px solid #fbcfe8;
  box-shadow: none;
}

.button.is-loading {
  opacity: 0.7;
  pointer-events: none;
}

/* Ghost — for action buttons in feed */
.button.ghost,
.btn.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  box-shadow: none;
  font-weight: 500;
}

.button.ghost:hover,
.btn.ghost:hover {
  background: var(--muted-soft);
  color: var(--accent);
  transform: translateY(-1px);
}

/* ==========================================================================
   FEED — Social media style
   ========================================================================== */

.feed-stream {
  display: grid;
  gap: 1rem;
}

.feed-post-card {
  padding: 1rem 1.1rem;
  border-radius: var(--radius-md);
}

.feed-post-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.feed-post-author-meta {
  display: grid;
  gap: 0.2rem;
}

.feed-post-author-meta h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--foreground);
}

.feed-post-body {
  margin: 0 0 0.85rem;
  font-size: 0.97rem;
  line-height: 1.65;
  color: var(--text);
}

.feed-post-image {
  border-radius: var(--radius-md);
  border: none;
  width: 100%;
  margin-top: 0;
  margin-bottom: 0.75rem;
  max-height: 420px;
  object-fit: cover;
}

.feed-post-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0;
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.feed-post-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.feed-post-actions .button {
  flex: 1;
  min-height: 38px;
  font-size: 0.88rem;
  padding: 0.45rem 0.75rem;
}

.feed-delete-form { margin: 0; }
.feed-delete-form .button { width: 100%; }
.booking-delete-form { margin: 0; }
.booking-delete-form .button { width: 100%; }

/* ==========================================================================
   FORMS
   ========================================================================== */

.form-row {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--foreground);
}

input,
select,
textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: #ffffff;
  color: var(--foreground);
  border: 1.5px solid #e5e7eb;
  border-radius: var(--radius-md);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  appearance: none;
  font-size: 0.97rem;
}

input::placeholder,
textarea::placeholder {
  color: var(--muted);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.file-upload-input {
  padding: 0.35rem;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.file-upload-input:focus { outline: none; box-shadow: none; }

.file-upload-input::file-selector-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0.5rem 1.1rem;
  border: none;
  border-radius: var(--radius-full);
  background: var(--accent);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: var(--transition-bounce);
  margin-right: 0.75rem;
  box-shadow: var(--shadow-btn);
}

.file-upload-input::-webkit-file-upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0.5rem 1.1rem;
  border: none;
  border-radius: var(--radius-full);
  background: var(--accent);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: var(--transition-bounce);
  margin-right: 0.75rem;
  box-shadow: var(--shadow-btn);
}

.file-upload-input:hover::file-selector-button,
.file-upload-input:hover::-webkit-file-upload-button {
  transform: translateY(-1px);
  box-shadow: var(--shadow-pop);
}

/* --- Comments / replies ------------------------------------------------- */

.reply-thread {
  border-left: 3px solid var(--accent-soft);
  padding-left: 0.85rem;
}

.reply-card {
  background: var(--muted-soft);
}

.mention-dropdown {
  position: absolute;
  z-index: 120;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-pop);
  max-height: 220px;
  overflow-y: auto;
  padding: 0.25rem;
}

.mention-item {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.6rem;
  display: grid;
  gap: 0.1rem;
  cursor: pointer;
  transition: background 0.12s ease;
}

.mention-item:hover,
.mention-item.is-active {
  background: var(--muted-soft);
}

.mention-user {
  font-weight: 700;
  color: var(--foreground);
}

.mention-meta {
  font-size: 0.8rem;
  color: var(--muted);
}

.mention-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.mention-link:hover { text-decoration: underline; }

/* ==========================================================================
   SOCIAL FEED — Post avatars, create box, action buttons
   ========================================================================== */

/* Author avatar circle on posts */
.post-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.post-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-avatar-sm {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

/* Facebook-style create post box */
.create-post-box {
  padding: 0.85rem 1rem 0;
  margin-bottom: 1rem;
}

.create-post-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.create-post-input {
  flex: 1;
  padding: 0.65rem 1rem;
  background: var(--muted-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 400;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
  display: block;
}

.create-post-input:hover {
  background: #ede9fe;
  border-color: var(--accent);
  color: var(--accent);
}

.create-post-divider {
  height: 1px;
  background: var(--border);
  margin: 0.75rem 0 0;
}

.create-post-actions {
  display: flex;
  padding: 0.25rem 0 0.25rem;
}

.create-post-action {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 0.5rem;
  border-radius: var(--radius-md);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.create-post-action:hover {
  background: var(--muted-soft);
  color: var(--accent);
}

/* Feed post head with avatar */
.feed-post-head {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin-bottom: 0.65rem;
}

.feed-post-author-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.feed-post-author-meta h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--foreground);
  line-height: 1.3;
}

.feed-post-author-meta h3 a {
  color: inherit;
  font-weight: 700;
}

.feed-post-author-meta h3 a:hover {
  color: var(--accent);
}

/* Facebook-style action bar */
.feed-post-actions {
  display: flex;
  gap: 0;
  margin-top: 0.25rem;
  padding-top: 0.25rem;
  border-top: 1px solid var(--border);
}

.feed-post-actions .button {
  flex: 1;
  min-height: 36px;
  font-size: 0.88rem;
  padding: 0.4rem 0.5rem;
  background: transparent;
  color: var(--muted);
  border: none;
  border-radius: var(--radius-md);
  box-shadow: none;
  font-weight: 600;
  gap: 0.4rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.feed-post-actions .button:hover {
  background: var(--muted-soft);
  color: var(--accent);
  transform: none;
  box-shadow: none;
}

.feed-post-actions .button.is-liked {
  color: var(--pink);
  background: #fdf2f8;
}

/* ==========================================================================
   BOOKINGS
   ========================================================================== */

.my-booking-card { position: relative; }

.booking-play-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.booking-play-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #ffffff;
  padding: 0.7rem 0.8rem;
}

.booking-play-item:nth-child(1),
.booking-play-item:nth-child(2),
.booking-play-item:nth-child(4),
.booking-play-item:nth-child(5) {
  flex-grow: 1;
}

.booking-play-item:nth-child(3) {
  width: 100%;
  background: var(--muted-soft);
}

.booking-play-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

@media (max-width: 639px) {
  .booking-play-item { width: 100%; }
}

/* --- Share actions ------------------------------------------------------ */

.share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.share-actions .button {
  min-height: 38px;
  padding: 0.45rem 0.9rem;
  font-size: 0.88rem;
}

/* ==========================================================================
   TABLES
   ========================================================================== */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: var(--muted-soft);
}

/* ==========================================================================
   MESSAGES / NOTIFICATIONS
   ========================================================================== */

.messages-section { margin-top: 0.75rem; }

.page-back-row { margin-top: 0.25rem; }

.page-back-button {
  min-height: 38px;
  padding-inline: 0.95rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  transition: color .15s ease;
}
.back-link:hover { color: var(--foreground); }

.message-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 0.75rem 1rem;
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

.app-fade-in {
  animation: appFadeIn 0.3s ease;
}

@keyframes appFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (min-width: 640px) {
  .container {
    width: min(var(--container-width), calc(100% - 2rem));
  }

  .container-wide {
    width: min(var(--container-wide), calc(100% - 2rem));
  }

  .hero { padding: 1.5rem; }

  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bottom-nav {
    left: 50%;
    right: auto;
    bottom: 0;
    width: min(560px, calc(100% - 1.5rem));
    transform: translateX(-50%);
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    border-bottom: none;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  }

  body.nav-hidden .bottom-nav {
    transform: translateX(-50%) translateY(120%);
  }
}

@media (min-width: 900px) {
  .hero { padding: 2rem; }

  .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .card { padding: 1.25rem; }

  .bottom-nav {
    width: min(560px, calc(100% - 2rem));
  }

  .feed-stream {
    width: 100%;
  }
}

/* ==========================================================================
   FACEBOOK-STYLE THREE-COLUMN LAYOUT
   ========================================================================== */

/* --- Topbar — full-width, logo | center tabs | right icons -------------- */

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--topbar-height);
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1rem;
  gap: 0.5rem;
}

/* Center nav tabs — hidden on mobile, shown on tablet+ */
.topbar-nav {
  display: none;
}

.topbar-nav-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  min-height: calc(var(--topbar-height) - 2px);
  padding: 0 0.85rem;
  color: var(--muted);
  border-bottom: 3px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.topbar-nav-tab:hover {
  color: var(--accent);
  background: var(--muted-soft);
}

.topbar-nav-tab.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Right: icon + avatar buttons */
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.topbar-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--muted-soft);
  color: var(--foreground);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.topbar-icon-btn:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.topbar-avatar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9rem;
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  flex-shrink: 0;
  transition: box-shadow 0.15s ease;
}

.topbar-avatar-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.topbar-avatar-btn:hover {
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* --- Three-column grid -------------------------------------------------- */

.app-layout {
  display: grid;
  grid-template-columns: 1fr;
  min-height: calc(100dvh - var(--topbar-height));
  max-width: 1400px;
  margin: 0 auto;
}

/* MAIN FEED COLUMN */
.feed-col {
  width: 100%;
  max-width: 680px;
  margin-inline: auto;
  padding: 0.75rem 0.75rem calc(var(--nav-height) + env(safe-area-inset-bottom) + 1.5rem);
  box-sizing: border-box;
}

/* LEFT SIDEBAR — hidden on mobile */
.left-sidebar {
  display: none;
}

/* RIGHT SIDEBAR — hidden until large desktop */
.right-sidebar {
  display: none;
}

/* --- Sidebar components ------------------------------------------------- */

.sidebar-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--foreground);
  transition: background 0.15s ease;
  margin-bottom: 0.25rem;
}

.sidebar-profile:hover {
  background: var(--muted-soft);
}

.sidebar-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.sidebar-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-profile-info {
  min-width: 0;
}

.sidebar-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-handle {
  font-size: 0.78rem;
  color: var(--muted);
}

.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 0.75rem 0;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--foreground);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: var(--font-body);
  line-height: 1;
}

.sidebar-link:hover {
  background: var(--muted-soft);
  color: var(--accent);
}

.sidebar-link.is-active,
.sidebar-link[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

.sidebar-link-create {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.sidebar-link-create:hover {
  background: var(--accent);
  color: #ffffff;
}

/* Button-as-link (logout) */
.sidebar-link-btn {
  font: inherit;
}

.sidebar-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--muted-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
  color: var(--foreground);
  transition: background 0.15s ease;
}

.sidebar-link:hover .sidebar-icon,
.sidebar-link.is-active .sidebar-icon {
  background: var(--accent-soft);
  color: var(--accent);
}

.sidebar-link-create .sidebar-icon {
  background: var(--accent);
  color: #ffffff;
}

.sidebar-link-create:hover .sidebar-icon {
  background: #ffffff;
  color: var(--accent);
}

/* Right sidebar widget */
.sidebar-widget {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  box-shadow: var(--shadow-card);
}

.sidebar-widget-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 0.65rem;
}

/* --- Tablet+ (768px): left sidebar appears, bottom nav hides ----------- */

@media (min-width: 768px) {
  .app-layout {
    grid-template-columns: 260px 1fr;
    align-items: start;
  }

  .left-sidebar {
    display: flex;
    flex-direction: column;
    position: sticky;
    top: var(--topbar-height);
    height: calc(100dvh - var(--topbar-height));
    overflow-y: auto;
    padding: 0.75rem 0.5rem;
    border-right: 1px solid var(--border);
    background: var(--bg);
    scrollbar-width: none;
  }

  .left-sidebar::-webkit-scrollbar {
    display: none;
  }

  .topbar-nav {
    display: flex;
    align-items: center;
    gap: 0;
    height: var(--topbar-height);
    overflow: hidden;
  }

  /* Hide old bottom nav on tablet+ */
  .bottom-nav {
    display: none;
  }

  /* No bottom-nav padding needed on desktop */
  .feed-col {
    padding-bottom: 2rem;
  }
}

/* --- Large desktop (1200px): right sidebar appears --------------------- */

@media (min-width: 1200px) {
  .app-layout {
    grid-template-columns: 280px 1fr 300px;
  }

  .right-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: sticky;
    top: var(--topbar-height);
    height: calc(100dvh - var(--topbar-height));
    overflow-y: auto;
    padding: 0.75rem 0.5rem;
    border-left: 1px solid var(--border);
    background: var(--bg);
    scrollbar-width: none;
  }

  .right-sidebar::-webkit-scrollbar {
    display: none;
  }
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
