/* === Layout: Main-Container (einheitlich auf allen Seiten) === */
main {
  flex: 1;
  max-width: 960px;        /* wie index.php */
  margin: 0 auto;          /* Top-Abstand kommt jetzt NUR über 'header + main' */
  padding: 0 16px;         /* Rand links/rechts wie auf der Startseite */
  box-sizing: border-box;
}

/* Globaler, einheitlicher Abstand NACH dem Header auf allen Seiten */
header + main {
  margin-top: 30px;
}

/* === Cards === */
.card {
  background: #fff;
  border: none;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 10px 32px rgba(2, 12, 70, .08);
  margin: 0 auto;          /* Abstand steuert jetzt 'header + main' */
  transition: transform .18s ease, box-shadow .18s ease;
  box-sizing: border-box;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .08);
}

/* Größenvarianten für Cards */
.card.small { max-width: 520px; }
.card.large { max-width: 960px; }   /* wie index.php */
.card.wide  { max-width: 1200px; }  /* optional fürs Dashboard o.ä. */

/* Optional: Abstand zwischen mehreren Cards im selben Main */
.card + .card { margin-top: 20px; }

/* === Buttons (Standard) ===
   HINWEIS: Header-Buttons werden in header.css separat gestylt.
   Diese Regeln betreffen Dashboard & übrige Seiten (rein blaue & rote Buttons). */
button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  padding: 12px 18px;
  min-height: 46px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.28); /* Glasrand */

  /* GLAS-GLOW:
     1) Licht-Overlay (halbtransparentes Weiß)
     2) Farbiges, HALBtransparentes Gradient (damit Blur sichtbar ist) */
  background-image:
    linear-gradient(135deg, rgba(255,255,255,.18) 0%, rgba(255,255,255,.10) 100%),
    linear-gradient(90deg, rgba(37,99,235,.85), rgba(29,78,216,.85)); /* #2563eb → #1d4ed8 mit Alpha */
  background-origin: border-box;
  background-clip: padding-box, border-box;

  color: #fff;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;

  /* weicher Außen-/Innen-Glow */
  box-shadow:
    0 4px 12px rgba(29, 78, 216, .25),
    inset 0 1px 0 rgba(255,255,255,.14);

  line-height: 1.2;
  box-sizing: border-box;

  /* WICHTIG für Glassmorphism (Safari + Chrome) */
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);

  transition: transform .12s ease, filter .2s ease, background .3s ease, box-shadow .3s ease;
}

button:hover,
.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow:
    0 6px 16px rgba(29, 78, 216, .30),
    0 0 8px rgba(255,255,255,.20),
    inset 0 1px 0 rgba(255,255,255,.18);
}

button:active,
.btn:active {
  transform: translateY(0);
  filter: brightness(0.98);
}

/* Tastaturfokus – dezent, aber sichtbar */
button:focus-visible,
.btn:focus-visible {
  outline: 2px solid rgba(255,255,255,.55);
  outline-offset: 2px;
}

/* Sekundär-Button (global grau) – im Header NICHT verwenden (dort eigener Glas-Glow) */
.btn.secondary {
  /* Sekundär bewusst ohne farbigen Glas-Glow, neutraler Look */
  background: rgba(100, 116, 139, .85);
  border: none;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.btn.secondary:hover { background: rgba(100, 116, 139, 1); }

/* Danger-Variante – rote Buttons mit Glas-Glow */
.btn.danger {
  border: 1px solid rgba(255,255,255,.26);
  background-image:
    linear-gradient(135deg, rgba(255,255,255,.16) 0%, rgba(255,255,255,.10) 100%),
    linear-gradient(90deg, rgba(220, 38, 38, .88), rgba(185, 28, 28, .88)); /* #dc2626 → #b91c1c mit Alpha */
  box-shadow:
    0 4px 12px rgba(220, 38, 38, .28),
    inset 0 1px 0 rgba(255,255,255,.13);
  color: #fff;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.btn.danger:hover {
  box-shadow:
    0 6px 16px rgba(220, 38, 38, .32),
    0 0 8px rgba(255,255,255,.18),
    inset 0 1px 0 rgba(255,255,255,.16);
}

/* === Actions-Zeile === */
.actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.actions .btn,
.actions button {
  min-width: 160px;
  flex: 1 1 0;
  text-align: center;
}

/* === Vorschau-Box === */
.preview {
  margin-top: 16px;
  padding: 16px;
  background: #f1f5f9;
  border: 1px dashed #93c5fd;
  border-radius: 12px;
  min-height: 56px;
  font-size: 15px;
  line-height: 1.5;
  text-align: left;
}
.preview em { color: #475569; font-size: .9em; }

/* === Fehlermeldungen === */
.err { color: #b00020; }

/* === Listen (Dashboard) === */
.list { list-style: none; padding-left: 0; }
.list li {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .05);
}

/* === iPhone: Actions volle Breite === */
@media (max-width: 700px) {
  .list li > div { display: block !important; width: 100% !important; }
  .list li .actions {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 10px !important;
    width: 100% !important;
  }
  .list li .actions .btn,
  .list li .actions button {
    display: inline-flex;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
    justify-content: center;
    align-items: center;
  }
}
