:root {
  /* Brand Colors */
  --primary: #FF9933; /* Saffron-ish Orange - energetic */
  --primary-dark: #E68A2E;
  --secondary: #138808; /* India Green */
  --accent: #000080; /* Navy Blue (Chakra color) */
  --accent-light: #E0E7FF;
  
  /* Neutral Colors */
  --bg-body: #F9FAFB;
  --bg-card: #FFFFFF;
  --bg-input: #F3F4F6;
  --text-main: #111827;
  --text-muted: #6B7280;
  --text-light: #9CA3AF;
  --border: #E5E7EB;
  
  /* Status Colors */
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-xxl: 64px;

  /* Typography */
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 2.25rem;

  /* Shadows & Radius */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-family);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.025em;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
  width: 100%;
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.w-full { width: 100%; }
.h-full { height: 100%; }
.text-center { text-align: center; }
.hidden { display: none; }

/* Components */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  font-size: var(--font-size-base);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #FF7700 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(255, 153, 51, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 153, 51, 0.6);
}

.btn-secondary {
  background: white;
  color: var(--text-main);
  border: 1px solid var(--border);
}

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

.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-lg);
  overflow: hidden;
}

.input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
  background: var(--bg-input);
  transition: border-color 0.2s;
}

.input:focus {
  outline: none;
  border-color: var(--primary);
  background: white;
}

/* Nav */
.navbar {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  padding: var(--space-md) 0;
}

.nav-link {
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
}

.logo {
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo span {
  color: var(--primary);
}

/* Placeholders */
.placeholder-avatar {
  width: 40px;
  height: 40px;
  background-color: var(--bg-input);
  border-radius: 50%;
  flex-shrink: 0;
}

.placeholder-icon {
  width: 24px;
  height: 24px;
  background-color: var(--bg-input);
  border-radius: 4px;
  display: inline-block;
}

/* Chat Specific */
.chat-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  height: calc(100vh - 73px); /* Minus navbar height */
  overflow: hidden;
}

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

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

.chat-item {
  padding: var(--space-md);
  display: flex;
  gap: var(--space-md);
  cursor: pointer;
  transition: background 0.2s;
  border-bottom: 1px solid var(--bg-body);
}

.chat-item:hover, .chat-item.active {
  background: var(--accent-light);
}

.chat-main {
  display: flex;
  flex-direction: column;
  background: var(--bg-body);
  position: relative;
}

.chat-header {
  padding: var(--space-md);
  background: white;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.messages-area {
  flex: 1;
  padding: var(--space-lg);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.message {
  max-width: 60%;
  padding: var(--space-md);
  border-radius: var(--radius-lg);
  position: relative;
  line-height: 1.4;
}

.message-received {
  background: white;
  border-bottom-left-radius: 4px;
  align-self: flex-start;
  box-shadow: var(--shadow-sm);
}

.message-sent {
  background: var(--primary); /* Saffron */
  color: white;
  border-bottom-right-radius: 4px;
  align-self: flex-end;
  box-shadow: var(--shadow-sm);
}

.chat-input-area {
  padding: var(--space-md);
  background: white;
  border-top: 1px solid var(--border);
  display: flex;
  gap: var(--space-sm);
  align-items: center;
}

/* Location Badge */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-location {
  background: var(--accent-light);
  color: var(--accent);
}

/* Responsive */
@media (max-width: 768px) {
  .chat-layout {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    display: none; /* In real app, toggleable */
  }

  .sidebar.show {
    display: flex;
    position: absolute;
    inset: 0;
    z-index: 100;
  }
}
