body {
	margin: 0;
	font-family: Inter, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	background:
		radial-gradient(circle at top left, rgba(13, 148, 136, 0.14), transparent 30%),
		radial-gradient(circle at top right, rgba(245, 158, 11, 0.12), transparent 28%),
		linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
	color: #0f172a;
}

nav {
	background: rgba(255, 255, 255, 0.78);
	backdrop-filter: blur(14px);
}

nav a {
	color: #0f766e;
	text-decoration: none;
	font-weight: 600;
}

.generator-shell {
	max-width: 1480px;
	margin: 0 auto;
	padding: 1.5rem;
}

.hero-card,
.section-card,
.preview-card {
	background: rgba(255, 255, 255, 0.84);
	border: 1px solid rgba(15, 23, 42, 0.08);
	border-radius: 22px;
	box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

.hero-card {
	padding: 1.5rem 1.5rem 1.25rem;
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	align-items: end;
	margin-bottom: 1.25rem;
}

.eyebrow,
.mini-label {
	margin: 0 0 0.35rem;
	text-transform: uppercase;
	letter-spacing: 0.14em;
	font-size: 0.72rem;
	color: #0f766e;
	font-weight: 700;
}

.page-title {
	margin: 0;
	font-size: clamp(2rem, 4vw, 3.5rem);
	line-height: 1.05;
}

.page-intro,
.section-description,
.form-help {
	color: #475569;
	margin-bottom: 0;
}

.generator-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
	gap: 1rem;
	align-items: start;
}

.generator-form {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.section-card {
	padding: 1rem;
}

.section-title {
	margin: 0 0 0.75rem;
	font-size: 1.1rem;
}

.section-title.compact {
	margin-bottom: 0;
}

.form-field {
	margin-bottom: 0.85rem;
}

.form-label {
	display: block;
	margin-bottom: 0.35rem;
	font-weight: 600;
	color: #1e293b;
}

.form-input,
.form-textarea,
.template-dropdown .Select-control {
	width: 100%;
	border-radius: 14px;
	border: 1px solid rgba(15, 23, 42, 0.14);
	background: #fff;
	box-sizing: border-box;
}

.form-input,
.form-textarea {
	/* increased spacing to prevent descender clipping (e.g. 'g') */
	padding: 0.5rem 0.9rem;
	font: inherit;
	line-height: 1.35;
	min-height: 40px;
}

.form-textarea {
	resize: vertical;
	min-height: 72px;
}

.template-dropdown .Select-control {
	min-height: 44px;
}

.action-row {
	display: flex;
	gap: 0.75rem;
	flex-wrap: wrap;
}

.primary-button,
.secondary-button {
	border: 0;
	border-radius: 999px;
	padding: 0.8rem 1.2rem;
	font-weight: 700;
	cursor: pointer;
}

.primary-button {
	background: linear-gradient(135deg, #0f766e, #14b8a6);
	color: #fff;
}

.secondary-button {
	background: rgba(15, 23, 42, 0.08);
	color: #0f172a;
}

.preview-card {
	position: sticky;
	top: 1rem;
	padding: 1rem;
}

.preview-header {
	margin-bottom: 0.75rem;
}

.generated-filename {
	color: #0f766e;
	font-weight: 700;
}

.code-preview {
	margin: 0;
	padding: 1rem;
	min-height: 78vh;
	overflow: auto;
	background: #0f172a;
	color: #e2e8f0;
	border-radius: 18px;
	line-height: 1.55;
	font-size: 0.92rem;
}

@media (max-width: 1100px) {
	.generator-grid {
		grid-template-columns: 1fr;
	}

	.preview-card {
		position: static;
	}

	.code-preview {
		min-height: 42vh;
	}
}

@media (max-width: 720px) {
	.hero-card {
		flex-direction: column;
		align-items: stretch;
	}

	.generator-shell {
		padding: 1rem;
	}
}

/* --- Analytics dashboards --- */

nav {
	display: flex;
	align-items: center;
}

.nav-link {
	margin-right: 0;
}

.dashboard-hero {
	display: block;
	padding: 1.5rem;
}

.dashboard-hero .page-title {
	font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.dashboard-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
	align-items: start;
	margin-top: 1rem;
}

.dashboard-grid .card-wide {
	grid-column: 1 / -1;
}

.controls-row {
	max-width: 340px;
	margin-top: 1rem;
}

.error-banner {
	margin-top: 1rem;
	padding: 1rem 1.25rem;
	border-radius: 16px;
	background: rgba(245, 158, 11, 0.12);
	border: 1px solid rgba(245, 158, 11, 0.35);
	color: #7c2d12;
}

.data-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9rem;
}

.data-table th,
.data-table td {
	text-align: left;
	padding: 0.45rem 0.6rem;
	border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.data-table th {
	color: #0f766e;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	font-size: 0.72rem;
}

.data-table td.num,
.data-table th.num {
	text-align: right;
	font-variant-numeric: tabular-nums;
}

@media (max-width: 1100px) {
	.dashboard-grid {
		grid-template-columns: 1fr;
	}
}
