/* Small project-specific tweaks on top of Bootstrap. */
body { background-color: #f6f7f9; }

.section-card { margin-bottom: 1rem; }

/* Raw text (pasted message, extracted document text) keeps newlines verbatim */
.ai-output { white-space: pre-wrap; font-size: 0.95rem; }

/* Rendered Markdown from the AI features (analysis, summary, draft reply) */
.ai-md { font-size: 0.95rem; }
.ai-md > :first-child { margin-top: 0; }
.ai-md > :last-child { margin-bottom: 0; }
.ai-md h1, .ai-md h2, .ai-md h3, .ai-md h4, .ai-md h5, .ai-md h6 {
  font-size: 1rem; font-weight: 600; margin: .75rem 0 .25rem;
}
.ai-md p { margin: 0 0 .5rem; }
.ai-md ul, .ai-md ol { padding-left: 1.25rem; margin: .25rem 0 .5rem; }
.ai-md li { margin: .1rem 0; }
.ai-md table { width: 100%; border-collapse: collapse; margin: .5rem 0; font-size: .9rem; }
.ai-md th, .ai-md td { border: 1px solid #dee2e6; padding: .35rem .5rem; text-align: left; vertical-align: top; }
.ai-md th { background: #f1f3f5; }
.ai-md code { background: #f1f3f5; padding: .1rem .3rem; border-radius: .2rem; }
.ai-md pre { background: #f8f9fa; padding: .5rem; border-radius: .3rem; overflow-x: auto; }
.ai-md pre code { background: none; padding: 0; }
.ai-md blockquote { border-left: 3px solid #dee2e6; margin: .5rem 0; padding-left: .75rem; color: #6c757d; }

/* Per-section show/hide toggle for AI analysis.
   Text lives in the HTML (cache-proof); CSS only swaps which label shows. */
.section-toggle { font-size: .8rem; white-space: nowrap; }
.section-toggle .when-expanded { display: none; }
.section-toggle[aria-expanded="true"] .when-collapsed { display: none; }
.section-toggle[aria-expanded="true"] .when-expanded { display: inline; }

/* Compliance / due-date highlighting */
tr.overdue { background-color: #f8d7da; }
tr.due-soon { background-color: #fff3cd; }

.gate-blocked { border-left: 6px solid #dc3545; }
.gate-ok { border-left: 6px solid #198754; }
