body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  font-family: "Source Sans Pro", sans-serif;
  background-color: #4885e7;
  margin: 0;
  padding: 0;
  color: #333;
  font-size: 16px;
  line-height: 1.6;
}
main {
  flex: 1;
}

.buchung-container {
  background: rgba(255, 255, 255, 0.248);
  color: #222;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 420px;
  box-sizing: border-box;
  margin: 2.5rem auto;
  border: 2px solid rgba(255, 255, 255, 0.15);
}

.login-container {
  background: rgba(255, 255, 255, 0.248);
  color: #222;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 420px;
  box-sizing: border-box;
  margin: 2.5rem auto;
  border: 2px solid rgba(255, 255, 255, 0.15);
}

.login-container input,
.login-container select,
.login-container button,
.login-container textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0.25rem 0;
}

.login-container .input-wrapper {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.willkommen {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 1.5rem;
}

h2 {
  color: #ffffff;
  text-align: center;
  margin-top: 0;
}

hr {
  margin: 0.5rem 0;
  border: none;
}

.logout {
  margin: 2rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
  border: none;
  border-radius: 0.5rem;
  font-weight: bold;
  padding: 1rem 1.5rem;
  cursor: pointer;
  gap: 0.6rem;
  text-decoration: none;
  background-color: #d84d4d;
}

button.logout:hover {
  background-color: #c03c3c;
}

label {
  display: block;
  margin: 1rem 0 0.4rem;
  font-weight: 600;
  font-family: Raleway, sans-serif;
  font-size: 1rem;
  color: #fff;
}

input {
  width: 94%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.308);
  color: #fff;
  margin-bottom: 1rem;
}

input[type="date"] {
  width: 100%;
  max-width: 100%;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-size: 1rem;
  border-radius: 0.5rem;
  border: none;
  font-family: "Source Sans Pro", sans-serif;
  box-sizing: border-box;
  appearance: none;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.3);
  cursor: pointer;
}

select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.308);
  color: #fff;
  margin-bottom: 1rem;
}

input:focus,
select:focus {
  border-color: #5b6ba6;
  outline: none;
  box-shadow: none;
}

input.gast {
  width: 90%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.308);
  color: #fff;
  margin-bottom: 1rem;
}

.zeitblock {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.zeitblock input {
  flex: 1;
}

.zeitblock span {
  color: #fff;
  font-weight: 600;
  font-family: Raleway, sans-serif;
  font-size: 1rem;
  text-transform: uppercase;
  padding: 0 0.5rem;
}

button {
  width: 100%;
  margin: 2rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
  border: none;
  border-radius: 0.5rem;
  font-weight: bold;
  padding: 1rem 1.5rem;
  cursor: pointer;
  gap: 0.6rem;
}

#toggleForm {
  margin: 2rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
  border: none;
  border-radius: 0.5rem;
  font-weight: bold;
  padding: 1rem 1.5rem;
  cursor: pointer;
  gap: 0.6rem;
}

button.blue {
  background-color: #4d86d8;
}

button.blue:hover {
  background-color: #3c6fc0
}

button.green {
  background-color: rgb(0, 175, 0);
  border: none;
}

button.green:hover {
  background-color: green;
}

button.red {
  background-color: #d84d4d;
}

button.red:hover {
  background-color: #c03c3c;
}

button:active {
  transform: scale(0.98);
}

.buchungsliste {
  list-style: none;
  padding: 0;
  margin-top: 2rem;
}

.buchungsliste li {
  background: linear-gradient(to bottom, #ffffff, #f7faff);
  border: 1px solid #dde2eb;
  color: #333;
  padding: 1rem;
  border-radius: 0.6rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 1rem;
  font-size: 0.85rem;
  font-weight: bold;
  color: white;
  margin-bottom: 0.5rem;
}

.badge.green {
  background-color: #28a745;
}

.badge.blue {
  background-color: #007bff;
}

.teilnehmer-gruppe {
  margin: 0.3rem 0 0.6rem;
  font-size: 1rem;
}

.label {
  width: 99%;
  display: inline-block;
  font-weight: bold;
  color: #555;
  margin-right: 0.1rem;
}

.mitglied-label {
  color: #82bfff;
}

.gast-label {
  color: #ff884d;
}

.maschine-label-buchung {
  color: #facc15;
}

.namen {
  font-family: 'Source Sans Pro', sans-serif;
  font-weight: normal;
  color: #222 !important;
}

.button-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.button.bearbeiten {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.4rem 0.8rem;
  border-radius: 0.4rem;
  text-decoration: none;
  color: white;
  font-weight: bold;
  font-size: 0.9rem;
}

.button.bearbeiten.blue.full {
  background-color: #5a6cab;
}

.button.bearbeiten.red.full {
  background-color: #d84d4d;
}

.button.bearbeiten:hover {
  opacity: 0.9;
}

input::placeholder,
textarea::placeholder {
  color: #ffffffcc;
  opacity: 1;
  font-weight: 500;
}

input:-ms-input-placeholder,
textarea:-ms-input-placeholder {
  color: #ffffffcc;
}

input::-ms-input-placeholder,
textarea::-ms-input-placeholder {
  color: #ffffffcc;
}

@media (max-width: 480px) {
  .login-container,
  .buchung-container {
    padding: 0.5rem;
    margin: 2rem 2rem;
  }
  input, select, button {
    font-size: 1rem;
  }
}

.maschine-label {
  width: 91%;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  margin-top: 0.35rem;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #f9fafb;
  gap: 8px;
  cursor: pointer;
}

.maschine-label .maschine {
  width: 18px;
  height: 18px;
  margin: 0;
  /* bei modernen Browsern: grüne Akzentfarbe */
  accent-color: #22c55e;
}

.maschine-label:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.7);
}

.maschine-label .maschine:focus-visible {
  outline: 2px solid #22c55e;
  outline-offset: 2px;
}

.slot-machine-free {
  font-size: 0.85rem;
  color: #22c55e;
}

.slot-machine-warning {
  font-size: 0.85rem;
  color: #ef4444;
}

#wochenansicht h2 {
  font-size: 1.4rem;
}

.week-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  color: #fff;
}

.week-nav #day-label {
  margin-top: 0.5rem;
  font-weight: 800;
}

.day-grid {
  width: 100%;
  overflow-x: auto;
}

.day-grid-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
  background: rgba(255,255,255,0.9);
  border-radius: 0.4rem;
  overflow: hidden;
}

.day-grid-table th,
.day-grid-table td {
  border: 1px solid #dde2eb;
  padding: 0.25rem 0.35rem;
  text-align: center;
}

.day-grid-table th {
  background: #f3f4f6;
  font-weight: 600;
}

.slot-status {
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 40px;
}

.slot-badge,
.slot-free-btn,
.slot-booked,
.slot-locked {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 35px;
  border-radius: 999px;
  border: none;
  font-size: 1rem;
}

.slot-free-btn {
  cursor: pointer;
  background: #22c55e;
  color: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
  transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.08s ease;
}

.slot-free-btn i {
  font-size: 1.05rem;
}

.slot-free-btn:hover {
  filter: brightness(1.05);
}

.slot-free-btn:active {
  transform: scale(0.95);
  box-shadow: 0 0 0 rgba(0,0,0,0.1);
  background: #fff;
  color: #22c55e;
}

.slot-booked,
.slot-locked {
  cursor: default;
}

.slot-booked {
  background: #fee2e2;
  color: #b91c1c;
}

.slot-locked {
  background: #e5e7eb;
  color: #111827;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

.info-field {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.18);
  color: #f9fafb;
  font-size: 0.95rem;
  box-sizing: border-box;
}

.buchungsliste .button-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  align-items: center;
}

.buchungsliste .button-row .button,
.buchungsliste .button-row button {
  width: auto;
  margin: 0;
  padding: 0.5rem 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-size: 0.95rem;
  line-height: 1.1;
  border-radius: 0.45rem;
  font-weight: bold;
}

.buchungsliste .button-row .button.full,
.buchungsliste .button-row button.full {
  flex: 1; 
  padding: 0.5rem 0.9rem;
}

.buchungsliste .button-row .button.bearbeiten {
  margin-top: 0;
}

.rangliste-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
}

.rangliste-head h2 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: .5rem;
  color: #fff;
}

.rangliste-head h2 i { 
  font-size:1.15em; 
}

.rangliste-toggle {
  width: auto;
  padding: 0.6rem 1rem;
  font-size: 0.95rem;
}

.rangliste-wrapper {
  margin-top:.45rem; 
}

.rangliste-tools { 
  display:flex; 
  align-items:center; 
  gap:.5rem; 
  margin:.25rem 0 .5rem; 
}

.rangliste-tools input {
  flex:1; 
  padding:.5rem .75rem; 
  border-radius:.45rem; 
  border:1px solid #dde2eb;
  background:#fff; 
  color:#333; 
  width:auto; 
  margin:0;
}

.rangliste {
  list-style:none; 
  margin:0; 
  padding:0; 
  max-height:320px; 
  overflow:auto;
  border:1px dashed #dde2eb; 
  border-radius:.5rem; 
  background:rgba(255,255,255,.6);
}

.rangliste li {
  display: grid;
  grid-template-columns: 2.2rem 1fr auto auto;
  align-items: center;
  gap: .35rem;
  padding: .25rem .5rem;
  border-bottom: 1px dashed #dde2eb;
  background: rgba(255,255,255,0.55);
}

.rangliste li:last-child { 
  border-bottom:none; 
}

.rangliste .rang { 
  background:#5a6cab; 
  color:#fff; 
  font-weight:700; 
  border-radius:.4rem; 
  text-align:center; 
  padding:.2rem 0; 
}

.rangliste .name { 
  font-weight:600; 
}

.rangliste .ich {
  background:linear-gradient(to bottom,#fff9e6,#fff3c4); 
}

.rangliste .ich .name { 
  color:#a87400; 
}

.rangliste .badge-ich { 
  font-size:.72rem;
  color:#a87400;
  font-weight:700;
  opacity: .9;
}

button.small { 
  margin:0 0 0 0 !important; 
  width:auto !important; 
}

.rang-count { 
  font-size:.85rem; 
  color:#fff; 
  opacity:.9; 
}

.challenge-btn {
  height: 42px;
  font-size: .72rem;
  border-radius: .35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.challenge-btn.blue {
  background-color: #4d86d8;
  color: #fff;
}
.challenge-btn.blue:hover {
  background-color:#3c6fc0;
}

.challenge-btn.red {
  background-color: #d84d4d;
  color: #fff;
}
.challenge-btn.red:hover {
  background-color:#c03c3c;
}

.challenge-action {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.challenge-banner {
  background: #ffecb5;
  border: 1px solid #e7c770;
  padding: .8rem;
  border-radius: .5rem;
  margin: 0 0 1rem 0;
  color: #6c4e00;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.challenge-banner i {
  color:#d4a017;
  font-size:1.2rem;
}

.challenge-dashboard-banner {
  background: #ffecb5;
  border: 1px solid #e7c770;
  padding: .85rem .9rem;
  border-radius: .55rem;
  margin: 1rem 0 1.5rem 0;
  color: #6c4e00;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: .6rem;
}

.challenge-dashboard-banner i {
  color:#d4a017;
  font-size:1.3rem;
}

.site-footer {
  position: relative;
  bottom: 0;
  width: 100%;
  color: white;
  text-align: center;
  padding: .8rem 0;
  font-size: 0.85rem;
  border-top: 1px solid #e2e8f0;    /* feine Linie oben */
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 .75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .25rem;
  font-weight: 600;
}

.footer-inner p {
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  color: white;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #1e40af;
}

@media (max-width: 380px) {
  .login-container {
    padding: 1.25rem;
    border-radius: .8rem;
  }
  body { font-size: 15px; }
}

@supports (-webkit-touch-callout: none) {
  .login-container input,
  .login-container select {
    -webkit-appearance: none;
  }
}