/* ============================================
   PAGE-SPECIFIC STYLES
   ============================================ */

/* ═══════════════════════════════════════════
   LANDING PAGE (index.html)
   ═══════════════════════════════════════════ */

.hero {
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero__title-wrapper {
  margin-bottom: var(--space-4); /* Enger zusammen für ein kompaktes Dashboard */
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: var(--fs-hero);
  font-weight: 300; /* Super elegant thin serif */
  letter-spacing: -0.01em;
  color: white;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
  display: inline-block;
  background: hsla(22, 25%, 5%, 0.82) !important; /* Starke Deckungskraft für exzellenten Kontrast */
  backdrop-filter: blur(20px) saturate(1.4) !important;
  -webkit-backdrop-filter: blur(20px) saturate(1.4) !important;
  border: 1.5px solid hsla(35, 45%, 65%, 0.55) !important; /* Kräftigere goldene Glaskante */
  border-radius: var(--radius-2xl);
  padding: var(--space-4) var(--space-12);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 hsla(0,0%,100%,0.2);
}

.hero__subtitle-wrapper {
  margin-bottom: var(--space-6);
}

.hero__subtitle {
  font-family: var(--font-sans);
  font-size: var(--fs-lg);
  color: hsla(35, 30%, 95%, 0.95); /* Weiches Champagner-Weiß */
  max-width: 580px;
  line-height: var(--lh-relaxed);
  font-weight: var(--fw-light);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  display: inline-block;
  background: hsla(22, 25%, 5%, 0.82) !important; /* Starke Deckungskraft für exzellenten Kontrast */
  backdrop-filter: blur(20px) saturate(1.4) !important;
  -webkit-backdrop-filter: blur(20px) saturate(1.4) !important;
  border: 1.5px solid hsla(35, 45%, 65%, 0.45) !important; /* Kräftigere goldene Glaskante */
  border-radius: var(--radius-xl);
  padding: var(--space-4) var(--space-8);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 hsla(0,0%,100%,0.15);
}

.hero__input-group {
  max-width: 620px;
  margin: 0 auto var(--space-6);
  position: relative;
}

/* ── Hero Glass Panel (wie Auth-Karte – klare Trennung Bild vs. UI) ── */
.hero__glass-panel {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  padding: var(--space-8) var(--space-4);
  position: relative;
  z-index: 2;
}

.hero__input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.hero__input {
  width: 100%;
  padding: var(--space-5) var(--space-6);
  padding-right: 140px;
  font-size: var(--fs-base);
  background: hsla(22, 25%, 4%, 0.86) !important; /* Sehr hohe Deckungskraft für perfektes Eingabefeld */
  backdrop-filter: blur(24px) saturate(1.4) !important;
  -webkit-backdrop-filter: blur(24px) saturate(1.4) !important;
  border: 1.5px solid hsla(35, 45%, 65%, 0.6) !important; /* Kräftigere goldene Glaskante */
  border-radius: var(--radius-full);
  color: white;
  font-family: var(--font-sans);
  outline: none;
  transition: all var(--duration-normal) var(--ease-out);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), inset 0 1px 0 hsla(0,0%,100%,0.2);
}

.hero__input:focus {
  border-color: var(--secondary-light) !important;
  box-shadow: 0 0 24px var(--secondary-glow), 0 16px 48px rgba(0,0,0,0.45);
  background: hsla(22, 25%, 2%, 0.92) !important;
}

.hero__input::placeholder {
  color: hsla(0, 0%, 100%, 0.6);
}

/* ── Hero Toggle Overrides (Frosted Dark Glass – starker Kontrast) ── */
.hero .toggle__track {
  background: hsla(22, 25%, 5%, 0.8) !important; /* Starke Deckungskraft */
  backdrop-filter: blur(20px) saturate(1.3) !important;
  -webkit-backdrop-filter: blur(20px) saturate(1.3) !important;
  border: 1.5px solid hsla(35, 45%, 65%, 0.55) !important; /* Kräftigere goldene Glaskante */
  box-shadow: 0 8px 24px rgba(0,0,0,0.4), inset 0 1px 0 hsla(0,0%,100%,0.15);
}
.hero .toggle__track:hover {
  background: hsla(0, 0%, 0%, 0.5);
  border-color: hsla(0, 0%, 100%, 0.6);
}
.hero .toggle__slider {
  background: hsla(0, 0%, 100%, 0.2);
  border: 1px solid hsla(0, 0%, 100%, 0.5);
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}
.hero .toggle__label {
  color: hsla(0, 0%, 100%, 0.6);
}
.hero .toggle__label--active {
  color: white;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.hero__submit-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
}

.hero__meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  margin-top: var(--space-4); /* Abstand nach oben zur Erklärungsleiste */
  margin-bottom: 0;
}

.hero .gps-status {
  background: hsla(22, 25%, 5%, 0.82) !important; /* Starke Deckungskraft */
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid hsla(35, 45%, 65%, 0.5) !important; /* Kräftigere goldene Glaskante */
  color: rgba(255, 255, 255, 0.95);
  padding: var(--space-2) var(--space-5);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  font-weight: var(--fw-semibold);
  transition: all var(--duration-normal) var(--ease-out);
}

.hero .gps-status:hover {
  background: hsla(0, 0%, 0%, 0.55);
  border-color: hsla(0, 0%, 100%, 0.5);
  color: white;
  transform: translateY(-1px);
}

/* ── Toggle on Landing ── */
.hero__toggle {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-10);
}

/* ── How it works section ── */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
  max-width: 960px;
  margin: 0 auto;
}

.step {
  text-align: center;
  padding: var(--space-6);
  background: var(--surface-1);
  border: 1px solid hsla(22, 30%, 30%, 0.25); /* Dunkles Holzbraun für den Rahmen */
  border-radius: var(--radius-2xl);
  transition: all var(--duration-normal) var(--ease-out);
}

.step:hover {
  background: var(--surface-2);
  border-color: hsla(22, 30%, 30%, 0.5); /* Rahmen beim Hovern stärker sichtbar */
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.step__icon {
  width: 76px;
  height: 76px;
  margin: 0 auto var(--space-4);
  background: var(--surface-1);
  border: 1px solid hsla(22, 30%, 30%, 0.2);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  color: var(--text-primary);
  transition: all var(--duration-normal) var(--ease-out);
  box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.5);
}

.step:hover .step__icon {
  transform: scale(1.05);
  box-shadow: 0 0 20px var(--primary-glow);
  background: var(--surface-2);
  border-color: hsla(22, 30%, 30%, 0.4);
}

.step__title {
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--space-2);
  color: var(--text-primary);
}

.step__text {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  line-height: var(--lh-relaxed);
}

.step__number {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--primary-light);
  font-weight: var(--fw-bold);
  margin-bottom: var(--space-2);
  display: block;
  letter-spacing: var(--ls-wide);
}

/* ── Stats Bar ── */
.stats-bar {
  display: flex;
  justify-content: center;
  gap: var(--space-12);
  padding: var(--space-8) var(--space-12);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: var(--border-subtle);
  border-radius: var(--radius-2xl);
  max-width: 900px;
  margin: 0 auto;
  box-shadow: var(--glass-shadow);
}

.stat {
  text-align: center;
  flex: 1;
}

.stat__number {
  font-size: var(--fs-3xl);
  font-weight: var(--fw-extrabold);
  font-family: var(--font-mono);
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 10px var(--secondary-glow));
}

.stat__label {
  font-size: var(--fs-xs);
  color: var(--text-tertiary);
  margin-top: var(--space-2);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
}

/* ═══════════════════════════════════════════
   AUTH PAGE (auth.html)
   ═══════════════════════════════════════════ */

.auth-page {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center; /* Mittig auf Mobile */
  padding: var(--space-6);
  background: #000; /* Schwarzer Hintergrund für Tiefe */
}

.auth-page__bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: contrast(1.1) brightness(0.95);
}

.auth-page__bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.5) 100%);
  z-index: 1;
  pointer-events: none;
}

.auth-page__form-container {
  width: 100%;
  max-width: 390px; /* Perfekte Breite für ein kompaktes Formular */
  z-index: 2;
  position: relative;
}

/* Form Container right/top alignment (Flush aligned to the top and right edge!) */
@media (min-width: 900px) {
  .auth-page--full {
    align-items: flex-start;
    padding-top: 12px; /* Perfekt bündig nach oben */
    justify-content: flex-end;
    padding-right: 12px; /* Perfekt bündig an den rechten Rand */
  }
}

/* ── Premium High-Contrast Obsidian Glass Login Card (Optimized for dark background) ── */
.auth-card {
  width: 100%;
  z-index: 1;
  background: hsla(22, 25%, 5%, 0.82) !important; /* Starke Deckungskraft für exzellenten Kontrast */
  backdrop-filter: blur(24px) saturate(1.4) !important;
  -webkit-backdrop-filter: blur(24px) saturate(1.4) !important;
  border: 1.5px solid hsla(35, 45%, 65%, 0.55) !important; /* Kräftigere goldene Glaskante */
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), inset 0 1px 0 hsla(0,0%,100%,0.2);
}

.auth-card__header {
  text-align: center;
  margin-bottom: var(--space-8);
}

.auth-card__title {
  font-family: var(--font-serif);
  font-size: var(--fs-3xl);
  font-weight: var(--fw-light);
  margin-bottom: var(--space-2);
  color: #ffffff !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.auth-card__subtitle {
  font-size: var(--fs-sm);
  color: hsla(35, 20%, 85%, 0.75) !important;
}

.auth-card .form-label {
  color: hsla(35, 45%, 65%, 0.95) !important; /* Elegant champagne gold labels */
  font-weight: var(--fw-semibold);
  letter-spacing: 0.06em;
}

.auth-card .form-input {
  background: hsla(22, 25%, 2%, 0.8) !important; /* Rich deep dark brown-black input background */
  border: 1.5px solid hsla(35, 45%, 65%, 0.35) !important;
  color: #ffffff !important; /* Pure white text for typed content */
  font-size: var(--fs-base) !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.auth-card .form-input:focus {
  border-color: var(--secondary-light) !important;
  box-shadow: 0 0 12px var(--secondary-glow), inset 0 2px 4px rgba(0, 0, 0, 0.4) !important;
  background: hsla(22, 25%, 1%, 0.9) !important;
}

.auth-card .form-input::placeholder {
  color: hsla(35, 10%, 100%, 0.45) !important; /* High contrast visible placeholder */
}

.auth-card .auth-tab:not(.auth-tab--active) {
  color: hsla(35, 10%, 100%, 0.5) !important;
}

.auth-card .auth-tab--active {
  background: #ffffff !important;
  color: #06060a !important;
}

.auth-card .auth-divider span {
  color: hsla(35, 10%, 100%, 0.45) !important;
}

.auth-card #forgot-password-btn,
.auth-card #back-to-login-btn {
  color: hsla(35, 45%, 65%, 0.9) !important;
}

.auth-card #forgot-password-btn:hover,
.auth-card #back-to-login-btn:hover {
  color: #ffffff !important;
  text-decoration: underline;
}

/* Auth Card Button Overrides for High Contrast */
.auth-card .btn--secondary {
  color: #ffffff !important;
  background: hsla(35, 10%, 100%, 0.08) !important;
  border: 1.5px solid hsla(35, 45%, 65%, 0.35) !important;
}

.auth-card .btn--secondary:hover {
  background: hsla(35, 10%, 100%, 0.16) !important;
  border-color: hsla(35, 45%, 65%, 0.6) !important;
}

.auth-card .btn--ghost {
  color: hsla(35, 20%, 85%, 0.8) !important;
}

.auth-card .btn--ghost:hover {
  color: #ffffff !important;
  background: hsla(35, 10%, 100%, 0.05) !important;
}

/* Auth Card Role Selection Contrast Overrides */
.auth-card .role-option {
  background: hsla(22, 25%, 2%, 0.6) !important;
  border: 1.5px solid hsla(35, 45%, 65%, 0.25) !important;
}

.auth-card .role-option:hover {
  border-color: hsla(35, 45%, 65%, 0.45) !important;
  background: hsla(22, 25%, 1%, 0.8) !important;
}

.auth-card .role-option--active {
  border-color: var(--secondary-light) !important;
  background: hsla(35, 45%, 65%, 0.15) !important;
  box-shadow: 0 0 16px var(--secondary-glow) !important;
}

.auth-card .role-option__label {
  color: hsla(35, 20%, 85%, 0.8) !important;
}

.auth-card .role-option--active .role-option__label {
  color: #ffffff !important;
}

.auth-card .role-option .icon {
  color: hsla(35, 30%, 75%, 0.8) !important;
  transition: all var(--duration-normal) var(--ease-out);
}

.auth-card .role-option--active .icon {
  color: var(--secondary-light) !important;
  filter: drop-shadow(0 0 4px var(--secondary-glow));
}

.auth-tabs {
  display: flex;
  background: hsla(240, 10%, 100%, 0.03);
  border: var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 4px;
  margin-bottom: var(--space-6);
}

.auth-tab {
  flex: 1;
  padding: var(--space-2) var(--space-4);
  text-align: center;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--text-secondary);
  background: none;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
}

.auth-tab--active {
  background: #ffffff;
  color: #06060a;
  box-shadow: var(--shadow-md);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin: var(--space-4) 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: hsla(240, 10%, 100%, 0.05);
}

.auth-divider span {
  font-size: var(--fs-xs);
  color: var(--text-tertiary);
  text-transform: uppercase;
  font-weight: var(--fw-semibold);
}

/* ── Role Selection ── */
.role-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

.role-option {
  padding: var(--space-4) var(--space-3);
  text-align: center;
  background: hsla(240, 10%, 100%, 0.02);
  border: var(--border-subtle);
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
}

.role-option:hover {
  border-color: hsla(240, 10%, 100%, 0.15);
  background: hsla(240, 10%, 100%, 0.04);
}

.role-option--active {
  border-color: var(--primary);
  background: var(--primary-subtle);
  box-shadow: 0 0 16px var(--primary-subtle);
}

.role-option__icon {
  font-size: 1.6rem;
  margin-bottom: var(--space-2);
  display: block;
}

.role-option__label {
  font-size: 11px;
  font-weight: var(--fw-semibold);
  color: var(--text-secondary);
}

.role-option--active .role-option__label {
  color: var(--primary-light);
}


/* ═══════════════════════════════════════════
   DASHBOARD / APP PAGE (app.html)
   ═══════════════════════════════════════════ */

.app-layout {
  display: flex;
  min-height: calc(100vh - var(--header-height));
}

.app-sidebar {
  width: 280px;
  border-right: var(--border-subtle);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  flex-shrink: 0;
  overflow-y: auto;
}

.app-content {
  flex: 1;
  padding: var(--space-6) var(--space-8);
  overflow-y: auto;
  max-height: calc(100vh - var(--header-height));
}

.app-content__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
}

/* ── Quick Post Bar in Dashboard ── */
.quick-post {
  background: hsla(35, 35%, 100%, 0.28); /* Beautiful crystal-glass transparent container! */
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1.5px solid var(--glass-border); /* Sharp, brilliant white reflection border! */
  border-radius: var(--radius-full); /* Beautiful complete capsule */
  padding: var(--space-2) var(--space-3); /* Perfectly aligned */
  display: flex;
  gap: var(--space-3);
  align-items: center;
  margin-bottom: var(--space-8);
  box-shadow: var(--glass-shadow);
  transition: all var(--duration-normal) var(--ease-out);
}

.quick-post:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 16px var(--primary-glow), var(--glass-shadow);
  background: hsla(35, 35%, 100%, 0.45);
}

.quick-post__toggle {
  width: 170px;
  height: 38px;
  flex-shrink: 0;
}

.quick-post__toggle .toggle__track {
  height: 100%;
}

.quick-post__toggle .toggle__slider {
  top: 2px;
  left: 2px;
  height: calc(100% - 4px);
}

.quick-post__input {
  flex: 1;
  background: transparent;
  border: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: var(--space-2) var(--space-2);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  outline: none;
}

.quick-post__input::placeholder {
  color: hsla(24, 25%, 34%, 0.55);
}

.quick-post__input:focus {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

/* ── Match Cards (Leads in dashboard) ── */
.match-card {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-6) var(--space-6) var(--space-5);
  align-items: flex-start;
  position: relative;
  overflow: hidden;
}

.match-card__body {
  flex: 1;
  min-width: 0;
}

/* Quote box with Cormorant Garamond Serif citations */
.match-card__content {
  font-family: var(--font-serif);
  font-size: var(--fs-base);
  font-style: italic;
  font-weight: 300;
  color: var(--text-primary);
  margin-bottom: var(--space-3);
  line-height: var(--lh-relaxed);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.match-card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.match-card__distance {
  font-size: var(--fs-xs);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-weight: var(--fw-medium);
}

.match-card__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

/* ── Post Cards ── */
.post-card {
  padding: var(--space-5);
}

.post-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}

.post-card__type {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  font-weight: var(--fw-bold);
}

.post-card__content {
  color: var(--text-primary);
  margin-bottom: var(--space-4);
  font-size: var(--fs-sm);
  line-height: var(--lh-normal);
}

.post-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid hsla(240, 10%, 100%, 0.04);
  padding-top: var(--space-3);
}


/* ═══════════════════════════════════════════
   CHAT PAGE (chat.html)
   ═══════════════════════════════════════════ */

.chat-layout {
  display: flex;
  height: calc(100vh - var(--header-height));
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: var(--border-subtle);
  margin: var(--space-4) auto;
  max-width: var(--max-width);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: var(--glass-shadow);
}

@media (min-width: 1280px) {
  .chat-layout {
    height: calc(100vh - var(--header-height) - var(--space-8));
  }
}

/* ── Chat List ── */
.chat-list {
  width: 320px;
  border-right: var(--border-subtle);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: hidden;
  background: hsla(240, 16%, 4%, 0.2);
}

.chat-list__header {
  padding: var(--space-4) var(--space-5);
  border-bottom: var(--border-subtle);
}

.chat-list__title {
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
}

.chat-list__items {
  flex: 1;
  overflow-y: auto;
}

.chat-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  border-bottom: 1px solid hsla(240, 10%, 100%, 0.02);
}

.chat-item:hover {
  background: hsla(240, 10%, 100%, 0.02);
}

.chat-item--active {
  background: hsla(255, 85%, 60%, 0.08);
  border-left: 3px solid var(--primary-light);
}

.chat-item__info {
  flex: 1;
  min-width: 0;
}

.chat-item__name {
  font-weight: var(--fw-semibold);
  font-size: var(--fs-sm);
  margin-bottom: 2px;
  color: var(--text-primary);
}

.chat-item__preview {
  font-size: var(--fs-xs);
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-item__time {
  font-size: var(--fs-xs);
  color: var(--text-tertiary);
  white-space: nowrap;
}

/* ── Chat Window ── */
.chat-window {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: hsla(240, 16%, 5%, 0.1);
}

.chat-window__header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-bottom: var(--border-subtle);
  flex-shrink: 0;
}

.chat-window__back {
  display: none;
}

.chat-window__info {
  flex: 1;
}

.chat-window__name {
  font-weight: var(--fw-semibold);
  font-size: var(--fs-sm);
  color: var(--text-primary);
}

.chat-window__topic {
  font-size: var(--fs-xs);
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-window__messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* ── Message Bubbles ── */
.message {
  max-width: 70%;
  display: flex;
  flex-direction: column;
}

.message--sent {
  align-self: flex-end;
}

.message--received {
  align-self: flex-start;
}

.message__bubble {
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-xl);
  font-size: var(--fs-sm);
  line-height: var(--lh-normal);
  word-break: break-word;
  box-shadow: var(--shadow-sm);
}

.message--sent .message__bubble {
  background: var(--gradient-primary);
  color: white;
  border-bottom-right-radius: var(--radius-sm);
  box-shadow: 0 4px 16px -4px var(--primary-glow);
}

.message--received .message__bubble {
  background: hsla(240, 10%, 100%, 0.04);
  color: var(--text-primary);
  border-bottom-left-radius: var(--radius-sm);
  border: var(--border-subtle);
}

.message__time {
  font-size: 10px;
  color: var(--text-tertiary);
  margin-top: var(--space-1);
  padding: 0 var(--space-1);
}

.message--sent .message__time {
  text-align: right;
}

/* ── Chat Input ── */
.chat-input {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
  border-top: var(--border-subtle);
  flex-shrink: 0;
}

.chat-input__field {
  flex: 1;
  padding: var(--space-3) var(--space-5);
  background: hsla(35, 35%, 100%, 0.28); /* Brilliant crystal glass transparent backdrop */
  border: 1.5px solid var(--glass-border); /* Sharp, brilliant white reflection border! */
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  outline: none;
  transition: all var(--duration-fast) var(--ease-out);
}

.chat-input__field::placeholder {
  color: hsla(24, 25%, 34%, 0.55);
}

.chat-input__field:focus {
  border-color: var(--primary);
  box-shadow: 0 0 16px var(--primary-glow), var(--glass-shadow);
  background: hsla(35, 35%, 100%, 0.45);
}

.chat-input__send {
  width: 40px;
  height: 40px;
  background: var(--primary); /* Walnut brown background */
  border: none;
  border-radius: var(--radius-full);
  color: var(--text-inverse); /* Soft white icon */
  font-size: var(--fs-base);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-normal) var(--ease-out);
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.chat-input__send:hover {
  transform: translateY(-1.5px) scale(1.04);
  background: var(--primary-light);
  box-shadow: 0 4px 12px var(--primary-glow);
}


/* ── Notification Dropdown Menu ── */
.notification-dropdown {
  position: absolute;
  top: calc(100% + var(--space-3));
  right: 0;
  width: 360px;
  max-height: 420px;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: var(--border-subtle);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl), var(--glass-shadow);
  overflow-y: auto;
  z-index: var(--z-dropdown);
  display: none;
}

.notification-dropdown--open {
  display: block;
  animation: slide-down 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slide-down {
  0% { transform: translateY(-10px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

.notification-dropdown__header {
  padding: var(--space-4) var(--space-5);
  border-bottom: var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.notification-dropdown__header h4 {
  font-family: var(--font-sans);
  font-weight: var(--fw-semibold);
}

.notification-item {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid hsla(240, 10%, 100%, 0.02);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.notification-item:hover {
  background: hsla(240, 10%, 100%, 0.02);
}

.notification-item--unread {
  background: var(--primary-subtle);
}

.notification-item__icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.notification-item__body {
  flex: 1;
  min-width: 0;
}

.notification-item__title {
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  margin-bottom: 2px;
  color: var(--text-primary);
}

.notification-item__text {
  font-size: var(--fs-xs);
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: var(--lh-normal);
}

.notification-item__time {
  font-size: 10px;
  color: var(--text-tertiary);
  margin-top: var(--space-1);
}

/* ═══════════════════════════════════════════
   LEGAL PAGE (legal.html)
   ═══════════════════════════════════════════ */

.legal-page {
  padding: var(--space-16) 0;
}

.legal-page h2 {
  font-size: var(--fs-2xl);
  margin: var(--space-10) 0 var(--space-4);
  padding-top: var(--space-6);
  border-top: var(--border-subtle);
}

.legal-page h2:first-of-type {
  border-top: none;
  margin-top: 0;
}

.legal-page h3 {
  font-size: var(--fs-lg);
  margin: var(--space-6) 0 var(--space-3);
}

.legal-page p {
  margin-bottom: var(--space-4);
  line-height: var(--lh-relaxed);
  color: var(--text-secondary);
}

.legal-page ul {
  list-style: disc;
  padding-left: var(--space-6);
  margin-bottom: var(--space-4);
}

.legal-page li {
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
  line-height: var(--lh-relaxed);
}

.legal-page .placeholder-box {
  display: inline-block;
  background: hsl(48, 100%, 50%, 0.08);
  border: 1px dashed hsl(48, 100%, 40%);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  margin: var(--space-1) 0;
  min-width: 240px;
}

.legal-page .placeholder-box .placeholder-label {
  display: block;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: hsl(48, 80%, 30%);
  margin-bottom: var(--space-1);
}

.legal-page .placeholder-box .placeholder-text,
.legal-page .placeholder-text {
  color: hsl(48, 60%, 25%);
  font-family: var(--ff-mono), monospace;
  font-size: var(--fs-sm);
}

/* ═══════════════════════════════════════════
   RESPONSIVE OVERRIDES
   ═══════════════════════════════════════════ */

@media (max-width: 768px) {
  .steps {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .stats-bar {
    gap: var(--space-6);
    flex-wrap: wrap;
    padding: var(--space-6);
  }

  .role-selector {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    display: none;
  }

  .app-content {
    padding: var(--space-4);
  }

  .chat-list {
    width: 100%;
    border-right: none;
  }

  .chat-layout--chat-open .chat-list {
    display: none;
  }

  .chat-layout--chat-open .chat-window {
    display: flex;
  }

  .chat-window {
    display: none;
  }

  .chat-window__back {
    display: flex;
  }

  .notification-dropdown {
    width: calc(100vw - var(--space-8));
    right: calc(-1 * var(--space-4));
  }

  .hero__input {
    padding-right: 60px;
    font-size: var(--fs-sm);
    padding: var(--space-4) var(--space-5);
    padding-right: 60px;
  }

  .hero__submit-btn {
    padding: var(--space-2) var(--space-4);
    font-size: var(--fs-xs);
  }

  .quick-post {
    flex-direction: column;
    border-radius: var(--radius-xl);
    padding: var(--space-4);
  }

  .quick-post__toggle {
    width: 100%;
  }
}
