:root {
  --card-bg: rgba(255,255,255,0.92);
  --card-bg-dark: rgba(20,30,40,0.95);
  --primary: #2f5d50;
  --secondary: #64748b;
  --danger: #dc2626;
  --text: #111827;
  --muted: #6b7280;
}

/* BODY */
body {
  font-family: "Segoe UI", Arial, sans-serif;
  max-width: 720px;
  margin: 24px auto;
  padding: 16px;
  color: var(--text);

  background:
    linear-gradient(rgba(255,255,255,0.78), rgba(255,255,255,0.92)),
    url("./Kirche.jpg");

  background-size: cover;
  background-position: center 75%;
  background-attachment: fixed;
}

/* CARD */
.card {
  background: var(--card-bg);
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 16px;
  backdrop-filter: blur(6px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

/* HERO */
.hero-card {
  text-align: center;
}

.hero-card h1 {
  margin: 0 0 8px 0;
  font-size: 26px;
}

.subtitle {
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 10px;
}

.hero-highlight {
  font-style: italic;
  margin-top: 10px;
  color: #374151;
}

/* INFO */
.info-card {
  background: rgba(200, 230, 220, 0.55);
  border-left: 5px solid green;
}

.info-card ul {
  margin: 10px 0 0 18px;
  padding: 0;
}

/* LABEL */
.label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

/* LOGIN */
.login-card {
  padding: 16px 18px;
}

#loginStatus {
  font-weight: 600;
  margin-bottom: 8px;
}

#loginForm {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

#loginForm input {
  flex: 1;
  min-width: 180px;
}

#error,
.error-text {
  color: var(--danger);
  margin-top: 8px;
  font-size: 13px;
}

/* INPUTS */
input, select {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  font-size: 14px;
  background: white;
  outline: none;
  transition: all 0.2s ease;
}

input:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(47,93,80,0.15);
}

/* BUTTONS */
button {
  padding: 10px 16px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, #2f5d50, #3c7a6a);
  color: white;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.18s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.2);
}

button.secondary {
  background: var(--secondary);
}

button.danger {
  background: var(--danger);
}

button:disabled,
button.disabled {
  background: #cbd5e1 !important;
  color: #64748b !important;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* TOP BAR */
.top-bar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

/* MONAT */
select {
  width: 100%;
  margin-top: 4px;
}

/* KARTEN STATUS */
.card.rot {
  border-left: 6px solid #dc2626;
  background: rgba(255,230,230,0.9);
}

.card.gelb {
  border-left: 6px solid orange;
  background: rgba(255,246,200,0.9);
}

.card.gruen {
  border-left: 6px solid green;
  background: rgba(220,255,220,0.9);
}

.status-badge {
  float: right;
  font-size: 20px;
}

.card-title {
  font-weight: 700;
  font-size: 17px;
}

.mini-info {
  margin-top: 6px;
}

.mein-mini {
  font-weight: 700;
  color: var(--primary);
}

.warnung {
  margin-top: 10px;
  font-weight: bold;
  color: #dc2626;
}

.action-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

/* ADMIN STATS */
.stats-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.stat-card {
  padding: 12px;
  border-radius: 12px;
  min-width: 130px;
  background: rgba(255,255,255,0.88);
}

.stat-card.rot {
  background: #ffeaea;
  border: 2px solid red;
}

.stat-card.gelb {
  background: #fff7cc;
  border: 2px solid orange;
}

.stat-card.gruen {
  background: #e6ffe6;
  border: 2px solid green;
}

.stat-title {
  font-size: 13px;
  color: #4b5563;
}

.stat-value {
  font-size: 22px;
  font-weight: 700;
  margin-top: 4px;
}

.kind-stat-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #d1d5db;
  padding: 8px 0;
}

.kind-stat-row:last-child {
  border-bottom: none;
}

/* EMPTY */
.empty-state {
  color: var(--muted);
  font-style: italic;
  margin-bottom: 14px;
}

/* SUCCESS EFFECT */
@keyframes successFlash {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); box-shadow: 0 0 20px rgba(34,197,94,0.35); }
  100% { transform: scale(1); }
}

.success-effect {
  animation: successFlash 0.6s ease-out;
}

/* DARK MODE */
body.dark {
  color: white;
  background:
    linear-gradient(rgba(10,15,20,0.9), rgba(10,15,20,0.96)),
    url("./Kirche.jpg");
  background-position: center 75%;
  background-size: cover;
  background-attachment: fixed;
}

body.dark .card {
  background: var(--card-bg-dark);
  color: white;
}

body.dark input,
body.dark select {
  background: #0f172a;
  border: 1px solid #475569;
  color: white;
}

body.dark .hero-highlight {
  color: #e5e7eb;
}

body.dark .mein-mini {
  color: #b7e4d5;
}

/* MOBILE */
@media (max-width: 600px) {
  #loginForm,
  .top-bar,
  .action-row {
    flex-direction: column;
  }

  input, select, button {
    width: 100%;
    box-sizing: border-box;
  }

  .stats-grid {
    flex-direction: column;
  }
}
