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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  display: flex;
  flex-direction: column;
  height: 100vh;
  background-color: #f1f5f9;
  color: #1e293b;
  overflow: hidden;
}

header {
  background-color: #ffffff;
  border-bottom: 1px solid #cbd5e1;
  padding: 12px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  flex-shrink: 0;
}

.title-area h1 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
}

.title-area p {
  font-size: 0.8rem;
  color: #64748b;
}

form {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
}

select, input[type="number"], button {
  font-size: 0.9rem;
  padding: 7px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background-color: #ffffff;
  color: #1e293b;
  outline: none;
  transition: all 0.15s ease-in-out;
}

select:focus, input[type="number"]:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

button {
  background-color: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  font-weight: 600;
  cursor: pointer;
}

button:hover {
  background-color: #1d4ed8;
  border-color: #1d4ed8;
}

.secondary-btn {
  background-color: #f8fafc;
  color: #475569;
  border-color: #cbd5e1;
}

.secondary-btn:hover {
  background-color: #e2e8f0;
  border-color: #94a3b8;
  color: #0f172a;
}

.nav-buttons {
  display: flex;
  gap: 4px;
}

.nav-buttons button {
  padding: 7px 10px;
}

.url-bar {
  font-size: 0.75rem;
  color: #64748b;
  background: #f8fafc;
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 440px;
}

.url-bar a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
}

.url-bar a:hover {
  text-decoration: underline;
}

main {
  flex: 1;
  display: flex;
  flex-direction: row;
  overflow: hidden;
  position: relative;
  background-color: #e2e8f0;
}

/* Linker Frame: Aktuelle Messwerte */
.sidebar-frame-wrapper {
  width: 380px;
  min-width: 330px;
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
  border-right: 1px solid #cbd5e1;
  flex-shrink: 0;
  height: 100%;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background-color: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
}

.icon-btn {
  background: transparent;
  border: 1px solid transparent;
  color: #64748b;
  cursor: pointer;
  padding: 3px 7px;
  font-size: 0.95rem;
  border-radius: 4px;
}

.icon-btn:hover {
  background-color: #e2e8f0;
  color: #0f172a;
}

/* Rechter Frame: Monats-Klimadaten */
.content-frame-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  background-color: #ffffff;
}

.empty-state {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 1rem;
  gap: 8px;
}

/* Hilfsklassen zur Vermeidung von Inline-Styles */
.hidden {
  display: none !important;
}
