/* ═══════════════════════════════════════════════════════════
   AI PANCASILA — Design System: Merah Kebangsaan
   Premium Dark Theme with Glassmorphism & Micro-animations
   ═══════════════════════════════════════════════════════════ */

/* ─── CSS Custom Properties (Design Tokens) ─── */
:root {
  /* Primary Palette — Merah Kebangsaan */
  --red-50: #FFF1F2;
  --red-100: #FFE4E6;
  --red-200: #FECDD3;
  --red-300: #FDA4AF;
  --red-400: #FB7185;
  --red-500: #C41E3A;
  --red-600: #A01830;
  --red-700: #8B0000;
  --red-800: #6B0F1A;
  --red-900: #4A0A12;

  /* Accent — Emas */
  --gold-300: #FFE066;
  --gold-400: #FFD700;
  --gold-500: #F5C518;
  --gold-600: #D4A007;

  /* Neutrals — Dark Mode */
  --bg-primary: #0D0A0F;
  --bg-secondary: #1A0F14;
  --bg-tertiary: #241520;
  --bg-card: rgba(36, 21, 32, 0.7);
  --bg-hover: rgba(196, 30, 58, 0.08);
  --bg-active: rgba(196, 30, 58, 0.15);

  /* Surface — Glassmorphism */
  --glass-bg: rgba(26, 15, 20, 0.85);
  --glass-border: rgba(196, 30, 58, 0.2);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);

  /* Text */
  --text-primary: #F5F0F1;
  --text-secondary: #B8A0A8;
  --text-muted: #7A6570;
  --text-accent: #FDA4AF;

  /* Borders */
  --border-subtle: rgba(196, 30, 58, 0.12);
  --border-medium: rgba(196, 30, 58, 0.25);
  --border-strong: rgba(196, 30, 58, 0.4);

  /* Layout */
  --sidebar-width: 320px;
  --header-height: 64px;
  --input-height: 68px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Typography */
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #C41E3A 0%, #8B0000 100%);
  --gradient-warm: linear-gradient(135deg, #C41E3A 0%, #D4530E 100%);
  --gradient-gold: linear-gradient(135deg, #FFD700 0%, #F5C518 50%, #D4A007 100%);
  --gradient-bg: radial-gradient(ellipse at top left, rgba(196, 30, 58, 0.12) 0%, transparent 50%),
                 radial-gradient(ellipse at bottom right, rgba(139, 0, 0, 0.08) 0%, transparent 50%);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  height: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow: hidden;
  height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: var(--gradient-bg);
  pointer-events: none;
  z-index: 0;
}

::selection {
  background: rgba(196, 30, 58, 0.4);
  color: var(--text-primary);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(196, 30, 58, 0.3);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(196, 30, 58, 0.5);
}

/* ─── App Container ─── */
.app-container {
  display: flex;
  height: 100%;
  position: relative;
  z-index: 1;
}

/* ═══════════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-width);
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--glass-border);
  transition: transform var(--duration-slow) var(--ease-out);
  z-index: 100;
  overflow: hidden;
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.logo-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(196, 30, 58, 0.4)); }
  50% { filter: drop-shadow(0 0 12px rgba(196, 30, 58, 0.7)); }
}

.logo-text h1 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.logo-subtitle {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* New Chat Button */
.btn-new-chat {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 16px;
  background: var(--gradient-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  position: relative;
  overflow: hidden;
}

.btn-new-chat::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--duration-normal);
}

.btn-new-chat:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(196, 30, 58, 0.4);
}

.btn-new-chat:hover::before {
  opacity: 1;
}

.btn-new-chat:active {
  transform: translateY(0);
}

/* Sidebar Content */
.sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.sidebar-section {
  margin-bottom: 8px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.section-header svg {
  opacity: 0.6;
}

/* History List */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--duration-fast);
  position: relative;
  overflow: hidden;
}

.history-item:hover {
  background: var(--bg-hover);
}

.history-item.active {
  background: var(--bg-active);
  border-left: 3px solid var(--red-500);
}

.history-item-icon {
  color: var(--text-muted);
  flex-shrink: 0;
}

.history-item-text {
  flex: 1;
  font-size: 0.85rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-item.active .history-item-text {
  color: var(--text-primary);
}

.history-item-delete {
  opacity: 0;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all var(--duration-fast);
}

.history-item:hover .history-item-delete {
  opacity: 1;
}

.history-item-delete:hover {
  color: var(--red-400);
  background: rgba(196, 30, 58, 0.15);
}

.history-empty {
  text-align: center;
  padding: 24px 16px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.history-empty-sub {
  font-size: 0.75rem;
  margin-top: 4px;
  opacity: 0.7;
}

/* Document Explorer */
.doc-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.doc-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: default;
  transition: background var(--duration-fast);
}

.doc-item:hover {
  background: var(--bg-hover);
}

.doc-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.doc-info {
  display: flex;
  flex-direction: column;
}

.doc-name {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.3;
}

.doc-meta {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-subtle);
}

.created-by {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.created-by-title {
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-size: 0.65rem;
  letter-spacing: 0.5px;
}

.created-by-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.created-by-list li {
  margin-bottom: 6px;
  line-height: 1.4;
  position: relative;
  padding-left: 12px;
}

.created-by-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--text-accent);
}

.created-by-list li:last-child {
  margin-bottom: 0;
}

/* ─── Sidebar Toggle (Mobile) ─── */
.sidebar-toggle {
  display: none;
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 200;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-normal);
}

.sidebar-toggle:hover {
  background: var(--bg-hover);
  border-color: var(--red-500);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 90;
  opacity: 0;
  transition: opacity var(--duration-normal);
}

.sidebar-overlay.active {
  display: block;
  opacity: 1;
}

/* ═══════════════════════════════════════════════
   CHAT AREA
   ═══════════════════════════════════════════════ */
.chat-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  position: relative;
}

/* Chat Header */
.chat-header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-header h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.header-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22C55E;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
  animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.header-actions {
  display: flex;
  gap: 8px;
}

.header-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--duration-fast);
}

.header-btn:hover {
  background: var(--bg-hover);
  border-color: var(--red-500);
  color: var(--red-400);
}

/* ═══════════════════════════════════════════════
   MESSAGES CONTAINER
   ═══════════════════════════════════════════════ */
.messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 24px 24px 130px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Welcome Screen */
.welcome-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  text-align: center;
  padding: 32px;
  animation: fadeInUp 0.6s var(--ease-out);
}

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

.welcome-logo {
  width: 80px;
  height: 80px;
  margin-bottom: 24px;
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.welcome-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

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

.welcome-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin-bottom: 40px;
  line-height: 1.6;
}

/* Suggestion Cards */
.welcome-suggestions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 600px;
}

.suggestion-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  text-align: left;
  font-family: var(--font-body);
}

.suggestion-card:hover {
  background: var(--bg-active);
  border-color: var(--red-500);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(196, 30, 58, 0.15);
}

.suggestion-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.suggestion-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.suggestion-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.suggestion-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ─── Message Bubbles ─── */
.message {
  display: flex;
  gap: 12px;
  max-width: 85%;
  animation: messageIn 0.4s var(--ease-out);
}

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

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

.message.assistant {
  align-self: flex-start;
}

.message-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
}

.message.user .message-avatar {
  background: linear-gradient(135deg, #374151, #1F2937);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.message.assistant .message-avatar {
  background: var(--gradient-primary);
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.message-content {
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  font-size: 0.9rem;
  line-height: 1.7;
  position: relative;
}

.message.user .message-content {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top-right-radius: 4px;
  color: var(--text-primary);
}

.message.assistant .message-content {
  background: rgba(196, 30, 58, 0.08);
  border: 1px solid rgba(196, 30, 58, 0.15);
  border-top-left-radius: 4px;
  color: var(--text-primary);
}

/* Markdown in AI responses */
.message.assistant .message-content h1,
.message.assistant .message-content h2,
.message.assistant .message-content h3 {
  font-family: var(--font-display);
  color: var(--text-accent);
  margin: 16px 0 8px;
  line-height: 1.3;
}

.message.assistant .message-content h1 { font-size: 1.2rem; }
.message.assistant .message-content h2 { font-size: 1.1rem; }
.message.assistant .message-content h3 { font-size: 1rem; }

.message.assistant .message-content p {
  margin-bottom: 10px;
}

.message.assistant .message-content ul,
.message.assistant .message-content ol {
  padding-left: 20px;
  margin-bottom: 10px;
}

.message.assistant .message-content li {
  margin-bottom: 4px;
}

.message.assistant .message-content strong {
  color: var(--gold-400);
  font-weight: 600;
}

.message.assistant .message-content em {
  color: var(--text-accent);
}

.message.assistant .message-content code {
  background: rgba(196, 30, 58, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85em;
  font-family: 'SF Mono', 'Fira Code', monospace;
}

.message.assistant .message-content blockquote {
  border-left: 3px solid var(--red-500);
  padding-left: 14px;
  margin: 12px 0;
  color: var(--text-secondary);
  font-style: italic;
}

/* Sources / Footnotes */
.message-sources {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

.sources-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.source-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  margin: 2px 4px 2px 0;
  background: rgba(196, 30, 58, 0.1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  color: var(--text-accent);
}

.source-tag svg {
  width: 10px;
  height: 10px;
}

/* Typing Indicator */
.typing-indicator {
  display: flex;
  gap: 12px;
  align-self: flex-start;
  animation: messageIn 0.3s var(--ease-out);
}

.typing-dots {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 16px 20px;
  background: rgba(196, 30, 58, 0.08);
  border: 1px solid rgba(196, 30, 58, 0.15);
  border-radius: var(--radius-lg);
  border-top-left-radius: 4px;
}

.typing-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red-400);
  animation: typingBounce 1.4s ease-in-out infinite;
}

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

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* ═══════════════════════════════════════════════
   CHAT INPUT
   ═══════════════════════════════════════════════ */
.chat-input-wrapper {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 24px 20px;
  background: linear-gradient(to top, var(--bg-primary) 60%, transparent);
  z-index: 10;
}

.chat-input-container {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  transition: border-color var(--duration-normal), box-shadow var(--duration-normal);
}

.chat-input-container:focus-within {
  border-color: var(--red-500);
  box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.15), 0 4px 20px rgba(0, 0, 0, 0.3);
}

.chat-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.5;
  resize: none;
  max-height: 120px;
  min-height: 24px;
}

.chat-input::placeholder {
  color: var(--text-muted);
}

.btn-send {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  border: none;
  border-radius: var(--radius-md);
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--duration-normal) var(--ease-out);
}

.btn-send:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.btn-send:not(:disabled):hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(196, 30, 58, 0.4);
}

.btn-send:not(:disabled):active {
  transform: scale(0.95);
}

.input-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 4px 0;
}

.char-count {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.disclaimer {
  font-size: 0.65rem;
  color: var(--text-muted);
  opacity: 0.7;
}

/* ═══════════════════════════════════════════════
   LOADING STATES
   ═══════════════════════════════════════════════ */
.loading-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  transform-origin: left;
  animation: loadingBar 2s ease-in-out infinite;
}

@keyframes loadingBar {
  0% { transform: scaleX(0); opacity: 1; }
  50% { transform: scaleX(0.7); opacity: 1; }
  100% { transform: scaleX(1); opacity: 0; }
}

/* ═══════════════════════════════════════════════
   RESPONSIVE DESIGN
   ═══════════════════════════════════════════════ */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-100%);
    z-index: 150;
    box-shadow: var(--glass-shadow);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-toggle {
    display: flex;
  }

  .chat-header {
    padding-left: 68px;
  }

  .welcome-suggestions {
    grid-template-columns: 1fr;
  }

  .welcome-title {
    font-size: 1.4rem;
  }

  .message {
    max-width: 92%;
  }

  .chat-input-wrapper {
    padding: 12px 16px 16px;
  }
}

@media (max-width: 480px) {
  .sidebar {
    width: 85vw;
  }

  .messages-container {
    padding: 16px;
  }

  .welcome-screen {
    padding: 20px;
  }

  .suggestion-card {
    padding: 12px;
  }

  .message-content {
    padding: 10px 14px;
    font-size: 0.85rem;
  }

  .input-footer {
    flex-direction: column-reverse;
    align-items: center;
    gap: 6px;
    text-align: center;
  }
}

/* ─── Utility Classes ─── */
.hidden { display: none !important; }

/* Fade animation for elements */
.fade-in {
  animation: fadeIn 0.3s var(--ease-out);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ─── Feedback & Suggestions Styles ─── */
.message-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.message.user .message-wrapper {
  align-items: flex-end;
}

.message.assistant .message-wrapper {
  align-items: flex-start;
}

.message-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 6px;
  padding: 0 4px;
  width: 100%;
}

.message-feedback {
  display: flex;
  gap: 8px;
}

.feedback-btn {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(196, 30, 58, 0.1);
  color: var(--text-muted);
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-fast) var(--ease-out);
}

.feedback-btn:hover {
  color: var(--text-primary);
  background: rgba(196, 30, 58, 0.1);
  border-color: rgba(196, 30, 58, 0.3);
}

.feedback-btn.thumbs-up.active {
  color: #10B981;
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
}

.feedback-btn.thumbs-down.active {
  color: #F59E0B;
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
}

/* Suggestion Chips */
.message-suggestions-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding: 0 4px;
  width: 100%;
}

.suggestions-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  opacity: 0.8;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.suggestion-chip {
  background: rgba(196, 30, 58, 0.08);
  border: 1px solid rgba(196, 30, 58, 0.3);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.8rem;
  padding: 8px 16px;
  text-align: left;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: all var(--duration-normal) var(--ease-out);
}

.suggestion-chip:hover {
  background: var(--gradient-primary);
  border-color: var(--red-400);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(196, 30, 58, 0.3);
}

/* Toast Notifications */
.feedback-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  padding: 10px 20px;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  font-size: 0.85rem;
  font-weight: 500;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s var(--ease-out);
}

.feedback-toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
}

.header-left-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.welcome-greeting {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 10px 18px;
  border-radius: var(--radius-full);
  margin-bottom: 20px;
  animation: fadeInUp 0.7s var(--ease-out) 0.15s both;
}

.welcome-greeting strong {
  color: var(--gold-400);
}

.chat-area { position: relative; }
