:root {
  --moos: #F7F2E7; --moos-dunkel: #EEE5D2; --tinte: #241A10; --tinte-soft: #5C4E3C;
  --rot: #C81E14; --rot-dunkel: #8E140D; --gruen: #4B6B3E; --gruen-dunkel: #34492B;
  --linie: #E2D4B8; --weiss: #FFFDF8;
}
* { margin:0; padding:0; box-sizing:border-box; }
body { background:var(--moos); color:var(--tinte); font-family:'Public Sans',sans-serif; }
a { color: inherit; }

.admin-shell { display: flex; align-items: stretch; min-height: 100vh; }
.admin-sidebar {
  width: 230px; flex-shrink: 0; background: var(--weiss); border-right: 1px solid var(--linie);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.admin-brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--tinte); padding: 20px 22px; border-bottom: 1px solid var(--linie); font-weight: 700; font-size: 16px; }
.admin-brand .brand-text em { font-style: normal; color: var(--rot); }
.admin-nav { flex: 1; padding: 14px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.admin-nav a { padding: 9px 14px; border-radius: 6px; font-size: 13.5px; font-weight: 600; text-decoration: none; color: var(--tinte-soft); }
.admin-nav a:hover { background: var(--moos-dunkel); }
.admin-nav a.active { background: var(--rot); color: #fff; }
.admin-user-row { padding: 16px 22px; border-top: 1px solid var(--linie); font-size: 13px; color: var(--tinte-soft); }
.admin-user-row .uname { display: block; margin-bottom: 6px; font-weight: 700; color: var(--tinte); }
.admin-user-row a { color: var(--tinte-soft); text-decoration: none; }
.admin-user-row a:hover { color: var(--rot); }
.admin-main { flex: 1; min-width: 0; max-width: 1200px; margin: 0 auto; padding: 40px 32px; width: 100%; }
@media (max-width: 880px) {
  .admin-shell { flex-direction: column; }
  .admin-sidebar { width: 100%; height: auto; position: static; }
  .admin-nav { flex-direction: row; flex-wrap: wrap; }
  .admin-main { padding: 28px 18px; }
}

h1 { font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: 26px; margin-bottom: 8px; }
.subtitle { color: var(--tinte-soft); margin-bottom: 26px; font-size: 14.5px; }

.btn { display:inline-flex; align-items:center; gap:6px; font-size: 14px; font-weight: 700; padding: 10px 20px; border-radius: 9px; cursor: pointer; border: 1px solid transparent; text-decoration: none; background: none; font-family: inherit; }
.btn.primary { background: var(--rot); color: #fff; }
.btn.primary:hover { background: var(--rot-dunkel); }
.btn.ghost { background: transparent; color: var(--tinte-soft); border-color: var(--linie); }
.btn.ghost:hover { border-color: var(--tinte-soft); color: var(--tinte); }
.btn.small { padding: 7px 14px; font-size: 13px; }
.btn.danger { color: var(--rot); border-color: #E8A9A2; }
.btn.danger:hover { background: #FBECE9; }

.card { background: var(--weiss); border: 1px solid var(--linie); border-radius: 14px; padding: 22px 24px; }

input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], select, textarea {
  width: 100%; font-family: inherit; font-size: 14px; padding: 10px 13px;
  border: 1px solid var(--linie); border-radius: 8px; background: var(--weiss); color: var(--tinte);
}
textarea { resize: vertical; min-height: 70px; }
label { display:block; font-size: 12px; font-weight: 700; color: var(--tinte-soft); margin-bottom: 5px; text-transform: uppercase; letter-spacing: .02em; }
.field { margin-bottom: 16px; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }

.flash { padding: 12px 16px; border-radius: 9px; font-size: 13.5px; margin-bottom: 20px; }
.flash.error { background: #FBE4E1; color: var(--rot-dunkel); border: 1px solid #F1B8B1; }
.flash.ok { background: #E7EEE2; color: var(--gruen-dunkel); border: 1px solid #C5D8B9; }

table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table th { text-align: left; padding: 10px 12px; border-bottom: 2px solid var(--linie); color: var(--tinte-soft); font-size: 11.5px; text-transform: uppercase; letter-spacing: .03em; }
table td { padding: 10px 12px; border-bottom: 1px solid var(--linie); vertical-align: middle; }
table tr:hover td { background: var(--moos-dunkel); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 28px; }
.stat-card { background: var(--weiss); border: 1px solid var(--linie); border-radius: 14px; padding: 18px 20px; }
.stat-card .num { font-family: 'Baloo 2', sans-serif; font-size: 30px; font-weight: 700; }
.stat-card .lbl { font-size: 12.5px; color: var(--tinte-soft); margin-top: 2px; }

.mode-option { display: flex; align-items: flex-start; gap: 14px; padding: 16px; border: 1px solid var(--linie); border-radius: 12px; margin-bottom: 10px; cursor: pointer; }
.mode-option.active { border-color: var(--rot); background: #FBECE9; }
.mode-option input { width: auto; margin-top: 3px; }
.mode-option .t { font-weight: 700; margin-bottom: 3px; }
.mode-option .d { font-size: 13px; color: var(--tinte-soft); }
