:root {
  --bg: #0f1115;
  --card: #181b21;
  --accent: #4f8cff;
  --text: #eef1f6;
  --text-dim: #9aa3b2;
  --border: #2a2f3a;
  --danger: #ff5c5c;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.hidden { display: none !important; }

/* ---------- Login ---------- */
.login-page {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 32px;
  width: 320px;
  text-align: center;
}

.logo { font-size: 2rem; margin: 0 0 4px; letter-spacing: 0.02em; }
.subtitle { color: var(--text-dim); margin-bottom: 24px; }

input, select, button {
  width: 100%;
  padding: 12px 14px;
  margin-top: 8px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #0d0f13;
  color: var(--text);
  font-size: 1rem;
}

button {
  background: var(--accent);
  border: none;
  color: white;
  font-weight: 600;
  cursor: pointer;
  margin-top: 16px;
}
button:hover { opacity: 0.9; }

.error { color: var(--danger); margin-top: 12px; }
.status { margin-top: 16px; text-align: center; }
.status.ok { color: #6be36b; }

/* ---------- Topbar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
}
.link-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  width: auto;
  margin: 0;
  cursor: pointer;
}
.back-link { color: var(--text-dim); text-decoration: none; }

/* ---------- Dashboard ---------- */
.dashboard { padding: 32px; max-width: 720px; margin: 0 auto; }
.welcome { color: var(--text-dim); margin-bottom: 24px; }

.tile-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.tile {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 16px;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.tile:hover { transform: translateY(-2px); border-color: var(--accent); }
.tile-icon { font-size: 2rem; }
.tile-label { font-weight: 600; }
.tile[aria-disabled="true"] { opacity: 0.4; pointer-events: none; }

/* ---------- Formulare ---------- */
.form-page { padding: 24px; max-width: 560px; margin: 0 auto; }
.form-page h1 { margin-bottom: 24px; }

label {
  display: block;
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--text-dim);
}

fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: 20px;
  padding: 8px 16px 16px;
}
legend { padding: 0 8px; color: var(--text-dim); }

.row { display: flex; gap: 12px; }
.row label { flex: 1; }

.toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  color: var(--text-dim);
}

.switch { position: relative; display: inline-block; width: 46px; height: 26px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; cursor: pointer; inset: 0;
  background-color: var(--border); border-radius: 26px; transition: 0.2s;
}
.slider::before {
  content: ""; position: absolute; height: 20px; width: 20px;
  left: 3px; bottom: 3px; background-color: white; border-radius: 50%;
  transition: 0.2s;
}
input:checked + .slider { background-color: var(--accent); }
input:checked + .slider::before { transform: translateX(20px); }

/* Google Places Autocomplete Dropdown im Dark Mode lesbar halten */
.pac-container { background: var(--card); border: 1px solid var(--border); }
.pac-item { color: var(--text); }
.pac-item-query { color: var(--text); }
