/* ==========================================================================
   TWINISTRY MULTIPLES NETWORK - DESIGN SYSTEM (2026 GLASSMORPHIC AUTH & PROFILE)
   Domain: Twinistry.com | Production-Ready, Glassmorphic & Ultra-Polished
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&family=Outfit:wght@600;700;800&display=swap');

:root[data-theme="dark"] {
  --bg-app: #090b11;
  --bg-sidebar: #0e111a;
  --bg-card: #121622;
  --bg-card-hover: #191e2e;
  --bg-input: #151a28;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.18);
  --glass-border: 1px solid rgba(255, 255, 255, 0.14);

  --primary-accent: #3b82f6;
  --primary-glow: rgba(59, 130, 246, 0.25);
  --accent-green: #10b981;
  --accent-cyan: #06b6d4;
  --accent-violet: #8b5cf6;

  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 10px 30px rgba(59, 130, 246, 0.15);
}

:root[data-theme="light"] {
  --bg-app: #f8fafc;
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-input: #f1f5f9;

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;

  --border-color: #e2e8f0;
  --border-hover: #cbd5e1;
  --glass-border: 1px solid rgba(255, 255, 255, 0.6);

  --primary-accent: #2563eb;
  --primary-glow: rgba(37, 99, 235, 0.15);
  --accent-green: #059669;
  --accent-cyan: #0891b2;
  --accent-violet: #7c3aed;

  --shadow-card: 0 4px 15px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 10px 30px rgba(37, 99, 235, 0.15);
}

/* Base Setup & Custom Scrollbars */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background-color: var(--bg-app);
  color: var(--text-main);
  overflow-x: hidden;
  overscroll-behavior-y: none;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-app);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
  touch-action: manipulation;
  -webkit-overflow-scrolling: touch;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--border-hover);
}

/* 2026 GLASSMORPHIC AUTHENTICATION PORTAL OVERLAY */
.auth-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(9, 11, 17, 0.94);
  backdrop-filter: blur(32px) saturate(190%);
  -webkit-backdrop-filter: blur(32px) saturate(190%);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 24px;
}

.auth-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.auth-card {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.02) 45%, rgba(59, 130, 246, 0.14) 100%),
    rgba(14, 17, 26, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  padding: 44px 38px;
  width: 100%;
  max-width: 430px;
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.65), inset 0 1px 1px rgba(255, 255, 255, 0.3);
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: relative;
  overflow: hidden;
}

:root[data-theme="light"] .auth-card {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 50%, rgba(37, 99, 235, 0.08) 100%),
    rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.auth-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}

.auth-logo-wrapper {
  position: relative;
  display: inline-flex;
  padding: 3px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.6) 0%, rgba(255, 255, 255, 0.2) 100%);
  box-shadow: 0 12px 35px rgba(59, 130, 246, 0.35);
  margin-bottom: 12px;
}

.auth-logo {
  width: 76px;
  height: 76px;
  border-radius: 18px;
  object-fit: cover;
  display: block;
}

.auth-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text-main);
}

.auth-subtitle {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.auth-alert {
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  padding: 11px 16px;
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
}
.auth-alert.hidden { display: none; }

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* App Layout Grid */
.app-layout {
  display: grid;
  grid-template-columns: 260px 1fr 320px;
  min-height: 100vh;
  max-width: 1600px;
  margin: 0 auto;
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
}

/* Left Sidebar Navigation (Desktop) */
.sidebar-left {
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 100;
}

.brand-header {
  margin-bottom: 32px;
}
.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.brand-link:hover {
  transform: translateY(-1px);
}
.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  box-shadow: 0 2px 10px var(--primary-glow);
  flex-shrink: 0;
}
.brand-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  display: block;
  letter-spacing: -0.02em;
}
.brand-tagline {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: block;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-radius: 12px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  width: 100%;
  text-align: left;
}
.nav-svg {
  width: 20px;
  height: 20px;
  transition: stroke 0.15s ease, transform 0.15s ease;
  flex-shrink: 0;
}
.nav-item:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
}
.nav-item:active {
  transform: scale(0.96);
}
.nav-item.active {
  background: rgba(59, 130, 246, 0.12);
  color: var(--primary-accent);
  border-color: rgba(59, 130, 246, 0.2);
}
.nav-item.active .nav-svg {
  stroke: var(--primary-accent);
}

.sidebar-action {
  margin-top: auto;
  margin-bottom: 20px;
}

/* Global Buttons & Interactive State */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.18s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.18s ease, filter 0.18s ease, border-color 0.18s ease;
  border: none;
  color: #ffffff;
  user-select: none;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.btn:active {
  transform: scale(0.96);
  filter: brightness(0.95);
}
.btn-sm {
  padding: 7px 15px;
  font-size: 0.82rem;
  border-radius: 8px;
}
.btn-lg {
  padding: 12px 24px;
  font-size: 0.95rem;
  border-radius: 12px;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary-accent) 0%, #2563eb 100%);
  box-shadow: 0 4px 14px var(--primary-glow);
}
.btn-primary:hover {
  box-shadow: 0 6px 20px var(--primary-glow);
}
.btn-secondary {
  background: var(--bg-card-hover);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}
.btn-secondary:hover {
  border-color: var(--border-hover);
  background: var(--bg-input);
}
.btn-outline {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-color);
}
.btn-outline:hover, .btn-outline.active {
  border-color: var(--primary-accent);
  color: var(--primary-accent);
  background: rgba(59, 130, 246, 0.1);
  box-shadow: 0 2px 10px var(--primary-glow);
}

.sidebar-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}
.user-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px;
  border-radius: 10px;
  transition: background 0.15s ease;
}
.user-mini:hover {
  background: var(--bg-card-hover);
}
.avatar-sm {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.avatar-md {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.avatar-lg {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary-accent);
  box-shadow: 0 0 16px var(--primary-glow);
  flex-shrink: 0;
}
.user-name {
  font-weight: 700;
  font-size: 0.85rem;
}
.user-handle {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.theme-toggle {
  background: var(--bg-card-hover);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.15s ease;
  flex-shrink: 0;
}
.theme-toggle:hover {
  border-color: var(--border-hover);
}
.theme-toggle:active {
  transform: scale(0.96);
}

/* Top Sticky App Header */
.main-content {
  border-right: 1px solid var(--border-color);
  background: var(--bg-app);
  min-width: 0;
}
.app-header {
  position: sticky;
  top: 0;
  background: rgba(9, 11, 17, 0.88);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 90;
  height: 72px;
}
:root[data-theme="light"] .app-header {
  background: rgba(255, 255, 255, 0.9);
}

/* MOBILE HAMBURGER BUTTON */
.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--bg-card-hover);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.15s ease;
  flex-shrink: 0;
}
.mobile-menu-btn:active {
  transform: scale(0.92);
}

.header-title-area {
  min-width: 0;
}
.header-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.header-subtitle {
  font-size: 0.76rem;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
  flex-shrink: 0;
}
.header-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-input);
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  width: 240px;
  height: 40px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.header-search:focus-within {
  border-color: var(--primary-accent);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.header-search input {
  background: transparent;
  border: none;
  color: var(--text-main);
  outline: none;
  font-size: 0.82rem;
  width: 100%;
}

.cart-trigger-btn {
  background: var(--bg-card-hover);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.15s ease, color 0.15s ease;
  flex-shrink: 0;
}
.cart-trigger-btn:hover {
  border-color: var(--primary-accent);
  color: var(--primary-accent);
}
.cart-trigger-btn:active {
  transform: scale(0.96);
}
.cart-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--primary-accent);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-app);
  box-shadow: 0 2px 8px var(--primary-glow);
  z-index: 2;
}

/* View Section & Animations */
@keyframes fadeInView {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.view-section {
  display: none;
  padding: 28px;
}
.view-section.active {
  display: block;
  animation: fadeInView 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.view-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

/* 2026 GLASSMORPHIC USER PROFILE SUITE & STAT CHIPS */
.profile-container {
  display: flex;
  flex-direction: column;
}

.profile-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--bg-card-hover);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  width: max-content;
  transition: transform 0.18s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.profile-back-btn:hover {
  background: rgba(59, 130, 246, 0.14);
  border-color: var(--primary-accent);
  color: var(--primary-accent);
  transform: translateX(-4px);
  box-shadow: 0 4px 15px var(--primary-glow);
}
.profile-back-btn:active {
  transform: translateX(-2px) scale(0.96);
}

.profile-cover-mesh {
  width: 100%;
  height: 220px;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
}
.profile-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.85);
  transition: transform 0.4s ease;
}
.profile-cover-mesh:hover .profile-cover-img {
  transform: scale(1.02);
}

.profile-hero-glass {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.03) 40%, rgba(59, 130, 246, 0.12) 100%),
    rgba(18, 22, 34, 0.78);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  padding: 28px;
  margin-top: -60px;
  position: relative;
  z-index: 10;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.25);
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.profile-hero-glass::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle at 100% 0%, rgba(59, 130, 246, 0.18) 0%, rgba(139, 92, 246, 0.05) 50%, transparent 80%);
  pointer-events: none;
  z-index: 0;
}
:root[data-theme="light"] .profile-hero-glass {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.75) 50%, rgba(37, 99, 235, 0.08) 100%),
    rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06), inset 0 1px 1px rgba(255, 255, 255, 1);
}

.profile-header-main,
.profile-stats-row {
  position: relative;
  z-index: 1;
}

.profile-avatar-stack {
  position: relative;
}
.profile-verified-dot {
  position: absolute;
  bottom: 2px;
  right: 2px;
  background: var(--primary-accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-card);
  box-shadow: 0 2px 8px var(--primary-glow);
}

/* REFINED PROFILE STATS GRID (DESKTOP & MOBILE RESPONSIVE) */
.profile-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding-top: 18px;
  border-top: 1px solid var(--border-color);
}
.stat-chip {
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s ease, border-color 0.2s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  min-width: 0;
}
.stat-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(59, 130, 246, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.stat-chip-val {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
  white-space: nowrap;
}
.stat-chip-label {
  font-size: 0.76rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Sibling Cards */
.siblings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.sibling-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s ease;
  position: relative;
  overflow: hidden;
}
.sibling-card:hover {
  border-color: rgba(59, 130, 246, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.15);
}

/* Tab Pills */
.feed-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.feed-tabs::-webkit-scrollbar {
  display: none;
}
.tab-pill {
  padding: 7px 18px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.tab-pill:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
  border-color: var(--border-hover);
}
.tab-pill.active {
  color: var(--primary-accent);
  border-color: var(--primary-accent);
  background: rgba(59, 130, 246, 0.1);
  box-shadow: 0 2px 10px var(--primary-glow);
}

/* Feed Stream */
.stories-bar {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
}
.stories-bar::-webkit-scrollbar {
  display: none;
}
.story-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.story-item:hover {
  transform: translateY(-2px);
}
.story-avatar-wrap {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  padding: 2px;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.story-avatar-wrap.unseen {
  border-color: var(--primary-accent);
  box-shadow: 0 0 12px var(--primary-glow);
}
.story-avatar-wrap img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.story-create .create-wrap {
  border-style: dashed;
  background: var(--bg-card-hover);
  color: var(--primary-accent);
  font-size: 1.4rem;
  font-weight: 700;
}
.story-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  max-width: 72px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.composer-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 20px;
}
.composer-top {
  display: flex;
  gap: 14px;
  margin-bottom: 14px;
}
.composer-top textarea {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.92rem;
  outline: none;
  resize: none;
  line-height: 1.5;
}
.composer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 10px;
}
.composer-tools {
  display: flex;
  gap: 8px;
}
.tool-btn {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 8px;
}

.feed-stream {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 22px;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s ease;
}
.post-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}
.post-header {
  display: flex;
  gap: 14px;
  margin-bottom: 14px;
  align-items: center;
}
.user-display-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
}
.user-display-name:hover {
  color: var(--primary-accent);
}
.badge-verified {
  font-size: 0.72rem;
  color: var(--primary-accent);
  font-weight: 700;
  margin-left: 8px;
  background: rgba(59, 130, 246, 0.1);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  display: inline-block;
  white-space: nowrap;
}
.post-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.post-text {
  font-size: 0.94rem;
  line-height: 1.6;
  color: var(--text-main);
}

/* 2026 POST ACTION BUTTONS */
.post-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
}
.post-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  user-select: none;
}
.post-action-svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  transition: stroke 0.18s ease, fill 0.18s ease, transform 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}
.post-action-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  transform: translateY(-1px);
}
.post-action-btn:active {
  transform: scale(0.93);
}
.post-action-btn.btn-like:hover,
.post-action-btn.btn-like.active {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.12);
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.2);
}
.post-action-btn.btn-like.active .post-action-svg {
  fill: #ef4444;
  stroke: #ef4444;
  transform: scale(1.15);
}
.post-action-btn.btn-synergy:hover,
.post-action-btn.btn-synergy.active {
  color: #06b6d4;
  border-color: rgba(6, 182, 212, 0.35);
  background: rgba(6, 182, 212, 0.12);
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.2);
}
.post-action-btn.btn-synergy.active .post-action-svg {
  stroke: #06b6d4;
  transform: scale(1.15) rotate(15deg);
}

/* Radar Map & Grids */
.map-container-wrapper {
  width: 100%;
  height: 460px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
}
#leafletMap {
  width: 100%;
  height: 100%;
}
.custom-map-pin {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--primary-accent);
  box-shadow: 0 0 16px var(--primary-accent);
  cursor: pointer;
}
.custom-map-pin img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.map-pins-grid, .shop-grid, .discover-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.pin-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

/* 2026 EVENT BANNER CARDS */
.events-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.event-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.event-card-header {
  position: relative;
  height: 140px;
  width: 100%;
  overflow: hidden;
}
.event-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.85);
}
.event-date-chip {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(14, 17, 26, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
}
.event-category-chip {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--primary-glow);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: var(--primary-accent);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
}
.event-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.event-card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.3;
}
.event-card-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Direct Lounge Messages */
.messages-container {
  display: grid;
  grid-template-columns: 280px 1fr;
  height: calc(100vh - 130px);
  min-height: 520px;
  background: var(--bg-card);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}
.chat-list-panel {
  border-right: 1px solid var(--border-color);
  padding: 18px;
  display: flex;
  flex-direction: column;
  background: var(--bg-sidebar);
}
.chat-search-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-main);
  outline: none;
  font-size: 0.84rem;
}
.chat-group-title {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 16px 0 8px 0;
}
.chat-items {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.chat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
}
.chat-item:hover, .chat-item.active {
  background: var(--bg-card-hover);
}
.chat-window-panel {
  display: flex;
  flex-direction: column;
  background: var(--bg-app);
}
.chat-window-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-sidebar);
}
.mobile-chat-back-btn {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--bg-card-hover);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}
.chat-messages-body {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.chat-input-bar {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-sidebar);
  display: flex;
  gap: 12px;
}
.chat-input-bar input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 10px 16px;
  color: var(--text-main);
  outline: none;
  font-size: 0.88rem;
}

/* Verification Center */
.verification-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.v-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}
.v-badge {
  display: inline-block;
  padding: 4px 10px;
  background: var(--primary-glow);
  color: var(--primary-accent);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 800;
  width: max-content;
}
.v-status {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 999px;
  width: max-content;
}
.status-active { background: rgba(16, 185, 129, 0.15); color: var(--accent-green); border: 1px solid rgba(16, 185, 129, 0.3); }
.status-verified { background: rgba(59, 130, 246, 0.15); color: var(--primary-accent); border: 1px solid rgba(59, 130, 246, 0.3); }

.wizard-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 28px;
}
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; font-size: 0.84rem; margin-bottom: 6px; }
.form-input, .form-textarea { width: 100%; padding: 11px 16px; background: var(--bg-input); border: 1px solid var(--border-color); border-radius: 10px; color: var(--text-main); outline: none; font-family: inherit; font-size: 0.88rem; }

/* Modals & Cart Drawer */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  padding: 20px;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 32px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.cart-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.cart-overlay.open { opacity: 1; pointer-events: auto; }
.cart-drawer {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 100%;
  max-width: 420px;
  background: var(--bg-sidebar);
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.cart-overlay.open .cart-drawer { transform: translateX(0); }
.cart-drawer-header { padding: 20px 24px; border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; }
.cart-close-btn { background: var(--bg-card-hover); border: 1px solid var(--border-color); color: var(--text-main); width: 32px; height: 32px; border-radius: 50%; font-size: 1.2rem; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.cart-drawer-body { flex: 1; padding: 24px; overflow-y: auto; }
.cart-drawer-footer { padding: 20px 24px; border-top: 1px solid var(--border-color); background: var(--bg-card); }
.cart-subtotal-row { display: flex; justify-content: space-between; align-items: center; font-size: 1rem; font-weight: 700; }

/* Sidebar Right */
.sidebar-right {
  background: var(--bg-sidebar);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.right-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 14px; padding: 18px; }
.card-title { font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 0.95rem; margin-bottom: 12px; }
.trending-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.topic-tag { font-weight: 700; font-size: 0.85rem; color: var(--primary-accent); }
.topic-count { font-size: 0.72rem; color: var(--text-muted); }

/* SLIDE-OVER NAVIGATION DRAWER FOR <10 INCH SCREENS */
.mobile-nav-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.mobile-nav-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.mobile-nav-drawer {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 280px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
  padding: 20px;
}
.mobile-nav-overlay.open .mobile-nav-drawer {
  transform: translateX(0);
}
.mobile-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}
.mobile-nav-body {
  flex: 1;
  overflow-y: auto;
}
.mobile-nav-footer {
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

/* FIXED BOTTOM GLASS DOCK FOR BUTTONLESS MOBILE DEVICES */
.mobile-nav-bar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(14, 17, 26, 0.88);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 12px max(10px, env(safe-area-inset-bottom)) 12px;
  z-index: 1000;
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.4);
}
.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 10px;
  transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), color 0.15s ease;
  min-width: 48px;
  min-height: 48px;
  justify-content: center;
}
.mobile-nav-item.active { color: var(--primary-accent); }
.mobile-nav-item.active .nav-svg { stroke: var(--primary-accent); transform: scale(1.1); }
.mobile-nav-item:active { transform: scale(0.92); }

/* ==========================================================================
   DESKTOP & MOBILE RESPONSIVE MEDIA QUERIES
   ========================================================================== */

@media (max-width: 1024px) {
  .app-layout { grid-template-columns: 1fr; }
  .sidebar-left, .sidebar-right { display: none; }
  .mobile-menu-btn { display: inline-flex; }
  .mobile-nav-bar { display: flex; }
  .main-content { padding-bottom: 80px; }
  .view-section { padding: 20px; }

  /* 1-Column Responsive Grids for <10 Inch Screens */
  .events-grid, .shop-grid, .discover-grid, .verification-grid, .siblings-grid, .map-pins-grid {
    grid-template-columns: 1fr;
  }

  .header-search { width: 160px; }

  /* Direct Lounge Mobile Dual-Pane View */
  .messages-container {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 450px;
  }
  .chat-window-panel {
    display: none;
  }
  .chat-window-panel.mobile-active {
    display: flex;
  }
  .chat-list-panel.mobile-hidden {
    display: none;
  }
  .mobile-chat-back-btn {
    display: inline-flex;
  }
}

@media (max-width: 768px) {
  /* Prevent iOS Safari Form Input Auto-Zoom */
  input[type="text"],
  input[type="email"],
  input[type="password"],
  select,
  textarea {
    font-size: 16px !important;
  }

  .app-header {
    height: 64px;
    padding: 12px 18px;
  }
  .header-title {
    font-size: 1.12rem;
  }
  .header-subtitle {
    font-size: 0.72rem;
  }

  /* Dynamic Responsive Map Height */
  .map-container-wrapper {
    height: 320px;
  }

  .view-section {
    padding: 16px;
  }

  /* 4-Column Balanced Post Action Pill Buttons */
  .post-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }
  .post-action-btn {
    padding: 6px 4px;
    justify-content: center;
    font-size: 0.75rem;
    gap: 4px;
    width: 100%;
  }

  /* User Profile Mobile Glass Refinement & 2x2 Stat Cards */
  .profile-cover-mesh {
    height: 150px;
  }
  .profile-hero-glass {
    margin-top: -45px;
    padding: 20px;
  }
  .profile-avatar-stack img {
    width: 54px;
    height: 54px;
  }

  /* FIX: 2x2 SPACIOUS PROFILE STAT CARDS GRID ON MOBILE */
  .profile-stats-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .stat-chip {
    min-width: 0;
    padding: 12px 14px;
    align-items: flex-start;
  }
  .stat-chip-val {
    font-size: 1.15rem;
  }
  .stat-chip-label {
    font-size: 0.72rem;
  }
}

@media (max-width: 480px) {
  .app-header {
    padding: 10px 14px;
  }
  .header-subtitle {
    display: none;
  }
  .header-search {
    width: 130px;
    padding: 0 10px;
  }

  /* Mobile Phone Dynamic Map Height */
  .map-container-wrapper {
    height: 260px;
  }

  /* Stories Bar Phone Optimizations */
  .stories-bar {
    gap: 10px;
  }
  .story-avatar-wrap {
    width: 50px;
    height: 50px;
  }

  /* Post Action Pill Micro-Sizing for 375px - 414px Phone Screens */
  .post-card {
    padding: 16px;
  }
  .post-action-btn {
    padding: 5px 2px;
    font-size: 0.7rem;
    gap: 3px;
  }
  .post-action-svg {
    width: 14px;
    height: 14px;
  }

  /* Glass Profile Cards on Phones */
  .profile-cover-mesh {
    height: 125px;
  }
  .profile-hero-glass {
    margin-top: -35px;
    padding: 16px;
  }
  .profile-header-main h2 {
    font-size: 1.25rem;
  }

  /* 2x2 Phone Stat Cards */
  .profile-stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .stat-chip {
    padding: 10px 12px;
  }

  /* Event Cards on Mobile Phones */
  .event-card-header {
    height: 110px;
  }
  .event-card-body {
    padding: 14px;
  }
  .event-card-footer {
    padding: 12px 14px;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .event-card-footer button {
    width: 100%;
  }

  .cart-drawer {
    max-width: 100%;
  }
}

/* Universal Helper Utility Classes */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.w-full { width: 100%; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.my-4 { margin-top: 16px; margin-bottom: 16px; }
.my-6 { margin-top: 24px; margin-bottom: 24px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-auto { margin-top: auto; }
.pt-2 { padding-top: 8px; }
.pt-4 { padding-top: 16px; }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.85rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-2xl { font-size: 1.5rem; font-family: 'Outfit', sans-serif; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.font-bold { font-weight: 700; }
.text-main { color: var(--text-main); }
.text-muted { color: var(--text-muted); }
.leading-relaxed { line-height: 1.625; }
.relative { position: relative; }
.cursor-pointer { cursor: pointer; }
.border-t { border-top-width: 1px; border-top-style: solid; }
.border-color { border-color: var(--border-color); }
