/* ==========================================================================
   Futurefly 2026 – Design-Sprache (siehe docs/DECISIONS.md ADR-082/083/086)
   Gemeinsame Marken-Farbpalette mit der WPF-App und der mobilen PWA.
   Helles, professionelles B2B-Erscheinungsbild – keine Dark-Mode-SaaS-Optik.
   ========================================================================== */

:root {
  /* Markenfarben */
  --blue: #1D5FC7;
  --blue-dark: #154690;
  --blue-light: #E4EEFC;
  --teal: #0F9C8A;
  --amber: #D97706;
  --red: #DC2626;
  --green: #16A34A;
  --purple: #8B5CF6;

  /* Neutralskala */
  --slate-50: #F8FAFC;
  --slate-100: #F1F5F9;
  --slate-200: #E2E8F0;
  --slate-300: #CBD5E1;
  --slate-400: #94A3B8;
  --slate-500: #64748B;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1E293B;
  --slate-900: #0F172A;

  /* Rundungen */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 999px;

  /* Schatten */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, .08), 0 1px 2px rgba(15, 23, 42, .04);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, .12), 0 2px 6px rgba(15, 23, 42, .06);

  /* Legacy-Aliase (werden an einigen wenigen Stellen weiter referenziert) */
  --bg: var(--slate-50);
  --card: #ffffff;
  --text: var(--slate-900);
  --muted: var(--slate-500);
  --accent: var(--blue);
  --error: var(--red);
  --success: var(--green);

  --font-sans: -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Reset & Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--slate-50);
  color: var(--slate-900);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--blue); }
a:hover { color: var(--blue-dark); }

/* ---------- Typografie-Skala ---------- */
h1, h2, h3, h4 { color: var(--slate-900); line-height: 1.25; font-weight: 700; }
h1 { font-size: 1.75rem; letter-spacing: -0.01em; margin-bottom: 4px; }
h2 { font-size: 1.375rem; margin-bottom: 4px; }
h3 { font-size: 1.125rem; font-weight: 600; margin-bottom: 4px; }
p { margin-bottom: 12px; }
p:last-child { margin-bottom: 0; }

.muted { color: var(--slate-500); font-size: 0.875rem; }
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--blue);
  background: var(--blue-light);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 16px;
}

/* ---------- Layout-Hilfen ---------- */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

main { flex: 1; }

.flash-wrap { padding-top: 24px; }

.page { padding: 32px 0 64px; }
.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.page-header .actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Kopfzeile ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--slate-200);
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  max-width: 1120px;
  margin: 0 auto;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--slate-900);
}
.brand:hover { color: var(--slate-900); }
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.02em;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.topbar nav { display: flex; align-items: center; gap: 6px; }
.topbar nav a,
.topbar nav .link-button {
  color: var(--slate-600);
  text-decoration: none;
  background: none;
  border: none;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  transition: background-color .15s ease, color .15s ease;
}
.topbar nav a:hover,
.topbar nav .link-button:hover {
  color: var(--blue);
  background: var(--blue-light);
}
.topbar nav a.nav-cta {
  color: #fff;
  background: var(--blue);
  font-weight: 600;
}
.topbar nav a.nav-cta:hover { background: var(--blue-dark); color: #fff; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--slate-200);
  background: var(--slate-50);
  margin-top: 48px;
}
.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}
.footer-brand { display: flex; align-items: center; gap: 10px; color: var(--slate-600); font-weight: 600; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-links a { color: var(--slate-500); text-decoration: none; font-size: 0.875rem; }
.footer-links a:hover { color: var(--blue); }
.footer-bottom {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px 28px;
  color: var(--slate-400);
  font-size: 0.8rem;
}

/* ---------- Buttons ---------- */
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: var(--blue);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .05s ease;
  margin-top: 12px;
}
button:hover, .button:hover { background: var(--blue-dark); color: #fff; }
button:active, .button:active { transform: translateY(1px); }
button:focus-visible, .button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
button:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }

button.secondary, .button.secondary {
  background: #fff;
  color: var(--slate-700);
  border-color: var(--slate-300);
  box-shadow: none;
}
button.secondary:hover, .button.secondary:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-light);
}

button.danger, .button.danger {
  background: var(--red);
  color: #fff;
}
button.danger:hover, .button.danger:hover { background: #b91c1c; }

.btn-lg { padding: 15px 30px; font-size: 1.05rem; }
.btn-block { width: 100%; }

.inline-form { display: inline; }

/* ---------- Karten ---------- */
.card {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin-bottom: 20px;
}
.card h1:first-child, .card h2:first-child { margin-top: 0; }

/* ---------- Formulare ---------- */
label { display: block; color: var(--slate-600); font-size: 0.875rem; font-weight: 600; margin-top: 16px; margin-bottom: 6px; }
label:first-child { margin-top: 0; }

input, select, textarea {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--slate-300);
  background: #fff;
  color: var(--slate-900);
}
input::placeholder, textarea::placeholder { color: var(--slate-400); }
input:focus, select:focus, textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-light);
  outline: none;
}
textarea { resize: vertical; font-family: inherit; }

.form-section {
  padding: 20px 0;
  border-top: 1px solid var(--slate-200);
}
.form-section:first-of-type { border-top: none; padding-top: 0; }
.form-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 12px;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 18px;
  padding: 14px 16px;
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
}
.checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--blue);
}
.checkbox-row span, .checkbox-row label { color: var(--slate-700); font-size: 0.925rem; font-weight: 400; margin: 0; }

.form-actions { margin-top: 24px; }

/* ---------- Tabellen ---------- */
.table-wrap { overflow-x: auto; margin-top: 12px; border: 1px solid var(--slate-200); border-radius: var(--radius-md); }
table { width: 100%; border-collapse: collapse; }
.table-wrap table { margin-top: 0; border: none; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--slate-200); }
th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--slate-500); background: var(--slate-50); font-weight: 600; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--slate-50); }

/* ---------- Meldungen ---------- */
.flash {
  padding: 13px 16px;
  border-radius: var(--radius-md);
  font-size: 0.925rem;
  margin-bottom: 16px;
  border: 1px solid transparent;
}
.flash:empty { display: none; margin: 0; padding: 0; border: none; }
.flash.success { background: #F0FDF4; color: #15803D; border-color: #BBF7D0; }
.flash.error { background: #FEF2F2; color: #B91C1C; border-color: #FECACA; }

/* ---------- Badges ---------- */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
}
.badge.ok { background: #ECFDF5; color: #15803D; }
.badge.warn { background: #FFFBEB; color: #B45309; }
.badge.danger { background: #FEF2F2; color: #B91C1C; }
.badge.neutral { background: var(--slate-100); color: var(--slate-600); }

/* ---------- Auth-Seiten (Login) ---------- */
.auth-shell {
  min-height: calc(100vh - 300px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 32px;
}
.auth-card h1 { text-align: center; margin-bottom: 6px; }
.auth-card .auth-subtitle { text-align: center; color: var(--slate-500); font-size: 0.9rem; margin-bottom: 20px; }
.auth-card button { width: 100%; }

/* ==========================================================================
   Marketing-Startseite
   ========================================================================== */
.hero {
  background:
    radial-gradient(1100px 480px at 85% -10%, var(--blue-light), transparent),
    linear-gradient(180deg, #fff, var(--slate-50));
  border-bottom: 1px solid var(--slate-200);
  padding: 72px 0 64px;
}
.hero-inner { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.hero-content { max-width: 680px; }
.hero-title {
  font-size: clamp(2.1rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.12;
  color: var(--slate-900);
  margin-bottom: 18px;
}
.hero-title .accent { color: var(--blue); }
.hero-subtitle {
  font-size: 1.15rem;
  color: var(--slate-600);
  max-width: 560px;
  margin-bottom: 28px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 32px; }
.hero-actions button, .hero-actions .button { margin-top: 0; }

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  color: var(--slate-500);
  font-size: 0.875rem;
}
.trust-strip span { display: inline-flex; align-items: center; gap: 8px; }
.trust-strip svg { width: 16px; height: 16px; color: var(--teal); flex-shrink: 0; }

.section { padding: 64px 0; }
.section-alt { background: #fff; border-top: 1px solid var(--slate-200); border-bottom: 1px solid var(--slate-200); }
.section-header { max-width: 640px; margin: 0 auto 40px; text-align: center; }
.section-title { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 10px; }
.section-subtitle { color: var(--slate-600); font-size: 1.05rem; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.feature-card {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .15s ease, transform .15s ease;
}
.feature-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--blue-light);
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.feature-icon svg { width: 22px; height: 22px; }
.feature-card h3 { margin-bottom: 8px; }
.feature-card p { color: var(--slate-600); font-size: 0.925rem; margin-bottom: 0; }

.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.plan-card {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.plan-card.featured {
  border-color: var(--blue);
  box-shadow: var(--shadow-lg);
  position: relative;
}
.plan-card .plan-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--teal);
  background: #ECFDF9;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 12px;
}
.plan-card.featured .plan-tag { color: var(--blue); background: var(--blue-light); }
.plan-card h3 { font-size: 1.25rem; margin-bottom: 8px; }
.plan-card p { color: var(--slate-600); font-size: 0.925rem; }
.plan-card ul { list-style: none; margin: 18px 0 20px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.plan-card ul li { display: flex; align-items: flex-start; gap: 10px; font-size: 0.925rem; color: var(--slate-700); }
.plan-card ul li svg { width: 18px; height: 18px; color: var(--teal); flex-shrink: 0; margin-top: 1px; }

.cta-band {
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  margin: 0 24px;
  max-width: 1072px;
  margin: 0 auto;
  text-align: center;
  color: #fff;
  box-shadow: var(--shadow-lg);
}
.cta-band h2 { color: #fff; font-size: 1.75rem; margin-bottom: 10px; }
.cta-band p { color: #DCE8FB; margin-bottom: 24px; }
.cta-band .button { background: #fff; color: var(--blue-dark); margin-top: 0; }
.cta-band .button:hover { background: var(--slate-100); }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .topbar { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px 20px; }
  .topbar nav { flex-wrap: wrap; }
  .hero { padding: 48px 0 40px; }
  .hero-title { font-size: 2rem; }
  .section { padding: 44px 0; }
  .cta-band { padding: 36px 24px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
