/* =============================================
   VARIABLES & RESET
   ============================================= */
:root {
  --cream: #F8F4EE;
  --cream-dark: #EDE8DF;
  --ink: #1A1714;
  --ink-light: #4A4540;
  --gold: #C9A96E;
  --gold-light: #E8D5B0;
  --white: #FFFFFF;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'DM Sans', sans-serif;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow: 0 4px 40px rgba(26,23,20,0.10);
  --shadow-lg: 0 12px 60px rgba(26,23,20,0.16);
  --radius: 18px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  font-family: var(--font-body);
  background: var(--cream-dark);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
}

/* =============================================
   LAYOUT
   ============================================= */
.page {
  display: grid;
  grid-template-columns: 300px 1fr;
  height: 100vh;
  max-width: 1100px;
  margin: 0 auto;
  box-shadow: var(--shadow-lg);
}

/* =============================================
   SIDEBAR
   ============================================= */
.sidebar {
  background: var(--ink);
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  overflow-y: auto;
}

.sidebar__logo-img {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
}

.sidebar__bot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.bot-avatar {
  position: relative;
  width: 72px;
  height: 72px;
  background: rgba(201,169,110,0.15);
  border: 1.5px solid var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bot-avatar__icon {
  font-size: 1.8rem;
  color: var(--gold);
}

.bot-avatar__pulse {
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1px solid rgba(201,169,110,0.3);
  animation: pulse 2.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.08); opacity: 1; }
}

.sidebar__name {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--cream);
}

.sidebar__tagline {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}

.sidebar__status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.78rem;
  color: rgba(248,244,238,0.5);
}

.dot {
  width: 7px;
  height: 7px;
  background: #4ade80;
  border-radius: 50%;
  animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.sidebar__about p {
  font-size: 0.85rem;
  color: rgba(248,244,238,0.5);
  line-height: 1.65;
  text-align: center;
}

.sidebar__suggestions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.suggestions__label {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(248,244,238,0.3);
  margin-bottom: 4px;
}

.suggestion-chip {
  background: rgba(248,244,238,0.05);
  border: 1px solid rgba(201,169,110,0.2);
  color: rgba(248,244,238,0.65);
  font-family: var(--font-body);
  font-size: 0.8rem;
  padding: 10px 14px;
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
  line-height: 1.4;
}

.suggestion-chip:hover {
  background: rgba(201,169,110,0.12);
  border-color: var(--gold);
  color: var(--cream);
}

.sidebar__cta {
  display: block;
  margin-top: auto;
  text-align: center;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  padding: 12px 20px;
  background: var(--gold);
  color: var(--ink);
  border-radius: 4px;
  text-decoration: none;
  transition: var(--transition);
}

.sidebar__cta:hover {
  background: var(--cream);
}

/* =============================================
   CHAT AREA
   ============================================= */
.chat {
  background: var(--cream);
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.chat__messages {
  flex: 1;
  overflow-y: auto;
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  scroll-behavior: smooth;
}

.chat__messages::-webkit-scrollbar { width: 4px; }
.chat__messages::-webkit-scrollbar-track { background: transparent; }
.chat__messages::-webkit-scrollbar-thumb { background: var(--gold-light); border-radius: 4px; }

/* =============================================
   MESSAGES
   ============================================= */
.message {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  animation: msgIn 0.3s ease both;
  max-width: 80%;
}

@keyframes msgIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.message--user {
  flex-direction: row-reverse;
  align-self: flex-end;
}

.message__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.message--user .message__avatar {
  background: var(--gold);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-body);
}

.message__bubble {
  background: var(--white);
  border-radius: 4px 18px 18px 18px;
  padding: 14px 18px;
  font-size: 0.9rem;
  color: var(--ink);
  line-height: 1.65;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.message--user .message__bubble {
  background: var(--ink);
  color: var(--cream);
  border-radius: 18px 4px 18px 18px;
  box-shadow: none;
}

.message__bubble strong { color: var(--gold); }
.message--user .message__bubble strong { color: var(--gold-light); }

.message__bubble ul {
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.message__bubble ul li { list-style: disc; }

/* Typing indicator */
.typing-indicator {
  display: flex;
  gap: 5px;
  padding: 6px 4px;
}

.typing-indicator span {
  width: 7px;
  height: 7px;
  background: var(--gold);
  border-radius: 50%;
  animation: typingDot 1.2s ease-in-out infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingDot {
  0%, 80%, 100% { transform: scale(0.7); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* =============================================
   INPUT AREA
   ============================================= */
.chat__input-area {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 20px 32px;
  border-top: 1px solid var(--cream-dark);
  background: var(--white);
}

.chat__input {
  flex: 1;
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 14px 20px;
  background: var(--cream);
  border: 1.5px solid var(--cream-dark);
  border-radius: 30px;
  color: var(--ink);
  outline: none;
  transition: var(--transition);
}

.chat__input::placeholder { color: var(--ink-light); opacity: 0.5; }

.chat__input:focus {
  border-color: var(--gold);
  background: var(--white);
}

.chat__send {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--ink);
  border: none;
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.chat__send:hover {
  background: var(--gold);
  color: var(--ink);
  transform: scale(1.05);
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 700px) {
  .page { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .chat__messages { padding: 24px 18px; }
  .chat__input-area { padding: 16px 18px; }
  .message { max-width: 92%; }
}
