.material-symbols-outlined,
.q-icon.material-symbols-outlined {
  font-family: 'Material Symbols Outlined' !important;
  font-weight: normal;
  font-style: normal;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'opsz' 24;
}

:root {
  --primary:           #0F4C5C;
  --primary-soft:      #E8F1F3;
  --primary-dark:      #0A3742;
  --accent:            #C57B57;
  --bg:                #FAFAF7;
  --surface:           #FFFFFF;
  --border:            #E5E5E1;
  --text:              #1A1A1A;
  --text-muted:        #6B6B6B;
  --success:           #2E7D32;
  --error:             #C62828;
  --radius-sm:         6px;
  --radius-md:         8px;
  --radius-lg:         12px;
  --radius-bubble:     18px;
  --shadow-sm:         0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:         0 1px 2px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.04);
  --app-header-height: 56px;
}
html, body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
}
/* Layout fix — scoped to chat page only */
body:has(.q-drawer--left) .nicegui-content {
  padding: 0;
  gap: 0;
  overflow: hidden;
}
body:has(.q-drawer--left) .nicegui-content > .nicegui-column:first-child {
  height: calc(100vh - var(--app-header-height));
  box-sizing: border-box;
  overflow: hidden;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.q-header {
  background: var(--surface) !important;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.brand-label {
  font-size: 18px;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: -0.01em;
}
.user-pill {
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 13px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 999px;
}

/* ── Sidebar ─────────────────────────────────────────────────────────────── */
.q-drawer {
  background: var(--surface) !important;
  border-right: 1px solid var(--border) !important;
}
.new-conv-btn {
  height: 40px !important;
  border-radius: var(--radius-md) !important;
  font-weight: 500 !important;
}
.new-conv-btn:hover { filter: brightness(0.88) !important; }
.sidebar-section-header {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 8px 12px 4px;
  display: block;
}
.conv-item {
  border-radius: var(--radius-md);
  transition: background 120ms;
  position: relative;
}
.conv-item:hover { background: #F5F5F2; }
.conv-item.active {
  background: var(--primary-soft);
  border-left: 3px solid var(--primary);
}
.conv-item .conv-title-btn { font-size: 14px; color: var(--text); }
.conv-item.active .conv-title-btn { font-weight: 500; }
.conv-item .delete-btn {
  opacity: 0;
  transition: opacity 150ms;
  color: var(--text-muted) !important;
}
.conv-item:hover .delete-btn { opacity: 1; }
.conv-item .delete-btn:hover { color: var(--error) !important; }

/* ── Burbujas ────────────────────────────────────────────────────────────── */
.user-row {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  margin-bottom: 8px;
}
.bubble-user {
  background: var(--primary);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-bubble) var(--radius-bubble) 4px var(--radius-bubble);
  max-width: 70%;
  font-size: 15px;
  line-height: 1.5;
  word-break: break-word;
}
.assistant-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  margin-bottom: 8px;
}
.assistant-avatar {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
}
.assistant-avatar .q-icon { font-size: 18px !important; color: #fff !important; }
.bubble-assistant {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 12px 16px;
  border-radius: var(--radius-bubble) var(--radius-bubble) var(--radius-bubble) 4px;
  max-width: 85%;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  word-break: break-word;
}

/* ── Prose markdown (.prose-pnt) ─────────────────────────────────────────── */
.prose-pnt h2 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--primary);
  margin-top: 20px;
  margin-bottom: 8px;
}
.prose-pnt h3 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-top: 16px;
  margin-bottom: 6px;
}
.prose-pnt p { font-size: 15px; line-height: 1.6; margin-bottom: 8px; }
.prose-pnt ul, .prose-pnt ol { padding-left: 20px; margin-bottom: 8px; }
.prose-pnt li { margin-bottom: 4px; }
.prose-pnt code {
  font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
  background: #F4F4F0;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 13.5px;
}
.prose-pnt pre {
  background: #F4F4F0;
  padding: 12px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin-bottom: 8px;
}
.prose-pnt pre code { background: none; padding: 0; font-size: 13px; }
.prose-pnt blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 12px;
  color: var(--text-muted);
  font-style: italic;
  margin: 8px 0;
}

/* ── Chips adjuntos ──────────────────────────────────────────────────────── */
.attachment-chip-bubble.q-chip {
  background: rgba(255,255,255,0.18) !important;
  color: #fff !important;
  font-size: 12.5px !important;
  border: none !important;
}
.attachment-chip-input.q-chip {
  background: var(--primary-soft) !important;
  color: var(--primary) !important;
  font-size: 12.5px !important;
}

/* ── Input area ──────────────────────────────────────────────────────────── */
.input-card {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-sm) !important;
  padding: 8px 12px !important;
}
.input-card .q-field--outlined .q-field__control::before,
.input-card .q-field--outlined .q-field__control::after { border: none !important; }
.input-card .q-field__control { background: transparent !important; }
.attach-btn { color: var(--text-muted) !important; }
.attach-btn:hover { color: var(--primary) !important; }

/* ── Empty state ─────────────────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  padding: 32px 16px;
  gap: 12px;
  width: 100%;
}
.empty-state-icon { font-size: 48px !important; color: var(--primary-soft) !important; }
.empty-state-title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}
.empty-state-subtitle { font-size: 14px; color: var(--text-muted); margin: 0; }
.suggestion-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
  width: 100%;
  max-width: 520px;
}
.suggestion-btn.q-btn {
  height: 64px;
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-md) !important;
  font-size: 14px !important;
  color: var(--text) !important;
  white-space: normal !important;
  line-height: 1.3 !important;
  transition: border-color 150ms, background 150ms;
}
.suggestion-btn.q-btn:hover {
  border-color: var(--primary) !important;
  background: var(--primary-soft) !important;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
.hamburger-btn { display: none; }
@media (max-width: 768px) {
  .hamburger-btn { display: inline-flex; }
  .bubble-user, .bubble-assistant { max-width: 90%; }
  .suggestion-grid { grid-template-columns: 1fr; }
  .user-pill { display: none; }
}
