:root {
  --gruen: #1e8e3e;
  --gruen-hell: #e6f4ea;
  --rot: #d93025;
  --rot-hell: #fce8e6;
  --blau: #1a73e8;
  --grau: #5f6368;
  --grau-hell: #f1f3f4;
  --rand: #dadce0;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: #fafafa;
  color: #202124;
}

header.topbar {
  background: #fff;
  border-bottom: 1px solid var(--rand);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

header.topbar nav a {
  margin-right: 14px;
  text-decoration: none;
  color: var(--blau);
  font-size: 14px;
}

header.topbar .user {
  font-size: 13px;
  color: var(--grau);
}

main {
  max-width: 900px;
  margin: 0 auto;
  padding: 16px;
}

h1 { font-size: 22px; margin: 8px 0 16px; }
h2 { font-size: 17px; margin: 20px 0 10px; }

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--rand);
  border-radius: 6px;
  overflow: hidden;
}

th, td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--rand);
  font-size: 14px;
}

th { background: var(--grau-hell); font-weight: 600; }
tr:last-child td { border-bottom: none; }

a.button, button.button, input[type=submit] {
  display: inline-block;
  background: var(--blau);
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
}

a.button.secondary, button.button.secondary {
  background: #fff;
  color: var(--blau);
  border: 1px solid var(--blau);
}

.card {
  background: #fff;
  border: 1px solid var(--rand);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

label { display: block; margin: 10px 0 4px; font-size: 13px; color: var(--grau); }
input, select {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--rand);
  border-radius: 6px;
  font-size: 14px;
}

.error { color: var(--rot); font-size: 14px; margin: 8px 0; }
.hinweis { color: var(--grau); font-size: 13px; }

/* Live-Erfassung */
.spieler-spalten {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 640px) {
  .spieler-spalten { grid-template-columns: 1fr; }
}

.spieler-karte {
  background: #fff;
  border: 1px solid var(--rand);
  border-radius: 8px;
  padding: 12px;
}

.spieler-karte h3 { margin: 0 0 4px; }
.rpi-anzeige {
  font-size: 32px;
  font-weight: 700;
  margin: 4px 0 12px;
}

.aktion-btn {
  width: 100%;
  text-align: left;
  margin-bottom: 6px;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid var(--rand);
  background: var(--gruen-hell);
  color: #202124;
  font-size: 14px;
  cursor: pointer;
}
.aktion-btn.negativ { background: var(--rot-hell); }
.aktion-btn:active { transform: scale(0.98); }

.spiel-kopf {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.tpi-badge {
  background: var(--grau-hell);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 14px;
}

.undo {
  margin: 10px 0 18px;
  background: #fff;
  color: var(--grau);
  border: 1px solid var(--rand);
}
