/**
 * stylea.css
 * A cleaner version of style.css using better structure and tokens from app.css.
 */

:root {
  --bg: #f4f7f6;
  --surface: #ffffff;
  --text: #111111;
  --muted: #64748b;
  --border: #dddddd;
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  --accent: #0056b3;
  --accent-light: #eff6ff;
  --accent-strong: #00ffcc;
  --radius: 12px;
  --max-width: 1180px;
  --gap: 16px;
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-family: sans-serif;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

img, svg {
  max-width: 100%;
  display: block;
}

button, input {
  font: inherit;
}

/* Page wrappers */
.page-wrapper {
  width: min(var(--max-width), 100%);
  margin: 0 auto;
  padding: 10px;
}

body.pegel {
  background: var(--bg);
}

body.navi7 {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #121212;
  color: #ffffff;
  overflow: hidden;
}

/* Header */
.header-container {
  background: var(--accent);
  color: white;
  padding: 15px;
  border-radius: var(--radius) var(--radius) 0 0;
  text-align: left;
}

.header-container h1 {
  margin: 0;
  font-size: clamp(1.2rem, 2vw, 1.4rem);
}

.header-container p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.85);
}

/* Filter bar */
#filter-form {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  margin: 0 auto 16px;
}

#filter-form label {
  margin: 0;
  flex: 0 0 auto;
  font-size: 0.95rem;
  color: var(--text);
  white-space: nowrap;
}

#filter-form input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: var(--text);
}

#filter-form button {
  flex: 0 0 auto;
  padding: 12px 14px;
  border-radius: 12px;
  border: none;
  background: var(--accent);
  color: white;
  cursor: pointer;
  transition: filter 0.2s ease;
}

#filter-form button:hover,
#filter-form button:focus-visible {
  filter: brightness(1.05);
}

/* Card and table container */
.table-scroll-container {
  overflow-y: auto;
  max-height: 680px;
  background: var(--surface);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  position: sticky;
  top: 0;
  background-color: #f8f9fa;
  color: #334155;
  padding: 15px 12px;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  border-bottom: 2px solid #e2e8f0;
}

td {
  padding: 15px 12px;
  border-bottom: 1px solid #e5e7eb;
  font-size: 1rem;
}

.wert {
  font-weight: 700;
  color: #dc2626;
}

/* Map panel */
#map {
  height: 720px;
  width: 100%;
  border-radius: var(--radius);
  margin-top: 10px;
  box-shadow: var(--shadow);
}

/* Utility classes */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 999px;
  cursor: pointer;
}

.btn-sm {
  padding: 8px 12px;
  font-size: 0.9rem;
}

@media (max-width: 720px) {
  .page-wrapper {
    padding: 10px;
  }

  #filter-form {
    flex-direction: column;
    align-items: stretch;
  }

  #filter-form label {
    white-space: normal;
  }

  #filter-form button {
    width: 100%;
  }
}
