:root {
  --bg: #f7f8f5;
  --panel: #ffffff;
  --panel-soft: #f1f3ed;
  --text: #151712;
  --muted: #687061;
  --line: #dce1d5;
  --pink: #f22f8d;
  --lime: #c8f24a;
  --lime-strong: #a7d920;
  --danger: #b42318;
  --ok: #277246;
  --shadow: 0 18px 60px rgba(30, 34, 24, 0.08);
  color-scheme: light;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100dvh;
  background:
    linear-gradient(90deg, rgba(242, 47, 141, 0.08), transparent 30%),
    linear-gradient(180deg, rgba(200, 242, 74, 0.16), transparent 24%),
    var(--bg);
  color: var(--text);
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.shell {
  min-height: 100dvh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px clamp(18px, 4vw, 44px);
  border-bottom: 1px solid rgba(220, 225, 213, 0.9);
  background: rgba(247, 248, 245, 0.88);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--text);
  color: var(--lime);
  font-weight: 850;
  letter-spacing: 0;
}

.brand strong {
  display: block;
  font-size: 16px;
}

.brand span,
.muted {
  color: var(--muted);
}

.brand span {
  display: block;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.login {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  gap: clamp(22px, 5vw, 70px);
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(36px, 8vw, 86px) clamp(18px, 4vw, 44px);
}

.intro {
  padding-top: clamp(10px, 6vw, 56px);
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--pink);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.kicker::before {
  content: "";
  width: 34px;
  height: 3px;
  background: var(--lime-strong);
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 820px;
  font-size: clamp(44px, 7vw, 92px);
  line-height: 0.96;
}

h2 {
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.08;
}

h3 {
  font-size: 18px;
  line-height: 1.2;
}

p {
  line-height: 1.58;
}

.lead {
  max-width: 650px;
  color: #3f463a;
  font-size: clamp(18px, 2vw, 22px);
}

.login-grid,
.panel,
.result,
.table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.login-grid {
  display: grid;
  gap: 1px;
  overflow: hidden;
  background: var(--line);
}

.login-card {
  padding: 24px;
  background: var(--panel);
}

.stack {
  display: grid;
  gap: 14px;
}

.main {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  padding: 24px clamp(18px, 4vw, 44px) 48px;
}

.sidebar {
  position: sticky;
  top: 88px;
  align-self: start;
  display: grid;
  gap: 10px;
}

.nav-btn,
.ghost,
.primary,
.danger,
.small-btn,
.copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 760;
}

.nav-btn {
  justify-content: flex-start;
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  color: #343b2f;
}

.nav-btn.active,
.nav-btn:hover {
  border-color: var(--line);
  background: var(--panel);
}

.primary {
  background: var(--text);
  color: #ffffff;
}

.primary:hover {
  background: #262a21;
}

.ghost,
.small-btn,
.copy-btn {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
}

.danger {
  border: 1px solid rgba(180, 35, 24, 0.2);
  background: #fff4f2;
  color: var(--danger);
}

.small-btn,
.copy-btn {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 13px;
}

.content {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.section-head p {
  max-width: 780px;
  margin: 8px 0 0;
  color: var(--muted);
}

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

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

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel {
  padding: 20px;
}

.metric {
  display: grid;
  gap: 7px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.metric b {
  font-size: 30px;
}

label {
  display: grid;
  gap: 7px;
  color: #30362c;
  font-size: 13px;
  font-weight: 780;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid #cfd6c6;
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  padding: 11px 12px;
  outline: none;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(242, 47, 141, 0.12);
}

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

.table-wrap {
  overflow: auto;
  box-shadow: none;
}

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

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--panel-soft);
  color: #485140;
  font-size: 12px;
  text-transform: uppercase;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 4px 10px;
  background: #edf7d4;
  color: #3a5f0f;
  font-size: 12px;
  font-weight: 800;
}

.status.inactive,
.status.Archiviert,
.status.Ueberarbeiten {
  background: #fff0eb;
  color: #9f341c;
}

.status.Entwurf {
  background: #eef1e8;
  color: #4d5545;
}

.result {
  display: grid;
  gap: 12px;
  padding: 18px;
  box-shadow: none;
}

.result pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: #252b21;
  font: 14px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  border-radius: 999px;
  padding: 7px 10px;
  background: #f4f6ef;
  color: #404738;
  font-size: 12px;
  font-weight: 760;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  max-width: 360px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--text);
  color: white;
  padding: 13px 15px;
  box-shadow: var(--shadow);
}

.empty {
  border: 1px dashed #cbd3c1;
  border-radius: 8px;
  padding: 18px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.58);
}

@media (max-width: 920px) {
  .login,
  .main,
  .grid.two,
  .grid.three {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

  h1 {
    font-size: 42px;
  }
}
