/* ============================================================
   MIELKE Dokumentenarchiv (FindBird Testzugang), Farben von wirberatenexperten.com
   Navy   #212A68  Kopfzeile, Ueberschriften
   Blau   #7C90F4  Verlauf hell
   Gruen  #6EBA01  Akzent, Buttons (Hover #85C926)
   Text   #444444, Fliesstext #666666, Flaeche #F2F2F2
   Schriften lokal: Montserrat (Ueberschriften), Open Sans (Text)
   ============================================================ */

@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/mielke-static/fonts/open-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("/mielke-static/fonts/open-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 600; font-display: swap; src: url("/mielke-static/fonts/montserrat-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 700; font-display: swap; src: url("/mielke-static/fonts/montserrat-latin-700-normal.woff2") format("woff2"); }

:root,
[data-bs-theme] {
  --pngx-primary: 233, 52%;
  --pngx-primary-lightness: 27%;
  --m-navy: #212a68;
  --m-blau: #7c90f4;
  --m-gruen: #6eba01;
  --m-gruen-hover: #85c926;
  --m-text: #444444;
  --m-grau: #666666;
  --m-hell: #f2f2f2;
  --m-linie: #d9dce8;
}
[data-bs-theme="light"] body,
body:not([data-bs-theme]) {
  --bs-body-color: #444444;
  --bs-body-bg: #f6f6f8;
  --bs-link-color: #212a68;
  --bs-link-hover-color: #6eba01;
}
body { font-family: "Open Sans", Arial, sans-serif !important; }
h1, h2, h3, h4, h5, .h1, .h2, .h3, .h4, .h5, pngx-page-header h1 {
  font-family: Montserrat, "Open Sans", sans-serif !important;
  color: #212a68;
}
.card { border-color: var(--m-linie); border-radius: 6px; }
.btn-primary {
  --bs-btn-bg: #6eba01;
  --bs-btn-border-color: #6eba01;
  --bs-btn-hover-bg: #85c926;
  --bs-btn-hover-border-color: #85c926;
  --bs-btn-active-bg: #5a9a01;
  --bs-btn-active-border-color: #5a9a01;
  --bs-btn-disabled-bg: #9fd25a;
  --bs-btn-disabled-border-color: #9fd25a;
}

/* ---------- Kopfzeile Mielke-Navy mit Logo auf weissem Feld ---------- */
.navbar.bg-primary {
  min-height: 4.2rem;
  background: linear-gradient(100deg, #212a68 0%, #212a68 55%, #3c4a9e 100%) !important;
}
.navbar-brand > *:not(#m-brand) { display: none !important; }
#m-brand {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  border-radius: 6px;
  padding: 6px 12px;
  margin: 6px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
#m-brand img { height: 30px; width: auto; display: block; }

/* ---------- Kleine Suche oben ---------- */
pngx-global-search { flex-grow: 1; }
pngx-global-search form .form-control {
  min-height: 2.9rem !important;
  border-radius: 4px !important;
  background-color: #ffffff !important;
  border: 1px solid transparent !important;
  padding-left: 2.6rem !important;
  font-size: 1.05rem !important;
}
pngx-global-search form .form-control > input { color: #444444 !important; }
pngx-global-search form > i-bs[name="search"] { color: #666666 !important; left: 1rem !important; top: 0.95rem !important; z-index: 5; }
pngx-global-search .input-group .btn {
  border-radius: 4px !important;
  margin-left: 0.5rem !important;
  background-color: #6eba01 !important;
  border-color: #6eba01 !important;
  color: #ffffff !important;
  font-weight: 600;
}
body.m-dash pngx-global-search { visibility: hidden; pointer-events: none; }

/* ---------- Grosse Suche auf der Startseite ---------- */
#m-hero {
  margin: 0.5rem 0 2rem 0;
  padding: 2.4rem 2.2rem 2rem;
  border-radius: 6px;
  background: linear-gradient(160deg, rgba(33, 42, 104, 0.99) 0%, rgba(33, 42, 104, 0.92) 45%, rgba(124, 144, 244, 0.85) 100%);
  border-top: 4px solid #6eba01;
  color: #fff;
  box-shadow: 0 10px 30px rgba(33, 42, 104, 0.22);
}
#m-hero h2 {
  font-family: Montserrat, sans-serif !important;
  font-size: 1.7rem;
  font-weight: 700;
  margin: 0 0 1.3rem 0;
  color: #fff !important;
}
#m-hero form { display: flex; gap: 0.6rem; flex-wrap: wrap; }
#m-hero .m-input {
  flex: 1 1 22rem;
  min-height: 3.4rem;
  font-size: 1.15rem;
  padding: 0 1.2rem;
  border-radius: 4px;
  border: none;
  outline: none;
  color: #444444;
  background: #fff;
}
#m-hero .m-input:focus { box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3); }
#m-hero .m-cat {
  flex: 0 1 15rem;
  min-height: 3.4rem;
  font-size: 1rem;
  padding: 0 1rem;
  border-radius: 4px;
  border: none;
  color: #212a68;
  background: #e8ebfb;
  cursor: pointer;
}
#m-hero .m-btn {
  flex: 0 0 auto;
  min-height: 3.4rem;
  padding: 0 2rem;
  font-family: Montserrat, sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: 4px;
  border: none;
  color: #ffffff;
  background: #6eba01;
  cursor: pointer;
}
#m-hero .m-btn:hover { background: #85c926; }
#m-hero .m-hint { margin-top: 0.9rem; font-size: 0.9rem; color: #d7ddfb; }
@media (max-width: 576px) {
  #m-hero { padding: 1.4rem 1rem; }
  #m-hero .m-cat, #m-hero .m-btn { flex: 1 1 100%; }
}

/* ---------- Verwaltung nur ueber das Zahnrad ---------- */
#sidebarMenu .nav-group.m-admin { display: none !important; }
body.m-admin-open #sidebarMenu .nav-group.m-admin { display: block !important; }
#sidebarMenu .nav-link.active { color: #212a68 !important; background: #e8ebfb !important; border-radius: 4px; }
#m-gear { color: #fff; opacity: 0.85; border-radius: 999px !important; }
#m-gear:hover, #m-gear.active { opacity: 1; background: rgba(255, 255, 255, 0.15); }

/* ============================================================
   Anmeldeseite nach Vorlage: Verlauf oben, weisse Karte mit gruener Oberkante
   ============================================================ */
html:not(.m-auth-ready) body.text-center > .position-absolute { opacity: 0; animation: m-show 0s 1.5s forwards; }
@keyframes m-show { to { opacity: 1; } }

body:has(#m-auth) {
  margin: 0;
  text-align: left;
  background: #f2f2f2;
  font-family: "Open Sans", Arial, sans-serif;
  color: #444444;
}
#m-auth { min-height: 100vh; display: flex; flex-direction: column; text-align: left !important; }
.m-kopf {
  background: linear-gradient(160deg, rgba(33, 42, 104, 0.99) 0%, rgba(33, 42, 104, 0.92) 45%, rgba(124, 144, 244, 0.75) 100%);
  color: #fff;
  padding: 56px 24px 120px;
  text-align: center;
}
.m-kopf h1 { font-family: Montserrat, sans-serif !important; font-weight: 700; font-size: 30px; margin: 0 0 8px; color: #fff !important; }
.m-kopf p { margin: 0; opacity: 0.85; font-size: 15px; }
.m-karte {
  background: #fff;
  width: min(420px, calc(100% - 32px));
  margin: -88px auto 0;
  border-radius: 6px;
  box-shadow: 0 12px 34px rgba(33, 42, 104, 0.18);
  padding: 34px 34px 28px;
  border-top: 4px solid #6eba01;
}
.m-logo { display: block; margin: 0 auto 22px; max-width: 220px; height: auto; }
#m-auth .form-accounts { max-width: none; width: 100%; padding: 0; margin: 0; }
#m-auth .m-feld { margin: 0 0 16px; }
#m-auth .m-feld label { display: block; font-size: 13px; font-weight: 600; color: #212a68; margin: 0 0 6px; }
#m-auth .form-control {
  height: 46px;
  border: 1px solid #ccd0e0;
  border-radius: 4px !important;
  font-size: 15px;
  padding: 0 12px;
  box-shadow: none;
  background: #fff;
}
#m-auth .form-control:focus { border-color: #212a68; box-shadow: none; }
#m-auth .d-grid { margin-top: 4px !important; }
#m-auth .btn-primary {
  height: 48px;
  border-radius: 4px;
  font-family: Montserrat, sans-serif;
  font-weight: 600;
  font-size: 15px;
  background-color: #6eba01 !important;
  border-color: #6eba01 !important;
}
#m-auth .btn-primary:hover { background-color: #85c926 !important; border-color: #85c926 !important; }
#m-auth .alert { border-radius: 4px; text-align: left; font-size: 14px; }
#m-auth a { color: #212a68; font-weight: 600; text-decoration: none; }
.m-hinweis { font-size: 12.5px; color: #666666; text-align: center; margin-top: 18px; line-height: 1.5; }
.m-lead { font-size: 14px; color: #666666; margin: 0 0 16px; }
.m-fuss { margin-top: auto; padding: 22px 16px; text-align: center; font-size: 12px; color: #666666; }
.m-bird { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 11.5px; color: #999; }
.m-bird b { font-family: Montserrat, sans-serif; font-weight: 700; }
.m-bird .f { color: #0e8c7e; }
.m-bird .b { color: #1a2440; }
