:root { color-scheme: light; }
* { box-sizing: border-box; }
body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  margin: 0;
  background: #fff;
  color: #111;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid #e6e6e6;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 10;
}

.brand { font-weight: 700; }
.nav { display: flex; gap: 12px; align-items: center; }

.link { color: #15612b; text-decoration: none; font-weight: 600; }
.link:hover { text-decoration: underline; }

.wrap { max-width: 1100px; margin: 22px auto; padding: 0 16px; }
.wrap.narrow { max-width: 520px; }

h1 { margin: 0 0 12px; }
h2 { margin: 0 0 10px; }
h3 { margin: 14px 0 8px; }

.muted { opacity: .7; }
.hint { margin-top: 12px; font-size: 14px; opacity: .75; }

.panel {
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  padding: 14px;
  margin: 12px 0;
  background: #fff;
  box-shadow:0px 0px 14px 0px #ececec
}

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

input, select, button {
  padding: 10px 12px;
  font-size: 14px;
  border-radius: 10px;
  border: 1px solid #d6d6d6;
}

input { width: 320px; max-width: 100%; }

button {
  background: #15612b;
  border: 1px solid #15612b;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
button:hover { filter: brightness(0.95); }
button:disabled { opacity: .6; cursor: not-allowed; }

.label { display: block; margin: 10px 0 6px; font-weight: 700; font-size: 14px; }

.error {
  background: #ffe8e8;
  border: 1px solid #ffbcbc;
  padding: 10px 12px;
  border-radius: 10px;
  margin: 10px 0;
}

/* Session UI */
.session {
  padding: 6px 10px;
  border: 1px solid #e6e6e6;
  border-radius: 999px;
  font-size: 13px;
  opacity: .85;
}

.sessionWarn {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #ffd7a1;
  background: #fff6e8;
}

.sessionWarn button {
  background: #7f5ddb;
  border-color: #7f5ddb;
}

/* Dashboard layout helpers */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 800px) { .grid2 { grid-template-columns: 1fr; } }

.preview { margin-top: 14px; }
.result { margin-top: 14px; }

/* Table */
.tableWrap {
  overflow: auto;
  border-radius: 12px;
  border: 1px solid #eee;
  margin-top: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
}

th, td {
  border-bottom: 1px solid #eee;
  padding: 10px 10px;
  text-align: left;
  white-space: nowrap;
  font-size: 13px;
}

th {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}

td:first-child { white-space: normal; }

/* Zahlen-Spalten optisch ruhiger */
td:nth-child(3), th:nth-child(3) {
  text-align: right;
}

/* Cards / Modules */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr; } }

.card {
  display: block;
  padding: 14px;
  border: 1px solid #eee;
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
}

.card:hover { border-color: #ddd; }

.cardTitle { font-weight: 700; margin-bottom: 6px; }
.card.disabled { opacity: .55; pointer-events: none; }

/* Pre/code blocks (Import Ergebnis) */
pre {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #eee;
  border-radius: 12px;
  background: #fafafa;
  overflow: auto;
}

input#chkShowArchive, input#exportCurrentView {width:auto}

.btnToggle {
  background: #fff;
  border: 1px solid #e6e6e6;
  color: #111;
  font-weight: 700;
}
.btnToggle:hover { filter: brightness(0.98); }


.field { min-width: 220px; }
.field.grow { flex: 1; min-width: 260px; }
.field.grow input { width: 100%; }