:root {
  /* Default Light Theme */
  --bg-app: #f4f6f9;
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;
  --bg-bubble-user: linear-gradient(135deg, #2563eb, #1d4ed8);
  --bg-bubble-ai: #ffffff;
  --bg-input: #ffffff;
  --bg-sources: rgba(15, 23, 42, 0.03);
  --bg-status: rgba(15, 23, 42, 0.03);
  
  --border-color: rgba(15, 23, 42, 0.08);
  --border-color-focus: rgba(37, 99, 235, 0.35);
  
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  
  --accent-color: #2563eb;
  --accent-glow: rgba(37, 99, 235, 0.12);
  --accent-hover: #1d4ed8;
  
  --success-color: #10b981;
  --danger-color: #f43f5e;
  
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-headings: 'Outfit', sans-serif;
  --font-mono: 'Space Grotesk', monospace;
  
  --transition-smooth: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --sidebar-width: 280px;
  --mobile-header-height: 56px;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px -1px rgba(15, 23, 42, 0.04), 0 2px 6px -1px rgba(15, 23, 42, 0.02);
  --shadow-lg: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
}

:root.dark-theme {
  --bg-app: #080c14;
  --bg-sidebar: #0f1422;
  --bg-card: rgba(22, 30, 49, 0.55);
  --bg-bubble-user: linear-gradient(135deg, #0ea5e9, #2563eb);
  --bg-bubble-ai: rgba(26, 36, 56, 0.65);
  --bg-input: rgba(22, 30, 49, 0.85);
  --bg-sources: rgba(22, 30, 49, 0.4);
  --bg-status: rgba(255, 255, 255, 0.02);
  
  --border-color: rgba(255, 255, 255, 0.06);
  --border-color-focus: rgba(14, 165, 233, 0.4);
  
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  
  --accent-color: #0ea5e9;
  --accent-glow: rgba(14, 165, 233, 0.2);
  --accent-hover: #38bdf8;

  --shadow-sm: none;
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.25);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-primary);
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.01em;
}

h1, h2, h3, h4, .logo-text h2, .new-chat-btn, .clear-all-btn, .theme-toggle-btn, .section-title, .sender-name, .mobile-title {
  font-family: var(--font-headings);
}

/* App Shell Layout */
.app-container {
  display: flex;
  width: 100%;
  height: 100%;
  position: relative;
}

/* Sidebar Styling */
.sidebar {
  width: var(--sidebar-width);
  height: 100%;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 50;
  transition: var(--transition-smooth);
}

.sidebar-header {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent-color), #3b82f6);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(14, 165, 233, 0.3);
}

.logo-icon i {
  width: 18px;
  height: 18px;
  color: #ffffff;
}

.logo-text h2 {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}

.logo-text .eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent-color);
  text-transform: uppercase;
}

.toggle-sidebar-mobile {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: none;
}

/* New Chat Button */
.new-chat-btn {
  margin: 16px;
  padding: 12px 16px;
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: var(--font-headings);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.new-chat-btn:hover {
  background-color: rgba(14, 165, 233, 0.08);
  border-color: var(--accent-color);
  box-shadow: 0 0 12px rgba(14, 165, 233, 0.15);
}

/* Chat History Container */
.chat-history-container {
  flex: 1;
  overflow-y: auto;
  padding: 8px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-history-container::-webkit-scrollbar {
  width: 4px;
}
.chat-history-container::-webkit-scrollbar-track {
  background: transparent;
}
.chat-history-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
}

.section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.chat-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.empty-history {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  padding: 20px 0;
}

/* History Item */
.chat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition-smooth);
  background-color: transparent;
  border: 1px solid transparent;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.chat-item:hover {
  background-color: rgba(255, 255, 255, 0.03);
}

.chat-item.active {
  background-color: rgba(14, 165, 233, 0.06);
  border-color: rgba(14, 165, 233, 0.15);
}

.chat-item-title-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.chat-item-title-wrapper i {
  color: var(--text-secondary);
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.chat-item.active .chat-item-title-wrapper i {
  color: var(--accent-color);
}

.chat-item-title {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-item.active .chat-item-title {
  color: var(--text-primary);
  font-weight: 600;
}

.delete-chat-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition-smooth);
}

.chat-item:hover .delete-chat-btn {
  opacity: 1;
}

.delete-chat-btn:hover {
  color: var(--danger-color);
  background-color: rgba(244, 63, 94, 0.1);
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.status-card {
  padding: 10px 12px;
  background-color: var(--bg-status);
  border: 1px solid var(--border-color);
  border-radius: 10px;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-indicator .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--success-color);
  box-shadow: 0 0 8px var(--success-color);
}

.status-indicator .dot.pulse {
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.1); opacity: 1; box-shadow: 0 0 12px var(--success-color); }
  100% { transform: scale(0.9); opacity: 0.6; }
}

.status-text {
  font-size: 11.5px;
  color: var(--text-secondary);
  font-weight: 500;
}

.clear-all-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-headings);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: var(--transition-smooth);
}

/* Theme Toggle Button Styling */
.theme-toggle-btn {
  background: none;
  border: 1px solid var(--border-color);
  background-color: rgba(255, 255, 255, 0.02);
  color: var(--text-secondary);
  font-family: var(--font-headings);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: var(--transition-smooth);
}

.theme-toggle-btn:hover {
  background-color: rgba(37, 99, 235, 0.05);
  border-color: var(--accent-color);
  color: var(--accent-color);
}

:root.dark-theme .theme-toggle-btn:hover {
  background-color: rgba(14, 165, 233, 0.05);
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.clear-all-btn:hover {
  color: var(--danger-color);
  background-color: rgba(244, 63, 94, 0.06);
}

/* Chat Workspace */
.chat-workspace {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  background-color: var(--bg-app);
}

/* Mobile Top Bar */
.mobile-top-bar {
  height: var(--mobile-header-height);
  background-color: var(--bg-sidebar);
  border-bottom: 1px solid var(--border-color);
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.mobile-top-bar .menu-btn,
.mobile-top-bar .new-chat-btn-mobile {
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* Chat Stream Container */
.chat-stream-container {
  flex: 1;
  overflow-y: auto;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
}

.chat-stream-container::-webkit-scrollbar {
  width: 6px;
}
.chat-stream-container::-webkit-scrollbar-track {
  background: transparent;
}
.chat-stream-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
}

/* Welcome Screen */
.welcome-screen {
  max-width: 720px;
  margin: auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  animation: fadeIn 0.4s ease-out;
}

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

.welcome-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(59, 130, 246, 0.1));
  border: 1px solid rgba(14, 165, 233, 0.2);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-color);
  margin-bottom: 8px;
}

.welcome-icon i {
  width: 32px;
  height: 32px;
}

.welcome-screen h1 {
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 800;
  line-height: 1.25;
  background: linear-gradient(to right, var(--text-primary), #cbd5e1);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.welcome-subtitle {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
  max-width: 540px;
}

/* Suggestion Grid */
.suggestion-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 680px;
  margin-top: 24px;
}

.suggestion-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 16px;
  text-align: left;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.suggestion-card:hover {
  background-color: rgba(255, 255, 255, 0.02);
  border-color: rgba(14, 165, 233, 0.25);
  transform: translateY(-2px);
}

.card-icon {
  color: var(--accent-color);
}
.card-icon i {
  width: 18px;
  height: 18px;
}

.suggestion-card h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.suggestion-card p {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Messages List */
.messages-list {
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Message Item */
.message-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  animation: messageSlideIn 0.3s ease-out;
}

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

.message-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
}

.message-item.user .avatar {
  background-color: var(--accent-color);
  color: #ffffff;
}

.message-item.assistant .avatar {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: #ffffff;
}

.avatar i {
  width: 14px;
  height: 14px;
}

.sender-name {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.message-content {
  padding: 16px 20px;
  border-radius: 16px;
  font-size: 14.5px;
  line-height: 1.7;
  max-width: 88%;
}

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

.message-item.user .message-content {
  background: var(--bg-bubble-user);
  color: #ffffff;
  border-top-right-radius: 4px;
  white-space: pre-wrap;
}

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

.message-item.assistant .message-content {
  background-color: var(--bg-bubble-ai);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-top-left-radius: 4px;
  box-shadow: var(--shadow-md);
}

/* Polished Markdown & Content Styling */
.message-content h1, 
.message-content h2, 
.message-content h3, 
.message-content h4 {
  font-family: var(--font-headings);
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 18px;
  margin-bottom: 8px;
  line-height: 1.35;
}

.message-content h1 { font-size: 1.5rem; }
.message-content h2 { font-size: 1.3rem; border-bottom: 1px solid var(--border-color); padding-bottom: 6px; }
.message-content h3 { font-size: 1.125rem; color: var(--accent-color); margin-top: 16px; }
.message-content h4 { font-size: 1rem; }

.message-content h1:first-child,
.message-content h2:first-child,
.message-content h3:first-child,
.message-content h4:first-child {
  margin-top: 0;
}

.message-content p {
  margin-bottom: 12px;
  line-height: 1.65;
}

.message-content p:last-child {
  margin-bottom: 0;
}

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

/* List Styling */
.message-content ul, 
.message-content ol {
  padding-left: 22px;
  margin: 12px 0;
}

.message-content ul {
  list-style-type: disc;
}

.message-content ol {
  list-style-type: decimal;
}

.message-content li {
  margin-bottom: 6px;
  line-height: 1.6;
}

.message-content li:last-child {
  margin-bottom: 0;
}

/* Tables inside answers */
.message-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 13.5px;
}

.message-content th, 
.message-content td {
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  text-align: left;
}

.message-content th {
  background-color: rgba(15, 23, 42, 0.03);
  font-weight: 700;
  color: var(--text-primary);
}

:root.dark-theme .message-content th {
  background-color: rgba(255, 255, 255, 0.04);
}

.message-content tr:nth-child(even) {
  background-color: rgba(15, 23, 42, 0.015);
}

:root.dark-theme .message-content tr:nth-child(even) {
  background-color: rgba(255, 255, 255, 0.015);
}

/* Inline and Block Code Styling */
.message-content code {
  background-color: rgba(15, 23, 42, 0.05);
  padding: 2px 6px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
}

:root.dark-theme .message-content code {
  background-color: rgba(255, 255, 255, 0.08);
}

.message-content pre {
  background-color: rgba(15, 23, 42, 0.03);
  padding: 14px;
  border-radius: 12px;
  overflow-x: auto;
  margin: 12px 0;
  border: 1px solid var(--border-color);
}

:root.dark-theme .message-content pre {
  background-color: rgba(15, 20, 32, 0.5);
}

.message-content pre code {
  background-color: transparent;
  padding: 0;
  border-radius: 0;
  font-size: 13px;
  color: inherit;
}

/* Citation Badges */
.citation-badge {
  background: rgba(37, 99, 235, 0.1);
  color: var(--accent-color);
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 11px;
  font-weight: 700;
  margin: 0 3px;
  font-family: var(--font-sans);
  display: inline-block;
  vertical-align: middle;
  line-height: 1.4;
}

:root.dark-theme .citation-badge {
  background: rgba(14, 165, 233, 0.15);
  color: #38bdf8;
  border-color: rgba(14, 165, 233, 0.3);
}

/* Typing Indicator */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
}

.typing-indicator span {
  width: 6px;
  height: 6px;
  background-color: var(--text-secondary);
  border-radius: 50%;
  display: inline-block;
  animation: typing-bounce 1.4s infinite ease-in-out both;
}

.typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing-bounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1.0); }
}

/* Citation / Sources Section */
.sources-section {
  width: 100%;
  max-width: 88%;
  margin-top: -12px;
  animation: fadeIn 0.3s ease-out;
}

.sources-toggle {
  background: none;
  border: none;
  color: var(--accent-color);
  font-family: var(--font-headings);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  transition: var(--transition-smooth);
}

.sources-toggle:hover {
  background-color: rgba(14, 165, 233, 0.06);
}

.sources-toggle i {
  width: 14px;
  height: 14px;
  transition: transform 0.25s ease;
}

.sources-toggle.open i {
  transform: rotate(180deg);
}

.sources-container {
  display: none;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
  padding: 14px;
  background-color: var(--bg-sources);
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

.sources-container.open {
  display: flex;
}

.source-item {
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.source-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.source-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.source-item-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.source-item-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.source-item-text {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Chat Input Panel */
.input-panel {
  padding: 24px;
  background: linear-gradient(to top, var(--bg-app) 70%, transparent);
  border-top: 1px solid transparent;
  width: 100%;
}

.input-container {
  max-width: 800px;
  margin: 0 auto;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 10px 14px;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  box-shadow: var(--shadow-lg);
  transition: var(--transition-smooth);
}

.input-container:focus-within {
  border-color: var(--border-color-focus);
  box-shadow: 0 0 16px rgba(14, 165, 233, 0.12);
}

.input-container textarea {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14.5px;
  line-height: 1.5;
  resize: none;
  outline: none;
  padding: 8px 4px;
  max-height: 200px;
}

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

.send-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background-color: rgba(255, 255, 255, 0.04);
  border: none;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  flex-shrink: 0;
  margin-bottom: 2px;
}

.input-container:focus-within .send-btn:not(:disabled),
.send-btn:not(:disabled) {
  background-color: var(--accent-color);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(14, 165, 233, 0.4);
}

.send-btn:not(:disabled):hover {
  background-color: var(--accent-hover);
}

.send-btn:disabled {
  cursor: not-allowed;
}

.input-disclaimer {
  max-width: 800px;
  margin: 8px auto 0;
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
}
/* Split Screen Layout Wrapper */
.workspace-wrapper {
  display: flex;
  flex: 1;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  min-width: 0;
}

/* Desktop Workspace Header */
.chat-header {
  height: var(--mobile-header-height);
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-sidebar);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.chat-title-container h2 {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}

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

.open-juknis-btn {
  background: none;
  border: 1px solid var(--border-color);
  background-color: rgba(255, 255, 255, 0.02);
  color: var(--text-secondary);
  font-family: var(--font-headings);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  transition: var(--transition-smooth);
}

.open-juknis-btn:hover, .open-juknis-btn.active {
  background-color: rgba(37, 99, 235, 0.05);
  border-color: var(--accent-color);
  color: var(--accent-color);
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.1);
}

:root.dark-theme .open-juknis-btn:hover, :root.dark-theme .open-juknis-btn.active {
  background-color: rgba(14, 165, 233, 0.05);
  border-color: var(--accent-color);
  color: var(--accent-color);
  box-shadow: 0 0 10px rgba(14, 165, 233, 0.1);
}

.open-juknis-btn i {
  width: 14px;
  height: 14px;
}

/* Mobile actions container */
.mobile-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.open-juknis-btn-mobile {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.open-juknis-btn-mobile:hover, .open-juknis-btn-mobile.active {
  color: var(--accent-color);
}

.open-juknis-btn-mobile i {
  width: 20px;
  height: 20px;
}

/* PDF Viewer Panel Styling */
.pdf-panel {
  display: none;
  flex-direction: column;
  width: 45%;
  max-width: 800px;
  min-width: 400px;
  height: 100%;
  background-color: var(--bg-sidebar);
  border-left: 1px solid var(--border-color);
  flex-shrink: 0;
  z-index: 40;
}

.pdf-panel.open {
  display: flex;
}

.pdf-panel-header {
  padding: 0 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-sidebar);
  height: var(--mobile-header-height);
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.pdf-title-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pdf-title-area i {
  color: var(--accent-color);
  width: 16px;
  height: 16px;
}

.pdf-title-area h3 {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.close-pdf-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.close-pdf-btn:hover {
  background-color: rgba(244, 63, 94, 0.06);
  color: var(--danger-color);
}

.pdf-iframe-container {
  flex: 1;
  width: 100%;
  height: 100%;
  position: relative;
  background-color: var(--bg-app);
}

.pdf-iframe-container iframe {
  width: 100%;
  height: 100%;
  border: none;
  position: absolute;
  top: 0;
  left: 0;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .chat-header {
    display: none;
  }
  .pdf-panel {
    position: fixed;
    top: 0;
    right: -100%;
    bottom: 0;
    width: 100%;
    min-width: 100%;
    z-index: 100;
    border-left: none;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .pdf-panel.open {
    display: flex;
    right: 0;
  }
  .sidebar {
    position: absolute;
    left: calc(-1 * var(--sidebar-width));
    top: 0;
    bottom: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  .sidebar.open {
    transform: translateX(var(--sidebar-width));
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
  }
  
  .toggle-sidebar-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-radius: 8px;
  }
  
  .mobile-top-bar {
    display: flex;
  }
  
  .chat-stream-container {
    padding: 20px 16px;
  }
  
  .message-content {
    max-width: 92%;
    font-size: 14px;
    padding: 12px 16px;
  }
  
  .sources-section {
    max-width: 92%;
  }
  
  .suggestion-grid {
    grid-template-columns: 1fr;
  }
  
  .input-panel {
    padding: 16px;
  }
}
