/* Gemeinsame Bausteine aller Seiten: Kopf- und Fußzeile (backend/views/header.php, footer.php),
   Filterleiste (form.filters). Handy-Anpassungen: css/mobile.css. */
header.dashboard-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  padding: 10px 12px;
  background: rgba(17, 24, 39, 0.55);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
}

.dashboard-title {
  position: static;
  transform: none;
  text-align: center;
  pointer-events: auto;
}
.dashboard-title h1 { margin: 0; font-size: 34px; line-height: 1; font-weight: 800; letter-spacing: -0.02em; color: #f3f4f6; }
.comp-title { margin-top: 6px; text-align: center; color: #dbeafe; font-size: 16px; font-weight: 600; }

.hamburger {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(31, 42, 54, 0.95);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
  cursor: pointer;
}
.hamburger span { display: block; position: static; width: 22px; height: 2px; background: #fff; border-radius: 2px; }
.hamburger span::before, .hamburger span::after { content: none !important; }

.user-menu {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 8px;
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff !important;
  font-size: 12px;
  text-decoration: none;
  cursor: pointer;
}
.user-chip-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar, .avatar-img { flex: 0 0 20px; width: 20px; height: 20px; border-radius: 999px; }
.avatar { display: inline-flex; align-items: center; justify-content: center; background: #2563eb; color: #fff; font-size: 10px; font-weight: 700; }
.avatar-img { object-fit: cover; }

.user-dropdown {
  position: absolute;
  right: 0;
  top: 36px;
  display: none;
  min-width: 180px;
  z-index: 30;
  background: #fff;
  color: #1f2a36;
  border: 1px solid #e6e9ee;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.user-dropdown.open { display: block; }
.user-dropdown a { display: block; padding: 8px 10px; color: #1f2a36; text-decoration: none; }
.user-dropdown a:hover { background: #f1f3f6; }

/* Filterleiste: <form class="filters"> mit <label>Text <select|input></label>, Knopf, optional <a class="reset">.
   Felder und Knöpfe gleich hoch; auf dem Handy untereinander in voller Breite. */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin: 0 0 16px 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.filters label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #bfdbfe; }
.filters select,
.filters input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) {
  height: var(--control-height, 42px);
  box-sizing: border-box;
  min-width: 180px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.55);
  color: #fff;
  font-size: 14px;
}
.filters option { color: #111827; }
.filters .grow { flex: 1 1 240px; }
.filters .grow input { width: 100%; }
.filters button,
.filters .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--control-height, 42px);
  box-sizing: border-box;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  background: #2563eb;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.filters button:hover, .filters .button:hover { background: #1d4ed8; }
.filters button[disabled] { background: rgba(255, 255, 255, 0.15); color: rgba(255, 255, 255, 0.6); cursor: not-allowed; }
.filters a.reset { color: #bfdbfe; font-size: 13px; align-self: center; }
@media (max-width: 600px) {
  .filters label { flex: 1 1 100%; }
  .filters select,
  .filters input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) { width: 100%; min-width: 0; }
  .filters button, .filters .button { flex: 1 1 100%; }
}

/* Fenster „Zugang per QR-Code“ (backend/views/invite-qr.php) */
.qr-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,.55); z-index: 900; }
.qr-modal { position: fixed; z-index: 901; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(420px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; background: #fff; color: #0f172a; border-radius: 14px; box-shadow: 0 24px 64px rgba(0,0,0,.35); padding: 18px 20px; text-align: center; }
.qr-modal h2 { margin: 0 0 2px 0; font-size: 19px; }
.qr-modal .qr-team { color: #52606d; font-size: 13px; margin: 0 0 10px 0; }
.qr-modal .qr-code svg { width: 240px; height: 240px; }
.qr-modal .qr-steps { text-align: left; font-size: 13px; color: #323f4b; margin: 8px 0; padding-left: 18px; }
.qr-modal .qr-note { font-size: 12px; color: #92400e; background: #fef3c7; border-radius: 8px; padding: 6px 8px; margin: 6px 0; }
.qr-modal .qr-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
@media print {
  body.printing-qr > *:not(#qrModal) { display: none !important; }
  body.printing-qr #qrModal { position: static; transform: none; box-shadow: none; width: auto; max-height: none; }
  body.printing-qr .qr-actions { display: none !important; }
}

/* Fußzeile */
.footer-fixed {
  background: #1f2a36;
}

.footer-fixed {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  color: #fff;
  padding: 10px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
}
.footer-links {
  width: 100%;
  max-width: 1200px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  column-gap: 12px;
  white-space: nowrap;
}
.footer-left {
  visibility: visible;
  display: block;
  opacity: 0.65;
  font-size: 12px;
}
.footer-center {
  text-align: center;
  justify-self: center;
  opacity: 0.85;
}
.footer-center a {
  color: #fff;
  font-weight: 600;
}
.footer-center a:hover { color: #d7e2f1; }
.footer-right {
  display: flex;
  gap: 16px;
  flex-wrap: nowrap;
  justify-self: end;
  justify-content: flex-end;
  text-align: right;
}
.footer-right a {
  color: #fff;
  font-weight: 600;
}
.footer-right a:hover {
  color: #d7e2f1;
}
.footer-links span {
  opacity: 0.85;
}

.footer-left a { color: inherit; }

@media (max-width: 820px) {
  .footer-fixed { padding: 8px 12px; }
  /* schmal: Version und Wikis in einer Zeile, Impressum/Datenschutz darunter – nichts überlappt */
  .footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; }
  .footer-center { order: 2; flex-basis: 100%; font-size: 12px; }
  .footer-left, .footer-right { font-size: 12px; }
  .footer-right { gap: 12px; }
}

@media print {
  header.dashboard-header { display: none !important; }
}
