/* ============================================================================
   BE:KI Module – Wiederverwendbare CSS-Vorlage
   ============================================================================
   Single-File-Drop-in für neue BE:KI-Module. Enthält:
   - Design-Tokens (Farben, Spacing, Radii, Schatten, Schrift)
   - Layout-Skelett (Sidebar + Main-Wrap + Header + Footer)
   - Sidebar (Brand + Nav + Bottom)
   - Header (Menü-Button + Login-Dropdown + Title/Breadcrumb + Institut-Logo)
   - Footer
   - Vor-Login-Hero (Style-Guide §6 konform)
   - UI-Bausteine: Buttons, Inputs, Cards, Badges, Tier-Chips, Modals
   - Responsive Breakpoints

   Quellen / Normen:
   - Style-Guide: C:\Users\marcu\beki\BEKI_STYLE_GUIDE.md (Hero ist verbindlich)
   - Vorbild Hero: beki-base/app.css (Norm)
   - In-App-Patterns: beki-suite/beki-suite.css (Buttons, Modals, Tier-Chips)

   Bei neuem Modul:
     <link rel="stylesheet" href="beki-module.css">
     Module-spezifische Optik in eigener CSS danach laden, NICHT hier ändern.

   Vorbild-HTML-Skelett:
     <body>
       <aside id="sidebar-wrap">
         <div id="sidebar-brand">
           <img id="sidebar-logo" src="..." alt="...">
           <div id="sidebar-tagline">...</div>
         </div>
         <nav id="sidebar-nav">...</nav>
         <div id="sidebar-bottom">...</div>
       </aside>
       <div id="main-wrap">
         <header id="suite-header">
           <button id="menu-btn" onclick="toggleSidebar()">SVG-Hamburger</button>
           <div id="login-wrap">
             <button id="login-btn">...</button>
             <div id="login-panel">...</div>
           </div>
           <div id="header-breadcrumb">...</div>
           <div id="header-right">
             <img id="header-institut" src="...">
           </div>
         </header>
         <main id="main"><!-- Inhalt --></main>
         <div id="app-footer">...</div>
       </div>
     </body>

   JS-Pflicht für Sidebar-Toggle:
     function toggleSidebar(){ document.body.classList.toggle('sidebar-collapsed'); }
   ============================================================================ */


/* ----------------------------------------------------------------------------
   1. DESIGN-TOKENS
   Norm aus Style-Guide §1. NICHT pro Modul überschreiben (höchstens ergänzen).
   ---------------------------------------------------------------------------- */
:root {
  /* Primärfarben */
  --navy:       #1648a6;
  --navy-d:     #0f3683;
  --teal:       #23b5a0;
  --teal-d:     #1c9583;
  --sky:        #15a7ce;

  /* Neutrale */
  --bg:         #f3f5f9;
  --line:       #e1e6ee;
  --text:       #1a2740;
  --muted:      #6b7a8d;
  --soft:       #f4f7fb;     /* leichter Hintergrund für Hover/Soft-Bereiche */

  /* Sidebar-Gradient (Hero-Norm) */
  --sidebar-stop-1: #0d2557;
  --sidebar-stop-2: #1648a6;
  --sidebar-stop-3: #1a7a6a;

  /* Hero-Background (5-Layer) */
  --hero-bg:
    radial-gradient(ellipse at 20% 50%, rgba(22, 72, 166, .22) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(13, 74, 107, .26) 0%, transparent 55%),
    radial-gradient(ellipse at 60% 80%, rgba(35, 181, 160, .18) 0%, transparent 50%),
    linear-gradient(to right, transparent 0%, rgba(5, 10, 20, .4) 100%),
    linear-gradient(to bottom, #0d2347 0%, #1648a6 55%, #1a7a6a 100%);

  /* Radii */
  --radius:     14px;     /* Standard-Card-Radius */
  --radius-sm:  10px;     /* Inputs, kleine Buttons */
  --radius-pill: 22px;    /* Login-Pille, Tier-Chips */

  /* Schatten */
  --sh-sidebar: 3px 0 18px rgba(13, 35, 71, .26);
  --sh-header:  0 2px 16px rgba(22, 72, 166, .10);
  --sh-card:    0 10px 28px rgba(30, 61, 115, .08);
  --sh-card-h:  0 14px 36px rgba(30, 61, 115, .14);   /* Hover-Variante */
  --sh-panel:   0 8px 40px rgba(0, 0, 0, .18), 0 1px 0 rgba(255, 255, 255, .4) inset;
  --sh-pill:    0 2px 8px rgba(22, 72, 166, .15);

  /* Schrift */
  --font:       "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

  /* Schriftgrößen */
  --fs-xxs:     9.5px;
  --fs-xs:      10px;
  --fs-sm:      11.5px;
  --fs-base:    13px;
  --fs-md:      13.5px;
  --fs-lg:      14px;
  --fs-xl:      16px;
  --fs-2xl:     20px;
  --fs-3xl:     24px;

  /* Layout-Maße (Style-Guide §3+§4) */
  --sidebar-w:  232px;
  --header-h:   58px;

  /* Z-Indizes */
  --z-header:   5;
  --z-sidebar:  10;        /* > Header, damit Box-Shadow nicht hinter Header verschwindet */
  --z-overlay:  99;
  --z-modal:    100;
  --z-panel:    200;
  --z-toast:    300;
  --z-login-screen: 10000;
}


/* ----------------------------------------------------------------------------
   2. RESET & BASE
   ---------------------------------------------------------------------------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100vh; }

body {
  overflow: hidden;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  display: flex !important;            /* horizontal: Sidebar + Main-Wrap */
  flex-direction: row !important;
}

button, input, textarea, select { font: inherit; }

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Schlanke Scrollbars (WebKit) */
::-webkit-scrollbar              { width: 6px; height: 6px; }
::-webkit-scrollbar-track        { background: #f0f4f8; }
::-webkit-scrollbar-thumb        { background: #c8d0dc; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover  { background: #a8b3c4; }


/* ----------------------------------------------------------------------------
   3. ANIMATIONS
   ---------------------------------------------------------------------------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin   { to   { transform: rotate(360deg); } }

.fade-up { animation: fadeUp .4s ease forwards; }
.fade-in { animation: fadeIn .3s ease forwards; }


/* ----------------------------------------------------------------------------
   4. SIDEBAR (Style-Guide §3)
   ---------------------------------------------------------------------------- */
#sidebar-wrap {
  width: var(--sidebar-w);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: linear-gradient(160deg, var(--sidebar-stop-1) 0%, var(--sidebar-stop-2) 58%, var(--sidebar-stop-3) 100%);
  box-shadow: var(--sh-sidebar);
  position: relative;
  z-index: var(--z-sidebar);
  overflow: hidden;
  transition: width .25s ease;
}

/* Suite-Stil verwendet alternativ #sidebar (ohne -wrap). Wir akzeptieren beide. */
#sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: linear-gradient(160deg, var(--sidebar-stop-1) 0%, var(--sidebar-stop-2) 58%, var(--sidebar-stop-3) 100%);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  transition: width .25s ease;
  box-shadow: var(--sh-sidebar);
  position: relative;
  z-index: var(--z-sidebar);
}

body.sidebar-collapsed #sidebar-wrap,
body.sidebar-collapsed #sidebar { width: 0; overflow: hidden; }

/* Brand (weiß, oben) */
#sidebar-brand {
  background: #fff;
  padding: 18px 14px 14px;
  border-bottom: 1px solid rgba(0, 0, 0, .08);
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

#sidebar-logo {
  height: 96px;
  max-width: 200px;
  object-fit: contain;
  /* PFLICHT: PNG-Asset RGBA mit echtem Alphakanal. Kein mix-blend-mode setzen,
     außer das Asset ist RGB-only und der weiße Brand-Hintergrund verlangt es. */
}

#sidebar-tagline {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: #3a6b8a;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-top: 8px;
  line-height: 1.5;
}

/* Nav-Bereich */
#sidebar-nav { flex: 1; padding: 6px 0 10px; overflow-y: auto; overflow-x: hidden; min-height: 0; }

.nav-sec        { padding: 2px 0 4px; }
.nav-sec-label  {
  padding: 12px 16px 4px;
  font-size: var(--fs-xxs);
  font-weight: 700;
  color: rgba(255, 255, 255, .55);
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-item {
  width: 100%;
  background: none;
  border: none;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  color: rgba(255, 255, 255, .72);
  font-size: var(--fs-base);
  font-weight: 600;
  font-family: inherit;
  text-align: left;
  transition: background .15s, color .15s, border-left-color .15s;
  border-left: 3px solid transparent;
  white-space: nowrap;
}
.nav-item:hover {
  background: rgba(255, 255, 255, .10);
  color: #fff;
  border-left-color: rgba(122, 220, 176, .55);
}
.nav-item-active,
.nav-item.active {
  background: rgba(255, 255, 255, .14);
  color: #fff;
  border-left-color: rgba(122, 220, 176, .80);
}

/* Vor-Login: gesperrte Items */
.nav-locked {
  opacity: .42;
  cursor: default;
  pointer-events: none;
}
.nav-lock {
  margin-left: auto;
  font-size: 11px;
  opacity: .8;
}

/* Statische Anker-Sektion am Anfang (Vor-Login: Dashboard, Persönlich, Chat) */
.nav-static {
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.nav-lbl    { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.nav-extra  { font-size: var(--fs-xs); flex-shrink: 0; }

/* Buchstaben-Fallback-Icons im HTML, im Vor-Login unsichtbar */
.nav-ic-fb  { display: none; }

/* Sidebar-Bottom (Logout-Bereich) */
#sidebar-bottom { padding: 10px 12px 14px; flex-shrink: 0; }
.sidebar-btn {
  width: 100%;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 9px;
  color: rgba(255, 255, 255, .75);
  padding: 8px 13px;
  font-size: 12.5px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background .15s, color .15s;
}
.sidebar-btn:hover { background: rgba(255, 255, 255, .14); color: #fff; }


/* ----------------------------------------------------------------------------
   5. MAIN-WRAP
   ---------------------------------------------------------------------------- */
#main-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}


/* ----------------------------------------------------------------------------
   6. HEADER (Style-Guide §4)
   58 px schlank, weiß, Border-Bottom Navy, Box-Shadow Navy-Tint
   ---------------------------------------------------------------------------- */
#suite-header {
  background: #fff;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 0 22px;
  gap: 12px;
  height: var(--header-h);
  border-bottom: 3px solid var(--navy);
  box-shadow: var(--sh-header);
  position: relative;
  z-index: var(--z-header);
}

/* Alternative ID #app-header — gleiche Optik */
#app-header { /* selbe Specs */
  background: #fff;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 0 22px;
  gap: 12px;
  height: var(--header-h);
  border-bottom: 3px solid var(--navy);
  box-shadow: var(--sh-header);
  position: sticky;
  top: 0;
  z-index: var(--z-header);
}

/* Hamburger-Button (immer ganz links, vor Login) */
#menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4b5a6e;
  flex-shrink: 0;
  transition: background .15s;
}
#menu-btn:hover { background: var(--bg); }

/* Login-Wrap (Container für Pille + Dropdown) */
#login-wrap { position: relative; flex-shrink: 0; }

#login-btn {
  background: linear-gradient(135deg, var(--navy), var(--teal-d));
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  padding: 7px 14px 7px 12px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  transition: opacity .15s, filter .15s, transform .05s;
  box-shadow: var(--sh-pill);
}
#login-btn:hover  { filter: brightness(1.08); }
#login-btn:active { transform: scale(.98); }

/* Login-Panel (Dropdown 280 px) */
#login-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 280px;
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--sh-panel);
  z-index: var(--z-panel);
  overflow: hidden;
  color: var(--text);
}

.lp-block        { padding: 12px 18px; }
.lp-sep          { height: 1px; background: #f0f4f8; }
.lp-label        {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 7px;
}

/* Profil-Bereich im Panel (eingeloggt) */
.lp-profile      { display: flex; align-items: center; gap: 11px; padding: 16px 18px 14px; }
.lp-av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--navy), var(--teal));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  background-size: cover;
  background-position: center;
}
.lp-name         { font-size: 13.5px; font-weight: 800; color: var(--text); }
.lp-org          { font-size: 11px; color: #9ba8bb; margin-top: 1px; line-height: 1.4; }

/* Navi-Button im Panel (z. B. "Paket anfragen →") */
.lp-nav-btn {
  width: 100%;
  background: none;
  border: 1.5px solid #dde3ec;
  border-radius: 9px;
  padding: 8px 12px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: background .15s, border-color .15s;
}
.lp-nav-btn:hover { background: var(--soft); border-color: var(--navy); }

/* Footer-Block im Panel (Logout) */
.lp-footer-block { padding: 10px 18px 14px; background: #f8fafc; }
.lp-login-main {
  width: 100%;
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: 9px;
  padding: 9px 14px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s;
}
.lp-login-main:hover { background: #2a4f8f; }

/* Tier-Anzeige im Panel (optional, wenn Pricing-Flow vorhanden) */
.lp-tier-row     { display: flex; align-items: center; gap: 9px; }
.lp-extras       { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.lp-hint         { font-size: 10px; color: #b0bbc9; text-align: center; margin-top: 7px; }

/* Header-Title (Shape-Stil) ODER Breadcrumb (Suite/Base-Stil) — beide werden gestützt */
#header-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  flex: 1;
  margin-left: 6px;
}

#header-breadcrumb,
#breadcrumb {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #4b5a6e;
  margin-left: 6px;
  min-width: 0;
}
.bc-root,
.bc-active,
#bc-page  { color: var(--navy); font-weight: 700; cursor: pointer; }
.bc-sep,
#bc-sep   { color: #9ba8bb; }
.bc-hidden { display: none !important; }

/* Header-Right (Institut-Logo + ggf. User-Chip) */
#header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* BE:KI-Institut-Logo (rund oder rechteckig je Asset). 42 px Höhe Norm. */
#header-institut {
  height: 42px;
  object-fit: contain;
  opacity: .95;
  mix-blend-mode: multiply;   /* RGB-Logo-Fallback. Bei RGBA-PNG mit Alpha entfernen. */
  flex-shrink: 0;
}

/* User-Chip (Suite-Stil, optional) */
#user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--soft);
  border-radius: 20px;
  padding: 5px 12px 5px 5px;
}
#user-av {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy), var(--teal));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  font-weight: 800;
  flex-shrink: 0;
}
#user-nm { font-size: 12.5px; font-weight: 600; color: #4b5a6e; white-space: nowrap; }


/* ----------------------------------------------------------------------------
   7. MAIN-CONTENT
   ---------------------------------------------------------------------------- */
#main,
#main-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
}

/* Vor-Login: Hero darf den main-Padding aufheben */
#main-wrap.landing-mode #main,
#main-wrap.landing-mode #main-content { padding: 0; }


/* ----------------------------------------------------------------------------
   8. FOOTER (Style-Guide §5)
   ~30 px hoch, weiß, Border-Top hellgrau
   ---------------------------------------------------------------------------- */
#app-footer {
  background: #fff;
  border-top: 1px solid #dde3ec;
  padding: 7px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
  font-size: 11.5px;
  color: #9ba8bb;
}
.footer-copy        { font-size: 11.5px; color: #9ba8bb; font-weight: 500; }
.footer-copy strong { color: #6b7a8d; }
.footer-copy a      { color: inherit; text-decoration: none; }
.footer-copy a:hover{ text-decoration: underline; }
.footer-version     { font-size: 11px; color: #c8d0dc; }


/* ----------------------------------------------------------------------------
   9. HERO / LANDING (Style-Guide §6)
   Vor-Login. Padding 60 24 28, Hintergrund 5-Layer-Verlauf
   ---------------------------------------------------------------------------- */
.hero-page,
.hero,
.hero-full {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 60px 24px 28px;
  /* WICHTIG: Margin überschreibt main-Padding in ALLE 4 Richtungen, sonst
     weißer Streifen oben/unten/seitlich. Werte je nach main-Padding anpassen
     (Standard: -24 -28 hier, da #main padding 24 28 hat). */
  margin: -24px -28px;
  overflow-y: auto;
  background: var(--hero-bg);
  position: relative;
}

.hero-inner,
.hero-content {
  max-width: 920px;
  width: 100%;
  text-align: center;
}

/* Logo im Hero (Asset RGBA, eng beschnitten, Alpha-Schwelle ≥ 16) */
.hero-logo {
  margin: 0 auto 38px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-logo img {
  width: min(720px, 96%);
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 6px 24px rgba(0, 0, 0, .3));
}

/* Headline */
.hero-headline,
.hero h1 {
  font-size: clamp(1.4rem, 3.2vw, 2rem);
  font-weight: 800;
  color: #f1f5f9;
  line-height: 1.2;
  letter-spacing: -.01em;
  margin: 0 0 14px;
}

/* Subtitle / Lead */
.hero-sub,
.hero-lead {
  font-size: .98rem;
  color: #cdd6e3;
  line-height: 1.65;
  max-width: 580px;
  margin: 0 auto 22px;
}

/* Module-Cards im Hero (4er-Grid) */
.hero-modules {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 18px;
}
.hero-module {
  background: rgba(255, 255, 255, .07);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 12px;
  padding: 14px 12px 16px;
  text-align: center;
  transition: transform .15s, border-color .15s;
  cursor: pointer;
}
.hero-module:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, .26); }
.hero-module-icon  { font-size: 22px; line-height: 1; margin-bottom: 6px; }
.hero-module-name  { font-size: 13.5px; font-weight: 800; color: #f1f5f9; }
.hero-module-desc  { font-size: 11.5px; color: #94a3b8; line-height: 1.45; margin-top: 4px; }

/* Primärer CTA */
.btn-hero-primary {
  background: linear-gradient(135deg, var(--sky), var(--navy));
  color: #fff;
  border: none;
  padding: 18px 44px;
  font-size: 1.18rem;
  font-weight: 700;
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(22, 72, 166, .5);
  letter-spacing: .01em;
  cursor: pointer;
  font-family: inherit;
  transition: transform .15s, filter .15s;
}
.btn-hero-primary:hover { transform: translateY(-1px); filter: brightness(1.06); }

/* Footnote (dezent, z. B. KI-Hinweis) */
.hero-footnote {
  font-size: 11.5px;
  color: rgba(255, 255, 255, .45);
  letter-spacing: .04em;
  margin-top: 18px;
}


/* ----------------------------------------------------------------------------
  10. CARDS
   ---------------------------------------------------------------------------- */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--sh-card);
}
.card h3 {
  margin: 0 0 8px;
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--text);
}
.card .sub      { color: var(--muted); font-size: 12px; line-height: 1.55; }
.card .big-num  { font-size: 28px; font-weight: 800; color: var(--navy); }
.card .big-num.good { color: var(--teal-d); }
.card .big-num.warn { color: #c0392b; }

/* Card-Akzent (oberer Rand mit Brand-Verlauf) */
.card.accent {
  border-top: 3px solid transparent;
  background: linear-gradient(#fff, #fff) padding-box,
              linear-gradient(135deg, var(--navy), var(--teal)) border-box;
  border: 1px solid transparent;
}


/* ----------------------------------------------------------------------------
  11. BUTTONS
   ---------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: var(--fs-base);
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, transform .05s;
  font-family: inherit;
}
.btn:hover  { background: var(--bg); }
.btn:active { transform: scale(.98); }

.btn-primary {
  background: linear-gradient(135deg, var(--navy), var(--teal-d));
  color: #fff;
  border: none;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(22, 72, 166, .22);
}
.btn-primary:hover { filter: brightness(1.06); }

.btn-navy {
  background: var(--navy);
  color: #fff;
  border: none;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 11px;
}
.btn-navy:hover { background: #2a4f8f; }

.btn-ghost {
  background: #fff;
  color: var(--muted);
  border: 1.5px solid #dde3ec;
  padding: 11px 22px;
  border-radius: 11px;
  font-weight: 600;
}
.btn-ghost:hover { border-color: var(--navy); color: var(--navy); }

.ghost-btn {
  border: 1px solid #9eb8d8;
  background: #edf2fa;
  color: #1e3d73;
  padding: 9px 14px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
}
.ghost-btn:hover { background: #dce8f5; border-color: #6a95c0; }

.mini-btn {
  border: 1px solid #ccd7e5;
  background: #fff;
  color: #405165;
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
}
.mini-btn:hover { background: #f0f4f8; }

.button-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }


/* ----------------------------------------------------------------------------
  12. INPUTS / FORMS
   ---------------------------------------------------------------------------- */
.text-inp,
.input,
.select,
.textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #dde3ec;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 13px;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  box-sizing: border-box;
}
.text-inp:focus,
.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(35, 181, 160, .14);
}

.textarea { min-height: 108px; resize: vertical; }

label.field,
.inp-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #526275;
  margin-bottom: 6px;
}


/* ----------------------------------------------------------------------------
  13. BADGES & TIER-CHIPS
   ---------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(30, 199, 196, .14);
  color: #0c8c89;
  font-size: 11px;
  font-weight: 700;
}
.badge.coral   { background: rgba(255, 90, 60, .12);  color: #c84a2c; }
.badge.sun     { background: rgba(255, 201, 60, .18); color: #b88410; }
.badge.leaf    { background: rgba(95, 194, 79, .14);  color: #3c8a31; }
.badge.aqua    { background: rgba(30, 199, 196, .14); color: #0c8c89; }
.badge.magenta { background: rgba(232, 62, 140, .12); color: #c52c70; }
.badge.navy    { background: rgba(22, 72, 166, .12);  color: var(--navy); }

/* Tier-Chip (für Pricing-/Abo-Anzeige) */
.tier-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 13px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  flex-shrink: 0;
}
.tier-base          { background: #dbe6f9; color: #1e3d73; }
.tier-pro           { background: #dce8f8; color: #2d5a9e; }
.tier-complete      { background: #d1f0e4; color: #1e6b3a; }
.tier-complete_plus { background: #fde8d0; color: #b45309; }


/* ----------------------------------------------------------------------------
  14. MODALS
   ---------------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 45, .78);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  backdrop-filter: blur(8px);
}
.modal-box {
  background: #fff;
  border-radius: 20px;
  padding: 34px 30px;
  width: 90%;
  max-width: 480px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .3);
  animation: fadeUp .25s ease;
  position: relative;
}
.modal-box.wide { max-width: 660px; }

.modal-close-btn {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  cursor: pointer;
  color: #9ba8bb;
  font-size: 22px;
  line-height: 1;
  padding: 4px;
  transition: color .15s;
}
.modal-close-btn:hover { color: var(--navy); }

.modal-kicker {
  font-size: 10.5px;
  font-weight: 700;
  color: #9ba8bb;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 7px;
}
.modal-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 12px;
}
.modal-body {
  font-size: 13.5px;
  color: #4b5a6e;
  line-height: 1.7;
  margin-bottom: 22px;
}
.modal-error {
  font-size: 12px;
  color: #c0392b;
  background: rgba(255, 90, 60, .08);
  border: 1px solid rgba(255, 90, 60, .25);
  padding: 7px 10px;
  border-radius: 8px;
  margin-bottom: 10px;
}


/* ----------------------------------------------------------------------------
  15. LOGIN-SCREEN (separater Vollbild-Login, Suite-Pattern)
   Nur für Module mit dedizierter Login-Seite (statt Hero+Dropdown).
   ---------------------------------------------------------------------------- */
#login-screen {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #0d2347 0%, var(--navy) 60%, #1a5c4a 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: var(--z-login-screen);
}
#login-screen.ls-hidden { display: none; }

.ls-card {
  background: #fff;
  border-radius: 20px;
  padding: 40px 36px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, .45);
  animation: fadeUp .3s ease;
}
.ls-logo {
  height: 64px;
  display: block;
  margin: 0 auto 22px;
  object-fit: contain;
}
.ls-title { font-size: 22px; font-weight: 800; color: var(--navy); text-align: center; margin-bottom: 4px; }
.ls-sub   { font-size: 12px; color: #64748b; text-align: center; margin-bottom: 28px; }
.ls-form  { display: flex; flex-direction: column; gap: 16px; margin-bottom: 20px; }
.ls-footer{ color: rgba(255, 255, 255, .35); font-size: 11px; margin-top: 24px; text-align: center; }


/* ----------------------------------------------------------------------------
  16. HILFSKLASSEN
   ---------------------------------------------------------------------------- */
.hidden          { display: none !important; }
.sr-only         {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.flex            { display: flex; }
.flex-col        { display: flex; flex-direction: column; }
.flex-center     { display: flex; align-items: center; justify-content: center; }
.flex-between    { display: flex; align-items: center; justify-content: space-between; }
.gap-4          { gap: 4px; }
.gap-8          { gap: 8px; }
.gap-12         { gap: 12px; }
.gap-16         { gap: 16px; }
.mt-8           { margin-top: 8px; }
.mt-16          { margin-top: 16px; }
.mt-24          { margin-top: 24px; }
.mb-8           { margin-bottom: 8px; }
.mb-16          { margin-bottom: 16px; }
.text-muted     { color: var(--muted); }
.text-center    { text-align: center; }
.full-width     { width: 100%; }


/* ----------------------------------------------------------------------------
  17. RESPONSIVE BREAKPOINTS
   ---------------------------------------------------------------------------- */

/* Desktop-Tablet (<= 1200): leichte Anpassungen, Grid kleiner */
@media (max-width: 1200px) {
  .hero-modules { grid-template-columns: repeat(2, 1fr); }
}

/* Tablet (<= 1024): Sidebar als Overlay */
@media (max-width: 1024px) {
  #sidebar-wrap,
  #sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: var(--z-overlay);
  }
  body:not(.sidebar-collapsed)::after {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 98;
    cursor: pointer;
  }
  .nav-item    { padding: 10px 14px; }
  .sidebar-btn { padding: 10px 18px; }
}

/* Mobile (<= 720): Header-Login schmaler, Padding kleiner */
@media (max-width: 720px) {
  #suite-header,
  #app-header           { padding: 0 14px; }
  #main, #main-content  { padding: 16px 14px; }
  .hero-page,
  .hero,
  .hero-full            {
    padding: 48px 16px 24px;
    margin: -16px -14px;
  }
  #login-panel          { width: 92vw; left: -8px; }
  #header-institut      { height: 32px; }
  #app-footer           { flex-direction: column; gap: 4px; padding: 8px 14px; text-align: center; }
  .hero-modules         { grid-template-columns: 1fr; }
}

/* Mobile-klein (<= 480): Hero kompakter */
@media (max-width: 480px) {
  .hero-logo img        { width: min(420px, 92%); }
  .hero-headline        { font-size: 1.3rem; }
  .btn-hero-primary     { padding: 14px 28px; font-size: 1rem; }
}


/* ============================================================================
   ENDE beki-module.css
   Bei Änderungen: zuerst BEKI_STYLE_GUIDE.md aktualisieren, dann hier nachziehen
   und alle vier Hauptanwendungen synchron halten.
   ============================================================================ */
