/* nevolan login theming for Authelia (cli-belege-wolfgang-wagner) - injected same-origin via the
   nginx sidecar. Targets STABLE selectors only: semantic ids (#sign-in-button,
   #username-textfield, #password-textfield, #reset-password-button), stable MUI
   component classes (.MuiOutlinedInput-root), and the authelia.com brand link.
   No inline style/script -> Authelia CSP untouched. */

/* nevolan-CI (design-tokens.md): Aktion = accent-strong #2563EB (AA fuer weissen Text), #3B82F6 nur
   Fokus/Deko; Geist self-hosted same-origin (CSP default-src 'self' blockt data:-Fonts). */
@font-face { font-family:"Geist Variable"; font-style:normal; font-weight:100 900; font-display:swap;
  src:url("/authelia/fonts/geist-latin-wght-normal.woff2") format("woff2"); }
:root { --np-ink:#1B1C20; --np-blue:#3B82F6; --np-blue-d:#2f6fe0; --np-action:#2563EB;
  --np-font:"Geist Variable",system-ui,-apple-system,'Segoe UI',Roboto,Helvetica,Arial,sans-serif; }
body, #root .MuiTypography-root, #root .MuiButtonBase-root, #root .MuiInputBase-root,
#root .MuiFormLabel-root, #root .MuiFormHelperText-root, .MuiMenuItem-root { font-family:var(--np-font) !important; }

/* ---- Split layout: brand panel left, Authelia app pushed into the right half ---- */
@media (min-width: 821px) {
  #root { position:relative; z-index:1; margin-left:42vw; min-height:100vh; }

  #np-brand {
    position:fixed; left:0; top:0; width:42vw; height:100vh; z-index:0;
    background:var(--np-ink);
    display:flex; align-items:center; justify-content:center; overflow:hidden;
  }
  #np-brand .np-logo {
    position:relative; z-index:2;
    width:clamp(120px,16vw,200px); height:auto;
  }
  #np-brand .np-mesh {
    position:absolute; inset:0; z-index:0;
    background-image:radial-gradient(rgba(59,130,246,.5) 1.3px, transparent 1.4px);
    background-size:28px 28px; opacity:.14;
    -webkit-mask-image:radial-gradient(120% 100% at 50% 50%, #000, transparent 70%);
            mask-image:radial-gradient(120% 100% at 50% 50%, #000, transparent 70%);
  }
  #np-brand .np-glow {
    position:absolute; z-index:1; left:50%; top:50%; transform:translate(-50%,-50%);
    width:360px; height:360px; border-radius:50%;
    background:radial-gradient(circle, rgba(59,130,246,.18), transparent 64%);
    filter:blur(10px);
  }
}
@media (max-width: 820px) { #np-brand { display:none; } }

/* ---- Brand the form ---- */
#sign-in-button {
  background-color:var(--np-action) !important;
  border-radius:10px !important;
  text-transform:none !important;
  font-weight:600 !important;
  box-shadow:0 8px 20px -8px rgba(59,130,246,.5) !important;
}
#sign-in-button:hover { background-color:var(--np-blue-d) !important; }

.MuiOutlinedInput-root { border-radius:10px !important; }
.MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline {
  border-color:var(--np-blue) !important;
}

#reset-password-button { color:var(--np-action) !important; }

/* ---- Remove "Powered by Authelia" ---- */
a[href="https://www.authelia.com"] { display:none !important; }

/* ---- Hide Authelia's default portal icon (person silhouette); nevolan logo lives
        in the left brand panel. Stable id. ---- */
#UserSvg { display:none !important; }

/* ---- German-only tenant: Sprachumschalter komplett aus. Das Portal ist per
        localStorage lang.preference=de-DE (nevolan-portal.js, extern wegen CSP) fest auf Deutsch
        gepinnt; der Umschalter ist damit ueberfluessig. `#language-button` = der Ausloeser
        (Globus-Icon + aktuelle Sprache „Deutsch", AppBarItemLanguage.tsx), zusaetzlich die
        Menue-Eintraege ausblenden (belt-and-suspenders). Kein Umschalten mehr moeglich/sichtbar. ---- */
#language-button { display:none !important; }
li[role="menuitem"][id^="language-"] { display:none !important; }

/* ---- Reset-Recovery-Panel: nevolan-portal.js blendet es als Overlay ein, wenn der
        Reset-Token bereits verbraucht/abgelaufen ist (identity/finish -> {status:"KO"}).
        Styles hier (extern, CSP style-src 'self') statt Inline im JS. ---- */
.np-recover-overlay {
  position:fixed; inset:0; z-index:2147483647;
  display:flex; align-items:center; justify-content:center;
  background:#F4F5F7; padding:16px;
  font-family:var(--np-font);
}
.np-recover {
  max-width:460px; width:100%;
  background:#fff; border:1px solid #E7E9EE; border-radius:12px;
  padding:28px 28px 30px;
}
.np-recover-title { font-size:20px; line-height:28px; font-weight:650; color:var(--np-ink); margin-bottom:10px; }
.np-recover-text  { font-size:15px; line-height:23px; color:#383B40; margin-bottom:22px; }
.np-recover-btn {
  display:inline-block; padding:12px 22px;
  background:var(--np-action); color:#fff !important; text-decoration:none;
  border-radius:10px; font-weight:600; font-size:15px;
}
.np-recover-btn:hover { background:var(--np-blue-d); }
