* { box-sizing: border-box; }
:root {
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
html {
  scroll-padding-top: env(safe-area-inset-top, 0px);
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: -apple-system, Segoe UI, Roboto, sans-serif;
  margin: 0;
  padding: 0 1rem calc(2rem + env(safe-area-inset-bottom, 0px));
  background: #f4f4f4;
  color: #1a1a1a;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: contain;
}
header {
  background: #c1121f;
  color: white;
  padding: 1rem;
  padding-top: calc(1rem + env(safe-area-inset-top, 0px));
  margin: 0 -1rem 1rem;
  position: sticky;
  top: 0;
  z-index: 20;
}
header h1 { margin: 0; font-size: 1.2rem; display: flex; align-items: center; gap: 0.5rem; }
header h1 .logo { height: 40px; width: auto; flex-shrink: 0; }

.identity-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff3cd;
  color: #664d03;
  padding: 0.5rem 1rem;
  margin: 0 -1rem 1rem;
  font-size: 0.9rem;
}
.identity-bar strong { color: #1a1a1a; }
.identity-bar a {
  color: #664d03;
  text-decoration: underline;
  white-space: nowrap;
  margin-left: 0.8rem;
}

/* Touch-Ziele mind. 44px hoch (Apple/Google-Empfehlung) */
button, .btn, input, select {
  min-height: 44px;
}
a, button { -webkit-tap-highlight-color: transparent; }
.balance {
  font-size: 1.3rem;
  padding: 1rem;
  border-radius: 8px;
  margin: 1rem 0;
  background: white;
}
.balance.negative { border-left: 6px solid #c1121f; }
.balance.positive { border-left: 6px solid #2a9d8f; }
.negative { color: #c1121f; }
.positive { color: #2a9d8f; }
.btn {
  display: inline-block;
  padding: 0.8rem 1.2rem;
  background: #003049;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  margin: 0.5rem 0;
}
.btn-pay { background: #0070ba; } /* PayPal-Blau */
.drink-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
}
.drink-form { margin: 0; }
.drink-btn {
  width: 100%;
  padding: 1rem 0.5rem;
  font-size: 1rem;
  border: none;
  border-radius: 10px;
  background: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.drink-btn .price { color: #555; font-size: 0.85rem; }
.recent-list { list-style: none; padding: 0; }
.recent-list li { padding: 0.3rem 0; border-bottom: 1px solid #ddd; }
.admin-table { width: 100%; border-collapse: collapse; background: white; }
.admin-table th, .admin-table td { padding: 0.5rem; border-bottom: 1px solid #ddd; text-align: left; }
.admin-form { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1rem; }
.qr-image { max-width: 280px; display: block; margin: 1rem 0; }
.hint { color: #555; font-size: 0.9rem; }

.welcome-card {
  background: white;
  border-radius: 12px;
  padding: 1.2rem;
  margin-top: 1rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
.welcome-card input[type="text"],
.welcome-card input[type="password"] {
  width: 100%;
  padding: 0.7rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  margin: 0.8rem 0;
}
.warning {
  background: #fff3cd;
  border: 1px solid #ffe69c;
  color: #664d03;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  font-size: 0.9rem;
  margin: 0.6rem 0;
}
.success {
  background: #d1f0e8;
  border: 1px solid #a3e0cf;
  color: #0f5c48;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  font-size: 0.9rem;
  margin: 0.6rem 0;
}
.nachtrag-form { flex-direction: column; align-items: stretch; }
.nachtrag-form label {
  display: block;
  font-size: 0.85rem;
  color: #555;
  margin-bottom: 0.6rem;
}
.nachtrag-form select,
.nachtrag-form input {
  display: block;
  width: 100%;
  padding: 0.6rem;
  margin-top: 0.2rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
}
.member-search {
  width: 100%;
  padding: 0.8rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  margin-bottom: 0.8rem;
}
.member-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.member-list li { border-bottom: 1px solid #eee; }
.member-list li:last-child { border-bottom: none; }
.member-list li.no-match { display: none; }
.member-list form { margin: 0; }
.member-list button,
.member-list a {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.9rem 1rem;
  background: none;
  border: none;
  font-size: 1rem;
  font-family: inherit;
  color: #1a1a1a;
  text-decoration: none;
  min-height: 44px;
}
.member-list button:active,
.member-list a:active { background: #f4f4f4; }
