/* ── Report Page (report_form.rs) ─────────────────────────────────────────── */

/* Page wrapper – full screen, white BG for print */
.report-page {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	background: #fff;
	color: #111;
}

/* ── Toolbar (hidden when printing) ─────────────────────────────────────── */
.report-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 24px;
	background: var(--bg-card, #fff);
	border-bottom: 1px solid var(--border, #e5e7eb);
	gap: 12px;
	position: sticky;
	top: 0;
	z-index: 100;
}

.report-toolbar__title {
	font-size: 1rem;
	font-weight: 600;
	color: var(--text-primary, #111827);
	flex: 1;
}

.report-toolbar__actions {
	display: flex;
	gap: 8px;
	align-items: center;
}

/* ── Loading / Error states ──────────────────────────────────────────────── */
.report-loading,
.report-error {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 64px 32px;
	font-size: 1rem;
	color: var(--text-secondary, #6b7280);
}

.report-error {
	color: var(--color-error, #ef4444);
}

/* ── Report body ─────────────────────────────────────────────────────────── */
.report-body {
	flex: 1;
	display: flex;
	justify-content: center;
	padding: 32px 16px;
}

.report-content {
	width: 100%;
	max-width: 860px;
	font-size: 0.9375rem;
	line-height: 1.65;
	color: #1a1a1a;
}

/* Typography from pulldown-cmark output */
.report-content h1,
.report-content h2,
.report-content h3,
.report-content h4 {
	margin: 1.5em 0 0.5em;
	font-weight: 700;
	line-height: 1.25;
	color: #111;
}

.report-content h1 { font-size: 1.75rem; border-bottom: 2px solid #e5e7eb; padding-bottom: 0.3em; }
.report-content h2 { font-size: 1.35rem; border-bottom: 1px solid #e5e7eb; padding-bottom: 0.2em; }
.report-content h3 { font-size: 1.1rem; }

.report-content p { margin: 0.5em 0; }

.report-content strong { font-weight: 700; }
.report-content em     { font-style: italic; }

/* Tables (generated by {{#each}} blocks + MD table syntax) */
.report-content table {
	width: 100%;
	border-collapse: collapse;
	margin: 1em 0;
	font-size: 0.875rem;
}

.report-content th,
.report-content td {
	padding: 6px 12px;
	border: 1px solid #d1d5db;
	text-align: left;
	vertical-align: top;
}

.report-content th {
	background: #f3f4f6;
	font-weight: 600;
	color: #374151;
}

.report-content tr:nth-child(even) td {
	background: #f9fafb;
}

/* Lists */
.report-content ul,
.report-content ol {
	padding-left: 1.4em;
	margin: 0.5em 0;
}

.report-content li { margin: 0.25em 0; }

/* Code blocks (rare in reports, but supported by pulldown-cmark) */
.report-content code {
	font-family: ui-monospace, monospace;
	font-size: 0.85em;
	background: #f3f4f6;
	padding: 0.1em 0.3em;
	border-radius: 3px;
}

.report-content pre code {
	display: block;
	padding: 0.75em 1em;
	overflow-x: auto;
}

/* Horizontal rules — section separators */
.report-content hr {
	border: none;
	border-top: 1px solid #e5e7eb;
	margin: 1.5em 0;
}

/* ── Print styles ─────────────────────────────────────────────────────────── */
@media print {
	/* Completely hide toolbar and app chrome */
	.no-print,
	.report-toolbar,
	.main-sidebar,
	.app-topbar {
		display: none !important;
	}

	.report-page {
		margin: 0;
		padding: 0;
	}

	.report-body {
		padding: 0;
	}

	.report-content {
		max-width: 100%;
		font-size: 10pt;
	}

	.report-content h1 { font-size: 18pt; }
	.report-content h2 { font-size: 14pt; }
	.report-content h3 { font-size: 12pt; }

	table         { page-break-inside: avoid; }
	tr            { page-break-inside: avoid; }
	h1, h2, h3    { page-break-after: avoid; }
}
