:root {
  --bg: #0b1b16;
  --card: rgba(13, 30, 24, 0.86);
  --text: #e8f6ef;
  --muted: #9bcab8;
  --accent: #3dd69b;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}
.bg-image {
  position: fixed;
  inset: 0;
  background: url('https://images.unsplash.com/photo-1551434678-e076c223a692?auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
  filter: brightness(0.35);
}
.overlay { position: fixed; inset: 0; background: rgba(11, 27, 22, 0.7); }
.page-content { position: relative; z-index: 2; padding: 24px; }

.login-card {
  max-width: 360px;
  margin: 10vh auto;
  padding: 28px;
  background: var(--card);
  border: 1px solid rgba(61, 214, 155, 0.2);
  border-radius: 16px;
}
.login-form { display: grid; gap: 10px; }
input, button {
  width: 100%;
  border: 1px solid rgba(61, 214, 155, 0.35);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
}
button { cursor: pointer; background: rgba(61, 214, 155, 0.2); }
.error { color: #ff8787; }

.dashboard { display: grid; grid-template-columns: 320px 1fr; gap: 16px; min-height: calc(100vh - 48px); }
.sidebar, .chat-panel {
  background: var(--card);
  border-radius: 16px;
  border: 1px solid rgba(61, 214, 155, 0.2);
  overflow: hidden;
}
.sidebar-head, .chat-header {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(61, 214, 155, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#conversationList { list-style: none; margin: 0; padding: 8px; max-height: calc(100vh - 140px); overflow-y: auto; }
#conversationList li {
  padding: 10px 12px;
  margin-bottom: 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
}
#conversationList li.active { outline: 1px solid var(--accent); }
.chat-panel { display: grid; grid-template-rows: auto 1fr auto; }
.chat-messages { padding: 16px; overflow-y: auto; }
.message { margin-bottom: 10px; max-width: 80%; padding: 10px 12px; border-radius: 10px; }
.message.incoming { background: rgba(255, 255, 255, 0.08); }
.message.outgoing { background: rgba(61, 214, 155, 0.18); margin-left: auto; }
.chat-controls { padding: 12px; border-top: 1px solid rgba(61, 214, 155, 0.2); }
#sendForm { display: flex; gap: 8px; margin-top: 10px; }
#sendForm input { flex: 1; }
.btn-ghost { width: auto; padding: 8px 10px; }
