/* Hallmark · v2.0.0 · theme: editorial-dose · redesign: full · target: aptecznyhub.pl */
/* Critique: hierarchy 5/5, restraint 5/5, specific-to-prompt 5/5, floor 0 FAIL */

/* ==========================================================================
   AptecznyHUB v6.01 • Dzienny Przegląd Portali Farmaceutycznych
   Styl: Monochromatyczny Editorial z Kątami Prostymi & Cieniami High-End
   Typografia: Open Sans (z pełną obsługą polskich znaków Latin-Ext)
   Paleta: Szarości, Biel & Czerń (#ECEEF2, #080B10, #0F172A, #FFFFFF)
   Kontakt: kontakt@aptecznyhub.pl
   ========================================================================== */

:root {
  /* Szlachetna architektura Swiss Editorial & High-Quality Shadows (v8.6) */
  --bg-page: #0B0F17;            /* Głęboka czerń/obsydian tła strony */
  --bg-header: #0E1420;          /* Elegancki ciemny nagłówek */
  --bg-card: #FFFFFF;            /* Czysta biel kafelków i kart */
  --bg-card-hover: #FFFFFF;
  --bg-subtle: #F8FAFC;          /* Jasne tło pomocnicze wewnątrz kafelków */
  --bg-inverse: #0F172A;

  --border-subtle: #E2E8F0;
  --border-card: #CBD5E1;        /* Ramki kafelków */
  --border-main: #94A3B8;
  --border-focus: #0B4EA2;
  --border-color: #E2E8F0;

  --text-main: #0F172A;          /* Ciemny tekst na jasnych kartach */
  --text-body: #334155;
  --text-secondary: #475569;     /* Gwarancja WCAG AA min 4.5:1 */
  --text-muted: #64748B;
  --text-inverse: #FFFFFF;
  --text-primary: #0F172A;
  --text-page: #F8FAFC;

  --color-brand: #0B4EA2;
  --color-brand-hover: #083877;
  --color-brand-bg: #E2E8F0;
  --color-alert: #E31826;
  --color-alert-bg: #FEE2E2;
  --color-market: #334155;
  --color-market-bg: #F1F5F9;
  --color-law: #1E293B;
  --color-law-bg: #F1F5F9;
  --color-practice: #0F172A;
  --color-practice-bg: #F1F5F9;
  --accent-color: #0B4EA2;

  /* Typografia — Open Sans (z pełną obsługą polskich znaków) */
  --font-heading: "Plus Jakarta Sans", "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-sans: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-title: var(--font-heading);
  --font-ui: var(--font-sans);
  --font-family: var(--font-sans);

  /* Kanciaste, proste kąty 90° (0px radius) dla wszystkich kafelków */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-card: 12px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-full: 999px;

  /* Wielowarstwowe cienie wysokiej jakości (High-End Architectural Shadows) */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --shadow-card: 
    0 1px 3px rgba(15, 23, 42, 0.05),
    0 8px 24px -2px rgba(15, 23, 42, 0.07),
    0 16px 32px -4px rgba(15, 23, 42, 0.04);
  --shadow-card-hover: 
    0 2px 4px rgba(15, 23, 42, 0.06),
    0 16px 36px -4px rgba(15, 23, 42, 0.13),
    0 32px 60px -8px rgba(15, 23, 42, 0.08);
  --shadow-modal: 
    0 24px 64px -12px rgba(15, 23, 42, 0.22),
    0 4px 16px rgba(15, 23, 42, 0.08);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease, box-shadow 0.2s ease, border-color 0.18s ease;
  --transition-transform: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.16s ease;
}

[data-theme="dark"],
[data-theme="hybrid"] {
  --bg-page: #0B0F17;
  --bg-header: #0E1420;
  --bg-card: #FFFFFF;
  --bg-card-hover: #FFFFFF;
  --bg-subtle: #F8FAFC;
  --bg-inverse: #0F172A;

  --border-subtle: #E2E8F0;
  --border-card: #CBD5E1;
  --border-main: #94A3B8;
  --border-focus: #0B4EA2;
  --border-color: #E2E8F0;

  --text-main: #0F172A;
  --text-body: #334155;
  --text-secondary: #475569;
  --text-muted: #64748B;
  --text-inverse: #FFFFFF;
  --text-primary: #0F172A;
  --text-page: #F8FAFC;
--color-brand: #F8FAFC;
  --color-brand-hover: #FFFFFF;
  --color-brand-bg: rgba(255, 255, 255, 0.08);
  --color-alert: #F8FAFC;
  --color-alert-bg: rgba(255, 255, 255, 0.06);
  --color-market: #CBD5E1;
  --color-market-bg: rgba(255, 255, 255, 0.06);
  --color-law: #CBD5E1;
  --color-law-bg: rgba(255, 255, 255, 0.06);
  --color-practice: #F8FAFC;
  --color-practice-bg: rgba(255, 255, 255, 0.06);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.45);
  --shadow-card: 
    0 2px 6px rgba(0, 0, 0, 0.55),
    0 10px 28px -4px rgba(0, 0, 0, 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.09);
  --shadow-card-hover: 
    0 4px 10px rgba(0, 0, 0, 0.65),
    0 20px 48px -4px rgba(0, 0, 0, 0.9),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  --shadow-modal: 
    0 32px 72px -12px rgba(0, 0, 0, 0.95),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  -webkit-tap-highlight-color: transparent;
}

button, a {
  touch-action: manipulation;
  font-family: inherit;
}

:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

html, body {
  overflow-x: clip;
}

html {
  font-size: 15px;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg-page);
  color: var(--text-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

[data-theme="dark"] body,
body[data-theme="dark"] {
  background-color: var(--bg-page);
}

#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 60px;
  width: 100%;
}

/* ==========================================================================
   1. GŁÓWNY NAGŁÓWEK APLIKACJI - JASNY, STICKY Z SUBTELNĄ LINIĄ DOLNĄ
/* ==========================================================================
   0. GÓRNY PASEK POWIADOMIEŃ REDAKCYJNYCH (TOP ANNOUNCEMENT BAR)
   ========================================================================== */
.top-announcement-bar {
  background: #0F172A;
  color: #F8FAFC;
  border-left: 3px solid #0F766E;
  border-radius: 6px;
  margin: 12px auto 8px auto;
  max-width: 1280px;
  padding: 9px 18px;
  box-shadow: none;
  position: relative;
  z-index: 90;
  transition: var(--transition);
}

.top-announcement-bar.banner-urgent-mode {
  background: #450A0A;
  border-left-color: #B42318;
  box-shadow: none;
}

.top-announcement-bar.banner-urgent-mode .announcement-pulse-dot {
  background: #F8FAFC;
  box-shadow: 0 0 0 3px rgba(248, 250, 252, 0.18);
}

.top-announcement-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.announcement-content {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  letter-spacing: -0.01em;
}

.announcement-pulse-dot {
  width: 9px;
  height: 9px;
  background: #2DD4BF;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.28);
  flex-shrink: 0;
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.45); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(45, 212, 191, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(45, 212, 191, 0); }
}

.announcement-text strong {
  font-weight: 700;
  color: #ffffff;
}

.announcement-text {
  color: rgba(255, 255, 255, 0.95);
}

.announcement-action-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.announcement-action-link:hover {
  opacity: 0.9;
  transform: translateX(2px);
  text-decoration: none;
}

.announcement-arrow {
  font-size: 15px;
  transition: transform 0.2s ease;
}

.announcement-action-link:hover .announcement-arrow {
  transform: translateX(3px);
}

/* ==========================================================================
   1. GŁÓWNY NAGŁÓWEK APLIKACJI (NOWE GUI APTECZNYHUB)
   ========================================================================== */
header.app-header {
  background: linear-gradient(180deg, #0E1420 0%, #0E1420 50%, rgba(14, 20, 32, 0.75) 85%, transparent 100%);
  color: #F8FAFC;
  border-bottom: none !important;
  box-shadow: none !important;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Subtelna linia impulsu farmaceutycznego na krawędzi paska (Srebro & Platyna High-End) */
header.app-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255, 255, 255, 0.08) 20%, 
    #9CA3AF 46%, 
    #E5E7EB 50%, 
    #6B7280 54%, 
    rgba(255, 255, 255, 0.08) 80%, 
    transparent 100%
  );
  background-size: 200% 100%;
  animation: pharmaPulseWave 6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
  pointer-events: none;
}

@keyframes pharmaPulseWave {
  0% {
    background-position: 100% 0;
    opacity: 0.35;
  }
  50% {
    opacity: 0.95;
  }
  100% {
    background-position: -100% 0;
    opacity: 0.35;
  }
}

@keyframes pharmaHeaderBreathe {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

[data-theme="dark"] header.app-header {
  background: linear-gradient(135deg, #131518 0%, #1A1D22 40%, #15171B 75%, #0F1113 100%);
  background-size: 200% 200%;
  animation: pharmaHeaderBreathe 18s ease-in-out infinite alternate;
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.65);
}


/* ==========================================================================
   BREAKING NEWS TICKER (PRZEWIJAJĄCY SIĘ PASEK NAJWYŻSZEGO PRIORYTETU v5.91)
   Pasek tuż pod paskiem nagłówkowym z najważniejszymi nagłówkami dnia
   ========================================================================== */
.top-breaking-ticker {
  background: linear-gradient(90deg, #0F141C 0%, #151C26 50%, #0F141C 100%);
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  border-bottom: 1.5px solid rgba(227, 24, 38, 0.45);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
  position: relative;
  z-index: 95;
  width: 100%;
  overflow: hidden;
  height: 36px;
  display: flex;
  align-items: center;
  transition: background 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] .top-breaking-ticker {
  background: linear-gradient(90deg, #0B0F15 0%, #121822 50%, #0B0F15 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1.5px solid rgba(227, 24, 38, 0.55);
}

[data-theme="light"] .top-breaking-ticker {
  background: linear-gradient(90deg, #F1F5F9 0%, #FFFFFF 50%, #F1F5F9 100%);
  border-top: 1px solid rgba(203, 213, 225, 0.8);
  border-bottom: 2px solid #E31826;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

[data-theme="cyber-blue"] .top-breaking-ticker {
  background: #06101E !important;
  border-top: 1px solid rgba(0, 229, 255, 0.25) !important;
  border-bottom: 1.5px solid rgba(0, 229, 255, 0.7) !important;
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.2) !important;
}

[data-theme="crimson-red"] .top-breaking-ticker {
  background: #140A0D !important;
  border-top: 1px solid rgba(227, 24, 38, 0.3) !important;
  border-bottom: 1.5px solid rgba(227, 24, 38, 0.85) !important;
  box-shadow: 0 0 15px rgba(227, 24, 38, 0.25) !important;
}

[data-theme="titanium-dark"] .top-breaking-ticker {
  background: #1C232B !important;
  border-top: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-bottom: 1.5px solid rgba(148, 163, 184, 0.5) !important;
}

[data-theme="titanium-light"] .top-breaking-ticker {
  background: #E2E8F0 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.8) !important;
  border-bottom: 1.5px solid #94A3B8 !important;
}

.top-breaking-ticker .ticker-inner {
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 16px;
  position: relative;
}

.top-breaking-ticker .ticker-lead {
  display: none;
  align-items: center;
  gap: 7px;
  padding: 4px 11px;
  background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
  color: #FFFFFF;
  border-radius: 4px;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  flex-shrink: 0;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.45);
  user-select: none;
}

.top-breaking-ticker .ticker-pulse-beacon {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #FFFFFF;
  box-shadow: 0 0 8px #FFFFFF;
  animation: tickerPulseBeacon 1.4s ease-in-out infinite;
}

@keyframes tickerPulseBeacon {
  0% { transform: scale(0.9); opacity: 0.85; box-shadow: 0 0 2px #FFFFFF; }
  50% { transform: scale(1.35); opacity: 1; box-shadow: 0 0 10px #FFFFFF, 0 0 18px rgba(255, 255, 255, 0.7); }
  100% { transform: scale(0.9); opacity: 0.85; box-shadow: 0 0 2px #FFFFFF; }
}

.top-breaking-ticker .ticker-marquee-wrapper {
  flex: 1;
  height: 100%;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  margin-left: 0;
  mask-image: linear-gradient(90deg, transparent 0%, black 14px, black calc(100% - 14px), transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 14px, black calc(100% - 14px), transparent 100%);
}

.top-breaking-ticker .ticker-track {
  display: flex;
  align-items: center;
  gap: 18px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.top-breaking-ticker .ticker-track::-webkit-scrollbar {
  display: none;
}

.ticker-item-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #E2E8F0;
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.2;
  transition: color 0.18s ease, transform 0.18s ease;
  cursor: pointer;
  padding: 3px 0;
}

[data-theme="light"] .ticker-item-link {
  color: #1E293B;
}

.ticker-item-link:hover,
.ticker-item-link:focus-visible {
  color: #60A5FA;
  text-decoration: underline;
  text-underline-offset: 3px;
}

[data-theme="light"] .ticker-item-link:hover,
[data-theme="light"] .ticker-item-link:focus-visible {
  color: #0C56AD;
}

[data-theme="cyber-blue"] .ticker-item-link:hover {
  color: #00E5FF;
}

[data-theme="crimson-red"] .ticker-item-link:hover {
  color: #FF4D5E;
}

.ticker-tag {
  display: inline-block;
  padding: 1.5px 7px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.ticker-tag-urgent {
  background: rgba(220, 38, 38, 0.22);
  color: #F87171;
  border: 1px solid rgba(220, 38, 38, 0.5);
}

.ticker-tag-decision {
  background: rgba(234, 88, 12, 0.22);
  color: #FB923C;
  border: 1px solid rgba(234, 88, 12, 0.45);
}

.ticker-tag-law {
  background: rgba(14, 165, 233, 0.22);
  color: #38BDF8;
  border: 1px solid rgba(14, 165, 233, 0.45);
}

.ticker-tag-top {
  background: rgba(99, 102, 241, 0.22);
  color: #A5B4FC;
  border: 1px solid rgba(99, 102, 241, 0.45);
}

.ticker-tag-event {
  background: rgba(16, 185, 129, 0.22);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.45);
}

.ticker-item-source {
  font-size: 11px;
  font-weight: 700;
  color: #94A3B8;
  opacity: 0.9;
}

[data-theme="light"] .ticker-item-source {
  color: #64748B;
}

.ticker-item-title {
  color: inherit;
  font-weight: 600;
}

.ticker-item-sep {
  color: rgba(148, 163, 184, 0.45);
  font-size: 11px;
  margin-left: 0;
  user-select: none;
}

@media (max-width: 768px) {
  .top-breaking-ticker {
    height: 32px;
  }
  .top-breaking-ticker .ticker-inner {
    padding: 0 10px;
  }
  .top-breaking-ticker .ticker-lead {
    padding: 3px 8px;
    font-size: 10px;
    gap: 5px;
  }
  .top-breaking-ticker .ticker-marquee-wrapper {
    margin-left: 0;
  }
  .ticker-item-link {
    font-size: 11.5px;
    gap: 6px;
  }
  .ticker-tag {
    font-size: 9.5px;
    padding: 1px 5px;
  }
  .ticker-item-source {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .top-breaking-ticker .ticker-track {
    animation-duration: 120s;
  }
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 8px 20px;
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
}

.header-inner::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 520px;
  height: 68px;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.08) 0%, rgba(209, 213, 219, 0.04) 45%, transparent 75%);
  pointer-events: none;
  z-index: 0;
  animation: pharmaAuraPulse 8s ease-in-out infinite alternate;
}

[data-theme="dark"] .header-inner::before {
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.06) 0%, rgba(156, 163, 175, 0.04) 45%, transparent 75%);
}

@keyframes pharmaAuraPulse {
  0% { opacity: 0.4; transform: translate(-50%, -50%) scale(0.95); }
  100% { opacity: 0.9; transform: translate(-50%, -50%) scale(1.05); }
}


/* Nowoczesny Brand Editorial z Krzyżem Aptecznym */
.modern-brand-section {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-logo-badge {
  width: 38px;
  height: 38px;
  background: #111622;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  flex-shrink: 0;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

[data-theme="dark"] .brand-logo-badge {
  background: #111622;
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: none;
}

.modern-brand-section:hover .brand-logo-badge {
  border-color: rgba(255, 255, 255, 0.35);
}

.brand-cross-svg {
  width: 26px;
  height: 26px;
}

.brand-titles {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-main-text {
  font-size: 20px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  display: flex;
  align-items: baseline;
}

.brand-name-dark {
  color: var(--text-main);
  transition: color 0.2s ease;
}

[data-theme="dark"] .brand-name-dark {
  color: #FFFFFF;
}

.brand-domain {
  color: #64748B;
  font-weight: 800;
  font-size: 14px;
  margin-left: 1px;
}

.brand-titles .brand-tagline {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #94A3B8;
  display: block;
  margin-top: 2px;
}

/* Okrągłe przyciski akcji w nagłówku (v6.01) */
.header-square-btn,
.header-circle-btn,
.header-actions .action-btn.icon-only-btn {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  border-radius: 50% !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  background: #111622 !important;
  color: #CBD5E1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.header-square-btn:hover,
.header-circle-btn:hover,
.header-actions .action-btn.icon-only-btn:hover {
  background: #1e293b !important;
  color: #FFFFFF !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
  transform: translateY(-1px) scale(1.05) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
}

[data-theme="dark"] .header-square-btn,
[data-theme="dark"] .header-circle-btn,
[data-theme="dark"] .header-actions .action-btn.icon-only-btn {
  background: #111622 !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  color: #CBD5E1 !important;
  border-radius: 50% !important;
}

[data-theme="dark"] .header-square-btn:hover,
[data-theme="dark"] .header-circle-btn:hover,
[data-theme="dark"] .header-actions .action-btn.icon-only-btn:hover {
  background: #1e293b !important;
  color: #FFFFFF !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
}

/* Przycisk instalacji PWA w nagłówku */
.pwa-install-btn {
  height: 38px !important;
  padding: 0 16px !important;
  border-radius: 9999px !important;
  border: 1px solid rgba(16, 185, 129, 0.45) !important;
  background: rgba(16, 185, 129, 0.12) !important;
  color: #10B981 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  user-select: none !important;
}

.pwa-install-btn:hover {
  background: #10B981;
  color: #FFFFFF;
  border-color: #10B981;
  transform: translateY(-1px);
}

.pwa-install-btn svg {
  stroke: currentColor;
}

@media (max-width: 600px) {
  .pwa-install-btn .pwa-btn-label {
    display: none !important;
  }
  .pwa-install-btn {
    width: 38px !important;
    padding: 0 !important;
    border-radius: 50% !important;
  }
}

.menu-item-pwa {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #10B981 !important;
  font-weight: 700;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  padding: 10px 14px;
  font-size: 13.5px;
}

.menu-item-pwa:hover {
  background: rgba(16, 185, 129, 0.1);
}

.header-circle-btn {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #111622;
  color: #CBD5E1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transition: all 0.15s ease;
}


/* Rozwijane menu hamburgera */
.header-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 8px;
  min-width: 220px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  z-index: 200;
  animation: dropdownFadeIn 0.2s ease;
}

[data-theme="dark"] .header-dropdown-menu {
  background: var(--bg-card);
  border-color: var(--border-card);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main, #0f172a);
  text-decoration: none;
  border-radius: 0;
  transition: background 0.15s ease;
}

.menu-item:hover {
  background: var(--bg-hover, rgba(0, 0, 0, 0.05));
}

[data-theme="dark"] .menu-item {
  color: #f1f5f9;
}

[data-theme="dark"] .menu-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.menu-icon {
  font-size: 15px;
}

/* ==========================================================================
   ZŁOTA PIGUŁKA WYDANIA DNIA (EDITION BADGE)
   ========================================================================== */
.edition-badge-container {
  display: flex;
  align-items: center;
  margin: 14px 0 16px 0;
}

.edition-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #FFFFFF !important;
  border: 1px solid #FFFFFF !important;
  color: #111827 !important;
  padding: 8px 14px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  user-select: none;
  cursor: default;
  flex-shrink: 0;
}

[data-theme="dark"] .edition-badge-pill {
  background: #FFFFFF !important;
  border-color: #FFFFFF !important;
  color: #111827 !important;
}


/* ==========================================================================
   BANER REKLAMOWY GOOGLE ADSENSE W NAGŁÓWKU (LEADERBOARD / HORYZONTALNY)
   ========================================================================== */
.header-ad-banner {
  flex: 1 1 0;
  min-width: 0;
  max-width: 728px;
  height: 90px;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 16px;
  overflow: hidden;
  text-align: center;
}

.header-ad-banner .adsbygoogle {
  display: inline-block;
  width: 100%;
  max-width: 728px;
  height: 90px;
}

.header-actions {
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.action-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: var(--transition);
  white-space: nowrap;
}

.action-btn:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
  border-color: var(--border-main);
  transform: none;
}

.action-btn:active {
  transform: scale(0.98);
}

.icon-only-btn {
  padding: 7px;
  width: 36px;
  height: 36px;
  justify-content: center;
}

.action-svg {
  display: block;
}

.action-svg.hidden {
  display: none;
}

/* Przełączanie ikony motywu (Słońce dla jasnego, Księżyc dla ciemnego) */
#themeIconMoon {
  display: none !important;
}
#themeIconSun {
  display: block !important;
}
[data-theme="dark"] #themeIconSun {
  display: none !important;
}
[data-theme="dark"] #themeIconMoon {
  display: block !important;
}

.action-svg.spin {
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.action-btn.active {
  background: var(--bg-inverse);
  border-color: var(--border-main);
  color: var(--text-inverse);
}

/* ==========================================================================
   2. KARTA KONTROLEK I FILTRÓW (SEGMENT CONTROL + UNDERLINE TABS)
   ========================================================================== */
.controls-card {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 16px 0 20px;
  margin: 0;
  width: 100%;
}

.controls-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 12px;
  position: relative;
  flex-wrap: nowrap;
}

@media (max-width: 992px) {
  .controls-row-top {
    flex-wrap: wrap;
    gap: 10px;
  }
}

/* SZYBKA WYSZUKIWARKA LEKÓW I TEMATÓW (ŻÓŁTY WYRAZISTY PASEK WG WIZUALIZACJI) */
.search-box-wrap {
  flex: 1 1 300px;
  max-width: 540px;
  min-width: 180px;
  margin: 0;
}

.search-form {
  margin: 0;
  padding: 0;
  width: 100%;
}

.search-input-group {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.search-btn {
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #111827 !important;
  cursor: pointer;
  padding: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  z-index: 2;
}

.search-btn:hover {
  color: #000000 !important;
  background: rgba(0, 0, 0, 0.08);
  transform: translateY(-50%) scale(1.05);
}

.search-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.search-icon {
  position: static;
  color: #111827 !important;
  pointer-events: auto;
  display: block;
}

.search-input {
  width: 100%;
  background: var(--bg-card) !important;
  border: 1px solid var(--border-card) !important;
  color: var(--text-main) !important;
  padding: 8.5px 34px 8.5px 38px;
  border-radius: 9999px !important;
  font-size: 13px;
  font-weight: 700;
  outline: none;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.search-input::placeholder {
  color: var(--text-muted) !important;
  font-weight: 500;
}

.search-input:focus {
  border-color: var(--text-main) !important;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.15) !important;
}

[data-theme="dark"] .search-input:focus {
  border-color: #FFFFFF !important;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25) !important;
}

.search-clear-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #111827 !important;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  transition: var(--transition);
  z-index: 2;
}

.search-clear-btn:hover {
  color: var(--text-main);
  background: var(--bg-subtle);
}

/* BANER WYNIKÓW WYSZUKIWANIA */
.search-results-banner {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

.search-banner-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.search-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.search-agent-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(15, 118, 110, 0.1);
  color: var(--color-brand);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(15, 118, 110, 0.2);
}

.search-freshness-pill {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 500;
}

.search-banner-title {
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
  line-height: 1.3;
}

.search-count {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}

.search-banner-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

.btn-clear-search-banner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-card);
  color: var(--text-main);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.btn-clear-search-banner:hover {
  background: var(--bg-page);
  border-color: var(--border-main);
  color: var(--color-brand);
}

/* SMART REGISTRY EMPTY STATE DLA LEKÓW I BRAKU WYNIKÓW */
.search-empty-smart {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.search-empty-header {
  max-width: 620px;
  margin: 0 auto 24px;
}

.search-empty-icon {
  font-size: 34px;
  display: block;
  margin-bottom: 12px;
}

.search-empty-header h3 {
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 8px;
}

.search-empty-sub {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

/* WYSZUKIWARKA SIECIOWA - WIDOK ŁADOWANIA I BADGE */
.search-loading-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 24px;
  text-align: center;
  gap: 16px;
  min-height: 260px;
}

.search-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(15, 118, 110, 0.15);
  border-top-color: var(--color-brand);
  border-radius: 50%;
  animation: searchSpin 0.75s linear infinite;
}

.search-spinner-xs {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(15, 118, 110, 0.2);
  border-top-color: var(--color-brand);
  border-radius: 50%;
  animation: searchSpin 0.75s linear infinite;
  vertical-align: middle;
}

@keyframes searchSpin {
  to { transform: rotate(360deg); }
}

.search-loading-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
  margin: 0;
}

.search-loading-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
  max-width: 520px;
  line-height: 1.5;
}

.search-web-loading-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 118, 110, 0.08);
  color: var(--color-brand);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
}

.tile-snippet {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 8px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-empty-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.btn-reset-search {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-brand);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-reset-search:hover {
  background: #0d655e;
  transform: translateY(-1px);
}

/* PODŚWIETLANIE TRAFIEŃ WYSZUKIWARKI */
.search-highlight {
  background: rgba(15, 118, 110, 0.16);
  color: var(--color-brand);
  font-weight: 600;
  padding: 0 3px;
  border-radius: 3px;
}

[data-theme="dark"] .search-highlight {
  background: rgba(45, 212, 191, 0.22);
  color: #2dd4bf;
}

@media (max-width: 768px) {
  .search-results-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

.controls-row-top .view-mode-toggle {
  flex-shrink: 0;
}

/* SEGMENT CONTROL (POLSKA / ŚWIAT) */
.main-tabs.segment-control {
  display: inline-flex;
  align-items: center;
  background: #161C26;
  padding: 3px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  gap: 3px;
  margin: 0;
  flex-shrink: 0;
}

.tab-btn {
  background: transparent;
  border: none;
  color: #94A3B8;
  padding: 7px 15px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.tab-btn:hover {
  color: #FFFFFF;
}

.tab-btn.active {
  background: #FFFFFF !important;
  color: #111827 !important;
  border: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.tab-btn .badge-count {
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 1.5px 6px;
  border-radius: 3px;
  background: #242D3C;
  color: #94A3B8;
}

.tab-btn.active .badge-count {
  background: #111827 !important;
  color: #FFFFFF !important;
}

[data-theme="dark"] .tab-btn.active {
  background: #FFFFFF !important;
  color: #111827 !important;
}

[data-theme="dark"] .tab-btn.active .badge-count {
  background: #111827 !important;
  color: #FFFFFF !important;
}

/* PRZEŁĄCZNIK WIDOKU (LISTA / KAFELKI) */
.view-mode-toggle {
  display: inline-flex;
  background: #161C26;
  padding: 3px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  gap: 3px;
  flex-shrink: 0;
}

.view-mode-btn {
  background: transparent;
  border: none;
  color: #94A3B8;
  padding: 7px 14px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: var(--transition);
}

.view-mode-btn:hover {
  color: #FFFFFF;
}

.view-mode-btn.active {
  background: #FFFFFF !important;
  color: #111827 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .view-mode-btn.active {
  background: #FFFFFF !important;
  color: #111827 !important;
}

/* FILTRY TEMATYCZNE: ZAKŁADKI Z PODKREŚLENIEM (BEZ PIGUŁEK) */
.controls-row-sub {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 14px;
  overflow-x: auto;
  scrollbar-width: none;
}

.controls-row-sub::-webkit-scrollbar {
  display: none;
}

.topic-tabs {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topic-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  padding: 4px 2px 6px;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  border-radius: 0;
}

.topic-tab:hover {
  color: var(--text-main);
}

.topic-tab.active {
  color: var(--text-main);
  border-bottom-color: var(--text-main);
  font-weight: 600;
}

/* HIGHLIGHTING WYSZUKIWANIA */
mark.search-highlight {
  background: var(--bg-inverse);
  color: var(--text-inverse);
  padding: 1px 4px;
  border-radius: var(--radius-xs);
  font-weight: 800;
}

/* SUBTELNY ŚWIATŁOCIEŃ DLA ROZDZIAŁÓW */
.chapter-frame {
  border: none;
  background: transparent;
  padding: 10px 0 24px;
  margin-bottom: 20px;
  box-shadow: none;
  transition: var(--transition);
}

[data-theme="dark"] .chapter-frame {
  background: transparent;
  border: none;
  box-shadow: none;
}

.chapter-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 2px solid var(--text-main);
  padding-bottom: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

[data-theme="dark"] .chapter-header {
  border-bottom: 2px solid var(--border-main);
}

.chapter-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.chapter-badge {
  background: var(--text-main);
  color: var(--bg-card);
  padding: 3px 10px;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 3px;
}

.chapter-title {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.025em;
  color: var(--text-main);
  text-transform: uppercase;
  line-height: 1.2;
}

.chapter-subtitle {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  width: 100%;
  margin-top: 2px;
  margin-bottom: 8px;
}

.chapter-stats-badge {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  border: none;
  padding: 0;
  border-radius: 0;
  background: transparent;
  white-space: nowrap;
}

[data-theme="dark"] .chapter-stats-badge {
  background: transparent;
  border: none;
  color: var(--text-secondary);
}

/* FILTRY PORTALI (NA DOLE STRONY) */
.portals-bottom-frame {
  margin-top: 10px;
  margin-bottom: 28px;
  padding: 18px 24px;
}

.sources-card-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sources-region-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.sources-region-group .sources-label {
  font-size: 11.5px;
  font-weight: 900;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 140px;
}

.sources-region-group .sources-filter {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
  flex: 1;
}

.source-chip {
  background: transparent;
  border: 1.5px solid var(--border-card);
  color: var(--text-main);
  padding: 4px 13px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.source-chip:hover {
  border-color: var(--border-main);
  background: var(--bg-inverse);
  color: var(--text-inverse);
}

.source-chip.active {
  background: var(--bg-inverse);
  border-color: var(--border-main);
  color: var(--text-inverse);
}

.chip-logo {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  object-fit: contain;
  vertical-align: middle;
}

/* ==========================================================================
   4. WIDOK KOMPAKTOWY (ZGODNIE ZE ZRZUTEM EKRANU)
   ========================================================================== */
.news-container.mode-compact {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 8px 0;
}

.compact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 10px 8px;
  text-decoration: none;
  color: inherit;
  box-shadow: none;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}

.compact-item:hover {
  background: var(--bg-hover-subtle, rgba(0, 0, 0, 0.025));
  transform: none;
  box-shadow: none;
}

.compact-item:hover .compact-title {
  color: var(--color-brand);
  text-decoration: underline;
}

.compact-thumb-wrap {
  width: 72px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-surface-alt, #f1f5f9);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.08));
  position: relative;
}

.compact-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}

.compact-item:hover .compact-thumb-img {
  transform: scale(1.06);
}

.compact-thumb-wrap.has-logo-badge {
  background: #ffffff;
  padding: 4px;
}

[data-theme="dark"] .compact-thumb-wrap.has-logo-badge {
  background: #1e293b;
}

.compact-brand-logo {
  max-width: 52px;
  max-height: 34px;
  object-fit: contain;
  display: block;
}

.compact-body {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

[data-theme="dark"] .compact-item {
  background: transparent;
  box-shadow: none;
}

[data-theme="dark"] .compact-item:hover {
  background: rgba(255, 255, 255, 0.04);
  box-shadow: none;
}

.compact-item.is-read {
  opacity: 0.45;
}

.compact-content {
  min-width: 0;
  flex: 1;
}

.compact-title-row {
  display: block;
}

.compact-title {
  font-family: var(--font-heading);
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.42;
  letter-spacing: -0.01em;
}

.compact-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  font-size: 12.5px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.compact-meta .source-name {
  font-weight: 600;
  color: var(--text-main);
}

.compact-meta .meta-dot {
  color: var(--text-muted);
  opacity: 0.6;
}

.compact-meta .article-datetime {
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
}

.compact-meta .relative-date {
  color: var(--text-muted);
  font-size: 12px;
}

@media (max-width: 820px) {
  .compact-item {
    align-items: flex-start;
    gap: 12px;
    padding: 11px 4px;
  }
  .compact-thumb-wrap {
    width: 62px;
    height: 46px;
    margin-top: 2px;
  }
  .compact-body {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .compact-meta {
    flex-wrap: wrap;
    gap: 6px;
    font-size: 11.5px;
  }
}

/* ODZNAKI KATEGORII - TYLKO ZNACZENIOWE, CZYTELNE (WCAG AA) */
.importance-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  white-space: nowrap;
  letter-spacing: 0.01em;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.importance-tag.tag-alert {
  background: var(--color-alert-bg);
  color: var(--color-alert);
  border-color: rgba(180, 35, 24, 0.2);
  font-weight: 700;
}

.importance-tag.tag-law {
  background: var(--color-law-bg);
  color: var(--color-law);
  border-color: rgba(29, 78, 216, 0.2);
}

.importance-tag.tag-market {
  background: var(--color-market-bg);
  color: var(--color-market);
  border-color: rgba(181, 71, 8, 0.2);
}

.importance-tag.tag-practice {
  background: var(--color-practice-bg);
  color: var(--color-practice);
  border-color: rgba(15, 118, 110, 0.2);
}

.importance-tag.tag-archive {
  background: var(--bg-subtle);
  color: var(--text-muted);
  border-color: var(--border-subtle);
}

.source-badge {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.source-badge-logo {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  object-fit: contain;
}

.time-badge {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.external-arrow {
  font-size: 13px;
  font-weight: 900;
  color: var(--text-muted);
}

.compact-item:hover .external-arrow {
  color: var(--text-main);
  transform: translate(2px, -2px);
}

/* ==========================================================================
   5. WIDOK MAGAZYNOWY (PROFESJONALNA SIATKA + REDAKCYJNE KARTY)
   ========================================================================== */

/* ARTYKUŁ HERO (#1) - WYRÓŻNIENIE ROZMIAREM I TYPOGRAFIĄ, BIAŁA KARTA */
.hero-card {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 24px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-card);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.15s ease, border-color 0.15s ease;
  position: relative;
  overflow: hidden;
}

.hero-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(0, 0, 0, 0.16);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

[data-theme="dark"] .hero-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow-card-hover);
}

.hero-card:hover .hero-title {
  color: var(--color-brand);
}

.hero-thumb-wrap {
  width: 100%;
  height: 190px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.2s ease;
}

.hero-card:hover .hero-thumb-img {
  opacity: 0.95;
}

.hero-thumb-wrap.has-logo-badge {
  background: var(--bg-subtle);
}

.hero-brand-emblem-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  gap: 8px;
}

.hero-brand-emblem-logo {
  width: 56px;
  height: 56px;
  max-width: 56px;
  max-height: 56px;
  object-fit: contain;
}

.hero-brand-emblem-source {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.hero-brand-emblem-badge {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
}

.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero-tag-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.hero-rank-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-card);
  font-variant-numeric: tabular-nums;
}

/* ODZNAKI ŚWIEŻOŚCI ARTYKUŁÓW (NOWOŚCI vs STRUMIEŃ) */
.badge-new {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.4);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2.5px 7px;
  border-radius: var(--radius-xs);
  white-space: nowrap;
}

[data-theme="dark"] .badge-new {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.5);
}

.badge-new-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.8);
  animation: pulse-green 1.8s infinite ease-in-out;
  display: inline-block;
}

@keyframes pulse-green {
  0%, 100% {
    transform: scale(0.9);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.35);
    opacity: 1;
  }
}

.badge-stream {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  padding: 2.5px 7px;
  border-radius: var(--radius-xs);
  white-space: nowrap;
}

.badge-stream-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-muted);
  display: inline-block;
}

.compact-rank.compact-rank-new {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.4);
}

[data-theme="dark"] .compact-rank.compact-rank-new {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(52, 211, 153, 0.45);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 23px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.28;
  margin-bottom: 10px;
  letter-spacing: -0.015em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.15s ease;
}

.hero-snippet {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 12px;
  max-width: 72ch;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  font-size: 12.5px;
  color: var(--text-secondary);
  gap: 12px;
  flex-wrap: wrap;
}

/* WIDOK KAFELEK (WG ZDJĘCIA REFERENCYJNEGO) */
.news-container.mode-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 8px 0 24px;
}

@media (max-width: 1024px) {
  .news-container.mode-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .news-container.mode-cards {
    grid-template-columns: 1fr;
  }
}

.tile-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: transform 0.16s ease, border-color 0.15s ease, box-shadow 0.16s ease;
  position: relative;
  overflow: hidden;
}

.tile-card:hover {
  background: #FFFFFF;
  border-color: #CBD5E1;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

[data-theme="dark"] .tile-card {
  background: #111622;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

[data-theme="dark"] .tile-card:hover {
  background: #151C2C;
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transform: translateY(-2px);
}

/* DUŻE ZDJĘCIE POGLĄDOWE Z ARTYKUŁU */
.tile-photo-wrap {
  width: 100%;
  height: 190px;
  border-radius: 0;
  overflow: hidden;
  background: #F1F5F9;
  border: none;
  margin: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

[data-theme="dark"] .tile-photo-wrap {
  background: #161C26;
}

.tile-cover-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.tile-card:hover .tile-cover-photo {
  transform: scale(1.03);
}

.tile-card-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.tile-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.tile-icon-box {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 50%;
  overflow: hidden;
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

[data-theme="dark"] .tile-icon-box {
  background: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.tile-logo-img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  display: block;
}

.tile-meta-box {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-wrap: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tile-source-name {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-theme="dark"] .tile-source-name {
  color: #CBD5E1;
}

.tile-meta-sep {
  color: #94A3B8;
  font-size: 11px;
  font-weight: 700;
  user-select: none;
}

[data-theme="dark"] .tile-meta-sep {
  color: #64748B;
}

.tile-time {
  font-size: 11px;
  font-weight: 500;
  color: #64748B;
  white-space: nowrap;
}

[data-theme="dark"] .tile-time {
  color: #94A3B8;
}

.tile-title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: #0F172A;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.15s ease;
}

.tile-card:hover .tile-title {
  color: #0284C7;
}

[data-theme="dark"] .tile-title {
  color: #FFFFFF;
}

[data-theme="dark"] .tile-card:hover .tile-title {
  color: #38BDF8;
}

.tile-snippet {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.48;
  margin: 0 0 10px 0;
}

.tile-card-bottom {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

[data-theme="dark"] .tile-card-bottom {
  border-top-color: var(--border-card);
}

.tile-read-meta {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 8px;
}

.card-top-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.card-rank {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  padding: 1px 6px;
  border-radius: var(--radius-xs);
}

.card-body-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
}

.card-thumb-wrap {
  width: 72px;
  height: 64px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.card-brand-emblem-logo {
  max-width: 36px;
  max-height: 36px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.card-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-text-col {
  flex: 1;
  min-width: 0;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.34;
  margin-bottom: 5px;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.15s ease;
}

.card-snippet {
  display: -webkit-box !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-top: 4px;
}

.card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 10px;
  margin-top: auto;
  font-size: 12px;
  color: var(--text-secondary);
  gap: 8px;
}

.card-meta-right {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

.reading-time {
  font-size: 11.5px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.relative-date {
  font-size: 12px;
  color: var(--text-secondary);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 8px;
}

.card-top-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.card-rank {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-main);
  background: var(--bg-subtle);
  border: 1px solid var(--border-card);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
}

.card-body-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.card-thumb-wrap {
  width: 68px;
  height: 60px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-subtle);
  border: 1px solid var(--border-card);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.card-thumb-wrap.has-logo-badge {
  background: var(--bg-subtle);
  padding: 6px;
}

[data-theme="dark"] .card-thumb-wrap.has-logo-badge {
  background: var(--bg-subtle);
  border-color: rgba(255, 255, 255, 0.08);
}

.card-brand-emblem-logo {
  max-width: 38px;
  max-height: 38px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.08));
}

.card-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-text-col {
  flex: 1;
  min-width: 0;
}

.card-title {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.35;
  margin-bottom: 4px;
  letter-spacing: -0.015em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-item {
  box-shadow: var(--shadow-card);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.card-item:hover {
  background: var(--bg-card-hover);
  border-color: rgba(0, 0, 0, 0.16);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

[data-theme="dark"] .card-item:hover {
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow-card-hover);
}

.card-item:hover .card-title {
  color: var(--color-brand);
}

/* 1-2 ZDANIA LEADU ZGODNIE Z WERSJĄ D */
.card-snippet {
  display: -webkit-box !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.45;
  margin-top: 3px;
}

.card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 8px;
  margin-top: auto;
  font-size: 11.5px;
  color: var(--text-muted);
  gap: 8px;
}

.card-meta-right {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.reading-time {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.relative-date {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-date);
  white-space: nowrap;
}

[data-theme="dark"] .relative-date {
  color: #cbd5e1;
}

/* ==========================================================================
   6. PRZYCISK ZAŁADUJ KOLEJNE 10 ARTYKUŁÓW & STOPKA
   ========================================================================== */
.load-more-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 28px 0 16px;
  gap: 10px;
}

.btn-load-more {
  background: var(--text-main);
  border: 1px solid var(--text-main);
  color: var(--bg-card);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.btn-load-more:hover {
  background: #000000;
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .btn-load-more {
  background: var(--text-main);
  color: var(--bg-page);
  border-color: var(--text-main);
}

[data-theme="dark"] .btn-load-more:hover {
  background: #FFFFFF;
  color: #000000;
}

.all-loaded-note {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 8px 18px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-card);
}

.app-footer {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border-card);
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
}

.footer-brand-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-main);
  flex-wrap: wrap;
  justify-content: center;
}

.footer-version-badge {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--text-main);
  color: var(--bg-card);
  padding: 2px 8px;
  border-radius: 3px;
}

.footer-sep {
  color: var(--text-muted);
}

.footer-email-link {
  color: var(--text-main);
  text-decoration: underline;
  font-weight: 700;
  font-size: 13px;
  text-transform: none;
  letter-spacing: normal;
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.footer-email-link:hover {
  background: var(--bg-inverse);
  color: var(--text-inverse);
  text-decoration: none;
}

.footer-legal-link {
  color: var(--text-muted);
  text-decoration: underline;
  font-weight: 600;
  font-size: 13px;
  text-transform: none;
  letter-spacing: normal;
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.footer-legal-link:hover {
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.06);
  text-decoration: none;
}

[data-theme="dark"] .footer-legal-link:hover {
  background: rgba(255, 255, 255, 0.1);
}

.footer-meta-item {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.footer-meta-item strong {
  color: var(--text-main);
  font-weight: 800;
}

/* Dyskretny licznik unikalnych odsłon serwisu */
.footer-views-counter {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2.5px 8.5px;
  background: var(--bg-card, rgba(0, 0, 0, 0.03));
  border: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.08));
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: default;
  transition: var(--transition);
  user-select: none;
  vertical-align: middle;
}

.footer-views-counter:hover {
  border-color: var(--border-strong, #ccc);
  background: var(--bg-hover, rgba(0, 0, 0, 0.06));
}

.footer-views-counter strong {
  color: var(--text-main);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.footer-counter-icon {
  width: 13px;
  height: 13px;
  stroke: var(--text-muted);
  opacity: 0.75;
  flex-shrink: 0;
}

.footer-counter-label {
  font-size: 11.5px;
  opacity: 0.85;
}

[data-theme="dark"] .footer-views-counter {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .footer-views-counter:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.18);
}

.footer-subtext {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.footer-sources {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.footer-sources-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 11.5px;
}

.footer-sources-row strong {
  color: var(--text-main);
  font-weight: 800;
}

.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 38px;
  height: 38px;
  background: var(--bg-inverse);
  color: var(--text-inverse);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-xs);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 99;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  opacity: 0.85;
}

.toast-msg {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(40px);
  background: var(--bg-inverse);
  color: var(--text-inverse);
  border: 1px solid var(--border-main);
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 800;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 999;
}

.toast-msg.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  background: var(--bg-card);
  border: 1px dashed var(--border-card);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
}

.empty-state h3 {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
}

/* ==========================================================================
   7. ZAAWANSOWANA RESPONSYWNOŚĆ MOBILNA (SMARTFONY & TABLETY)
   ========================================================================== */
@media (max-width: 900px) {
  header.app-header {
    height: auto;
  }
  .header-inner {
    height: auto;
    min-height: 64px;
    padding: 10px 16px;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
  }
  .header-ad-banner {
    order: 3;
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 50px;
    margin: 8px 0 0;
  }
  .header-ad-banner .adsbygoogle {
    max-width: 100%;
    height: 50px;
  }
}

@media (max-width: 768px) {
  body {
    background-attachment: scroll;
  }

  .controls-row-top {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }

  .search-box-wrap {
    order: 3;
    flex: 1 1 100%;
    max-width: 100%;
    margin-left: 0;
  }

  /* Horyzontalny karuzelowy pasek zakładek (styl natywnej aplikacji) */
  .main-tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    max-width: 100%;
    padding: 4px;
    border-radius: 999px;
    gap: 4px;
  }
  .main-tabs::-webkit-scrollbar {
    display: none;
  }
  .tab-btn {
    flex-shrink: 0;
    min-height: 38px;
    padding: 6px 14px;
    font-size: 12px;
  }

  /* Horyzontalny pasek filtrów tematycznych */
  .topic-filters {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    width: 100%;
    padding-bottom: 4px;
    gap: 6px;
  }
  .topic-filters::-webkit-scrollbar {
    display: none;
  }
  .topic-chip {
    flex-shrink: 0;
    min-height: 34px;
    padding: 5px 12px;
    font-size: 11.5px;
  }

  .controls-row-top {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    gap: 12px;
  }
  .controls-row-top .view-mode-toggle {
    position: static;
    margin: 0 auto;
  }
  .main-tabs {
    justify-content: center;
    margin: 0 auto;
  }

  /* Hero card na urządzeniach mobilnych */
  .hero-card {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px;
    border-radius: 6px;
  }
  .hero-thumb-wrap {
    height: 180px;
    border-radius: 4px;
  }
  .hero-title {
    font-size: 17px;
  }
  .hero-snippet {
    font-size: 13px;
    -webkit-line-clamp: 2;
  }

  /* Ramki rozdziałów */
  .chapter-frame {
    padding: 14px 14px;
    margin-bottom: 18px;
    border-radius: 6px;
    box-shadow: none;
  }
  .chapter-title {
    font-size: 16px;
  }

  /* Kompaktowa lista artykułów */
  .compact-item {
    gap: 10px;
    padding: 10px 4px;
  }
  .compact-thumb-wrap {
    width: 58px;
    height: 44px;
  }
  .compact-title {
    font-size: 14px;
    line-height: 1.35;
  }
  .compact-meta {
    flex-wrap: wrap;
    gap: 6px;
  }

  /* Filtry portali */
  .sources-region-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .sources-region-group .sources-label {
    min-width: unset;
    font-size: 11px;
  }
  .source-chip {
    min-height: 34px;
    padding: 4px 11px;
  }

  /* Pływający przycisk powrotu na górę wygodny pod kciuk */
  .back-to-top {
    bottom: 18px;
    right: 18px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
  }
}

/* SMARTFONY (Ekran <= 480px) */
@media (max-width: 480px) {
  .container {
    padding: 0 10px 48px;
  }

  .header-inner {
    padding: 8px 12px;
    gap: 8px;
  }
  .brand-logo-badge {
    width: 38px;
    height: 38px;
    border-radius: 4px;
  }
  .brand-cross-svg {
    width: 26px;
    height: 26px;
  }
  .brand-main-text {
    font-size: 18px;
  }
  .brand-domain {
    font-size: 14px;
  }
  .brand-titles .brand-tagline {
    font-size: 8.5px;
    letter-spacing: 0.1em;
  }
  .header-circle-btn {
    width: 34px;
    height: 34px;
  }
  .header-actions {
    gap: 6px;
  }
  .meta-pill {
    font-size: 11px;
    padding: 4px 8px;
  }
  /* Na najwęższych ekranach ukryj etykietę bazy, by nie wypychać nagłówka */
  .meta-pill span {
    display: none;
  }

  .action-btn {
    padding: 5px 10px;
    font-size: 11.5px;
    min-height: 34px;
  }

  .controls-card {
    padding: 12px 10px;
    margin: 12px 0 16px;
    border-radius: 6px;
  }

  .chapter-frame {
    padding: 12px 10px;
    margin-bottom: 14px;
    border-radius: 6px;
  }

  .chapter-header {
    margin-bottom: 10px;
  }
  .chapter-badge {
    font-size: 10px;
    padding: 1px 6px;
  }
  .chapter-title {
    font-size: 15px;
  }
  .chapter-subtitle {
    font-size: 11.5px;
  }
  .chapter-stats-badge {
    font-size: 10.5px;
    padding: 1px 6px;
  }

  .compact-item {
    gap: 8px;
    padding: 8px 2px;
  }
  .compact-thumb-wrap {
    width: 52px;
    height: 38px;
  }
  .compact-title {
    font-size: 13.5px;
    line-height: 1.34;
  }
  .compact-meta {
    font-size: 11px;
    gap: 5px;
  }
  .source-badge {
    font-size: 10.5px;
  }
  .importance-tag {
    font-size: 10px;
    padding: 1px 6px;
  }
  .time-badge {
    font-size: 10px;
  }
  .external-arrow {
    display: none;
  }

  /* Widok kart na telefonie */
  .news-container.mode-cards {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .card-item {
    padding: 12px 12px;
    border-radius: 6px;
  }
  .card-title {
    font-size: 14px;
  }

  .portals-bottom-frame {
    padding: 12px 10px;
  }

  .footer-brand-wrap {
    font-size: 14px;
    gap: 6px;
  }
  .footer-sources-row {
    font-size: 11px;
    gap: 6px;
  }
}

/* ==========================================================================
   AptecznyHUB v3.7 • Trendy w Sieci i Moduł AI
   ========================================================================== */

/* ==========================================================================
   AptecznyHUB v4.2 • Trendy w Sieci i Kontekst dla Farmaceuty
   ========================================================================== */

/* Dyskretna linia źródeł (zamiast krzykliwego badge) */
.trending-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border-card);
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  letter-spacing: 0.01em;
}

.trending-badge-mini {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  padding: 1px 6px;
  border-radius: var(--radius-xs);
}

.trending-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-brand);
  display: inline-block;
}

/* Encje (Leki, Substancje) - dyskretne tagi bez emoji */
.ai-entities-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 6px 0;
}

.ai-entities-row.mini {
  margin: 4px 0;
  gap: 4px;
}

.ai-entity-pill {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  padding: 2px 7px;
  border-radius: var(--radius-xs);
}

.ai-entity-pill.mini {
  font-size: 11px;
  padding: 1px 5px;
}

/* "W skrócie" / Konsekwencja dla apteki - profesjonalna ramka informacyjna */
.ai-briefing-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  padding: 9px 13px;
  border-radius: var(--radius-xs);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-body);
  margin-top: 10px;
}

.ai-briefing-box.ai-alert {
  border-color: rgba(180, 35, 24, 0.25);
  background: var(--color-alert-bg);
  color: var(--text-main);
}

.ai-briefing-box.mini {
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1.45;
  margin-top: 8px;
}

.ai-briefing-label {
  font-weight: 600;
  color: var(--text-main);
  margin-right: 4px;
}

/* Powiązane artykuły z innych portali */
.related-sources-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 10px;
}

.related-label {
  font-weight: 500;
  color: var(--text-muted);
}

.related-source-tag {
  background: var(--bg-subtle);
  border: 1px solid var(--border-card);
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  font-size: 11.5px;
  color: var(--text-secondary);
}

/* ==========================================================================
   PORANNY BRIEFING REDAKCYJNY (PIGUŁKA DNIA)
   ========================================================================== */
.daily-briefing-frame {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}

.briefing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}

.briefing-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.briefing-badge-icon {
  font-size: 15px;
  background: var(--color-brand-bg);
  color: var(--color-brand);
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.briefing-title {
  font-size: 15.5px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.briefing-tag {
  font-size: 11px;
  font-weight: 700;
  background: var(--bg-subtle);
  color: var(--color-brand);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.briefing-toggle-icon {
  color: var(--text-muted);
  transition: transform 0.2s ease;
  display: flex;
  align-items: center;
}

.daily-briefing-frame.collapsed .briefing-toggle-icon {
  transform: rotate(-90deg);
}

.daily-briefing-frame.collapsed .briefing-content {
  display: none;
}

.briefing-content {
  margin-top: 14px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 14px;
}

.briefing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.briefing-item-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

.briefing-item-card:hover {
  background: var(--bg-card);
  border-color: rgba(0, 0, 0, 0.16);
  transform: translateY(-1px);
  box-shadow: var(--shadow-card);
}

[data-theme="dark"] .briefing-item-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
}

.briefing-category-badge {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--color-brand);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.briefing-item-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.briefing-item-summary {
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.briefing-item-source {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: auto;
}


/* ==========================================================================
   KAFELKOWA JEDNOSTKA REKLAMOWA IN-FEED (GOOGLE ADSENSE)
   ========================================================================== */
.tile-ad-card {
  background: var(--bg-card);
  border: 1px dashed var(--border-main);
  cursor: default;
}

.tile-ad-card:hover {
  transform: none;
  border-color: var(--border-main);
  box-shadow: var(--shadow-card);
}

.tile-ad-icon-box {
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tile-ad-icon-badge {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.tile-ad-body {
  width: 100%;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  overflow: hidden;
}

.compact-ad-item {
  background: var(--bg-card);
  border: 1px dashed var(--border-main);
}

.compact-ad-body {
  width: 100%;
  min-height: 50px;
  display: flex;
  align-items: center;
  margin-top: 6px;
}

/* --- PANEL EKSPERTA PRAWA FARMACEUTYCZNEGO (AGENT REALIZACJI RECEPT) --- */
.expert-answer-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-main);
  border-left: 5px solid #2563EB;
  border-radius: var(--radius-lg, 12px);
  padding: 22px 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  transition: var(--transition, all 0.2s ease);
}

.expert-answer-panel.type-negative {
  border-left-color: #EF4444;
}

.expert-answer-panel.type-positive {
  border-left-color: #10B981;
}

.expert-answer-panel.type-warning {
  border-left-color: #F59E0B;
}

.expert-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.expert-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-brand, #0D9488);
}

.expert-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.expert-status-pill.negative {
  background: rgba(239, 68, 68, 0.12);
  color: #DC2626;
  border: 1px solid rgba(239, 68, 68, 0.28);
}

.expert-status-pill.positive {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.28);
}

.expert-status-pill.warning {
  background: rgba(245, 158, 11, 0.12);
  color: #D97706;
  border: 1px solid rgba(245, 158, 11, 0.28);
}

.expert-status-pill.info {
  background: rgba(37, 99, 235, 0.12);
  color: #2563EB;
  border: 1px solid rgba(37, 99, 235, 0.28);
}

.expert-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0 0 8px 0;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.expert-summary {
  font-size: 0.96rem;
  line-height: 1.6;
  color: var(--text-main);
  margin: 0 0 16px 0;
  font-weight: 500;
}

.expert-legal-box {
  background: var(--bg-subtle, #f8fafc);
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: var(--radius-sm, 6px);
  padding: 12px 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.5;
}

.expert-legal-header strong {
  color: var(--text-main);
}

.expert-doc-links {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-subtle, #e2e8f0);
}

.expert-doc-links-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.expert-doc-pills-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.expert-doc-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.expert-doc-pill-pdf {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #FFF1F2;
  color: #BE123C;
  border: 1px solid rgba(190, 18, 60, 0.28);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  line-height: 1.3;
}

[data-theme="dark"] .expert-doc-pill-pdf {
  background: rgba(190, 18, 60, 0.16);
  color: #FDA4AF;
  border-color: rgba(190, 18, 60, 0.4);
}

.expert-doc-pill-pdf:hover {
  background: #BE123C;
  color: #FFFFFF;
  border-color: #BE123C;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(190, 18, 60, 0.25);
}

.expert-doc-pill-pdf .pdf-tag-badge {
  display: inline-block;
  background: #BE123C;
  color: #FFFFFF;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 3px;
  letter-spacing: 0.05em;
  line-height: 1;
}

.expert-doc-pill-pdf:hover .pdf-tag-badge {
  background: #FFFFFF;
  color: #BE123C;
}

.expert-doc-pill-pdf .icon-ext {
  opacity: 0.7;
  margin-left: 2px;
  flex-shrink: 0;
}

.expert-doc-pill-isap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-card, #ffffff);
  color: var(--text-muted);
  border: 1px solid var(--border-main);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  line-height: 1.3;
}

.expert-doc-pill-isap:hover {
  color: var(--color-brand);
  border-color: var(--color-brand);
  background: var(--bg-hover);
}

.expert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.expert-card {
  background: var(--bg-subtle, #f8fafc);
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: var(--radius-sm, 6px);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.expert-card-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.expert-card-text {
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0;
}

.expert-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle, #e2e8f0);
}

.btn-open-pdf-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-sm, 6px);
  font-size: 0.84rem;
  font-weight: 700;
  color: #FFFFFF;
  background: #BE123C;
  border: 1px solid #9F1239;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  box-shadow: 0 1px 3px rgba(190, 18, 60, 0.2);
}

.btn-open-pdf-action:hover {
  background: #9F1239;
  border-color: #881337;
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(190, 18, 60, 0.3);
}

.btn-copy-expert {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-sm, 6px);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-main);
  background: var(--bg-subtle, #f8fafc);
  border: 1px solid var(--border-main);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-copy-expert:hover {
  background: var(--color-brand-bg, rgba(13, 148, 136, 0.1));
  border-color: var(--color-brand, #0D9488);
  color: var(--color-brand, #0D9488);
}



/* ==========================================================================
   AGENT NADZORCA AI (SUPERVISOR MODAL & BADGE)
   ========================================================================== */
.menu-item-btn {
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
  font-size: 13.5px;
  cursor: pointer;
  color: var(--text-main);
  padding: 10px 14px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s ease;
}

.menu-item-btn:hover {
  background: var(--bg-subtle);
  color: var(--color-brand);
}

.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;
}

.footer-supervisor-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  transition: all 0.2s ease;
  user-select: none;
  vertical-align: middle;
  padding: 0;
  margin: 0 2px;
}

.footer-supervisor-badge:hover {
  background: rgba(16, 185, 129, 0.25);
  border-color: rgba(16, 185, 129, 0.7);
  transform: scale(1.15);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.supervisor-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.8);
  display: inline-block;
  animation: pulse-green 1.8s infinite ease-in-out;
}

.supervisor-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.supervisor-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

.supervisor-modal-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
  animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  color: #111827;
}

.supervisor-auth-card {
  max-width: 460px;
}

[data-theme="dark"] .supervisor-modal-card {
  background: #111622;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.65);
  color: #F8FAFC;
}

.supervisor-modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

[data-theme="dark"] .supervisor-modal-header {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.supervisor-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.supervisor-icon-badge {
  font-size: 22px;
  width: 44px;
  height: 44px;
  border-radius: 0;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: center;
}

[data-theme="dark"] .supervisor-icon-badge {
  background: #161C26;
  border-color: rgba(255, 255, 255, 0.1);
}

.supervisor-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.supervisor-version-pill {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 12px;
  background: rgba(2, 132, 199, 0.1);
  color: var(--color-brand);
  border: 1px solid rgba(2, 132, 199, 0.25);
  letter-spacing: 0.03em;
  display: inline-flex;
  align-items: center;
}

[data-theme="dark"] .supervisor-version-pill {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.3);
}

.supervisor-modal-title {
  font-size: 16.5px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.01em;
  margin: 0;
}

.supervisor-modal-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin: 2px 0 0;
}

.supervisor-close-btn {
  background: transparent;
  border: none;
  font-size: 18px;
  color: var(--text-muted);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.supervisor-close-btn:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
}

/* FORMULARZ LOGOWANIA AGENTA NADZORCY */
.supervisor-auth-body {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.supervisor-auth-desc {
  font-size: 13.5px;
  color: var(--text-body);
  line-height: 1.5;
  margin: 0;
}

.supervisor-auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.supervisor-auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.supervisor-auth-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.supervisor-input-group {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
}

.supervisor-pass-input {
  width: 100%;
  padding: 10px 42px 10px 14px;
  font-size: 14px;
  font-family: inherit;
  border: 1px solid var(--border-card, #CBD5E1);
  border-radius: 6px;
  background: var(--bg-subtle, #F8FAFC);
  color: var(--text-main);
  outline: none;
  transition: all 0.15s ease;
}

.supervisor-pass-input:focus {
  border-color: #10B981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

[data-theme="dark"] .supervisor-pass-input {
  background: #161C26;
  border-color: rgba(255, 255, 255, 0.15);
}

.supervisor-pass-toggle-btn {
  position: absolute;
  right: 8px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.supervisor-pass-toggle-btn:hover {
  color: var(--text-main);
}

.supervisor-pass-error {
  font-size: 12.5px;
  color: #EF4444;
  font-weight: 600;
  padding: 6px 10px;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 4px;
  border-left: 3px solid #EF4444;
}

.supervisor-auth-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.supervisor-cancel-btn {
  background: transparent;
  border: 1px solid var(--border-card, #E2E8F0);
  color: var(--text-muted);
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.supervisor-cancel-btn:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
}

/* WNĘTRZE DASHBOARDU AUDYTU */
.supervisor-modal-body {
  padding: 22px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.supervisor-score-card {
  display: flex;
  align-items: center;
  gap: 18px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 0;
  padding: 16px 20px;
}

[data-theme="dark"] .supervisor-score-card {
  background: #161C26;
  border-color: rgba(255, 255, 255, 0.08);
}

.supervisor-score-num {
  font-size: 38px;
  font-weight: 900;
  line-height: 1;
  color: #10B981;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.supervisor-score-meta {
  flex: 1;
}

.supervisor-score-label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #10B981;
  display: block;
  margin-bottom: 4px;
}

.supervisor-score-desc {
  font-size: 13.5px;
  color: var(--text-body);
  line-height: 1.45;
  margin: 0;
}

.supervisor-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.supervisor-section-title {
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 0;
}

.supervisor-topic-text {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.45;
  background: var(--bg-subtle);
  border: 1px solid var(--border-card);
  padding: 10px 14px;
  border-radius: 6px;
  margin: 0;
}

/* SIATKA 4 KAFELKÓW TELEMETRYCZNYCH */
.supervisor-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

@media (max-width: 640px) {
  .supervisor-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.supervisor-stat-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-card);
  border-radius: 0;
  padding: 12px 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.15s ease;
}

.supervisor-stat-box.supervisor-stat-highlight {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.04);
}

.supervisor-stat-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--text-muted);
}

.supervisor-stat-header svg {
  stroke: var(--text-muted);
}

.supervisor-stat-val {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-main);
  font-variant-numeric: tabular-nums;
}

.supervisor-views-val {
  color: #10B981;
  font-size: 19px;
}

.supervisor-stat-lbl {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.supervisor-stat-sub {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  opacity: 0.85;
}

/* RZĄD ANALITYKI I METRYK */
.supervisor-analytics-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 640px) {
  .supervisor-analytics-row {
    grid-template-columns: 1fr;
  }
}

.supervisor-analytics-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-card);
  border-radius: 0;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.supervisor-top-sources-list,
.supervisor-metrics-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.supervisor-source-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.supervisor-source-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-main);
}

.supervisor-source-count {
  font-size: 11.5px;
  color: var(--text-muted);
}

.supervisor-source-bar-wrap {
  width: 100%;
  height: 4px;
  background: var(--border-card);
  border-radius: 999px;
  overflow: hidden;
}

.supervisor-source-bar {
  height: 100%;
  background: #10B981;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.supervisor-metric-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  padding: 3px 0;
  border-bottom: 1px dashed var(--border-card);
}

.supervisor-metric-item:last-child {
  border-bottom: none;
}

.supervisor-metric-name {
  color: var(--text-muted);
  font-weight: 500;
}

.supervisor-metric-val {
  color: var(--text-main);
  font-weight: 700;
}

.supervisor-optimizations-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.supervisor-optimizations-list li {
  font-size: 13px;
  color: var(--text-body);
  background: var(--bg-subtle);
  border: 1px solid var(--border-card);
  padding: 8px 12px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.supervisor-optimizations-list li::before {
  content: "✓";
  color: #10B981;
  font-weight: 800;
  font-size: 14px;
}

/* STOPKA MODALU */
.supervisor-modal-footer {
  padding: 14px 24px;
  border-top: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--bg-subtle);
}

[data-theme="dark"] .supervisor-modal-footer {
  border-top-color: rgba(255, 255, 255, 0.08);
}

.supervisor-footer-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.supervisor-footer-note {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.4;
}

.supervisor-footer-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

.supervisor-lock-btn {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-card);
  border-radius: 6px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.supervisor-lock-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: #EF4444;
  color: #EF4444;
}

.supervisor-confirm-btn {
  background: #111827;
  color: #FFFFFF;
  border: none;
  border-radius: 6px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

[data-theme="dark"] .supervisor-confirm-btn {
  background: #FFFFFF;
  color: #0F172A;
}

.supervisor-confirm-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* ==========================================================================
   PASEK BOCZNY NA SZEROKICH EKRANACH (PREMIUM DESKTOP WING v5.42)
   Stylistyka: Szlachetny Medyczny Magazyn Informacyjny (High-End Swiss Editorial)
   Cechy: Brak suwaków (pełna widoczność), organiczne gradienty, wielowarstwowe
   cienie głębi, luksusowe ramki z wewnętrznym refleksem świetlnym, dotykowe klawisze.
   ========================================================================== */
.page-layout-wrapper {
  display: block;
  width: 100%;
  margin: 0 auto;
  position: relative;
}

.sidebar-wing,
.mobile-subpage-tiles {
  display: none !important;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  width: 100%;
  padding: 0 16px;
}

@media (min-width: 1440px) {
  .container {
    max-width: 1340px;
    padding: 0 20px;
  }
}

@media (min-width: 1600px) {
  .page-layout-wrapper {
    max-width: 1800px;
    gap: 26px;
    padding: 0 24px;
  }

  .container {
    max-width: 1200px;
  }

  .sidebar-wing-right {
    display: block;
    width: 248px;
  }
}

@media (min-width: 1200px) {
  /* Wewnętrzny kontener sticky — BEZ SZTYWNEGO LIMITU WYSOKOŚCI I BEZ SUWAKÓW */
  .sidebar-sticky-inner {
    position: -webkit-sticky;
    position: sticky;
    top: 86px;
    align-self: flex-start;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow: visible; /* CAŁKOWITE USUNIĘCIE SUWAKA */
    max-height: none;  /* USUNIĘCIE SZTUCZNEGO LIMITU */
    padding-bottom: 32px;
  }

  /* ==========================================================================
     KARTY BOCZNEGO PANELU — SZLACHETNE RAMKI, CIENIE I MIKROGRADIENTY
     ========================================================================== */
  .sidebar-card {
    position: relative;
    background: linear-gradient(180deg, #FFFFFF 0%, #FAFCFD 45%, #F4F6F9 100%);
    border: 1px solid rgba(15, 23, 42, 0.09);
    border-radius: 0;
    padding: 13px 14px;
    box-shadow: 
      0 1px 2px rgba(15, 23, 42, 0.04),
      0 4px 12px -1px rgba(15, 23, 42, 0.05),
      0 12px 24px -4px rgba(15, 23, 42, 0.05),
      inset 0 1px 0 rgba(255, 255, 255, 0.95);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    box-sizing: border-box;
  }

  [data-theme="dark"] .sidebar-card {
    background: linear-gradient(180deg, #18202D 0%, #121722 60%, #0E131C 100%);
    border-color: rgba(255, 255, 255, 0.09);
    box-shadow: 
      0 2px 4px rgba(0, 0, 0, 0.45),
      0 8px 24px -2px rgba(0, 0, 0, 0.55),
      0 20px 36px -6px rgba(0, 0, 0, 0.7),
      inset 0 1px 0 rgba(255, 255, 255, 0.07);
  }

  /* Szlachetny nagłówek karty z mikro-separatorem */
  .sidebar-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 11px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    position: relative;
  }

  [data-theme="dark"] .sidebar-card-header {
    border-bottom-color: rgba(255, 255, 255, 0.07);
  }

  .sidebar-card-title {
    font-family: var(--font-heading);
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .sidebar-reset-btn {
    background: transparent;
    border: none;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--color-brand);
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    transition: opacity 0.15s ease;
  }

  .sidebar-reset-btn:hover {
    opacity: 0.8;
  }

  /* ==========================================================================
     KARTA ALERTÓW GIF / BEZPIECZEŃSTWO (OFFICIAL PHARMACY SENTINEL)
     ========================================================================== */
  .sidebar-alert-card {
    background: linear-gradient(180deg, #FFF8F6 0%, #FFFFFF 65%, #FFFDFD 100%);
    border: 1px solid rgba(220, 38, 38, 0.22);
    border-left: 3.5px solid #DC2626;
    box-shadow: 
      0 1px 3px rgba(220, 38, 38, 0.08),
      0 6px 18px -2px rgba(220, 38, 38, 0.1),
      inset 0 1px 0 rgba(255, 255, 255, 0.9);
  }

  [data-theme="dark"] .sidebar-alert-card {
    background: linear-gradient(180deg, #221316 0%, #171012 55%, #120D0E 100%);
    border-color: rgba(239, 68, 68, 0.28);
    border-left: 3.5px solid #EF4444;
    box-shadow: 
      0 2px 6px rgba(220, 38, 38, 0.25),
      0 12px 28px -4px rgba(0, 0, 0, 0.7),
      inset 0 1px 0 rgba(255, 255, 255, 0.06);
  }

  .sidebar-badge-alert {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.07em;
    color: #DC2626;
    text-transform: uppercase;
  }

  [data-theme="dark"] .sidebar-badge-alert {
    color: #F87171;
  }

  .badge-pulse {
    width: 7.5px;
    height: 7.5px;
    border-radius: 50%;
    background: #DC2626;
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7);
    animation: pulseRed 1.8s infinite;
  }

  .sidebar-alerts-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 11px;
  }

  .sidebar-empty-note {
    font-size: 11px;
    color: var(--text-muted);
    font-style: italic;
    padding: 6px 0;
  }

  .sidebar-alert-item {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 8px 10px;
    border-radius: 0;
    background: rgba(220, 38, 38, 0.04);
    border: 1px solid rgba(220, 38, 38, 0.12);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
    transition: all 0.18s ease;
  }

  [data-theme="dark"] .sidebar-alert-item {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
  }

  .sidebar-alert-item:hover {
    background: rgba(220, 38, 38, 0.08);
    border-color: rgba(220, 38, 38, 0.32);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(220, 38, 38, 0.12);
  }

  .sidebar-alert-title {
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.36;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .sidebar-alert-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 9.5px;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 500;
  }

  .sidebar-alert-source {
    font-weight: 700;
    color: #DC2626;
  }

  [data-theme="dark"] .sidebar-alert-source {
    color: #F87171;
  }

  .sidebar-action-btn {
    width: 100%;
    padding: 7px 10px;
    border-radius: 0;
    border: none;
    background: linear-gradient(180deg, #DC2626 0%, #B91C1C 100%);
    color: #FFFFFF !important;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.28);
    transition: all 0.16s ease;
    box-sizing: border-box;
  }

  .sidebar-action-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.38);
  }

  .sidebar-action-btn.active {
    background: linear-gradient(180deg, #991B1B 0%, #7F1D1D 100%);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
  }

  /* ==========================================================================
     LISTA PORTALI — BEZ SUWAKA (POKAZUJE CAŁĄ ZAWARTOŚĆ)
     ========================================================================== */
  .sidebar-sources-scroll {
    display: flex;
    flex-direction: column;
    gap: 3px;
    max-height: none;   /* USUNIĘCIE SUWAKA 290px */
    overflow: visible;   /* PEŁNE ROZWINIĘCIE LISTY */
    padding-right: 0;
  }

  .sidebar-source-row {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 6px 9px;
    border-radius: 0;
    background: transparent;
    border: 1px solid transparent;
    border-left: 2.5px solid transparent;
    cursor: pointer;
    text-align: left;
    color: var(--text-main);
    transition: all 0.16s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
  }

  .sidebar-source-row:hover {
    background: linear-gradient(90deg, #F1F5F9 0%, #F8FAFC 100%);
    border-color: rgba(15, 23, 42, 0.05);
    border-left-color: var(--border-card);
    transform: translateX(2px);
  }

  [data-theme="dark"] .sidebar-source-row:hover {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
    border-color: rgba(255, 255, 255, 0.06);
    border-left-color: rgba(255, 255, 255, 0.2);
    transform: translateX(2px);
  }

  .sidebar-source-row.active {
    background: linear-gradient(90deg, rgba(15, 118, 110, 0.12) 0%, rgba(15, 118, 110, 0.03) 100%);
    border-color: rgba(15, 118, 110, 0.18);
    border-left-color: var(--color-brand);
    font-weight: 700;
  }

  [data-theme="dark"] .sidebar-source-row.active {
    background: linear-gradient(90deg, rgba(20, 184, 166, 0.18) 0%, rgba(20, 184, 166, 0.04) 100%);
    border-color: rgba(20, 184, 166, 0.25);
    border-left-color: #2DD4BF;
    font-weight: 700;
  }

  .sidebar-source-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
    border-radius: 4px;
    flex-shrink: 0;
    background: #FFFFFF;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    padding: 1px;
    box-sizing: border-box;
  }

  [data-theme="dark"] .sidebar-source-logo {
    background: #1A2230;
    border-color: rgba(255, 255, 255, 0.12);
  }

  .sidebar-source-name {
    font-size: 11.5px;
    font-weight: 600;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.01em;
  }

  .sidebar-source-count {
    font-family: var(--font-mono, monospace);
    font-size: 10px;
    font-weight: 800;
    color: var(--text-muted);
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(15, 23, 42, 0.06);
    padding: 1.5px 6.5px;
    border-radius: 10px;
    flex-shrink: 0;
  }

  [data-theme="dark"] .sidebar-source-count {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.09);
    color: #94A3B8;
  }

  /* ==========================================================================
     PRAWY BOK: RADAR SZKOLEŃ, WEBINARY CMKP / OIA, PRACA I PARTNERZY
     ========================================================================== */
  .sidebar-webinar-card {
    border-color: rgba(16, 185, 129, 0.3);
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.04) 0%, #FFFFFF 100%);
  }

  [data-theme="dark"] .sidebar-webinar-card {
    border-color: rgba(52, 211, 153, 0.35);
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.09) 0%, #161C26 100%);
  }

  .sidebar-badge-webinar {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: #059669;
  }

  [data-theme="dark"] .sidebar-badge-webinar {
    color: #34D399;
  }

  .badge-webinar-pulse {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #059669;
    box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.7);
    animation: pulseGreen 1.8s infinite;
  }

  @keyframes pulseGreen {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(5, 150, 105, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(5, 150, 105, 0); }
  }

  .webinar-filter-pills {
    display: flex;
    gap: 4px;
    margin-bottom: 10px;
  }

  .webinar-pill-btn {
    background: rgba(15, 23, 42, 0.03);
    border: 1px solid rgba(15, 23, 42, 0.09);
    font-size: 9.5px;
    font-weight: 700;
    color: var(--text-secondary);
    padding: 3px 6px;
    cursor: pointer;
    transition: all 0.15s ease;
  }

  .webinar-pill-btn:hover {
    color: var(--text-main);
    background: rgba(16, 185, 129, 0.08);
  }

  .webinar-pill-btn.active {
    background: #059669;
    color: #FFFFFF;
    border-color: #059669;
  }

  [data-theme="dark"] .webinar-pill-btn {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
  }

  [data-theme="dark"] .webinar-pill-btn.active {
    background: #10B981;
    color: #0B0F17;
    border-color: #10B981;
  }

  .sidebar-webinars-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .sidebar-webinar-item {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 8px 9px;
    background: rgba(16, 185, 129, 0.04);
    border: 1px solid rgba(16, 185, 129, 0.14);
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
  }

  [data-theme="dark"] .sidebar-webinar-item {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(52, 211, 153, 0.2);
  }

  .sidebar-webinar-item:hover {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.35);
    transform: translateY(-1px);
  }

  .sidebar-webinar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
    gap: 4px;
  }

  .sidebar-webinar-points {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 6px;
    border-radius: 2px;
    background: rgba(16, 185, 129, 0.18);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #047857;
  }

  [data-theme="dark"] .sidebar-webinar-points {
    background: rgba(52, 211, 153, 0.22);
    border-color: rgba(52, 211, 153, 0.45);
    color: #6EE7B7;
  }

  .sidebar-webinar-points.points-miekkie {
    background: rgba(2, 132, 199, 0.15);
    border-color: rgba(2, 132, 199, 0.35);
    color: #0369A1;
  }

  [data-theme="dark"] .sidebar-webinar-points.points-miekkie {
    background: rgba(56, 189, 248, 0.2);
    border-color: rgba(56, 189, 248, 0.45);
    color: #7DD3FC;
  }

  .sidebar-webinar-date {
    font-size: 9.5px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
  }

  .sidebar-webinar-title {
    font-size: 11px;
    font-weight: 700;
    line-height: 1.34;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
  }

  .sidebar-webinar-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 9.5px;
    color: var(--text-muted);
  }

  .sidebar-webinar-org {
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .sidebar-webinar-cta {
    font-weight: 700;
    color: #059669;
  }

  [data-theme="dark"] .sidebar-webinar-cta {
    color: #34D399;
  }

  /* Portale Edukacyjne & Szkoleniowe (WebinarNIA, e-dukacja, Aptekarska, OIA) */
  .sidebar-portals-card {
    border-color: rgba(2, 132, 199, 0.25);
    background: linear-gradient(180deg, rgba(2, 132, 199, 0.03) 0%, #FFFFFF 100%);
  }

  [data-theme="dark"] .sidebar-portals-card {
    border-color: rgba(56, 189, 248, 0.25);
    background: linear-gradient(180deg, rgba(2, 132, 199, 0.06) 0%, #161C26 100%);
  }

  .sidebar-portals-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .sidebar-portal-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 8px;
    text-decoration: none;
    color: inherit;
    background: rgba(15, 23, 42, 0.02);
    border: 1px solid rgba(15, 23, 42, 0.07);
    transition: background 0.15s, border-color 0.15s, transform 0.12s;
  }

  [data-theme="dark"] .sidebar-portal-item {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.07);
  }

  .sidebar-portal-item:hover {
    background: rgba(2, 132, 199, 0.08);
    border-color: var(--color-brand);
    transform: translateX(2px);
  }

  .sidebar-portal-icon {
    font-size: 15px;
    line-height: 1;
    flex-shrink: 0;
  }

  .sidebar-portal-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .sidebar-portal-name {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .sidebar-portal-desc {
    font-size: 9px;
    color: var(--text-muted);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .sidebar-portal-arrow {
    font-size: 11px;
    font-weight: 700;
    color: var(--color-brand);
    flex-shrink: 0;
  }

}

/* ==========================================================================
   PULS BRANŻY & SOCIAL MEDIA (ORIENTACJA HORYZONTALNA NAD WIADOMOŚCIAMI)
   Globalne style responsywne (Mobile, Tablet, Desktop)
   ========================================================================== */
/* ==============================================================================
   KAFELKI SOCIAL MEDIA - PULS DYSKUSJI FARMACEUTÓW (v5.71 - Pixel-Perfect z makietą)
   ============================================================================== */
.social-pulse-section {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  margin-bottom: 28px;
  padding: 22px 24px;
  border-top: 3px solid var(--border-main);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

[data-theme="dark"] .social-pulse-section {
  background: var(--bg-card);
  border-color: var(--border-card);
  border-top-color: #cbd5e1;
  box-shadow: var(--shadow-card);
}

.social-pulse-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.social-pulse-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.social-pulse-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text-main);
  text-transform: uppercase;
}

.social-pulse-sub {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.badge-social-pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--text-main);
  box-shadow: 0 0 0 0 rgba(15, 23, 42, 0.6);
  animation: pulseMono 1.8s infinite;
}

.social-filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.social-pill-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  padding: 6px 14px;
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: inherit;
}

.social-pill-btn:hover {
  color: var(--text-main);
  border-color: var(--text-main);
}

.social-pill-btn.active {
  background: var(--text-main) !important;
  color: var(--bg-card) !important;
  border-color: var(--text-main) !important;
}

/* Układ horyzontalny: Responsywna siatka kafelków */
.social-horizontal-track {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));
  gap: 11px;
}

/* Karta pojedynczej dyskusji - Zmniejszona o 25% (v6.01) */
.sidebar-social-item,
a.sidebar-social-item {
  display: flex;
  cursor: pointer !important;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none !important;
  color: #1e293b !important;
  background-color: #0f172a !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  padding: 12px 14px !important; /* -25% skalowanie */
  border-radius: 9px !important; /* -25% skalowanie */
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04) !important;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease !important;
  position: relative;
  box-sizing: border-box;
}

[data-theme="dark"] .sidebar-social-item,
[data-theme="dark"] a.sidebar-social-item {
  background-color: #0f172a !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #f1f5f9 !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25) !important;
}

.sidebar-social-item:hover,
a.sidebar-social-item:hover {
  text-decoration: none !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08) !important;
  border-color: #cbd5e1 !important;
}

[data-theme="dark"] .sidebar-social-item:hover,
[data-theme="dark"] a.sidebar-social-item:hover {
  border-color: rgba(255, 255, 255, 0.25) !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4) !important;
}

/* 1. Górny pasek: [Pill Platformy]  [Nazwa Autora] ........ [Data / Czas] */
.social-item-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 7px !important;
  margin-bottom: 8px !important;
}

.social-header-left {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
  min-width: 0 !important;
}

.social-platform-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  font-size: 9.5px !important;
  font-weight: 700 !important;
  padding: 3px 6px !important;
  border-radius: 4px !important;
  line-height: 1.2 !important;
  letter-spacing: -0.1px !important;
  flex-shrink: 0 !important;
}

.social-platform-pill svg {
  display: inline-block !important;
  width: 11px !important;
  height: 11px !important;
  vertical-align: middle !important;
}

.social-platform-pill.platform-x {
  background: #1e293b !important;
  color: #ffffff !important;
}

[data-theme="dark"] .social-platform-pill.platform-x {
  background: #0f172a !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

.social-platform-pill.platform-fb {
  background: #1877f2 !important;
  color: #ffffff !important;
}

.social-platform-pill.platform-ig {
  background: linear-gradient(45deg, #f58529, #dd2a7b, #8134af) !important;
  color: #ffffff !important;
}

.social-author-name {
  font-size: 11px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  letter-spacing: -0.2px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

[data-theme="dark"] .social-author-name {
  color: #f1f5f9 !important;
}

.social-date {
  font-size: 10px !important;
  font-weight: 500 !important;
  color: #64748b !important;
  white-space: nowrap !important;
  letter-spacing: -0.1px !important;
  flex-shrink: 0 !important;
}

[data-theme="dark"] .social-date {
  color: #94a3b8 !important;
}

/* 2. Tytuł posta / dyskusji */
.social-topic-title {
  font-size: 12.5px !important;
  font-weight: 800 !important;
  line-height: 1.3 !important;
  color: #1e293b !important;
  text-decoration: none !important;
  margin: 0 0 8px 0 !important;
  letter-spacing: -0.2px !important;
}

[data-theme="dark"] .social-topic-title {
  color: #f8fafc !important;
}

/* 3. Boks: Głos środowiska i nastroje */
.social-ai-pulse {
  background: #f1f5f9 !important;
  border-left: 3px solid #64748b !important;
  border-radius: 0 6px 6px 0 !important;
  padding: 8px 10px !important;
  margin: 0 0 9px 0 !important;
}

[data-theme="dark"] .social-ai-pulse {
  background: rgba(15, 23, 42, 0.6) !important;
  border-left-color: #94a3b8 !important;
}

.social-pulse-tag {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  margin-bottom: 3px !important;
  letter-spacing: -0.1px !important;
}

[data-theme="dark"] .social-pulse-tag {
  color: #f1f5f9 !important;
}

.social-bubble-icon {
  font-size: 12px !important;
  line-height: 1 !important;
}

.social-pulse-desc {
  font-size: 10.5px !important;
  font-weight: 400 !important;
  line-height: 1.38 !important;
  color: #334155 !important;
  margin: 0 !important;
  letter-spacing: -0.1px !important;
}

[data-theme="dark"] .social-pulse-desc {
  color: #cbd5e1 !important;
}

/* 4. Dolny pasek: Liczba komentarzy / retweetów i przycisk "Dołącz →" */
.social-item-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 7px !important;
  padding-top: 8px !important;
  border-top: 1px solid #e2e8f0 !important;
  margin-top: auto !important;
}

[data-theme="dark"] .social-item-footer {
  border-top-color: rgba(255, 255, 255, 0.1) !important;
}

.social-engagement-stats {
  font-size: 10px !important;
  font-weight: 500 !important;
  color: #64748b !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
  letter-spacing: -0.1px !important;
}

[data-theme="dark"] .social-engagement-stats {
  color: #94a3b8 !important;
}

.social-cta-link {
  font-size: 10.5px !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  text-decoration: none !important;
  letter-spacing: -0.2px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  transition: transform 0.2s ease, color 0.2s ease !important;
}

[data-theme="dark"] .social-cta-link {
  color: #f8fafc !important;
}


/* Stylizacja przycisku strzałki przejścia do artykułu bez napisu (v6.01) */
.social-cta-link {
  font-size: 13px !important;
  font-weight: 800 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 22px !important;
  height: 22px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.08) !important;
  color: var(--text-muted) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  text-decoration: none !important;
  line-height: 1 !important;
}

[data-theme="dark"] .social-cta-link {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #94A3B8 !important;
}

.sidebar-social-item:hover .social-cta-link {
  background: var(--accent-color, #0ea5e9) !important;
  color: #FFFFFF !important;
  transform: translateX(2px) scale(1.05) !important;
}


/* Wersja mobilna: horyzontalna rolka dotykowa ze snap-scrollem */
@media (max-width: 768px) {
  .social-pulse-section {
    padding: 14px 14px !important;
    margin-bottom: 18px !important;
  }

  .social-horizontal-track {
    display: flex !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: 10px !important;
    gap: 10px !important;
  }

  .social-horizontal-track .sidebar-social-item,
  .social-horizontal-track a.sidebar-social-item {
    min-width: 240px !important;
    max-width: 270px !important;
    scroll-snap-align: start !important;
    flex-shrink: 0 !important;
    padding: 14px 16px !important;
  }
}

/* ==========================================================================
   SEKCJA GŁÓWNA: SZKOLENIA & PUNKTY EDUKACYJNE CMKP / OIA (v5.53)
   Orientacja horyzontalna / siatkowa, proste kąty, wysoka jakość cieni
   ========================================================================== */
.webinars-main-section {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-top: 3px solid var(--border-main);
  margin-bottom: 24px;
  padding: 16px 18px;
  box-shadow: var(--shadow-card);
  border-radius: 14px !important;
}

[data-theme="dark"] .webinars-main-section {
  background: var(--bg-card);
  border-color: var(--border-card);
  border-top-color: #CBD5E1;
  box-shadow: var(--shadow-card);
}

.webinars-main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.webinars-main-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.webinars-main-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text-main);
  text-transform: uppercase;
}

.webinars-main-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.webinars-horizontal-track {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.webinars-horizontal-track .sidebar-webinar-item {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--bg-card) !important;
  border: 1px solid var(--border-card) !important;
  border-radius: 12px !important;
  padding: 12px 14px;
  text-decoration: none !important;
  color: var(--text-main) !important;
  box-shadow: var(--shadow-xs);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.16s ease;
}

.webinars-horizontal-track .sidebar-webinar-item:hover {
  transform: translateY(-2.5px);
  box-shadow: var(--shadow-card-hover) !important;
  border-color: var(--text-main) !important;
}

@media (max-width: 768px) {
  .webinars-main-section {
    padding: 12px 14px;
    margin-bottom: 16px;
  }

  .webinars-horizontal-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    gap: 10px;
  }

  .webinars-horizontal-track .sidebar-webinar-item {
    min-width: 280px;
    max-width: 320px;
    scroll-snap-align: start;
    flex-shrink: 0;
  }
}

/* ==========================================================================
   MONIT ZGODY NA PLIKI COOKIES (RODO / GDPR / ePrivacy v5.40)
   Wzorce stosowane na nowoczesnych portalach informacyjnych i medycznych
   ========================================================================== */
.cookie-consent-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 15, 23, 0.65);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 10000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 20px;
  animation: cookieFadeIn 0.25s ease-out;
}

body.cookie-modal-open {
  overflow: hidden;
}

.cookie-consent-overlay.cookie-consent-closing {
  animation: cookieFadeOut 0.22s ease-in forwards;
}

.cookie-consent-card {
  background: var(--bg-card, #FFFFFF);
  border: 1px solid var(--border-card, #E2E8F0);
  border-radius: 12px;
  width: 100%;
  max-width: 740px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.28);
  animation: cookieSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--text-main, #111827);
  box-sizing: border-box;
}

[data-theme="dark"] .cookie-consent-card {
  background: #111622;
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75);
  color: #F8FAFC;
}

.cookie-consent-header {
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border-subtle, #F3F4F6);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

[data-theme="dark"] .cookie-consent-header {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.cookie-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cookie-icon-badge {
  font-size: 24px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--bg-surface-alt, #F1F5F9);
  flex-shrink: 0;
}

[data-theme="dark"] .cookie-icon-badge {
  background: rgba(255, 255, 255, 0.08);
}

.cookie-consent-title {
  font-family: var(--font-heading);
  font-size: 16.5px;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
  letter-spacing: -0.01em;
}

.cookie-consent-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin: 2px 0 0;
}

.cookie-consent-body {
  padding: 16px 22px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.cookie-consent-text {
  margin: 0 0 10px;
}

.cookie-consent-subtext {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-muted);
}

.cookie-consent-subtext a {
  color: var(--color-brand);
  text-decoration: underline;
  font-weight: 600;
}

/* Panel preferencji */
.cookie-preferences-panel {
  margin-top: 14px;
  padding: 14px;
  background: var(--bg-surface-alt, #F8FAFC);
  border: 1px solid var(--border-subtle, #E2E8F0);
  border-radius: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: cookieFadeIn 0.2s ease;
}

[data-theme="dark"] .cookie-preferences-panel {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.cookie-pref-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--border-subtle, rgba(0, 0, 0, 0.08));
}

.cookie-pref-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

[data-theme="dark"] .cookie-pref-item {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.cookie-pref-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.cookie-pref-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.cookie-pref-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.4;
}

.cookie-pref-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(15, 118, 110, 0.12);
  color: var(--color-brand);
  white-space: nowrap;
}

[data-theme="dark"] .cookie-pref-badge {
  background: rgba(20, 184, 166, 0.2);
  color: #2dd4bf;
}

/* Przełącznik suwakowy (Toggle Switch) */
.cookie-toggle-wrap {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}

.cookie-toggle-wrap input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--border-card, #cbd5e1);
  transition: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 24px;
}

.cookie-toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.cookie-toggle-wrap input:checked + .cookie-toggle-slider {
  background-color: var(--color-brand);
}

.cookie-toggle-wrap input:checked + .cookie-toggle-slider:before {
  transform: translateX(20px);
}

/* Stopka przycisków */
.cookie-consent-actions {
  padding: 14px 22px 18px;
  border-top: 1px solid var(--border-subtle, #F3F4F6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

[data-theme="dark"] .cookie-consent-actions {
  border-top-color: rgba(255, 255, 255, 0.08);
}

.cookie-actions-left {
  display: flex;
  align-items: center;
}

.cookie-actions-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.cookie-btn {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.16s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  min-height: 38px;
  box-sizing: border-box;
}

.cookie-btn-primary {
  background: var(--color-brand);
  color: #FFFFFF !important;
  border: 1px solid transparent;
  box-shadow: 0 2px 6px rgba(15, 118, 110, 0.25);
}

.cookie-btn-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.cookie-btn-secondary {
  background: var(--bg-surface-alt, #F1F5F9);
  color: var(--text-main);
  border: 1px solid var(--border-card, #E2E8F0);
}

[data-theme="dark"] .cookie-btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: #F8FAFC;
}

.cookie-btn-secondary:hover {
  background: var(--border-card, #E2E8F0);
  transform: translateY(-1px);
}

.cookie-btn-link {
  background: transparent;
  border: none;
  color: var(--color-brand);
  padding: 6px 4px;
  text-decoration: underline;
  font-size: 12.5px;
  cursor: pointer;
}

.cookie-btn-link:hover {
  filter: brightness(1.2);
}

/* Przycisk w stopce do ponownego otwarcia ustawień cookies */
.footer-cookie-btn {
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  color: var(--text-muted);
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s ease;
}

.footer-cookie-btn:hover {
  color: var(--color-brand);
}

@keyframes cookieFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes cookieFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes cookieSlideUp {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 640px) {
  .cookie-consent-overlay {
    padding: 0;
  }

  .cookie-consent-card {
    border-radius: 14px 14px 0 0;
    max-height: 90vh;
    margin-bottom: 0;
  }

  .cookie-consent-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .cookie-actions-right {
    flex-direction: column;
    width: 100%;
  }

  .cookie-btn {
    width: 100%;
  }

  .cookie-actions-left {
    justify-content: center;
    width: 100%;
  }
}

/* ==========================================================================
   MONOCHROMATYCZNA ARCHITEKTURA EDITORIAL (v5.53)
   Kąty proste (0px), Cienie High-End, Szarości rozdzielające sekcje
   Usunięcie barw krzykliwych z zachowaniem kolorów logo, fotek i social mediów
   ========================================================================== */

/* Antyaliasing i optymalizacja renderowania tekstu */
body, input, button, textarea, select {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* 1. ZAOKRĄGLONE KRAWĘDZIE KAFELEK I KONTENERÓW (border-radius: 14px) - v6.01 */
.tile-card,
.card-item,
.hero-card,
.chapter-frame,
.controls-card,
.sidebar-card,
.sidebar-tile-card,
.static-feature-tile,
.sidebar-alert-card,
.sidebar-alert-item,
.sidebar-webinar-card,
.sidebar-webinar-item,
.sidebar-portals-card,
.sidebar-portal-item,
.social-pulse-section,
.sidebar-social-item,
.social-ai-pulse,
.daily-briefing-card,
.briefing-item-card,
.news-item,
.cookie-consent-card,
.supervisor-modal-card,
.webinars-main-section {
  border-radius: 14px !important;
  overflow: hidden;
}

/* Zaokrąglenia górnych krawędzi okładek/zdjęć w kafelkach */
.tile-photo-wrap,
.tile-cover-photo,
.hero-thumb-wrap,
.hero-thumb-img,
.card-thumb-wrap,
.card-thumb-img,
.tile-static-wrapper,
.tile-static-img {
  border-top-left-radius: 13px !important;
  border-top-right-radius: 13px !important;
  border-bottom-left-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

/* Zaokrąglone przyciski akcji (okrągłe przyciski nagłówkowe i pill buttony) */
.header-circle-btn,
.header-square-btn,
.header-actions .action-btn.icon-only-btn {
  border-radius: 50% !important;
}

.pwa-install-btn,
.sidebar-action-btn,
.cookie-btn,
.supervisor-confirm-btn,
.supervisor-lock-btn,
.supervisor-cancel-btn {
  border-radius: 9999px !important;
}

/* Pigułki, odznaki i tagi */
.tag-pill,
.hero-tag,
.tag-badge,
.card-rank,
.sidebar-webinar-points,
.social-platform-pill,
.social-sentiment-pill,
.webinar-pill-btn,
.social-pill-btn,
.view-mode-btn,
.search-input,
.portal-ticker-pill,
.ticker-reset-filter-btn {
  border-radius: 9999px !important;
}

/* 2. CIENIE WYSOKIEJ JAKOŚCI (HIGH-END ARCHITECTURAL MULTI-LAYER SHADOWS) */
.tile-card,
.card-item,
.hero-card,
.daily-briefing-card,
.briefing-item-card,
.news-item,
.sidebar-card,
.social-pulse-section,
.cookie-consent-card,
.supervisor-modal-card {
  box-shadow: 
    0 1px 2px rgba(15, 23, 42, 0.05),
    0 8px 24px -2px rgba(15, 23, 42, 0.07),
    0 16px 32px -4px rgba(15, 23, 42, 0.04) !important;
  border: 1px solid var(--border-card) !important;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.16s ease !important;
}

.tile-card:hover,
.card-item:hover,
.hero-card:hover,
.briefing-item-card:hover,
.sidebar-social-item:hover {
  transform: translateY(-3px) !important;
  box-shadow: 
    0 2px 4px rgba(15, 23, 42, 0.06),
    0 16px 36px -4px rgba(15, 23, 42, 0.13),
    0 32px 60px -8px rgba(15, 23, 42, 0.08) !important;
  border-color: #0F172A !important;
}

[data-theme="dark"] .tile-card,
[data-theme="dark"] .card-item,
[data-theme="dark"] .hero-card,
[data-theme="dark"] .daily-briefing-card,
[data-theme="dark"] .briefing-item-card,
[data-theme="dark"] .sidebar-card,
[data-theme="dark"] .social-pulse-section,
[data-theme="dark"] .cookie-consent-card,
[data-theme="dark"] .supervisor-modal-card {
  box-shadow: 
    0 2px 6px rgba(0, 0, 0, 0.55),
    0 10px 28px -4px rgba(0, 0, 0, 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.09) !important;
}

[data-theme="dark"] .tile-card:hover,
[data-theme="dark"] .card-item:hover,
[data-theme="dark"] .hero-card:hover,
[data-theme="dark"] .briefing-item-card:hover,
[data-theme="dark"] .sidebar-social-item:hover {
  box-shadow: 
    0 4px 10px rgba(0, 0, 0, 0.65),
    0 20px 48px -4px rgba(0, 0, 0, 0.9),
    inset 0 1px 0 rgba(255, 255, 255, 0.16) !important;
  border-color: #FFFFFF !important;
}

/* 3. ROZDZIELENIE SEKCJI ZA POMOCĄ SZAROŚCI */
.chapter-frame,
.webinars-main-section {
  background: #F8FAFC !important;
  border: 1px solid #CBD5E1 !important;
  border-top: 3px solid #0F172A !important;
  padding: 20px 22px 24px !important;
  margin-bottom: 28px !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05), 0 4px 12px rgba(15, 23, 42, 0.03) !important;
}

[data-theme="dark"] .chapter-frame,
[data-theme="dark"] .webinars-main-section {
  background: #111624 !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  border-top-color: #94A3B8 !important;
}

.chapter-header {
  border-bottom: 2px solid #0F172A !important;
  padding-bottom: 10px !important;
  margin-bottom: 18px !important;
}

[data-theme="dark"] .chapter-header {
  border-bottom-color: #64748B !important;
}

.social-pulse-section {
  background: #F1F5F9 !important;
  border: 1px solid #CBD5E1 !important;
  border-top: 3px solid #0F172A !important;
  padding: 16px 20px !important;
  margin-bottom: 28px !important;
}

[data-theme="dark"] .social-pulse-section {
  background: #141A26 !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  border-top-color: #CBD5E1 !important;
}

.top-announcement-bar {
  background: #E2E8F0 !important;
  border-bottom: 1px solid #CBD5E1 !important;
  color: #1E293B !important;
}

[data-theme="dark"] .top-announcement-bar {
  background: #161D28 !important;
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
  color: #CBD5E1 !important;
}

/* 4. MONOCHROMATYZACJA ELEMENTÓW UI (USUNIĘCIE KRZYKLIWYCH BARW) */
.social-pulse-badge {
  color: var(--text-main) !important;
}

.badge-social-pulse {
  background: var(--text-main) !important;
  box-shadow: 0 0 0 0 rgba(15, 23, 42, 0.6) !important;
  animation: pulseMono 1.8s infinite !important;
}

[data-theme="dark"] .badge-social-pulse {
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.6) !important;
}

@keyframes pulseMono {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(15, 23, 42, 0.6); }
  70% { transform: scale(1); box-shadow: 0 0 0 5px rgba(15, 23, 42, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(15, 23, 42, 0); }
}

.social-pill-btn.active,
.webinar-pill-btn.active,
.view-mode-btn.active {
  background: var(--text-main) !important;
  color: var(--bg-card) !important;
  border-color: var(--text-main) !important;
}

.social-pill-btn,
.webinar-pill-btn,
.view-mode-btn {
  background: var(--bg-subtle) !important;
  color: var(--text-secondary) !important;
  border: 1px solid var(--border-card) !important;
}

.social-cta-link {
  color: var(--text-main) !important;
}

.social-ai-pulse {
  background: #FFFFFF !important;
  border-left: 3px solid var(--text-main) !important;
  color: var(--text-secondary) !important;
}

[data-theme="dark"] .social-ai-pulse {
  background: #111624 !important;
  border-left-color: #CBD5E1 !important;
}

.social-pulse-tag {
  color: var(--text-main) !important;
}

.sidebar-action-btn {
  background: #0F172A !important;
  color: #FFFFFF !important;
  border: none !important;
  box-shadow: var(--shadow-sm) !important;
}

[data-theme="dark"] .sidebar-action-btn {
  background: #F8FAFC !important;
  color: #0F172A !important;
}

.sidebar-webinar-card {
  border-color: var(--border-card) !important;
  background: var(--bg-card) !important;
}

.sidebar-webinar-points {
  background: var(--text-main) !important;
  color: var(--bg-card) !important;
  border: 1px solid var(--border-card) !important;
}

.badge-webinar-pulse {
  background: var(--text-main) !important;
  box-shadow: 0 0 0 0 rgba(15, 23, 42, 0.6) !important;
  animation: pulseMono 1.8s infinite !important;
}

.sidebar-badge-webinar {
  color: var(--text-main) !important;
}

.sidebar-webinar-cta {
  color: var(--text-main) !important;
}

.tag-pill,
.hero-tag,
.tag-badge,
.tag-alert,
.tag-market,
.tag-law,
.tag-practice {
  background: var(--text-main) !important;
  color: var(--bg-card) !important;
  border: 1px solid var(--text-main) !important;
  font-weight: 700 !important;
}

.tag-pill.tag-subtle,
.card-rank {
  background: var(--bg-subtle) !important;
  color: var(--text-main) !important;
  border-color: var(--border-card) !important;
}

.pwa-install-btn {
  background: var(--text-main) !important;
  color: var(--bg-card) !important;
  border-color: var(--text-main) !important;
}

.sidebar-alert-card {
  border-left: 3.5px solid var(--text-main) !important;
}

.sidebar-alert-source {
  color: var(--text-main) !important;
}

.sidebar-alert-item {
  background: var(--bg-subtle) !important;
  border: 1px solid var(--border-card) !important;
}

.sidebar-portal-arrow {
  color: var(--text-main) !important;
}

.sidebar-portals-card {
  border-color: var(--border-card) !important;
}

/* 5. ZACHOWANIE KOLORÓW WYŁĄCZNIE DLA: LOGO, MINIATUREK, LOGO STRON I SOCIAL MEDIÓW */
.brand-logo-light,
.brand-logo-dark,
.brand-logo-badge svg,
.brand-logo-badge img,
.brand-emblem-logo,
.sidebar-source-logo img,
.sidebar-source-logo svg,
.sidebar-portal-icon,
.tile-cover-photo,
.hero-thumb-img,
.card-thumb-img,
.compact-thumb-img {
  filter: none !important; /* Pełny naturalny kolor fotografii i logotypów */
}

/* Logotypy platform społecznościowych zachowują oficjalne barwy */
.social-platform-pill.platform-fb {
  background: #1877F2 !important;
  color: #FFFFFF !important;
}

.social-platform-pill.platform-ig {
  background: linear-gradient(45deg, #F58529, #DD2A7B, #8134AF) !important;
  color: #FFFFFF !important;
}

.social-platform-pill.platform-x {
  background: #000000 !important;
  color: #FFFFFF !important;
}

[data-theme="dark"] .social-platform-pill.platform-x {
  background: #FFFFFF !important;
  color: #000000 !important;
}

.social-sentiment-pill {
  background: var(--bg-subtle) !important;
  color: var(--text-main) !important;
  border: 1px solid var(--border-card) !important;
}

/* 6. TYPOGRAFIA NAGŁÓWKÓW — PRECYZYJNA CZYTELNOŚĆ */
h1, h2, h3, .tile-title, .hero-title, .chapter-title, .modal-title {
  letter-spacing: -0.015em;
}

.tile-snippet, .card-snippet, .hero-snippet {
  line-height: 1.52;
}

/* ==========================================================================
   WERSJA v5.55: GWARANTOWANE DYREKTYWY REDAKCYJNE I ARCHITEKTONICZNE
   ========================================================================== */

/* 1. ZAWSZE ŻÓŁTY PASEK SZUKANIA (STAŁA DYREKTYWA REDAKCYJNA)
   Niezależnie od przyszłych zmian motywu i stylów strony */
.search-box-wrap,
.search-box-wrap .search-form,
.search-box-wrap .search-input-group {
  position: relative;
}

.search-box-wrap .search-input,
#liveSearchInput {
  background-color: #FFC90E !important;
  color: #000000 !important;
  border: 1.5px solid #E0B000 !important;
  border-radius: 9999px !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
}

.search-box-wrap .search-input::placeholder,
#liveSearchInput::placeholder {
  color: rgba(0, 0, 0, 0.65) !important;
  font-weight: 600 !important;
}

.search-box-wrap .search-btn .search-icon,
.search-box-wrap .search-btn svg,
.search-box-wrap .search-clear-btn svg {
  stroke: #000000 !important;
  color: #000000 !important;
}

.search-box-wrap .search-input:focus,
#liveSearchInput:focus {
  background-color: #FFD21E !important;
  border-color: #000000 !important;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.3) !important;
  color: #000000 !important;
}

[data-theme="dark"] .search-box-wrap .search-input,
[data-theme="dark"] #liveSearchInput {
  background-color: #FFC90E !important;
  color: #000000 !important;
  border: 1.5px solid #E0B000 !important;
}

[data-theme="dark"] .search-box-wrap .search-input::placeholder,
[data-theme="dark"] #liveSearchInput::placeholder {
  color: rgba(0, 0, 0, 0.70) !important;
}

[data-theme="dark"] .search-box-wrap .search-btn .search-icon,
[data-theme="dark"] .search-box-wrap .search-btn svg,
[data-theme="dark"] .search-box-wrap .search-clear-btn svg {
  stroke: #000000 !important;
  color: #000000 !important;
}

/* 2. WYRAŹNE ODZNACZENIE KOLOREM CZERWONYM NA HOVER DLA WSZYSTKICH KAFELKÓW */
.tile-card:hover,
.hero-card:hover,
.card-item:hover,
.news-item:hover,
.compact-row:hover,
.social-pulse-card:hover,
.sidebar-social-item:hover,
.sidebar-webinar-item:hover,
.sidebar-alert-item:hover,
.sidebar-portal-item:hover,
.sidebar-card:hover,
.briefing-item-card:hover,
.supervisor-stat-box:hover,
.adsense-banner-wrapper:hover {
  border-color: #DC2626 !important; /* Szlachetna czerwień medyczna */
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.22), 0 1px 3px rgba(0, 0, 0, 0.08) !important;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

[data-theme="dark"] .tile-card:hover,
[data-theme="dark"] .hero-card:hover,
[data-theme="dark"] .card-item:hover,
[data-theme="dark"] .news-item:hover,
[data-theme="dark"] .compact-row:hover,
[data-theme="dark"] .social-pulse-card:hover,
[data-theme="dark"] .sidebar-social-item:hover,
[data-theme="dark"] .sidebar-webinar-item:hover,
[data-theme="dark"] .sidebar-alert-item:hover,
[data-theme="dark"] .sidebar-portal-item:hover,
[data-theme="dark"] .sidebar-card:hover,
[data-theme="dark"] .briefing-item-card:hover,
[data-theme="dark"] .supervisor-stat-box:hover,
[data-theme="dark"] .adsense-banner-wrapper:hover {
  border-color: #EF4444 !important; /* Wyrazisty czerwony w trybie ciemnym */
  box-shadow: 0 6px 22px rgba(239, 68, 68, 0.32), 0 0 0 1px rgba(239, 68, 68, 0.4) !important;
}

/* 3. LOGO W NAGŁÓWKU — ODPOWIADAJĄCE IKONCE Z PASKA (FAVICON) */
.brand-favicon-logo {
  width: 32px;
  height: 32px;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.brand-logo-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 2px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 0 !important;
}

[data-theme="dark"] .brand-logo-badge {
  background: #111622;
  border-color: rgba(255, 255, 255, 0.15);
}

/* 4. BANER REKLAMOWY GOOGLE ADSENSE Z ODSTĘPEM MIĘDZY SZUKANIEM A PULSEM BRANŻY */
.adsense-banner-wrapper {
  margin: 18px 0 22px 0 !important;
  background: var(--bg-card) !important;
  border: 1px solid var(--border-card) !important;
  border-radius: 14px !important;
  padding: 10px 14px 12px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.adsense-banner-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 6px;
  text-align: center;
}

.adsense-banner-inner {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

[data-theme="dark"] .adsense-banner-wrapper {
  background: #111622 !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

/* 5. MONIT COOKIES (RODO / ePrivacy WZÓR MGR.FARM) — BLOKADA STRONY DO KLIKNIĘCIA ZGODY */
body.cookie-modal-open {
  overflow: hidden !important;
}

.cookie-consent-overlay {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(11, 15, 23, 0.78) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  z-index: 99999 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.cookie-consent-card {
  max-width: 680px !important;
  width: 100% !important;
  border-radius: 16px !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5) !important;
  border: 1.5px solid var(--border-card) !important;
}

/* ==========================================================================
   NOWOCZESNE WEKTOROWE ANIMOWANE LOGO APTECZNYHUB (v5.60 - PLUS JAKARTA SANS 800)
   ========================================================================== */
.header-left-spacer {
  flex: 0 0 140px;
  min-width: 140px;
}

.aptecznyhub-logo {
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 475px; /* Powiekszenie widoku napisu logo */
  height: 72px;
  cursor: pointer;
  margin: 0 auto;
  text-decoration: none !important;
  flex: 0 1 auto;
  position: relative;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), filter 0.2s ease;
}

.aptecznyhub-logo svg {
  width: 100%;
  height: 100%;
  max-height: 72px;
  overflow: visible;
  display: block;
}

/* Animacja: Malowanie Pędzlem (Intro / Hero) */
@keyframes brushPaintVertical {
  0% { clip-path: inset(0 0 100% 0); transform: translateY(-10px); }
  60% { clip-path: inset(0 0 0% 0); transform: translateY(2px); }
  100% { clip-path: inset(0 0 0% 0); transform: translateY(0); }
}

@keyframes brushPaintHorizontal {
  0% { clip-path: inset(0 100% 0 0); transform: translateX(-14px); }
  65% { clip-path: inset(0 0% 0 0); transform: translateX(3px); }
  100% { clip-path: inset(0 0% 0 0); transform: translateX(0); }
}

@keyframes wordSlideIn {
  0% { opacity: 0; transform: translateX(-24px); filter: blur(4px); }
  100% { opacity: 1; transform: translateX(0); filter: blur(0); }
}

@keyframes hubPopIn {
  0% { opacity: 0; transform: scale(0.75) translateY(8px); }
  65% { opacity: 1; transform: scale(1.08) translateY(-2px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.aptecznyhub-logo .ah-blue-stroke {
  animation: brushPaintVertical 0.75s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.aptecznyhub-logo .ah-red-stroke {
  clip-path: inset(0 100% 0 0);
  animation: brushPaintHorizontal 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.42s forwards;
}

.aptecznyhub-logo .ah-text-apteczny {
  opacity: 1 !important;
  visibility: visible !important;
  animation: wordSlideIn 0.65s cubic-bezier(0.16, 1, 0.3, 1) 0.82s forwards;
  transition: fill 0.2s ease;
}

.aptecznyhub-logo .ah-text-hub {
  opacity: 1 !important;
  visibility: visible !important;
  display: inline !important;
  fill: #FF2A4D !important;
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.2s ease, fill 0.2s ease;
}

.aptecznyhub-logo .ah-text-pl {
  opacity: 1 !important;
  visibility: visible !important;
  animation: wordSlideIn 0.45s ease-out 1.32s forwards;
  transition: fill 0.2s ease;
}

.aptecznyhub-logo:hover .ah-text-hub {
  transform: scale(1.06);
}

/* Wersja ciemna Logo (Dark Theme - Pełna Dostępność i Czytelność) */
[data-theme="dark"] .aptecznyhub-logo .ah-text-apteczny {
  fill: #FFFFFF !important;
}

[data-theme="dark"] .aptecznyhub-logo .ah-text-pl {
  fill: #E2E8F0 !important;
}

[data-theme="dark"] .aptecznyhub-logo .ah-text-hub {
  fill: #FF334B !important;
}

[data-theme="dark"] .aptecznyhub-logo .ah-cross-group {
  filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.25));
}

@media (max-width: 860px) {
  .header-left-spacer {
    display: none !important;
  }
  .aptecznyhub-logo {
    max-width: 280px;
    height: 52px;
    margin: 0;
  }
  .aptecznyhub-logo svg {
    max-height: 52px;
  }
}

[data-theme="light"] .brand-video-light,
:root:not([data-theme="dark"]) .brand-video-light {
  display: block !important;
}

@media (max-width: 640px) {
  .brand-animated-wrap {
    height: 38px;
  }
  .brand-animated-video,
  .brand-animated-fallback {
    height: 38px;
    max-width: 150px;
  }
}

/* ==========================================================================
   AptecznyHUB v6.01 • Animowane Kafelki i Podstrony: Decyzje GIF & Szkolenia
   ========================================================================== */

/* 1. Kafelki Animowane w Bocznych Skrzydłach i na Urządzeniach Mobilnych */
.sidebar-tile-card {
  padding: 0 !important;
  overflow: hidden;
  border-radius: 12px !important;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
  margin-bottom: 10px !important;
}

.static-feature-tile,
.animated-feature-tile {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  width: 100%;
  color: inherit;
  border-radius: 13px;
  overflow: hidden;
  position: relative;
  background: var(--bg-card);
  transition: all 0.25s ease;
}

.sidebar-tile-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-color, #0ea5e9);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .sidebar-tile-card {
  background: #111827;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .sidebar-tile-card:hover {
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.5), 0 0 16px rgba(14, 165, 233, 0.15);
}

.tile-static-wrapper,
.tile-video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 400 / 90 !important;
  max-height: 86px !important;
  background: transparent !important;
  overflow: hidden;
  display: block;
}

[data-theme="dark"] .tile-static-wrapper,
[data-theme="dark"] .tile-video-wrapper {
  background: transparent !important;
}

.sidebar-tile-card .tile-meta-bar {
  display: none !important;
}

.tile-static-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), filter 0.35s ease;
}

.sidebar-tile-card:hover .tile-static-img {
  transform: scale(1.03);
  filter: brightness(1.06);
}

.tile-video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #090d16;
  overflow: hidden;
}

.tile-feature-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  transition: transform 0.4s ease;
}

.sidebar-tile-card:hover .tile-feature-video {
  transform: scale(1.03);
}

.tile-overlay-glare {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0) 60%);
  pointer-events: none;
}

.tile-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  font-size: 11.5px;
  font-weight: 700;
}

.tile-badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-family: inherit;
}

.tile-badge-tag.badge-gif {
  color: #dc2626;
}

[data-theme="dark"] .tile-badge-tag.badge-gif {
  color: #f87171;
}

.tile-badge-tag.badge-szkolenia {
  color: #0284c7;
}

[data-theme="dark"] .tile-badge-tag.badge-szkolenia {
  color: #38bdf8;
}

.tile-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  animation: tilePulse 1.8s infinite;
}

.tile-pulse-dot.dot-edu {
  background: #0284c7;
  box-shadow: 0 0 0 0 rgba(2, 132, 199, 0.7);
}

@keyframes tilePulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.tile-cta-arrow {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 600;
  transition: color 0.2s ease, transform 0.2s ease;
}

.sidebar-tile-card:hover .tile-cta-arrow {
  color: var(--text-primary);
  transform: translateX(2px);
}

/* Kafelki dla urządzeń mobilnych (< 1200px) */
.mobile-subpage-tiles {
  display: none;
  margin-bottom: 14px !important;
}

@media (max-width: 1199px) {
  .mobile-subpage-tiles {
    display: block;
  }

  .mobile-tiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
  }

  .mobile-tiles-grid .sidebar-tile-card {
    margin-bottom: 0;
  }
}

/* 2. Dedykowane Style Podstron: Decyzje GIF & Szkolenia CMKP */
.subpage-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

.subpage-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding: 12px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

.subpage-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s, transform 0.2s;
}

.subpage-back-link:hover {
  color: var(--accent-color, #0ea5e9);
  transform: translateX(-3px);
}

.subpage-sibling-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 8px;
  background: var(--bg-subtle, #f1f5f9);
  border: 1px solid var(--border-color);
  transition: all 0.2s;
}

[data-theme="dark"] .subpage-sibling-link {
  background: #1f2937;
  border-color: rgba(255, 255, 255, 0.1);
}

.subpage-sibling-link:hover {
  color: var(--text-primary);
  border-color: var(--accent-color);
}

.subpage-hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 32px 28px;
  margin-bottom: 28px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
}

.subpage-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.badge-gif-hero {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

[data-theme="dark"] .badge-gif-hero {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.4);
}

.badge-szkolenia-hero {
  background: rgba(2, 132, 199, 0.12);
  color: #0284c7;
  border: 1px solid rgba(2, 132, 199, 0.3);
}

[data-theme="dark"] .badge-szkolenia-hero {
  background: rgba(2, 132, 199, 0.18);
  color: #7dd3fc;
  border-color: rgba(2, 132, 199, 0.4);
}

.subpage-hero-title {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 10px;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.subpage-hero-desc {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 820px;
  margin: 0;
}

.subpage-controls-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.subpage-search-input-group {
  position: relative;
  width: 100%;
}

.subpage-search-input {
  width: 100%;
  padding: 13px 44px 13px 42px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 14.5px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.subpage-search-input:focus {
  border-color: var(--accent-color, #0ea5e9);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.subpage-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  pointer-events: none;
}

.subpage-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.subpage-pill-btn {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 700;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.subpage-pill-btn:hover {
  color: var(--text-primary);
  border-color: var(--accent-color);
}

.subpage-pill-btn.active {
  background: var(--text-primary);
  color: var(--bg-primary);
  border-color: var(--text-primary);
}

/* 2. Dedykowane Style Kart: Szkolenia CMKP i Decyzje GIF w Stylu Wzorcowym (v5.71)
   Typografia: Plus Jakarta Sans, układ makiety (nagłówek z autor/organ + data, boks szczegółów, stopka z grotem) */

/* Globalne zastosowanie Plus Jakarta Sans na podstronach */
.subpage-container,
.subpage-container h1,
.subpage-container h2,
.subpage-container h3,
.subpage-container p,
.subpage-container span,
.subpage-container strong,
.subpage-container a,
.subpage-container button,
.subpage-container input,
.subpage-hero-card,
.subpage-guide-card,
.subpage-card-item,
.portale-edu-grid,
.legal-container,
.legal-container * {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.subpage-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(460px, 1fr));
  gap: 22px;
  margin-bottom: 36px;
}

@media (max-width: 640px) {
  .subpage-items-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.subpage-card-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  transition: background 0.18s ease, background-color 0.18s ease, border-color 0.16s ease, box-shadow 0.18s ease, transform 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
  display: flex;
  flex-direction: column;
  position: relative;
  box-sizing: border-box;
  text-decoration: none !important;
  color: inherit !important;
  cursor: pointer;
}

/* Akcenty boczne dla kart szkoleń */
.training-card-hard {
  border-left: 5px solid #d97706;
}
.training-card-soft {
  border-left: 5px solid #0284c7;
}

/* Akcenty boczne dla kart orzeczeń GIF */
.decision-card-wycofanie {
  border-left: 5px solid #dc2626;
}
.decision-card-wstrzymanie {
  border-left: 5px solid #d97706;
}
.decision-card-komunikat {
  border-left: 5px solid #2563eb;
}
.decision-card-dopuszczenie {
  border-left: 5px solid #10b981;
}

/* 1. Obszar graficzny z zachowanymi zdjęciami i odznakami */
.subpage-card-visual {
  position: relative;
  width: 100%;
  height: 185px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  overflow: hidden;
}

.subpage-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.subpage-card-item:hover .subpage-card-img {
  transform: scale(1.06);
}

.subpage-card-visual-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.8) 0%, rgba(15, 23, 42, 0.2) 50%, rgba(0,0,0,0.1) 100%);
  pointer-events: none;
}

/* Pływające odznaki na grafice */
.subpage-floating-top {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  z-index: 2;
}

.subpage-floating-bottom {
  position: absolute;
  bottom: 10px;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  z-index: 2;
}

/* Pigułka z logo portalu / organizatora */
.portal-logo-pill {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  padding: 5px 12px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
  max-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.portal-logo-pill img {
  height: 22px;
  max-width: 90px;
  object-fit: contain;
  display: block;
}

[data-theme="dark"] .portal-logo-pill {
  background: rgba(30, 41, 59, 0.94);
  border-color: rgba(255, 255, 255, 0.15);
}

/* Wyraziste odznaki punktów edukacyjnych */
.points-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  color: #ffffff;
}

.points-pill-hard {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 3px 12px rgba(217, 119, 6, 0.45);
}

.points-pill-soft {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 3px 12px rgba(2, 132, 199, 0.4);
}

/* Wyraziste odznaki orzeczeń GIF */
.decision-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.decision-pill-wycofanie {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 3px 14px rgba(220, 38, 38, 0.5);
}

.decision-pill-wstrzymanie {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 3px 14px rgba(217, 119, 6, 0.5);
}

.decision-pill-komunikat {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  box-shadow: 0 3px 14px rgba(29, 78, 216, 0.45);
}

.decision-pill-dopuszczenie {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 3px 14px rgba(16, 185, 129, 0.45);
}

/* Pigułka z datą i statusem na dole grafiki */
.visual-date-pill {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(4px);
  color: #f8fafc;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.visual-badge-free {
  background: rgba(16, 185, 129, 0.95);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  text-transform: uppercase;
}

/* 2. Ciało karty w stylu wzorca makiety (Plus Jakarta Sans, układ, boks szczegółów) */
.subpage-card-body {
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 16px;
}

/* Górny wiersz: [Pill Platformy/Typu] [Nazwa Organizatora/Organu] ........ [Data / Termin] */
.subpage-card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 2px;
}

.subpage-header-left {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
}

.subpage-platform-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 6px;
  line-height: 1.2;
  letter-spacing: -0.1px;
  flex-shrink: 0;
  color: #ffffff;
}

.subpage-platform-pill.pill-hard {
  background: #1e293b;
}

[data-theme="dark"] .subpage-platform-pill.pill-hard {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.subpage-platform-pill.pill-soft {
  background: #0284c7;
}

.subpage-platform-pill.pill-wycofanie {
  background: #dc2626;
}

.subpage-platform-pill.pill-wstrzymanie {
  background: #d97706;
}

.subpage-platform-pill.pill-komunikat {
  background: #2563eb;
}

.subpage-author-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.subpage-date-label {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  letter-spacing: -0.1px;
  flex-shrink: 0;
}

/* Tytuł kafelka - wyrazisty Plus Jakarta Sans ExtraBold 19px */
.training-card-title,
.decision-card-title {
  font-size: 19px !important;
  font-weight: 800 !important;
  line-height: 1.35 !important;
  color: var(--text-primary) !important;
  margin: 0 !important;
  letter-spacing: -0.4px !important;
  transition: color 0.18s ease;
}

.subpage-card-item:hover .training-card-title,
.subpage-card-item:hover .decision-card-title {
  color: var(--accent-color, #0ea5e9) !important;
}

/* Boks szczegółów wzorowany na dymku .social-ai-pulse */
.subpage-quote-box {
  background: var(--bg-subtle, #f1f5f9) !important;
  border-left: 4px solid #64748b;
  border-radius: 0 10px 10px 0;
  padding: 16px 20px;
  margin: 0;
}

[data-theme="dark"] .subpage-quote-box {
  background: rgba(15, 23, 42, 0.6) !important;
  border-left-color: #94a3b8;
}

.subpage-quote-box.quote-hard {
  border-left-color: #d97706 !important;
}

.subpage-quote-box.quote-soft {
  border-left-color: #0284c7 !important;
}

.subpage-quote-box.quote-wycofanie {
  border-left-color: #dc2626 !important;
}

.subpage-quote-box.quote-wstrzymanie {
  border-left-color: #d97706 !important;
}

.subpage-quote-box.quote-komunikat {
  border-left-color: #2563eb !important;
}

.subpage-quote-box.quote-dopuszczenie {
  border-left-color: #10b981 !important;
}

.subpage-quote-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -0.2px;
}

.subpage-quote-icon {
  font-size: 16px;
  line-height: 1;
}

.subpage-quote-desc {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0 0 10px 0;
  letter-spacing: -0.1px;
}

.subpage-quote-meta {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  opacity: 0.9;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px dashed rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .subpage-quote-meta {
  border-top-color: rgba(255, 255, 255, 0.1);
}

/* Siatka parametrów technicznych wewnątrz boksu decyzji */
.decision-tech-inline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(0, 0, 0, 0.08);
  font-size: 12px;
}

[data-theme="dark"] .decision-tech-inline-grid {
  border-top-color: rgba(255, 255, 255, 0.1);
}

.tech-chip {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--text-secondary);
}

.tech-chip strong {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--text-primary);
  opacity: 0.85;
}

.tech-chip-wide {
  grid-column: 1 / -1;
}

/* Stopka karty ze statystyką i przyciskiem CTA z grotem strzałki */
.subpage-card-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding-top: 16px !important;
  border-top: 1px solid var(--border-color) !important;
  margin-top: auto !important;
}

.subpage-card-stats {
  font-size: 14px !important;
  font-weight: 600 !important;
  color: var(--text-secondary) !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  letter-spacing: -0.1px !important;
}

.subpage-cta-link {
  font-size: 14.5px !important;
  font-weight: 800 !important;
  color: var(--text-primary) !important;
  text-decoration: none !important;
  letter-spacing: -0.2px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  transition: transform 0.2s ease, color 0.2s ease !important;
}

.subpage-cta-link:hover {
  color: var(--accent-color, #0ea5e9) !important;
  transform: translateX(3px) !important;
}

.subpage-cta-link .cta-arrow {
  font-size: 16px;
  line-height: 1;
  transition: transform 0.2s ease;
}

.subpage-cta-link:hover .cta-arrow {
  transform: translateX(2px);
}

/* Sekcja portale edukacyjne - kafelki z logotypami */
.portale-edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.portal-edu-card {
  padding: 16px 18px;
  background: var(--bg-subtle, #f8fafc);
  border-radius: 14px;
  border: 1px solid var(--border-color);
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.2s ease;
}

.portal-edu-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-color);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.portal-edu-logo-wrap {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  flex-shrink: 0;
}

[data-theme="dark"] .portal-edu-logo-wrap {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.1);
}

.portal-edu-logo-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.subpage-guide-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 26px 28px;
  margin-top: 36px;
}

.subpage-guide-title {
  font-size: 16.5px;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--text-primary);
}

.subpage-guide-list {
  padding-left: 20px;
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}

.subpage-guide-list li {
  margin-bottom: 6px;
}

@media (max-width: 768px) {
  .subpage-hero-card {
    padding: 22px 18px;
  }
  .subpage-hero-title {
    font-size: 22px;
  }
  .subpage-container {
    padding: 16px 14px 40px;
  }
}

/* ==============================================================================
   WYRAŹNE ŻÓŁTE ODZNACZENIE NA HOVER DLA KAFELKÓW (ARTYKUŁY I SOCIAL MEDIA - v5.60)
   ============================================================================== */
.tile-card,
.hero-card,
.card-item,
.briefing-item-card,
.sidebar-social-item,
.social-pulse-card,
.news-item,
.compact-row,
.subpage-item-card,
.webinar-rich-card,
.gif-decision-card,
.subpage-card-item {
  transition: background 0.18s ease, background-color 0.18s ease, border-color 0.16s ease, box-shadow 0.18s ease, transform 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Tryb Jasny - Ciepły, słoneczny odcień żółty z bursztynową ramką */
.tile-card:hover,
.hero-card:hover,
.card-item:hover,
.briefing-item-card:hover,
.sidebar-social-item:hover,
.social-pulse-card:hover,
.news-item:hover,
.compact-row:hover,
.subpage-item-card:hover,
.webinar-rich-card:hover,
.gif-decision-card:hover,
.subpage-card-item:hover {
  background: #FEF9C3 !important; /* Elegancki, czytelny odcień żółty (Tailwind Yellow-100) */
  background-color: #FEF9C3 !important;
  border-color: #EAB308 !important; /* Wyrazista bursztynowo-złota ramka */
  box-shadow: 0 10px 28px rgba(234, 179, 8, 0.28), 0 2px 6px rgba(0, 0, 0, 0.06) !important;
  transform: translateY(-3px) !important;
}

.tile-card:hover .tile-title,
.hero-card:hover .hero-title,
.card-item:hover .card-title,
.briefing-item-card:hover .briefing-item-title,
.sidebar-social-item:hover .social-topic-title,
.subpage-item-card:hover .subpage-item-title,
.webinar-rich-card:hover .webinar-rich-title,
.gif-decision-card:hover .decision-medicine-name {
  color: #854D0E !important; /* Głęboki, kontrastowy brąz/bursztyn na żółtym tle */
}

.sidebar-social-item:hover .social-ai-pulse {
  background: rgba(254, 240, 138, 0.7) !important;
  border-left-color: #CA8A04 !important;
}

/* Tryb Ciemny - Głęboki, szlachetny złocisto-bursztynowy odcień żółtego */
[data-theme="dark"] .tile-card:hover,
[data-theme="dark"] .hero-card:hover,
[data-theme="dark"] .card-item:hover,
[data-theme="dark"] .briefing-item-card:hover,
[data-theme="dark"] .sidebar-social-item:hover,
[data-theme="dark"] .social-pulse-card:hover,
[data-theme="dark"] .news-item:hover,
[data-theme="dark"] .compact-row:hover,
[data-theme="dark"] .subpage-item-card:hover,
[data-theme="dark"] .webinar-rich-card:hover,
[data-theme="dark"] .gif-decision-card:hover,
[data-theme="dark"] .subpage-card-item:hover {
  background: #2D2305 !important; /* Ciemny, złocisty odcień żółtego w trybie nocnym */
  background-color: #2D2305 !important;
  border-color: #FACC15 !important; /* Jasnożółta, świecąca ramka */
  box-shadow: 0 10px 30px rgba(234, 179, 8, 0.35), 0 0 0 1px rgba(250, 204, 21, 0.5) !important;
  transform: translateY(-3px) !important;
}

[data-theme="dark"] .tile-card:hover .tile-title,
[data-theme="dark"] .hero-card:hover .hero-title,
[data-theme="dark"] .card-item:hover .card-title,
[data-theme="dark"] .briefing-item-card:hover .briefing-item-title,
[data-theme="dark"] .sidebar-social-item:hover .social-topic-title,
[data-theme="dark"] .subpage-item-card:hover .subpage-item-title,
[data-theme="dark"] .webinar-rich-card:hover .webinar-rich-title,
[data-theme="dark"] .gif-decision-card:hover .decision-medicine-name {
  color: #FEF08A !important; /* Rozświetlony, czytelny żółty tekst */
}

[data-theme="dark"] .sidebar-social-item:hover .social-ai-pulse {
  background: rgba(45, 35, 5, 0.9) !important;
  border-left-color: #FACC15 !important;
}

/* Wzorcowe żółte odznaczenie dla kart podstron (Szkolenia CMKP i Decyzje GIF) */
.subpage-card-item:hover .training-card-title,
.subpage-card-item:hover .decision-card-title {
  color: #854D0E !important;
}

.subpage-card-item:hover .subpage-author-name {
  color: #854D0E !important;
}

.subpage-card-item:hover .subpage-date-label {
  color: #713F12 !important;
}

.subpage-card-item:hover .subpage-quote-box {
  background: rgba(254, 240, 138, 0.65) !important;
  border-left-color: #CA8A04 !important;
}

.subpage-card-item:hover .subpage-quote-tag {
  color: #854D0E !important;
}

.subpage-card-item:hover .subpage-quote-desc {
  color: #451A03 !important;
}

.subpage-card-item:hover .subpage-card-footer {
  border-top-color: rgba(234, 179, 8, 0.4) !important;
}

.subpage-card-item:hover .subpage-card-stats {
  color: #713F12 !important;
}

.subpage-card-item:hover .subpage-cta-link {
  color: #854D0E !important;
}

.subpage-card-item:hover .subpage-cta-link .cta-arrow {
  transform: translateX(4px) !important;
}

/* Tryb Ciemny - Żółte odznaczenie kart podstron */
[data-theme="dark"] .subpage-card-item:hover .training-card-title,
[data-theme="dark"] .subpage-card-item:hover .decision-card-title {
  color: #FEF08A !important;
}

[data-theme="dark"] .subpage-card-item:hover .subpage-author-name {
  color: #FEF08A !important;
}

[data-theme="dark"] .subpage-card-item:hover .subpage-date-label {
  color: #FDE047 !important;
}

[data-theme="dark"] .subpage-card-item:hover .subpage-quote-box {
  background: rgba(45, 35, 5, 0.85) !important;
  border-left-color: #FACC15 !important;
}

[data-theme="dark"] .subpage-card-item:hover .subpage-quote-tag {
  color: #FEF08A !important;
}

[data-theme="dark"] .subpage-card-item:hover .subpage-quote-desc {
  color: #FEF9C3 !important;
}

[data-theme="dark"] .subpage-card-item:hover .subpage-card-footer {
  border-top-color: rgba(250, 204, 21, 0.35) !important;
}

[data-theme="dark"] .subpage-card-item:hover .subpage-card-stats {
  color: #FDE047 !important;
}

[data-theme="dark"] .subpage-card-item:hover .subpage-cta-link {
  color: #FEF08A !important;
}

[data-theme="dark"] .subpage-card-item:hover .subpage-cta-link .cta-arrow {
  transform: translateX(4px) !important;
}

/* Wyłączenie prawego panelu bocznego (układ 2-kolumnowy z szerokim lewym panelem) */
.sidebar-wing-right {
  display: none !important;
}

/* ==========================================================================
   PASEK INFORMACYJNY (TICKER) MONITOROWANYCH PORTALI W STOPCE
   ========================================================================== */
.portals-ticker-section {
  margin-top: 24px;
  margin-bottom: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  padding: 16px 20px;
  border-radius: 14px !important;
}

.portals-ticker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.portals-ticker-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text-main);
  text-transform: uppercase;
}

.portals-ticker-note {
  font-size: 12px;
  color: var(--text-muted);
}

.ticker-reset-filter-btn {
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-card);
  color: var(--text-main);
  cursor: pointer;
  border-radius: 9999px !important;
  transition: all 0.2s ease;
}

.ticker-reset-filter-btn:hover {
  background: #E31826;
  border-color: #E31826;
  color: #FFFFFF;
}

.portals-ticker-wrapper {
  overflow: hidden;
  position: relative;
  width: 100%;
  mask-image: linear-gradient(to right, transparent, black 3%, black 97%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 3%, black 97%, transparent);
  padding: 6px 0;
}

.portals-ticker-track {
  display: flex;
  gap: 14px;
  width: max-content;
  animation: tickerMarquee 50s linear infinite;
  will-change: transform;
}

.portals-ticker-wrapper:hover .portals-ticker-track {
  animation-play-state: paused;
}

@keyframes tickerMarquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.portal-ticker-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-card);
  border-radius: 9999px !important;
  color: var(--text-main);
  text-decoration: none;
  white-space: nowrap;
  font-size: 12.5px;
  font-weight: 600;
  transition: all 0.2s ease;
  flex-shrink: 0;
  cursor: pointer;
  user-select: none;
}

.portal-ticker-pill:hover,
.portal-ticker-pill.active {
  background: #FEF9C3 !important;
  border-color: #EAB308 !important;
  color: #854D0E !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(234, 179, 8, 0.25);
}

[data-theme="dark"] .portal-ticker-pill {
  background: #111827;
  border-color: rgba(255, 255, 255, 0.12);
  color: #E2E8F0;
}

[data-theme="dark"] .portal-ticker-pill:hover,
[data-theme="dark"] .portal-ticker-pill.active {
  background: #2D2305 !important;
  border-color: #FACC15 !important;
  color: #FEF08A !important;
  box-shadow: 0 4px 14px rgba(234, 179, 8, 0.35);
}

.portal-ticker-logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
  border-radius: 0;
  flex-shrink: 0;
}

.portal-ticker-name {
  line-height: 1;
}

.portal-ticker-count {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 9999px !important;
  color: var(--text-secondary);
}

[data-theme="dark"] .portal-ticker-count {
  background: rgba(255, 255, 255, 0.08);
  color: #94A3B8;
}

.portal-ticker-pill:hover .portal-ticker-count,
.portal-ticker-pill.active .portal-ticker-count {
  background: rgba(234, 179, 8, 0.25);
  color: #854D0E;
}

[data-theme="dark"] .portal-ticker-pill:hover .portal-ticker-count,
[data-theme="dark"] .portal-ticker-pill.active .portal-ticker-count {
  background: rgba(250, 204, 21, 0.25);
  color: #FEF08A;
}


/* ==========================================================================
   KLARO! CMP - PLATFORMA ZGÓD COOKIES I RODO (v5.71)
   ========================================================================== */
.klaro {
  font-family: 'Open Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  z-index: 100000 !important;
}

.klaro .cookie-notice,
.klaro .cookie-modal .cm-modal {
  background: var(--bg-card, #FFFFFF) !important;
  color: var(--text-primary, #0F172A) !important;
  border: 1px solid var(--border-color, #E2E8F0) !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25) !important;
  border-radius: 12px !important;
}

[data-theme="dark"] .klaro .cookie-notice,
[data-theme="dark"] .klaro .cookie-modal .cm-modal {
  background: #1E293B !important;
  color: #F8FAFC !important;
  border-color: #334155 !important;
}

.klaro .cookie-notice {
  max-width: 760px !important;
  margin: 0 auto 16px auto !important;
  border-radius: 12px !important;
  padding: 20px 24px !important;
}

.klaro .cm-modal .cm-header {
  border-bottom: 1px solid var(--border-color, #E2E8F0) !important;
  padding-bottom: 14px !important;
  margin-bottom: 16px !important;
}

.klaro .cm-title {
  font-size: 19px !important;
  font-weight: 700 !important;
  color: var(--text-primary, #0F172A) !important;
  margin-bottom: 8px !important;
}

[data-theme="dark"] .klaro .cm-title {
  color: #F8FAFC !important;
}

.klaro .cm-description,
.klaro .cookie-notice p {
  font-size: 13.5px !important;
  line-height: 1.55 !important;
  color: var(--text-secondary, #475569) !important;
}

[data-theme="dark"] .klaro .cm-description,
[data-theme="dark"] .klaro .cookie-notice p {
  color: #94A3B8 !important;
}

.klaro .cm-btn {
  font-weight: 600 !important;
  font-size: 13px !important;
  padding: 9px 18px !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  border: 1px solid transparent !important;
}

.klaro .cm-btn-success {
  background: #059669 !important;
  color: #FFFFFF !important;
}
.klaro .cm-btn-success:hover {
  background: #047857 !important;
}

.klaro .cm-btn-danger,
.klaro .cm-btn-decline {
  background: var(--bg-surface, #F1F5F9) !important;
  color: var(--text-primary, #0F172A) !important;
  border: 1px solid var(--border-color, #CBD5E1) !important;
}
.klaro .cm-btn-danger:hover,
.klaro .cm-btn-decline:hover {
  background: rgba(0, 0, 0, 0.06) !important;
}

[data-theme="dark"] .klaro .cm-btn-danger,
[data-theme="dark"] .klaro .cm-btn-decline {
  background: #0F172A !important;
  color: #E2E8F0 !important;
  border-color: #334155 !important;
}

.klaro .cm-btn-info {
  background: #2563EB !important;
  color: #FFFFFF !important;
}
.klaro .cm-btn-info:hover {
  background: #1D4ED8 !important;
}

.klaro .cookie-modal .cm-switch .slider {
  background-color: var(--border-color, #CBD5E1) !important;
}
.klaro .cookie-modal .cm-switch input:checked + .slider {
  background-color: #059669 !important;
}


/* ==========================================================================
   SUBPAGE HEADER BACK LINK
   ========================================================================== */
/* Subpage header-back-link modern pill style */
.header-back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 9999px;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: none !important;
  background: rgba(248, 250, 252, 0.88);
  color: #334155;
  border: 1px solid rgba(226, 232, 240, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-back-link:hover {
  background: #F1F5F9;
  color: #0F172A;
  border-color: #CBD5E1;
  transform: translateY(-1.5px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

[data-theme="dark"] .header-back-link {
  background: rgba(30, 41, 59, 0.85);
  color: #E2E8F0;
  border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .header-back-link:hover {
  background: rgba(51, 65, 85, 0.9);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.25);
}


/* ==========================================================================
   KOMPAKTOWE OKNA DECYZJI GIF (v6.21) - ZMNIEJSZENIE O POŁOWĘ, PRZEARANŻOWANIE GRAFIK
   ========================================================================== */

/* 1. Hero z przezaaranżowaną grafiką statyczną */
.subpage-hero-with-tile {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 24px !important;
  padding: 24px 28px !important;
}

.subpage-hero-content {
  flex: 1 !important;
  min-width: 0 !important;
}

.subpage-hero-desc {
  font-size: 13.5px !important;
  color: var(--text-secondary) !important;
  margin: 6px 0 0 0 !important;
  line-height: 1.45 !important;
}

.subpage-hero-graphic-wrap {
  flex-shrink: 0 !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12) !important;
  border: 1px solid var(--border-color) !important;
  background: var(--bg-card) !important;
}

.subpage-hero-graphic-wrap .hero-static-tile {
  display: block !important;
  width: 280px !important;
  height: 63px !important;
  object-fit: cover !important;
}

.subpage-hero-graphic-wrap .tile-img-comic {
  display: none !important;
}

[data-theme="comic-dark"] .subpage-hero-graphic-wrap .tile-img-standard,
[data-theme="comic-light"] .subpage-hero-graphic-wrap .tile-img-standard {
  display: none !important;
}

[data-theme="comic-dark"] .subpage-hero-graphic-wrap .tile-img-comic,
[data-theme="comic-light"] .subpage-hero-graphic-wrap .tile-img-comic {
  display: block !important;
}

@media (max-width: 860px) {
  .subpage-hero-with-tile {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 16px !important;
  }
  .subpage-hero-graphic-wrap {
    width: 100% !important;
    max-width: 320px !important;
  }
  .subpage-hero-graphic-wrap .hero-static-tile {
    width: 100% !important;
  }
}

/* 2. Kompaktowa karta decyzji GIF - zmniejszona o połowę (~165px wysokości zamiast ~565px) */
.subpage-card-item.decision-compact-card {
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch !important;
  min-height: 155px !important;
  border-radius: 14px !important;
  overflow: hidden !important;
  background: var(--bg-card) !important;
  border: 1px solid var(--border-color) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04) !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease !important;
  text-decoration: none !important;
  color: inherit !important;
}

.subpage-card-item.decision-compact-card:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08) !important;
  border-color: var(--accent-color, #0ea5e9) !important;
}

[data-theme="dark"] .subpage-card-item.decision-compact-card {
  background: #111827 !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35) !important;
}

[data-theme="dark"] .subpage-card-item.decision-compact-card:hover {
  border-color: rgba(239, 68, 68, 0.45) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 16px rgba(220, 38, 38, 0.15) !important;
}

/* 3. Przezaaranżowana stała grafika na lewy panel (miniaturowy panel wizualny) */
.decision-card-thumb {
  position: relative !important;
  width: 135px !important;
  min-width: 135px !important;
  max-width: 135px !important;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 10px 8px !important;
  box-sizing: border-box !important;
  flex-shrink: 0 !important;
}

.decision-thumb-img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  opacity: 0.38 !important;
  transition: transform 0.35s ease, opacity 0.35s ease !important;
}

.decision-compact-card:hover .decision-thumb-img {
  transform: scale(1.08) !important;
  opacity: 0.52 !important;
}

.decision-thumb-overlay {
  position: absolute !important;
  inset: 0 !important;
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.35) 0%, rgba(15, 23, 42, 0.88) 100%) !important;
  pointer-events: none !important;
}

.decision-thumb-logo-wrap {
  position: relative !important;
  z-index: 2 !important;
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(4px) !important;
  padding: 4px 8px !important;
  border-radius: 6px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
  max-height: 28px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

[data-theme="dark"] .decision-thumb-logo-wrap {
  background: rgba(30, 41, 59, 0.94) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

.decision-thumb-logo {
  height: 18px !important;
  max-width: 75px !important;
  object-fit: contain !important;
  display: block !important;
}

.decision-thumb-badge {
  position: relative !important;
  z-index: 2 !important;
  font-size: 10.5px !important;
  font-weight: 800 !important;
  letter-spacing: 0.3px !important;
  text-transform: uppercase !important;
  padding: 4px 7px !important;
  border-radius: 6px !important;
  color: #ffffff !important;
  text-align: center !important;
  white-space: nowrap !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

/* 4. Zwięzła treść karty bez zduplikowanych elementów */
.decision-card-body {
  padding: 12px 16px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  flex: 1 !important;
  min-width: 0 !important;
  gap: 6px !important;
}

.decision-card-header-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
}

.decision-author-name {
  font-size: 12.5px !important;
  font-weight: 700 !important;
  color: var(--text-primary) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.decision-date-label {
  font-size: 11.5px !important;
  font-weight: 600 !important;
  color: var(--text-secondary) !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

.decision-card-title {
  font-size: 15px !important;
  font-weight: 800 !important;
  line-height: 1.35 !important;
  color: var(--text-primary) !important;
  margin: 0 !important;
  letter-spacing: -0.2px !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  transition: color 0.18s ease !important;
}

.decision-compact-card:hover .decision-card-title {
  color: var(--accent-color, #0ea5e9) !important;
}

.decision-series-row {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-wrap: wrap !important;
}

.decision-series-chip {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  padding: 2px 8px !important;
  border-radius: 4px !important;
  background: var(--bg-subtle, #f1f5f9) !important;
  border: 1px solid var(--border-color) !important;
  font-size: 11.5px !important;
  color: var(--text-primary) !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

[data-theme="dark"] .decision-series-chip {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

.decision-series-chip strong {
  color: #dc2626 !important;
  font-weight: 700 !important;
}

[data-theme="dark"] .decision-series-chip strong {
  color: #f87171 !important;
}

.decision-card-desc {
  font-size: 12.5px !important;
  line-height: 1.45 !important;
  color: var(--text-secondary) !important;
  margin: 0 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.decision-card-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  padding-top: 6px !important;
  border-top: 1px solid var(--border-color) !important;
  margin-top: auto !important;
}

/* 5. Całkowite ukrycie zbędnej dyrektywy aptecznej (zgodnie ze zgłoszeniem ze screena) */
.pharmacy-directive-box {
  display: none !important;
}

/* 6. Responsywność dla urządzeń mobilnych */
@media (max-width: 640px) {
  .subpage-card-item.decision-compact-card {
    min-height: 135px !important;
  }
  .decision-card-thumb {
    width: 100px !important;
    min-width: 100px !important;
    max-width: 100px !important;
    padding: 8px 4px !important;
  }
  .decision-card-body {
    padding: 10px 12px !important;
    gap: 4px !important;
  }
  .decision-card-title {
    font-size: 13.5px !important;
    line-height: 1.3 !important;
  }
  .decision-card-desc {
    display: none !important;
  }
  .decision-thumb-badge {
    font-size: 9px !important;
    padding: 3px 5px !important;
  }
}



/* TRWAŁE UKRYCIE PUBLICZNYCH PLAKIETEK AUDYTOWYCH (v6.22) */
.subpage-verified-badge,
.verified-badge {
  display: none !important;
}

/* ==========================================================================
   EDITORIAL SUB-NAVIGATION (SZYBKI DOSTĘP: GIF, CMKP, BAZA WIEDZY)
   ========================================================================== */
.editorial-quicknav {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 0 0 18px 0;
}

@media (max-width: 680px) {
  .editorial-quicknav {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

.quicknav-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 10px 14px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
}

[data-theme="dark"] .quicknav-card {
  background: #111622;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.quicknav-card:hover {
  border-color: #CBD5E1;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .quicknav-card:hover {
  background: #151C2C;
  border-color: rgba(255, 255, 255, 0.2);
}

.quicknav-icon-box {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.quicknav-gif .quicknav-icon-box {
  background: #FEF2F2;
  color: #DC2626;
  border: 1px solid #FECACA;
}

[data-theme="dark"] .quicknav-gif .quicknav-icon-box {
  background: #2A1215;
  color: #EF4444;
  border-color: #7F1D1D;
}

.quicknav-cmkp .quicknav-icon-box {
  background: #EFF6FF;
  color: #2563EB;
  border: 1px solid #BFDBFE;
}

[data-theme="dark"] .quicknav-cmkp .quicknav-icon-box {
  background: #101E38;
  color: #60A5FA;
  border-color: #1E3A8A;
}

.quicknav-baza .quicknav-icon-box {
  background: #F0FDF4;
  color: #16A34A;
  border: 1px solid #BBF7D0;
}

[data-theme="dark"] .quicknav-baza .quicknav-icon-box {
  background: #0E2718;
  color: #4ADE80;
  border-color: #14532D;
}

.quicknav-icon-box svg {
  width: 17px;
  height: 17px;
}

.quicknav-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.quicknav-sub {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748B;
}

[data-theme="dark"] .quicknav-sub {
  color: #94A3B8;
}

.quicknav-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #0F172A;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-theme="dark"] .quicknav-name {
  color: #F8FAFC;
}

.quicknav-pill {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 2px 7px;
  border-radius: 4px;
  flex-shrink: 0;
}

.pill-gif {
  background: #FEE2E2;
  color: #991B1B;
}
[data-theme="dark"] .pill-gif {
  background: #3B1219;
  color: #FCA5A5;
}

.pill-cmkp {
  background: #DBEAFE;
  color: #1E40AF;
}
[data-theme="dark"] .pill-cmkp {
  background: #172554;
  color: #93C5FD;
}

.pill-baza {
  background: #DCFCE7;
  color: #166534;
}
[data-theme="dark"] .pill-baza {
  background: #052E16;
  color: #86EFAC;
}

/* ==========================================================================
   LEDE STORY CARD (WIODĄCY TEMAT DNIA - EDITORIAL 2026)
   ========================================================================== */
.lede-story-wrapper {
  margin: 0 0 20px 0;
  width: 100%;
}

.lede-story-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

[data-theme="dark"] .lede-story-card {
  background: #111622;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.lede-story-card:hover {
  border-color: #CBD5E1;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .lede-story-card:hover {
  background: #151C2C;
  border-color: rgba(255, 255, 255, 0.2);
}

.lede-story-card.lede-text-only {
  grid-template-columns: 1fr;
}

@media (max-width: 860px) {
  .lede-story-card {
    grid-template-columns: 1fr;
    display: flex;
    flex-direction: column-reverse;
  }
}

.lede-card-content {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

@media (max-width: 600px) {
  .lede-card-content {
    padding: 16px 18px;
    gap: 10px;
  }
}

.lede-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.editorial-lede-badge {
  background: #0F172A;
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  flex-shrink: 0;
}

[data-theme="dark"] .editorial-lede-badge {
  background: #38BDF8;
  color: #0F172A;
}

.lede-title {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0;
  color: #0F172A;
}

[data-theme="dark"] .lede-title {
  color: #F8FAFC;
}

.lede-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

.lede-title a:hover {
  color: #2563EB;
}

[data-theme="dark"] .lede-title a:hover {
  color: #60A5FA;
}

@media (max-width: 600px) {
  .lede-title {
    font-size: 18px;
    line-height: 1.3;
  }
}

.lede-snippet {
  font-size: 14.5px;
  line-height: 1.5;
  color: #475569;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

[data-theme="dark"] .lede-snippet {
  color: #94A3B8;
}

.lede-why-matters {
  background: #F8FAFC;
  border-left: 3px solid #2563EB;
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1.45;
  color: #334155;
}

[data-theme="dark"] .lede-why-matters {
  background: #162032;
  border-left-color: #60A5FA;
  color: #CBD5E1;
}

.lede-footer-action {
  margin-top: 4px;
}

.lede-read-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #0F172A;
  color: #FFFFFF !important;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  padding: 7px 16px;
  border-radius: 6px;
  transition: background 0.18s ease, transform 0.18s ease;
}

.lede-read-btn:hover {
  background: #1E293B;
  transform: translateX(2px);
}

[data-theme="dark"] .lede-read-btn {
  background: #2563EB;
  color: #FFFFFF !important;
}

[data-theme="dark"] .lede-read-btn:hover {
  background: #1D4ED8;
}

.lede-photo-wrap {
  width: 100%;
  height: 100%;
  min-height: 220px;
  overflow: hidden;
  background: #F1F5F9;
  position: relative;
}

[data-theme="dark"] .lede-photo-wrap {
  background: #161C26;
}

.lede-cover-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.lede-story-card:hover .lede-cover-photo {
  transform: scale(1.03);
}

/* HIGH DENSITY STREAM CARD - KARTY BEZ ZDJĘĆ */
.tile-card.card-no-photo .tile-card-body {
  padding: 16px 18px 20px !important;
}

.tile-card.card-no-photo .tile-title {
  font-size: 16px !important;
  line-height: 1.38 !important;
}


/* v8.5: Usunięcie statycznego paska wiadomości z góry strony */
.top-breaking-ticker {
  display: none !important;
}
