/* ==========================================================================
   Agente Cíntia — Microsoft Fluent 2 Mica/Acrylic + Copilot Legal Studio 2026
   Tokens semânticos com elevação tonal, hairlines 1px e Toggle Claro/Escuro
   ========================================================================== */

:root,
[data-theme="dark"] {
  --bg-canvas: #0a0e14;
  --bg-mica-glow-1: rgba(43, 136, 216, 0.12);
  --bg-mica-glow-2: rgba(16, 185, 129, 0.07);
  --surface-acrylic: rgba(18, 24, 34, 0.78);
  --surface-solid: #111722;
  --surface-elevated: #17202f;
  --border-hairline: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text-primary: #f2f6fc;
  --text-secondary: #98a6bc;
  --accent-primary: #2b88d8;
  --accent-bright: #60cdff;
  --accent-soft: rgba(43, 136, 216, 0.16);
  --gold: #e5b84b;
  --gold-soft: rgba(229, 184, 75, 0.14);
  --emerald: #10b981;
  --emerald-soft: rgba(16, 185, 129, 0.14);
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.14);
  --warn: #f59e0b;
  --shadow-card: 0 12px 32px rgba(0, 0, 0, 0.35);
  --radius-outer: 16px;
  --radius-inner: 10px;
}

[data-theme="light"] {
  --bg-canvas: #f3f5f8;
  --bg-mica-glow-1: rgba(43, 136, 216, 0.08);
  --bg-mica-glow-2: rgba(16, 185, 129, 0.05);
  --surface-acrylic: rgba(255, 255, 255, 0.86);
  --surface-solid: #ffffff;
  --surface-elevated: #f7f9fc;
  --border-hairline: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.15);
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --accent-primary: #0f6cbd;
  --accent-bright: #0f6cbd;
  --accent-soft: rgba(15, 108, 189, 0.1);
  --gold: #b47b08;
  --gold-soft: rgba(180, 123, 8, 0.1);
  --emerald: #059669;
  --emerald-soft: rgba(5, 150, 105, 0.1);
  --danger: #dc2626;
  --danger-soft: rgba(220, 38, 38, 0.1);
  --warn: #d97706;
  --shadow-card: 0 8px 24px rgba(15, 23, 42, 0.06);
}

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

html, body {
  min-height: 100vh;
  background-color: var(--bg-canvas);
  background-image:
    radial-gradient(50% 40% at 15% 0%, var(--bg-mica-glow-1), transparent 70%),
    radial-gradient(45% 40% at 90% 10%, var(--bg-mica-glow-2), transparent 65%);
  color: var(--text-primary);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.mono {
  font-family: 'JetBrains Mono', monospace;
  font-variant-numeric: tabular-nums;
}

.hidden {
  display: none !important;
}

.muted {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.acrylic {
  background: var(--surface-acrylic);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid var(--border-hairline);
  box-shadow: var(--shadow-card);
}

/* Focus ring WCAG 2.2 */
:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
}

/* Layout Shell */
.fluent-shell {
  display: grid;
  grid-template-columns: 256px 1fr;
  min-height: 100vh;
}

/* Sidebar Fluent 2 */
.sidebar {
  background: var(--surface-solid);
  border-right: 1px solid var(--border-hairline);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 6px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent-soft);
  border: 1px solid rgba(96, 205, 255, 0.3);
  color: var(--accent-bright);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.brand h1 {
  font-size: 0.96rem;
  line-height: 1.2;
}

.brand-sub {
  font-size: 0.74rem;
  color: var(--accent-bright);
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  position: relative;
  min-height: 44px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  padding: 10px 14px;
  border-radius: var(--radius-inner);
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
  text-align: left;
  touch-action: manipulation;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease, transform 120ms ease;
}

.nav-item:active {
  transform: scale(0.98);
}

@media (hover: hover) {
  .nav-item:hover {
    background: var(--surface-elevated);
    color: var(--text-primary);
  }
}

.nav-item.active {
  background: var(--surface-elevated);
  border-color: var(--border-hairline);
  color: var(--text-primary);
  font-weight: 600;
}

/* Marcador vertical azul característico do Microsoft Fluent 2 */
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 99px;
  background: var(--accent-bright);
}

.nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.85;
}

.nav-item.active .nav-icon {
  color: var(--accent-bright);
  opacity: 1;
}

.status-card {
  margin-top: auto;
  border-radius: var(--radius-outer);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 4px var(--emerald-soft);
}

.compliance-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.74rem;
  color: var(--emerald);
  background: var(--emerald-soft);
  padding: 6px 10px;
  border-radius: 8px;
  font-weight: 600;
}

.evo-power-box {
  border-top: 1px solid var(--border-hairline);
  border-bottom: 1px solid var(--border-hairline);
  padding: 10px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Topbar Flutuante (Command Bar) */
.content-column {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  border-top: none;
  border-left: none;
  border-right: none;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.command-trigger {
  flex: 1;
  max-width: 560px;
  min-height: 42px;
  background: var(--surface-elevated);
  border: 1px solid var(--border-hairline);
  border-radius: 12px;
  padding: 8px 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-align: left;
  transition: border-color 150ms ease, background-color 150ms ease;
}

@media (hover: hover) {
  .command-trigger:hover {
    border-color: var(--border-strong);
    color: var(--text-primary);
  }
}

.command-placeholder {
  flex: 1;
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kbd {
  font-size: 0.72rem;
  padding: 3px 7px;
  border-radius: 6px;
  background: var(--surface-solid);
  border: 1px solid var(--border-hairline);
  color: var(--text-secondary);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.region-pill {
  font-size: 0.75rem;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-bright);
  border: 1px solid rgba(96, 205, 255, 0.25);
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--surface-elevated);
  border: 1px solid var(--border-hairline);
  color: var(--text-primary);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color 150ms ease, transform 120ms ease;
}

.icon-btn:active {
  transform: scale(0.95);
}

/* Main */
.main {
  padding: 20px 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 1640px;
  width: 100%;
  margin: 0 auto;
  flex: 1;
}

/* Bento Grid Assimétrico (2fr + 1.1fr + 1fr) */
.bento-asymmetric {
  display: grid;
  grid-template-columns: 1.9fr 1.15fr 1fr;
  gap: 14px;
}

.bento-card {
  border-radius: var(--radius-outer);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

.radar-hero.has-urgent {
  border-color: rgba(239, 68, 68, 0.42);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), var(--surface-acrylic));
}

.radar-top,
.kpi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.radar-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.radar-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
}

.radar-hero.has-urgent .radar-dot {
  background: var(--danger);
  box-shadow: 0 0 0 4px var(--danger-soft);
}

.radar-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.radar-headline {
  font-size: 1.08rem;
  line-height: 1.25;
}

.kpi-label {
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.kpi-value {
  display: block;
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.15;
}

.kpi-foot {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.kpi-gold {
  border-color: rgba(229, 184, 75, 0.28);
}

.finops-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.sparkline {
  width: 96px;
  height: 36px;
  flex-shrink: 0;
}

.dual-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.stat-divider {
  width: 1px;
  height: 38px;
  background: var(--border-hairline);
}

/* Views */
.view {
  display: none;
  flex: 1;
}

.view.active {
  display: flex;
  flex-direction: column;
}

.workspace-grid {
  display: grid;
  grid-template-columns: 310px 1fr 320px;
  gap: 14px;
  flex: 1;
  min-height: 540px;
}

.panel {
  border-radius: var(--radius-outer);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-header h2 {
  font-size: 0.96rem;
}

/* Filters & Badges */
.filter-pills {
  display: flex;
  gap: 6px;
}

.pill {
  background: var(--surface-elevated);
  border: 1px solid var(--border-hairline);
  color: var(--text-secondary);
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 150ms ease, color 150ms ease, background-color 150ms ease;
}

.pill.active,
.pill:hover {
  color: var(--text-primary);
  border-color: var(--accent-bright);
  background: var(--accent-soft);
}

.badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-danger {
  background: var(--danger-soft);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

[data-theme="light"] .badge-danger { color: #b91c1c; }

.badge-warn {
  background: rgba(245, 158, 11, 0.14);
  color: #fcd34d;
}

[data-theme="light"] .badge-warn { color: #b45309; }

.badge-ok {
  background: var(--emerald-soft);
  color: var(--emerald);
}

.badge-gold {
  background: var(--gold-soft);
  color: var(--gold);
}

.badge-area {
  background: var(--surface-elevated);
  border: 1px solid var(--border-hairline);
  color: var(--text-primary);
}

/* Conversation List */
.conversation-list {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 10px;
  gap: 8px;
}

.conv-item {
  background: var(--surface-elevated);
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 150ms ease, background-color 150ms ease;
}

@media (hover: hover) {
  .conv-item:hover {
    border-color: var(--border-strong);
  }
}

.conv-item.selected {
  border-color: var(--accent-bright);
  background: var(--accent-soft);
}

.conv-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.conv-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.conv-preview {
  font-size: 0.82rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Chat */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bubble {
  max-width: 82%;
  padding: 12px 15px;
  border-radius: 14px;
  font-size: 0.92rem;
  white-space: pre-wrap;
  text-wrap: pretty;
}

.bubble.client {
  align-self: flex-start;
  background: var(--surface-elevated);
  border: 1px solid var(--border-hairline);
}

.bubble.ai {
  align-self: flex-end;
  background: var(--emerald-soft);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.bubble.lawyer {
  align-self: flex-end;
  background: var(--accent-soft);
  border: 1px solid rgba(96, 205, 255, 0.35);
}

.bubble-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-bottom: 5px;
  font-weight: 600;
}

.oab-tag {
  color: var(--emerald);
  font-size: 0.7rem;
}

.reply-form {
  padding: 12px 14px;
  border-top: 1px solid var(--border-hairline);
  display: flex;
  gap: 10px;
}

/* Inputs & Buttons */
input, textarea, select {
  width: 100%;
  background: var(--surface-elevated);
  border: 1px solid var(--border-hairline);
  color: var(--text-primary);
  border-radius: var(--radius-inner);
  padding: 11px 14px;
  font-family: inherit;
  font-size: 1rem;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent-bright);
}

.btn {
  min-height: 40px;
  border: none;
  border-radius: var(--radius-inner);
  padding: 9px 16px;
  font-weight: 600;
  font-size: 0.86rem;
  cursor: pointer;
  white-space: nowrap;
  touch-action: manipulation;
  transition: transform 150ms cubic-bezier(0.2, 0, 0, 1), opacity 150ms ease, background-color 150ms ease;
}

.btn:active:not(:disabled) {
  transform: scale(0.97);
}

.btn-fluent {
  background: var(--accent-primary);
  color: #ffffff;
}

.btn-fluent.paused {
  background: var(--emerald);
  color: #051610;
}

.btn-danger-soft {
  background: var(--danger-soft);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

[data-theme="light"] .btn-danger-soft { color: #b91c1c; }

.btn-ghost-danger {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: var(--danger);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.78rem;
  cursor: pointer;
}

/* Dossier Vertical Timeline (Copilot Jurídico) */
.dossier-content {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}

.dossier-block {
  position: relative;
  padding-left: 14px;
  border-left: 2px solid var(--border-hairline);
}

.dossier-block h3 {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-bright);
  margin-bottom: 6px;
}

.dossier-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.86rem;
}

.dossier-list li {
  background: var(--surface-elevated);
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-hairline);
}

.empty-state {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin: auto;
  text-align: center;
  padding: 32px 16px;
}

/* Forms & Knowledge */
.simulator-panel, .settings-panel {
  padding-bottom: 24px;
}

.quick-scenarios, .sim-form, .settings-form {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.scenario-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.wa-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.qr-notice {
  background: var(--gold-soft);
  border: 1px solid rgba(229, 184, 75, 0.35);
  color: var(--text-primary);
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.84rem;
}

.qr-actions-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.qr-preview-box {
  background: #ffffff;
  color: #111827;
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  max-width: 300px;
}

.qr-preview-box img {
  width: 240px;
  height: 240px;
  object-fit: contain;
}

.btn-primary {
  background: var(--surface-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.sim-result {
  margin: 0 20px;
  padding: 16px;
  border-radius: 12px;
  background: var(--surface-elevated);
  border: 1px solid rgba(96, 205, 255, 0.35);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.areas-fieldset {
  border: 1px solid var(--border-hairline);
  border-radius: 12px;
  padding: 14px;
}

.areas-fieldset legend {
  padding: 0 8px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.areas-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.check-card {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  background: var(--surface-elevated);
  border: 1px solid var(--border-hairline);
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text-primary);
  cursor: pointer;
}

.check-card input {
  width: auto;
}

.knowledge-list {
  padding: 0 20px 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.know-card {
  background: var(--surface-elevated);
  border: 1px solid var(--border-hairline);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.toast {
  color: var(--emerald);
  font-size: 0.88rem;
  font-weight: 600;
}

/* Command Palette Modal (Ctrl+K) */
.cmd-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(5, 8, 14, 0.65);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 96px 16px 24px;
  overscroll-behavior: contain;
}

.cmd-dialog {
  width: 100%;
  max-width: 580px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
}

.cmd-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-hairline);
  color: var(--text-secondary);
}

.cmd-input-wrap input {
  border: none;
  background: transparent;
  padding: 4px 0;
}

.cmd-results {
  max-height: 360px;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cmd-row {
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-primary);
  padding: 10px 12px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  text-align: left;
  font-size: 0.88rem;
}

.cmd-row:hover {
  background: var(--accent-soft);
  border-color: rgba(96, 205, 255, 0.25);
}

/* Responsive & Foldables */
@media (max-width: 1180px) {
  .bento-asymmetric {
    grid-template-columns: 1fr 1fr;
  }
  .radar-hero {
    grid-column: 1 / -1;
  }
  .workspace-grid {
    grid-template-columns: 270px 1fr;
  }
  .dossier-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 840px) {
  .fluent-shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border-hairline);
  }
  .bento-asymmetric,
  .workspace-grid,
  .form-row,
  .areas-grid,
  .knowledge-list {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}


/* ==================== SPRINT 2: HEALTH CHECKLIST, TOASTS & MODAL ==================== */
.health-banner {
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid var(--border-hairline);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.health-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.health-progress-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 200px;
}

.health-bar-track {
  flex: 1;
  max-width: 240px;
  height: 7px;
  border-radius: 999px;
  background: var(--surface-elevated);
  overflow: hidden;
  border: 1px solid var(--border-hairline);
}

.health-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), var(--emerald));
  border-radius: 999px;
  transition: width 300ms ease;
}

.health-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.health-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  border: 1px solid var(--border-hairline);
  background: var(--surface-elevated);
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.health-pill.done {
  border-color: rgba(16, 185, 129, 0.35);
  background: var(--emerald-soft);
  color: var(--emerald);
}

.health-pill:hover {
  border-color: var(--accent-bright);
}

.toast-stack {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 140;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 380px;
  pointer-events: none;
}

.toast-item {
  pointer-events: auto;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--surface-card, #181c26);
  color: var(--text-primary);
  font-size: 0.86rem;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.38);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  white-space: pre-wrap;
  animation: toastSlideIn 180ms cubic-bezier(0.2, 0, 0, 1);
}

.toast-item.success { border-left: 3px solid var(--emerald); }
.toast-item.error { border-left: 3px solid var(--danger); }
.toast-item.info { border-left: 3px solid var(--accent-bright); }

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

.sse-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  margin-right: 5px;
}


/* ==================== SPRINT 3: UPLOAD DRAG & DROP RAG ==================== */
.upload-dropzone {
  margin: 16px 20px 0;
  padding: 20px;
  border: 1.5px dashed var(--border-strong);
  border-radius: 14px;
  background: var(--surface-elevated);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.upload-dropzone.dragover {
  border-color: var(--accent-bright);
  background: var(--accent-soft);
}

.upload-dropzone-title {
  font-weight: 600;
  font-size: 0.92rem;
}

.upload-dropzone-sub {
  font-size: 0.8rem;
  color: var(--text-secondary);
}
