/* ============================================================
   OnVibe.gg — SYSTEM DESIGNU
   Motyw: nocne Los Santos, czysty i nowoczesny.
   Paleta: głęboka granatowa czerń + jeden akcent — mięta #8eedb7.
   Typografia: Manrope (nagłówki, nawigacja, przyciski),
               Inter (tekst), JetBrains Mono (dane liczbowe, znaczniki czasu).
   ============================================================ */

/* Fonty ładowane są przez <link rel="preconnect"+"stylesheet"> w includes/header.php
   (szybciej niż @import, który blokuje renderowanie strony). */

:root {
    /* Kolory */
    --night:        #0a0c12;
    --night-2:      #0d1017;
    --panel:        #12151f;
    --panel-2:      #171b27;
    --panel-hover:  #1c2130;
    --border:       rgba(255,255,255,.08);
    --border-2:     rgba(255,255,255,.14);

    /* Akcent marki — mięta OnVibe */
    --brand:        #8eedb7;   /* podstawowy akcent  */
    --brand-light:  #b7f5d3;   /* tekst/ikony na ciemnym tle */
    --brand-deep:   #5cd99d;   /* dolny kolor gradientów */
    --brand-dim:    rgba(142,237,183,.14);  /* tła, podświetlenia */
    --brand-glow:   rgba(142,237,183,.38);  /* obwódki, poświata */
    --on-brand:     #05231a;   /* tekst NA akcencie (musi być ciemny) */

    /* Aliasy zgodności ze starą paletą — stary kod nadal działa */
    --orange:       var(--brand);
    --orange-light: var(--brand-light);
    --orange-dim:   var(--brand-dim);
    --orange-glow:  var(--brand-glow);

    --text:         #eef1f6;
    --text-dim:     #9aa2b4;
    --text-faint:   #626a7c;

    --green:        #33d192;
    --red:          #ff5c5c;
    --blue-steel:   #6f8bb3;

    /* Typografia */
    --f-display: 'Manrope', sans-serif;
    --f-body:    'Inter', sans-serif;
    --f-mono:    'JetBrains Mono', monospace;

    /* Layout */
    --radius-sm: 8px;
    --radius:    14px;
    --radius-lg: 22px;
    --container: 1180px;
    --nav-h: 76px;

    --shadow: 0 20px 50px -20px rgba(0,0,0,.6);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--night);
    color: var(--text);
    font-family: var(--f-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Tło: delikatna siatka miasta + winieta */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    background-image:
        linear-gradient(rgba(142,237,183,.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(142,237,183,.045) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 0%, transparent 75%);
}
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -3;
    background: radial-gradient(ellipse 60% 40% at 50% -10%, #0d2419 0%, var(--night) 60%);
}

h1, h2, h3, h4 {
    font-family: var(--f-display);
    font-weight: 800;
    letter-spacing: -.01em;
    margin: 0 0 .5em;
}
h1 { font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1.08; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); line-height: 1.15; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 1em; color: var(--text-dim); }
a { color: inherit; text-decoration: none; }
ul { padding: 0; margin: 0; list-style: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.mono { font-family: var(--f-mono); }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--f-display);
    font-weight: 700;
    font-size: .78rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--brand-light);
    margin-bottom: 14px;
}
.eyebrow::before {
    content: none;
}

.text-brand, .text-orange { color: var(--brand); }
.text-dim { color: var(--text-dim); }
.text-center { text-align: center; }

/* ---------- Przyciski ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 26px;
    border-radius: var(--radius-sm);
    font-family: var(--f-display);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: .03em;
    text-transform: uppercase;
    border: 1px solid transparent;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
    white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary {
    background: linear-gradient(135deg, var(--brand-light), var(--brand-deep));
    color: var(--on-brand);
    box-shadow: 0 8px 24px -8px var(--brand-glow);
}
.btn-primary:hover { box-shadow: 0 12px 32px -6px var(--brand-glow); transform: translateY(-2px); }
.btn-outline {
    background: transparent;
    border-color: var(--border-2);
    color: var(--text);
}
.btn-outline:hover { border-color: var(--brand); color: var(--brand-light); background: var(--brand-dim); }
.btn-discord { background: #5865F2; color: #fff; }
.btn-discord:hover { background: #4752c4; transform: translateY(-2px); }
.btn-sm { padding: 9px 16px; font-size: .82rem; }
.btn-block { width: 100%; }
.btn-danger { background: rgba(255,92,92,.12); border-color: rgba(255,92,92,.4); color: var(--red); }
.btn-danger:hover { background: rgba(255,92,92,.22); }
.btn-success { background: rgba(51,209,146,.12); border-color: rgba(51,209,146,.4); color: var(--green); }
.btn-success:hover { background: rgba(51,209,146,.22); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

/* ---------- Nawigacja ---------- */
.navbar {
    position: fixed; top: 0; left: 0; right: 0;
    height: var(--nav-h);
    z-index: 200;
    display: flex; align-items: center;
    background: rgba(10,12,18,.55);
    backdrop-filter: blur(14px) saturate(140%);
    border-bottom: 1px solid var(--border);
    transition: background .25s ease, border-color .25s ease;
}
.navbar.is-scrolled { background: rgba(10,12,18,.92); border-color: var(--border-2); }
.navbar .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; }

/* ------------------------------------------------------------
   Logo w nawigacji — okrągły znak marki.
   Znak JEST odznaką: wypełnia całe kółko od krawędzi do krawędzi,
   bez dodatkowej ramki i bez przerwy między obrysem logo a tłem.
   Poświata na hover jest okrągła, więc przylega dokładnie do znaku.
   ------------------------------------------------------------ */
.brand-badge {
    --badge-size: 48px;
    width: var(--badge-size);
    height: var(--badge-size);
    flex-shrink: 0;
    display: block;
    padding: 0;
    border: 0;
    background: none;
    border-radius: 50%;
    line-height: 0;
    transition: box-shadow .3s ease;
}
.brand-badge img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 50%;
    /* --mark-zoom: gdy wgrany logo-mark.png ma wokół znaku puste marginesy,
       podnieś tę wartość (np. 1.15), a logo znów wypełni całe kółko. */
    transform: scale(var(--mark-zoom, 1));
    transition: transform .45s cubic-bezier(.34,1.56,.64,1);
}
.brand-badge:hover { box-shadow: 0 0 0 3px var(--brand-dim), 0 0 22px -4px var(--brand-glow); }
.brand-badge:hover img { transform: scale(calc(var(--mark-zoom, 1) * 1.06)); }
.brand-badge:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; }

/* Środkowa pigułka z linkami nawigacji */
.nav-pill {
    display: flex; align-items: center; gap: 2px;
    background: var(--panel-2); border: 1px solid var(--border-2);
    border-radius: 100px; padding: 6px;
    flex-wrap: nowrap;
}
.nav-pill .lang-switch { padding: 9px 14px 9px 10px; }

.brand { display: flex; align-items: center; gap: 10px; font-family: var(--f-display); font-weight: 800; font-size: 1.2rem; letter-spacing: -.01em; }
.brand .brand-mark {
    width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    color: var(--brand); flex-shrink: 0;
}
.brand .brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.brand span.accent { color: var(--brand); }

/* ------------------------------------------------------------
   Pełne logo z napisem (stopka, panel admina).
   Gdy w assets/img/ leży logo-wordmark.png — renderowany jest jeden
   obrazek. Gdy go brak — składany jest ze znaku i tekstu, więc
   miejsce po logo nigdy nie zostaje puste.
   ------------------------------------------------------------ */
.brand-lockup { display: inline-flex; align-items: center; gap: 11px; line-height: 1; }
.brand-lockup .brand-wordmark {
    height: 42px; width: auto; max-width: 100%;
    object-fit: contain; display: block;
}
.brand-lockup .brand-mark { width: 36px; height: 36px; flex-shrink: 0; display: block; }
.brand-lockup .brand-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand-lockup .brand-text {
    font-family: var(--f-display); font-weight: 800; font-size: 1.3rem;
    letter-spacing: -.02em; color: var(--text); white-space: nowrap;
}
.brand-lockup .brand-text .accent { color: var(--brand); }

a > .brand-lockup { transition: opacity .18s ease; }
a:hover > .brand-lockup { opacity: .82; }

.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a {
    padding: 9px 18px;
    font-family: var(--f-display);
    font-weight: 700;
    font-size: .86rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--text-dim);
    border-radius: 100px;
    border: 1px solid transparent;
    position: relative;
    transition: color .18s ease, background .18s ease, border-color .18s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active {
    color: var(--brand-light);
    background: var(--brand-dim);
    border-color: var(--brand);
}

.nav-right { display: flex; align-items: center; gap: 12px; }

.lang-switch {
    display: flex; align-items: center; gap: 7px;
    color: var(--text-dim); font-size: .84rem; font-weight: 600;
    padding: 8px 4px;
}
.lang-switch i { font-size: .9rem; }

.icon-btn {
    width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
    background: transparent; border: 1px solid var(--border-2);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-dim); position: relative; overflow: hidden;
    font-size: 1rem;
    transition: border-color .18s ease, color .18s ease;
}
.icon-btn:hover { color: var(--brand-light); border-color: var(--brand); }
.icon-btn img { width: 100%; height: 100%; object-fit: cover; }

.nav-toggle { display: none; background: none; border: 1px solid var(--border-2); border-radius: var(--radius-sm); width: 42px; height: 42px; color: var(--text); align-items: center; justify-content: center; }

/* ---------- Dzwonek powiadomień ---------- */
.notif-wrap { position: relative; }
.notif-btn {
    width: 42px; height: 42px; border-radius: 50%;
    background: var(--panel); border: 1px solid var(--border-2);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-dim); position: relative; font-size: 1.05rem;
    transition: border-color .18s ease, color .18s ease;
}
.notif-btn:hover { color: var(--brand-light); border-color: var(--brand); }
.nav-toggle i { font-size: 1.1rem; }
.notif-badge {
    position: absolute; top: -4px; right: -4px;
    background: var(--brand); color: var(--on-brand);
    font-family: var(--f-mono); font-size: .68rem; font-weight: 700;
    min-width: 18px; height: 18px; border-radius: 100px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 4px; box-shadow: 0 0 0 3px var(--night);
}
.notif-dropdown {
    position: absolute; top: calc(100% + 12px); right: 0;
    width: 360px; max-height: 420px; overflow-y: auto;
    background: var(--panel-2); border: 1px solid var(--border-2);
    border-radius: var(--radius); box-shadow: var(--shadow);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
    z-index: 300;
}
.notif-dropdown.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
.notif-dropdown-head { padding: 14px 18px; border-bottom: 1px solid var(--border); font-family: var(--f-display); font-weight: 700; text-transform: uppercase; font-size: .85rem; letter-spacing: .05em; color: var(--text-dim); }
.notif-item { display: flex; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background .15s; }
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--panel-hover); }
.notif-item.unread { background: linear-gradient(90deg, var(--brand-dim), transparent); }
.notif-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }
.notif-dot.accepted { background: var(--green); box-shadow: 0 0 6px var(--green); }
.notif-dot.rejected { background: var(--red); }
.notif-dot.info { background: var(--blue-steel); }
.notif-title { font-weight: 600; font-size: .9rem; margin-bottom: 2px; }
.notif-msg { font-size: .82rem; color: var(--text-dim); margin: 0; }
.notif-time { font-family: var(--f-mono); font-size: .7rem; color: var(--text-faint); margin-top: 4px; }
.notif-empty { padding: 40px 18px; text-align: center; color: var(--text-faint); font-size: .88rem; }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 92vh;
    display: flex; align-items: flex-end;
    padding-top: var(--nav-h);
    padding-bottom: 90px;
    overflow: hidden;
}
.hero-bg {
    position: absolute; inset: 0; z-index: 0;
}
.hero-bg img, .hero-bg video {
    width: 100%; height: 100%; object-fit: cover;
    filter: brightness(.55) saturate(1.05);
}
.hero-bg::after {
    content: '';
    position: absolute; inset: 0;
    background:
        linear-gradient(0deg, var(--night) 0%, rgba(10,12,18,.55) 45%, rgba(10,12,18,.2) 100%),
        radial-gradient(ellipse 70% 60% at 15% 100%, rgba(142,237,183,.14) 0%, transparent 60%);
}
.hero-bg.no-photo {
    background: radial-gradient(ellipse 60% 50% at 20% 100%, #0f2b1e 0%, var(--night) 55%), var(--night);
}
.hero-bg.no-photo::after { background: none; }
.hero-glow {
    position: absolute; width: 900px; height: 900px; border-radius: 50%;
    left: -280px; bottom: -420px;
    background: radial-gradient(circle, var(--brand-dim) 0%, transparent 70%);
    animation: glow-pulse 6s ease-in-out infinite;
    pointer-events: none;
}
@keyframes glow-pulse { 0%,100% { opacity: .6; transform: scale(1); } 50% { opacity: 1; transform: scale(1.08); } }

.hero-logo-mark {
    position: absolute; left: 40px; bottom: 40px;
    width: 176px; z-index: 1;
    opacity: .38; pointer-events: none;
}
.hero-logo-mark img, .hero-logo-mark svg { width: 100%; height: auto; display: block; }

.hero-content { position: relative; z-index: 2; max-width: 720px; }
.hero h1 { margin-bottom: .32em; }
.hero-tagline { font-size: 1.1rem; max-width: 540px; margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 40px; }

.status-strip {
    display: inline-flex; align-items: center; gap: 22px;
    background: var(--panel); border: 1px solid var(--border-2);
    padding: 14px 22px; border-radius: var(--radius);
    font-family: var(--f-mono); font-size: .82rem;
}
.status-strip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); animation: pulse 1.8s ease-in-out infinite; display: inline-block; margin-right: 8px; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }
.status-strip b { color: var(--brand-light); }
.copy-ip { background: none; border: 0; padding: 0; color: var(--brand-light); font-family: var(--f-mono); font-size: .82rem; }
.copy-ip:hover { text-decoration: underline; text-underline-offset: 3px; }
.status-divider { width: 1px; height: 18px; background: var(--border-2); }

/* ---------- Sekcje ogólne ---------- */
.section { padding: 88px 0; position: relative; }
.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Karty ogólne ---------- */
.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px;
    transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--border-2); box-shadow: var(--shadow); }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Cechy serwera */
.feature-card .feature-icon {
    width: 52px; height: 52px; border-radius: 12px;
    background: var(--brand-dim); border: 1px solid var(--brand-glow);
    display: flex; align-items: center; justify-content: center;
    color: var(--brand-light); margin-bottom: 20px;
}
.feature-card h3 { margin-bottom: 8px; }
.feature-card p { margin: 0; font-size: .92rem; }


/* ============================================================
   PASEK LICZB POD HERO
   Kafelki renderują się tylko dla danych, które faktycznie mamy
   (patrz $stats w index.php) — nigdy nie zostaje pusta ramka.
   ============================================================ */
.stats-strip {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, var(--night-2), var(--night));
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1px;
    background: var(--border);
}
.stat-tile {
    display: flex; align-items: center; gap: 16px;
    padding: 26px 24px;
    background: var(--night-2);
}
.stat-tile > i {
    width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--brand-dim); border: 1px solid var(--brand-glow);
    color: var(--brand-light); font-size: 1.05rem;
}
.stat-tile-value {
    display: block;
    font-family: var(--f-display); font-weight: 800; font-size: 1.75rem;
    line-height: 1.1; letter-spacing: -.02em; color: var(--text);
}
.stat-tile-label {
    display: block; margin-top: 2px;
    font-family: var(--f-mono); font-size: .74rem; letter-spacing: .06em;
    text-transform: uppercase; color: var(--text-faint);
}

/* ============================================================
   START W TRZECH KROKACH
   ============================================================ */
.steps-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
    counter-reset: step; list-style: none; padding: 0; margin: 0;
}
.step-card {
    position: relative; overflow: hidden;
    display: flex; flex-direction: column;
    padding: 34px 30px 28px;
    background: var(--panel); border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color .22s ease, transform .22s ease;
}
.step-card:hover { border-color: var(--brand-glow); transform: translateY(-4px); }
.step-num {
    position: absolute; top: 6px; right: 18px;
    font-family: var(--f-display); font-weight: 800; font-size: 4.4rem;
    line-height: 1; color: var(--brand); opacity: .09; pointer-events: none;
}
.step-card h3 { margin-bottom: 10px; font-size: 1.2rem; }
.step-card p { font-size: .93rem; flex: 1; margin-bottom: 18px; }
.step-link {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--f-mono); font-size: .8rem; color: var(--brand-light);
    transition: gap .18s ease;
}
.step-link:hover { gap: 13px; }
.step-link i { font-size: .72rem; }

/* Numer kroku jako miętowa kropka przed nagłówkiem sekcji kroków */
.step-card::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
    background: var(--brand); opacity: 0; transition: opacity .22s ease;
}
.step-card:hover::before { opacity: 1; }

/* ============================================================
   GALERIA — kafelek klikalny + lightbox
   ============================================================ */
.gallery-card {
    display: block; width: 100%; text-align: left;
    background: none; border: 0; padding: 0; cursor: pointer;
    font: inherit; color: inherit;
}
.gallery-thumb { position: relative; }
.gallery-zoom {
    position: absolute; inset: 0; z-index: 1;
    display: flex; align-items: center; justify-content: center;
    background: rgba(6, 12, 9, .45);
    opacity: 0; transition: opacity .25s ease;
}
.gallery-zoom i {
    width: 52px; height: 52px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--brand); color: var(--on-brand); font-size: 1.05rem;
    transform: scale(.85); transition: transform .25s ease;
}
.gallery-card:hover .gallery-zoom,
.gallery-card:focus-visible .gallery-zoom { opacity: 1; }
.gallery-card:hover .gallery-zoom i { transform: scale(1); }
.gallery-card:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; border-radius: var(--radius); }

.lightbox {
    position: fixed; inset: 0; z-index: 800;
    display: flex; align-items: center; justify-content: center; gap: 12px;
    padding: 24px;
    background: rgba(5, 7, 11, .92);
    backdrop-filter: blur(6px);
    opacity: 0; visibility: hidden;
    transition: opacity .22s ease, visibility .22s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox-figure {
    margin: 0; max-width: min(1100px, 100%); max-height: 100%;
    display: flex; flex-direction: column; gap: 14px;
}
.lightbox-figure img {
    max-width: 100%; max-height: calc(100vh - 170px);
    width: auto; height: auto; object-fit: contain;
    border-radius: var(--radius); border: 1px solid var(--border-2);
    background: var(--panel);
}
.lightbox-figure figcaption {
    display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px;
}
.lightbox-title { font-family: var(--f-display); font-weight: 700; font-size: 1.05rem; color: var(--text); }
.lightbox-caption { font-size: .9rem; color: var(--text-dim); flex: 1; min-width: 200px; }
.lightbox-counter { font-size: .78rem; color: var(--text-faint); }

.lightbox-close, .lightbox-nav {
    width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--panel-2); border: 1px solid var(--border-2);
    color: var(--text); font-size: 1rem;
    transition: border-color .18s ease, color .18s ease, background .18s ease;
}
.lightbox-close:hover, .lightbox-nav:hover { border-color: var(--brand); color: var(--brand-light); background: var(--panel-hover); }
.lightbox-close { position: absolute; top: 20px; right: 20px; }

@media (max-width: 980px) {
    .steps-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .stat-tile { padding: 20px 18px; gap: 13px; }
    .stat-tile-value { font-size: 1.45rem; }
    .lightbox { padding: 14px; gap: 6px; }
    .lightbox-nav { position: absolute; bottom: 18px; }
    .lightbox-nav.is-prev { left: 18px; }
    .lightbox-nav.is-next { right: 18px; }
    .lightbox-figure img { max-height: calc(100vh - 220px); }
}

/* ---------- Aktualności ---------- */
.news-card { display: flex; flex-direction: column; height: 100%; overflow: hidden; padding: 0; }
.news-thumb { height: 180px; background: linear-gradient(135deg, #0d2419, var(--panel-2)); position: relative; overflow: hidden; }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .news-thumb img { transform: scale(1.06); }
.news-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.news-date { font-family: var(--f-mono); font-size: .74rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; }
.news-body h3 { margin-bottom: 10px; font-size: 1.15rem; }
.news-body p { font-size: .9rem; flex: 1; }
.news-read { font-family: var(--f-mono); font-size: .8rem; color: var(--brand-light); margin-top: 10px; }

/* Karta aktualności — meta + znaczniki kategorii (render: news_card_html) */
.news-card-meta {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; margin-bottom: 10px;
}
.news-card-meta .news-date { margin-bottom: 0; }
.news-tags { display: flex; gap: 5px; flex-shrink: 0; }
.news-tag {
    display: inline-flex; align-items: center; gap: 2px;
    padding: 2px 8px; border-radius: 100px;
    background: var(--cl-bg); border: 1px solid var(--cl-bd); color: var(--cl);
    font-family: var(--f-mono); font-size: .68rem; font-weight: 600; line-height: 1.5;
}

/* Kafelek bez zdjęcia: znak marki zamiast pustej plamy */
.news-thumb-empty {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
}
.news-thumb-empty img { width: 56px; height: 56px; opacity: .12; }

.news-read i { font-size: .72rem; transition: transform .2s ease; }
.news-card:hover .news-read i { transform: translateX(4px); }

/* ============================================================
   ARTYKUŁ / CHANGELOG
   ------------------------------------------------------------
   Treść leci z render_article() w includes/content.php.
   Każdy typ sekcji ustawia własne --cl / --cl-bg, a reszta
   reguł tylko z nich korzysta — dodanie nowej kategorii to
   jedna linijka niżej i jeden wpis w changelog_labels().
   ============================================================ */
.article-page { padding-top: var(--nav-h); }
.container-narrow { max-width: 780px; }

.back-link {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--f-mono); font-size: .8rem; letter-spacing: .04em;
    color: var(--text-faint); padding: 8px 0;
    transition: color .18s ease, gap .18s ease;
}
.back-link:hover { color: var(--brand-light); gap: 12px; }

.article-head { margin: 18px 0 34px; }
.article-meta {
    display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
    font-family: var(--f-mono); font-size: .78rem; letter-spacing: .05em;
    text-transform: uppercase; color: var(--text-faint); margin-bottom: 16px;
}
.dot-sep { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .6; }
.tag-changelog {
    padding: 3px 9px; border-radius: 100px;
    background: var(--brand-dim); border: 1px solid var(--brand-glow);
    color: var(--brand-light); font-size: .7rem;
}
.article-head h1 { text-transform: none; font-size: clamp(2rem, 4.4vw, 3.1rem); margin-bottom: 0; }
.article-lead { font-size: 1.1rem; color: var(--text-dim); margin: 16px 0 0; max-width: 62ch; }

.article-cover {
    margin: 0 0 38px; border-radius: var(--radius-lg); overflow: hidden;
    border: 1px solid var(--border); background: var(--panel-2);
}
.article-cover img { width: 100%; height: auto; display: block; }

/* ---------- Treść ---------- */
.article-body { font-size: 1.02rem; line-height: 1.72; color: var(--text); }
.article-body p { margin: 0 0 1.1em; color: var(--text-dim); max-width: 68ch; }
.article-body p:last-child { margin-bottom: 0; }
.article-body a { color: var(--brand-light); text-decoration: underline; text-underline-offset: 3px; }
.article-body a:hover { color: var(--brand); }

/* Kolory kategorii — jedyne miejsce, gdzie są zdefiniowane */
.cl-added   { --cl: var(--brand);      --cl-bg: rgba(142,237,183,.09); --cl-bd: rgba(142,237,183,.34); }
.cl-fixed   { --cl: #ffc155;           --cl-bg: rgba(255,193,85,.09);  --cl-bd: rgba(255,193,85,.34);  }
.cl-changed { --cl: var(--blue-steel); --cl-bg: rgba(111,139,179,.12); --cl-bd: rgba(111,139,179,.40); }
.cl-removed { --cl: var(--red);        --cl-bg: rgba(255,92,92,.09);   --cl-bd: rgba(255,92,92,.34);   }
.cl-other   { --cl: var(--text-dim);   --cl-bg: rgba(255,255,255,.04); --cl-bd: rgba(255,255,255,.14); }

/* ---------- Podsumowanie na górze ---------- */
.changelog-summary {
    display: flex; flex-wrap: wrap; gap: 10px;
    padding-bottom: 26px; margin-bottom: 30px;
    border-bottom: 1px solid var(--border);
}
.cl-chip {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 7px 14px 7px 8px; border-radius: 100px;
    background: var(--cl-bg); border: 1px solid var(--cl-bd);
    font-family: var(--f-mono); font-size: .78rem; letter-spacing: .03em;
    color: var(--text-dim); white-space: nowrap;
}
.cl-chip b { color: var(--cl); font-weight: 700; }
.cl-sign {
    width: 20px; height: 20px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--cl); color: var(--night);
    font-size: .72rem; font-weight: 700; line-height: 1;
}

/* ---------- Sekcje ---------- */
.changelog-intro { margin-bottom: 26px; }
.changelog-outro { margin-top: 22px; }
.article-list { display: grid; gap: 8px; margin-bottom: 1.1em; }
.article-list li { position: relative; padding-left: 20px; color: var(--text-dim); }
.article-list li::before { content: ''; position: absolute; left: 4px; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--brand); opacity: .7; }
.changelog-intro p, .changelog-outro p { color: var(--text); }

.changelog-section {
    position: relative;
    padding: 22px 24px 22px 26px;
    margin-bottom: 16px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-left: 3px solid var(--cl);
    border-radius: var(--radius);
}
.changelog-heading {
    display: flex; align-items: center; gap: 11px;
    font-family: var(--f-display); font-size: 1rem; font-weight: 700;
    letter-spacing: .06em; text-transform: uppercase;
    color: var(--cl); margin: 0 0 14px;
}
.cl-badge {
    width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--cl-bg); border: 1px solid var(--cl-bd);
    font-size: .85rem; line-height: 1;
}

.changelog-list { display: grid; gap: 9px; }
.changelog-list li {
    position: relative; padding-left: 22px;
    color: var(--text-dim); font-size: .96rem; line-height: 1.6;
}
.changelog-list li::before {
    content: ''; position: absolute; left: 4px; top: .62em;
    width: 6px; height: 6px; border-radius: 2px;
    background: var(--cl); opacity: .85;
}
.changelog-section > p { margin: 0 0 .8em; }
.changelog-section > p:last-child { margin-bottom: 0; }

/* ---------- Poprzedni / następny ---------- */
.article-nav {
    display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
    margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--border);
}
.article-nav-item {
    display: flex; flex-direction: column; gap: 6px;
    padding: 18px 20px; border-radius: var(--radius);
    background: var(--panel); border: 1px solid var(--border);
    transition: border-color .2s ease, transform .2s ease;
}
.article-nav-item:hover { border-color: var(--brand-glow); transform: translateY(-2px); }
.article-nav-item.is-next { text-align: right; }
.article-nav-label {
    font-family: var(--f-mono); font-size: .72rem; letter-spacing: .08em;
    text-transform: uppercase; color: var(--text-faint);
}
.article-nav-title { font-family: var(--f-display); font-weight: 700; font-size: .96rem; color: var(--text); }

@media (max-width: 700px) {
    .changelog-section { padding: 18px 18px 18px 20px; }
    .article-nav { grid-template-columns: 1fr; }
    .article-nav-item.is-next { text-align: left; }
}

/* ---------- Podania: kategorie (odznaki) ---------- */
.badge-card {
    display: flex; flex-direction: column; align-items: flex-start;
    position: relative;
}
.badge-card .badge-icon {
    width: 56px; height: 56px; border-radius: 50%;
    border: 2px solid var(--brand);
    display: flex; align-items: center; justify-content: center;
    color: var(--brand-light); margin-bottom: 18px;
    box-shadow: 0 0 0 4px var(--brand-dim);
}
.badge-card h3 { margin-bottom: 8px; }
.badge-card p { font-size: .88rem; margin-bottom: 18px; }
.badge-card .btn { margin-top: auto; }

/* ---------- Formularze ---------- */
.form-group { margin-bottom: 20px; }
label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 8px; color: var(--text); }
label .req { color: var(--brand); }
input[type=text], input[type=email], input[type=password], textarea, select {
    width: 100%; background: var(--panel-2); border: 1px solid var(--border-2);
    border-radius: var(--radius-sm); padding: 13px 16px; color: var(--text);
    font-family: var(--f-body); font-size: .95rem; transition: border-color .18s ease, box-shadow .18s ease;
}
textarea { resize: vertical; min-height: 110px; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-dim); }
input::placeholder, textarea::placeholder { color: var(--text-faint); }
.form-hint { font-size: .78rem; color: var(--text-faint); margin-top: 6px; }
.form-error { border-color: var(--red) !important; }
.field-error { color: var(--red); font-size: .8rem; margin-top: 6px; }

/* ---------- Alerty / flash ---------- */
.alert { display: flex; align-items: flex-start; gap: 12px; padding: 16px 18px; border-radius: var(--radius-sm); margin-bottom: 24px; font-size: .92rem; border: 1px solid; }
.alert-success { background: rgba(51,209,146,.08); border-color: rgba(51,209,146,.35); color: var(--green); }
.alert-error { background: rgba(255,92,92,.08); border-color: rgba(255,92,92,.35); color: var(--red); }
.alert-info { background: var(--brand-dim); border-color: var(--brand-glow); color: var(--brand-light); }

/* ---------- Status "pill" ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 100px; font-family: var(--f-mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.pill-pending { background: rgba(255,193,85,.12); color: #ffc155; border: 1px solid rgba(255,193,85,.35); }
.pill-accepted { background: rgba(51,209,146,.12); color: var(--green); border: 1px solid rgba(51,209,146,.35); }
.pill-rejected { background: rgba(255,92,92,.12); color: var(--red); border: 1px solid rgba(255,92,92,.35); }

/* ---------- Regulamin ---------- */
.rules-content .rule-section {
    background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 30px 34px; margin-bottom: 20px;
}
.rules-content .rule-section h3 {
    font-size: 1.1rem; color: var(--brand-light); margin-bottom: 16px;
    padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.rules-content .rule-section ol { counter-reset: rule; padding: 0; }
.rules-content .rule-section li {
    counter-increment: rule; list-style: none; position: relative;
    padding: 10px 0 10px 42px; color: var(--text-dim); font-size: .95rem; border-bottom: 1px dashed var(--border);
}
.rules-content .rule-section li:last-child { border-bottom: none; }
.rules-content .rule-section li::before {
    content: counter(rule); position: absolute; left: 0; top: 8px;
    width: 26px; height: 26px; border-radius: 7px; background: var(--brand-dim); border: 1px solid var(--brand-glow);
    color: var(--brand-light); font-family: var(--f-mono); font-size: .78rem; font-weight: 600;
    display: flex; align-items: center; justify-content: center;
}

/* ---------- Sklep (Tebex) ---------- */
.shop-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.shop-thumb { height: 160px; background: linear-gradient(135deg, #0d2419, var(--panel-2)); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.shop-thumb img { width: 100%; height: 100%; object-fit: cover; }
.shop-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.shop-body h3 { font-size: 1.05rem; margin-bottom: 8px; }
.shop-body p { font-size: .86rem; flex: 1; }
.shop-price { font-family: var(--f-mono); font-size: 1.3rem; font-weight: 600; color: var(--brand-light); margin: 10px 0 16px; }

/* ---------- Galeria / Showcase ---------- */
.watermark-bg { position: relative; }
.watermark-bg::before {
    content: '';
    position: absolute; inset: 0; z-index: 0;
    background-image: url('../img/logo-mark.png');
    background-size: 132px 132px;
    background-repeat: repeat;
    background-position: 0 0;
    opacity: .02;
    pointer-events: none;
}
.watermark-bg > .container { position: relative; z-index: 1; }

.gallery-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px 28px; }
.gallery-thumb {
    border-radius: var(--radius); overflow: hidden;
    aspect-ratio: 16 / 10.5; background: var(--panel-2);
    border: 1px solid var(--border);
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery-card:hover .gallery-thumb img { transform: scale(1.045); }
.gallery-caption { margin-top: 16px; }
.gallery-caption h3 { font-size: 1.05rem; margin-bottom: 6px; }
.gallery-caption p { font-size: .87rem; margin: 0; }
.gallery-empty-admin {
    grid-column: 1 / -1; text-align: center; padding: 50px 30px;
    border: 1px dashed var(--border-2); border-radius: var(--radius);
    color: var(--text-faint); font-size: .9rem;
}

/* ---------- Baner cookies ---------- */
.cookie-banner {
    position: fixed; left: 22px; bottom: 22px; z-index: 700;
    width: 460px; max-width: calc(100vw - 44px);
    background: var(--panel-2); border: 1px solid var(--border-2);
    border-radius: var(--radius-lg); padding: 22px 24px;
    box-shadow: var(--shadow);
    transform: translateY(140%); opacity: 0;
    transition: transform .4s ease, opacity .4s ease;
}
.cookie-banner.is-visible { transform: translateY(0); opacity: 1; }
.cookie-banner-head { display: flex; gap: 12px; align-items: flex-start; }
.cookie-icon {
    width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
    background: var(--brand-dim); border: 1px solid var(--brand-glow);
    display: flex; align-items: center; justify-content: center; color: var(--brand-light);
}
.cookie-banner h4 { margin: 0 0 6px; font-size: .98rem; }
.cookie-banner p { font-size: .84rem; margin: 0; line-height: 1.55; }
.cookie-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; flex-wrap: wrap; gap: 12px; }
.cookie-settings-link { font-size: .82rem; color: var(--text-dim); text-decoration: underline; text-underline-offset: 3px; }
.cookie-settings-link:hover { color: var(--text); }
.cookie-btns { display: flex; gap: 10px; }

/* ---------- Modal ---------- */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(6,7,10,.72); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center; z-index: 500;
    opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility .2s;
    padding: 20px;
}
.modal-overlay.is-open { opacity: 1; visibility: visible; }
.modal-box {
    background: var(--panel-2); border: 1px solid var(--border-2); border-radius: var(--radius-lg);
    max-width: 460px; width: 100%; padding: 36px; text-align: center;
    transform: scale(.94); transition: transform .2s ease;
    box-shadow: var(--shadow);
}
.modal-overlay.is-open .modal-box { transform: scale(1); }
.modal-close { position: absolute; top: 18px; right: 18px; background: none; border: none; color: var(--text-dim); width: 32px; height: 32px; }
.modal-icon { width: 68px; height: 68px; border-radius: 50%; margin: 0 auto 20px; display: flex; align-items: center; justify-content: center; font-size: 1.7rem; }
.modal-icon.success { background: rgba(51,209,146,.12); color: var(--green); }
.modal-icon.error { background: rgba(255,92,92,.12); color: var(--red); }

/* ---------- Stopka ---------- */
footer { border-top: 1px solid var(--border); padding: 64px 0 32px; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.footer-col h4 { font-size: .82rem; letter-spacing: .08em; color: var(--text-faint); margin-bottom: 16px; }
.footer-col a:not(.btn) { display: block; color: var(--text-dim); font-size: .9rem; padding: 6px 0; transition: color .15s; }
.footer-col a:not(.btn):hover { color: var(--brand-light); }
/* Logo w stopce: nie dziedziczy stylu zwykłych linków z kolumny */
.footer-col a.footer-brand,
.footer-col a.footer-brand:hover { display: inline-block; padding: 0; margin-bottom: 16px; color: inherit; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 28px; border-top: 1px solid var(--border); font-size: .82rem; color: var(--text-faint); flex-wrap: wrap; gap: 12px; }

/* ---------- Utility ---------- */
.mt-0{margin-top:0}.mb-0{margin-bottom:0}.mt-1{margin-top:12px}.mb-1{margin-bottom:12px}
.mt-2{margin-top:24px}.mb-2{margin-bottom:24px}.mt-3{margin-top:40px}.mb-3{margin-bottom:40px}

/* ---------- Responsywność ---------- */
@media (max-width: 980px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
    .nav-pill { background: transparent; border: none; padding: 0; }
    .nav-pill .lang-switch { display: none; }
    .nav-links { position: fixed; top: var(--nav-h); left: 0; right: 0; bottom: 0; background: var(--night-2); flex-direction: column; align-items: stretch; padding: 20px; gap: 4px; transform: translateX(100%); transition: transform .25s ease; overflow-y: auto; }
    .nav-links.is-open { transform: translateX(0); }
    .nav-links a { padding: 16px; font-size: 1.05rem; border-radius: var(--radius-sm); border: none; border-bottom: 1px solid var(--border); }
    .nav-links a.active { border-bottom: 1px solid var(--border); }
    .nav-toggle { display: flex; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .status-strip { flex-wrap: wrap; gap: 10px 22px; }
    .section { padding: 70px 0; }
    .cookie-banner { left: 12px; right: 12px; bottom: 12px; width: auto; }
    /* Przyciski zgody nie mieszczą się obok siebie na wąskich ekranach */
    .cookie-actions { align-items: stretch; }
    .cookie-btns { flex-direction: column; width: 100%; }
    .cookie-btns .btn { width: 100%; }
    .brand-badge { --badge-size: 44px; }
    .brand-lockup .brand-wordmark { height: 36px; }
    .hero-logo-mark { left: 18px; bottom: 18px; width: 108px; opacity: .28; }
}

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

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

/* Link "przejdź do treści" — widoczny dopiero po tabulacji (dostępność) */
.skip-link {
    position: absolute; left: 16px; top: -100px; z-index: 900;
    background: var(--brand); color: var(--on-brand);
    font-family: var(--f-display); font-weight: 700; font-size: .88rem;
    padding: 12px 18px; border-radius: var(--radius-sm);
    transition: top .18s ease;
}
.skip-link:focus { top: 16px; }

/* ============================================================
   PANEL ADMINISTRATORA
   ============================================================ */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 260px; flex-shrink: 0; background: var(--night-2);
    border-right: 1px solid var(--border); padding: 26px 18px;
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.admin-brand { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 0 8px 26px; font-family: var(--f-display); font-weight: 700; font-size: 1.15rem; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.admin-brand .brand-lockup { gap: 9px; }
.admin-brand .brand-lockup .brand-wordmark { height: 28px; }
.admin-brand .brand-lockup .brand-mark { width: 28px; height: 28px; }
.admin-brand .brand-lockup .brand-text { font-size: 1.05rem; }
.admin-brand > a { display: block; }
.admin-brand-label { width: 100%; font-family: var(--f-mono); font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); }
.admin-nav a {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-sm);
    color: var(--text-dim); font-size: .92rem; font-weight: 500; margin-bottom: 4px; transition: background .15s, color .15s;
}
.admin-nav a:hover { background: var(--panel); color: var(--text); }
.admin-nav a.active { background: var(--brand-dim); color: var(--brand-light); }
.admin-nav a i { width: 18px; text-align: center; font-size: .95rem; }
.admin-nav .badge-count { margin-left: auto; background: var(--brand); color: var(--on-brand); font-family: var(--f-mono); font-size: .68rem; font-weight: 700; padding: 1px 7px; border-radius: 100px; }
.admin-nav-back { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); }

.admin-main { flex: 1; min-width: 0; padding: 34px 40px 60px; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 30px; flex-wrap: wrap; gap: 16px; }
.admin-topbar h1 { font-size: 1.6rem; margin: 0; }

.stat-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; }
.stat-card .stat-label { font-family: var(--f-mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); margin-bottom: 10px; }
.stat-card .stat-value { font-family: var(--f-display); font-size: 2.1rem; font-weight: 700; }
.stat-card .stat-value.brand, .stat-card .stat-value.orange { color: var(--brand-light); }
.stat-card .stat-value.green { color: var(--green); }
.stat-card .stat-value.red { color: var(--red); }
/* Kafelki pulpitu są linkami do odpowiednich list */
a.stat-card { display: block; transition: border-color .18s ease, transform .18s ease; }
a.stat-card:hover { border-color: var(--brand-glow); transform: translateY(-2px); }
.stat-card .stat-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.stat-card .stat-card-top .stat-label { margin-bottom: 0; }
.stat-card .stat-card-top i { color: var(--text-faint); font-size: .95rem; transition: color .18s ease; }
a.stat-card:hover .stat-card-top i { color: var(--brand-light); }
.admin-news-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.table-wrap { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 14px 20px; font-size: .88rem; border-bottom: 1px solid var(--border); }
th { font-family: var(--f-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); background: var(--panel-2); }
tr:last-child td { border-bottom: none; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: var(--panel-hover); }

.filter-bar { display: flex; gap: 10px; margin-bottom: 22px; flex-wrap: wrap; align-items: center; }
.filter-bar a, .filter-bar button {
    padding: 8px 16px; border-radius: 100px; border: 1px solid var(--border-2); font-size: .84rem; color: var(--text-dim); background: var(--panel);
}
.filter-bar a.active, .filter-bar button.active { background: var(--brand-dim); border-color: var(--brand); color: var(--brand-light); }

.qa-row { display: flex; gap: 10px; align-items: flex-start; background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 10px; }
.qa-row input[type=text] { flex: 1; }
.qa-remove { background: rgba(255,92,92,.1); border: 1px solid rgba(255,92,92,.3); color: var(--red); border-radius: var(--radius-sm); width: 40px; height: 40px; flex-shrink: 0; }

.answer-block { background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px 18px; margin-bottom: 12px; }
.answer-block .q { font-family: var(--f-mono); font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--brand-light); margin-bottom: 6px; }
.answer-block .a { font-size: .92rem; white-space: pre-wrap; }


/* ---------- Edytor aktualności z podglądem na żywo ---------- */
.editor-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}
.editor-label-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.editor-textarea {
    font-family: var(--f-mono);
    font-size: .88rem;
    line-height: 1.65;
    min-height: 420px;
    tab-size: 2;
}
.editor-preview-card { position: sticky; top: 24px; padding: 0; overflow: hidden; }
.editor-preview-head {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 14px 20px; border-bottom: 1px solid var(--border);
    background: var(--panel-2);
    font-family: var(--f-mono); font-size: .74rem; letter-spacing: .08em;
    text-transform: uppercase; color: var(--text-faint);
}
.editor-preview-head i { color: var(--brand); margin-right: 6px; }
.editor-preview-state { color: var(--brand-light); text-transform: none; letter-spacing: 0; }
.editor-preview {
    padding: 22px 20px;
    max-height: calc(100vh - 190px);
    overflow-y: auto;
    font-size: .94rem;
}
/* w podglądzie karty sekcji stoją na tle karty — odrobinę jaśniejsze tło */
.editor-preview .changelog-section { background: var(--panel-2); }
.editor-preview .changelog-summary { padding-bottom: 18px; margin-bottom: 20px; }

@media (max-width: 1180px) {
    .editor-layout { grid-template-columns: 1fr; }
    .editor-preview-card { position: static; }
    .editor-preview { max-height: 460px; }
}

@media (max-width: 900px) {
    .admin-sidebar { position: fixed; left: 0; top: 0; z-index: 400; transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow); }
    .admin-sidebar.is-open { transform: translateX(0); }
    .admin-main { padding: 24px 18px 60px; }
}