/* ============================================================================
   pn-tokens.css — Bernert Partner-Netzwerk Design-Tokens (Single Source of Truth, #1)
   ----------------------------------------------------------------------------
   Kanonische CI-Werte (Farben, Schrift, Radien, Schatten, Brush) für das
   Partner-Portal (partner-portal.html) und die Mockups.
   • Die interne React-Konsole spiegelt diese Werte in `views/shared.js` (PN_CI) —
     bei Änderung hier dort mitziehen (React nutzt Inline-Styles, keine CSS-Vars).
   • SVG-/PDF-Renderer (creative-render.js, pdf-abrechnung.js) brauchen Literale und
     können CSS-Variablen nicht lesen — dort dieselben Hex-Werte verwenden.
   • Akzentfarbe ist zur Laufzeit per Branding (Admin) überschreibbar
     (setzt --orange / --orange-grad auf :root).
   ============================================================================ */
:root {
  --navy:        #282A3F;
  --navy-l:      #393B59;
  --orange:      #D2720D;
  --orange-l:    #EB8B26;
  --gray:        #999999;
  --muted:       #6f6f74;
  --line:        #ececef;
  --light:       #F5F5F5;
  --white:       #FFFFFF;
  --black:       #282929;
  --teal:        #2B7E88;
  --r:           16px;
  --pill:        50px;
  --mosafin:     "Mosafin", "Montserrat", sans-serif;
  --shadow-sm:   0 6px 22px rgba(40,42,63,.07);
  --navy-grad:   linear-gradient(180deg, #393B59 0%, #282A3F 100%);
  --orange-grad: linear-gradient(100deg, #EB8B26, #D2720D);
}

/* Bernert Brush-Unterstrich (echte SVG) – unterstrichen, NICHT durchgestrichen.
   weiß-Variante für dunkle (Navy-)Flächen. */
.pn-u { color: var(--orange); position: relative; display: inline-block; line-height: 1; white-space: nowrap; }
.pn-u::after { content: ""; position: absolute; left: -3%; right: -3%; bottom: -.18em; height: .3em; background: url(/mockups/partner-netzwerk/assets/underline-second.svg) center/100% 100% no-repeat; pointer-events: none; }
.pn-u.white::after { background-image: url(/mockups/partner-netzwerk/assets/underline-white.svg); }

/* ── #9 Accessibility: deutlich sichtbarer Tastatur-Fokus (WCAG AA) ── */
a:focus-visible, button:focus-visible, [tabindex]:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [data-act]:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
  border-radius: 6px;
}
[data-act] { cursor: pointer; }

/* ── #4 Bernert-Pfeil (statt generischem „→") für „Öffnen"-Links ── */
.pn-arrow::after {
  content: ""; display: inline-block; width: 1.05em; height: .62em; margin-left: 5px;
  vertical-align: middle;
  background: url(/mockups/partner-netzwerk/assets/arrow-orange.svg) center/contain no-repeat;
}

/* ── #6 Sticky-CTA (mobil): „Jetzt empfehlen" immer griffbereit am unteren Rand ── */
.pn-sticky-cta { display: none; }
body.pn-app-active .pn-sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(255,255,255,.96); border-top: 1px solid var(--line);
  box-shadow: 0 -6px 22px rgba(40,42,63,.10); backdrop-filter: blur(6px);
}
.pn-sticky-cta button {
  width: 100%; border: none; cursor: pointer; color: #fff;
  font-family: var(--mosafin); font-weight: 800; font-size: 16px;
  padding: 14px; border-radius: var(--pill); background: var(--orange-grad);
  box-shadow: 0 10px 24px rgba(210,114,13,.4);
}
@media (max-width: 680px) {
  body.pn-app-active .pn-sticky-cta { display: block; }
  /* Platz für die Sticky-Leiste schaffen (Touch-Bereich) */
  body.pn-app-active .pwrap { padding-bottom: 88px; }
}

/* ── #8 Toasts (transientes Feedback statt alert()) ── */
.pn-toasts { position: fixed; right: 16px; bottom: 16px; z-index: 100; display: flex; flex-direction: column; gap: 8px; max-width: 330px; }
.pn-toast { background: var(--navy); color: #fff; padding: 12px 16px; border-radius: 12px; font-size: 13.5px; box-shadow: 0 10px 28px rgba(40,42,63,.3); animation: pn-toast-in .2s ease; }
.pn-toast.ok { background: #2e7d3b; }
.pn-toast.error { background: #c0392b; }
@keyframes pn-toast-in { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ── #8 Benachrichtigungs-Glocke + Dropdown ── */
.pn-bell { position: relative; cursor: pointer; background: none; border: none; font-size: 18px; padding: 4px 6px; color: var(--navy); line-height: 1; }
.pn-bell .badge { position: absolute; top: -3px; right: -3px; background: var(--orange); color: #fff; font-size: 9px; font-weight: 800; min-width: 15px; height: 15px; border-radius: 50px; display: flex; align-items: center; justify-content: center; padding: 0 3px; }
.pn-notif-pop { position: absolute; right: 0; top: 130%; width: 300px; max-height: 360px; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 40px rgba(40,42,63,.18); z-index: 90; padding: 6px; }
.pn-notif-item { padding: 10px 12px; border-radius: 10px; font-size: 13px; color: var(--navy); }
.pn-notif-item.unread { background: rgba(210,114,13,.07); }
.pn-notif-item small { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }
.pn-notif-empty { padding: 18px; text-align: center; color: var(--muted); font-size: 13px; }

/* ── #6 Empfehlungs-Radar ── */
.pn-radar { display: flex; flex-direction: column; gap: 10px; }
.pn-radar-card { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--orange); border-radius: 14px; padding: 14px 16px; display: flex; gap: 14px; align-items: center; box-shadow: var(--shadow-sm); }
.pn-radar-card .ic { width: 42px; height: 42px; border-radius: 12px; background: #FBF3E7; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.pn-radar-card .bd { flex: 1; min-width: 0; }
.pn-radar-card .bd b { font-family: var(--mosafin, "Mosafin"); font-weight: 800; font-size: 14.5px; }
.pn-radar-card .bd p { font-size: 12.5px; color: var(--muted); margin: 2px 0 5px; }
.pn-radar-card .bd .why { font-size: 11px; color: #3a4256; background: #f1f4f9; border-radius: 6px; padding: 2px 8px; display: inline-block; }
.pn-radar-card .ract { display: flex; gap: 6px; flex-shrink: 0; }
.pn-radar-card .ract .btn { padding: 8px 14px; font-size: 13px; }
@media (max-width: 600px) { .pn-radar-card { flex-wrap: wrap; } .pn-radar-card .ract { width: 100%; } .pn-radar-card .ract .btn:first-child { flex: 1; } }
