:root {
    --bg: #0e0f10;
    --panel: #17191c;
    --panel-2: #202327;
    --text: #e8e3d7;
    --muted: #b5ab99;
    --accent: #c58a33;
    --accent-2: #e2b56b;
    --line: #33373d;
    --danger: #b94a48;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; background: radial-gradient(circle at top, #24211d 0, var(--bg) 42rem); color: var(--text); line-height: 1.6; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.site-header { border-bottom: 1px solid var(--line); background: rgba(14,15,16,.92); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(8px); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 0; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border: 2px solid var(--accent); border-radius: 50%; font-weight: 900; color: var(--accent-2); }
.brand small { display: block; color: var(--muted); font-size: .78rem; }
.main-nav { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; font-size: .95rem; }
.main-nav a { color: var(--text); }
.pill, .btn { display: inline-block; border: 1px solid var(--accent); border-radius: 999px; padding: 7px 13px; background: rgba(197,138,51,.12); color: var(--accent-2) !important; }
.hero { padding: 74px 0 46px; border-bottom: 1px solid var(--line); background: linear-gradient(135deg, rgba(197,138,51,.15), transparent 55%); }
.hero h1 { font-size: clamp(2rem, 5vw, 4.5rem); line-height: 1; margin: 0 0 18px; letter-spacing: -0.05em; }
.hero p { max-width: 760px; color: var(--muted); font-size: 1.15rem; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 34px 0; }
.grid.two { grid-template-columns: 2fr 1fr; }
.card { background: linear-gradient(180deg, var(--panel), var(--panel-2)); border: 1px solid var(--line); border-radius: 18px; padding: 22px; box-shadow: 0 12px 30px rgba(0,0,0,.22); }
.card h2, .card h3 { margin-top: 0; line-height: 1.2; }
.meta { color: var(--muted); font-size: .88rem; }
.badge { display: inline-block; padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: .78rem; }
.private { border-color: var(--accent); color: var(--accent-2); }
.article { max-width: 860px; padding: 36px 0; }
.article h1 { font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.05; }
.article-body { font-size: 1.08rem; }
.article-body p { margin: 0 0 1rem; }
.form { display: grid; gap: 14px; }
label { display: grid; gap: 6px; color: var(--muted); }
input, textarea, select { width: 100%; background: #0b0c0d; color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; font: inherit; }
textarea { min-height: 220px; }
button, .button { cursor: pointer; background: var(--accent); color: #111; border: 0; border-radius: 12px; padding: 11px 16px; font-weight: 700; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { border-bottom: 1px solid var(--line); padding: 10px; text-align: left; vertical-align: top; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 34px 0; }
.gallery figure { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.gallery img { width: 100%; height: 220px; object-fit: cover; display: block; background: #111; }
.gallery figcaption { padding: 12px; color: var(--muted); }
.notice { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.error { border-color: var(--danger); color: #ffd0d0; }
.site-footer { margin-top: 50px; border-top: 1px solid var(--line); color: var(--muted); padding: 28px 0; background: #090a0b; }
.footer-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 20px; }
@media (max-width: 820px) { .header-inner, .grid.two, .footer-grid { display: block; } .grid, .gallery { grid-template-columns: 1fr; } .main-nav { margin-top: 12px; } }
.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.dyno-table {
    min-width: 900px;
}

.btn.small {
    padding: 0.35rem 0.65rem;
    font-size: 0.9rem;
}
.article-gallery-image {
    margin: 1.5rem 0;
}

.article-gallery-image img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

.article-gallery-image figcaption {
    margin-top: 0.5rem;
    color: #cfc6b8;
    font-size: 0.95rem;
}
.admin-gallery-list {
    display: grid;
    gap: 1rem;
}

.admin-gallery-item {
    display: grid;
    grid-template-columns: 220px 1fr auto;
    gap: 1rem;
    align-items: start;
}

.admin-gallery-item figure {
    margin: 0;
}

.admin-gallery-item img {
    display: block;
    max-width: 220px;
    height: auto;
    border-radius: 10px;
}

.admin-gallery-item code {
    display: inline-block;
    margin-top: 0.35rem;
    padding: 0.2rem 0.4rem;
    border-radius: 6px;
    background: rgba(255,255,255,0.08);
}

@media (max-width: 800px) {
    .admin-gallery-item {
        grid-template-columns: 1fr;
    }

    .admin-gallery-item img {
        max-width: 100%;
    }
}
.lightbox-trigger {
    display: block;
    border: 0;
    padding: 0;
    margin: 0;
    background: transparent;
    cursor: zoom-in;
    width: 100%;
    text-align: inherit;
}

.lightbox-trigger img,
.gallery-lightbox-img {
    cursor: zoom-in;
}

.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    padding: 2rem;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 95vw;
    max-height: 85vh;
    border-radius: 12px;
    object-fit: contain;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.7);
}

.lightbox-close {
    position: fixed;
    top: 1rem;
    right: 1.5rem;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 3rem;
    line-height: 1;
    cursor: pointer;
}

.lightbox-title {
    margin-top: 1rem;
    color: #e8e0d0;
    font-size: 1rem;
    text-align: center;
}

.lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-size: 5rem;
    line-height: 1;
    width: 4rem;
    height: 6rem;
    cursor: pointer;
    z-index: 10000;
    border-radius: 12px;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.18);
}

.lightbox-prev {
    left: 1rem;
}

.lightbox-next {
    right: 1rem;
}

@media (max-width: 700px) {
    .lightbox-nav {
        font-size: 3.5rem;
        width: 3rem;
        height: 4.5rem;
    }

    .lightbox-prev {
        left: 0.3rem;
    }

    .lightbox-next {
        right: 0.3rem;
    }
}
.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.category-filter .btn.active {
    opacity: 1;
    font-weight: 700;
}

.category-filter .btn.secondary {
    opacity: 0.78;
}
.shortcode-box {
    margin: 0.6rem 0;
    padding: 0.6rem;
    border-radius: 8px;
    background: rgba(255,255,255,0.06);
    font-size: 0.95rem;
}

.shortcode-box code {
    display: inline-block;
    margin-top: 0.25rem;
    padding: 0.2rem 0.4rem;
    border-radius: 6px;
    background: rgba(0,0,0,0.25);
}
.dyno-attachment-image {
    margin: 0;
}

.dyno-attachment-image img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

.dyno-attachment-image figcaption {
    margin-top: 0.5rem;
    color: #cfc6b8;
    font-size: 0.95rem;
}

.dyno-pdf-preview {
    width: 100%;
    min-height: 600px;
    border: 0;
    border-radius: 12px;
    background: #111;
}
.home-sections {
    margin-top: 2rem;
}

.home-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 1.5rem;
    align-items: start;
}

.home-block {
    margin-bottom: 2rem;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: baseline;
    margin-bottom: 1rem;
}

.section-heading h2 {
    margin-bottom: 0;
}

.home-sidebar {
    position: sticky;
    top: 1rem;
}

.dyno-mini-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin: 1rem 0;
}

.dyno-mini-stats div {
    padding: 0.75rem;
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
}

.dyno-mini-stats span {
    display: block;
    color: #cfc6b8;
    font-size: 0.9rem;
}

.dyno-mini-stats strong {
    display: block;
    margin-top: 0.25rem;
}

/* Miniatury zdjęć na stronie głównej */
.home-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    max-width: 720px;
}

.home-gallery figure {
    margin: 0;
}

.home-gallery .lightbox-trigger {
    display: block;
    width: 100%;
}

.home-gallery img {
    display: block;
    width: 100%;
    height: 130px;
    object-fit: cover;
    border-radius: 10px;
}

.home-gallery figcaption {
    margin-top: 0.35rem;
    font-size: 0.85rem;
    color: #cfc6b8;
}

/* Responsywność strony głównej */
@media (max-width: 1000px) {
    .home-main-grid {
        grid-template-columns: 1fr;
    }

    .home-sidebar {
        position: static;
    }

    .home-gallery {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .section-heading {
        display: block;
    }

    .home-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: none;
    }

    .home-gallery img {
        height: 100px;
    }
}
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin: 2rem 0;
}

.pagination .btn.active {
    font-weight: 800;
    background: rgba(226,181,107,0.22);
}

.pagination-dots {
    color: var(--muted);
    padding: 0 0.25rem;
}
.shortcode-tools {
    margin: 1rem 0;
}

.shortcut-grid {
    display: grid;
    grid-template-columns: minmax(180px, 260px) auto;
    gap: 0.75rem 1rem;
    align-items: end;
}

.shortcut-help code {
    display: inline-block;
    margin: 0.2rem;
    padding: 0.15rem 0.35rem;
    border-radius: 6px;
    background: rgba(0,0,0,0.25);
}

.shortcut-lists {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.table.compact th,
.table.compact td {
    padding: 0.45rem;
    font-size: 0.9rem;
}

@media (max-width: 900px) {
    .shortcut-grid,
    .shortcut-lists {
        grid-template-columns: 1fr;
    }
}
.form-grid-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 700px) {
    .form-grid-two {
        grid-template-columns: 1fr;
    }
}
.identifier-feature-group {
    margin: 2rem 0;
}

.identifier-feature-card {
    margin: 1rem 0;
}

.identifier-feature-card h4 {
    margin-top: 0;
    font-size: 1.25rem;
}

.identifier-ranges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 1rem 0;
}

.identifier-feature-card details {
    margin-top: 1rem;
    color: var(--muted);
}

.identifier-feature-card summary {
    cursor: pointer;
    color: var(--accent-2);
}
.identifier-feature-images {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 1rem 0;
}

.identifier-feature-images figure {
    margin: 0;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
}

.identifier-feature-images img {
    display: block;
    width: 100%;
    height: 130px;
    object-fit: cover;
}

.identifier-feature-images figcaption {
    padding: 0.6rem;
    color: var(--muted);
    font-size: 0.88rem;
}

@media (max-width: 700px) {
    .identifier-feature-images {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .identifier-feature-images img {
        height: 100px;
    }
}
.identifier-summary {
    margin: 1.5rem 0;
}

.identifier-summary h2 {
    margin-top: 0;
}
.admin-counter-box {
    margin: 1rem 0;
}

.admin-counter-box p {
    margin: 0.35rem 0;
}
.compact-filter-form {
    margin-top: 1rem;
}

.compact-filter-form button,
.compact-filter-form .btn {
    margin-right: 0.5rem;
}
.inline-admin-form {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.inline-admin-form select {
    margin-top: 0.35rem;
    width: 100%;
}

.inline-admin-form button {
    margin-top: 0.5rem;
}
.article-table-wrap {
    width: 100%;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.article-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.article-table th,
.article-table td {
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 0.65rem 0.8rem;
    vertical-align: top;
}

.article-table th {
    font-weight: 700;
    background: rgba(255, 255, 255, 0.08);
}

.article-table tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.035);
}
.article-cover-image {
    margin: 1.5rem 0 2rem;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
}

.article-cover-image img {
    display: block;
    width: 100%;
    max-height: 420px;
    object-fit: cover;
}
