/* ==========================================================================
   CLASSIFICADOS LOCAL - INTERNATIONAL DESIGN SYSTEM (VANILLA CSS)
   Aesthetics: Modern, Ultra-Fast, Glassmorphism, Dual-Theme (Light & Dark)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* --- Root Variables: Design Tokens (Light Theme Default) --- */
:root {
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Color Palette - Light */
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-hover: #e2e8f0;
  
  --border-color: #e2e8f0;
  --border-subtle: #f1f5f9;
  --border-focus: #6366f1;

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  --text-inverse: #ffffff;

  /* Brand Accents */
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;
  --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;

  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(226, 232, 240, 0.8);
  --glass-blur: blur(16px);
  --glass-card: rgba(255, 255, 255, 0.95);

  /* Shadows */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.07), 0 1px 2px -1px rgba(0, 0, 0, 0.07);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 22px 35px -8px rgba(79, 70, 229, 0.16);

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* Transitions */
  --trans-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --trans-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --trans-spring: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* --- Dark Mode Override --- */
[data-theme="dark"] {
  --bg-body: #0b0f19;
  --bg-surface: #111827;
  --bg-surface-elevated: #1f2937;
  --bg-subtle: #1e293b;
  --bg-hover: #334155;

  --border-color: #1f293d;
  --border-subtle: #162033;
  --border-focus: #818cf8;

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

  --primary-light: rgba(79, 70, 229, 0.18);

  --glass-bg: rgba(17, 24, 39, 0.82);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-card: rgba(17, 24, 39, 0.92);

  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.35);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.45);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.55);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.65);
  --shadow-hover: 0 22px 35px -8px rgba(99, 102, 241, 0.25);
}

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

html {
  font-family: var(--font-family);
  font-size: 16px;
  scroll-behavior: smooth;
  color: var(--text-main);
  background-color: var(--bg-body);
  transition: background-color var(--trans-base), color var(--trans-base);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--trans-fast);
}

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

input, button, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* --- Layout Utility Classes --- */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.main-content {
  flex: 1;
  padding-bottom: 5rem;
}

/* --- Header & Navbar Glassmorphism --- */
.navbar-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
  transition: all var(--trans-base);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 1.5rem;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-main);
  text-decoration: none;
}

.brand-icon-mark {
  flex-shrink: 0;
  transition: transform var(--trans-bounce), filter var(--trans-fast);
  filter: drop-shadow(0 4px 12px rgba(79, 70, 229, 0.35));
}

.navbar-brand:hover .brand-icon-mark {
  transform: scale(1.08) rotate(-3deg);
  filter: drop-shadow(0 6px 16px rgba(79, 70, 229, 0.5));
}

.brand-name {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
}

.brand-badge {
  background: var(--primary-gradient);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.4);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--trans-fast);
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--primary-gradient);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.5);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-main);
  border-color: var(--border-color);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--border-focus);
}

.btn-ghost {
  background: transparent;
  color: var(--text-main);
}

.btn-ghost:hover {
  background: var(--bg-hover);
}

.btn-icon {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  cursor: pointer;
}

.btn-icon:hover {
  background: var(--bg-hover);
  border-color: var(--border-focus);
}

/* --- Hero Section --- */
.hero-section {
  position: relative;
  padding: 4rem 0 3.5rem;
  text-align: center;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 350px;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.22) 0%, rgba(6, 182, 212, 0.12) 50%, transparent 70%);
  filter: blur(50px);
  pointer-events: none;
  z-index: 0;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.gradient-text {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 2.5rem;
}

/* --- Modern Search Bar (Hero) --- */
.search-bar-wrap {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  z-index: 2;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--glass-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 0.5rem;
  box-shadow: var(--shadow-xl);
  gap: 0.5rem;
  transition: all var(--trans-base);
}

.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: var(--shadow-hover);
}

.search-field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.8rem;
  border-right: 1px solid var(--border-color);
}

.search-field:last-of-type {
  border-right: none;
}

.search-field input, .search-field select {
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  font-size: 0.95rem;
  color: var(--text-main);
}

.search-icon {
  color: var(--text-dim);
  flex-shrink: 0;
}

/* --- Category Pills & Navigation Arrows --- */
.category-strip-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5rem 0 1.5rem;
  padding: 0;
}

.cat-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all var(--trans-fast);
  z-index: 5;
  flex-shrink: 0;
  user-select: none;
}

.cat-nav-btn:hover:not(:disabled) {
  background: var(--bg-hover);
  border-color: var(--primary);
  color: var(--primary);
  transform: scale(1.08);
  box-shadow: var(--shadow-md);
}

.cat-nav-btn:active:not(:disabled) {
  transform: scale(0.94);
}

.cat-nav-btn:disabled,
.cat-nav-btn.is-disabled {
  opacity: 0.28;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
}

.category-strip {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: contain;
  scroll-behavior: smooth;
  padding: 0.85rem 0.25rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex: 1;
  cursor: grab;
  touch-action: pan-x;
}

.category-strip.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
  user-select: none;
}

.category-strip::-webkit-scrollbar {
  display: none;
}

.category-pill {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 1.15rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-main);
  white-space: nowrap;
  box-shadow: var(--shadow-xs);
  transition: all var(--trans-fast);
  user-select: none;
  -webkit-user-drag: none;
}

.category-pill:hover, .category-pill.active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

.category-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Section Titles --- */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.2rem;
}

/* --- Ad Grid & Modern 3D Card --- */
.ads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.5rem;
}

.ad-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: all var(--trans-base);
}

.ad-card:hover {
  transform: translateY(-5px);
  border-color: rgba(79, 70, 229, 0.4);
  box-shadow: var(--shadow-hover);
}

/* --- Featured Ad Card (Golden Border & Ribbon) --- */
.ad-card.ad-card-featured {
  border: 2.5px solid #F59E0B;
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.10) 0%, var(--bg-surface) 55%);
  box-shadow: 0 6px 22px rgba(245, 158, 11, 0.22);
}

.ad-card.ad-card-featured:hover {
  transform: translateY(-6px);
  border-color: #D97706;
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.35);
}

.ad-featured-ribbon {
  background: linear-gradient(90deg, #F59E0B 0%, #FBBF24 50%, #D97706 100%);
  color: #1E293B;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.35rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border-bottom: 1px solid rgba(217, 119, 6, 0.35);
}

.ad-badge-featured {
  position: absolute;
  bottom: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.28rem 0.65rem;
  border-radius: var(--radius-full);
  box-shadow: 0 3px 10px rgba(217, 119, 6, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.ad-card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--bg-subtle);
  overflow: hidden;
}

.ad-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--trans-base);
}

.ad-card:hover .ad-card-img {
  transform: scale(1.05);
}

.ad-badge-ai {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(16, 185, 129, 0.9);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
}

.btn-favorite-card {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  box-shadow: var(--shadow-xs);
  transition: all var(--trans-fast);
}

.btn-favorite-card:hover, .btn-favorite-card.active {
  color: var(--accent-rose);
  transform: scale(1.12);
}

.ad-card-body {
  padding: 1rem 1.15rem 1.15rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.ad-card-price {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.ad-card-title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 0.4rem 0 0.6rem;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ad-card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.75rem;
}

.ad-location {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* --- Forms & Modern Wizard Inputs --- */
.card-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

.form-group {
  margin-bottom: 1.35rem;
}

.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 0.45rem;
  color: var(--text-main);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.95rem;
  outline: none;
  transition: all var(--trans-fast);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* Drag-and-drop Image Uploader */
.dropzone-area {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  background: var(--bg-subtle);
  transition: all var(--trans-fast);
}

.dropzone-area:hover, .dropzone-area.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.thumbs-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.85rem;
  margin-top: 1.25rem;
}

.thumb-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid var(--border-color);
}

.thumb-item.cover {
  border-color: var(--primary);
}

.thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-badge {
  position: absolute;
  bottom: 4px;
  left: 4px;
  background: var(--primary);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

/* --- Safety Banner --- */
.safety-banner {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #b45309;
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.88rem;
  font-weight: 500;
}
[data-theme="dark"] .safety-banner {
  color: #fbbf24;
}

/* --- Chat Messenger Layout --- */
.chat-container {
  display: grid;
  grid-template-columns: 340px 1fr;
  height: 680px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.chat-sidebar {
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  background: var(--bg-subtle);
}

.chat-conversation-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--trans-fast);
}

.chat-conversation-item:hover, .chat-conversation-item.active {
  background: var(--bg-surface);
}

.chat-window {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
}

.chat-messages {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.chat-bubble {
  max-width: 70%;
  padding: 0.75rem 1.15rem;
  border-radius: var(--radius-md);
  font-size: 0.94rem;
  line-height: 1.4;
}

.chat-bubble.sent {
  align-self: flex-end;
  background: var(--primary-gradient);
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.chat-bubble.received {
  align-self: flex-start;
  background: var(--bg-subtle);
  color: var(--text-main);
  border-bottom-left-radius: 4px;
}

/* --- Footer --- */
.footer-main {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding: 3rem 0 2rem;
  margin-top: auto;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

/* --- Mobile Bottom Nav Bar (App Style iOS & Android) --- */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(64px + max(0px, env(safe-area-inset-bottom, 0px)));
  padding-bottom: max(6px, env(safe-area-inset-bottom, 0px));
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-top: 1px solid var(--border-color);
  z-index: 999;
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  gap: 0.2rem;
  text-decoration: none;
  min-width: 52px;
  min-height: 48px;
  transition: color var(--trans-fast);
}

.mobile-nav-item svg {
  transition: transform var(--trans-fast);
}

.mobile-nav-item:active svg {
  transform: scale(0.92);
}

.mobile-nav-item.active {
  color: var(--primary);
  font-weight: 700;
}

.mobile-nav-publish {
  background: var(--primary-gradient);
  color: #fff !important;
  width: 50px;
  height: 50px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -24px;
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.45);
  border: 3px solid var(--bg-surface);
  transition: transform var(--trans-fast), box-shadow var(--trans-fast);
}

.mobile-nav-publish:active {
  transform: scale(0.94);
}

/* --- Responsive Breakpoints --- */
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .search-box {
    flex-direction: column;
    align-items: stretch;
  }
  .search-field {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
}

@media (max-width: 768px) {
  .mobile-nav {
    display: flex;
  }
  .main-content {
    padding-bottom: calc(76px + max(10px, env(safe-area-inset-bottom, 12px)));
  }
  .nav-hide-mobile {
    display: none !important;
  }
  .navbar-header {
    padding: 0.65rem 0;
  }
  .navbar-inner {
    gap: 0.5rem;
  }
  .navbar-brand .brand-badge {
    display: none;
  }
  .navbar-brand .brand-name {
    font-size: 1.15rem;
  }

  /* Responsive Chat on Mobile (WhatsApp/Telegram style) */
  .chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 160px);
    min-height: 500px;
    border-radius: var(--radius-md);
  }
  .chat-container.mobile-view-list .chat-sidebar {
    display: flex;
    flex: 1;
    width: 100%;
    border-right: none;
  }
  .chat-container.mobile-view-list .chat-window {
    display: none;
  }
  .chat-container.mobile-view-chat .chat-sidebar {
    display: none;
  }
  .chat-container.mobile-view-chat .chat-window {
    display: flex;
    flex: 1;
    width: 100%;
  }
  .chat-mobile-back-btn {
    display: inline-flex !important;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}
