/* ═══════════════════════════════════════════════════════════════
   Loan Guru — UI Styles
   ═══════════════════════════════════════════════════════════════ */

/* ── CSS Variables / Theming ─────────────────────────────────── */
:root {
  --bg-primary:    #f1f5f9;
  --bg-secondary:  #ffffff;
  --bg-card:       #ffffff;
  --bg-hover:      #f0fdfa;
  --bg-input:      #f8fafc;

  --accent-blue:   #0d9488;
  --accent-blue-h: #0f766e;
  --accent-green:  #16a34a;
  --accent-yellow: #d97706;
  --accent-red:    #dc2626;

  --text-primary:  #0f172a;
  --text-secondary:#475569;
  --text-muted:    #94a3b8;

  --border:        #e2e8f0;
  --border-subtle: #f1f5f9;

  --radius-sm:     6px;
  --radius-md:     10px;
  --radius-lg:     16px;

  --font-sans:     'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-mono:     'JetBrains Mono', 'Fira Code', monospace;

  --header-height: 58px;
  --overlay-width: 430px;
  --transition:    0.18s ease;
}

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

html, body {
  height: 100%;
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-blue); text-decoration: none; }
a:hover { color: var(--accent-blue-h); }

/* ── App Shell ────────────────────────────────────────────────── */
.app-wrapper {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* ── Header ───────────────────────────────────────────────────── */
.app-header {
  height: var(--header-height);
  min-height: var(--header-height);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  gap: 16px;
  z-index: 100;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.header-brand .logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #0d9488, #0891b2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.header-brand h1 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text-primary);
}

.header-brand .tagline {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
}

.header-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loan-selector-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 6px 12px;
}

.loan-selector-wrap label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

#loanSelect {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  outline: none;
  min-width: 200px;
}

#loanSelect option {
  background: var(--bg-card);
  color: var(--text-primary);
}

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

.btn-icon {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
}

.btn-icon:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--accent-blue);
}

.holo-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.holo-toggle input[type="checkbox"] {
  accent-color: var(--accent-blue);
  width: 13px;
  height: 13px;
  cursor: pointer;
}

/* ── LAS Floating Action Button ───────────────────────────────── */
.las-fab {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #0d9488, #0891b2);
  border: none;
  border-radius: 20px;
  color: #fff;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-sans);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(61,127,255,0.35);
  transition: all var(--transition);
  letter-spacing: 0.3px;
}

.las-fab:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(61,127,255,0.5);
}

.las-fab.active {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  box-shadow: 0 4px 16px rgba(34,197,94,0.35);
}

/* ── Main Content (Dashboard) ─────────────────────────────────── */
.main-content {
  flex: 1;
  overflow: hidden;
  display: flex;
  position: relative;
}

/* ── Hologram Overlay ─────────────────────────────────────────── */
.hologram-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  user-select: none;
  z-index: 5;
  overflow: hidden;
}

.hologram-text {
  text-align: center;
  line-height: 1.6;
  white-space: nowrap;
  animation: holoGlow 4s ease-in-out infinite;
}

.hologram-text div {
  font-size: 3.4rem;
  font-weight: 800;
  letter-spacing: 8px;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.18);
  -webkit-text-stroke: 1.5px rgba(0, 0, 0, 0.35);
  text-shadow: none;
}

@keyframes holoGlow {
  0%, 100% { opacity: 0.7; }
  50%       { opacity: 1.0; }
}

.dashboard {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

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

/* Hero card at top of dashboard */
.dashboard-hero {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

/* Grid of data section cards */
.dashboard-sections {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

/* ── Loan Status Badge ────────────────────────────────────────── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.status-badge.green  { background: rgba(34,197,94,0.15);  color: #22c55e; }
.status-badge.yellow { background: rgba(245,158,11,0.15); color: #f59e0b; }
.status-badge.blue   { background: rgba(13,148,136,0.12); color: #0d9488; }
.status-badge.red    { background: rgba(239,68,68,0.15);  color: #ef4444; }

.status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.program-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  background: rgba(61,127,255,0.12);
  color: var(--accent-blue);
  border: 1px solid rgba(61,127,255,0.25);
}

/* ── Borrower Card ────────────────────────────────────────────── */
.borrower-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 10px;
}

.borrower-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.loan-id-tag {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-bottom: 8px;
}

.borrower-meta {
  font-size: 11.5px;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* ── Data Sections ────────────────────────────────────────────── */
.data-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.data-section-title {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  padding: 8px 12px 6px;
  border-bottom: 1px solid var(--border-subtle);
}

.data-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 12px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 12.5px;
}

.data-row:last-child { border-bottom: none; }

.data-label {
  color: var(--text-muted);
  flex-shrink: 0;
  margin-right: 8px;
}

.data-value {
  color: var(--text-primary);
  font-weight: 600;
  text-align: right;
}

.data-value.flag-red    { color: var(--accent-red); }
.data-value.flag-yellow { color: var(--accent-yellow); }
.data-value.flag-green  { color: var(--accent-green); }

/* ── Missing Docs List ────────────────────────────────────────── */
.doc-list {
  list-style: none;
  padding: 6px 12px 8px;
}

.doc-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 4px 0;
  font-size: 12px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
}
.doc-item:last-child { border-bottom: none; }

.doc-item .doc-icon { font-size: 11px; flex-shrink: 0; margin-top: 1px; }
.doc-item.missing .doc-icon { color: var(--accent-yellow); }
.doc-item.ok .doc-icon { color: var(--accent-green); }

.no-items {
  padding: 8px 12px;
  font-size: 12px;
  color: var(--accent-green);
  font-weight: 600;
}

/* ── LAS Chat Overlay ─────────────────────────────────────────── */
.las-overlay {
  position: fixed;
  top: var(--header-height);
  right: 0;
  width: var(--overlay-width);
  height: calc(100vh - var(--header-height));
  z-index: 200;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border);
  box-shadow: -8px 0 40px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.las-overlay.open {
  transform: translateX(0);
}

.las-overlay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
  flex-shrink: 0;
}

/* ── Quick Actions Bar ────────────────────────────────────────── */
.quick-actions-bar {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.qa-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-right: 2px;
  white-space: nowrap;
}

.quick-action-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.quick-action-btn:hover {
  background: var(--bg-hover);
  border-color: var(--accent-blue);
  color: var(--accent-blue-h);
  transform: translateY(-1px);
}

.quick-action-btn.active {
  background: rgba(61,127,255,0.12);
  border-color: var(--accent-blue);
  color: var(--accent-blue-h);
}

.quick-action-btn .btn-icon-emoji { font-size: 13px; }

/* ── Chat Messages Area ───────────────────────────────────────── */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  background: var(--bg-primary);
}

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

/* ── Welcome State ────────────────────────────────────────────── */
.welcome-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 1;
  padding: 32px 16px;
  gap: 10px;
}

.welcome-state .welcome-icon {
  font-size: 40px;
  margin-bottom: 4px;
}

.welcome-state h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.welcome-state p {
  font-size: 12.5px;
  color: var(--text-secondary);
  max-width: 320px;
  line-height: 1.7;
}

.welcome-hints {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
  text-align: left;
  width: 100%;
}

.hint-chip {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}

.hint-chip:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue-h);
  background: var(--bg-hover);
}

/* ── Message Bubbles ──────────────────────────────────────────── */
.message {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  animation: fadeIn 0.2s ease;
}

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

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

.message-avatar {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
  margin-top: 2px;
}

.message.user .message-avatar {
  background: linear-gradient(135deg, #0d9488, #0891b2);
}

.message.assistant .message-avatar {
  background: linear-gradient(135deg, #0f766e, #0891b2);
}

.message-body {
  max-width: 80%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

.message-bubble {
  padding: 9px 13px;
  border-radius: var(--radius-md);
  font-size: 13px;
  line-height: 1.65;
  word-break: break-word;
}

.message.user .message-bubble {
  background: var(--accent-blue);
  color: #fff;
  border-bottom-right-radius: 3px;
}

.message.assistant .message-bubble {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-bottom-left-radius: 3px;
}

/* Markdown inside bubbles */
.message-bubble h1,
.message-bubble h2,
.message-bubble h3 {
  font-size: 13px;
  font-weight: 700;
  margin: 10px 0 4px;
  color: var(--text-primary);
}

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

.message-bubble p { margin-bottom: 6px; }
.message-bubble p:last-child { margin-bottom: 0; }

.message-bubble ul, .message-bubble ol {
  padding-left: 18px;
  margin: 4px 0 6px;
}

.message-bubble li { margin-bottom: 3px; }

.message-bubble strong { color: var(--text-primary); font-weight: 700; }

.message-bubble code {
  background: var(--bg-input);
  border-radius: 4px;
  padding: 1px 5px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: #0f766e;
}

.message-bubble hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 8px 0;
}

.message-meta {
  font-size: 10px;
  color: var(--text-muted);
  padding: 0 3px;
}

/* ── Typing Indicator ─────────────────────────────────────────── */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 0;
  animation: fadeIn 0.2s ease;
}

.typing-dots {
  display: flex;
  gap: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 9px 14px;
}

.typing-dots span {
  width: 6px;
  height: 6px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: bounce 1.2s ease infinite;
}

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

@keyframes bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-5px); opacity: 1; }
}

.typing-label {
  font-size: 11.5px;
  color: var(--text-muted);
  font-style: italic;
}

/* ── Draft Panel (Human-in-the-Loop) ─────────────────────────── */
.draft-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-top: 8px;
  overflow: hidden;
  animation: fadeIn 0.25s ease;
}

.draft-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}

.draft-panel-header .draft-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--accent-yellow);
  display: flex;
  align-items: center;
  gap: 6px;
}

.draft-actions {
  display: flex;
  gap: 6px;
}

.btn-approve {
  background: rgba(34,197,94,0.15);
  border: 1px solid rgba(34,197,94,0.4);
  border-radius: var(--radius-sm);
  color: var(--accent-green);
  padding: 4px 11px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-sans);
}

.btn-approve:hover {
  background: rgba(34,197,94,0.25);
  border-color: var(--accent-green);
}

.btn-edit-draft {
  background: rgba(245,158,11,0.12);
  border: 1px solid rgba(245,158,11,0.35);
  border-radius: var(--radius-sm);
  color: var(--accent-yellow);
  padding: 4px 11px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-sans);
}

.btn-edit-draft:hover {
  background: rgba(245,158,11,0.22);
  border-color: var(--accent-yellow);
}

.btn-discard {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  padding: 4px 9px;
  font-size: 11.5px;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-sans);
}

.btn-discard:hover {
  border-color: var(--accent-red);
  color: var(--accent-red);
}

.draft-textarea {
  width: 100%;
  background: var(--bg-input);
  border: none;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  padding: 12px 14px;
  resize: vertical;
  min-height: 140px;
  outline: none;
}

.draft-approved-badge {
  padding: 8px 14px;
  font-size: 12px;
  color: var(--accent-green);
  font-weight: 600;
  border-top: 1px solid var(--border-subtle);
  background: rgba(34,197,94,0.06);
}

/* ── Citation Panel ──────────────────────────────────────────── */
.citation-panel {
  margin-top: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  animation: fadeIn 0.2s ease;
}

.citation-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 12px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-blue);
  background: rgba(56, 189, 248, 0.06);
  transition: background var(--transition);
  user-select: none;
}

.citation-header:hover {
  background: rgba(56, 189, 248, 0.12);
}

.citation-count {
  font-weight: 400;
  opacity: 0.8;
}

.citation-chevron {
  font-size: 10px;
  opacity: 0.7;
}

.citation-body {
  display: none;
  padding: 10px 12px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
}

.citation-body.open {
  display: block;
}

.citation-item {
  margin-bottom: 10px;
  padding-left: 8px;
  border-left: 2px solid var(--accent-blue);
}

.citation-item:last-child {
  margin-bottom: 0;
}

.citation-source {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--accent-blue);
  margin-bottom: 3px;
  letter-spacing: 0.2px;
}

.citation-text {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ── Chat Input Area ──────────────────────────────────────────── */
.chat-input-area {
  padding: 12px 14px 14px;
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
  flex-shrink: 0;
}

.chat-input-box {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 9px 9px 9px 14px;
  transition: border-color var(--transition);
}

.chat-input-box:focus-within {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 2px rgba(61,127,255,0.12);
}

#chatInput {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 13px;
  font-family: var(--font-sans);
  resize: none;
  outline: none;
  max-height: 120px;
  min-height: 22px;
  line-height: 1.5;
  scrollbar-width: thin;
}

#chatInput::placeholder { color: var(--text-muted); }

.send-btn {
  background: var(--accent-blue);
  border: none;
  border-radius: var(--radius-md);
  color: #fff;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition);
  font-size: 14px;
}

.send-btn:hover { background: var(--accent-blue-h); transform: scale(1.05); }
.send-btn:disabled { background: var(--text-muted); cursor: not-allowed; transform: none; }

.input-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 5px;
  padding: 0 2px;
  gap: 8px;
}

.input-hint {
  font-size: 10.5px;
  color: var(--text-muted);
  white-space: nowrap;
}

.pii-warning {
  font-size: 10.5px;
  color: #f59e0b;
  opacity: 0.8;
}

/* ── Toast Notifications ──────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9999;
  pointer-events: none;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: toastIn 0.25s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.toast.success { border-color: var(--accent-green); }
.toast.error   { border-color: var(--accent-red);   }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Scrollbar Global ─────────────────────────────────────────── */
* { scrollbar-width: thin; scrollbar-color: var(--border) transparent; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  :root { --overlay-width: 100vw; }

  /* Header — logo icon + loan selector + LAS only; hide everything else */
  .app-header { padding: 0 10px; gap: 8px; }
  .header-brand h1   { display: none; }   /* hide title text on mobile */
  .header-brand .tagline { display: none; }
  .header-center { flex: 1; min-width: 0; }
  #loanSelect { min-width: 0; width: 100%; font-size: 12px; }
  .loan-selector-wrap { padding: 5px 8px; gap: 4px; width: 100%; box-sizing: border-box; }
  .loan-selector-wrap label { display: none; }   /* hide "ACTIVE LOAN:" label */
  .holo-toggle { display: none; }               /* hide Hologram toggle */
  .btn-icon    { display: none; }               /* hide Home button */

  /* Dashboard — single column, tighter padding */
  .dashboard { padding: 12px; gap: 12px; }
  .dashboard-sections { grid-template-columns: 1fr; gap: 10px; }
  .dashboard-hero { flex-direction: column; gap: 12px; padding: 14px 16px; }

  /* Hologram text — scale down */
  .hologram-text div { font-size: 1.8rem; }

  /* Chat overlay — full screen when open */
  .las-overlay { width: 100vw; border-left: none; }

  /* Chat layout — tighter */
  .las-overlay-header { padding: 10px 12px; }
  .chat-messages { padding: 10px; }
  .chat-input-area { padding: 8px 10px; }
  .quick-actions-bar { padding: 8px 10px; gap: 5px; flex-wrap: wrap; }
  .quick-action-btn { font-size: 11px; padding: 5px 9px; }

  /* Message bubbles — slightly smaller text */
  .message-bubble { font-size: 13px; }
  .message { max-width: 100%; }
}
