/* ==========================================================================
   🏘️ Community Barter — Warm Neighborhood Design System (v2)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&family=Sora:wght@400;500;600;700;800&display=swap');

:root {
  /* ── Warm Community Color Palette ── */
  --bg-main: #13100e;
  /* Deep warm charcoal */
  --bg-surface: #1c1714;
  /* Warm dark brown */
  --bg-surface-elevated: #252018;
  /* Slightly lighter */
  --border-color: #33291f;
  /* Warm border */

  /* Primary: Warm amber/orange — community, warmth, trust */
  --primary: #e8975a;
  --primary-hover: #d4793c;
  --primary-glow: rgba(0, 0, 0, 0.25);

  /* Accent: Sage green — nature, neighborhood, trust */
  --accent: #6fb08a;
  --accent-hover: #4e9169;
  --accent-glow: rgba(0, 0, 0, 0.2);

  /* Highlight: Warm gold for donors/rewards */
  --gold: #d4a843;
  --gold-glow: rgba(0, 0, 0, 0.25);

  /* Danger */
  --danger: #c0392b;
  --danger-hover: #a93226;
  --danger-glow: rgba(0, 0, 0, 0.25);

  /* Text */
  --text-main: #f2ead8;
  /* Warm off-white */
  --text-secondary: #b5a896;
  /* Warm muted */
  --text-muted: #7a6e62;

  /* Fonts */
  --font-display: 'Outfit', 'Sora', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  /* Glassmorphism */
  --glass-bg: rgba(28, 23, 20, 0.8);
  --glass-border: rgba(232, 151, 90, 0.08);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.55);
  --shadow-warm: 0 2px 12px rgba(0, 0, 0, 0.4);

  /* Transitions */
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);

  /* Sidebar width */
  --sidebar-w: 300px;
}

/* ── Reset ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  line-height: 1.65;
  overflow-x: hidden;
  background-image:
    radial-gradient(ellipse at 20% 10%, rgba(232, 151, 90, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 90%, rgba(111, 176, 138, 0.04) 0%, transparent 50%);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
  line-height: 1.25;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary-hover);
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ── Core Layout ── */
.app-container {
  display: flex;
  min-height: 100vh;
}

.layout-grid {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  width: 100%;
  min-height: 100vh;
}

.layout-grid > :nth-child(2) {
  margin-left: var(--sidebar-w);
}

/* ── Sidebar ── */
aside.sidebar {
  background: linear-gradient(180deg, #1a1410 0%, #13100e 100%);
  border-right: 1px solid var(--border-color);
  padding: 1.75rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  overflow-y: auto;
  width: var(--sidebar-w);
  z-index: 100;
}

/* Logo area */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-logo-icon {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #fff;
  box-shadow: 0 4px 12px var(--primary-glow);
  flex-shrink: 0;
}

.sidebar-logo h1 {
  font-size: 1.15rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sidebar-logo span {
  font-size: 0.6rem;
  color: var(--primary);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.06em;
  display: block;
  margin-top: 2px;
}

/* Nav buttons */
aside.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
}

aside.sidebar nav .btn {
  width: 100%;
  justify-content: flex-start;
  font-size: 0.875rem;
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
}

aside.sidebar nav .btn.active {
  background: rgba(232, 151, 90, 0.12) !important;
  color: var(--primary) !important;
  border-color: rgba(232, 151, 90, 0.25) !important;
}

aside.sidebar nav .btn i {
  width: 18px;
}

/* ── Main content ── */
main.content-area {
  padding: 2rem 2.5rem;
  overflow-y: auto;
  max-height: 100vh;
  flex-grow: 1;
}

/* ── Glass panels ── */
.glass-panel {
  background: rgba(28, 23, 20, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
}

/* ── Buttons ── */
.btn {
  font-family: var(--font-display);
  font-weight: 600;
  padding: 0.7rem 1.35rem;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition);
  font-size: 0.9rem;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-primary:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  color: #fff;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-color);
  color: var(--text-secondary);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-main);
  border-color: rgba(232, 151, 90, 0.2);
}

.btn-tier.active {
  background: rgba(16, 185, 129, 0.15) !important;
  color: #fff !important;
  border-color: var(--accent) !important;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-accent:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  color: #fff;
}

.btn-danger {
  background: rgba(192, 57, 43, 0.15);
  color: #e57373;
  border-color: rgba(192, 57, 43, 0.3);
}

.btn-danger:hover {
  background: rgba(192, 57, 43, 0.25);
  color: #fff;
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold), #b8860b);
  color: #1a1200;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  font-weight: 800;
}

.btn-gold:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* ── Badge System ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.22rem 0.6rem;
  border-radius: 99px;
  font-family: var(--font-display);
  border: 1px solid transparent;
}

/* Verified Neighbor */
.badge-verified {
  background: rgba(111, 176, 138, 0.12);
  color: var(--accent);
  border-color: rgba(111, 176, 138, 0.3);
}

/* Site Admin */
.badge-admin {
  background: rgba(194, 120, 3, 0.12);
  color: #fbbf24;
  border-color: rgba(194, 120, 3, 0.35);
}

/* Top Supporter */
.badge-top-supporter {
  background: rgba(212, 163, 89, 0.12);
  color: #eab308;
  border-color: rgba(212, 163, 89, 0.35);
}

/* Site Supporter */
.badge-supporter {
  background: rgba(212, 168, 67, 0.08);
  color: #fbbf24;
  border-color: rgba(212, 168, 67, 0.25);
}

/* Trusted Helper */
.badge-trusted {
  background: rgba(232, 151, 90, 0.08);
  color: #f59e0b;
  border-color: rgba(232, 151, 90, 0.25);
}

/* New Member */
.badge-new {
  background: rgba(111, 176, 138, 0.08);
  color: #86efac;
  border-color: rgba(111, 176, 138, 0.2);
}

/* Police Verified LEO Badge */
.badge-police {
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.35);
  font-weight: 700;
}

/* ── Forms ── */
.form-group {
  margin-bottom: 1.15rem;
}

.form-group label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-input {
  width: 100%;
  padding: 0.7rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 9px;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: var(--transition);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(232, 151, 90, 0.04);
  box-shadow: 0 0 0 3px rgba(232, 151, 90, 0.12);
}

.form-input::placeholder {
  color: var(--text-muted);
}

/* ── Job cards ── */
.job-card {
  border: 1px solid var(--border-color);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.job-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.job-card:hover {
  border-color: rgba(232, 151, 90, 0.3);
  box-shadow: var(--shadow-warm);
  transform: translateY(-2px);
}

.job-card:hover::before {
  opacity: 1;
}

/* ── Modals ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13, 10, 8, 0.88);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  max-width: 500px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 2rem;
  transform: scale(0.92) translateY(8px);
  transition: transform 0.25s ease;
}

.modal-overlay.active .modal-content {
  transform: scale(1) translateY(0);
}

/* ── Sidebar user card ── */
.sidebar-user-card {
  background: rgba(232, 151, 90, 0.05);
  border: 1px solid rgba(232, 151, 90, 0.12);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.sidebar-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(232, 151, 90, 0.15);
  border: 2px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.75rem;
  color: var(--primary);
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-display);
  flex-shrink: 0;
  overflow: hidden;
}

.sidebar-avatar:hover {
  background: rgba(232, 151, 90, 0.25);
  transform: scale(1.05);
}

/* ── Dividers & misc ── */
.section-divider {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 1.5rem 0;
}

/* ── Safety tip panel ── */
.safety-tips {
  background: rgba(111, 176, 138, 0.04);
  border: 1px solid rgba(111, 176, 138, 0.12);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  font-size: 0.74rem;
  color: var(--text-secondary);
}

.safety-tips .tip-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent);
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 0.78rem;
  margin-bottom: 0.6rem;
}

.safety-tips ul {
  padding-left: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  line-height: 1.4;
}

/* ── Animations ── */
@keyframes pulse-gold {

  0%,
  100% {
    border-color: rgba(212, 168, 67, 0.35);
  }

  50% {
    border-color: rgba(212, 168, 67, 0.85);
  }
}

@keyframes alarm-pulse {

  0%,
  100% {
    border-color: rgba(192, 57, 43, 0.35);
  }

  50% {
    border-color: rgba(192, 57, 43, 0.85);
    background: rgba(192, 57, 43, 0.05);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Responsive & Mobile Header Drawer System ── */
.mobile-nav-toggle-btn {
  display: none;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  transition: var(--transition);
  margin-left: auto;
}

.mobile-nav-toggle-btn:hover {
  color: var(--primary);
  background: rgba(232, 151, 90, 0.08);
}

@media (max-width: 1024px) {
  .layout-grid {
    grid-template-columns: 1fr;
  }

  .layout-grid > :nth-child(2) {
    margin-left: 0;
  }

  .mobile-nav-toggle-btn {
    display: block;
  }

  aside.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 65px;
    /* Compact top header bar */
    padding: 0.75rem 1.25rem;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    z-index: 1001;
    overflow-y: visible;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    border-right: none;
    transition: var(--transition);
  }

  /* Make Logo Area compact and fit row */
  aside.sidebar .sidebar-logo {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }

  /* Hide elements on collapsed mobile header */
  aside.sidebar nav,
  aside.sidebar>div:nth-child(2),
  aside.sidebar>div:first-child>div:not(.sidebar-logo),
  aside.sidebar:not(.mobile-open) .auth-trigger-btn,
  aside.sidebar:not(.mobile-open) #btn-sidebar-auth {
    display: none !important;
  }

  /* Expanded mobile drawer panel */
  aside.sidebar.mobile-open {
    height: 100vh;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    background: linear-gradient(180deg, #1c1714 0%, #13100e 100%);
    overflow-y: auto;
    gap: 1.5rem;
  }

  aside.sidebar.mobile-open .sidebar-logo {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    width: 100%;
    margin-bottom: 0.5rem;
  }

  aside.sidebar.mobile-open nav {
    display: flex !important;
    flex-direction: column;
    gap: 0.4rem;
  }

  aside.sidebar.mobile-open>div:first-child>div:not(.sidebar-logo) {
    display: block !important;
  }

  aside.sidebar.mobile-open>div:nth-child(2) {
    display: block !important;
  }

  aside.sidebar.mobile-open .sidebar-user-card {
    display: flex !important;
    margin-top: 0;
    border-top: 1px solid var(--border-color);
    padding-top: 1.25rem;
  }

  aside.sidebar.mobile-open #btn-sidebar-auth,
  aside.sidebar.mobile-open .auth-trigger-btn {
    display: inline-flex !important;
    width: 100%;
    justify-content: center;
    margin-top: 0.75rem;
  }

  aside.sidebar.mobile-open .glass-panel,
  aside.sidebar.mobile-open .safety-tips {
    display: block !important;
  }

  aside.sidebar.mobile-open #nav-audit-link {
    display: inline-flex !important;
    width: 100%;
    margin-top: auto;
  }

  main.content-area {
    margin-top: 65px;
    /* Offset for mobile top header bar */
    padding: 1.25rem;
    max-height: none;
  }
}

@media (max-width: 768px) {

  body,
  html {
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  .app-container,
  .layout-grid,
  main.content-area {
    max-width: 100vw !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Dynamic form & column auto-stacking */
  .grid-2col,
  .grid-3col,
  .dashboard-stats,
  .form-row,
  .profile-grid,
  .support-grid {
    grid-template-columns: 1fr !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 1.25rem !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  .profile-grid>div {
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Main core layout stacking */
  .layout-grid {
    grid-template-columns: 1fr !important;
    display: flex !important;
    flex-direction: column !important;
  }

  /* Make sidebar behave like a header/menu on mobile */
  aside.sidebar {
    width: 100% !important;
    max-width: 100vw !important;
    height: auto !important;
    position: static !important;
    border-right: none !important;
    border-bottom: 1px solid var(--border-color);
  }

  main.content-area {
    padding: 1.25rem !important;
    max-height: none !important;
    overflow-y: visible !important;
  }

  /* Compact headers for mobile */
  main.content-area h1 {
    font-size: 1.75rem;
  }
}

/* ── Responsive Tables ── */
.table-responsive {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1rem;
}

.table-responsive::-webkit-scrollbar {
  height: 5px;
}

/* ── Responsive Layout Grid Utilities ── */
.grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.grid-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.grid-4col {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

/* ── Profile Layout & Headers ── */
.header-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.75rem;
  gap: 1.25rem;
}

.profile-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
}

/* ── Secure Chat Messenger System ── */
.chat-container {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: 480px;
  max-height: 550px;
  overflow: hidden;
}

.chat-channels-pane {
  display: flex !important;
  flex-direction: column;
}

.chat-pane-column {
  display: flex !important;
  flex-direction: column;
}

.chat-mobile-back-btn {
  display: none !important;
}

/* ── Support Layout ── */
.support-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  align-items: start;
}

.tier-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

/* ── Responsive Breakpoints ── */
@media (max-width: 768px) {

  .grid-2col,
  .grid-3col,
  .grid-4col {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }

  .profile-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  /* Chat split-screen overlay system for mobile viewports */
  .chat-container {
    grid-template-columns: 1fr !important;
    position: relative;
    max-height: none;
    height: 520px;
  }

  .chat-container .chat-channels-pane {
    display: flex !important;
    width: 100% !important;
    height: 100% !important;
  }

  .chat-container .chat-pane-column {
    display: none !important;
  }

  .chat-container.chat-room-active .chat-channels-pane {
    display: none !important;
  }

  .chat-container.chat-room-active .chat-pane-column {
    display: flex !important;
    width: 100% !important;
    height: 100% !important;
  }

  .chat-mobile-back-btn {
    display: inline-flex !important;
  }

  .support-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  .tier-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem !important;
  }
}

@media (max-width: 600px) {
  .header-strip {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    width: 100%;
  }

  .header-strip>div:last-child,
  .header-strip>a {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    width: 100%;
  }

  .header-strip>div:last-child .btn,
  .header-strip>div:last-child a.btn,
  .header-strip>a.btn {
    flex: 1;
    min-width: 80px;
    justify-content: center;
    text-align: center;
  }
}

/* ==========================================================================
   🔑 Premium Form Inputs & Autofill overrides
   ========================================================================== */
.auth-input-wrapper {
  position: relative;
  width: 100%;
}

.auth-input-wrapper i {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted) !important;
  font-size: 0.95rem;
  pointer-events: none;
  transition: var(--transition);
  z-index: 10;
}

.auth-input {
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 0.85rem 1rem 0.85rem 2.75rem !important;
  background: #1c1815 !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 10px !important;
  color: #ffffff !important;
  font-size: 0.9rem !important;
  font-family: 'Inter', sans-serif !important;
  outline: none !important;
  transition: var(--transition) !important;
  box-shadow: none !important;
  height: 48px !important;
  /* Explicit standard height to prevent squishing */
}

.auth-input:focus {
  border-color: var(--primary) !important;
  background: #231d19 !important;
  box-shadow: 0 0 0 3px rgba(232, 151, 90, 0.15) !important;
}

.auth-input:focus+i {
  color: var(--primary) !important;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-text-fill-color: #ffffff !important;
  -webkit-box-shadow: 0 0 0 30px #1c1815 inset !important;
  box-shadow: 0 0 0 30px #1c1815 inset !important;
  transition: background-color 5000s ease-in-out 0s;
}

input:-webkit-autofill::first-line {
  font-family: 'Inter', sans-serif !important;
  font-size: 0.9rem !important;
  color: #ffffff !important;
}

/* ==========================================================================
   ✨ Global Animations & Micro-interactions
   ========================================================================== */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.92);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse-glow {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(232, 151, 90, 0.4);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(232, 151, 90, 0);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-6px);
  }
}

@keyframes spin-slow {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes alarm-pulse {

  0%,
  100% {
    border-color: rgba(239, 68, 68, 0.15);
    box-shadow: none;
  }

  50% {
    border-color: rgba(239, 68, 68, 0.5);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
  }
}

@keyframes badge-pop {
  0% {
    transform: scale(0.5) rotate(-10deg);
    opacity: 0;
  }

  70% {
    transform: scale(1.15) rotate(3deg);
  }

  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

@keyframes toast-slide-in {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Utility animation classes */
.animate-fade-in {
  animation: fadeIn 0.4s ease-out both;
}

.animate-fade-in-up {
  animation: fadeInUp 0.5s ease-out both;
}

.animate-fade-in-scale {
  animation: fadeInScale 0.35s ease-out both;
}

.animate-slide-left {
  animation: slideInLeft 0.4s ease-out both;
}

.animate-slide-right {
  animation: slideInRight 0.4s ease-out both;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

/* Stagger delays for lists */
.stagger-1 {
  animation-delay: 0.05s;
}

.stagger-2 {
  animation-delay: 0.10s;
}

.stagger-3 {
  animation-delay: 0.15s;
}

.stagger-4 {
  animation-delay: 0.20s;
}

.stagger-5 {
  animation-delay: 0.25s;
}

/* Hover lift on interactive cards */
.hover-lift {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.hover-lift:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  border-color: rgba(232, 151, 90, 0.2);
}

/* Page entry animation — applied to .content-area */
main.content-area {
  animation: fadeIn 0.35s ease-out;
}

/* ==========================================================================
   🏅 First-100 "Founding Member" Badge
   ========================================================================== */
.badge-founding {
  background: linear-gradient(135deg, #d4a843, #f59e0b);
  border: 1px solid #f59e0b;
  color: #000;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.58rem;
  letter-spacing: 0.04em;
  animation: badge-pop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

/* ==========================================================================
   🎯 New User Tour Spotlight
   ========================================================================== */
.tour-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(2px);
  z-index: 9990;
  pointer-events: none;
}

.tour-tooltip {
  position: fixed;
  z-index: 9999;
  background: linear-gradient(135deg, #1c1714, #252018);
  border: 1px solid var(--primary);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  max-width: 320px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(232, 151, 90, 0.1);
  animation: fadeInScale 0.3s ease-out;
  pointer-events: all;
}

.tour-tooltip h4 {
  color: var(--primary);
  font-size: 1rem;
  margin-bottom: 0.5rem;
  font-family: var(--font-display);
}

.tour-tooltip p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.tour-progress {
  display: flex;
  gap: 4px;
  margin-bottom: 1rem;
}

.tour-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border-color);
  transition: background 0.2s;
}

.tour-dot.active {
  background: var(--primary);
}

.tour-btn-row {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.tour-btn {
  font-family: var(--font-display);
  font-weight: 700;
  padding: 0.4rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.82rem;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.tour-btn-skip {
  background: transparent;
  border-color: var(--border-color);
  color: var(--text-muted);
}

.tour-btn-skip:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.tour-btn-next {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #fff;
}

.tour-btn-next:hover {
  filter: brightness(1.1);
}

/* ==========================================================================
   ⚙️ Settings Modal
   ========================================================================== */
.settings-section {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
  background: rgba(255, 255, 255, 0.01);
  animation: fadeInUp 0.4s ease-out both;
}

.settings-section h4 {
  font-size: 0.85rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.settings-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.88rem;
}

.settings-row:last-child {
  border-bottom: none;
}

.settings-row label {
  color: var(--text-secondary);
}

.toggle-switch {
  position: relative;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--border-color);
  border-radius: 24px;
  transition: 0.3s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.3s;
}

.toggle-switch input:checked+.toggle-slider {
  background: var(--primary);
}

.toggle-switch input:checked+.toggle-slider::before {
  transform: translateX(18px);
}

/* ==========================================================================
   🚫 Block System Styles
   ========================================================================== */
.blocked-user-card {
  opacity: 0.4;
  pointer-events: none;
  filter: blur(1px);
}

.block-wall {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(239, 68, 68, 0.04);
  border: 1px solid rgba(239, 68, 68, 0.1);
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* ==========================================================================
   📰 Feed & Post Styles (Reused in Feed and Profiles)
   ========================================================================== */
.feed-post {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  animation: fadeIn 0.4s ease-out;
  transition: transform 0.2s, border-color 0.2s;
}
.feed-post:hover {
  border-color: rgba(255,255,255,0.1);
  transform: translateY(-2px);
}

.post-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.post-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #000;
  font-size: 1.1rem;
  border: 2px solid var(--border-color);
  overflow: hidden;
}

.post-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-content {
  color: #fff;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  word-wrap: break-word;
}

.post-image {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1rem;
  border: 1px solid var(--border-color);
}

.post-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 0.85rem;
}

.action-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.2s;
}
.action-btn:hover { color: #fff; }
.action-btn.liked { color: #ef4444; }

.category-badge {
  font-size: 0.65rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
}