/* ==========================================================================
   Base & Reset
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--aloute-font-sans);
  font-size: var(--aloute-font-size-base);
  font-weight: var(--aloute-font-weight-normal);
  line-height: var(--aloute-line-height-base);
  color: var(--aloute-text-primary);
  background-color: var(--aloute-bg-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a {
  color: var(--aloute-accent);
  text-decoration: none;
  transition: color var(--aloute-transition-fast);
}

a:hover {
  color: var(--aloute-accent-hover);
  text-decoration: underline;
}

/* Accessible Focus States */
:focus-visible {
  outline: none;
  box-shadow: var(--aloute-focus-ring);
}

/* ==========================================================================
   Typography Hierarchy
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  color: var(--aloute-text-primary);
  font-weight: var(--aloute-font-weight-semibold);
  line-height: var(--aloute-line-height-heading);
  letter-spacing: var(--aloute-letter-spacing-tight);
  margin-top: 0;
}

h1 {
  font-size: var(--aloute-font-size-2xl);
  font-weight: var(--aloute-font-weight-bold);
  line-height: var(--aloute-line-height-tight);
}

h2 {
  font-size: var(--aloute-font-size-xl);
}

h3 {
  font-size: var(--aloute-font-size-lg);
}

h4 {
  font-size: var(--aloute-font-size-md);
}

h5 {
  font-size: var(--aloute-font-size-base);
}

h6 {
  font-size: var(--aloute-font-size-sm);
  color: var(--aloute-text-secondary);
  letter-spacing: var(--aloute-letter-spacing-normal);
}

p {
  margin-top: 0;
  margin-bottom: var(--aloute-space-md);
  line-height: var(--aloute-line-height-base);
}

.text-muted {
  color: var(--aloute-text-muted);
}

.text-secondary {
  color: var(--aloute-text-secondary);
}

/* ==========================================================================
   Global Navbar
   ========================================================================== */

.aloute-navbar {
  height: var(--aloute-navbar-height);
  background-color: var(--aloute-bg-surface);
  border-bottom: 1px solid var(--aloute-border-color);
  position: sticky;
  top: 0;
  z-index: 1030;
  padding: 0 var(--aloute-space-md);
}

.aloute-navbar .navbar-brand {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--aloute-text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.aloute-navbar .navbar-brand:hover {
  text-decoration: none;
  color: var(--aloute-accent);
}

.badge-brand {
  background-color: var(--aloute-accent);
  color: var(--aloute-accent-contrast);
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--aloute-radius-sm);
  font-weight: 600;
}

.aloute-search-box {
  position: relative;
  max-width: 360px;
  width: 100%;
}

.aloute-search-box .aloute-search-input,
.aloute-navbar input.form-control.aloute-search-input,
.aloute-search-input {
  background-color: var(--aloute-bg-surface-hover);
  border: 1px solid var(--aloute-border-color);
  color: var(--aloute-text-primary);
  border-radius: var(--aloute-radius-full);
  padding: 0.45rem 1rem 0.45rem 2.5rem !important; /* guaranteed clearance for search icon */
  font-size: 0.875rem;
  width: 100%;
  min-height: 38px;
  transition: border-color var(--aloute-transition-fast), box-shadow var(--aloute-transition-fast), background-color var(--aloute-transition-fast);
}

.aloute-search-box .aloute-search-input:focus,
.aloute-navbar input.form-control.aloute-search-input:focus,
.aloute-search-input:focus {
  background-color: var(--aloute-bg-surface);
  border-color: var(--aloute-border-focus);
  color: var(--aloute-text-primary);
  outline: none;
  box-shadow: var(--aloute-focus-ring);
}

.aloute-search-input::placeholder {
  color: var(--aloute-text-muted);
}

.aloute-search-input:disabled {
  cursor: not-allowed;
  opacity: 0.75;
  background-color: var(--aloute-bg-surface-hover);
}

.aloute-nav-toggle-btn,
.aloute-btn-icon-mobile,
.aloute-mobile-search-btn {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.aloute-search-box .aloute-search-icon,
.aloute-search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--aloute-text-muted);
  pointer-events: none;
  font-size: 0.95rem;
  z-index: 4;
}

/* User avatar */
.avatar-img {
  width: 40px;
  height: 40px;
  border-radius: var(--aloute-radius-full);
  object-fit: cover;
  background-color: var(--aloute-bg-surface-hover);
  border: 1px solid var(--aloute-border-color);
  flex-shrink: 0;
}

.avatar-sm {
  width: 32px;
  height: 32px;
}

.avatar-lg {
  width: 72px;
  height: 72px;
}

.avatar-xl {
  width: 96px;
  height: 96px;
}

/* ==========================================================================
   Three-Column Layout System
   ========================================================================== */

.aloute-layout-container {
  max-width: var(--aloute-container-max);
  margin: 0 auto;
  padding: var(--aloute-space-md);
}

.aloute-left-panel {
  position: sticky;
  top: calc(var(--aloute-navbar-height) + var(--aloute-space-md));
  max-height: calc(100vh - var(--aloute-navbar-height) - 2rem);
  overflow-y: auto;
}

.aloute-feed-panel {
  max-width: var(--aloute-feed-max-width);
  margin-inline: auto;
}

.aloute-right-panel {
  position: sticky;
  top: calc(var(--aloute-navbar-height) + var(--aloute-space-md));
  max-height: calc(100vh - var(--aloute-navbar-height) - 2rem);
  overflow-y: auto;
}

/* Scrollbar styling for panels */
.aloute-left-panel::-webkit-scrollbar,
.aloute-right-panel::-webkit-scrollbar {
  width: 4px;
}
.aloute-left-panel::-webkit-scrollbar-thumb,
.aloute-right-panel::-webkit-scrollbar-thumb {
  background-color: var(--aloute-border-color);
  border-radius: var(--aloute-radius-full);
}

/* ==========================================================================
   Surface / Cards
   ========================================================================== */

.aloute-card {
  background-color: var(--aloute-bg-surface);
  border: 1px solid var(--aloute-border-color);
  border-radius: var(--aloute-radius-lg);
  padding: var(--aloute-space-md);
  margin-bottom: var(--aloute-space-md);
  box-shadow: var(--aloute-shadow-sm);
  transition: border-color var(--aloute-transition-fast);
}

.aloute-card-elevated {
  background-color: var(--aloute-bg-surface-elevated);
}

.aloute-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: var(--aloute-space-sm);
  margin-bottom: var(--aloute-space-sm);
  border-bottom: 1px solid var(--aloute-border-subtle);
}

.aloute-card-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  color: var(--aloute-text-primary);
}

/* ==========================================================================
   Left Sidebar Navigation
   ========================================================================== */

.sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  border-radius: var(--aloute-radius-md);
  color: var(--aloute-text-secondary);
  font-weight: 500;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: background-color var(--aloute-transition-fast), color var(--aloute-transition-fast);
}

.sidebar-nav-link:hover {
  background-color: var(--aloute-bg-surface-hover);
  color: var(--aloute-text-primary);
  text-decoration: none;
}

.sidebar-nav-link:focus-visible {
  outline: none;
  box-shadow: var(--aloute-focus-ring) !important;
}

.sidebar-nav-link.active {
  background-color: var(--aloute-accent-subtle);
  color: var(--aloute-accent);
  font-weight: 600;
  border-left: 3px solid var(--aloute-accent);
}

.sidebar-nav-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* User summary in left sidebar */
.sidebar-user-summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--aloute-radius-md);
  background-color: var(--aloute-bg-surface-elevated);
  margin-bottom: var(--aloute-space-md);
  text-decoration: none;
  color: var(--aloute-text-primary);
  border: 1px solid var(--aloute-border-subtle);
}

.sidebar-user-summary:hover {
  background-color: var(--aloute-bg-surface-hover);
  text-decoration: none;
  color: var(--aloute-text-primary);
}

.sidebar-user-info {
  min-width: 0;
  min-inline-size: 0;
  overflow: hidden;
}

.sidebar-user-name {
  font-weight: 600;
  font-size: 0.875rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

.sidebar-user-handle {
  font-size: 0.75rem;
  color: var(--aloute-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

/* ==========================================================================
   Post Card Component
   ========================================================================== */

.post-card {
  background-color: var(--aloute-bg-surface);
  border: 1px solid var(--aloute-border-color);
  border-radius: var(--aloute-radius-lg);
  padding: var(--aloute-space-md);
  margin-bottom: var(--aloute-space-md);
  box-shadow: var(--aloute-shadow-sm);
  transition: border-color var(--aloute-transition-fast);
}

.post-card:hover {
  border-color: var(--aloute-border-strong);
  box-shadow: var(--aloute-shadow-md);
}

.post-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: var(--aloute-space-sm);
}

.post-author-meta {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: inherit;
}

.post-author-name {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--aloute-text-primary);
  margin: 0;
}

.post-author-name:hover {
  color: var(--aloute-accent);
}

.post-timestamp {
  font-size: 0.8125rem;
  color: var(--aloute-text-muted);
}

.post-badge {
  font-size: 0.7rem;
  padding: 0.15rem 0.4rem;
  border-radius: var(--aloute-radius-sm);
  background-color: var(--aloute-bg-surface-elevated);
  color: var(--aloute-text-secondary);
  border: 1px solid var(--aloute-border-subtle);
}

.post-card-content {
  font-size: 0.9375rem;
  color: var(--aloute-text-primary);
  line-height: 1.55;
  margin-bottom: var(--aloute-space-md);
  white-space: pre-line;
  word-break: break-word;
}

/* Post Media Presentation */
.post-media-container {
  border-radius: var(--aloute-radius-md);
  overflow: hidden;
  margin-bottom: var(--aloute-space-md);
  border: 1px solid var(--aloute-border-color);
  background-color: var(--aloute-bg-body);
}

.post-media-img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  display: block;
}

/* Post Topics / Tags */
.post-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: var(--aloute-space-sm);
}

.post-topic-tag {
  display: inline-flex;
  align-items: center;
  border: none;
  font-family: inherit;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--aloute-accent);
  background-color: var(--aloute-accent-subtle);
  padding: 0.15rem 0.5rem;
  border-radius: var(--aloute-radius-full);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--aloute-transition-fast);
}

.post-topic-tag:hover {
  background-color: var(--aloute-accent);
  color: var(--aloute-accent-contrast);
  text-decoration: none;
}

/* ==========================================================================
   Interaction Bar Component
   ========================================================================== */

.interaction-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--aloute-space-sm);
  border-top: 1px solid var(--aloute-border-subtle);
}

.interaction-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: transparent;
  border: none;
  color: var(--aloute-text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.375rem 0.625rem;
  border-radius: var(--aloute-radius-md);
  cursor: pointer;
  min-height: 38px;
  min-width: 38px;
  transition: all var(--aloute-transition-fast);
}

.interaction-btn:hover {
  background-color: var(--aloute-bg-surface-hover);
  color: var(--aloute-text-primary);
}

.interaction-btn.is-active,
.interaction-btn.active {
  color: var(--aloute-accent);
  background-color: var(--aloute-accent-subtle);
}

.interaction-btn-like.is-active {
  color: var(--aloute-danger);
  background-color: var(--aloute-danger-bg);
}

.interaction-count {
  font-size: 0.8125rem;
  font-weight: 500;
}

/* ==========================================================================
   Composer Box / Quick Post Prompt
   ========================================================================== */

.composer-box {
  background-color: var(--aloute-bg-surface);
  border: 1px solid var(--aloute-border-color);
  border-radius: var(--aloute-radius-lg);
  padding: 0;
  margin-bottom: var(--aloute-space-lg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: border-color var(--aloute-transition-fast), box-shadow var(--aloute-transition-fast);
}

.composer-box:hover {
  border-color: var(--aloute-border-strong);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07);
}

.composer-card-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--aloute-space-md) var(--aloute-space-lg);
  color: inherit;
  cursor: pointer;
  border-radius: var(--aloute-radius-lg);
  transition: background-color var(--aloute-transition-fast);
}

.composer-card-link:hover {
  background-color: var(--aloute-bg-surface-hover);
  color: inherit;
}

.composer-card-link:focus-visible {
  outline: none;
  box-shadow: var(--aloute-focus-ring) !important;
}

.composer-support-text {
  color: var(--aloute-text-secondary);
  font-size: 0.875rem;
  margin-top: 0.15rem;
}

.composer-input-placeholder {
  background-color: var(--aloute-bg-surface-elevated);
  border: 1px solid var(--aloute-border-color);
  border-radius: var(--aloute-radius-full);
  padding: 0.625rem 1rem;
  color: var(--aloute-text-muted);
  font-size: 0.9375rem;
  cursor: pointer;
  width: 100%;
  display: block;
  text-decoration: none;
  transition: border-color var(--aloute-transition-fast);
}

.composer-input-placeholder:hover {
  border-color: var(--aloute-border-focus);
  color: var(--aloute-text-secondary);
  text-decoration: none;
}

.post-permissions-panel {
  background-color: var(--aloute-bg-surface-elevated);
  border: 1px solid var(--aloute-border-subtle);
}

/* ==========================================================================
   Form Controls & Inputs
   ========================================================================== */

.form-label {
  color: var(--aloute-text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.375rem;
}

.form-control,
.form-select {
  background-color: var(--aloute-bg-surface-elevated);
  border: 1px solid var(--aloute-border-color);
  color: var(--aloute-text-primary);
  border-radius: var(--aloute-radius-md);
  padding: 0.5rem 0.75rem;
  font-size: var(--aloute-font-size-base);
  line-height: var(--aloute-line-height-base);
  transition: border-color var(--aloute-transition-fast), box-shadow var(--aloute-transition-fast);
}

.form-control:focus,
.form-select:focus {
  background-color: var(--aloute-bg-surface-elevated);
  border-color: var(--aloute-border-focus);
  color: var(--aloute-text-primary);
  outline: none;
  box-shadow: var(--aloute-focus-ring);
}

.form-control::placeholder {
  color: var(--aloute-text-muted);
}

.form-control.is-invalid,
.form-select.is-invalid {
  border-color: var(--aloute-danger);
  box-shadow: none;
}

.form-control.is-invalid:focus,
.form-select.is-invalid:focus {
  box-shadow: 0 0 0 3px var(--aloute-danger-border);
}

.invalid-feedback {
  color: var(--aloute-danger);
  font-size: var(--aloute-font-size-sm);
  margin-top: 0.25rem;
  display: none;
}

.is-invalid ~ .invalid-feedback,
.form-control.is-invalid ~ .invalid-feedback,
.form-select.is-invalid ~ .invalid-feedback,
.was-validated :invalid ~ .invalid-feedback {
  display: block;
}

.form-text {
  color: var(--aloute-text-muted);
  font-size: var(--aloute-font-size-sm);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  font-weight: var(--aloute-font-weight-medium);
  border-radius: var(--aloute-radius-md);
  padding: 0.5rem 1rem;
  font-size: var(--aloute-font-size-base);
  line-height: var(--aloute-line-height-heading);
  transition: all var(--aloute-transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--aloute-focus-ring);
}

.btn-primary {
  background-color: var(--aloute-accent);
  border-color: var(--aloute-accent);
  color: var(--aloute-accent-contrast);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--aloute-accent-hover);
  border-color: var(--aloute-accent-hover);
  color: var(--aloute-accent-contrast);
}

.btn-secondary {
  background-color: var(--aloute-bg-surface-hover);
  border-color: var(--aloute-border-color);
  color: var(--aloute-text-secondary);
}

.btn-secondary:hover,
.btn-secondary:focus {
  background-color: var(--aloute-bg-surface-active);
  border-color: var(--aloute-border-strong);
  color: var(--aloute-text-primary);
}

.btn-outline-primary {
  border-color: var(--aloute-accent);
  color: var(--aloute-accent);
  background: transparent;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background-color: var(--aloute-accent);
  border-color: var(--aloute-accent);
  color: var(--aloute-accent-contrast);
}

.btn-sm {
  padding: 0.25rem 0.625rem;
  font-size: var(--aloute-font-size-sm);
  border-radius: var(--aloute-radius-sm);
}

/* ==========================================================================
   Flash / Alert Feedback
   ========================================================================== */

.alert {
  border-radius: var(--aloute-radius-md);
  padding: 0.75rem 1rem;
  margin-bottom: var(--aloute-space-md);
  font-size: 0.875rem;
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
}

.alert-success {
  background-color: var(--aloute-success-bg);
  border: 1px solid var(--aloute-success-border);
  color: var(--aloute-success);
}

.alert-danger {
  background-color: var(--aloute-danger-bg);
  border: 1px solid var(--aloute-danger-border);
  color: var(--aloute-danger);
}

.alert-warning {
  background-color: var(--aloute-warning-bg);
  border: 1px solid var(--aloute-warning-border);
  color: var(--aloute-warning);
}

.alert-info {
  background-color: var(--aloute-info-bg);
  border: 1px solid var(--aloute-info-border);
  color: var(--aloute-info);
}

/* ==========================================================================
   Authentication Shell Layout
   ========================================================================== */

.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--aloute-space-md);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background-color: var(--aloute-bg-surface);
  border: 1px solid var(--aloute-border-color);
  border-radius: var(--aloute-radius-lg);
  padding: var(--aloute-space-xl);
  box-shadow: var(--aloute-shadow-lg);
}

.auth-card .btn {
  min-height: 44px;
}

.auth-brand {
  text-align: center;
  margin-bottom: var(--aloute-space-lg);
}

.auth-brand-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--aloute-text-primary);
  margin-bottom: 0.25rem;
}

.auth-brand-subtitle {
  color: var(--aloute-text-secondary);
  font-size: 0.875rem;
}

/* ==========================================================================
   User Profile Screen
   ========================================================================== */

.profile-header-card {
  background-color: var(--aloute-bg-surface);
  border: 1px solid var(--aloute-border-color);
  border-radius: var(--aloute-radius-lg);
  overflow: hidden;
  margin-bottom: var(--aloute-space-md);
}

.profile-cover {
  width: 100%;
  aspect-ratio: 3 / 1;
  max-height: 220px;
  background-color: var(--aloute-accent-subtle);
  border-bottom: 1px solid var(--aloute-border-color);
  position: relative;
  overflow: hidden;
}

.profile-cover-placeholder {
  width: 100%;
  height: 100%;
  background-color: var(--aloute-accent-subtle);
}

.profile-header-body {
  position: relative;
  padding: 0 var(--aloute-space-lg) var(--aloute-space-md) var(--aloute-space-lg);
}

.profile-avatar-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--aloute-space-md);
  margin-top: 0;
  margin-bottom: var(--aloute-space-md);
  flex-wrap: wrap;
}

.profile-avatar {
  width: 88px;
  height: 88px;
  border: 4px solid var(--aloute-bg-surface);
  box-shadow: var(--aloute-shadow-sm);
  background-color: var(--aloute-bg-surface);
  margin-top: -44px;
  position: relative;
}

.profile-identity {
  display: flex;
  align-items: flex-start;
  gap: var(--aloute-space-md);
  min-width: 0;
  min-inline-size: 0;
}

.profile-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  margin-bottom: 0.25rem;
}

/* Modern Facebook-Style Profile Action Buttons */
.profile-action-btn-main {
  height: 38px;
  min-height: 38px;
  padding: 0 1.125rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  transition: all 0.15s ease-in-out;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  white-space: nowrap;
  border: 1px solid transparent;
}

.profile-action-btn-main:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.05);
}

.profile-action-btn-main:active {
  transform: translateY(0);
}

/* Primary Follow Button */
.profile-btn-follow {
  background-color: var(--aloute-accent, #0284c7);
  border-color: var(--aloute-accent, #0284c7);
  color: #ffffff !important;
}

.profile-btn-follow:hover {
  background-color: #0369a1;
  border-color: #0369a1;
  color: #ffffff !important;
}

/* Following State / Edit Profile Button */
.profile-btn-following {
  background-color: #f1f5f9;
  border-color: #e2e8f0;
  color: #1e293b !important;
}

[data-theme="dark"] .profile-btn-following {
  background-color: #334155;
  border-color: #475569;
  color: #f8fafc !important;
}

.profile-btn-following:hover {
  background-color: #e2e8f0;
  border-color: #cbd5e1;
  color: #0f172a !important;
}

[data-theme="dark"] .profile-btn-following:hover {
  background-color: #475569;
  color: #ffffff !important;
}

/* Secondary Message Button */
.profile-btn-message {
  background-color: #f8fafc;
  border-color: #e2e8f0;
  color: #1e293b !important;
}

[data-theme="dark"] .profile-btn-message {
  background-color: #1e293b;
  border-color: #334155;
  color: #f8fafc !important;
}

.profile-btn-message:hover {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a !important;
}

/* Sleek Icon More Button (Three dots ...) */
.profile-btn-more {
  width: 38px;
  height: 38px;
  min-width: 38px !important;
  max-width: 38px !important;
  padding: 0 !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #64748b;
  transition: all 0.15s ease-in-out;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  flex: 0 0 38px !important;
}

[data-theme="dark"] .profile-btn-more {
  background-color: #1e293b;
  border-color: #334155;
  color: #94a3b8;
}

.profile-btn-more:hover,
.profile-btn-more:focus,
.profile-btn-more[aria-expanded="true"] {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}

[data-theme="dark"] .profile-btn-more:hover,
[data-theme="dark"] .profile-btn-more:focus {
  background-color: #334155;
  color: #ffffff;
}

/* Hide default Bootstrap dropdown caret */
.profile-btn-more::after {
  display: none !important;
}

/* Dropdown Menu Premium Styling */
.profile-dropdown-menu {
  min-width: 230px !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  border-radius: 12px !important;
  padding: 0.375rem !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.08) !important;
}

[data-theme="dark"] .profile-dropdown-menu {
  background-color: #1e293b !important;
  border-color: #334155 !important;
}

.profile-dropdown-menu .dropdown-item {
  border-radius: 8px !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  padding: 0.5rem 0.75rem !important;
  transition: background-color 0.12s ease;
}

.profile-dropdown-menu .dropdown-item:hover {
  background-color: #f1f5f9 !important;
}

[data-theme="dark"] .profile-dropdown-menu .dropdown-item:hover {
  background-color: #334155 !important;
}

.profile-dropdown-menu .dropdown-item.text-danger:hover {
  background-color: #fef2f2 !important;
  color: #dc2626 !important;
}

[data-theme="dark"] .profile-dropdown-menu .dropdown-item.text-danger:hover {
  background-color: rgba(220, 38, 38, 0.15) !important;
  color: #f87171 !important;
}

.profile-bio {
  word-break: break-word;
  overflow-wrap: break-word;
}

.profile-stats-row {
  display: flex;
  gap: var(--aloute-space-lg);
  margin-top: var(--aloute-space-md);
  padding-top: var(--aloute-space-md);
  border-top: 1px solid var(--aloute-border-subtle);
  flex-wrap: wrap;
}

.profile-stat-item {
  display: flex;
  flex-direction: column;
}

.profile-stat-number {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--aloute-text-primary);
}

.profile-stat-label {
  font-size: 0.8125rem;
  color: var(--aloute-text-muted);
}

/* Profile Navigation Tabs */
.profile-nav-tabs {
  border-top: 1px solid var(--aloute-border-color);
  background-color: var(--aloute-bg-surface);
}

.profile-nav-tabs .nav-tabs {
  border-bottom: none;
  gap: 0.25rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}

.profile-nav-tabs .nav-tabs::-webkit-scrollbar {
  display: none;
}

.profile-nav-tabs .nav-link {
  color: var(--aloute-text-secondary);
  font-weight: 500;
  font-size: 0.875rem;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 0.75rem 1rem;
  background: transparent;
  white-space: nowrap;
  transition: all var(--aloute-transition-fast);
}

.profile-nav-tabs .nav-link:hover {
  color: var(--aloute-text-primary);
  border-bottom-color: var(--aloute-border-color);
}

.profile-nav-tabs .nav-link.active {
  color: var(--aloute-accent);
  font-weight: 600;
  border-bottom-color: var(--aloute-accent);
  background: transparent;
}

/* ==========================================================================
   Right Panel / Info Cards
   ========================================================================== */

.info-card {
  background-color: var(--aloute-bg-surface);
  border: 1px solid var(--aloute-border-color);
  border-radius: var(--aloute-radius-lg);
  padding: var(--aloute-space-md);
  margin-bottom: var(--aloute-space-md);
}

.info-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.info-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.875rem;
}

/* ==========================================================================
   Comments & Replies (Post Detail)
   ========================================================================== */

.comment-card {
  display: flex;
  gap: 0.75rem;
  padding: var(--aloute-space-sm) 0;
  border-bottom: 1px solid var(--aloute-border-subtle);
}

.comment-card:last-child {
  border-bottom: none;
}

.comment-body {
  flex: 1;
  background-color: var(--aloute-bg-surface-elevated);
  border-radius: var(--aloute-radius-md);
  padding: 0.625rem 0.875rem;
}

.comment-author-name {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--aloute-text-primary);
}

.comment-text {
  font-size: 0.875rem;
  color: var(--aloute-text-primary);
  margin-top: 0.25rem;
  white-space: pre-line;
}

/* ==========================================================================
   Empty & Loading States
   ========================================================================== */

.empty-state {
  text-align: center;
  padding: var(--aloute-space-xl) var(--aloute-space-md);
  background-color: var(--aloute-bg-surface);
  border: 1px dashed var(--aloute-border-color);
  border-radius: var(--aloute-radius-lg);
  color: var(--aloute-text-muted);
}

.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: var(--aloute-space-sm);
  color: var(--aloute-text-muted);
}

.empty-state-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--aloute-text-primary);
  margin-bottom: 0.375rem;
}

.empty-state-desc {
  font-size: 0.875rem;
  color: var(--aloute-text-secondary);
  max-width: 360px;
  margin: 0 auto;
}

/* ==========================================================================
   Pagination Component
   ========================================================================== */

.pagination-custom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  margin-top: var(--aloute-space-lg);
  list-style: none;
  padding: 0;
}

.pagination-custom .page-link {
  background-color: var(--aloute-bg-surface);
  border: 1px solid var(--aloute-border-color);
  color: var(--aloute-text-secondary);
  border-radius: var(--aloute-radius-md);
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  min-height: 38px;
  min-width: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all var(--aloute-transition-fast);
}

.pagination-custom .page-link:hover {
  background-color: var(--aloute-bg-surface-hover);
  color: var(--aloute-text-primary);
  border-color: var(--aloute-border-focus);
}

.pagination-custom .page-item.active .page-link {
  background-color: var(--aloute-accent);
  border-color: var(--aloute-accent);
  color: var(--aloute-accent-contrast);
}

.pagination-custom .page-item.disabled .page-link {
  opacity: 0.45;
  pointer-events: none;
}

/* ==========================================================================
   Dropdowns & Modals Overrides
   ========================================================================== */

.dropdown-menu {
  background-color: var(--aloute-bg-surface-elevated);
  border: 1px solid var(--aloute-border-color);
  border-radius: var(--aloute-radius-md);
  box-shadow: var(--aloute-shadow-lg);
  padding: 0.375rem;
}

.dropdown-item {
  color: var(--aloute-text-primary);
  border-radius: var(--aloute-radius-sm);
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background-color: var(--aloute-bg-surface-hover);
  color: var(--aloute-text-primary);
}

.dropdown-divider {
  border-top-color: var(--aloute-border-subtle);
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */

@media (max-width: 1199.98px) {
  .aloute-right-panel {
    display: none;
  }
}

@media (max-width: 767.98px) {
  .aloute-layout-container {
    padding: var(--aloute-space-sm);
  }

  .aloute-layout-container > .row {
    --bs-gutter-x: 0;
    margin-left: 0;
    margin-right: 0;
  }

  .aloute-layout-container > .row > [class*="col"] {
    padding-left: 0;
    padding-right: 0;
  }

  .aloute-left-panel {
    display: none;
  }

  .aloute-navbar {
    padding: 0 var(--aloute-space-sm);
  }

  .aloute-navbar .navbar-brand {
    margin-right: 0;
    gap: var(--aloute-space-xs);
  }

  .aloute-navbar .container-fluid > .d-flex {
    gap: var(--aloute-space-xs) !important;
  }

  .aloute-navbar .aloute-user-dropdown-btn {
    gap: var(--aloute-space-xs) !important;
  }

  .aloute-navbar .aloute-search-box {
    max-width: 240px;
    /* Let the search box shrink instead of forcing the navbar row wider than the
       viewport. It keeps its 180px preferred width but may shrink when the row
       is tight, so the navbar row never exceeds the viewport width. */
    min-width: 0;
    flex: 1 1 180px;
  }

  .auth-card {
    padding: var(--aloute-space-lg);
  }

  /* Profile mobile adaptations */
  .profile-header-body {
    padding: 0 var(--aloute-space-md) var(--aloute-space-md) var(--aloute-space-md);
  }

  .profile-avatar-row {
    margin-top: 0;
    flex-direction: column;
    align-items: stretch;
    gap: var(--aloute-space-sm);
  }

  .profile-avatar {
    margin-top: -36px;
  }

  .profile-identity {
    width: 100%;
    align-items: flex-start;
  }

  .profile-actions {
    width: 100%;
    margin-top: var(--aloute-space-xs);
    display: flex;
    gap: 0.5rem;
  }

  .profile-actions .profile-action-btn-main {
    flex: 1;
    min-height: 40px;
  }

  .profile-actions .profile-btn-more {
    flex: 0 0 40px !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
  }

  .interaction-btn {
    min-height: 44px;
    min-width: 44px;
  }

  .auth-card .btn {
    min-height: 44px;
  }

  #btn-create-post {
    min-height: 44px;
    min-width: 44px;
  }


  /* Profile categories remain fully visible on narrow screens. */
  .profile-nav-tabs .nav-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--aloute-space-xs);
    overflow-x: visible;
    padding-top: var(--aloute-space-xs);
    padding-bottom: var(--aloute-space-xs);
  }

  .profile-nav-tabs .nav-item {
    min-width: 0;
  }

  .profile-nav-tabs .nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.125rem;
    width: 100%;
    min-height: 44px;
    padding: 0.625rem 0.375rem;
  }

  /* Accessible touch targets on mobile */
  .dropdown-item {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 0.625rem 1rem;
  }

  .profile-nav-tabs .nav-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0.625rem 0.875rem;
    font-size: 0.8125rem;
  }

  .profile-stats-row {
    gap: var(--aloute-space-md);
    justify-content: space-around;
  }

  .profile-stat-item {
    align-items: center;
    text-align: center;
  }

  /* Prevent card / form horizontal overflow */
  .aloute-card {
    overflow-wrap: break-word;
    word-break: break-word;
  }
}

/* Stable Action & Follow Button Touch Targets (>= 44px WCAG Target) */
.aloute-follow-btn,
.aloute-action-btn {
  min-height: 44px;
  min-width: 120px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* User Account Dropdown Trigger Touch Target (>= 44x44px hit area) */
.aloute-user-dropdown-btn {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.5rem;
  border-radius: var(--aloute-radius-full);
}

.aloute-user-dropdown-btn:focus-visible {
  outline: none;
  box-shadow: var(--aloute-focus-ring);
}

/* Edit Profile Modal Interactive Touch Targets (approx. 44px) */
#editProfileModal .btn-close {
  min-width: 44px;
  min-height: 44px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  margin: -0.5rem -0.5rem -0.5rem auto;
}

#editProfileModal .modal-footer .btn {
  min-height: 44px;
  min-width: 80px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem;
}

/* Feed Composer Shortcuts: Non-breaking compact wrapping */
.aloute-composer-shortcut {
  white-space: nowrap;
  font-size: 0.8125rem;
  padding: 0.25rem 0.5rem;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}

/* Smallest project-owned semantic utility for flex shrink & truncation */
.aloute-min-w-0 {
  min-width: 0;
  min-inline-size: 0;
}

/* ==========================================================================
   Messaging Feature (Two-Pane Layout, Bubbles, Responsive, Accessibility)
   ========================================================================== */

.aloute-messaging-wrapper {
  width: 100%;
}

.aloute-messaging-card {
  background-color: var(--aloute-bg-surface);
  border: 1px solid var(--aloute-border-color);
  border-radius: var(--aloute-radius-lg);
  box-shadow: var(--aloute-shadow-sm);
  display: flex;
  height: 680px;
  max-height: calc(100vh - 140px);
  overflow: hidden;
}

.aloute-conversation-pane {
  width: 320px;
  min-width: 280px;
  border-right: 1px solid var(--aloute-border-color);
  display: flex;
  flex-direction: column;
  background-color: var(--aloute-bg-surface);
  flex-shrink: 0;
}

.aloute-conversation-header {
  padding: var(--aloute-space-md);
  border-bottom: 1px solid var(--aloute-border-color);
  background-color: var(--aloute-bg-surface);
}

.aloute-conversation-list {
  flex: 1;
  overflow-y: auto;
  list-style: none;
  padding: 0;
  margin: 0;
}

.aloute-conversation-item {
  display: flex;
  align-items: center;
  gap: var(--aloute-space-sm);
  padding: var(--aloute-space-md);
  border-bottom: 1px solid var(--aloute-border-subtle);
  cursor: pointer;
  transition: background-color var(--aloute-transition-fast);
  text-decoration: none;
  color: inherit;
}

.aloute-conversation-item:hover,
.aloute-conversation-item:focus-visible {
  background-color: var(--aloute-bg-surface-hover);
  outline: none;
}

.aloute-conversation-item.active {
  background-color: var(--aloute-accent-subtle);
  border-left: 3px solid var(--aloute-accent);
}

.aloute-chat-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: var(--aloute-bg-body);
  min-width: 0;
}

.aloute-chat-header {
  padding: var(--aloute-space-md);
  background-color: var(--aloute-bg-surface);
  border-bottom: 1px solid var(--aloute-border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.aloute-chat-history {
  flex: 1;
  overflow-y: auto;
  padding: var(--aloute-space-md);
  display: flex;
  flex-direction: column;
  gap: var(--aloute-space-sm);
}

.aloute-message-bubble {
  max-width: 75%;
  padding: 0.625rem 0.875rem;
  border-radius: var(--aloute-radius-md);
  word-break: break-word;
  position: relative;
  font-size: 0.9375rem;
  line-height: 1.45;
}

.aloute-message-bubble.incoming {
  align-self: flex-start;
  background-color: var(--aloute-bg-surface);
  color: var(--aloute-text-primary);
  border: 1px solid var(--aloute-border-color);
  border-bottom-left-radius: var(--aloute-radius-sm);
}

.aloute-message-bubble.outgoing {
  align-self: flex-end;
  background-color: var(--aloute-accent);
  color: var(--aloute-accent-contrast);
  border-bottom-right-radius: var(--aloute-radius-sm);
}

.aloute-message-time {
  font-size: 0.75rem;
  margin-top: 0.25rem;
  display: block;
  opacity: 0.75;
}

.aloute-message-bubble.incoming .aloute-message-time {
  color: var(--aloute-text-muted);
}

.aloute-message-bubble.outgoing .aloute-message-time {
  color: var(--aloute-accent-contrast);
  text-align: right;
}

.aloute-chat-composer {
  padding: var(--aloute-space-md);
  background-color: var(--aloute-bg-surface);
  border-top: 1px solid var(--aloute-border-color);
}

/* Mobile Responsive Switching for Messaging */
@media (max-width: 767.98px) {
  .aloute-messaging-card {
    height: calc(100vh - 120px);
  }

  .aloute-conversation-pane {
    width: 100%;
    border-right: none;
  }

  .aloute-chat-pane {
    width: 100%;
  }

  .aloute-messaging-card.show-chat .aloute-conversation-pane {
    display: none !important;
  }

  .aloute-messaging-card:not(.show-chat) .aloute-chat-pane {
    display: none !important;
  }
}

/* ==========================================================================
   Notification Feature (List, Badges, Tabs, Responsive, Unread States)
   ========================================================================== */

.aloute-notifications-wrapper {
  width: 100%;
}

.aloute-notification-card {
  background-color: var(--aloute-bg-surface);
  border: 1px solid var(--aloute-border-color);
  border-radius: var(--aloute-radius-lg);
  box-shadow: var(--aloute-shadow-sm);
  overflow: hidden;
}

.aloute-notification-header {
  padding: var(--aloute-space-md);
  border-bottom: 1px solid var(--aloute-border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--aloute-space-sm);
}

.aloute-notification-tabs {
  padding: 0 var(--aloute-space-md);
  border-bottom: 1px solid var(--aloute-border-color);
  background-color: var(--aloute-bg-surface);
  overflow-x: auto;
  white-space: nowrap;
}

.aloute-notification-tabs .nav-link {
  color: var(--aloute-text-secondary);
  font-weight: 500;
  padding: 0.75rem 1rem;
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  border-radius: 0;
}

.aloute-notification-tabs .nav-link.active {
  color: var(--aloute-accent);
  border-bottom-color: var(--aloute-accent);
  background: none;
}

.aloute-notification-item {
  display: flex;
  align-items: flex-start;
  gap: var(--aloute-space-md);
  padding: var(--aloute-space-md);
  border-bottom: 1px solid var(--aloute-border-subtle);
  background-color: var(--aloute-bg-surface);
  transition: background-color var(--aloute-transition-fast);
  position: relative;
}

.aloute-notification-item:hover {
  background-color: var(--aloute-bg-surface-hover);
}

.aloute-notification-item.unread {
  background-color: var(--aloute-accent-subtle);
  border-left: 3px solid var(--aloute-accent);
}

.aloute-notification-item-dot {
  width: 8px;
  height: 8px;
  background-color: var(--aloute-accent);
  border-radius: var(--aloute-radius-full);
  display: inline-block;
  flex-shrink: 0;
  margin-top: 6px;
}

.aloute-notification-actor-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--aloute-radius-full);
  object-fit: cover;
  flex-shrink: 0;
}

.aloute-notification-icon-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 20px;
  height: 20px;
  border-radius: var(--aloute-radius-full);
  background-color: var(--aloute-bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  box-shadow: var(--aloute-shadow-sm);
}

/* ==========================================================================
   Accessibility: Touch Targets (>= 44px) for Messaging & Notifications
   ========================================================================== */

#btn-back-to-conversations,
#btn-refresh-messages,
#btn-refresh-notifications,
#btn-send-message {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#btn-mark-all-read,
#btn-load-more-notifications,
#btn-retry-notifications,
#btn-retry-conversations,
#btn-load-more-conversations,
#btn-load-older-messages,
#btn-retry-messages,
#btn-retry-send,
#btn-direct-message {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.aloute-notification-tabs .nav-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.aloute-notification-item .btn-mark-read,
.aloute-notification-item .btn-delete-notif {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   Navbar Notification Dropdown & Preview Panel
   ========================================================================== */

.aloute-notification-dropdown {
  position: relative;
}

.aloute-notification-preview-menu {
  width: 360px;
  max-width: calc(100vw - 20px);
  border: 1px solid var(--aloute-border-color, #e2e8f0);
  border-radius: var(--aloute-radius-md, 0.5rem);
  overflow: hidden;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  z-index: 1055;
}

.aloute-notification-preview-list {
  max-height: 380px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.aloute-notification-preview-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: var(--aloute-text-primary, #0f172a);
  border-bottom: 1px solid var(--aloute-border-subtle, #f1f5f9);
  transition: background-color 0.15s ease;
  position: relative;
  cursor: pointer;
}

.aloute-notification-preview-item:hover,
.aloute-notification-preview-item:focus-visible {
  background-color: var(--aloute-bg-surface-hover, #f8fafc);
  outline: none;
}

.aloute-notification-preview-item.unread {
  background-color: #f0f7ff;
}

.aloute-notification-preview-item.unread:hover {
  background-color: #e2effe;
}

.aloute-preview-unread-dot {
  width: 8px;
  height: 8px;
  background-color: var(--aloute-accent, #2563eb);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 0.4rem;
}

.aloute-notification-preview-item .aloute-preview-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

/* Mobile Navbar (< 576px) Responsive Layout & Touch Targets */
@media (max-width: 575.98px) {
  .aloute-navbar {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }
  .aloute-navbar .navbar-brand {
    font-size: 1.15rem;
    margin-right: 0;
    gap: 0.25rem !important;
  }
  .aloute-navbar .badge-brand {
    display: none !important;
  }
  .aloute-navbar .d-flex.align-items-center.gap-2 {
    gap: 0.35rem !important;
  }
  .aloute-navbar .d-flex.align-items-center.gap-1 {
    gap: 0.25rem !important;
  }
  .aloute-navbar .btn-link.p-1,
  .aloute-navbar .navbar-notification-link {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
  }
  .aloute-user-dropdown-btn {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  /* The avatar alone identifies the account menu on small screens, so the chevron is
     redundant there. The button keeps its 44px minimum width, so this returns roughly
     10px to a navbar row that is already tight. */
  .aloute-navbar .aloute-user-dropdown-chevron {
    display: none !important;
  }
  .aloute-notification-preview-menu {
    position: fixed !important;
    top: 56px !important;
    left: 10px !important;
    right: 10px !important;
    width: auto !important;
    max-width: none !important;
    transform: none !important;
  }
}
/* ==========================================================================
   Small Tablet / Large Phone Navbar (< 640px)
   Between the mobile navbar (< 576px) and the desktop navbar (>= 768px) the row
   still carries the "Campus" badge next to the logo, which pushes the row wider
   than the viewport on 576-639px screens. The badge is decorative (the wordmark
   already carries the brand), so it is dropped on these widths as well.
   ========================================================================== */

@media (max-width: 639.98px) {
  .aloute-navbar .badge-brand {
    display: none !important;
  }
}

/* ==========================================================================
   Very Narrow Mobile Navbar (< 420px)
   The navbar row needs ~410px of content (hamburger + brand + search icon on the
   left, create post + messages + notifications + account on the right). Below
   ~420px the row no longer fits and the right-hand controls are pushed past the
   viewport edge. Because the page body already hides horizontal overflow, those
   controls are clipped rather than scrolled, which left the account menu (profile,
   saved posts, logout) unreachable on a 320px screen.
   Hide the brand wordmark (the logo mark and the /feed link stay, and the logo
   keeps alt="AloUTE" for assistive technology) and tighten the outer padding so
   the row fits down to 320px.
   ========================================================================== */

@media (max-width: 419.98px) {
  .aloute-navbar {
    padding-left: 0.25rem !important;
    padding-right: 0.25rem !important;
  }
  .aloute-navbar .aloute-navbar-wordmark {
    display: none !important;
  }
}
/* ==========================================================================
   Community Detail Header
   ========================================================================== */

.community-cover-box {
  height: 120px;
  background: linear-gradient(135deg, var(--aloute-accent, #2563eb), #0f172a);
  position: relative;
}

/* ==========================================================================
   Accessibility: Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none;
    animation: none;
    scroll-behavior: auto;
  }
}
