/* Dahono Labs — Indonesian Applied Legal AI
   ChatGPT / Gemini Sovereign Design System (Pure SVG Icons, Zero Emojis)
*/

:root {
  --bg-app: #080c14;
  --bg-sidebar: #06090f;
  --bg-sidebar-hover: rgba(255, 255, 255, 0.05);
  --bg-sidebar-active: rgba(37, 99, 235, 0.15);
  --bg-header: rgba(8, 12, 20, 0.9);
  --bg-card: #101726;
  --bg-card-hover: #162035;
  --bg-pill: #131c2e;
  --bg-pill-focus: #18243b;
  --bg-user-bubble: #1e293b;
  --bg-assistant-bubble: #0f1624;
  --bg-think: rgba(15, 23, 42, 0.7);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(255, 255, 255, 0.1);
  --border-active: rgba(59, 130, 246, 0.5);
  --border-focus: #3b82f6;

  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #60a5fa;
  --accent-gold: #f59e0b;
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;

  --text-main: #f8fafc;
  --text-body: #cbd5e1;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-xl: 24px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --sidebar-w: 280px;
  --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  background-color: var(--bg-app);
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* App Wrapper: strict flex row */
.app-wrapper {
  display: flex;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  position: relative;
}

/* Sidebar Styles */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  max-width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  height: 100%;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: margin-left var(--transition-normal);
  z-index: 40;
}

.sidebar.collapsed {
  margin-left: calc(-1 * var(--sidebar-w));
}

.sidebar-header {
  padding: 1.15rem 1.15rem 0.65rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-badge {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #1d4ed8 0%, #0284c7 100%);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}

.brand-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  color: var(--text-main);
  white-space: nowrap;
}

.brand-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* New Chat Button */
.btn-new-chat {
  margin: 0.5rem 1rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 1rem;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.18) 0%, rgba(2, 132, 199, 0.1) 100%);
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.btn-new-chat:hover {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.28) 0%, rgba(2, 132, 199, 0.2) 100%);
  border-color: var(--border-focus);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.25);
}

/* Sidebar Content (Scrollable) */
.sidebar-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 0.75rem 1rem;
}

.sidebar-content::-webkit-scrollbar {
  width: 4px;
}

.sidebar-content::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 4px;
}

.sidebar-section-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--text-dim);
  padding: 0.75rem 0.35rem 0.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.text-subtle-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.72rem;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.text-subtle-btn:hover {
  color: var(--accent-rose);
}

/* Preset Navigation Items */
.presets-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 1rem;
}

.preset-nav-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-fast);
  width: 100%;
}

.preset-nav-item:hover {
  background: var(--bg-sidebar-hover);
  border-color: var(--border-subtle);
}

.preset-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-light);
  flex-shrink: 0;
}

.preset-text {
  flex: 1;
  min-width: 0;
}

.preset-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preset-desc {
  font-size: 0.68rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.history-item:hover {
  background: var(--bg-sidebar-hover);
  color: var(--text-main);
}

.history-item.active {
  background: var(--bg-sidebar-active);
  color: var(--primary-light);
  border-color: rgba(59, 130, 246, 0.25);
}

.history-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.history-empty {
  font-size: 0.75rem;
  color: var(--text-dim);
  padding: 0.5rem 0.35rem;
  font-style: italic;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--border-subtle);
  background: rgba(4, 7, 12, 0.6);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex-shrink: 0;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.6rem;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 20px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.pulse-indicator {
  width: 7px;
  height: 7px;
  background-color: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulseDot 2s infinite;
  flex-shrink: 0;
}

@keyframes pulseDot {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.7; }
}

.sidebar-links {
  display: flex;
  gap: 0.75rem;
  font-size: 0.72rem;
}

.sidebar-link {
  color: var(--text-dim);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.sidebar-link:hover {
  color: var(--text-main);
}

.sidebar-credits {
  font-size: 0.68rem;
  color: var(--text-dim);
  line-height: 1.4;
}

/* Main Chat Area: MUST have flex: 1 1 0 and min-width: 0 */
.chat-main {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  background-color: var(--bg-app);
  overflow: hidden;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(37, 99, 235, 0.08) 0%, transparent 55%),
    radial-gradient(circle at 10% 80%, rgba(16, 185, 129, 0.03) 0%, transparent 45%);
}

/* Top Navigation Bar */
.top-nav {
  height: 56px;
  min-height: 56px;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-header);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
  z-index: 20;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.icon-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.icon-btn:hover {
  background: var(--bg-sidebar-hover);
  color: var(--text-main);
  border-color: var(--border-subtle);
}

.model-selector-pill {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.75rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  white-space: nowrap;
}

.model-icon {
  display: flex;
  align-items: center;
  color: var(--primary-light);
}

.model-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.model-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-main);
}

.model-badge {
  font-size: 0.65rem;
  background: rgba(37, 99, 235, 0.2);
  color: var(--primary-light);
  padding: 1px 6px;
  border-radius: 12px;
  border: 1px solid rgba(59, 130, 246, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.clock-chip {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.78rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.action-btn:hover {
  background: rgba(244, 63, 94, 0.1);
  color: var(--accent-rose);
  border-color: rgba(244, 63, 94, 0.3);
}

/* Chat Scroll Area */
.chat-scroll-area {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  scroll-behavior: smooth;
}

.chat-scroll-area::-webkit-scrollbar {
  width: 6px;
}

.chat-scroll-area::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 4px;
}

.chat-inner-container {
  max-width: 820px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 9rem;
  width: 100%;
}

/* Welcome Hero Screen */
.welcome-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2.5rem 0 1rem;
}

.hero-brand-symbol {
  position: relative;
  width: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.glow-disc {
  position: absolute;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.35) 0%, transparent 70%);
  filter: blur(12px);
  border-radius: 50%;
  animation: pulseGlow 4s infinite ease-in-out;
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.15); opacity: 0.9; }
}

.symbol-scales-svg {
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 4px 12px rgba(37, 99, 235, 0.4));
  display: flex;
  align-items: center;
  justify-content: center;
}

.welcome-title {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
  max-width: 620px;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

.welcome-subtitle {
  font-size: 0.92rem;
  color: var(--text-muted);
  max-width: 600px;
  line-height: 1.6;
  margin-bottom: 2.25rem;
}

.hero-action-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  width: 100%;
}

.action-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.action-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-active);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.5);
}

.action-card-header {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.5rem;
}

.card-icon {
  display: flex;
  align-items: center;
  color: var(--primary-light);
}

.card-action-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
}

.card-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1rem;
  flex: 1;
}

.card-footer-tag {
  font-size: 0.72rem;
  color: var(--primary-light);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Messages Stream */
.messages-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
}

.message-row {
  display: flex;
  gap: 1rem;
  width: 100%;
  animation: fadeIn 0.25s ease-out;
}

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

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

.message-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.message-row.user .message-avatar {
  background: #334155;
  color: #fff;
}

.message-row.assistant .message-avatar {
  background: linear-gradient(135deg, #1d4ed8 0%, #0284c7 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

.message-body {
  max-width: 85%;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.message-row.user .message-bubble {
  background: var(--bg-user-bubble);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg) var(--radius-sm) var(--radius-lg) var(--radius-lg);
  padding: 0.85rem 1.15rem;
  color: var(--text-main);
  font-size: 0.92rem;
  line-height: 1.6;
}

.message-row.assistant .message-bubble {
  background: var(--bg-assistant-bubble);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm) var(--radius-lg) var(--radius-lg) var(--radius-lg);
  padding: 1.15rem 1.35rem;
  color: var(--text-main);
  font-size: 0.92rem;
  line-height: 1.7;
}

/* Markdown Typography */
.message-bubble h2, 
.message-bubble h3, 
.message-bubble h4 {
  font-family: var(--font-heading);
  color: var(--text-main);
  margin-top: 1.25rem;
  margin-bottom: 0.6rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.message-bubble h2 { font-size: 1.2rem; border-bottom: 1px solid var(--border-subtle); padding-bottom: 0.35rem; }
.message-bubble h3 { font-size: 1.05rem; color: #93c5fd; }
.message-bubble h4 { font-size: 0.95rem; color: var(--text-body); }

.message-bubble p {
  margin-bottom: 0.75rem;
}

.message-bubble ul, 
.message-bubble ol {
  margin: 0.5rem 0 0.85rem 1.35rem;
}

.message-bubble li {
  margin-bottom: 0.35rem;
}

.message-bubble strong {
  color: #fff;
  font-weight: 600;
}

.message-bubble em {
  color: #93c5fd;
  font-style: italic;
}

.message-bubble blockquote {
  border-left: 3px solid var(--primary-light);
  padding: 0.5rem 0.85rem;
  margin: 0.75rem 0;
  background: rgba(37, 99, 235, 0.08);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
}

.message-bubble pre {
  background: #090d16;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  margin: 0.75rem 0;
  line-height: 1.5;
}

.message-bubble code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  color: #93c5fd;
}

.message-bubble pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

/* Lists & Ordered Sequences */
.message-bubble ul,
.message-bubble ol {
  margin: 0.65rem 0 0.75rem 1.4rem;
  padding: 0;
}

.message-bubble li {
  margin-bottom: 0.35rem;
  line-height: 1.6;
}

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

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

/* Math Formula Highlight Box */
.math-formula-box {
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: var(--radius-sm);
  padding: 0.65rem 1rem;
  margin: 0.75rem 0;
  font-family: var(--font-mono);
  color: var(--primary-light);
  font-size: 0.88rem;
  text-align: center;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.math-formula-box code {
  background: transparent;
  padding: 0;
  color: inherit;
}

/* Tables */
.message-bubble table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.85rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.message-bubble th {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  text-align: left;
  padding: 0.65rem 0.85rem;
  font-weight: 600;
  border: 1px solid var(--border-subtle);
}

.message-bubble td {
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border-subtle);
  color: var(--text-body);
}

.message-bubble tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

/* Thinking Accordion */
.thinking-accordion {
  background: var(--bg-think);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--radius-md);
  margin-bottom: 0.85rem;
  overflow: hidden;
}

.thinking-header {
  padding: 0.55rem 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  background: rgba(37, 99, 235, 0.06);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary-light);
  user-select: none;
  transition: background var(--transition-fast);
}

.thinking-header:hover {
  background: rgba(37, 99, 235, 0.12);
}

.thinking-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.thinking-icon {
  display: flex;
  align-items: center;
}

.thinking-chevron {
  transition: transform var(--transition-fast);
  font-size: 0.7rem;
}

.thinking-accordion.open .thinking-chevron {
  transform: rotate(180deg);
}

.thinking-body {
  display: none;
  padding: 0.75rem 0.85rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.55;
  border-top: 1px solid rgba(59, 130, 246, 0.15);
  white-space: pre-wrap;
  font-family: var(--font-mono);
}

.thinking-accordion.open .thinking-body {
  display: block;
}

/* Citations Badges */
.citations-wrapper {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
}

.citations-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 0.45rem;
}

.citations-grid {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.citation-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0.65rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--text-body);
}

.citation-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 500;
}

.citation-icon {
  display: flex;
  align-items: center;
  color: var(--primary-light);
}

.citation-score {
  font-size: 0.68rem;
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.1);
  padding: 1px 6px;
  border-radius: 10px;
  border: 1px solid rgba(16, 185, 129, 0.25);
  font-family: var(--font-mono);
}

/* Message Actions Toolbar */
.message-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-left: 0.25rem;
  margin-top: 0.2rem;
}

.btn-msg-action {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  padding: 3px 8px;
  border-radius: 4px;
  transition: all var(--transition-fast);
}

.btn-msg-action:hover {
  background: var(--bg-sidebar-hover);
  color: var(--text-main);
}

/* Bottom Floating Input Area */
.chat-input-area {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0 1.25rem 1.25rem;
  background: linear-gradient(180deg, transparent 0%, var(--bg-app) 45%, var(--bg-app) 100%);
  pointer-events: none;
  z-index: 30;
}

.input-inner-wrapper {
  max-width: 800px;
  margin: 0 auto;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.input-context-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.5rem;
}

.context-tag {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  color: var(--text-dim);
}

.indicator-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--accent-emerald);
}

.typing-indicator {
  font-size: 0.75rem;
  color: var(--primary-light);
  font-style: italic;
  animation: blinkText 1.5s infinite;
}

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

/* Floating Pill Container */
.prompt-pill-container {
  display: flex;
  align-items: flex-end;
  background: var(--bg-pill);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 0.65rem 0.85rem 0.65rem 1.25rem;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
  transition: all var(--transition-fast);
}

.prompt-pill-container:focus-within {
  background: var(--bg-pill-focus);
  border-color: var(--border-focus);
  box-shadow: 0 10px 35px -8px rgba(37, 99, 235, 0.25);
}

.prompt-textarea {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.5;
  resize: none;
  max-height: 180px;
  min-height: 24px;
  padding: 2px 0;
}

.prompt-textarea::placeholder {
  color: var(--text-dim);
}

.pill-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: 0.5rem;
}

.btn-send-pill {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.btn-send-pill:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.btn-send-pill:disabled {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-dim);
  cursor: not-allowed;
  transform: none;
}

.chat-disclaimer {
  font-size: 0.68rem;
  color: var(--text-dim);
  text-align: center;
  line-height: 1.4;
  padding: 0 1rem;
}

.chat-disclaimer em {
  color: var(--text-muted);
}

/* Mobile Drawer Overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 35;
}

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

.mobile-only {
  display: none;
}

/* Responsive Rules */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    margin-left: 0 !important;
    transform: translateX(-100%);
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.8);
    transition: transform var(--transition-normal);
  }

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

  .mobile-only {
    display: flex;
  }

  .hero-action-grid {
    grid-template-columns: 1fr;
  }

  .chat-inner-container {
    padding: 1rem 0.75rem 8rem;
  }

  .message-body {
    max-width: 92%;
  }

  .model-badge {
    display: none;
  }

  .clock-chip {
    display: none;
  }
}
