/* Capita Apps Portal
 * Geschwister der Capita Web-Tools (Holiday/Pikett Manager): gleiche Tokens,
 * gleiches ruhiges technisches Interface. Signature ist das Launcher-Grid
 * mit Monogramm-Kacheln - das Portal selbst ist die Visitenkarte der Familie.
 */

:root {
  --bg: #f2f4f6;
  --surface: #ffffff;
  --ink: #17202d;
  --muted: #5d6a7a;
  --border: #dfe4ea;
  --accent: #d2232a;       /* Schweizer Rot, sparsam */
  --accent-dark: #a81b21;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Code', Consolas, monospace;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
}

.hidden { display: none !important; }
.mono { font-family: var(--mono); font-size: 12px; }

/* ---------- Login ---------- */

.centered {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: 6px;
  padding: 40px 48px;
  text-align: center;
  max-width: 420px;
}

.login-card p { color: var(--muted); margin: 12px 0 24px; }

/* ---------- Brand / Header ---------- */

.brand {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand span { font-weight: 400; color: var(--muted); }

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar-right { display: flex; align-items: center; gap: 14px; }
.user-email { color: var(--muted); font-size: 13px; }

/* ---------- Layout ---------- */

.container {
  max-width: 980px;
  margin: 32px auto;
  padding: 0 20px;
}

.intro { color: var(--muted); margin-bottom: 20px; }

/* ---------- App Grid (Signature) ---------- */

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

.app-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 18px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.12s ease, transform 0.12s ease;
}

.app-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.app-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.app-tile {
  flex: 0 0 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-body { min-width: 0; }

.app-name {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 2px;
}

.app-desc {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.app-groups { color: var(--muted); }

.empty-state {
  grid-column: 1 / -1;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 6px;
  padding: 36px;
  text-align: center;
  color: var(--muted);
}

/* ---------- Buttons / Banner ---------- */

.btn {
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }

.btn-ghost { color: var(--muted); }
.btn-ghost:hover { color: var(--accent); border-color: var(--accent); }

.banner {
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 13px;
  margin-bottom: 16px;
}

.banner-error {
  background: #fdecec;
  border: 1px solid #f2b8bb;
  color: var(--accent-dark);
}

@media (max-width: 480px) {
  .app-grid { grid-template-columns: 1fr; }
}
