/* ============================================================
   LogoLotse – Auth & Dashboard Styles
   ============================================================ */

/* --- Custom Properties (Design-Tokens) --- */
:root {
  --color-primary:       #2563EB;
  --color-primary-dark:  #1D4ED8;
  --color-primary-light: #EFF6FF;
  --color-success:       #16A34A;
  --color-success-light: #F0FDF4;
  --color-error:         #DC2626;
  --color-error-light:   #FEF2F2;
  --color-warning:       #D97706;
  --color-text:          #111827;
  --color-text-muted:    #6B7280;
  --color-border:        #E5E7EB;
  --color-bg:            #F3F4F6;
  --color-card:          #FFFFFF;
  --color-header:        #1E3A5F;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.12);

  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid #F59E0B;
  outline-offset: 2px;
}

/* --- Container --- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   Auth Pages (Login, Register, etc.)
   ============================================================ */

.auth-body {
  background: var(--color-bg);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-container {
  width: 100%;
  max-width: 460px;
}

.auth-card {
  background: var(--color-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 40px 40px 32px;
}

.auth-card--centered { text-align: center; }

@media (max-width: 480px) {
  .auth-card { padding: 28px 20px 24px; }
}

.auth-logo {
  text-align: center;
  margin-bottom: 28px;
}
.auth-logo img { display: inline-block; }
.logo-text-large {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-header);
  letter-spacing: -0.5px;
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
  text-align: center;
  margin-bottom: 4px;
}

.auth-subtitle {
  color: var(--color-text-muted);
  text-align: center;
  font-size: 0.95rem;
  margin-bottom: 28px;
}

.auth-footer-link {
  text-align: center;
  margin-top: 20px;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* ============================================================
   Form Elements
   ============================================================ */

.form-group {
  margin-bottom: 18px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 400px) {
  .form-row { grid-template-columns: 1fr; }
}

label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 6px;
}

.label-link {
  font-weight: 400;
  font-size: 0.82rem;
  color: var(--color-primary);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"] {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  color: var(--color-text);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}

input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}

input::placeholder { color: #9CA3AF; }

.form-hint {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 4px;
  display: block;
}

.form-legal {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  text-align: center;
  margin-top: 12px;
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  border: 2px solid transparent;
  transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
  text-decoration: none;
  gap: 6px;
  line-height: 1.2;
  -webkit-appearance: none;
  appearance: none;
  -webkit-text-size-adjust: 100%;
}

.btn:hover { text-decoration: none; }

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

.btn-secondary {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-secondary:hover {
  background: var(--color-primary-light);
}

.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,.4);
}
.btn-ghost:hover {
  background: rgba(255,255,255,.15);
}

.btn-full { width: 100%; }

.btn-sm {
  padding: 8px 16px;
  font-size: 0.875rem;
}

/* ============================================================
   Alerts
   ============================================================ */

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 20px;
  border-left: 4px solid;
}

.alert-error {
  background: var(--color-error-light);
  color: #991B1B;
  border-color: var(--color-error);
}

.alert-success {
  background: var(--color-success-light);
  color: #14532D;
  border-color: var(--color-success);
}

/* ============================================================
   Message Page
   ============================================================ */

.message-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  line-height: 1;
}

.message-text {
  color: var(--color-text-muted);
  margin-bottom: 24px;
  font-size: 0.95rem;
}

/* ============================================================
   Dashboard Layout
   ============================================================ */

.dashboard-body {
  background: var(--color-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.dashboard-header {
  background: var(--color-header);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

.dashboard-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo { display: flex; align-items: center; gap: 10px; }
.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
  display: none; /* Fallback-Text, nur sichtbar wenn SVG nicht lädt (via JS) */
}

.dashboard-header__user {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,.85);
  font-size: 0.9rem;
}

.user-greeting {
  font-weight: 500;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .user-greeting { display: none; }
}

.dashboard-main {
  flex: 1;
  padding: 40px 0;
}

.dashboard-footer {
  background: var(--color-header);
  color: rgba(255,255,255,.6);
  padding: 20px 0;
  text-align: center;
  font-size: 0.875rem;
}
.dashboard-footer a { color: rgba(255,255,255,.8); }
.dashboard-footer a:hover { color: #fff; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -64px;
  z-index: 1000;
  background: #fff;
  color: #1E3A5F;
  border: 2px solid #1E3A5F;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-weight: 600;
}

.skip-link:focus {
  top: 10px;
}

/* ============================================================
   Dashboard Welcome
   ============================================================ */

.dashboard-welcome {
  margin-bottom: 40px;
}

.dashboard-welcome h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 6px;
}

.dashboard-welcome p {
  color: var(--color-text-muted);
  font-size: 1rem;
}

/* ============================================================
   Tools Grid
   ============================================================ */

.section-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--color-border);
}

.tools-section { margin-bottom: 40px; }

.tools-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.tools-search {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: min(420px, 100%);
}

.tools-search__label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-text);
}

.tools-search input {
  width: 100%;
  background: #fff;
}

.tools-count {
  font-size: 0.88rem;
  color: var(--color-text-muted);
}

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

/* Vertikale Tool-Karte (Icon + Titel + Beschreibung + Status-Balken) */
.tool-card {
  background: var(--color-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1.5px solid var(--color-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
  text-decoration: none;
  color: inherit;
}

.tool-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  text-decoration: none;
}

.tool-card:focus-visible {
  border-color: #1D4ED8;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .2);
}

.tool-card__body {
  padding: 20px;
  flex: 1;
}

.tool-card__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.tool-card__icon {
  font-size: 1.8rem;
  flex-shrink: 0;
  width: 40px;
  text-align: center;
  line-height: 1;
}

.tool-card__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
}

.tool-card__desc {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.tool-card__status {
  padding: 10px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.01em;
}

.tool-card__status--available {
  background: #D1FAE5;
  color: #065F46;
}

.tool-card__status--soon {
  background: #FEF3C7;
  color: #92400E;
  cursor: default;
}

.tools-empty {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid #E5E7EB;
  background: #fff;
  color: var(--color-text-muted);
}

/* ============================================================
   Info Section
   ============================================================ */

.info-section { margin-top: 8px; }

.info-card {
  background: var(--color-primary-light);
  border: 1.5px solid #BFDBFE;
  border-radius: var(--radius-md);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.info-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--color-header);
}

.info-card p {
  font-size: 0.9rem;
  color: #1E3A5F;
  max-width: 500px;
}

/* Status-Badges (2FA-Sektion) */
.status-active {
  color: var(--color-success);
  font-weight: 600;
}

.status-inactive {
  color: var(--color-text-muted);
}

/* Utility */
.btn-nowrap { white-space: nowrap; }

.dashboard-footer__meta {
  margin-top: 4px;
  font-size: 0.8rem;
  opacity: 0.5;
}

/* ============================================================
   Home / Startseite
   ============================================================ */

.home-body {
  background: #F0F4FF;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.home-header {
  background: #fff;
  border-bottom: 1px solid #E5E7EB;
  padding: 0 24px;
}

.home-header__inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.home-header__nav {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.home-header__nav form {
  margin: 0;
  display: inline-flex;
}

.home-hero__actions .btn,
.home-hero__user .btn,
.home-header__nav .btn {
  -webkit-appearance: none;
  appearance: none;
}

/* Nav-Buttons auf weissem Header-Hintergrund */
.home-header__nav .btn {
  color: #2563EB;
  border-color: #2563EB;
  background: transparent;
}
.home-header__nav .btn:hover {
  background: #EFF6FF;
  text-decoration: none;
}
.home-header__nav .btn-primary {
  background: #2563EB;
  color: #fff;
  border-color: #2563EB;
}
.home-header__nav .btn-primary:hover {
  background: #1D4ED8;
  border-color: #1D4ED8;
}

.home-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
}

.home-hero {
  max-width: 640px;
  text-align: center;
}

.home-hero__logo {
  margin-bottom: 32px;
}

/* Inline-height am img-Tag wäre durch CSP blockiert — daher CSS-Klassen */
.logo-img-sm {
  height: 36px;
  width: auto;
  display: inline-block;
}

.logo-img-hero {
  height: 72px;
  width: auto;
  display: inline-block;
}

.home-hero h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #1B4F72;
  margin-bottom: 16px;
  line-height: 1.2;
}

.home-hero > p {
  font-size: 1.1rem;
  color: #4B5563;
  margin-bottom: 20px;
  line-height: 1.6;
}

.home-highlights {
  list-style: none;
  margin: 0 0 34px;
  padding: 0;
  display: grid;
  gap: 10px;
}

.home-highlights li {
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: #374151;
  font-size: 0.95rem;
  text-align: left;
}

.home-highlights li::before {
  content: "•";
  color: #2563EB;
  font-weight: 700;
  margin-right: 8px;
}

.home-hero__actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.home-hero__beta-note {
  margin-top: 14px;
  font-size: 0.88rem;
  color: #6B7280;
}

.home-hero__user {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #E5E7EB;
  padding: 24px 32px;
  margin-bottom: 32px;
  text-align: left;
}

.home-hero__user p {
  margin: 0 0 16px;
  font-size: 1rem;
  color: #4B5563;
}

.home-footer {
  background: #fff;
  border-top: 1px solid #E5E7EB;
  padding: 16px 24px;
  text-align: center;
  color: #6B7280;
  font-size: 0.875rem;
}

.home-footer a {
  color: #2563EB;
  text-decoration: none;
}
.home-footer a:hover {
  text-decoration: underline;
}

.home-footer__meta {
  margin-top: 4px;
  font-size: 0.8rem;
  color: #9CA3AF;
}

@media (max-width: 480px) {
  .home-header {
    padding: 8px 14px;
  }

  .home-header__inner {
    height: auto;
    min-height: 64px;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 0;
  }

  .home-header__nav {
    width: 100%;
    justify-content: flex-start;
  }

  .home-header__nav .btn {
    min-height: 42px;
  }

  .dashboard-header__inner {
    flex-wrap: wrap;
  }

  .dashboard-header__user {
    width: 100%;
    justify-content: space-between;
  }

  .dashboard-main {
    padding: 28px 0;
  }

  .tools-grid {
    grid-template-columns: 1fr;
  }

  .info-card {
    padding: 20px;
  }

  .home-main {
    padding: 36px 16px;
  }

  .home-hero h1 {
    font-size: 1.65rem;
  }

  .home-hero > p {
    font-size: 1rem;
    margin-bottom: 28px;
  }

  .home-highlights {
    margin-bottom: 24px;
  }

  .home-highlights li {
    font-size: 0.9rem;
    padding: 10px 12px;
  }
}

/* ============================================================
   Legal Pages (Datenschutz, Impressum, Disclaimer)
   ============================================================ */

.legal-body {
  background: #F3F4F6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.legal-header {
  background: #fff;
  padding: 14px 24px;
  border-bottom: 1px solid #E5E7EB;
  position: static;
  top: auto;
  z-index: auto;
  backdrop-filter: none;
}

.legal-header__inner {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.legal-header a.back {
  color: #374151;
  font-size: 0.875rem;
  text-decoration: none;
}

.legal-header a.back:hover {
  color: #1E3A5F;
}

.legal-header .logo-text {
  color: #1E3A5F;
}

.legal-main {
  flex: 1;
  padding: 48px 24px;
}

.legal-content {
  max-width: 800px;
  margin: 0 auto;
  background: #fff;
  border-radius: 12px;
  padding: 40px 48px;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
}

.legal-content h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1E3A5F;
  margin-bottom: 32px;
}

.legal-content h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 10px;
}

.legal-content section + section {
  margin-top: 26px;
  padding-top: 26px;
  border-top: 1px solid #E5E7EB;
}

.legal-content p,
.legal-content address {
  font-style: normal;
  color: #4B5563;
  line-height: 1.7;
  margin-bottom: 12px;
}

.legal-content p:last-child,
.legal-content address:last-child,
.legal-content ul:last-child {
  margin-bottom: 0;
}

.legal-content .lead {
  color: #374151;
  font-size: 1rem;
  margin-bottom: 24px;
}

.legal-content ul {
  color: #4B5563;
  line-height: 1.7;
  margin: 0 0 12px 20px;
}

.legal-content a {
  color: #1D4ED8;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-content a:hover {
  color: #1E3A5F;
}

.legal-logo-image {
  height: 32px;
  width: auto;
  display: inline-block;
}

.legal-logo-text-fallback {
  display: none;
}

.legal-footer {
  background: #1E3A5F;
  color: rgba(255,255,255,0.6);
  padding: 20px 24px;
  text-align: center;
  font-size: 0.875rem;
}

.legal-footer a {
  color: rgba(255,255,255,0.8);
}

.legal-footer a:hover {
  color: #fff;
}

.legal-footer__meta {
  margin-top: 4px;
  font-size: 0.8rem;
  opacity: 0.5;
}

@media (max-width: 600px) {
  .legal-header {
    padding: 12px 16px;
  }

  .legal-header__inner {
    gap: 8px;
  }

  .legal-header a.back {
    width: 100%;
  }

  .legal-content {
    padding: 24px 20px;
  }
}
