/* ═══════════════════════════════════════════
   LÄRMPROTOKOLL — Dark Orange / Amber Theme
   ═══════════════════════════════════════════ */

:root {
	--bg-primary: #0f0a05;
	--bg-secondary: #140d08;
	--bg-card: rgba(26, 14, 8, 0.65);
	--bg-card-hover: rgba(36, 20, 12, 0.8);
	--bg-nav: rgba(15, 10, 5, 0.88);
	--bg-form: rgba(26, 14, 8, 0.6);

	--amber: #f59e0b;
	--amber-bright: #fbbf24;
	--amber-dark: #d97706;
	--orange: #ea580c;
	--orange-bright: #fb923c;
	--orange-dark: #c2410c;
	--red: #dc2626;
	--green: #22c55e;

	--amber-dim: rgba(245, 158, 11, 0.12);
	--amber-glow: rgba(245, 158, 11, 0.07);
	--orange-dim: rgba(234, 88, 12, 0.15);

	--gradient-hero: linear-gradient(180deg, rgba(15, 10, 5, 0.3) 0%, rgba(15, 10, 5, 0.8) 100%);
	--gradient-accent: linear-gradient(135deg, var(--amber), var(--orange));
	--gradient-btn: linear-gradient(135deg, var(--amber), var(--orange));

	--text-primary: #f0e6d8;
	--text-secondary: #c0a888;
	--text-muted: #706050;
	--text-accent: var(--amber-bright);

	--border-subtle: rgba(245, 158, 11, 0.08);
	--border-card: rgba(245, 158, 11, 0.12);
	--border-accent: rgba(245, 158, 11, 0.3);
	--border-input: rgba(245, 158, 11, 0.2);
	--border-input-focus: rgba(245, 158, 11, 0.5);

	--nav-height: 64px;
	--max-width: 1200px;
	--radius: 10px;
	--radius-lg: 18px;
	--radius-full: 9999px;

	--font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	--font-heading: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

	--shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
	--shadow-glow: 0 0 40px rgba(245, 158, 11, 0.06);
	--glass-border: rgba(245, 158, 11, 0.08);
	--glass-bg: rgba(26, 14, 8, 0.55);
}

*, *::before, *::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	font-size: 16px;
	scroll-behavior: smooth;
}

body {
	font-family: var(--font-body);
	background: var(--bg-primary);
	color: var(--text-primary);
	line-height: 1.6;
	min-height: 100vh;
	overflow-x: hidden;
}

/* Subtle noise-wave pattern overlay */
body::before {
	content: '';
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-image:
		radial-gradient(circle at 20% 50%, rgba(245, 158, 11, 0.015) 0%, transparent 60%),
		radial-gradient(circle at 80% 20%, rgba(234, 88, 12, 0.01) 0%, transparent 50%),
		repeating-linear-gradient(
			90deg,
			transparent,
			transparent 120px,
			rgba(245, 158, 11, 0.012) 120px,
			rgba(245, 158, 11, 0.012) 121px
		);
	pointer-events: none;
	z-index: 0;
}

/* Vignette */
body::after {
	content: '';
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: radial-gradient(ellipse at center, transparent 50%, rgba(15, 10, 5, 0.6) 100%);
	pointer-events: none;
	z-index: 1;
}

/* ═══ NAVIGATION ═══ */
nav {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: var(--nav-height);
	background: var(--bg-nav);
	border-bottom: 1px solid var(--border-subtle);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	z-index: 100;
}

.nav-inner {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 0 1.5rem;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.logo {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	color: var(--text-primary);
	text-decoration: none;
	font-weight: 700;
	font-size: 1.15rem;
	transition: color 0.2s;
}

.logo:hover {
	color: var(--amber-bright);
}

.logo-icon {
	font-size: 1.3rem;
}

.nav-count {
	color: var(--text-muted);
	font-size: 0.85rem;
	padding: 0.25rem 0.75rem;
	border-radius: var(--radius-full);
	background: var(--amber-dim);
}

/* ═══ HERO ═══ */
.hero {
	position: relative;
	z-index: 2;
	padding: 8rem 1.5rem 3rem;
	text-align: center;
	background: var(--gradient-hero);
	min-height: 40vh;
	display: flex;
	align-items: center;
	justify-content: center;
}

.hero-content {
	max-width: 720px;
	margin: 0 auto;
}

.hero-badge {
	display: inline-block;
	padding: 0.4rem 1.2rem;
	border-radius: var(--radius-full);
	background: var(--amber-dim);
	border: 1px solid var(--border-card);
	color: var(--amber-bright);
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	margin-bottom: 1.5rem;
	backdrop-filter: blur(10px);
}

.hero h1 {
	font-size: 3.5rem;
	font-weight: 800;
	letter-spacing: -0.03em;
	margin-bottom: 1rem;
	background: var(--gradient-accent);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	line-height: 1.1;
}

.hero h1 .accent {
	-webkit-text-fill-color: var(--amber-bright);
}

.hero-subtitle {
	color: var(--text-secondary);
	font-size: 1.2rem;
	margin-bottom: 0.75rem;
	font-weight: 500;
}

.hero-desc {
	color: var(--text-muted);
	font-size: 0.95rem;
	line-height: 1.7;
	max-width: 560px;
	margin: 0 auto;
}

/* ═══ FORM ═══ */
.form-section {
	position: relative;
	z-index: 2;
	padding: 1rem 1.5rem 2.5rem;
}

.form-card {
	max-width: 740px;
	margin: 0 auto;
	background: var(--glass-bg);
	border: 1px solid var(--glass-border);
	border-radius: var(--radius-lg);
	padding: 2rem 2.5rem;
	text-align: center;
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	box-shadow: var(--shadow-card), var(--shadow-glow);
}

.form-icon {
	font-size: 2rem;
	margin-bottom: 0.3rem;
}

.form-card h2 {
	font-size: 1.2rem;
	font-weight: 700;
	margin-bottom: 1.25rem;
	color: var(--text-primary);
}

.noise-form {
	width: 100%;
	text-align: left;
}

.form-row {
	display: flex;
	gap: 1rem;
	margin-bottom: 0.75rem;
}

.form-row .form-field {
	flex: 1;
}

.form-label {
	display: block;
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--text-secondary);
	margin-bottom: 0.35rem;
}

.form-label .required {
	color: var(--orange-bright);
	font-weight: 700;
}

.form-field input[type="date"],
.form-field input[type="time"],
.form-field input[type="text"],
.form-field select,
.form-field textarea {
	width: 100%;
	padding: 0.7rem 1rem;
	background: rgba(15, 10, 5, 0.6);
	border: 1px solid var(--border-input);
	border-radius: var(--radius);
	color: var(--text-primary);
	font-size: 0.9rem;
	font-family: var(--font-body);
	outline: none;
	transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
	border-color: var(--border-input-focus);
	box-shadow: 0 0 0 3px var(--amber-dim);
	background: rgba(15, 10, 5, 0.8);
}

.form-field input::placeholder,
.form-field select::placeholder,
.form-field textarea::placeholder {
	color: var(--text-muted);
	font-size: 0.85rem;
}

.form-field textarea {
	resize: vertical;
	min-height: 2.5rem;
	line-height: 1.5;
}

.form-field select {
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	padding-right: 2.5rem;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23f59e0b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 1rem center;
}

.form-field select option {
	background: #1a0e08;
	color: var(--text-primary);
}

/* ═══ INTENSITY SLIDER ═══ */
.intensity-slider-wrap {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 0.5rem 0;
}

.intensity-slider {
	flex: 1;
	-webkit-appearance: none;
	appearance: none;
	height: 8px;
	background: linear-gradient(90deg, #4ade80, #fde047, #f97316, #dc2626, #991b1b);
	border-radius: 4px;
	outline: none;
	cursor: pointer;
}

.intensity-slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--amber);
	border: 3px solid var(--bg-primary);
	box-shadow: 0 0 8px rgba(245, 158, 11, 0.3);
	cursor: pointer;
	transition: transform 0.15s;
}

.intensity-slider::-webkit-slider-thumb:hover {
	transform: scale(1.15);
}

.intensity-slider::-moz-range-thumb {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--amber);
	border: 3px solid var(--bg-primary);
	box-shadow: 0 0 8px rgba(245, 158, 11, 0.3);
	cursor: pointer;
}

.intensity-display {
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 120px;
	gap: 0.1rem;
}

.intensity-val {
	font-size: 1.6rem;
	font-weight: 800;
	color: var(--amber-bright);
	line-height: 1;
}

.intensity-label {
	font-size: 0.75rem;
	color: var(--text-secondary);
}

.intensity-comparison {
	font-size: 0.7rem;
	color: var(--text-muted);
	font-style: italic;
	text-align: center;
	line-height: 1.3;
	max-width: 160px;
}

/* Form actions */
.form-actions {
	margin-top: 1.25rem;
	text-align: center;
}

.form-actions button {
	padding: 0.85rem 2.5rem;
	background: var(--gradient-btn);
	border: none;
	border-radius: var(--radius);
	color: #fff;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
	font-family: var(--font-body);
	letter-spacing: 0.02em;
}

.form-actions button:hover {
	opacity: 0.95;
	transform: translateY(-2px);
	box-shadow: 0 4px 20px rgba(245, 158, 11, 0.3);
}

.form-actions button:active {
	transform: translateY(0);
	box-shadow: none;
}

.form-actions button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}

.form-hint {
	margin-top: 0.85rem;
	color: var(--text-muted);
	font-size: 0.85rem;
	transition: color 0.3s;
}

.form-hint.error {
	color: #ff6b5a;
}

.form-hint.success {
	color: var(--green);
}

/* ═══ FUN FACT / NOISE COMPARISON ═══ */
.fun-fact-area {
	margin-top: 1rem;
	padding: 1rem;
	background: var(--amber-dim);
	border: 1px solid var(--border-card);
	border-radius: var(--radius);
	text-align: center;
	animation: fadeSlideIn 0.4s ease-out;
}

.fun-fact-icon {
	font-size: 1.8rem;
	margin-bottom: 0.3rem;
}

.fun-fact-text {
	font-size: 0.9rem;
	color: var(--text-secondary);
	line-height: 1.5;
}

.fun-fact-db {
	display: inline-block;
	margin-top: 0.4rem;
	padding: 0.2rem 0.7rem;
	background: var(--orange-dim);
	border-radius: var(--radius-full);
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--amber-bright);
}

@keyframes fadeSlideIn {
	from { opacity: 0; transform: translateY(-8px); }
	to { opacity: 1; transform: translateY(0); }
}

/* ═══ ENTRIES SECTION ═══ */
.entries-section {
	position: relative;
	z-index: 2;
	padding: 1rem 1.5rem 4rem;
	max-width: var(--max-width);
	margin: 0 auto;
}

.section-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 1.25rem;
	gap: 1rem;
}

.section-header h2 {
	font-size: 1.3rem;
	font-weight: 700;
	color: var(--text-primary);
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.accent-line {
	display: inline-block;
	width: 3px;
	height: 1.2em;
	background: var(--gradient-accent);
	border-radius: 2px;
}

.count-badge {
	background: var(--amber-dim);
	color: var(--amber-bright);
	padding: 0.3rem 0.85rem;
	border-radius: var(--radius-full);
	font-size: 0.8rem;
	font-weight: 600;
	backdrop-filter: blur(4px);
}

/* ═══ TABLE ═══ */
.table-wrap {
	overflow-x: auto;
	border: 1px solid var(--border-card);
	border-radius: var(--radius-lg);
	background: var(--glass-bg);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	box-shadow: var(--shadow-card), var(--shadow-glow);
}

.noise-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.88rem;
}

.noise-table thead tr {
	border-bottom: 1px solid var(--border-card);
}

.noise-table th {
	padding: 0.85rem 1rem;
	text-align: left;
	font-weight: 600;
	font-size: 0.8rem;
	color: var(--text-muted);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	white-space: nowrap;
}

.noise-table td {
	padding: 0.7rem 1rem;
	border-bottom: 1px solid var(--border-subtle);
	vertical-align: middle;
}

.noise-table tbody tr {
	transition: background 0.2s;
}

.noise-table tbody tr:hover {
	background: var(--bg-card-hover);
}

.noise-table tbody tr:last-child td {
	border-bottom: none;
}

.col-date { width: 110px; }
.col-time { width: 80px; }
.col-type { width: 160px; }
.col-location { min-width: 120px; }
.col-intensity { min-width: 200px; }
.col-impact { min-width: 200px; }
.col-actions { width: 50px; text-align: center; }

.cell-date {
	color: var(--text-secondary);
	font-weight: 500;
	white-space: nowrap;
}

.cell-time {
	color: var(--text-secondary);
	font-family: 'SF Mono', 'Consolas', monospace;
	white-space: nowrap;
}

.type-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.2rem 0.6rem;
	background: var(--amber-dim);
	border-radius: var(--radius-full);
	font-size: 0.82rem;
	white-space: nowrap;
}

.cell-location {
	color: var(--text-primary);
	font-weight: 500;
}

.intensity-bar-wrap {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.intensity-bar {
	height: 8px;
	border-radius: 4px;
	flex-shrink: 0;
	transition: width 0.3s;
}

.intensity-num {
	font-weight: 700;
	font-size: 0.82rem;
	color: var(--text-primary);
	white-space: nowrap;
}

.intensity-tag {
	font-size: 0.75rem;
	white-space: nowrap;
}

.cell-impact {
	color: var(--text-secondary);
	font-size: 0.85rem;
	max-width: 280px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.btn-delete {
	background: none;
	border: none;
	color: var(--text-muted);
	font-size: 1.3rem;
	cursor: pointer;
	padding: 0.2rem 0.4rem;
	border-radius: 4px;
	transition: color 0.2s, background 0.2s;
	line-height: 1;
}

.btn-delete:hover {
	color: var(--red);
	background: rgba(220, 38, 38, 0.1);
}

/* ═══ EMPTY STATE ═══ */
.empty-state {
	text-align: center;
	padding: 3rem 1.5rem;
}

.empty-icon {
	font-size: 3rem;
	margin-bottom: 1rem;
	opacity: 0.5;
}

.empty-state h3 {
	font-size: 1.2rem;
	color: var(--text-secondary);
	margin-bottom: 0.5rem;
}

.empty-state p {
	color: var(--text-muted);
	font-size: 0.9rem;
}

/* ═══ TOAST ═══ */
.toast-container {
	position: fixed;
	bottom: 1.5rem;
	right: 1.5rem;
	z-index: 200;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.toast {
	padding: 0.8rem 1.2rem;
	background: var(--bg-card);
	border: 1px solid var(--border-card);
	border-radius: var(--radius);
	backdrop-filter: blur(12px);
	color: var(--text-primary);
	font-size: 0.88rem;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
	animation: toastIn 0.3s ease-out;
	max-width: 340px;
}

.toast.success {
	border-color: var(--green);
}

.toast.error {
	border-color: var(--red);
}

@keyframes toastIn {
	from { opacity: 0; transform: translateY(12px); }
	to { opacity: 1; transform: translateY(0); }
}

/* ═══ FOOTER ═══ */
footer {
	position: relative;
	z-index: 2;
	text-align: center;
	padding: 2rem 1.5rem;
	color: var(--text-muted);
	font-size: 0.82rem;
	border-top: 1px solid var(--border-subtle);
}

.footer-accent {
	font-size: 1rem;
	margin-right: 0.4rem;
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 700px) {
	.hero h1 {
		font-size: 2.2rem;
	}
	.hero {
		min-height: 30vh;
		padding-top: 6rem;
	}
	.form-row {
		flex-direction: column;
		gap: 0.6rem;
	}
	.form-card {
		padding: 1.5rem;
	}
	.intensity-slider-wrap {
		flex-direction: column;
		align-items: stretch;
		gap: 0.5rem;
	}
	.intensity-display {
		flex-direction: row;
		min-width: auto;
		gap: 0.5rem;
		justify-content: center;
	}
	.noise-table {
		font-size: 0.8rem;
	}
	.noise-table th,
	.noise-table td {
		padding: 0.5rem 0.6rem;
	}
	.cell-impact {
		max-width: 120px;
	}
}
