/* ========================================
	Site-specific styles (Bar-le-Duc)
	======================================== */

:root {
	--primary-color: #1a365d;
	--primary-light: #2c5282;
	--secondary-color: #38b2ac;
	--accent-color: #ed8936;
	--text-color: #2d3748;
	--text-light: #718096;
	--background: #f7fafc;
	--white: #ffffff;
	--gradient-primary: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
	--gradient-accent: linear-gradient(135deg, #38b2ac 0%, #319795 100%);
	--shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
	--shadow-md: 0 4px 6px rgba(0,0,0,0.1);
	--shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
	--shadow-xl: 0 20px 40px rgba(0,0,0,0.2);
	--border-radius: 12px;
	--border-radius-lg: 20px;
	--transition: all 0.3s ease;
}

.card {
	background: var(--white);
	border-radius: 10px;
	padding: 16px;
	box-shadow: 0 6px 18px rgba(26, 54, 93, 0.08);
	margin-bottom: 16px;
}

.card.card-elevated {
	box-shadow: var(--shadow-md);
	border: 1px solid #eef2f7;
}

.card.subtle {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	box-shadow: none;
}

.card-header {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-bottom: 14px;
}

.card-header h2,
.card-header h3 {
	margin: 0;
	font-weight: 700;
	color: var(--primary-color);
}

.page-hero {
	background: var(--white);
	border: 1px solid #e2e8f0;
	border-radius: 16px;
	padding: 18px 22px;
	box-shadow: var(--shadow-sm);
	margin-bottom: 18px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
}

.page-hero h1 {
	margin: 6px 0 4px;
	font-size: 2rem;
	color: var(--primary-color);
}

.eyebrow {
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-size: 0.7rem;
	font-weight: 600;
	color: var(--text-light);
}

.muted {
	color: var(--text-light);
}

.page-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 36px;
	padding: 8px 14px;
	background: var(--secondary-color);
	color: var(--white);
	border-radius: 6px;
	text-decoration: none;
	border: none;
	cursor: pointer;
	font-size: 0.95rem;
	line-height: 1.2;
}

.btn:hover {
	background: #319795;
}

.btn.secondary {
	background: var(--primary-color);
}

.btn.secondary:hover {
	background: var(--primary-light);
}

.btn.danger {
	background: #ef4444;
}

.btn.ghost {
	background: transparent;
	border: 1px solid #e2e8f0;
	color: var(--primary-color);
}

.btn.ghost:hover {
	background: #f8fafc;
}

.field {
	margin-bottom: 12px;
}

.field small {
	display: block;
	margin-top: 6px;
	color: var(--text-light);
}

.form-grid {
	display: grid;
	gap: 16px;
}

.form-grid.two {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid .full {
	grid-column: 1 / -1;
}

.actions-row {
	margin-top: 8px;
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	align-items: center;
}

.toggle-panel {
	margin-top: 8px;
}

.inline-form {
	display: inline;
}

.info-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 14px;
	margin-bottom: 12px;
}

.info-item {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 12px;
}

.info-label {
	margin: 0 0 6px;
	font-weight: 600;
	color: var(--primary-color);
}

.preview-field {
	align-self: stretch;
}

.preview-card {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 12px;
	min-height: 220px;
	box-shadow: 0 6px 16px rgba(26, 54, 93, 0.08);
}

.preview-card h4 {
	margin: 0 0 8px;
	font-size: 0.95rem;
	color: var(--primary-color);
}

.preview-canvas {
	position: relative;
	height: 170px;
}

.colors-editor,
.stacked-groups-editor {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.color-row,
.stacked-group-row {
	display: grid;
	grid-template-columns: 4fr 1fr auto;
	align-items: center;
	gap: 12px;
}

.stacked-group-row {
	grid-template-columns: 4fr 1fr;
}

.color-row span,
.stacked-group-row span {
	font-weight: 600;
}

.stacked-group-row input[type="text"] {
	width: 100%;
}

.color-row input[type="color"] {
	width: 30%;
	height: 36px;
	padding: 0;
	border: 1px solid #e2e8f0;
	border-radius: 6px;
	background: var(--white);
}

.color-row .btn.secondary {
	white-space: nowrap;
}

.climate-page .container {
	margin: 34px auto 60px;
}

.climate-band {
	background:
		linear-gradient(180deg, #eef7f5 0%, #f7fafc 240px, #f7fafc 100%);
	min-height: 70vh;
	padding: 18px 0 48px;
}

.climate-container {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.climate-heading {
	display: block;
}

.climate-heading h2 {
	margin: 10px 0 16px;
	color: var(--primary-color);
	font-size: 2.1rem;
	line-height: 1.15;
}

.climate-intro {
	background: #ffffff;
	border: 1px solid #d7ebe8;
	border-radius: 8px;
	padding: 28px;
	box-shadow: 0 18px 38px rgba(26, 54, 93, 0.1);
	position: relative;
	overflow: hidden;
}

.climate-intro::before {
	content: '';
	position: absolute;
	inset: 0 0 auto;
	height: 5px;
	background: linear-gradient(90deg, #38b2ac, #ed8936);
}

.climate-intro p:not(.eyebrow) {
	margin: 0;
	color: var(--text-light);
	font-size: 1rem;
	line-height: 1.75;
	max-width: 860px;
}

.climate-filter-row {
	display: block;
}

.climate-intro-links {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-top: 16px;
}

.climate-intro-links a {
	color: var(--primary-color);
	background: #edf2f7;
	border: 1px solid #e2e8f0;
	border-radius: 6px;
	padding: 8px 11px;
	font-weight: 700;
	font-size: 0.9rem;
}

.climate-intro-links a:hover {
	background: #e6fffa;
	color: #1f766f;
}

.climate-filters {
	display: grid;
	grid-template-columns: 1.2fr 1fr 0.7fr 0.7fr auto;
	gap: 10px;
	align-items: end;
	background: rgba(255, 255, 255, 0.78);
	border: 1px solid #dbe6ef;
	border-radius: 8px;
	padding: 16px;
	box-shadow: 0 14px 28px rgba(26, 54, 93, 0.08);
	backdrop-filter: blur(8px);
}

.climate-filters label {
	display: flex;
	flex-direction: column;
	gap: 5px;
	color: var(--primary-color);
	font-weight: 700;
	font-size: 0.78rem;
}

.climate-filters select,
.climate-filters input {
	width: 100%;
	min-height: 38px;
	border: 1px solid #cbd5e0;
	border-radius: 6px;
	background: #fff;
	color: var(--text-color);
	padding: 8px 10px;
	font: inherit;
}

.climate-summary {
	background:
		linear-gradient(135deg, rgba(26, 54, 93, 0.98) 0%, rgba(28, 83, 112, 0.96) 52%, rgba(31, 157, 138, 0.94) 100%);
	border: 1px solid rgba(255, 255, 255, 0.28);
	border-radius: 8px;
	padding: 24px;
	box-shadow: 0 24px 50px rgba(26, 54, 93, 0.22);
	display: grid;
	grid-template-columns: minmax(260px, 1fr) 1.45fr;
	gap: 22px;
	align-items: center;
	position: relative;
	overflow: hidden;
}

.summary-copy {
	position: relative;
	z-index: 1;
}

.summary-label {
	display: inline-flex;
	align-items: center;
	color: rgba(255, 255, 255, 0.82);
	border: 1px solid rgba(255, 255, 255, 0.32);
	border-radius: 999px;
	padding: 5px 10px;
	font-size: 0.72rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	margin-bottom: 14px;
}

.summary-main {
	color: #ffffff;
	font-size: 1.32rem;
	font-weight: 800;
	line-height: 1.42;
	max-width: 620px;
}

.summary-warning {
	margin-top: 14px;
	background: rgba(255, 255, 255, 0.94);
	border: 1px solid rgba(255, 255, 255, 0.68);
	border-left: 4px solid #f6ad55;
	border-radius: 8px;
	color: #744210;
	padding: 12px 14px;
	font-size: 0.92rem;
	font-weight: 700;
	line-height: 1.5;
	box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.summary-warning[hidden] {
	display: none;
}

.meteo-page .container {
	margin: 34px auto 60px;
}

.meteo-band {
	background: linear-gradient(180deg, #f0f8ff 0%, #f7fafc 240px, #f7fafc 100%);
	min-height: 70vh;
	padding: 18px 0 48px;
}

.meteo-container {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.meteo-intro {
	background: #ffffff;
	border: 1px solid #dbe6ef;
	border-radius: 8px;
	padding: 28px;
	box-shadow: 0 18px 38px rgba(26, 54, 93, 0.1);
	position: relative;
	overflow: hidden;
}

.meteo-intro::before {
	content: '';
	position: absolute;
	inset: 0 0 auto;
	height: 5px;
	background: linear-gradient(90deg, #2b6cb0, #38b2ac);
}

.meteo-intro h2 {
	margin: 10px 0 16px;
	color: var(--primary-color);
	font-size: 2.1rem;
	line-height: 1.15;
}

.meteo-intro p:not(.eyebrow) {
	margin: 0;
	color: var(--text-light);
	font-size: 1rem;
	line-height: 1.75;
	max-width: 820px;
}

.meteo-filters {
	display: grid;
	grid-template-columns: 1.2fr 1.1fr 0.8fr auto;
	gap: 10px;
	align-items: end;
	background: rgba(255, 255, 255, 0.86);
	border: 1px solid #dbe6ef;
	border-radius: 8px;
	padding: 16px;
	box-shadow: 0 14px 28px rgba(26, 54, 93, 0.08);
}

.meteo-filters label {
	display: flex;
	flex-direction: column;
	gap: 5px;
	color: var(--primary-color);
	font-weight: 700;
	font-size: 0.78rem;
}

.meteo-filters select,
.meteo-filters input {
	width: 100%;
	min-height: 38px;
	border: 1px solid #cbd5e0;
	border-radius: 6px;
	background: #ffffff;
	color: var(--text-color);
	padding: 8px 10px;
	font: inherit;
}

.meteo-summary {
	background: linear-gradient(135deg, #1a365d 0%, #2b6cb0 100%);
	border-radius: 8px;
	padding: 22px;
	box-shadow: 0 20px 42px rgba(26, 54, 93, 0.18);
}

.meteo-summary-text {
	color: #ffffff;
	font-size: 1.22rem;
	font-weight: 800;
	line-height: 1.45;
	margin-top: 12px;
}

.meteo-results {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}

.meteo-record,
.meteo-empty {
	background: #ffffff;
	border: 1px solid #dbe6ef;
	border-radius: 8px;
	box-shadow: 0 16px 34px rgba(26, 54, 93, 0.08);
	padding: 20px;
}

.meteo-record-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 14px;
	margin-bottom: 16px;
}

.meteo-record-head h3 {
	margin: 0 0 6px;
	color: var(--primary-color);
	font-size: 1.16rem;
}

.meteo-record-head p {
	margin: 0;
	color: var(--text-light);
	font-weight: 700;
	font-size: 0.9rem;
}

.meteo-record-head > span {
	background: #edf2f7;
	color: var(--primary-color);
	border-radius: 999px;
	padding: 6px 10px;
	font-size: 0.82rem;
	font-weight: 800;
	white-space: nowrap;
}

.meteo-metrics {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 10px;
}

.meteo-metrics div {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 12px;
	min-width: 0;
}

.meteo-metrics span {
	display: block;
	color: var(--primary-color);
	font-weight: 800;
	font-size: 1.05rem;
	overflow-wrap: anywhere;
}

.meteo-metrics small {
	display: block;
	color: var(--text-light);
	font-weight: 700;
	font-size: 0.75rem;
	margin-top: 4px;
}

.meteo-empty {
	grid-column: 1 / -1;
	color: var(--primary-color);
	font-weight: 800;
}

.summary-metrics {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
	position: relative;
	z-index: 1;
}

.summary-metrics div {
	background: rgba(255, 255, 255, 0.94);
	border: 1px solid rgba(255, 255, 255, 0.5);
	border-radius: 8px;
	padding: 14px 14px 13px;
	min-width: 0;
	box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.summary-metrics span {
	display: block;
	color: var(--primary-color);
	font-weight: 800;
	font-size: 1.25rem;
	overflow-wrap: anywhere;
	margin-bottom: 3px;
}

.summary-metrics small {
	display: block;
	color: var(--text-light);
	font-weight: 700;
	font-size: 0.75rem;
	margin-top: 4px;
}

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

.climate-panel {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 20px;
	box-shadow: 0 16px 34px rgba(26, 54, 93, 0.08);
	min-width: 0;
}

.climate-panel.wide {
	grid-column: 1 / -1;
}

.panel-title {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 14px;
	margin-bottom: 18px;
}

.panel-title h3 {
	margin: 0 0 6px;
	color: var(--primary-color);
	font-size: 1.12rem;
}

.panel-title p {
	margin: 0;
	color: var(--text-light);
	font-size: 0.85rem;
	font-weight: 600;
}

.climate-chart {
	position: relative;
	height: 360px;
}

.climate-chart.small {
	height: 300px;
}

.documentation-page .container {
	margin: 34px auto 60px;
}

.documentation-hero {
	background:
		linear-gradient(135deg, #ffffff 0%, #eef7f5 100%);
	border-bottom: 1px solid #d7ebe8;
}

.documentation-container {
	display: grid;
	grid-template-columns: minmax(280px, 1fr) auto;
	gap: 24px;
	align-items: end;
}

.documentation-title h2 {
	margin: 12px 0 18px;
	color: var(--primary-color);
	font-size: 2.35rem;
	line-height: 1.12;
	max-width: 760px;
}

.documentation-title p:last-child {
	margin: 0;
	color: var(--text-light);
	font-size: 1.08rem;
	line-height: 1.75;
	max-width: 780px;
}

.documentation-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	justify-content: flex-end;
}

.documentation-band {
	background:
		linear-gradient(180deg, #f7fafc 0%, #ffffff 100%);
	padding-bottom: 38px;
}

.documentation-grid {
	display: grid;
	grid-template-columns: 220px minmax(0, 1fr);
	gap: 22px;
	align-items: start;
}

.documentation-nav {
	position: sticky;
	top: 92px;
	background: #ffffff;
	border: 1px solid #dbe6ef;
	border-radius: 8px;
	box-shadow: 0 16px 34px rgba(26, 54, 93, 0.08);
	padding: 12px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.documentation-nav a {
	color: var(--primary-color);
	font-weight: 700;
	font-size: 0.9rem;
	padding: 8px 10px;
	border-radius: 6px;
}

.documentation-nav a:hover {
	background: #edf2f7;
}

.documentation-content {
	display: flex;
	flex-direction: column;
	gap: 20px;
	min-width: 0;
}

.documentation-section {
	background: #ffffff;
	border: 1px solid #dbe6ef;
	border-radius: 8px;
	box-shadow: 0 16px 34px rgba(26, 54, 93, 0.07);
	padding: 28px;
	scroll-margin-top: 110px;
}

.documentation-section h3 {
	margin: 0 0 18px;
	color: var(--primary-color);
	font-size: 1.46rem;
	line-height: 1.25;
	position: relative;
	padding-bottom: 12px;
}

.documentation-section h3::after {
	content: '';
	position: absolute;
	left: 0;
	bottom: 0;
	width: 54px;
	height: 3px;
	background: linear-gradient(90deg, #38b2ac, #ed8936);
	border-radius: 999px;
}

.documentation-section h4 {
	margin: 0 0 10px;
	color: var(--primary-color);
	font-size: 1.04rem;
	line-height: 1.35;
}

.documentation-section p {
	margin: 0 0 16px;
	color: var(--text-color);
	font-size: 1rem;
	line-height: 1.82;
}

.documentation-section p:last-child {
	margin-bottom: 0;
}

.documentation-section code {
	background: #edf2f7;
	color: #1a365d;
	border-radius: 5px;
	padding: 2px 5px;
	font-size: 0.9em;
}

.documentation-section pre {
	background: #162033;
	color: #f7fafc;
	border-radius: 8px;
	padding: 16px;
	overflow-x: auto;
	margin: 16px 0;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.documentation-section pre code {
	background: transparent;
	color: inherit;
	padding: 0;
	border-radius: 0;
}

.documentation-table-wrap {
	overflow-x: auto;
	margin: 16px 0;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
}

.documentation-table {
	width: 100%;
	border-collapse: collapse;
	min-width: 680px;
}

.documentation-table th,
.documentation-table td {
	border-bottom: 1px solid #e2e8f0;
	text-align: left;
	padding: 12px 14px;
	vertical-align: top;
}

.documentation-table th {
	color: var(--primary-color);
	background: #f8fafc;
	font-size: 0.86rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.documentation-steps {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	margin: 18px 0;
}

.documentation-steps div,
.documentation-note,
.documentation-cards article {
	background: #fbfdff;
	border: 1px solid #dbe6ef;
	border-radius: 8px;
	padding: 16px;
}

.documentation-steps span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	background: var(--secondary-color);
	color: #ffffff;
	border-radius: 50%;
	font-weight: 800;
	margin-bottom: 8px;
}

.documentation-steps p,
.documentation-note p,
.documentation-cards p {
	margin: 0;
}

.documentation-list {
	margin: 10px 0 12px 20px;
	color: var(--text-color);
}

.documentation-list li {
	margin-bottom: 6px;
}

.documentation-code-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(220px, 0.9fr);
	gap: 12px;
	align-items: stretch;
}

.documentation-note strong {
	display: block;
	color: var(--primary-color);
	margin-bottom: 8px;
}

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

.documentation-section blockquote {
	margin: 14px 0 0;
	padding: 14px 16px;
	border-left: 4px solid var(--secondary-color);
	background: #f8fafc;
	color: var(--primary-color);
	font-weight: 800;
	border-radius: 0 8px 8px 0;
}

.documentation-source-link {
	display: inline-flex;
	align-items: center;
	color: #ffffff;
	background: var(--primary-color);
	border-radius: 6px;
	padding: 9px 12px;
	font-weight: 800;
	line-height: 1.3;
}

.documentation-source-link:hover {
	background: var(--primary-light);
	color: #ffffff;
}

.documentation-section-public {
	border-color: #b7ddd8;
	background:
		linear-gradient(135deg, #ffffff 0%, #f2fbf9 100%);
	box-shadow: 0 22px 42px rgba(26, 54, 93, 0.1);
}

.documentation-section-public > p:not(.eyebrow) {
	font-size: 1.06rem;
	color: #344054;
}

.documentation-public-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
	margin: 20px 0;
}

.documentation-public-grid article {
	background: #ffffff;
	border: 1px solid #d7ebe8;
	border-radius: 8px;
	padding: 18px;
	box-shadow: 0 10px 24px rgba(26, 54, 93, 0.06);
}

.documentation-public-grid span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	background: var(--primary-color);
	color: #ffffff;
	border-radius: 50%;
	font-weight: 800;
	margin-bottom: 10px;
}

.documentation-public-grid p {
	margin-bottom: 0;
	color: var(--text-light);
}

.home-chart-status {
	margin: 0 0 10px;
	color: var(--primary-color);
	font-weight: 700;
	line-height: 1.45;
}

@media (max-width: 980px) {
	.climate-heading,
	.climate-summary,
	.climate-grid,
	.documentation-container,
	.documentation-grid,
	.meteo-results {
		grid-template-columns: 1fr;
	}

	.climate-filters,
	.meteo-filters {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.summary-metrics {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.climate-summary {
		padding: 22px;
	}

	.documentation-actions {
		justify-content: flex-start;
	}

	.documentation-nav {
		position: static;
		display: grid;
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.documentation-code-grid {
		grid-template-columns: 1fr;
	}

	.documentation-public-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 620px) {
	.climate-heading h2,
	.documentation-title h2 {
		font-size: 1.55rem;
	}

	.climate-filters,
	.summary-metrics {
		grid-template-columns: 1fr;
	}

	.panel-title {
		display: block;
	}

	.panel-title p {
		margin-top: 4px;
	}

	.climate-chart,
	.climate-chart.small {
		height: 280px;
	}

	.climate-intro,
	.climate-summary,
	.climate-panel,
	.meteo-intro,
	.meteo-summary,
	.meteo-record {
		padding: 18px;
	}

	.meteo-intro h2 {
		font-size: 1.55rem;
	}

	.meteo-filters,
	.meteo-metrics {
		grid-template-columns: 1fr;
	}

	.summary-main {
		font-size: 1.12rem;
	}

	.documentation-section {
		padding: 18px;
	}

	.documentation-nav,
	.documentation-steps,
	.documentation-cards {
		grid-template-columns: 1fr;
	}
}

label {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
	color: var(--primary-color);
}

input[type=text],
input[type=email],
input[type=password],
textarea,
select {
	width: 100%;
	padding: 8px;
	border: 1px solid #e2e8f0;
	border-radius: 6px;
	box-sizing: border-box;
	background: var(--white);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
	outline: 2px solid rgba(56, 178, 172, 0.35);
	border-color: var(--secondary-color);
}

.alert {
	padding: 10px 12px;
	border-radius: 6px;
	margin-bottom: 12px;
}

.alert.error {
	background: #fee2e2;
	color: #991b1b;
}

.alert.success {
	background: #dcfce7;
	color: #166534;
}

table {
	width: 100%;
	border-collapse: collapse;
}

thead th {
	background: #f8fafc;
	color: var(--text-color);
	font-weight: 600;
}

th,
 td {
	text-align: left;
	padding: 10px;
	border-bottom: 1px solid #e2e8f0;
}

code {
	background: #f1f5f9;
	padding: 2px 4px;
	border-radius: 4px;
	color: var(--text-color);
}

.chart-container {
	position: relative;
	height: 360px;
}

.chart-container canvas,
#graphCanvas {
	width: 100% !important;
	height: 100% !important;
	display: block;
}

.evolution-text {
	margin-top: 12px;
	color: var(--text-color);
	background: var(--background);
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	padding: 10px 12px;
	display: none;
}

.evolution-text p {
	margin: 6px 0;
}

.evolution-text .evolution-value {
	font-weight: 700;
	color: var(--primary-color);
}

.evolution-text .evolution-label {
	font-weight: 600;
	color: var(--primary-color);
}

.indicator-picker {
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 8px;
	background: var(--white);
}

.indicator-picker input {
	border: none;
	outline: none;
	padding: 6px 4px;
	width: 100%;
}

.indicator-picker .suggestions {
	max-height: 220px;
	overflow: auto;
	margin-top: 6px;
	border-top: 1px dashed #e2e8f0;
}

.indicator-picker .suggestion-item {
	padding: 6px;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.indicator-picker .suggestion-item:hover {
	background: #f1f5f9;
}

.indicator-picker .suggestion-item.is-selected {
	background: rgba(56, 178, 172, 0.12);
	border-left: 3px solid var(--secondary-color);
}

.indicator-picker .suggestion-item.is-selected strong {
	color: var(--primary-color);
}

.indicator-picker .selected {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 8px;
}

.indicator-picker .chip {
	background: rgba(56, 178, 172, 0.15);
	color: var(--primary-color);
	padding: 4px 8px;
	border-radius: 999px;
	display: inline-flex;
	gap: 6px;
	align-items: center;
	font-size: 12px;
}

.indicator-picker .chip button {
	border: none;
	background: transparent;
	color: var(--primary-color);
	cursor: pointer;
	font-weight: bold;
}

.label-editor {
	display: grid;
	gap: 8px;
	margin-top: 8px;
}

.label-editor .label-row {
	display: grid;
	grid-template-columns: minmax(180px, 220px) minmax(0, 1fr) 180px;
	gap: 8px;
	align-items: center;
}

.label-editor .label-code {
	font-weight: 600;
	color: var(--primary-color);
}

.page-public-graph {
	padding: 24px;
}

.page-public-graph h1 {
	color: var(--primary-color);
}

html.page-embed,
body.page-embed {
	margin: 0;
	padding: 0;
	background: transparent;
	width: 100%;
	height: 100%;
}

.page-embed .chart-container {
	width: 100%;
	height: 100%;
}

.page-embed .evolution-text {
	margin: 15px 0 0;
	font-family: Arial, sans-serif;
	color: var(--text-color);
	background: rgba(247, 250, 252, 0.95);
	padding: 8px 10px;
	border-radius: 8px;
	box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.demo-showcase {
	padding: 50px 0 70px;
	background: var(--background);
}

.demo-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 28px;
	align-items: center;
}

.demo-copy h2 {
	margin: 8px 0 12px;
	color: var(--primary-color);
}

.demo-card {
	background: var(--white);
	border-radius: 16px;
	padding: 16px;
	box-shadow: var(--shadow-md);
	border: 1px solid #eef2f7;
}

.demo-chart {
	height: 320px;
}

@media (max-width: 900px) {
	.page-hero {
		flex-direction: column;
		align-items: flex-start;
	}

	.form-grid.two {
		grid-template-columns: 1fr;
	}

	.demo-grid {
		grid-template-columns: 1fr;
	}
}
