/*
Theme Name: PTORL
Theme URI: https://ptorl.pl
Author: Mateusz Mróz
Description: Portal Polskiego Towarzystwa Otorynolaryngologów — Chirurgów Głowy i Szyi
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.1
License: Proprietary
Text Domain: ptorl
*/

/* Design tokens — przeniesione z Lovable (index.css) */
:root {
  --primary:          hsl(6, 75%, 65%);
  --primary-dark:     hsl(6, 75%, 55%);
  --primary-fg:       #ffffff;

  --secondary:        hsl(8, 80%, 94%);
  --secondary-fg:     hsl(340, 40%, 25%);

  --accent:           hsl(340, 65%, 60%);
  --accent-fg:        #ffffff;

  --bg:               hsl(20, 30%, 97%);
  --fg:               hsl(0, 0%, 18%);

  --card:             #ffffff;
  --card-fg:          hsl(0, 0%, 18%);

  --muted:            hsl(20, 15%, 93%);
  --muted-fg:         hsl(15, 8%, 45%);

  --border:           hsl(20, 20%, 88%);
  --radius:           0.75rem;

  --gradient-primary: linear-gradient(90deg, hsl(6, 80%, 68%) 0%, hsl(340, 65%, 60%) 100%);
  --gradient-hero:    linear-gradient(135deg, hsl(6, 80%, 65%) 0%, hsl(340, 65%, 55%) 100%);

  --shadow-soft:   0 4px 20px -4px hsl(15 20% 30% / 0.08);
  --shadow-medium: 0 8px 30px -8px hsl(15 20% 30% / 0.12);
  --shadow-strong: 0 16px 50px -12px hsl(15 20% 30% / 0.18);

  --font-sans:    'Plus Jakarta Sans', system-ui, sans-serif;
  --font-display: 'Playfair Display', serif;
}

/* Reset & base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  background-color: var(--bg);
  color: var(--fg);
}

body {
  min-height: 100vh;
  line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

/* Layout */
.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-main {
  flex: 1;
  padding-bottom: 5rem; /* przestrzeń na bottom nav */
}

.container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Utility */
.gradient-primary { background: var(--gradient-primary); }
.gradient-hero    { background: var(--gradient-hero); }

.shadow-soft   { box-shadow: var(--shadow-soft); }
.shadow-medium { box-shadow: var(--shadow-medium); }

.text-primary  { color: var(--primary); }
.text-muted    { color: var(--muted-fg); }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border-width: 0;
}

/* Card */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge-primary  { background: var(--primary); color: var(--primary-fg); }
.badge-accent   { background: var(--accent);  color: var(--accent-fg); }
.badge-muted    { background: var(--muted);   color: var(--muted-fg); }
.badge-secondary { background: var(--secondary); color: var(--secondary-fg); }

/* Button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s, transform 0.1s;
  text-decoration: none;
}
.btn:hover { opacity: 0.9; text-decoration: none; }
.btn:active { transform: scale(0.98); }

.btn-primary  { background: var(--gradient-primary); color: var(--primary-fg); }
.btn-outline  { background: transparent; border: 1.5px solid var(--border); color: var(--fg); }
.btn-ghost    { background: transparent; color: var(--muted-fg); }
.btn-full     { width: 100%; }
.btn-lg       { padding: 0.875rem 1.5rem; font-size: 1rem; }
.btn-sm       { padding: 0.375rem 0.75rem; font-size: 0.75rem; }
.btn-icon     { padding: 0.5rem; width: 2.25rem; height: 2.25rem; }

/* Glass effect (header/nav) */
.glass {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: hsl(0 0% 100% / 0.85);
}

/* Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}

.animate-fade-up { animation: fadeUp 0.4s ease-out forwards; }
.animate-pulse   { animation: pulse 2s ease-in-out infinite; }

/* Scrollbar */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--muted); border-radius: 9999px; }
::-webkit-scrollbar-thumb { background: hsl(6 75% 65% / 0.4); border-radius: 9999px; }

/* ----------------------------------------
   HEADER
---------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid hsl(20 20% 88% / 0.5);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  max-width: 100%;
  margin: 0 auto;
}

.header-logo-area {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  justify-content: center;
  min-width: 0;
}

.header-patronat {
  font-size: 0.6875rem;
  font-weight: 500;
  color: hsl(0 0% 18% / 0.7);
  white-space: nowrap;
}

.header-logo {
  height: 1.75rem;
  width: auto;
  flex-shrink: 0;
}

.header-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.5rem;
  color: var(--muted-fg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}
.header-btn:hover { background: var(--muted); }

.header-bell-dot {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: hsl(0, 72%, 51%);
}

.header-btn-wrap { position: relative; }

/* ----------------------------------------
   BOTTOM NAV
---------------------------------------- */
.site-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  border-top: 1px solid hsl(20 20% 88% / 0.5);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0.5rem 0.5rem;
  max-width: 480px;
  margin: 0 auto;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.75rem;
  background: none;
  border: none;
  cursor: pointer;
  min-width: 4rem;
  color: var(--muted-fg);
  font-family: var(--font-sans);
  font-size: 0.625rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
  position: relative;
}
.nav-item:hover { color: var(--fg); text-decoration: none; }

.nav-item.active {
  color: var(--primary);
  background: hsl(6 75% 65% / 0.1);
  font-weight: 700;
}

.nav-item svg { width: 1.25rem; height: 1.25rem; }

.nav-active-bar {
  position: absolute;
  bottom: -0.125rem;
  width: 2rem;
  height: 0.1875rem;
  border-radius: 9999px;
  background: var(--gradient-primary);
}

/* ----------------------------------------
   HOME — BANNER CAROUSEL
---------------------------------------- */
.banner-section { padding: 1rem 1rem 0; max-width: 100%; margin: 0 auto; }

.banner-carousel {
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow-medium);
  position: relative;
}

.banner-track {
  display: flex;
  transition: transform 0.4s ease;
}

.banner-slide {
  flex: 0 0 100%;
  min-width: 0;
}

.banner-slide a {
  display: block;
  text-decoration: none;
}

.banner-slide-inner {
  height: 11rem;
  width: 100%;
  position: relative;
  overflow: hidden;
  color: white;
}

.banner-dots {
  position: absolute;
  bottom: 0.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.375rem;
  z-index: 5;
}

.banner-dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 9999px;
  background: rgba(255,255,255,0.5);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, width 0.2s;
}
.banner-dot.active {
  background: #fff;
  width: 1rem;
}

.banner-prev,
.banner-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 9999px;
  background: hsl(0 0% 100% / 0.8);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg);
}
.banner-prev { left: 0.5rem; }
.banner-next { right: 0.5rem; }

/* Banner default (gradient) */
.banner-gradient-slide {
  display: flex;
  align-items: stretch;
  height: 100%;
  gap: 1rem;
  padding: 0.75rem;
  background: linear-gradient(110deg, hsl(8 85% 70%) 0%, hsl(18 90% 68%) 60%, hsl(28 92% 70%) 100%);
}

.banner-portrait {
  width: 9rem;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  border-radius: 0.75rem;
  flex-shrink: 0;
  box-shadow: var(--shadow-medium);
}

.banner-text { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.banner-label { font-size: 0.625rem; text-transform: uppercase; letter-spacing: 0.2em; color: rgba(255,255,255,0.75); margin-bottom: 0.25rem; }
.banner-title { font-size: 0.75rem; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.banner-sub   { font-size: 0.625rem; color: rgba(255,255,255,0.9); margin-top: 0.25rem; }
.banner-divider { height: 1px; background: rgba(255,255,255,0.3); margin: 0.375rem 0; }
.banner-author { display: flex; align-items: center; gap: 0.5rem; }
.banner-author-icon { width: 1.25rem; height: 1.25rem; border-radius: 9999px; background: rgba(255,255,255,0.25); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.banner-author-name { font-size: 0.625rem; font-weight: 600; truncate: overflow; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Banner image slide */
.banner-image-slide {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ----------------------------------------
   HOME — SECTION HEADER
---------------------------------------- */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
}

.section-link {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.section-link:hover { text-decoration: none; opacity: 0.8; }

/* ----------------------------------------
   HOME — NEWS CAROUSEL
---------------------------------------- */
.news-section { padding: 1.5rem 1rem 0; }

.news-carousel { position: relative; overflow: hidden; }
.news-track    { display: flex; transition: transform 0.4s ease; }
.news-slide    { flex: 0 0 100%; min-width: 0; }

.news-card {
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  background: var(--card);
}

.news-card-inner {
  display: grid;
  grid-template-columns: 1fr 2fr;
  height: 8rem;
}

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

.news-card-body {
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}

.news-category {
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.news-title {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.news-excerpt {
  font-size: 0.75rem;
  color: var(--muted-fg);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-read-more {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  text-decoration: none;
}

/* ----------------------------------------
   HOME — VIDEO GRID
---------------------------------------- */
.video-section { padding: 2rem 1rem 0; }

.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.video-card { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-soft); background: var(--card); text-decoration: none; color: var(--fg); display: block; }
.video-card:hover { text-decoration: none; }

.video-thumb-wrap { position: relative; aspect-ratio: 16/9; background: var(--muted); overflow: hidden; }
.video-thumb { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.video-card:hover .video-thumb { transform: scale(1.05); }

.video-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.2);
  transition: background 0.2s;
}
.video-card:hover .video-overlay { background: rgba(0,0,0,0.3); }

.video-play-btn {
  width: 2.25rem; height: 2.25rem;
  border-radius: 9999px;
  background: hsl(0 0% 100% / 0.9);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-medium);
}

.video-duration {
  position: absolute; bottom: 0.375rem; right: 0.375rem;
  padding: 0.1rem 0.375rem;
  border-radius: 0.25rem;
  background: rgba(0,0,0,0.7);
  color: white;
  font-size: 0.625rem;
  font-weight: 500;
}

.video-body { padding: 0.625rem; }
.video-title { font-size: 0.75rem; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ----------------------------------------
   HOME — QUICK LINKS
---------------------------------------- */
.quicklinks-section { padding: 2rem 1rem 0; }

.quicklinks-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.quicklink-btn {
  position: relative;
  padding: 1rem;
  border-radius: 1rem;
  text-align: left;
  cursor: pointer;
  border: none;
  font-family: var(--font-sans);
  transition: box-shadow 0.2s, transform 0.1s;
  text-decoration: none;
  display: block;
}
.quicklink-btn:active { transform: scale(0.98); }
.quicklink-btn:hover  { text-decoration: none; }

.quicklink-primary {
  background: var(--gradient-primary);
  color: var(--primary-fg);
  box-shadow: var(--shadow-medium);
}

.quicklink-default {
  background: var(--card);
  border: 1.5px solid var(--border);
  color: var(--fg);
  box-shadow: var(--shadow-soft);
}
.quicklink-default:hover { box-shadow: var(--shadow-medium); }

.quicklink-icon-wrap {
  display: inline-flex;
  padding: 0.625rem;
  border-radius: 0.75rem;
  margin-bottom: 0.75rem;
}
.quicklink-primary .quicklink-icon-wrap { background: rgba(255,255,255,0.2); }
.quicklink-default .quicklink-icon-wrap { background: hsl(6 75% 65% / 0.1); }

.quicklink-icon { width: 1.25rem; height: 1.25rem; }
.quicklink-primary .quicklink-icon { color: white; }
.quicklink-default .quicklink-icon { color: var(--primary); }

.quicklink-label { font-size: 0.875rem; font-weight: 600; margin-bottom: 0.25rem; display: block; }
.quicklink-desc  { font-size: 0.75rem; display: block; }
.quicklink-primary .quicklink-desc { color: rgba(255,255,255,0.7); }
.quicklink-default .quicklink-desc { color: var(--muted-fg); }

.quicklink-arrow {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 1rem; height: 1rem;
  transition: transform 0.2s;
}
.quicklink-btn:hover .quicklink-arrow { transform: translateX(3px); }
.quicklink-primary .quicklink-arrow { color: rgba(255,255,255,0.5); }
.quicklink-default .quicklink-arrow { color: var(--muted-fg); }

/* ----------------------------------------
   HOME — UPDATES BOX
---------------------------------------- */
.updates-section { padding: 2rem 1rem 2rem; }

.updates-card {
  background: var(--secondary);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 1rem;
}

.updates-inner { display: flex; align-items: flex-start; gap: 1rem; }

.updates-icon-wrap {
  padding: 0.5rem;
  border-radius: 0.5rem;
  background: hsl(340 65% 60% / 0.2);
  flex-shrink: 0;
}
.updates-icon { width: 1.25rem; height: 1.25rem; color: var(--secondary-fg); }

.updates-meta   { font-size: 0.75rem; color: var(--muted-fg); margin-bottom: 0.25rem; }
.updates-title  { font-size: 0.875rem; font-weight: 600; color: var(--fg); margin-bottom: 0.25rem; }
.updates-sub    { font-size: 0.75rem; color: var(--muted-fg); }

/* ----------------------------------------
   EVENTS PAGE
---------------------------------------- */
.page-hero {
  padding: 1.5rem 1rem 2rem;
}

.page-hero-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.page-hero-sub { font-size: 0.875rem; color: var(--muted-fg); }

.filter-bar {
  padding: 0 1rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.filter-bar::-webkit-scrollbar { display: none; }

.filter-divider { width: 1px; height: 1.5rem; background: var(--border); flex-shrink: 0; }

.filter-chip {
  flex-shrink: 0;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  text-decoration: none;
  transition: background 0.15s;
}

.filter-chip.active { background: var(--gradient-primary); color: white; box-shadow: var(--shadow-soft); }
.filter-chip:not(.active) { background: var(--muted); color: var(--muted-fg); }
.filter-chip:not(.active):hover { background: hsl(20 15% 88%); }

.event-featured-card {
  margin: 0 1rem 1rem;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--gradient-primary);
  box-shadow: var(--shadow-medium);
  cursor: pointer;
  border: none;
  width: calc(100% - 2rem);
  text-align: left;
}

.event-featured-body { padding: 1rem; }

.event-featured-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  color: white;
  margin: 0.75rem 0 0.5rem;
}

.event-featured-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.8);
}

.event-featured-meta-item { display: flex; align-items: center; gap: 0.25rem; }

.events-list { padding: 0 1rem; display: flex; flex-direction: column; gap: 0.75rem; }

.events-list-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-fg);
  margin-bottom: 0.25rem;
}

.event-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  border: 1.5px solid var(--border);
  overflow: hidden;
  cursor: pointer;
  width: 100%;
  text-align: left;
  text-decoration: none;
  display: block;
  transition: box-shadow 0.2s;
}
.event-card:hover { box-shadow: var(--shadow-medium); text-decoration: none; }

.event-card-inner { padding: 1rem; display: flex; gap: 1rem; align-items: flex-start; }

.event-date-box {
  flex-shrink: 0;
  width: 3.5rem; height: 3.5rem;
  border-radius: 0.75rem;
  background: var(--secondary);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}

.event-date-day { font-size: 1.125rem; font-weight: 700; color: var(--primary); line-height: 1; }
.event-date-month { font-size: 0.625rem; text-transform: uppercase; color: var(--muted-fg); margin-top: 0.125rem; }

.event-card-content { flex: 1; min-width: 0; }
.event-card-title { font-size: 0.875rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0.375rem 0 0.25rem; }
.event-card-meta { display: flex; align-items: center; gap: 0.75rem; font-size: 0.75rem; color: var(--muted-fg); }
.event-card-meta-item { display: flex; align-items: center; gap: 0.25rem; }

.event-card-arrow { flex-shrink: 0; align-self: center; width: 1.25rem; height: 1.25rem; color: var(--muted-fg); }

/* ----------------------------------------
   DOCUMENTS PAGE
---------------------------------------- */
.docs-hero {
  background: var(--gradient-hero);
  padding: 1.5rem 1rem 2rem;
  color: white;
}

.docs-hero-icon-wrap {
  display: inline-flex;
  padding: 0.5rem;
  border-radius: 0.75rem;
  background: rgba(255,255,255,0.2);
  margin-bottom: 0.5rem;
}

.docs-hero-title { font-size: 1.5rem; font-weight: 700; color: white; }
.docs-hero-sub   { font-size: 0.875rem; color: rgba(255,255,255,0.8); margin-top: 0.25rem; }

.docs-search-wrap {
  margin: -1rem 1rem 0;
  position: relative;
  z-index: 10;
}

.docs-search-card { padding: 0.75rem; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-medium); }

.search-input-wrap { position: relative; }
.search-icon { position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); width: 1rem; height: 1rem; color: var(--muted-fg); pointer-events: none; }

.search-input {
  width: 100%;
  padding: 0.625rem 0.75rem 0.625rem 2.25rem;
  border-radius: calc(var(--radius) - 2px);
  border: none;
  background: var(--muted);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--fg);
  outline: none;
  transition: box-shadow 0.15s;
}
.search-input:focus { box-shadow: 0 0 0 2px var(--primary); }

.tab-switch {
  display: flex;
  background: var(--muted);
  border-radius: 0.75rem;
  padding: 0.25rem;
  margin: 1rem;
}

.tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem;
  border-radius: 0.625rem;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-fg);
  background: transparent;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.tab-btn.active { background: var(--card); color: var(--fg); box-shadow: var(--shadow-soft); }
.tab-btn svg { width: 1rem; height: 1rem; }

.docs-categories {
  padding: 0 1rem;
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
  padding-bottom: 0.5rem;
}
.docs-categories::-webkit-scrollbar { display: none; }

.doc-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  border: 1.5px solid var(--border);
  transition: box-shadow 0.2s;
}
.doc-card:hover { box-shadow: var(--shadow-medium); }

.doc-card-inner { padding: 1rem; display: flex; align-items: flex-start; gap: 1rem; }

.doc-icon-wrap {
  padding: 0.75rem;
  border-radius: 0.75rem;
  background: hsl(6 75% 65% / 0.1);
  flex-shrink: 0;
}
.doc-icon { width: 1.5rem; height: 1.5rem; color: var(--primary); }

.doc-content { flex: 1; min-width: 0; }
.doc-title { font-size: 0.875rem; font-weight: 600; line-height: 1.3; }
.doc-desc  { font-size: 0.75rem; color: var(--muted-fg); margin: 0.25rem 0 0.5rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.doc-meta  { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; font-size: 0.75rem; color: var(--muted-fg); }

.doc-download-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.375rem;
  color: var(--primary);
  border-radius: 0.5rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.doc-download-btn:hover { background: hsl(6 75% 65% / 0.1); }
.doc-download-btn svg { width: 1.125rem; height: 1.125rem; }

/* ----------------------------------------
   EMPTY STATE
---------------------------------------- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  text-align: center;
}

.empty-icon-wrap {
  padding: 1rem;
  border-radius: 9999px;
  background: var(--muted);
  margin-bottom: 1rem;
}
.empty-icon { width: 2rem; height: 2rem; color: var(--muted-fg); }
.empty-title { font-weight: 600; margin-bottom: 0.25rem; }
.empty-sub   { font-size: 0.875rem; color: var(--muted-fg); }

/* ----------------------------------------
   SIDE DRAWER
---------------------------------------- */
#js-side-drawer {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
}

#js-side-drawer.open {
  pointer-events: all;
}

.drawer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.25s;
}

#js-side-drawer.open .drawer-overlay {
  opacity: 1;
}

.drawer-panel {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 280px;
  max-width: 85vw;
  background: var(--card);
  box-shadow: var(--shadow-strong);
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

#js-side-drawer.open .drawer-panel {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

.drawer-logo {
  height: 2rem;
  width: auto;
}

.drawer-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--muted-fg);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.drawer-close:hover { background: var(--muted); }

.drawer-nav {
  list-style: none;
  padding: 0.75rem 0;
  flex: 1;
}

.drawer-nav li a {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem 1.25rem;
  color: var(--fg);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  border-radius: 0;
}

.drawer-nav li a:hover {
  background: var(--secondary);
  color: var(--primary);
  text-decoration: none;
}

.drawer-nav li a svg {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
  color: var(--muted-fg);
}

.drawer-nav li a:hover svg {
  color: var(--primary);
}

/* ----------------------------------------
   BELL NOTIFICATION PANEL
---------------------------------------- */
.bell-panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0.5rem;
  width: 280px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-strong);
  border: 1px solid var(--border);
  z-index: 60;
  overflow: hidden;
  animation: fadeUp 0.2s ease-out;
}

.bell-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.875rem;
}

.bell-panel-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted-fg);
  display: flex;
  align-items: center;
  padding: 0.25rem;
  border-radius: 0.375rem;
}
.bell-panel-close:hover { background: var(--muted); }

.bell-panel-body { padding: 1rem; }

.bell-empty {
  font-size: 0.875rem;
  color: var(--muted-fg);
  text-align: center;
  padding: 0.5rem 0;
}

/* ----------------------------------------
   Responsive — max 480px "app shell"
---------------------------------------- */
@media (min-width: 481px) {
  .site-wrapper { max-width: 100%; margin: 0 auto; }
}

/* ----------------------------------------
   SPLASH SCREEN
---------------------------------------- */
.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 200;
  overflow: hidden;
  transition: opacity 0.5s ease;
}
.splash-screen.splash-exiting { opacity: 0; pointer-events: none; }
.splash-screen.splash-done    { display: none; }

.splash-phase {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.7s ease;
}
.splash-phase--white {
  background: var(--bg);
  z-index: 2;
}
.splash-phase--gradient {
  background: linear-gradient(135deg, hsl(6,80%,65%) 0%, hsl(187,35%,30%) 100%);
  z-index: 1;
  opacity: 0;
}
.splash-phase--gradient.visible { opacity: 1; }
.splash-phase--white.hidden { opacity: 0; pointer-events: none; }

.splash-patronat {
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(0,0%,18%,0.7);
  letter-spacing: 0.03em;
  margin-bottom: 1.5rem;
}
.splash-logo {
  width: 10rem;
  height: 10rem;
  object-fit: contain;
}

/* Blobs */
.splash-blob {
  position: absolute;
  border-radius: 9999px;
  filter: blur(48px);
  background: rgba(255,255,255,0.12);
}
.splash-blob--tl { top: -3rem; left: -3rem; width: 12rem; height: 12rem; }
.splash-blob--br { bottom: -4rem; right: -2rem; width: 16rem; height: 16rem; background: rgba(255,255,255,0.08); }
.splash-blob--tr { top: 30%; right: 2rem; width: 8rem; height: 8rem; background: rgba(255,255,255,0.1); }

/* Icons cluster */
.splash-icons {
  position: relative;
  width: 10rem;
  height: 10rem;
  margin-bottom: 2rem;
}
.splash-icon-center {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 6rem; height: 6rem;
  border-radius: 9999px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.3);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  z-index: 2;
}
.splash-icon {
  position: absolute;
  border-radius: 9999px;
  background: rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
}
.splash-icon--tl { top: 0; left: 0; width: 3.5rem; height: 3.5rem; }
.splash-icon--tr { top: -1rem; right: 0; width: 3rem; height: 3rem; background: rgba(255,255,255,0.2); }
.splash-icon--bl { bottom: -0.5rem; left: 0.5rem; width: 2.5rem; height: 2.5rem; }
.splash-icon--br { bottom: 0; right: -0.5rem; width: 4rem; height: 4rem; }
.splash-icon-dot { width: 100%; height: 100%; border-radius: 9999px; }

/* Tekst */
.splash-content { text-align: center; padding: 0 2rem; position: relative; z-index: 3; }
.splash-tag {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.375rem 1rem; border-radius: 9999px;
  background: rgba(255,255,255,0.15); color: #fff;
  font-size: 0.75rem; font-weight: 500; margin-bottom: 1.5rem;
}
.splash-tag-dot { width: 0.5rem; height: 0.5rem; border-radius: 9999px; background: #fff; animation: pulse 2s ease-in-out infinite; }
.splash-title { font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: #fff; margin-bottom: 1rem; line-height: 1.1; }
.splash-desc  { color: rgba(255,255,255,0.85); font-size: 0.9375rem; margin-bottom: 0.25rem; }
.splash-desc2 { color: rgba(255,255,255,0.7); font-size: 0.8125rem; }

/* Statystyki */
.splash-stats {
  display: flex; align-items: center; gap: 2rem;
  margin-top: 2.5rem; position: relative; z-index: 3;
}
.splash-stat { text-align: center; }
.splash-stat-value { font-size: 1.5rem; font-weight: 700; color: #fff; line-height: 1; }
.splash-stat-label { font-size: 0.75rem; color: rgba(255,255,255,0.7); margin-top: 0.125rem; }
.splash-divider { width: 1px; height: 2rem; background: rgba(255,255,255,0.3); }

/* Progress bar */
.splash-progress-wrap {
  position: absolute;
  bottom: 5rem;
  left: 2rem; right: 2rem;
  z-index: 10;
}
.splash-progress-track {
  height: 0.25rem;
  border-radius: 9999px;
  background: rgba(0,0,0,0.1);
  overflow: hidden;
  transition: background 0.7s;
}
.splash-progress-track.on-gradient { background: rgba(255,255,255,0.25); }
.splash-progress-bar {
  height: 100%;
  border-radius: 9999px;
  background: var(--primary);
  width: 0%;
  transition: width 0.1s linear, background 0.7s;
}
.splash-progress-bar.on-gradient { background: #fff; }
.splash-loading {
  text-align: center;
  font-size: 0.75rem;
  margin-top: 0.75rem;
  color: hsl(0,0%,18%,0.5);
  transition: color 0.7s;
}
.splash-loading.on-gradient { color: rgba(255,255,255,0.7); }

/* ----------------------------------------
   SINGLE POST — wspólne style
---------------------------------------- */
.single-back {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: rgba(255,255,255,0.8);
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  margin-bottom: 0.875rem;
}
.single-back:hover { color: #fff; text-decoration: none; }

.single-eyebrow {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.75);
  margin-bottom: 0.375rem;
}
.single-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}
.single-meta-date {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.75);
}
.single-thumb-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-medium);
}
.single-thumb { width: 100%; height: auto; display: block; }
.single-lead {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--fg);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.single-content {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--fg);
}
.single-content p { margin-bottom: 1rem; }
.single-content h2,
.single-content h3 { margin: 1.5rem 0 0.5rem; }

.single-footer-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.single-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--primary);
  text-decoration: none;
  max-width: 48%;
  overflow: hidden;
}
.single-nav-link:hover { text-decoration: underline; }
.single-nav-link--next { margin-left: auto; text-align: right; }

/* Event single */
.event-single-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
  overflow: hidden;
}
.event-single-row {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border);
}
.event-single-row:last-child { border-bottom: none; }
.event-single-icon {
  padding: 0.5rem;
  border-radius: 0.5rem;
  background: hsl(6,75%,65%,0.1);
  color: var(--primary);
  display: flex;
  flex-shrink: 0;
}
.event-single-label { font-size: 0.75rem; color: var(--muted-fg); }
.event-single-value { font-size: 0.9375rem; font-weight: 500; color: var(--fg); }

/* Video single */
.video-single-embed {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow-medium);
}
.video-single-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ----------------------------------------
   PROFIL
---------------------------------------- */
.profile-screen { display: flex; flex-direction: column; min-height: 100%; padding-bottom: 5rem; }

.profile-hero {
  background: var(--gradient-hero);
  padding: 1.5rem 1rem 3rem;
  position: relative;
  overflow: hidden;
  text-align: center;
}
.profile-hero-blob {
  position: absolute;
  border-radius: 9999px;
  filter: blur(40px);
}
.profile-hero-blob--tr { top: -1rem; right: -1rem; width: 8rem; height: 8rem; background: rgba(255,255,255,0.1); }
.profile-hero-blob--bl { bottom: -1rem; left: -1rem; width: 6rem; height: 6rem; background: hsl(340,65%,60%,0.2); }
.profile-hero-content { position: relative; }

.profile-avatar-wrap { position: relative; display: inline-block; margin-bottom: 1rem; }
.profile-avatar {
  width: 6rem; height: 6rem;
  border-radius: 9999px;
  background: var(--secondary);
  border: 4px solid rgba(255,255,255,0.2);
  box-shadow: var(--shadow-strong);
  display: flex; align-items: center; justify-content: center;
}
.profile-avatar-fallback { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--secondary-fg); }
.profile-avatar-edit {
  position: absolute; bottom: 0; right: 0;
  padding: 0.5rem; border-radius: 9999px;
  background: var(--gradient-primary); border: none; cursor: pointer;
  color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-medium);
}

.profile-name { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; color: #fff; margin-bottom: 0.25rem; }
.profile-subtitle { font-size: 0.875rem; color: rgba(255,255,255,0.8); margin-bottom: 0.75rem; }
.profile-badge {
  display: inline-block; padding: 0.2rem 0.75rem;
  background: rgba(255,255,255,0.2); color: #fff;
  border-radius: 9999px; font-size: 0.75rem; font-weight: 500;
}

.profile-stats-wrap { padding: 0 1rem; margin-top: -1.5rem; position: relative; z-index: 10; }
.profile-stats-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-medium); overflow: hidden; }
.profile-stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.profile-stat { padding: 1rem; text-align: center; }
.profile-stat--divider { border-left: 1px solid var(--border); }
.profile-stat-value { font-size: 1.25rem; font-weight: 700; color: var(--primary); }
.profile-stat-label { font-size: 0.75rem; color: var(--muted-fg); }

.profile-section { padding: 1.5rem 1rem 0; }
.profile-section-title { font-family: var(--font-display); font-size: 1.125rem; font-weight: 600; margin-bottom: 1rem; }

.profile-info-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-soft); border: 1px solid var(--border); overflow: hidden; }
.profile-info-row { display: flex; align-items: center; gap: 1rem; padding: 1rem; border-bottom: 1px solid var(--border); }
.profile-info-row:last-child { border-bottom: none; }
.profile-info-icon { padding: 0.5rem; border-radius: 0.5rem; background: hsl(6,75%,65%,0.1); color: var(--primary); display: flex; flex-shrink: 0; }
.profile-info-body { flex: 1; }
.profile-info-label { font-size: 0.75rem; color: var(--muted-fg); }
.profile-info-value { font-size: 0.875rem; font-weight: 500; color: var(--fg); }

.profile-membership-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-soft); border: 1px solid var(--border); overflow: hidden; padding: 1rem; }
.profile-membership-top { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.profile-membership-icon { padding: 0.5rem; border-radius: 0.5rem; background: hsl(142,72%,29%,0.1); color: hsl(142,72%,29%); display: flex; flex-shrink: 0; }
.profile-membership-name { font-size: 0.9375rem; font-weight: 600; color: var(--fg); }
.profile-membership-exp { font-size: 0.75rem; color: var(--muted-fg); }
.profile-membership-status { margin-left: auto; background: hsl(142,72%,29%,0.1); color: hsl(142,72%,29%); font-size: 0.75rem; font-weight: 600; padding: 0.2rem 0.6rem; border-radius: 9999px; white-space: nowrap; }
.profile-membership-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 0.75rem; border-top: 1px solid var(--border); }
.profile-membership-last-label { font-size: 0.8125rem; color: var(--muted-fg); }
.profile-membership-last-value { font-size: 0.8125rem; font-weight: 500; color: var(--fg); }

.profile-settings-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-soft); border: 1px solid var(--border); overflow: hidden; }
.profile-settings-row { display: flex; align-items: center; gap: 0.75rem; padding: 1rem; border-bottom: 1px solid var(--border); cursor: pointer; transition: background 0.15s; }
.profile-settings-row:last-child { border-bottom: none; }
.profile-settings-row:hover { background: hsl(20,15%,93%,0.5); }
.profile-settings-icon { padding: 0.5rem; border-radius: 0.5rem; background: var(--muted); color: var(--muted-fg); display: flex; flex-shrink: 0; }
.profile-settings-label { font-size: 0.875rem; font-weight: 500; color: var(--fg); flex: 1; }
.profile-settings-chevron { color: var(--muted-fg); flex-shrink: 0; }

.profile-toggle { position: relative; display: inline-flex; cursor: pointer; flex-shrink: 0; }
.profile-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.profile-toggle-track { width: 2.5rem; height: 1.375rem; border-radius: 9999px; background: var(--muted); transition: background 0.2s; }
.profile-toggle input:checked + .profile-toggle-track { background: var(--primary); }
.profile-toggle-thumb { position: absolute; top: 2px; left: 2px; width: 1rem; height: 1rem; border-radius: 9999px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.2); transition: transform 0.2s; }
.profile-toggle input:checked ~ .profile-toggle-track .profile-toggle-thumb { transform: translateX(1.125rem); }

.profile-logout-btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.75rem 1.25rem; border-radius: var(--radius);
  background: transparent; border: 1.5px solid hsl(0,84%,60%,0.3);
  color: hsl(0,84%,60%); font-family: var(--font-sans); font-size: 0.9375rem; font-weight: 600;
  cursor: pointer; transition: background 0.15s;
}
.profile-logout-btn:hover { background: hsl(0,84%,60%,0.08); }

/* ----------------------------------------
   SKŁADKA CZŁONKOWSKA
---------------------------------------- */
.membership-screen { display: flex; flex-direction: column; min-height: 100%; padding-bottom: 5rem; }

.membership-hero { background: var(--gradient-hero); padding: 1.5rem 1rem 2rem; }
.membership-hero-title { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: #fff; margin-bottom: 0.5rem; }
.membership-hero-desc { font-size: 0.875rem; color: rgba(255,255,255,0.8); line-height: 1.5; }

.membership-status-wrap { padding: 0 1rem; margin-top: -1rem; position: relative; z-index: 10; }
.membership-status-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-medium); padding: 1rem; display: flex; justify-content: space-between; align-items: center; }
.membership-status-label { font-size: 0.75rem; color: var(--muted-fg); margin-bottom: 0.25rem; }
.membership-status-badge { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 9999px; font-size: 0.75rem; font-weight: 600; }
.membership-status-badge--pending { background: hsl(45,93%,47%,0.15); color: hsl(32,95%,35%); }
.membership-status-right { text-align: right; }
.membership-status-date { font-size: 0.9375rem; font-weight: 600; color: var(--fg); }

.membership-section { padding: 1.5rem 1rem 0; }
.membership-section-title { font-family: var(--font-display); font-size: 1.125rem; font-weight: 600; margin-bottom: 1rem; }

.membership-plans { display: flex; flex-direction: column; gap: 0.75rem; }
.membership-plan { background: var(--card); border: 1.5px solid var(--border); border-radius: var(--radius); padding: 1rem; cursor: pointer; text-align: left; width: 100%; transition: box-shadow 0.2s, border-color 0.2s; box-shadow: var(--shadow-soft); }
.membership-plan--active { border-color: var(--primary); box-shadow: var(--shadow-medium), 0 0 0 1px var(--primary); }
.membership-plan:hover:not(.membership-plan--active) { box-shadow: var(--shadow-medium); }

.membership-plan-top { display: flex; align-items: flex-start; justify-content: space-between; }
.membership-plan-select-wrap { display: flex; align-items: flex-start; gap: 0.75rem; }
.membership-plan-radio { width: 1.25rem; height: 1.25rem; border-radius: 9999px; border: 2px solid var(--muted-fg); display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px; }
.membership-plan-radio--active { border-color: var(--primary); background: var(--primary); }
.membership-plan-name { font-size: 0.9375rem; font-weight: 600; color: var(--fg); }
.membership-plan-badge { display: inline-block; background: var(--gradient-primary); color: #fff; font-size: 0.625rem; font-weight: 600; padding: 0.15rem 0.5rem; border-radius: 9999px; margin-top: 0.25rem; }
.membership-plan-price-wrap { text-align: right; }
.membership-plan-price { font-size: 1.5rem; font-weight: 700; color: var(--primary); line-height: 1; }
.membership-plan-currency { font-size: 0.875rem; font-weight: 400; color: var(--muted-fg); }
.membership-plan-period { font-size: 0.75rem; color: var(--muted-fg); }

.membership-plan-details { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--border); animation: fadeUp 0.2s ease-out; }
.membership-plan-breakdown { display: flex; flex-direction: column; gap: 0.25rem; margin-bottom: 0.75rem; }
.membership-plan-breakdown-row { display: flex; justify-content: space-between; font-size: 0.8125rem; color: var(--muted-fg); }
.membership-plan-breakdown-row span:last-child { font-weight: 500; color: var(--fg); }
.membership-plan-features { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.membership-plan-feature { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8125rem; color: var(--fg); }

.membership-benefits-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
.membership-benefit-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-soft); padding: 0.75rem; text-align: center; }
.membership-benefit-icon { display: inline-flex; padding: 0.5rem; border-radius: 0.5rem; background: hsl(6,75%,65%,0.1); color: var(--primary); margin-bottom: 0.5rem; }
.membership-benefit-title { font-size: 0.75rem; font-weight: 500; color: var(--fg); line-height: 1.3; }

.membership-faq { display: flex; flex-direction: column; gap: 0.5rem; }
.membership-faq-item { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-soft); }
.membership-faq-trigger { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; padding: 0.875rem 1rem; background: var(--card); border: none; cursor: pointer; font-family: var(--font-sans); font-size: 0.875rem; font-weight: 500; color: var(--fg); text-align: left; }
.membership-faq-trigger:hover { background: hsl(20,15%,93%,0.5); }
.membership-faq-chevron { flex-shrink: 0; transition: transform 0.2s; }
.membership-faq-trigger[aria-expanded="true"] .membership-faq-chevron { transform: rotate(180deg); }
.membership-faq-content { display: none; padding: 0 1rem 0.875rem; font-size: 0.8125rem; color: var(--muted-fg); line-height: 1.6; background: var(--card); }
.membership-faq-content.open { display: block; }

.membership-cta-card { background: var(--secondary); border-radius: var(--radius); box-shadow: var(--shadow-soft); padding: 1rem; }
.membership-cta-info { display: flex; gap: 0.75rem; margin-bottom: 1rem; align-items: flex-start; }
.membership-cta-info-text { font-size: 0.8125rem; color: var(--muted-fg); line-height: 1.5; }
.membership-pay-btn {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem; width: 100%;
  padding: 0.875rem 1.25rem; border-radius: var(--radius);
  background: var(--gradient-primary); color: #fff;
  font-family: var(--font-sans); font-size: 1rem; font-weight: 700;
  text-decoration: none; transition: opacity 0.15s, transform 0.1s;
}
.membership-pay-btn:hover { opacity: 0.92; text-decoration: none; }
.membership-pay-btn:active { transform: scale(0.98); }

/* ----------------------------------------
   WIADOMOŚCI
---------------------------------------- */
:root { --success: hsl(142, 72%, 29%); }

.messages-screen { display: flex; flex-direction: column; min-height: 100%; }

.messages-list-header { padding: 1rem 1rem 0.5rem; }
.messages-title { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--fg); margin-bottom: 0.25rem; }
.messages-subtitle { font-size: 0.875rem; color: var(--muted-fg); }

.messages-search-wrap { position: relative; padding: 0.75rem 1rem; }
.messages-search-icon { position: absolute; left: 1.75rem; top: 50%; transform: translateY(-50%); color: var(--muted-fg); pointer-events: none; }
.messages-search-input { width: 100%; padding: 0.625rem 1rem 0.625rem 2.5rem; border-radius: var(--radius); background: var(--muted); border: none; font-family: var(--font-sans); font-size: 0.875rem; color: var(--fg); outline: none; }
.messages-search-input:focus { box-shadow: 0 0 0 2px var(--primary); }

.messages-section-label { font-size: 0.6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted-fg); margin-bottom: 0.75rem; }

.messages-online-section { padding: 0 1rem 1rem; }
.messages-online-list { display: flex; gap: 0.75rem; overflow-x: auto; padding-bottom: 0.5rem; }
.messages-online-item { display: flex; flex-direction: column; align-items: center; gap: 0.375rem; background: none; border: none; cursor: pointer; min-width: 4rem; }
.messages-online-name { font-size: 0.75rem; color: var(--fg); font-weight: 500; white-space: nowrap; max-width: 4rem; overflow: hidden; text-overflow: ellipsis; }

.messages-contacts-section { padding: 0 1rem 5rem; }
.messages-contacts-list { display: flex; flex-direction: column; gap: 0.5rem; }

.messages-avatar {
  border-radius: 9999px; display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 0.875rem; flex-shrink: 0;
  width: 3rem; height: 3rem;
}
.messages-avatar--sm { width: 2.5rem; height: 2.5rem; font-size: 0.8125rem; }
.messages-avatar--gradient { background: var(--gradient-primary); color: #fff; }
.messages-avatar--neutral { background: var(--muted); color: var(--muted-fg); }
.messages-avatar--ring-online { box-shadow: 0 0 0 2px hsl(142,72%,45%), 0 0 0 4px var(--bg); }

.messages-online-dot { position: absolute; bottom: 0; right: 0; width: 0.75rem; height: 0.75rem; border-radius: 9999px; background: hsl(142,72%,45%); border: 2px solid var(--card); }

.messages-contact-row {
  display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem;
  border-radius: var(--radius); background: var(--card); border: 1px solid hsl(20,20%,88%,0.5);
  box-shadow: var(--shadow-soft); cursor: pointer; width: 100%; text-align: left;
  transition: box-shadow 0.2s;
}
.messages-contact-row:hover { box-shadow: var(--shadow-medium); }
.messages-contact-avatar-wrap { position: relative; flex-shrink: 0; }

.messages-contact-body { flex: 1; min-width: 0; }
.messages-contact-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.125rem; }
.messages-contact-name { font-size: 0.875rem; font-weight: 600; color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.messages-contact-time { font-size: 0.75rem; color: var(--muted-fg); flex-shrink: 0; margin-left: 0.5rem; }
.messages-contact-role { font-size: 0.75rem; color: var(--muted-fg); display: block; margin-bottom: 0.125rem; }
.messages-contact-preview { font-size: 0.8125rem; color: var(--muted-fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 0; }

.messages-unread-badge { background: var(--gradient-primary); color: #fff; border-radius: 9999px; min-width: 1.25rem; height: 1.25rem; display: flex; align-items: center; justify-content: center; font-size: 0.6875rem; font-weight: 700; padding: 0 0.25rem; flex-shrink: 0; }

/* Chat view */
.messages-chat-view { display: flex; flex-direction: column; height: calc(100vh - 3.5rem); }
.messages-chat-header { padding: 0.75rem 1rem; border-bottom: 1px solid hsl(20,20%,88%,0.5); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.messages-chat-header-left { display: flex; align-items: center; gap: 0.75rem; }
.messages-chat-avatar-wrap { position: relative; }
.messages-back-btn { background: none; border: none; cursor: pointer; padding: 0.375rem; color: var(--fg); border-radius: 0.5rem; display: flex; }
.messages-back-btn:hover { background: var(--muted); }
.messages-chat-contact-name { font-size: 0.875rem; font-weight: 600; color: var(--fg); }
.messages-chat-status { font-size: 0.75rem; color: var(--muted-fg); }
.messages-chat-actions { display: flex; gap: 0.25rem; }

.messages-chat-body { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 1rem; }

.messages-msg { display: flex; }
.messages-msg--in { justify-content: flex-start; }
.messages-msg--out { justify-content: flex-end; }

.messages-bubble { max-width: 80%; padding: 0.625rem 1rem; border-radius: 1.125rem; }
.messages-bubble--in { background: var(--muted); color: var(--fg); border-bottom-left-radius: 0.25rem; }
.messages-bubble--out { background: var(--gradient-primary); color: #fff; border-bottom-right-radius: 0.25rem; }
.messages-bubble p { font-size: 0.875rem; line-height: 1.5; margin: 0; }
.messages-msg-meta { display: flex; align-items: center; justify-content: flex-end; gap: 0.25rem; margin-top: 0.25rem; }
.messages-msg-meta span { font-size: 0.625rem; }
.messages-msg-meta--in span { color: var(--muted-fg); }
.messages-msg-meta--out span { color: rgba(255,255,255,0.7); }
.messages-msg-meta--out svg { color: rgba(255,255,255,0.7); }

.messages-chat-footer { padding: 0.75rem 1rem; border-top: 1px solid hsl(20,20%,88%,0.5); display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.messages-input { flex: 1; padding: 0.625rem 1rem; border-radius: var(--radius); background: var(--muted); border: none; font-family: var(--font-sans); font-size: 0.875rem; color: var(--fg); outline: none; }
.messages-input:focus { box-shadow: 0 0 0 2px var(--primary); }
.messages-send-btn { padding: 0.625rem; border-radius: var(--radius); background: var(--gradient-primary); color: #fff; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: opacity 0.15s; }
.messages-send-btn:hover { opacity: 0.9; }
.messages-send-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ==========================================================================
   AUTH — Logowanie / Rejestracja / Konto oczekuje
   ========================================================================== */

/* Strony auth nie pokazują splash screen i nie potrzebują site-wrapper */
.auth-screen {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  background: var(--bg);
}

/* Hero gradient */
.auth-hero {
  background: var(--gradient-hero);
  padding: 3.5rem 1.5rem 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
}

.auth-hero-logo {
  margin-bottom: 0.5rem;
}

.auth-logo-img {
  height: 3rem;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
  margin: 0 auto;
}

.auth-hero-title {
  font-size: 1.625rem;
  font-weight: 700;
  color: #fff;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.auth-hero-subtitle {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.8);
  font-family: var(--font-sans);
}

/* Card */
.auth-card {
  background: var(--card);
  border-radius: 1.5rem 1.5rem 0 0;
  padding: 2rem 1.5rem 2rem;
  margin-top: -1rem;
  flex: 1;
  box-shadow: 0 -4px 30px hsl(15 20% 30% / 0.08);
}

.auth-card--wide {
  padding-bottom: 4rem;
}

/* Form */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.auth-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: 0.01em;
}

.auth-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  background: #fff;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  color: var(--fg);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px hsl(6 75% 65% / 0.15);
}

.auth-input::placeholder { color: var(--muted-fg); }

.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-wrap .auth-input { padding-right: 2.75rem; }

.auth-eye {
  position: absolute;
  right: 0.875rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: var(--muted-fg);
  display: flex;
  align-items: center;
}

.auth-input-badge {
  position: absolute;
  right: 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2em 0.5em;
  border-radius: 0.375rem;
}

.auth-input-badge--ok   { background: hsl(142,72%,92%); color: hsl(142,72%,28%); }
.auth-input-badge--bad  { background: hsl(0,72%,92%);   color: hsl(0,72%,40%); }

.auth-hint {
  font-size: 0.75rem;
  color: var(--muted-fg);
  margin-top: 0.125rem;
}

/* Row (imię + nazwisko obok siebie) */
.auth-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

/* Remember me / terms */
.auth-remember,
.auth-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--fg);
  line-height: 1.4;
}

.auth-remember input,
.auth-checkbox input {
  width: 1.125rem;
  height: 1.125rem;
  accent-color: var(--primary);
  flex-shrink: 0;
  margin-top: 0.1em;
  cursor: pointer;
}

/* Password strength */
.auth-pw-strength {
  height: 4px;
  background: var(--muted);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 0.375rem;
}

.auth-pw-bar {
  height: 100%;
  width: 0;
  border-radius: 2px;
  transition: width 0.3s, background-color 0.3s;
}

.auth-pw-bar[data-strength="1"] { width: 25%; background: hsl(0,72%,55%); }
.auth-pw-bar[data-strength="2"] { width: 50%; background: hsl(30,80%,55%); }
.auth-pw-bar[data-strength="3"] { width: 75%; background: hsl(50,80%,45%); }
.auth-pw-bar[data-strength="4"] { width: 100%; background: hsl(142,72%,40%); }

/* Buttons */
.auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s, transform 0.1s;
  text-decoration: none;
}

.auth-btn:hover { opacity: 0.9; text-decoration: none; }
.auth-btn:active { transform: scale(0.98); }

.auth-btn--primary {
  background: var(--gradient-primary);
  color: #fff;
  margin-top: 0.25rem;
  width: 100%;
}

.auth-btn--outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  width: 100%;
}

.auth-btn--ghost {
  background: var(--muted);
  color: var(--muted-fg);
  width: 100%;
}

/* Alert */
.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.875rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.auth-alert--error   { background: hsl(0,80%,97%);   color: hsl(0,72%,35%);   border: 1px solid hsl(0,72%,88%); }
.auth-alert--success { background: hsl(142,60%,96%); color: hsl(142,60%,30%); border: 1px solid hsl(142,60%,82%); }

/* Links row */
.auth-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  font-size: 0.875rem;
  color: var(--muted-fg);
}

.auth-link { color: var(--primary); font-weight: 500; }
.auth-link:hover { text-decoration: underline; }
.auth-sep { color: var(--border); }

/* Disclaimer */
.auth-disclaimer {
  font-size: 0.75rem;
  color: var(--muted-fg);
  text-align: center;
  margin-top: 1.25rem;
  line-height: 1.5;
}

/* Header avatar (zalogowany) */
.header-user-avatar {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 2px solid rgba(255,255,255,0.4);
  transition: background 0.15s;
  letter-spacing: 0.02em;
}

.header-user-avatar:hover { background: rgba(255,255,255,0.35); text-decoration: none; }

/* Header login btn (gdy niezalogowany) */
.header-login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  color: #fff;
  text-decoration: none;
  transition: background 0.15s;
}

.header-login-btn:hover { background: rgba(255,255,255,0.35); }

/* ==========================================================================
   PENDING — Konto oczekuje na aktywację
   ========================================================================== */

.auth-screen--pending {
  background: var(--bg);
}

.pending-hero {
  background: var(--gradient-hero);
  padding: 3rem 1.5rem 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.pending-icon {
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.pending-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: #fff;
  font-family: var(--font-display);
}

.pending-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pending-greeting {
  font-size: 1rem;
  font-weight: 500;
}

.pending-text {
  font-size: 0.875rem;
  color: var(--muted-fg);
  line-height: 1.6;
}

.pending-pwz-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-wrap: wrap;
  padding: 0.875rem 1rem;
  background: var(--muted);
  border-radius: var(--radius);
}

.pending-pwz-label {
  font-size: 0.75rem;
  color: var(--muted-fg);
  font-weight: 500;
}

.pending-pwz-value {
  font-family: monospace;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--fg);
}

.pending-badge {
  margin-left: auto;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.25em 0.75em;
  border-radius: 9999px;
  background: hsl(38,90%,92%);
  color: hsl(38,80%,30%);
}

/* Steps */
.pending-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0.5rem 0;
}

.pending-step {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 0.75rem 0;
  position: relative;
}

.pending-step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 0.6875rem;
  top: 2.25rem;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.pending-step--done::after,
.pending-step--active::after {
  background: var(--primary) !important;
}

.pending-step-dot {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.pending-step-dot--done {
  background: var(--gradient-primary);
  border-color: transparent;
  color: #fff;
}

.pending-step-dot--active {
  border-color: var(--primary);
}

.pending-step-text {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  padding-top: 0.125rem;
}

.pending-step-text strong { font-size: 0.875rem; font-weight: 600; }
.pending-step-text span   { font-size: 0.75rem;  color: var(--muted-fg); }

/* Spinner */
.pending-spinner {
  width: 0.75rem;
  height: 0.75rem;
  border: 2px solid hsl(6 75% 65% / 0.3);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Info box */
.pending-info {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.875rem 1rem;
  background: hsl(210,60%,97%);
  border: 1px solid hsl(210,60%,88%);
  border-radius: var(--radius);
  font-size: 0.8125rem;
  color: hsl(210,60%,30%);
  line-height: 1.5;
}

.pending-info svg { flex-shrink: 0; margin-top: 0.1em; }

.pending-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* ==========================================================================
   PROFIL — dodatkowe elementy Fazy 2
   ========================================================================== */

.profile-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.profile-section-header .profile-section-title { margin-bottom: 0; }

.profile-edit-link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary);
}

.profile-verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.25em 0.625em;
  border-radius: 9999px;
  background: hsl(142,60%,92%);
  color: hsl(142,60%,28%);
  margin-left: auto;
  flex-shrink: 0;
}

.profile-settings-chevron-link {
  display: flex;
  align-items: center;
  color: var(--muted-fg);
  text-decoration: none;
}

.profile-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* Toast */
.profile-toast {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-strong);
  animation: toast-in 0.3s ease, toast-out 0.3s ease 2.7s forwards;
}

.profile-toast--ok { background: hsl(142,60%,96%); color: hsl(142,60%,28%); border: 1px solid hsl(142,60%,82%); }

@keyframes toast-in  { from { opacity: 0; transform: translateX(-50%) translateY(-8px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
@keyframes toast-out { from { opacity: 1; } to { opacity: 0; } }

/* Membership — status badge dodatkowe warianty */
.membership-status-badge--active   { background: hsl(142,60%,92%); color: hsl(142,60%,28%); }
.membership-status-badge--expired  { background: hsl(0,60%,92%);   color: hsl(0,60%,35%); }

.membership-last-payment {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: var(--muted-fg);
  padding: 0.625rem 1rem;
  background: var(--muted);
  border-radius: 0 0 var(--radius) var(--radius);
  margin-top: -0.75rem;
}

/* Wiadomości — pusty czat */
.messages-chat-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  height: 100%;
  color: var(--muted-fg);
  font-size: 0.875rem;
}

/* ================================================================
   GLOBAL ROOM
================================================================ */
.global-room-screen {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  background: var(--bg);
  overflow: hidden;
}

.global-room-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  color: #fff;
  flex-shrink: 0;
}

.global-room-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.global-room-icon {
  width: 38px;
  height: 38px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.global-room-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  color: #fff;
}

.global-room-subtitle {
  font-size: 0.75rem;
  margin: 0;
  opacity: 0.8;
}

.global-room-badge {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(255,255,255,0.15);
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
}

.global-room-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  animation: live-pulse 2s ease-in-out infinite;
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

.global-room-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  scroll-behavior: smooth;
}

.global-room-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.875rem;
  flex: 1;
  color: var(--muted-fg);
  font-size: 0.875rem;
  text-align: center;
  padding: 2rem;
}

/* Date separator */
.gr-date-sep {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.75rem 0 0.25rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted-fg);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.gr-date-sep::before,
.gr-date-sep::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Message row */
.gr-msg {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  margin-bottom: 0.125rem;
}

.gr-msg--own {
  flex-direction: row-reverse;
}

.gr-msg-avatar {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  font-size: 0.7rem;
}

.gr-msg-content {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  max-width: 72%;
}

.gr-msg--own .gr-msg-content {
  align-items: flex-end;
}

.gr-msg-author {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted-fg);
  padding-left: 0.5rem;
  margin-bottom: 0.125rem;
}

.gr-msg-bubble {
  background: var(--muted);
  border-radius: 1rem 1rem 1rem 0.25rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.5;
  word-break: break-word;
  color: var(--fg);
}

.gr-msg-bubble--own {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  color: #fff;
  border-radius: 1rem 1rem 0.25rem 1rem;
}

.gr-msg-time {
  font-size: 0.65rem;
  color: var(--muted-fg);
  padding: 0 0.5rem;
}

/* Footer input */
.global-room-footer {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--bg);
}

.global-room-input-wrap {
  flex: 1;
  background: var(--muted);
  border-radius: 1.25rem;
  padding: 0.5rem 0.875rem;
}

.global-room-input {
  width: 100%;
  border: none;
  background: transparent;
  resize: none;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--fg);
  outline: none;
  max-height: 120px;
  overflow-y: auto;
  font-family: inherit;
}

.global-room-input::placeholder {
  color: var(--muted-fg);
}
