:root {
  color-scheme: light dark;
  --bg: #f5f5f7;
  --karte-bg: #ffffff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --akzent: #0071e3;
  --gefahr: #d70015;
  --border: #d2d2d7;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1c1e;
    --karte-bg: #2c2c2e;
    --text: #f5f5f7;
    --muted: #a1a1a6;
    --border: #3a3a3c;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  justify-content: center;
  padding: 2rem 1rem 4rem;
}

main { width: 100%; max-width: 720px; }

h1 { font-size: 1.6rem; margin-bottom: 0.25rem; }
.hinweis { color: var(--muted); margin-top: 0; margin-bottom: 1.5rem; font-size: 0.9rem; }

.karte {
  background: var(--karte-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
}

label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
}

input[type="text"], input[type="password"] {
  width: 100%;
  padding: 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  margin-bottom: 1rem;
}

button {
  border: none;
  border-radius: 8px;
  background: var(--akzent);
  color: white;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.7rem 1.1rem;
  width: 100%;
}

.fehler {
  color: var(--gefahr);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.login-box { max-width: 360px; margin: 3rem auto 0; }

.kopf {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1.5rem;
}

.abmelden { color: var(--muted); font-size: 0.85rem; text-decoration: none; }
.abmelden:hover { text-decoration: underline; }

.app-raster {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.app-kachel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text);
  background: var(--karte-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem 1rem;
  text-align: center;
  font-weight: 600;
  transition: transform 0.1s ease, border-color 0.1s ease;
}

.app-kachel:hover { border-color: var(--akzent); transform: translateY(-2px); }

.app-kachel .icon { font-size: 2rem; }

.dashboard-link {
  display: inline-block;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.dashboard-link:hover { color: var(--akzent); }
