/* Cogniledger — Light B2B SaaS Design System */

body { background-color: #f8fafc; color: #0f172a; }

:root {
  --bg-base:        #f8fafc;
  --bg-surface:     #ffffff;
  --bg-card:        #ffffff;
  --bg-card-hover:  #f1f5f9;
  --border:         #e2e8f0;
  --border-bright:  #cbd5e1;

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

  --indigo:         #03904a;
  --indigo-light:   #00A19B;
  --indigo-bg:      rgba(3, 144, 74, 0.08);
}

/* Primary card — white with subtle border and shadow */
.sl-card {
  background:    var(--bg-card);
  border:        1px solid var(--border);
  box-shadow:    0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.04);
  border-radius: 1rem;
}
.sl-card:hover {
  border-color: var(--border-bright);
  box-shadow:   0 4px 12px rgba(0,0,0,0.07);
}

/* Primary button */
.btn-primary {
  background:  #03904a;
  color:       #ffffff;
  font-weight: 700;
  box-shadow:  0 1px 3px rgba(3,144,74,0.3);
  transition:  background 0.15s, box-shadow 0.15s, transform 0.1s;
}
.btn-primary:hover {
  background:  #027a3e;
  box-shadow:  0 4px 12px rgba(3,144,74,0.35);
  transform:   translateY(-1px);
}

/* Ghost button */
.btn-ghost {
  background:  #ffffff;
  color:       #374151;
  border:      1px solid #e2e8f0;
  font-weight: 600;
  transition:  background 0.15s, border-color 0.15s;
}
.btn-ghost:hover { background: #f8fafc; border-color: #cbd5e1; }

/* Risk badges — light variant */
.badge-high   { background: rgba(239,68,68,0.08);  color: #dc2626; border: 1px solid rgba(239,68,68,0.20); }
.badge-medium { background: rgba(245,158,11,0.08); color: #d97706; border: 1px solid rgba(245,158,11,0.20); }
.badge-low    { background: rgba(0,102,204,0.08);  color: #0066cc; border: 1px solid rgba(0,102,204,0.20); }
.badge-clean  { background: rgba(0,161,155,0.06);  color: #00A19B; border: 1px solid rgba(0,161,155,0.20); }

/* Table rows */
.ledger-row-flagged { background: rgba(239,68,68,0.025); }
.ledger-row:hover   { background: #f8fafc; }

/* Monospaced numbers */
.num { font-family: 'JetBrains Mono', 'Courier New', ui-monospace, monospace; }

/* Auth page — fade + slide-up animation */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.auth-fade    { animation: fadeSlideUp 0.5s ease-out both; }
.auth-fade-d1 { animation: fadeSlideUp 0.5s ease-out 0.08s  both; }
.auth-fade-d2 { animation: fadeSlideUp 0.5s ease-out 0.16s  both; }
.auth-fade-d3 { animation: fadeSlideUp 0.5s ease-out 0.24s  both; }
.auth-fade-d4 { animation: fadeSlideUp 0.5s ease-out 0.32s  both; }
.auth-fade-d5 { animation: fadeSlideUp 0.5s ease-out 0.40s  both; }

/* Drop zone */
.drop-zone {
  border:     2px dashed #e2e8f0;
  background: #f8fafc;
  transition: border-color 0.2s, background 0.2s;
}
.drop-zone.dragover,
.drop-zone:hover { border-color: #03904a; background: rgba(3,144,74,0.03); }

/* Premium blur overlay */
.premium-blur-content { filter: blur(5px); user-select: none; pointer-events: none; }
.premium-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: rgba(248,250,252,0.88);
  backdrop-filter: blur(4px);
  border-radius: inherit;
}

/* Chatbot messages — left panel bubbles */
.chat-bubble-user      { background: #03904a; color: #fff; border-radius: 1.2rem 1.2rem 0.25rem 1.2rem; }
.chat-bubble-assistant { background: #f1f5f9; color: #374151; border: 1px solid #e2e8f0; border-radius: 1.2rem 1.2rem 1.2rem 0.25rem; }
.chat-bubble-error     { background: rgba(239,68,68,0.06); color: #dc2626; border: 1px solid rgba(239,68,68,0.15); border-radius: 1.2rem; }

/* Executive Document Viewer — prose area for rendered markdown */
.prose-area { color: #1e293b; font-size: 0.9rem; line-height: 1.75; }
.prose-area h3 { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #4f46e5; margin: 1.4rem 0 0.5rem; padding-bottom: 0.35rem; border-bottom: 1px solid #e2e8f0; }
.prose-area h3:first-child { margin-top: 0; }
.prose-area p  { margin: 0 0 0.75rem; }
.prose-area strong { color: #0f172a; font-weight: 700; }
.prose-area ul { margin: 0.4rem 0 0.9rem 1.2rem; padding: 0; list-style: disc; }
.prose-area ol { margin: 0.4rem 0 0.9rem 1.4rem; padding: 0; list-style: decimal; }
.prose-area li { margin-bottom: 0.3rem; }
.prose-area table { width: 100%; border-collapse: collapse; margin: 0.75rem 0 1rem; font-size: 0.82rem; }
.prose-area th { background: #f1f5f9; font-weight: 700; color: #374151; text-align: left; padding: 0.45rem 0.75rem; border: 1px solid #e2e8f0; }
.prose-area td { padding: 0.4rem 0.75rem; border: 1px solid #e2e8f0; color: #334155; }
.prose-area tr:nth-child(even) td { background: #f8fafc; }
.prose-area code { background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 4px; padding: 0.1em 0.4em; font-family: ui-monospace, monospace; font-size: 0.82rem; color: #4f46e5; }
