:root {
  --primary: #1d6fa4;
  --primary-dark: #145a87;
  --primary-light: #3a8fc4;
}

/* Override Bootstrap primary */
.bg-primary { background-color: var(--primary) !important; }
.btn-primary { background-color: var(--primary); border-color: var(--primary); }
.btn-primary:hover, .btn-primary:focus { background-color: var(--primary-dark); border-color: var(--primary-dark); }
.btn-outline-primary { color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover { background-color: var(--primary); border-color: var(--primary); color: white; }
.text-primary { color: var(--primary) !important; }
.border-primary { border-color: var(--primary) !important; }
.bg-primary-subtle { background-color: #dbeafe !important; }
.text-primary-emphasis { color: var(--primary-dark) !important; }

/* Layout */
body { background: #f0f4f8; }

.main-content {
  padding-top: 60px;
  padding-bottom: 80px;
  min-height: 100dvh;
}

/* Bottom navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(60px + env(safe-area-inset-bottom));
  background: #fff;
  border-top: 1px solid #dee2e6;
  display: flex;
  z-index: 1000;
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #6c757d;
  font-size: 0.65rem;
  gap: 2px;
  transition: color 0.15s;
}

.bottom-nav-item i { font-size: 1.4rem; }
.bottom-nav-item.active { color: var(--primary); }
.bottom-nav-item:hover { color: var(--primary); }

/* Auth pages */
.auth-page {
  background: linear-gradient(135deg, #145a87 0%, #2980b9 60%, #5ba4cf 100%);
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.auth-container { width: 100%; max-width: 400px; }
.auth-card { border: none; border-radius: 1rem; }

/* Cards */
.card { border: none; border-radius: 0.75rem; box-shadow: 0 1px 4px rgba(0,0,0,.09); }
.card-hover { transition: box-shadow 0.15s, transform 0.15s; cursor: pointer; }
.card-hover:hover { box-shadow: 0 4px 14px rgba(0,0,0,.13); transform: translateY(-1px); }

/* Avatar placeholder */
.avatar-placeholder {
  width: 32px; height: 32px;
  background: var(--primary);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: bold; font-size: 0.85rem;
  flex-shrink: 0;
}

/* Scrollbar */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 2px; }

/* Chat override */
body:has(.chat-container) .main-content { padding-bottom: 0; }

/* Own message bubble blue */
.msg-own .bubble-content { background: var(--primary) !important; }
