:root {
  --bg: #0f0f13;
  --surface: #1a1a24;
  --border: #2a2a38;
  --text: #e8e8f0;
  --text-muted: #888899;
  --primary: #6c63ff;
  --primary-hover: #5a52e0;
  --danger: #ff4f4f;
  --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }

/* ── Auth ── */
.auth-page {
  justify-content: center;
  align-items: center;
}

.auth-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  width: 100%;
  max-width: 400px;
  margin: 2rem;
}

.auth-logo { font-size: 2.5rem; text-align: center; margin-bottom: 1rem; }
.auth-box h1 { text-align: center; font-size: 1.5rem; margin-bottom: 1.5rem; }

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}
.auth-footer a { color: var(--text-muted); text-decoration: underline; }

/* ── Forms ── */
.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.form-group input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 0.65rem 0.9rem;
  font-size: 1rem;
  transition: border-color 0.15s;
}
.form-group input:focus {
  outline: none;
  border-color: var(--primary);
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.15s, opacity 0.15s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { background: var(--border); }
.btn-full { width: 100%; text-align: center; }
.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.85rem; }

/* ── Alerts ── */
.alert {
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.alert-error { background: rgba(255,79,79,0.15); border: 1px solid var(--danger); color: var(--danger); }

/* ── Topbar ── */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar-title { font-weight: 700; font-size: 1.1rem; }
.topbar-nav { display: flex; align-items: center; gap: 1.25rem; }
.topbar-link { color: var(--text-muted); font-size: 0.9rem; }
.topbar-link:hover { color: var(--text); }
.topbar-user { color: var(--text-muted); font-size: 0.9rem; }

/* ── Main ── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  flex: 1;
}

.section-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

/* ── App Grid ── */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.app-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: border-color 0.15s, transform 0.15s;
  position: relative;
  overflow: hidden;
}
.app-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
  background: var(--accent, var(--primary));
}
.app-card:hover {
  border-color: var(--accent, var(--primary));
  transform: translateY(-2px);
}

.app-icon { font-size: 2rem; flex-shrink: 0; }
.app-info { flex: 1; }
.app-info h3 { font-size: 1rem; margin-bottom: 0.25rem; }
.app-info p { color: var(--text-muted); font-size: 0.875rem; }
.app-arrow { color: var(--text-muted); font-size: 1.25rem; }

/* ── Content Box (Impressum) ── */
.content-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 700px;
}
.content-box h1 { font-size: 1.75rem; margin-bottom: 1.5rem; }
.content-box h2 { font-size: 1rem; color: var(--text-muted); margin: 1.5rem 0 0.5rem; text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.8rem; }
.content-box p { line-height: 1.7; color: var(--text-muted); }
.content-box a { color: var(--primary); }

/* ── Footer ── */
.footer {
  text-align: center;
  padding: 1.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 1rem;
  justify-content: center;
}
.footer a { color: var(--text-muted); }
.footer a:hover { color: var(--text); }
