:root {
  --bg: #0d0f12;
  --panel: #171a1f;
  --panel-2: #22262c;
  --line: #343a42;
  --text: #eceef0;
  --muted: #a3abb4;
  --accent: #c8102e;
  --accent-hover: #e01b3c;
  --accent-text: #ffffff;
  --gold: #e6b422;
  --red: #ff7a6e;
  --green: #4cc38a;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    15px/1.45 system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 12px 20px;
  background: var(--panel);
  border-bottom: 2px solid var(--accent);
}
header h1 {
  font-size: 17px;
  margin: 0;
  letter-spacing: 0.02em;
}
.emblem {
  height: 40px;
  width: auto;
  border-radius: 4px;
}
.spacer {
  flex: 1;
}
.who {
  color: var(--muted);
  font-size: 14px;
}
.status {
  font-size: 13px;
  padding: 2px 10px;
  border-radius: 99px;
  background: var(--panel-2);
}
.status.on {
  color: var(--green);
}
.status.off {
  color: var(--red);
}
nav {
  display: flex;
  gap: 4px;
  padding: 0 20px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}
nav button {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 10px 12px;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}
nav button.active {
  color: var(--text);
  border-bottom-color: var(--gold);
}
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
}
.card h2 {
  margin: 0 0 12px;
  font-size: 16px;
}
.muted {
  color: var(--muted);
}
.error {
  color: var(--red);
}
.ok {
  color: var(--green);
}
.btn {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 7px 12px;
  cursor: pointer;
}
.btn:hover {
  border-color: var(--muted);
}
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
}
.btn.primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.btn.danger {
  color: var(--red);
}
.btn.small {
  padding: 3px 9px;
  font-size: 13px;
}
a.btn {
  text-decoration: none;
  display: inline-block;
}
.login {
  max-width: 420px;
  margin: 4vh auto;
  text-align: center;
}
.logo {
  width: 100%;
  max-width: 320px;
  height: auto;
  border-radius: 8px;
  margin-bottom: 12px;
}
.hint {
  margin: -6px 0 12px;
  font-size: 14px;
}
.field-label {
  font-size: 14px;
  margin-bottom: 4px;
}
.kinds {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}
.checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.check-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 4px 12px;
  font-size: 14px;
  color: var(--muted);
}
.check-item.done {
  color: var(--green);
  border-color: var(--green);
}
.subcard {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
}
.subhead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  margin-bottom: 8px;
}
.multi {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.multi select,
.add-role {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 7px 8px;
  max-width: 100%;
}
.role-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #6d1626;
  color: #ffdfe3;
  border-radius: 99px;
  padding: 3px 4px 3px 12px;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.role-chip button {
  background: none;
  border: 0;
  color: inherit;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 7px;
  border-radius: 99px;
}
.role-chip button:hover {
  background: rgba(255, 255, 255, 0.15);
}
.actions {
  margin-top: 12px;
}
.poll-name {
  display: grid;
  gap: 2px;
  flex: 1 1 200px;
  max-width: 400px;
  font-size: 13px;
}
.poll-name input {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px;
  font-weight: 600;
  width: 100%;
}
.form textarea {
  resize: vertical;
  line-height: 1.45;
}
.guide {
  max-width: 720px;
  margin-inline: auto;
}
.guide h1 {
  font-size: 26px;
  line-height: 1.2;
  margin: 0 0 8px;
  text-wrap: balance;
}
.guide h2 {
  font-size: 18px;
  margin: 20px 0 6px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.guide p {
  margin: 0 0 10px;
}
.guide ul {
  margin: 0 0 10px;
  padding-left: 22px;
}
.guide li {
  margin-bottom: 4px;
}
.guide code {
  background: var(--panel-2);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.92em;
  overflow-wrap: anywhere;
}
.subhead .btn {
  margin-left: auto;
}
.rolelist {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
}
.rolelist li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 16px 0;
}
h3 {
  margin: 8px 0 0;
  font-size: 15px;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  max-width: calc(100vw - 32px);
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  z-index: 10;
}
.toast.good {
  border-color: var(--green);
  color: var(--green);
}
.toast.bad {
  border-color: var(--red);
  color: var(--red);
}
.cal-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.cal-head h2 {
  margin: 0;
  flex: 1;
}
.cal {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-template-rows: auto;
  grid-auto-rows: 1fr;
  gap: 4px;
}
.cal .dow {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding-bottom: 2px;
}
.day {
  min-height: 92px;
  background: var(--panel-2);
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 4px;
  min-width: 0;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  width: 100%;
}
.day.other {
  opacity: 0.4;
}
.day.today {
  border-color: var(--gold);
}
.day.selected {
  outline: 2px solid var(--text);
}
.day .num {
  font-size: 13px;
  color: var(--muted);
  display: block;
  margin-bottom: 3px;
}
.chip {
  display: block;
  font-size: 12px;
  padding: 1px 5px;
  margin-bottom: 2px;
  border-radius: 4px;
  background: #6d1626;
  color: #ffdfe3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.more {
  font-size: 12px;
  color: var(--muted);
}
table {
  width: 100%;
  border-collapse: collapse;
}
th,
td {
  text-align: left;
  padding: 8px 6px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  overflow-wrap: anywhere;
}
th {
  color: var(--muted);
  font-weight: 500;
  font-size: 13px;
}
.form {
  display: grid;
  gap: 12px;
  max-width: 640px;
}
.form label {
  display: grid;
  gap: 4px;
  font-size: 14px;
}
.row label {
  display: grid;
  gap: 4px;
  font-size: 14px;
}
.row input,
.row select,
.form textarea,
.form input,
.form select {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px;
  width: 100%;
}
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}
.row label {
  flex: 1 1 130px;
}
.days {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.days label {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--panel-2);
  border-radius: 6px;
  padding: 4px 9px;
}
.days input {
  width: auto;
}
.check {
  display: flex !important;
  align-items: center;
  gap: 8px;
}
.check input {
  width: auto;
}
.notice {
  background: #3a2e14;
  border: 1px solid #6b5420;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 16px;
}
@media (max-width: 640px) {
  header,
  nav {
    padding-left: 16px;
    padding-right: 16px;
  }
  main {
    padding: 16px;
  }
  .day {
    min-height: 58px;
    padding: 3px;
  }
  .chip {
    font-size: 0;
    height: 6px;
    padding: 0;
  }
  .more {
    font-size: 11px;
  }
  /* Tabellen werden auf dem Handy zu untereinander stehenden Karten */
  table.stack thead {
    display: none;
  }
  table.stack tr {
    display: block;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
  }
  table.stack td {
    display: block;
    border: 0;
    padding: 2px 0;
  }
  table.stack td:first-child {
    font-weight: 600;
  }
  table.stack td:last-child {
    padding-top: 6px;
  }
}
